@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PIDDepartureBoardsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/PIDDepartureBoardsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PIDDepartureBoardsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/PIDDepartureBoardsModel.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA0D;AAC1D,gDAA2D;AAG3D,oDAA+C;AAO/C,wEAAqE;AACrE,+FAA6F;AAC7F,6EAA8F;AAC9F,gGAA2E;AAC3E,wBAAmD;AACnD,0BAAkD;AAIlD,kCAA2C;AAC3C,kDAA+C;AAE/C,oFAA6D;AAG7D,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,0EAA0E;AAC1E,sEAAsE;AACtE,MAAM,uBAAuB;IASzB;QACI,IAAI,CAAC,GAAG,GAAG,mBAAc,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QAC7D,IAAI,CAAC,8BAA8B,GAAG,IAAI,iCAA8B,EAAE,CAAC;QAC3E,IAAI,CAAC,oBAAoB,GAAG,IAAI,kCAAoB,CAChD,mBAAc,CAAC,OAAO,CAAqB,qBAAS,CAAC,iBAAiB,CAAC,EACvE,mBAAc,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAChE,CAAC;QACF,IAAI,CAAC,uBAAuB,GAAG,mBAAc,CAAC,OAAO,CAA2B,uBAAU,CAAC,uBAAuB,CAAC,CAAC;QACpH,IAAI,CAAC,wBAAwB,GAAG,mBAAc,CAAC,OAAO,CAClD,uBAAU,CAAC,gCAAgC,CAC9C,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,mBAAc,CAAC,OAAO,CAAwB,uBAAU,CAAC,qBAAqB,CAAC,CAAC;QAC1G,IAAI,CAAC,sBAAsB,GAAG,mBAAc,CAAC,OAAO,CAChD,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kB,GAAG,IAAA,gCAAe,EAAC,kCAAkC,CAAC,CAAC;QAE/E,IAAI;YACA,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzC,cAAc,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,6BAA6B,CAAC,YAAY,CAAC,CAAC;YACjG,kBAAkB,EAAE,GAAG,EAAE,CAAC;SAC7B;QAAC,OAAO,KAAK,EAAE;YACZ,kBAAkB,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;YAC3C,IAAI,CAAC,GAAG,CAAC,KAAK,CACV,KAAK;YACL,mCAAmC;YACnC,sIAAsI,CACzI,CAAC;SACL;gBAAS;YACN,OAAO,cAAc,CAAC;SACzB;IACL,CAAC;CACJ;AAEQ,0DAAuB"}
|
|
@@ -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
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -25,7 +16,11 @@ class RopidDeparturesDirectionsModel extends output_gateway_1.SequelizeModel {
|
|
|
25
16
|
super(ropid_departures_directions_1.RopidDeparturesDirections.departureDirections.name + "Model", ropid_departures_directions_1.RopidDeparturesDirections.departureDirections.pgTableName, ropid_departures_directions_1.RopidDeparturesDirections.departureDirections.outputSequelizeAttributes, { schema: const_1.PG_SCHEMA });
|
|
26
17
|
this.convertItem = (item) => {
|
|
27
18
|
// converting types
|
|
28
|
-
return
|
|
19
|
+
return {
|
|
20
|
+
...item,
|
|
21
|
+
next_stop_id_regexp: new RegExp(item.next_stop_id_regexp),
|
|
22
|
+
direction: item.direction,
|
|
23
|
+
};
|
|
29
24
|
};
|
|
30
25
|
this.convertItems = (items) => {
|
|
31
26
|
return items.map((item) => this.convertItem(item));
|
|
@@ -34,24 +29,22 @@ class RopidDeparturesDirectionsModel extends output_gateway_1.SequelizeModel {
|
|
|
34
29
|
GetOne(id) {
|
|
35
30
|
throw new Error("Method not implemented.");
|
|
36
31
|
}
|
|
37
|
-
GetAll(stopsIds) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[sequelize_1.default.Op.in]: stopsIds,
|
|
46
|
-
},
|
|
32
|
+
async GetAll(stopsIds) {
|
|
33
|
+
if (!stopsIds || stopsIds.length === 0) {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
return this.convertItems((await this.sequelizeModel.findAll({
|
|
37
|
+
where: {
|
|
38
|
+
departure_stop_id: {
|
|
39
|
+
[sequelize_1.default.Op.in]: stopsIds,
|
|
47
40
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
],
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
});
|
|
41
|
+
},
|
|
42
|
+
order: [
|
|
43
|
+
["departure_stop_id", "asc"],
|
|
44
|
+
["rule_order", "asc"],
|
|
45
|
+
],
|
|
46
|
+
raw: true,
|
|
47
|
+
})));
|
|
55
48
|
}
|
|
56
49
|
}
|
|
57
50
|
exports.RopidDeparturesDirectionsModel = RopidDeparturesDirectionsModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidDeparturesDirectionsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidDeparturesDirectionsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidDeparturesDirectionsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidDeparturesDirectionsModel.ts"],"names":[],"mappings":";;;;;;AAAA,6DAAuC;AACvC,yGAK0C;AAC1C,sEAAmE;AACnE,oFAA4D;AAE5D;;GAEG;AACH,MAAa,8BAA+B,SAAQ,+BAAc;IAC9D;QACI,KAAK,CACD,uDAAyB,CAAC,mBAAmB,CAAC,IAAI,GAAG,OAAO,EAC5D,uDAAyB,CAAC,mBAAmB,CAAC,WAAW,EACzD,uDAAyB,CAAC,mBAAmB,CAAC,yBAAyB,EACvE,EAAE,MAAM,EAAE,iBAAS,EAAE,CACxB,CAAC;QAOE,gBAAW,GAAG,CAAC,IAA0C,EAAoC,EAAE;YACnG,mBAAmB;YACnB,OAAO;gBACH,GAAG,IAAI;gBACP,mBAAmB,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC;gBACzD,SAAS,EAAE,IAAI,CAAC,SAAqC;aACpB,CAAC;QAC1C,CAAC,CAAC;QAEM,iBAAY,GAAG,CAAC,KAA6C,EAAsC,EAAE;YACzG,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QACvD,CAAC,CAAC;IAjBF,CAAC;IAED,MAAM,CAAC,EAAO;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAeD,KAAK,CAAC,MAAM,CAAC,QAAkB;QAC3B,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YACpC,OAAO,EAAwC,CAAC;SACnD;QACD,OAAO,IAAI,CAAC,YAAY,CACpB,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;YAC/B,KAAK,EAAE;gBACH,iBAAiB,EAAE;oBACf,CAAC,mBAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ;iBAC9B;aACJ;YACD,KAAK,EAAE;gBACH,CAAC,mBAAmB,EAAE,KAAK,CAAC;gBAC5B,CAAC,YAAY,EAAE,KAAK,CAAC;aACxB;YACD,GAAG,EAAE,IAAI;SACZ,CAAC,CAA2C,CAChD,CAAC;IACN,CAAC;CACJ;AA9CD,wEA8CC"}
|
|
@@ -1,24 +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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
-
var t = {};
|
|
13
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
-
t[p] = s[p];
|
|
15
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
-
t[p[i]] = s[p[i]];
|
|
19
|
-
}
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
@@ -49,9 +29,9 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
|
|
|
49
29
|
/**
|
|
50
30
|
* Retrieve all infotexts with routes
|
|
51
31
|
*/
|
|
52
|
-
this.GetAllWithRoutes = (timezone) =>
|
|
32
|
+
this.GetAllWithRoutes = async (timezone) => {
|
|
53
33
|
const currentDateISO = new Date().toISOString();
|
|
54
|
-
const data =
|
|
34
|
+
const data = await this.sequelizeModel.findAll({
|
|
55
35
|
attributes: [
|
|
56
36
|
"valid_from",
|
|
57
37
|
"valid_to",
|
|
@@ -110,11 +90,22 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
|
|
|
110
90
|
raw: true,
|
|
111
91
|
});
|
|
112
92
|
return this.mapDataWithRoutes(data, timezone);
|
|
113
|
-
}
|
|
93
|
+
};
|
|
114
94
|
this.mapDataWithRoutes = (items, timezone) => {
|
|
115
95
|
return items.map((item) => {
|
|
116
|
-
const { vymi_id, vymi_id_dtb, stop_type: stopType, expiration_date, last_updated, valid_from, valid_to, last_updated_user
|
|
117
|
-
return
|
|
96
|
+
const { vymi_id, vymi_id_dtb, stop_type: stopType, expiration_date, last_updated, valid_from, valid_to, last_updated_user, ...infotextsStopModel } = item;
|
|
97
|
+
return {
|
|
98
|
+
vymi_id: vymi_id,
|
|
99
|
+
vymi_id_dtb: vymi_id_dtb,
|
|
100
|
+
display_type: this.mapStopTypeToDisplayType(stopType),
|
|
101
|
+
text_en: null,
|
|
102
|
+
...infotextsStopModel,
|
|
103
|
+
expiration_date: shared_1.RopidRouterUtils.formatTimestamp(expiration_date, timezone),
|
|
104
|
+
last_updated: shared_1.RopidRouterUtils.formatTimestamp(last_updated, timezone),
|
|
105
|
+
last_updated_user: last_updated_user,
|
|
106
|
+
valid_from: shared_1.RopidRouterUtils.formatTimestamp(valid_from, timezone),
|
|
107
|
+
valid_to: shared_1.RopidRouterUtils.formatTimestamp(valid_to, timezone),
|
|
108
|
+
};
|
|
118
109
|
});
|
|
119
110
|
};
|
|
120
111
|
this.mapStopTypeToDisplayType = (stopType) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidVYMIEventsStopsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidVYMIEventsStopsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidVYMIEventsStopsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidVYMIEventsStopsModel.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAkF;AAClF,yEAAoE;AACpE,yCAA8C;AAC9C,6DAAuC;AACvC,uEAA4C;AAC5C,uEAA4C;AAE5C,sEAAmE;AACnE,gEAAgG;AAChG,oFAA4D;AAC5D,+EAAwE;AA6BxE;;GAEG;AACH,MAAa,yBAA0B,SAAQ,+BAAc;IAMzD,MAAM,CAAC,OAAa;QAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,CAAC,EAAO;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED;QACI,KAAK,CACD,sBAAS,CAAC,WAAW,CAAC,IAAI,GAAG,OAAO,EACpC,sBAAS,CAAC,WAAW,CAAC,WAAW,EACjC,sBAAS,CAAC,WAAW,CAAC,yBAAyB,EAC/C,EAAE,MAAM,EAAE,iBAAS,EAAE,CACxB,CAAC;QA2BN;;WAEG;QACI,qBAAgB,GAAG,KAAK,EAAE,QAAgB,EAAmD,EAAE;YAClG,MAAM,cAAc,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YAChD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;gBAC3C,UAAU,EAAE;oBACR,YAAY;oBACZ,UAAU;oBACV,MAAM;oBACN,WAAW;oBACX,CAAC,mBAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC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value: true });
|
|
|
6
6
|
const pid_1 = require("../..");
|
|
7
7
|
const DepartureBoardMapper_1 = __importDefault(require("../../helpers/DepartureBoardMapper"));
|
|
8
8
|
const FilterHelper_1 = require("./FilterHelper");
|
|
9
|
+
const SkipHelper_1 = require("./SkipHelper");
|
|
9
10
|
class PIDDeparturesModel {
|
|
10
11
|
constructor(departures, options) {
|
|
11
12
|
this.toArray = () => {
|
|
@@ -42,24 +43,34 @@ class PIDDeparturesModel {
|
|
|
42
43
|
*/
|
|
43
44
|
this.skip = () => {
|
|
44
45
|
this.departures = this.departures.filter((departure) => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
let isPassStop = false;
|
|
48
|
-
let isCurrentTrip = false;
|
|
49
|
-
if ("arrival_datetime" in departure) {
|
|
50
|
-
isAtStop = departure.stop_sequence === departure["trip.last_position.this_stop_sequence"];
|
|
51
|
-
isPassStop =
|
|
52
|
-
!!departure["trip.last_position.last_stop_sequence"] &&
|
|
53
|
-
departure.stop_sequence <= departure["trip.last_position.last_stop_sequence"];
|
|
46
|
+
if (this.options.skip.length === 0) {
|
|
47
|
+
return true;
|
|
54
48
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
let isSkipUntracked = false;
|
|
50
|
+
let isSkipMissing = false;
|
|
51
|
+
let isSkipCanceled = false;
|
|
52
|
+
let isSkipAtStop = false;
|
|
53
|
+
for (const skip of this.options.skip) {
|
|
54
|
+
if (skip === pid_1.DepartureSkip.UNTRACKED) {
|
|
55
|
+
isSkipUntracked = true;
|
|
56
|
+
}
|
|
57
|
+
else if (skip === pid_1.DepartureSkip.MISSING) {
|
|
58
|
+
isSkipMissing = true;
|
|
59
|
+
}
|
|
60
|
+
else if (skip === pid_1.DepartureSkip.CANCELED) {
|
|
61
|
+
isSkipCanceled = true;
|
|
62
|
+
}
|
|
63
|
+
else if (skip === pid_1.DepartureSkip.AT_STOP) {
|
|
64
|
+
isSkipAtStop = true;
|
|
65
|
+
}
|
|
58
66
|
}
|
|
59
|
-
return !(
|
|
60
|
-
(
|
|
61
|
-
(
|
|
62
|
-
|
|
67
|
+
return !((this.options.tripNumber && SkipHelper_1.SkipHelper.isMatchingTripNumber(departure, this.options.tripNumber)) ||
|
|
68
|
+
(isSkipUntracked && SkipHelper_1.SkipHelper.hasNoDelayInfo(departure)) ||
|
|
69
|
+
(!isSkipUntracked &&
|
|
70
|
+
isSkipMissing &&
|
|
71
|
+
SkipHelper_1.SkipHelper.isVehicleMissing(departure, this.options.runScheduleMap, this.options.untrackedTrips)) ||
|
|
72
|
+
(isSkipCanceled && SkipHelper_1.SkipHelper.isTripCanceled(departure)) ||
|
|
73
|
+
(isSkipAtStop && SkipHelper_1.SkipHelper.isVehicleAtStop(departure)));
|
|
63
74
|
});
|
|
64
75
|
};
|
|
65
76
|
/** Sorts by proper datetime by given options
|
|
@@ -78,7 +89,6 @@ class PIDDeparturesModel {
|
|
|
78
89
|
*/
|
|
79
90
|
this.addDirections = () => {
|
|
80
91
|
this.departures.forEach((departure) => {
|
|
81
|
-
var _a;
|
|
82
92
|
if (!("arrival_datetime" in departure)) {
|
|
83
93
|
return;
|
|
84
94
|
}
|
|
@@ -87,7 +97,7 @@ class PIDDeparturesModel {
|
|
|
87
97
|
if (thisStopDeparturesDirections.length > 0) {
|
|
88
98
|
for (const thisStopDeparturesDirection of thisStopDeparturesDirections) {
|
|
89
99
|
if (departure.stop_id === thisStopDeparturesDirection.departure_stop_id &&
|
|
90
|
-
|
|
100
|
+
departure.next_stop_id?.match(thisStopDeparturesDirection.next_stop_id_regexp)) {
|
|
91
101
|
departure.direction = thisStopDeparturesDirection.direction;
|
|
92
102
|
}
|
|
93
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PIDDepartureModel.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/models/helpers/PIDDepartureModel.ts"],"names":[],"mappings":";;;;;AAAA,+BAQiB;AACjB,8FAAwE;AACxE,iDAAoE;
|
|
1
|
+
{"version":3,"file":"PIDDepartureModel.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/models/helpers/PIDDepartureModel.ts"],"names":[],"mappings":";;;;;AAAA,+BAQiB;AACjB,8FAAwE;AACxE,iDAAoE;AACpE,6CAA0C;AAG1C,MAAqB,kBAAkB;IAcnC,YAAY,UAA4B,EAAE,OAAkC;QAKrE,YAAO,GAAG,GAAoB,EAAE;YACnC,IAAI,CAAC,eAAe,EAAE,CAAC;YAEvB,OAAO,8BAAoB,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9F,CAAC,CAAC;QASM,oBAAe,GAAG,CAAC,uBAAuB,GAAG,IAAI,EAAE,EAAE;YACzD,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,IAAI,EAAE,CAAC;YAEZ,IAAI,uBAAuB,EAAE;gBACzB,IAAI,CAAC,aAAa,EAAE,CAAC;aACxB;QACL,CAAC,CAAC;QAEF;WACG;QACK,mBAAc,GAAG,GAAS,EAAE;YAChC,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAEhD,IAAI,2BAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACpD,wEAAwE;gBACxE,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,IAAI;qBACjC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;qBAC5B,MAAM,CACH,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,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U,EAAE,IAAI,EAAE,EAAsB,EAAE,CAAC;IAClE,CAAC;IAEO,iBAAiB,CAAC,iBAAuC;QAC7D,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CACzB,CAAC,GAAG,EAAE,gBAAgB,EAAE,EAAE;YACtB,IAAI,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,CAAC,EAAE;gBAC1C,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aACnC;iBAAM;gBACH,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aACnC;YACD,OAAO,GAAG,CAAC;QACf,CAAC,EACD,EAAE,IAAI,EAAE,EAAsB,EAAE,IAAI,EAAE,EAAsB,EAAE,CACjE,CAAC;IACN,CAAC;;AA5Jc,qCAAkB,GAA8D;IAC3F,SAAS,EAAE,2BAAY,CAAC,kBAAkB;IAC1C,aAAa,EAAE,2BAAY,CAAC,kBAAkB;IAC9C,gBAAgB,EAAE,2BAAY,CAAC,yBAAyB;IACxD,oBAAoB,EAAE,2BAAY,CAAC,yBAAyB;IAC5D,qBAAqB,EAAE,2BAAY,CAAC,8BAA8B;IAClE,yBAAyB,EAAE,2BAAY,CAAC,8BAA8B;IACtE,IAAI,EAAE,SAAS;CAClB,AARgC,CAQ/B;kBAZe,kBAAkB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DepartureUnion } from "../..";
|
|
2
|
+
import type { IScheduleDto } from "../../../../schema-definitions/vehicle-positions/redis/interfaces/IGtfsRunTripCacheDto";
|
|
3
|
+
export declare class SkipHelper {
|
|
4
|
+
/**
|
|
5
|
+
* Used exclusively in transfer boards to skip transfers for the current trip
|
|
6
|
+
* (i.e., transfers within the vehicle where the transfer board is located)
|
|
7
|
+
*/
|
|
8
|
+
static isMatchingTripNumber(departure: DepartureUnion, tripNumber: string): boolean;
|
|
9
|
+
static hasNoDelayInfo(departure: DepartureUnion): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Used exclusively in departure boards when skip[]=missing is requested (without untracked)
|
|
12
|
+
*/
|
|
13
|
+
static isVehicleMissing(departure: DepartureUnion, runScheduleMap: Map<string, IScheduleDto[]> | null, untrackedTrips: Set<string> | null, nowDate?: Date): boolean;
|
|
14
|
+
static isTripCanceled(departure: DepartureUnion): boolean;
|
|
15
|
+
static isVehicleAtStop(departure: DepartureUnion): boolean;
|
|
16
|
+
private static isOutsideStartThreshold;
|
|
17
|
+
private static hasAlreadyDeparted;
|
|
18
|
+
private static hasLargeTimegapBetweenTrips;
|
|
19
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SkipHelper = void 0;
|
|
4
|
+
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
5
|
+
const const_1 = require("./const");
|
|
6
|
+
/** Extracts the last numeric sequence from strings like:
|
|
7
|
+
* Os 1111 -> 1111
|
|
8
|
+
* Os 1111 B -> 1111
|
|
9
|
+
* Rx 1/1111 A -> 1111
|
|
10
|
+
*/
|
|
11
|
+
const TRIP_NUMBER_REGEX = /(\d+)(?!.*\d)/;
|
|
12
|
+
class SkipHelper {
|
|
13
|
+
/**
|
|
14
|
+
* Used exclusively in transfer boards to skip transfers for the current trip
|
|
15
|
+
* (i.e., transfers within the vehicle where the transfer board is located)
|
|
16
|
+
*/
|
|
17
|
+
static isMatchingTripNumber(departure, tripNumber) {
|
|
18
|
+
const tripShortName = departure.trip_short_name;
|
|
19
|
+
if (!tripShortName) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
const lastNumber = tripShortName.match(TRIP_NUMBER_REGEX)?.[1];
|
|
23
|
+
return !!lastNumber && lastNumber === tripNumber;
|
|
24
|
+
}
|
|
25
|
+
static hasNoDelayInfo(departure) {
|
|
26
|
+
return !departure.is_delay_available;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Used exclusively in departure boards when skip[]=missing is requested (without untracked)
|
|
30
|
+
*/
|
|
31
|
+
static isVehicleMissing(departure, runScheduleMap, untrackedTrips, nowDate = new Date()) {
|
|
32
|
+
// Not missing if essential trip data is missing or if delay information is available
|
|
33
|
+
if (!("trip.start_timestamp" in departure) ||
|
|
34
|
+
departure["trip.start_timestamp"] === null ||
|
|
35
|
+
departure.run_number === null ||
|
|
36
|
+
departure.origin_route_name === null ||
|
|
37
|
+
departure.is_delay_available) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const startTimestamp = new Date(departure["trip.start_timestamp"]);
|
|
41
|
+
const minutesToStart = (startTimestamp.getTime() - nowDate.getTime()) / 60000;
|
|
42
|
+
/// Not missing if departure is too far in the future (threshold varies for metro)
|
|
43
|
+
if (this.isOutsideStartThreshold(minutesToStart, departure.route_type)) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
// Missing if the trip should have already started
|
|
47
|
+
else if (this.hasAlreadyDeparted(minutesToStart)) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
// Cannot determine missing status without run schedule information
|
|
51
|
+
const runId = `${departure.origin_route_name}_${departure.run_number}`;
|
|
52
|
+
const runSchedule = runScheduleMap?.get(runId);
|
|
53
|
+
if (!runSchedule) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
// Not missing if this is the first trip in the run or if trip isn't found
|
|
57
|
+
const runTripIndex = runSchedule.findIndex((trip) => trip.trip_id === departure.trip_id);
|
|
58
|
+
if (runTripIndex === -1 || runTripIndex === 0) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
// Not missing if there's a significant gap after the previous trip
|
|
62
|
+
const previousRunTripEnd = new Date(runSchedule[runTripIndex - 1].end_timestamp);
|
|
63
|
+
if (this.hasLargeTimegapBetweenTrips(previousRunTripEnd, startTimestamp)) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
// Not missing if the previous trip has delay information available
|
|
67
|
+
const isPreviousUntracked = untrackedTrips?.has(runSchedule[runTripIndex - 1].trip_id);
|
|
68
|
+
if (!isPreviousUntracked) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
const previousStartTimestamp = new Date(runSchedule[runTripIndex - 1].start_timestamp);
|
|
72
|
+
const previousMinutesToStart = (previousStartTimestamp.getTime() - nowDate.getTime()) / 60000;
|
|
73
|
+
// Missing if previous trip should have already started
|
|
74
|
+
if (this.hasAlreadyDeparted(previousMinutesToStart)) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
// Check position of previous trip in the run
|
|
78
|
+
const previousRunTripIndex = runTripIndex - 1;
|
|
79
|
+
if (previousRunTripIndex === -1 || previousRunTripIndex === 0) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
// Check for gaps before the previous trip
|
|
83
|
+
const previousPreviousRunTripEnd = new Date(runSchedule[previousRunTripIndex - 1].end_timestamp);
|
|
84
|
+
if (this.hasLargeTimegapBetweenTrips(previousPreviousRunTripEnd, previousStartTimestamp)) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
// If we reach here, the previous untracked trip is likely missing,
|
|
88
|
+
// which implies the current trip is also missing
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
static isTripCanceled(departure) {
|
|
92
|
+
return !!departure.is_canceled;
|
|
93
|
+
}
|
|
94
|
+
static isVehicleAtStop(departure) {
|
|
95
|
+
if (!("arrival_datetime" in departure)) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
const isAtStop = departure.stop_sequence === departure["trip.last_position.this_stop_sequence"];
|
|
99
|
+
const isPassStop = !!departure["trip.last_position.last_stop_sequence"] &&
|
|
100
|
+
departure.stop_sequence <= departure["trip.last_position.last_stop_sequence"];
|
|
101
|
+
return isAtStop || isPassStop;
|
|
102
|
+
}
|
|
103
|
+
static isOutsideStartThreshold(minutesToStart, routeType) {
|
|
104
|
+
const isMetro = routeType === RouteTypeEnums_1.GTFSRouteTypeEnum.METRO;
|
|
105
|
+
return isMetro ? minutesToStart >= const_1.START_SOON_METRO_MINUTES_THRESHOLD : minutesToStart >= const_1.START_SOON_MINUTES_THRESHOLD;
|
|
106
|
+
}
|
|
107
|
+
static hasAlreadyDeparted(minutesToStart) {
|
|
108
|
+
return minutesToStart < const_1.DEPARTURED_MINUTES_THRESHOLD;
|
|
109
|
+
}
|
|
110
|
+
static hasLargeTimegapBetweenTrips(endTimestamp, startTimestamp) {
|
|
111
|
+
const minutesAfterPrevious = (startTimestamp.getTime() - endTimestamp.getTime()) / 60000;
|
|
112
|
+
return minutesAfterPrevious >= const_1.TRIP_GAP_MINUTES_THRESHOLD;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.SkipHelper = SkipHelper;
|
|
116
|
+
//# sourceMappingURL=SkipHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkipHelper.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/models/helpers/SkipHelper.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAG5D,mCAKiB;AAEjB;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAE1C,MAAa,UAAU;IACnB;;;OAGG;IACI,MAAM,CAAC,oBAAoB,CAAC,SAAyB,EAAE,UAAkB;QAC5E,MAAM,aAAa,GAAG,SAAS,CAAC,eAAe,CAAC;QAChD,IAAI,CAAC,aAAa,EAAE;YAChB,OAAO,KAAK,CAAC;SAChB;QAED,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/D,OAAO,CAAC,CAAC,UAAU,IAAI,UAAU,KAAK,UAAU,CAAC;IACrD,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,SAAyB;QAClD,OAAO,CAAC,SAAS,CAAC,kBAAkB,CAAC;IACzC,CAAC;IAED;;OAEG;I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AO,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC;IACnC,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,SAAyB;QACnD,IAAI,CAAC,CAAC,kBAAkB,IAAI,SAAS,CAAC,EAAE;YACpC,OAAO,KAAK,CAAC;SAChB;QAED,MAAM,QAAQ,GAAG,SAAS,CAAC,aAAa,KAAK,SAAS,CAAC,uCAAuC,CAAC,CAAC;QAChG,MAAM,UAAU,GACZ,CAAC,CAAC,SAAS,CAAC,uCAAuC,CAAC;YACpD,SAAS,CAAC,aAAa,IAAI,SAAS,CAAC,uCAAuC,CAAC,CAAC;QAElF,OAAO,QAAQ,IAAI,UAAU,CAAC;IAClC,CAAC;IAEO,MAAM,CAAC,uBAAuB,CAAC,cAAsB,EAAE,SAA4B;QACvF,MAAM,OAAO,GAAG,SAAS,KAAK,kCAAiB,CAAC,KAAK,CAAC;QACtD,OAAO,OAAO,CAAC,CAAC,CAAC,cAAc,IAAI,0CAAkC,CAAC,CAAC,CAAC,cAAc,IAAI,oCAA4B,CAAC;IAC3H,CAAC;IAEO,MAAM,CAAC,kBAAkB,CAAC,cAAsB;QACpD,OAAO,cAAc,GAAG,oCAA4B,CAAC;IACzD,CAAC;IAEO,MAAM,CAAC,2BAA2B,CAAC,YAAkB,EAAE,cAAoB;QAC/E,MAAM,oBAAoB,GAAG,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;QACzF,OAAO,oBAAoB,IAAI,kCAA0B,CAAC;IAC9D,CAAC;CACJ;AAnID,gCAmIC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TRIP_GAP_MINUTES_THRESHOLD = exports.DEPARTURED_MINUTES_THRESHOLD = exports.START_SOON_METRO_MINUTES_THRESHOLD = exports.START_SOON_MINUTES_THRESHOLD = void 0;
|
|
4
|
+
exports.START_SOON_MINUTES_THRESHOLD = 30;
|
|
5
|
+
exports.START_SOON_METRO_MINUTES_THRESHOLD = 5;
|
|
6
|
+
exports.DEPARTURED_MINUTES_THRESHOLD = -2;
|
|
7
|
+
exports.TRIP_GAP_MINUTES_THRESHOLD = 60;
|
|
8
|
+
//# sourceMappingURL=const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/models/helpers/const.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG,EAAE,CAAC;AAClC,QAAA,kCAAkC,GAAG,CAAC,CAAC;AACvC,QAAA,4BAA4B,GAAG,CAAC,CAAC,CAAC;AAClC,QAAA,0BAA0B,GAAG,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DepartureFilter, DepartureMode, DepartureOrder, DepartureSkip } from "../../..";
|
|
2
2
|
import { IRopidDeparturesDirectionsOutput } from "../../../../../schema-definitions/ropid-departures-directions";
|
|
3
|
+
import { IScheduleDto } from "../../../../../schema-definitions/vehicle-positions/redis/interfaces/IGtfsRunTripCacheDto";
|
|
3
4
|
export default interface IPIDDepartureQueryOptions {
|
|
4
5
|
limit: number;
|
|
5
6
|
offset: number;
|
|
@@ -10,5 +11,7 @@ export default interface IPIDDepartureQueryOptions {
|
|
|
10
11
|
skip: DepartureSkip[];
|
|
11
12
|
departuresDirections: IRopidDeparturesDirectionsOutput[];
|
|
12
13
|
timezone: string;
|
|
13
|
-
tripNumber
|
|
14
|
+
tripNumber: string | null;
|
|
15
|
+
runScheduleMap: Map<string, IScheduleDto[]> | null;
|
|
16
|
+
untrackedTrips: Set<string> | null;
|
|
14
17
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DepartureFilter, DepartureMode, DepartureOrder, DepartureSkip } from "../..";
|
|
2
|
+
import type { Moment } from "@golemio/core/dist/shared/moment-timezone";
|
|
3
|
+
export interface IGetDeparturesOptions {
|
|
4
|
+
aswIds?: string[];
|
|
5
|
+
cisIds?: string[];
|
|
6
|
+
gtfsIds?: string[];
|
|
7
|
+
names?: string[];
|
|
8
|
+
total: number;
|
|
9
|
+
limit: number;
|
|
10
|
+
offset: number;
|
|
11
|
+
mode: DepartureMode;
|
|
12
|
+
minutesBefore: number;
|
|
13
|
+
minutesAfter: number;
|
|
14
|
+
timeFrom?: Moment;
|
|
15
|
+
order: DepartureOrder;
|
|
16
|
+
filter: DepartureFilter;
|
|
17
|
+
skip: DepartureSkip[];
|
|
18
|
+
includeMetroTrains?: boolean;
|
|
19
|
+
airCondition?: boolean;
|
|
20
|
+
timezone: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IGetDeparturesOptions.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/models/interfaces/IGetDeparturesOptions.ts"],"names":[],"mappings":""}
|
|
@@ -20,7 +20,7 @@ class V3PIDRouter extends AbstractRouter_1.AbstractRouter {
|
|
|
20
20
|
this.registerInfotextsRoutes = () => {
|
|
21
21
|
this.router.get("/transferboards", [
|
|
22
22
|
(0, express_validator_1.query)("cisId").exists().isInt().not().isArray(),
|
|
23
|
-
(0, express_validator_1.query)("tripNumber").
|
|
23
|
+
(0, express_validator_1.query)("tripNumber").optional().isInt({ min: 0 }).not().isArray(),
|
|
24
24
|
(0, express_validator_1.query)("timeFrom").optional().isISO8601().custom(ParamValidatorManager_1.ParamValidatorManager.getTimeFromValidator()).not().isArray(),
|
|
25
25
|
], Validation_1.checkErrors,
|
|
26
26
|
// max-age 5 seconds, stale-while-revalidate 5 seconds
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V3PIDRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/routers/v3/V3PIDRouter.ts"],"names":[],"mappings":";;;AAEA,+EAA8E;AAC9E,qCAAgD;AAChD,qDAAoD;AACpD,yDAAoD;AACpD,sFAAmF;AAEnF,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AC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;gBAChE,IAAA,yBAAK,EAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,6CAAqB,CAAC,oBAAoB,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;aAChH,EACD,wBAAW;YACX,sDAAsD;YACtD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC9C,IAAI,CAAC,wBAAwB,CAAC,qBAAqB,CACtD,CAAC;YAEF,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,YAAY,EACZ,wBAAW;YACX,wDAAwD;YACxD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,EAChD,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAC3C,CAAC;QACN,CAAC,CAAC;QA/BE,IAAI,CAAC,qBAAqB,GAAG,mBAAc,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACjH,IAAI,CAAC,wBAAwB,GAAG,mBAAc,CAAC,OAAO,CAA6B,uBAAU,CAAC,0BAA0B,CAAC,CAAC;QAC1H,IAAI,CAAC,mBAAmB,GAAG,mBAAc,CAAC,OAAO,CAAwB,uBAAU,CAAC,qBAAqB,CAAC,CAAC;QAC3G,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CA4BJ;AAxCD,kCAwCC;AAED,MAAM,WAAW,GAAmB,IAAI,WAAW,EAAE,CAAC;AAC7C,kCAAW"}
|
|
@@ -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.InfotextFacade = void 0;
|
|
25
16
|
const JISInfotextRepository_1 = require("../../data-access/JISInfotextRepository");
|
|
@@ -35,21 +26,19 @@ let InfotextFacade = exports.InfotextFacade = class InfotextFacade {
|
|
|
35
26
|
/**
|
|
36
27
|
* Retrieves active infotexts for given GTFS stop IDs
|
|
37
28
|
*/
|
|
38
|
-
getInfotextsForTransferBoards(stopIds, currentMoment, timeFrom) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
throw error;
|
|
48
|
-
}
|
|
49
|
-
throw new golemio_errors_1.GeneralError("Failed to retrieve infotexts", this.constructor.name, error, 500);
|
|
29
|
+
async getInfotextsForTransferBoards(stopIds, currentMoment, timeFrom) {
|
|
30
|
+
let infotexts = [];
|
|
31
|
+
try {
|
|
32
|
+
const infotextEntities = await this.infotextRepository.findAllForDepartureBoard(stopIds, timeFrom ? timeFrom.toDate() : currentMoment.toDate());
|
|
33
|
+
infotexts = this.infotextTransformation.transformArray(infotextEntities);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
if (error instanceof golemio_errors_1.AbstractGolemioError) {
|
|
37
|
+
throw error;
|
|
50
38
|
}
|
|
51
|
-
|
|
52
|
-
}
|
|
39
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve infotexts", this.constructor.name, error, 500);
|
|
40
|
+
}
|
|
41
|
+
return infotexts;
|
|
53
42
|
}
|
|
54
43
|
};
|
|
55
44
|
exports.InfotextFacade = InfotextFacade = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfotextFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/InfotextFacade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InfotextFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/InfotextFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mFAAkF;AAElF,qDAAoD;AACpD,6EAA8F;AAE9F,iEAAwE;AACxE,4GAAyG;AAGlG,IAAM,cAAc,4BAApB,MAAM,cAAc;IACvB,YACsD,kBAAyC,EAC7B,sBAAyD;QADrE,uBAAkB,GAAlB,kBAAkB,CAAuB;QAC7B,2BAAsB,GAAtB,sBAAsB,CAAmC;IACxH,CAAC;IAEJ;;OAEG;IACI,KAAK,CAAC,6BAA6B,CACtC,OAAiB,EACjB,aAAqB,EACrB,QAAuB;QAEvB,IAAI,SAAS,GAAiC,EAAE,CAAC;QACjD,IAAI;YACA,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,wBAAwB,CAC3E,OAAO,EACP,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,CACxD,CAAC;YAEF,SAAS,GAAG,IAAI,CAAC,sBAAsB,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;SAC5E;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,qCAAoB,EAAE;gBACvC,MAAM,KAAK,CAAC;aACf;YAED,MAAM,IAAI,6BAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;SAC7F;QAED,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ,CAAA;yBAhCY,cAAc;IAD1B,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,qBAAqB,CAAC,CAAA;IACxC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,iCAAiC,CAAC,CAAA;qCADiB,6CAAqB;QACL,qEAAiC;GAHlH,cAAc,CAgC1B"}
|