@golemio/pid 3.4.0 → 3.4.1-dev.1622739356
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/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/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.js +8 -17
- 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/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/models/PIDDepartureBoardsModel.js +11 -21
- 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 +2 -4
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.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.js +32 -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.js +153 -172
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -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/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/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/package.json +3 -3
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
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
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
24
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
25
16
|
};
|
|
@@ -45,38 +36,40 @@ let TransferFacade = exports.TransferFacade = class TransferFacade {
|
|
|
45
36
|
* - Process them (filter, sort, etc.)
|
|
46
37
|
* - Transform them to DTO
|
|
47
38
|
*/
|
|
48
|
-
getTransferDepartures(stopIds, tripNumber, currentMoment, minutesOffset, timeZone = shared_1.RopidRouterUtils.TIMEZONE) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
throw new golemio_errors_1.GeneralError("Failed to retrieve transfer departures", this.constructor.name, error, 500);
|
|
63
|
-
}
|
|
64
|
-
if (departureEntities.length === 0) {
|
|
65
|
-
return [];
|
|
66
|
-
}
|
|
67
|
-
let transferDepartures = [];
|
|
68
|
-
try {
|
|
69
|
-
const processedDepartures = new PIDDepartureModel_1.default(departureEntities, Object.assign(Object.assign({}, this.defaultOptions), { timezone: timeZone, tripNumber })).processAndReturnTransfers();
|
|
70
|
-
transferDepartures = this.departureTransformation.transformArray(processedDepartures);
|
|
39
|
+
async getTransferDepartures(stopIds, tripNumber, currentMoment, minutesOffset, timeZone = shared_1.RopidRouterUtils.TIMEZONE) {
|
|
40
|
+
let departureEntities = [];
|
|
41
|
+
try {
|
|
42
|
+
departureEntities = await this.departureRepository.getTransferDepartures({
|
|
43
|
+
stopsIds: stopIds,
|
|
44
|
+
currentMoment,
|
|
45
|
+
minutesOffset,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError) {
|
|
50
|
+
throw error;
|
|
71
51
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
52
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve transfer departures", this.constructor.name, error, 500);
|
|
53
|
+
}
|
|
54
|
+
if (departureEntities.length === 0) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
let transferDepartures = [];
|
|
58
|
+
try {
|
|
59
|
+
const processedDepartures = new PIDDepartureModel_1.default(departureEntities, {
|
|
60
|
+
...this.defaultOptions,
|
|
61
|
+
timezone: timeZone,
|
|
62
|
+
tripNumber,
|
|
63
|
+
}).processAndReturnTransfers();
|
|
64
|
+
transferDepartures = this.departureTransformation.transformArray(processedDepartures);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError) {
|
|
68
|
+
throw error;
|
|
77
69
|
}
|
|
78
|
-
|
|
79
|
-
}
|
|
70
|
+
throw new golemio_errors_1.GeneralError("Failed to process transfer departures", this.constructor.name, error, 500);
|
|
71
|
+
}
|
|
72
|
+
return transferDepartures;
|
|
80
73
|
}
|
|
81
74
|
/**
|
|
82
75
|
* Fallback options as defined by ROPID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/TransferFacade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransferFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/TransferFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAgI;AAChI,mDAA2D;AAC3D,qDAAoD;AACpD,+FAA0E;AAC1E,0HAAoG;AACpG,4CAA8C;AAC9C,6EAA8F;AAE9F,iEAAwE;AACxE,wGAAqG;AAG9F,IAAM,cAAc,4BAApB,MAAM,cAAc;IACvB,YACqD,mBAAyC,EAC9B,uBAAwD;QADnE,wBAAmB,GAAnB,mBAAmB,CAAsB;QAC9B,4BAAuB,GAAvB,uBAAuB,CAAiC;IACrH,CAAC;IAEJ;;;;;OAKG;IACI,KAAK,CAAC,qBAAqB,CAC9B,OAAiB,EACjB,UAAkB,EAClB,aAAqB,EACrB,aAAqB,EACrB,QAAQ,GAAG,yBAAgB,CAAC,QAAQ;QAEpC,IAAI,iBAAiB,GAAyB,EAAE,CAAC;QACjD,IAAI;YACA,iBAAiB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,qBAAqB,CAAC;gBACrE,QAAQ,EAAE,OAAO;gBACjB,aAAa;gBACb,aAAa;aAChB,CAAC,CAAC;SACN;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,qCAAoB,EAAE;gBACvC,MAAM,KAAK,CAAC;aACf;YAED,MAAM,IAAI,6BAAY,CAAC,wCAAwC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;SACvG;QAED,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;YAChC,OAAO,EAAE,CAAC;SACb;QAED,IAAI,kBAAkB,GAAyB,EAAE,CAAC;QAClD,IAAI;YACA,MAAM,mBAAmB,GAAG,IAAI,2BAAkB,CAAC,iBAAiB,EAAE;gBAClE,GAAG,IAAI,CAAC,cAAc;gBACtB,QAAQ,EAAE,QAAQ;gBAClB,UAAU;aACb,CAAC,CAAC,yBAAyB,EAAE,CAAC;YAE/B,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;SACzF;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,qCAAoB,EAAE;gBACvC,MAAM,KAAK,CAAC;aACf;YAED,MAAM,IAAI,6BAAY,CAAC,uCAAuC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;SACtG;QAED,OAAO,kBAAkB,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAY,cAAc;QACtB,OAAO;YACH,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,mBAAa,CAAC,UAAU;YAC9B,KAAK,EAAE,oBAAc,CAAC,IAAI;YAC1B,MAAM,EAAE,qBAAe,CAAC,6BAA6B;YACrD,IAAI,EAAE,CAAC,mBAAa,CAAC,QAAQ,CAAC;YAC9B,oBAAoB,EAAE,EAAE;SAC3B,CAAC;IACN,CAAC;CACJ,CAAA;yBAzEY,cAAc;IAD1B,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,oBAAoB,CAAC,CAAA;IACvC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,+BAA+B,CAAC,CAAA;qCADmB,kCAAoB;QACL,iEAA+B;GAH/G,cAAc,CAyE1B"}
|
package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js
CHANGED
|
@@ -16,14 +16,13 @@ let JISInfotextDepartureTransformation = exports.JISInfotextDepartureTransformat
|
|
|
16
16
|
super(...arguments);
|
|
17
17
|
this.name = "JISInfotextDepartureTransformation";
|
|
18
18
|
this.transformInternal = ({ data, timeZone }) => {
|
|
19
|
-
|
|
20
|
-
const stops = (_a = data.stops) !== null && _a !== void 0 ? _a : [];
|
|
19
|
+
const stops = data.stops ?? [];
|
|
21
20
|
return {
|
|
22
21
|
display_type: DisplayTypeMapper_1.DisplayTypeMapper.mapInputToOutputDisplayType(data.display_type),
|
|
23
22
|
text: data.description_text.cs,
|
|
24
|
-
text_en:
|
|
23
|
+
text_en: data.description_text.en ?? null,
|
|
25
24
|
related_stops: stops.map((stop) => stop.stop_id),
|
|
26
|
-
valid_from:
|
|
25
|
+
valid_from: shared_1.RopidRouterUtils.formatTimestamp(data.active_period_start, timeZone) ?? data.active_period_start.toISOString(),
|
|
27
26
|
valid_to: shared_1.RopidRouterUtils.formatTimestamp(data.active_period_end, timeZone),
|
|
28
27
|
};
|
|
29
28
|
};
|
package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,4CAA8C;AAC9C,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AAG1D,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,+CAGvD;IAHM;;QAII,SAAI,GAAG,oCAAoC,CAAC;QAEzC,sBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAA8B,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"JISInfotextDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,4CAA8C;AAC9C,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AAG1D,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,+CAGvD;IAHM;;QAII,SAAI,GAAG,oCAAoC,CAAC;QAEzC,sBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAA8B,EAAE,EAAE;YAC7E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC/B,OAAO;gBACH,YAAY,EAAE,qCAAiB,CAAC,2BAA2B,CAAC,IAAI,CAAC,YAAY,CAAC;gBAC9E,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,EAAE;gBAC9B,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,EAAE,IAAI,IAAI;gBACzC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;gBAChD,UAAU,EACN,yBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE;gBAClH,QAAQ,EAAE,yBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC;aAC/E,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;6CAlBY,kCAAkC;IAD9C,IAAA,qBAAU,GAAE;GACA,kCAAkC,CAkB9C"}
|
package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js
CHANGED
|
@@ -17,22 +17,18 @@ let JISInfotextOverviewTransformation = exports.JISInfotextOverviewTransformatio
|
|
|
17
17
|
super(...arguments);
|
|
18
18
|
this.name = "JISInfotextOverviewTransformation";
|
|
19
19
|
this.transformInternal = (inputDto) => {
|
|
20
|
-
|
|
21
|
-
const stops = (_a = inputDto.stops) !== null && _a !== void 0 ? _a : [];
|
|
20
|
+
const stops = inputDto.stops ?? [];
|
|
22
21
|
return {
|
|
23
22
|
priority: PriorityMapper_1.PriorityMapper.mapInputToOutputPriority(inputDto.severity_level),
|
|
24
23
|
display_type: DisplayTypeMapper_1.DisplayTypeMapper.mapInputToOutputDisplayType(inputDto.display_type),
|
|
25
24
|
text: inputDto.description_text.cs,
|
|
26
|
-
text_en:
|
|
27
|
-
related_stops: stops.map((stop) => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
}),
|
|
35
|
-
valid_from: (_c = shared_1.RopidRouterUtils.formatTimestamp(inputDto.active_period_start)) !== null && _c !== void 0 ? _c : inputDto.active_period_start.toISOString(),
|
|
25
|
+
text_en: inputDto.description_text.en ?? null,
|
|
26
|
+
related_stops: stops.map((stop) => ({
|
|
27
|
+
id: stop.stop_id,
|
|
28
|
+
name: stop.stop_name,
|
|
29
|
+
platform_code: stop.platform_code ?? null,
|
|
30
|
+
})),
|
|
31
|
+
valid_from: shared_1.RopidRouterUtils.formatTimestamp(inputDto.active_period_start) ?? inputDto.active_period_start.toISOString(),
|
|
36
32
|
valid_to: shared_1.RopidRouterUtils.formatTimestamp(inputDto.active_period_end),
|
|
37
33
|
id: inputDto.id,
|
|
38
34
|
};
|
package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextOverviewTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,4CAA8C;AAE9C,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AACjE,8DAA2D;AAGpD,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,+CAAqE;IAArH;;QACI,SAAI,GAAG,mCAAmC,CAAC;QAExC,sBAAiB,GAAG,CAAC,QAA2B,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"JISInfotextOverviewTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,4CAA8C;AAE9C,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AACjE,8DAA2D;AAGpD,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,+CAAqE;IAArH;;QACI,SAAI,GAAG,mCAAmC,CAAC;QAExC,sBAAiB,GAAG,CAAC,QAA2B,EAAE,EAAE;YAC1D,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC;YACnC,OAAO;gBACH,QAAQ,EAAE,+BAAc,CAAC,wBAAwB,CAAC,QAAQ,CAAC,cAAc,CAAC;gBAC1E,YAAY,EAAE,qCAAiB,CAAC,2BAA2B,CAAC,QAAQ,CAAC,YAAY,CAAC;gBAClF,IAAI,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE;gBAClC,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,IAAI,IAAI;gBAC7C,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;oBAChC,EAAE,EAAE,IAAI,CAAC,OAAO;oBAChB,IAAI,EAAE,IAAI,CAAC,SAAS;oBACpB,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,IAAI;iBAC5C,CAAC,CAAC;gBACH,UAAU,EACN,yBAAgB,CAAC,eAAe,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE;gBAChH,QAAQ,EAAE,yBAAgB,CAAC,eAAe,CAAC,QAAQ,CAAC,iBAAiB,CAAC;gBACtE,EAAE,EAAE,QAAQ,CAAC,EAAE;aAClB,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;4CArBY,iCAAiC;IAD7C,IAAA,qBAAU,GAAE;GACA,iCAAiC,CAqB7C"}
|
package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js
CHANGED
|
@@ -15,11 +15,10 @@ let JISInfotextTransferTransformation = exports.JISInfotextTransferTransformatio
|
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.name = "JISInfotextTransferTransformation";
|
|
17
17
|
this.transformInternal = (infotext) => {
|
|
18
|
-
var _a;
|
|
19
18
|
return {
|
|
20
19
|
display_type: DisplayTypeMapper_1.DisplayTypeMapper.mapInputToOutputDisplayType(infotext.display_type),
|
|
21
20
|
text: infotext.description_text.cs,
|
|
22
|
-
text_en:
|
|
21
|
+
text_en: infotext.description_text.en ?? null,
|
|
23
22
|
};
|
|
24
23
|
};
|
|
25
24
|
}
|
package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextTransferTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AAG1D,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,+CAAqE;IAArH;;QACI,SAAI,GAAG,mCAAmC,CAAC;QAExC,sBAAiB,GAAG,CAAC,QAA2B,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"JISInfotextTransferTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AAG1D,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,+CAAqE;IAArH;;QACI,SAAI,GAAG,mCAAmC,CAAC;QAExC,sBAAiB,GAAG,CAAC,QAA2B,EAAE,EAAE;YAC1D,OAAO;gBACH,YAAY,EAAE,qCAAiB,CAAC,2BAA2B,CAAC,QAAQ,CAAC,YAAY,CAAC;gBAClF,IAAI,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE;gBAClC,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,IAAI,IAAI;aAChD,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;4CAVY,iCAAiC;IAD7C,IAAA,qBAAU,GAAE;GACA,iCAAiC,CAU7C"}
|
|
@@ -16,7 +16,6 @@ let TransferDepartureTransformation = exports.TransferDepartureTransformation =
|
|
|
16
16
|
super(...arguments);
|
|
17
17
|
this.name = "TransferDepartureTransformation";
|
|
18
18
|
this.transformInternal = (departure) => {
|
|
19
|
-
var _a;
|
|
20
19
|
return {
|
|
21
20
|
departure_timestamp: {
|
|
22
21
|
minutes: this.calculateDepartureMinutes(departure.departure_datetime_real),
|
|
@@ -29,7 +28,7 @@ let TransferDepartureTransformation = exports.TransferDepartureTransformation =
|
|
|
29
28
|
platform_code: PlatformCodeResolver_1.PlatformCodeResolver.resolve(departure),
|
|
30
29
|
},
|
|
31
30
|
trip: {
|
|
32
|
-
headsign:
|
|
31
|
+
headsign: departure.stop_headsign ?? departure.trip_headsign,
|
|
33
32
|
id: departure.trip_id,
|
|
34
33
|
},
|
|
35
34
|
};
|
package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/TransferDepartureTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,6EAAqE;AACrE,6GAA0G;AAC1G,iEAAgE;AAChE,0EAAuE;AAGhE,IAAM,+BAA+B,6CAArC,MAAM,+BAAgC,SAAQ,+CAA8D;IAA5G;;QACI,SAAI,GAAG,iCAAiC,CAAC;QAEtC,sBAAiB,GAAG,CAAC,SAA6B,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"TransferDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/TransferDepartureTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,6EAAqE;AACrE,6GAA0G;AAC1G,iEAAgE;AAChE,0EAAuE;AAGhE,IAAM,+BAA+B,6CAArC,MAAM,+BAAgC,SAAQ,+CAA8D;IAA5G;;QACI,SAAI,GAAG,iCAAiC,CAAC;QAEtC,sBAAiB,GAAG,CAAC,SAA6B,EAAE,EAAE;YAC5D,OAAO;gBACH,mBAAmB,EAAE;oBACjB,OAAO,EAAE,IAAI,CAAC,yBAAyB,CAAC,SAAS,CAAC,uBAAuB,CAAC;iBAC7E;gBACD,KAAK,EAAE;oBACH,UAAU,EAAE,SAAS,CAAC,gBAAgB;oBACtC,IAAI,EAAE,SAAS,CAAC,UAAU;iBAC7B;gBACD,IAAI,EAAE;oBACF,aAAa,EAAE,2CAAoB,CAAC,OAAO,CAAC,SAAS,CAAC;iBACzD;gBACD,IAAI,EAAE;oBACF,QAAQ,EAAE,SAAS,CAAC,aAAa,IAAI,SAAS,CAAC,aAAa;oBAC5D,EAAE,EAAE,SAAS,CAAC,OAAO;iBACxB;aACJ,CAAC;QACN,CAAC,CAAC;IAcN,CAAC;IAZW,yBAAyB,CAAC,SAAsB;QACpD,IAAI,CAAC,SAAS,EAAE;YACZ,OAAO,IAAI,CAAC;SACf;QAED,MAAM,iBAAiB,GAAG,yCAAmB,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC7E,IAAI,iBAAiB,GAAG,CAAC,EAAE;YACvB,OAAO,IAAI,CAAC;SACf;QAED,OAAO,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IACxC,CAAC;CACJ,CAAA;0CAlCY,+BAA+B;IAD3C,IAAA,qBAAU,GAAE;GACA,+BAA+B,CAkC3C"}
|
|
@@ -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.V2PublicDepartureBoardsController = void 0;
|
|
13
4
|
const Di_1 = require("../../ioc/Di");
|
|
@@ -15,12 +6,12 @@ const OgModuleToken_1 = require("../../ioc/OgModuleToken");
|
|
|
15
6
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
16
7
|
class V2PublicDepartureBoardsController {
|
|
17
8
|
constructor() {
|
|
18
|
-
this.getAll = (req, res, next) =>
|
|
9
|
+
this.getAll = async (req, res, next) => {
|
|
19
10
|
const span = (0, trace_provider_1.createChildSpan)("V2PublicDepartureBoardsController.getAll");
|
|
20
11
|
try {
|
|
21
12
|
const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.DepartureBoardFacade);
|
|
22
13
|
const params = this.parseDepartureParams(req.query);
|
|
23
|
-
const result =
|
|
14
|
+
const result = await facade.getAll(params.stopIds, params.limit, params.routeShortNames, params.minutesAfter);
|
|
24
15
|
if (result === null) {
|
|
25
16
|
res.status(404).send([]);
|
|
26
17
|
return;
|
|
@@ -31,9 +22,9 @@ class V2PublicDepartureBoardsController {
|
|
|
31
22
|
next(err);
|
|
32
23
|
}
|
|
33
24
|
finally {
|
|
34
|
-
span
|
|
25
|
+
span?.end();
|
|
35
26
|
}
|
|
36
|
-
}
|
|
27
|
+
};
|
|
37
28
|
}
|
|
38
29
|
parseDepartureParams(query) {
|
|
39
30
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V2PublicDepartureBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"V2PublicDepartureBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.ts"],"names":[],"mappings":";;;AAAA,qCAAsD;AACtD,2DAA6D;AAK7D,+FAA6F;AAE7F,MAAa,iCAAiC;IAC1C;QAEO,WAAM,GAAmB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACrD,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,0CAA0C,CAAC,CAAC;YAEzE,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAAuB,6BAAa,CAAC,oBAAoB,CAAC,CAAC;gBACnG,MAAM,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACpD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;gBAE9G,IAAI,MAAM,KAAK,IAAI,EAAE;oBACjB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACzB,OAAO;iBACV;gBACD,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACpB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,EAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAC;IApBa,CAAC;IAsBR,oBAAoB,CAAC,KAAe;QACxC,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,YAAY,KAAK,CAAC,CAAC,CAAE,KAAK,CAAC,OAAoB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAiB,CAAC,CAAC;YACpH,eAAe,EAAE,KAAK,CAAC,eAAe;gBAClC,CAAC,CAAC,KAAK,CAAC,eAAe,YAAY,KAAK;oBACpC,CAAC,CAAE,KAAK,CAAC,eAA4B;oBACrC,CAAC,CAAC,CAAC,KAAK,CAAC,eAAyB,CAAC;gBACvC,CAAC,CAAC,IAAI;YACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAsB,CAAC,CAAC,CAAC,CAAC,EAAE;SACjF,CAAC;IACN,CAAC;IAEO,YAAY,CAAC,gBAA0B;QAC3C,IAAI,MAAM,GAAsC,IAAI,GAAG,EAAE,CAAC;QAE1D,KAAK,MAAM,MAAM,IAAI,gBAAgB,EAAE;YACnC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACxC,MAAM,OAAO,GAAa,MAAM,CAAC,QAAQ,CAAC,CAAC;YAE3C,MAAM,CAAC,GAAG,CAAC;gBACP,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACnC,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;aACjC,CAAC,CAAC;SACN;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AApDD,8EAoDC"}
|
|
@@ -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.V2PublicGtfsController = void 0;
|
|
13
4
|
const Di_1 = require("../../ioc/Di");
|
|
@@ -15,21 +6,21 @@ const OgModuleToken_1 = require("../../ioc/OgModuleToken");
|
|
|
15
6
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
16
7
|
class V2PublicGtfsController {
|
|
17
8
|
constructor() {
|
|
18
|
-
this.getOneTrip = (req, res, next) =>
|
|
9
|
+
this.getOneTrip = async (req, res, next) => {
|
|
19
10
|
const span = (0, trace_provider_1.createChildSpan)("V2PublicGtfsController.getOneTrip");
|
|
20
11
|
try {
|
|
21
12
|
const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.GtfsTripLookupFacade);
|
|
22
13
|
const params = this.parseGtfsTripLookupParams(req);
|
|
23
|
-
const info =
|
|
14
|
+
const info = await facade.getOneByGtfsTripId(params.gtfsTripId, params.scopes);
|
|
24
15
|
res.json(info);
|
|
25
16
|
}
|
|
26
17
|
catch (err) {
|
|
27
18
|
next(err);
|
|
28
19
|
}
|
|
29
20
|
finally {
|
|
30
|
-
span
|
|
21
|
+
span?.end();
|
|
31
22
|
}
|
|
32
|
-
}
|
|
23
|
+
};
|
|
33
24
|
}
|
|
34
25
|
parseGtfsTripLookupParams(req) {
|
|
35
26
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V2PublicGtfsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicGtfsController.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"V2PublicGtfsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicGtfsController.ts"],"names":[],"mappings":";;;AAAA,qCAAsD;AACtD,2DAA6D;AAG7D,+FAA6F;AAI7F,MAAa,sBAAsB;IAAnC;QACW,eAAU,GAAmB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACzD,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,mCAAmC,CAAC,CAAC;YAElE,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAAuB,6BAAa,CAAC,oBAAoB,CAAC,CAAC;gBACnG,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBACnD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBAE/E,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,EAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAC;IAWN,CAAC;IATW,yBAAyB,CAAC,GAAY;QAC1C,OAAO;YACH,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU;YACjC,MAAM,EACF,GAAG,CAAC,KAAK,CAAC,MAAM,YAAY,KAAK;gBAC7B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,MAA6B,CAAC,CAAC;gBAC9D,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAA2B,CAAC;SACpD,CAAC;IACN,CAAC;CACJ;AA1BD,wDA0BC"}
|
|
@@ -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.V2PublicVehiclePositionsController = void 0;
|
|
13
4
|
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
@@ -16,39 +7,39 @@ const Di_1 = require("../../ioc/Di");
|
|
|
16
7
|
const OgModuleToken_1 = require("../../ioc/OgModuleToken");
|
|
17
8
|
class V2PublicVehiclePositionsController {
|
|
18
9
|
constructor() {
|
|
19
|
-
this.getAll = (req, res, next) =>
|
|
10
|
+
this.getAll = async (req, res, next) => {
|
|
20
11
|
try {
|
|
21
12
|
const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.PublicVehiclePositionsFacade);
|
|
22
13
|
const params = this.parsePositionsParams(req.query);
|
|
23
|
-
const result =
|
|
14
|
+
const result = await facade.getAll(params.boundingBox, params.routeShortName, params.type);
|
|
24
15
|
res.json(result);
|
|
25
16
|
}
|
|
26
17
|
catch (err) {
|
|
27
18
|
next(err);
|
|
28
19
|
}
|
|
29
|
-
}
|
|
30
|
-
this.getOneByVehicleId = (req, res, next) =>
|
|
20
|
+
};
|
|
21
|
+
this.getOneByVehicleId = async (req, res, next) => {
|
|
31
22
|
try {
|
|
32
23
|
const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.DetailedTripFacade);
|
|
33
24
|
const params = this.parseDetailedParams(req);
|
|
34
|
-
const info =
|
|
25
|
+
const info = await facade.getOneByVehicleId(params.vehicleId, params.scopes);
|
|
35
26
|
res.json(info);
|
|
36
27
|
}
|
|
37
28
|
catch (err) {
|
|
38
29
|
next(err);
|
|
39
30
|
}
|
|
40
|
-
}
|
|
41
|
-
this.getOneByParamsCombination = (req, res, next) =>
|
|
31
|
+
};
|
|
32
|
+
this.getOneByParamsCombination = async (req, res, next) => {
|
|
42
33
|
try {
|
|
43
34
|
const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.DetailedTripFacade);
|
|
44
35
|
const params = this.parseDetailedParams(req);
|
|
45
|
-
const info =
|
|
36
|
+
const info = await facade.getOneByVehicleId(params.vehicleId, params.scopes, params.tripId);
|
|
46
37
|
res.json(info);
|
|
47
38
|
}
|
|
48
39
|
catch (err) {
|
|
49
40
|
next(err);
|
|
50
41
|
}
|
|
51
|
-
}
|
|
42
|
+
};
|
|
52
43
|
}
|
|
53
44
|
parsePositionsParams(query) {
|
|
54
45
|
const boundingBox = query.boundingBox ? query.boundingBox.split(",").map((x) => parseFloat(x)) : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V2PublicVehiclePositionsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"V2PublicVehiclePositionsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.ts"],"names":[],"mappings":";;;AAAA,uEAA2D;AAC3D,8CAA6D;AAC7D,qCAAsD;AACtD,2DAA6D;AAQ7D,MAAa,kCAAkC;IAC3C;QAEO,WAAM,GAAmB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACrD,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAA+B,6BAAa,CAAC,4BAA4B,CAAC,CAAC;gBACnH,MAAM,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACpD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;gBAE3F,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACpB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAC;QAEK,sBAAiB,GAAmB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAChE,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAAqB,6BAAa,CAAC,kBAAkB,CAAC,CAAC;gBAC/F,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;gBAC7C,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBAE7E,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAC;QAEK,8BAAyB,GAAmB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACxE,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAAqB,6BAAa,CAAC,kBAAkB,CAAC,CAAC;gBAC/F,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;gBAC7C,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBAE5F,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAC;IApCa,CAAC;IAsCR,oBAAoB,CAAC,KAAe;QACxC,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAE,KAAK,CAAC,WAAsB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvH,mEAAmE;QACnE,OAAO;YACH,WAAW,EAAE;gBACT,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,0BAAkB,CAAC,gBAAgB;gBACpF,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,0BAAkB,CAAC,eAAe;gBAClF,oBAAoB,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,0BAAkB,CAAC,oBAAoB;gBAC5F,mBAAmB,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,0BAAkB,CAAC,mBAAmB;aAC7F;YACD,cAAc,EAAE,KAAK,CAAC,cAAc;gBAChC,CAAC,CAAC,KAAK,CAAC,cAAc,YAAY,KAAK;oBACnC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAwB,CAAC;oBACxE,CAAC,CAAE,KAAK,CAAC,cAAyB;gBACtC,CAAC,CAAC,SAAS;YACf,IAAI,EAAE,KAAK,CAAC,SAAS;gBACjB,CAAC,CAAC,KAAK,CAAC,SAAS,YAAY,KAAK;oBAC9B,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,iCAAgB,EAAC,IAAc,CAAC,CAAC;oBACjE,CAAC,CAAC,CAAC,IAAA,iCAAgB,EAAC,KAAK,CAAC,SAAmB,CAAC,CAAC;gBACnD,CAAC,CAAC,SAAS;SAClB,CAAC;IACN,CAAC;IAEO,mBAAmB,CAAC,GAAY;QACpC,OAAO;YACH,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS;YAC/B,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU;YAC7B,MAAM,EACF,GAAG,CAAC,KAAK,CAAC,MAAM,YAAY,KAAK;gBAC7B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,MAA6B,CAAC,CAAC;gBAC9D,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAA2B,CAAC;SACpD,CAAC;IACN,CAAC;CACJ;AAxED,gFAwEC"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
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
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.VehicleDescriptorCachedRepository = void 0;
|
|
25
16
|
const const_1 = require("../../../schema-definitions/const");
|
|
@@ -38,25 +29,21 @@ let VehicleDescriptorCachedRepository = exports.VehicleDescriptorCachedRepositor
|
|
|
38
29
|
.getConnection()
|
|
39
30
|
.define(this.tableName, models_1.DescriptorModel.attributeModel, { schema: this.schema, timestamps: false });
|
|
40
31
|
}
|
|
41
|
-
getAllInternal() {
|
|
42
|
-
return
|
|
43
|
-
return this.sequelizeModel.findAll({ raw: true });
|
|
44
|
-
});
|
|
32
|
+
async getAllInternal() {
|
|
33
|
+
return this.sequelizeModel.findAll({ raw: true });
|
|
45
34
|
}
|
|
46
|
-
getOneByRegNumber(routeType, registrationNumber) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
return vehicleDescriptor;
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot get vehicle descriptor from cache: ${err.message}`, this.constructor.name, err);
|
|
35
|
+
async getOneByRegNumber(routeType, registrationNumber) {
|
|
36
|
+
try {
|
|
37
|
+
const data = await this.getAll();
|
|
38
|
+
const vehicleDescriptor = data.find((el) => el.gtfs_route_type === routeType && el.registration_number === registrationNumber);
|
|
39
|
+
if (!vehicleDescriptor) {
|
|
40
|
+
return null;
|
|
58
41
|
}
|
|
59
|
-
|
|
42
|
+
return vehicleDescriptor;
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot get vehicle descriptor from cache: ${err.message}`, this.constructor.name, err);
|
|
46
|
+
}
|
|
60
47
|
}
|
|
61
48
|
};
|
|
62
49
|
exports.VehicleDescriptorCachedRepository = VehicleDescriptorCachedRepository = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleDescriptorCachedRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/data-access/VehicleDescriptorCachedRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VehicleDescriptorCachedRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/data-access/VehicleDescriptorCachedRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,6DAAuC;AACvC,mFAAkE;AAIlE,oIAAiI;AACjI,wEAAqE;AACrE,6EAAwE;AAExE,iEAAwE;AAGjE,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,mDAA8C;IAKjG,YAAiD,SAA6B,EAA4B,MAAe;QACrH,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;QACjC,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QANpC,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,wBAAe,CAAC,SAAS,CAAC;QAMzC,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,wBAAe,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5G,CAAC;IAES,KAAK,CAAC,cAAc;QAC1B,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAC1B,SAA4B,EAC5B,kBAA0B;QAE1B,IAAI;YACA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;YACjC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAC/B,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,eAAe,KAAK,SAAS,IAAI,EAAE,CAAC,mBAAmB,KAAK,kBAAkB,CAC5F,CAAC;YAEF,IAAI,CAAC,iBAAiB,EAAE;gBACpB,OAAO,IAAI,CAAC;aACf;YAED,OAAO,iBAAiB,CAAC;SAC5B;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,+CAA+C,GAAG,CAAC,OAAO,EAAE,EACpF,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;SACL;IACL,CAAC;CACJ,CAAA;4CAxCY,iCAAiC;IAD7C,IAAA,qBAAU,GAAE;IAMI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IAAiC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GALhG,iCAAiC,CAwC7C"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
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
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.DelayComputationRepository = void 0;
|
|
25
16
|
const const_1 = require("../../../../schema-definitions/vehicle-positions/redis/const");
|
|
@@ -33,30 +24,28 @@ let DelayComputationRepository = exports.DelayComputationRepository = class Dela
|
|
|
33
24
|
this.redisConnector = redisConnector;
|
|
34
25
|
this.log = log;
|
|
35
26
|
}
|
|
36
|
-
getDelayComputationCache(gtfsTripId) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
});
|
|
27
|
+
async getDelayComputationCache(gtfsTripId) {
|
|
28
|
+
if (!this.redisConnector.isConnected()) {
|
|
29
|
+
await this.redisConnector.connect();
|
|
30
|
+
}
|
|
31
|
+
const connection = this.redisConnector.getConnection();
|
|
32
|
+
let delayComputationCache = null;
|
|
33
|
+
try {
|
|
34
|
+
delayComputationCache = await connection.get(`${const_1.GTFS_DELAY_COMPUTATION_NAMESPACE_PREFIX}:${gtfsTripId}`);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot get delay computation cache from cache: ${err.message}`, this.constructor.name, err);
|
|
38
|
+
}
|
|
39
|
+
if (delayComputationCache === null) {
|
|
40
|
+
this.log.info(`${this.constructor.name}: Cannot find delay computation cache`);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
return JSON.parse(delayComputationCache);
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot parse delay computation cache: ${err.message}`, this.constructor.name, err);
|
|
48
|
+
}
|
|
60
49
|
}
|
|
61
50
|
};
|
|
62
51
|
exports.DelayComputationRepository = DelayComputationRepository = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DelayComputationRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/DelayComputationRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DelayComputationRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/DelayComputationRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,wFAA6F;AAC7F,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,0BAA0B,wCAAhC,MAAM,0BAA0B;IACnC,YACmD,cAAgC,EAC7C,GAAY;QADC,mBAAc,GAAd,cAAc,CAAkB;QAC7C,QAAG,GAAH,GAAG,CAAS;IAC/C,CAAC;IAEG,KAAK,CAAC,wBAAwB,CAAC,UAAkB;QACpD,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,qBAAqB,GAAkB,IAAI,CAAC;QAEhD,IAAI;YACA,qBAAqB,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,GAAG,+CAAuC,IAAI,UAAU,EAAE,CAAC,CAAC;SAC5G;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,oDAAoD,GAAG,CAAC,OAAO,EAAE,EACzF,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;SACL;QAED,IAAI,qBAAqB,KAAK,IAAI,EAAE;YAChC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,uCAAuC,CAAC,CAAC;YAC/E,OAAO,IAAI,CAAC;SACf;QAED,IAAI;YACA,OAAO,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;SAC5C;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,2CAA2C,GAAG,CAAC,OAAO,EAAE,EAChF,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;SACL;IACL,CAAC;CACJ,CAAA;qCAvCY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAF1E,0BAA0B,CAuCtC"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
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
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.PublicGtfsDepartureRepository = void 0;
|
|
25
16
|
const const_1 = require("../../../../schema-definitions/ropid-gtfs/redis/const");
|
|
@@ -32,11 +23,11 @@ let PublicGtfsDepartureRepository = exports.PublicGtfsDepartureRepository = clas
|
|
|
32
23
|
constructor(redisConnector, log) {
|
|
33
24
|
this.redisConnector = redisConnector;
|
|
34
25
|
this.log = log;
|
|
35
|
-
this.getAndParseDepartureCache = (stopId, minutesAfter) =>
|
|
26
|
+
this.getAndParseDepartureCache = async (stopId, minutesAfter) => {
|
|
36
27
|
const connection = this.redisConnector.getConnection();
|
|
37
28
|
let departureCache;
|
|
38
29
|
try {
|
|
39
|
-
departureCache =
|
|
30
|
+
departureCache = await connection.zrangebyscore(`${const_1.PUBLIC_DEPARTURE_NAMESPACE_PREFIX}:${stopId}`, "-inf", Math.round(new Date().getTime() / 1000) + minutesAfter * 60);
|
|
40
31
|
}
|
|
41
32
|
catch (err) {
|
|
42
33
|
throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot get public departure cache from cache: ${err.message}`, this.constructor.name, err);
|
|
@@ -51,16 +42,14 @@ let PublicGtfsDepartureRepository = exports.PublicGtfsDepartureRepository = clas
|
|
|
51
42
|
catch (err) {
|
|
52
43
|
throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot parse public departure cache: ${err.message}`, this.constructor.name, err);
|
|
53
44
|
}
|
|
54
|
-
}
|
|
45
|
+
};
|
|
55
46
|
}
|
|
56
|
-
getPublicGtfsDepartureCache(stopIds, minutesAfter) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return allDepartures.flat();
|
|
63
|
-
});
|
|
47
|
+
async getPublicGtfsDepartureCache(stopIds, minutesAfter) {
|
|
48
|
+
if (!this.redisConnector.isConnected()) {
|
|
49
|
+
await this.redisConnector.connect();
|
|
50
|
+
}
|
|
51
|
+
const allDepartures = await Promise.all(stopIds.map((stopId) => this.getAndParseDepartureCache(stopId, minutesAfter)));
|
|
52
|
+
return allDepartures.flat();
|
|
64
53
|
}
|
|
65
54
|
};
|
|
66
55
|
exports.PublicGtfsDepartureRepository = PublicGtfsDepartureRepository = __decorate([
|