@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
package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js
CHANGED
|
@@ -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.StopTimesTripScopeHandler = void 0;
|
|
25
16
|
const OgModuleToken_1 = require("../../../../ioc/OgModuleToken");
|
|
@@ -36,45 +27,43 @@ let StopTimesTripScopeHandler = exports.StopTimesTripScopeHandler = class StopTi
|
|
|
36
27
|
this.stopTimeRepository = stopTimeRepository;
|
|
37
28
|
this.tripStopTimesTransformation = new PublicVPTripStopTimesTransformation_1.PublicVPTripStopTimesTransformation();
|
|
38
29
|
}
|
|
39
|
-
handle(output, vehiclePosition) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
stopTime.properties.realtime_departure_time = currentDeparture ? currentDeparture.toFormat("HH:mm:ss") : null;
|
|
72
|
-
}
|
|
30
|
+
async handle(output, vehiclePosition) {
|
|
31
|
+
const delayComputationCache = await this.delayComputationRepository.getDelayComputationCache(vehiclePosition.gtfs_trip_id);
|
|
32
|
+
if (!delayComputationCache) {
|
|
33
|
+
throw new golemio_errors_1.GeneralError("delay_computation_cache_not_found", this.constructor.name, undefined, 500);
|
|
34
|
+
}
|
|
35
|
+
const filteredStopTimes = this.filterNoStopWaypoints(delayComputationCache.stop_times);
|
|
36
|
+
const stopTimes = this.tripStopTimesTransformation.transformArray(filteredStopTimes);
|
|
37
|
+
const stopTimesWithDelay = await this.stopTimeRepository.getPublicStopTimeCache(vehiclePosition.vehicle_id, vehiclePosition.gtfs_trip_id);
|
|
38
|
+
if (stopTimesWithDelay.length > 0) {
|
|
39
|
+
let prevStopArrivalTime = null;
|
|
40
|
+
let prevStopDepartureTime = null;
|
|
41
|
+
for (const stopTimeWithDelay of stopTimesWithDelay) {
|
|
42
|
+
// note: We can improve performance here if needed
|
|
43
|
+
const stopTime = stopTimes.find((currentStopTime) => currentStopTime.properties.stop_sequence === stopTimeWithDelay.sequence);
|
|
44
|
+
if (stopTime) {
|
|
45
|
+
// note: optimization point here in case of worsening performance on output API (additional cache)
|
|
46
|
+
const rtArrivalTime = stopTimeWithDelay.arr_delay === null
|
|
47
|
+
? null
|
|
48
|
+
: luxon_1.DateTime.fromFormat(stopTime.properties.arrival_time, "HH:mm:ss").plus({
|
|
49
|
+
seconds: stopTimeWithDelay.arr_delay,
|
|
50
|
+
});
|
|
51
|
+
let rtDepartureTime = stopTimeWithDelay.dep_delay === null
|
|
52
|
+
? null
|
|
53
|
+
: luxon_1.DateTime.fromFormat(stopTime.properties.departure_time, "HH:mm:ss").plus({
|
|
54
|
+
seconds: stopTimeWithDelay.dep_delay,
|
|
55
|
+
});
|
|
56
|
+
// note: for better performance, we should address this on the DB side in the future
|
|
57
|
+
const { currentArrival, currentDeparture } = this.checkStopTimesSequence(rtArrivalTime, prevStopArrivalTime, rtDepartureTime, prevStopDepartureTime);
|
|
58
|
+
prevStopArrivalTime = currentArrival;
|
|
59
|
+
prevStopDepartureTime = currentDeparture;
|
|
60
|
+
stopTime.properties.realtime_arrival_time = currentArrival ? currentArrival.toFormat("HH:mm:ss") : null;
|
|
61
|
+
stopTime.properties.realtime_departure_time = currentDeparture ? currentDeparture.toFormat("HH:mm:ss") : null;
|
|
73
62
|
}
|
|
74
63
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
}
|
|
65
|
+
output.stop_times = (0, Geo_1.buildGeojsonFeatureCollection)(stopTimes);
|
|
66
|
+
return output;
|
|
78
67
|
}
|
|
79
68
|
filterNoStopWaypoints(stopTimes) {
|
|
80
69
|
return stopTimes.filter((stopTime) => !stopTime.is_no_stop_waypoint);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,iEAA6D;AAC7D,6HAAoI;AAGpI,+DAAsF;AAEtF,6EAAwE;AACxE,2DAA2D;AAC3D,iEAAwE;AACxE,yFAAsF;AAG/E,IAAM,yBAAyB,uCAA/B,MAAM,yBAA0B,SAAQ,mEAAgC;IAG3E,YAC8D,0BAAuD,EACzD,kBAAuC;QAE/F,KAAK,EAAE,CAAC;QAHkD,+BAA0B,GAA1B,0BAA0B,CAA6B;QACzD,uBAAkB,GAAlB,kBAAkB,CAAqB;QAG/F,IAAI,CAAC,2BAA2B,GAAG,IAAI,yEAAmC,EAAE,CAAC;IACjF,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,MAA8B,EAAE,eAAmC;QACnF,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,wBAAwB,CACxF,eAAe,CAAC,YAAY,CAC/B,CAAC;QAEF,IAAI,CAAC,qBAAqB,EAAE;YACxB,MAAM,IAAI,6BAAY,CAAC,mCAAmC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;SACtG;QAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QACvF,MAAM,SAAS,GAAG,IAAI,CAAC,2BAA2B,CAAC,cAAc,CAAC,iBAAiB,CAElF,CAAC;QAEF,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,sBAAsB,CAC3E,eAAe,CAAC,UAAU,EAC1B,eAAe,CAAC,YAAY,CAC/B,CAAC;QACF,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/B,IAAI,mBAAmB,GAAoB,IAAI,CAAC;YAChD,IAAI,qBAAqB,GAAoB,IAAI,CAAC;YAElD,KAAK,MAAM,iBAAiB,IAAI,kBAAkB,EAAE;gBAChD,kDAAkD;gBAClD,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAC3B,CAAC,eAAe,EAAE,EAAE,CAAC,eAAe,CAAC,UAAU,CAAC,aAAa,KAAK,iBAAiB,CAAC,QAAQ,CAC/F,CAAC;gBACF,IAAI,QAAQ,EAAE;oBACV,kGAAkG;oBAClG,MAAM,aAAa,GACf,iBAAiB,CAAC,SAAS,KAAK,IAAI;wBAChC,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,gBAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;4BACnE,OAAO,EAAE,iBAAiB,CAAC,SAAS;yBACvC,CAAC,CAAC;oBAEb,IAAI,eAAe,GACf,iBAAiB,CAAC,SAAS,KAAK,IAAI;wBAChC,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,gBAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;4BACrE,OAAO,EAAE,iBAAiB,CAAC,SAAS;yBACvC,CAAC,CAAC;oBACb,oFAAoF;oBACpF,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC,sBAAsB,CACpE,aAAc,EACd,mBAAoB,EACpB,eAAgB,EAChB,qBAAsB,CACzB,CAAC;oBACF,mBAAmB,GAAG,cAAc,CAAC;oBACrC,qBAAqB,GAAG,gBAAgB,CAAC;oBAEzC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;oBACxG,QAAQ,CAAC,UAAU,CAAC,uBAAuB,GAAG,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;iBACjH;aACJ;SACJ;QAED,MAAM,CAAC,UAAU,GAAG,IAAA,mCAA6B,EAAC,SAAS,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC;IAClB,CAAC;IAEO,qBAAqB,CAAC,SAAsB;QAChD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAmB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACpF,CAAC;IAEO,sBAAsB,CAC1B,SAAmB,EACnB,WAAqB,EACrB,WAAqB,EACrB,aAAuB;QAEvB,MAAM,WAAW,GAA2E;YACxF,cAAc,EAAE,SAAS;YACzB,gBAAgB,EAAE,WAAW;SAChC,CAAC;QACF,IAAI,SAAS,GAAG,WAAW,IAAI,aAAa,GAAG,WAAW,IAAI,WAAW,GAAG,WAAW,EAAE;YACrF,WAAW,CAAC,gBAAgB,GAAG,IAAI,CAAC;SACvC;QACD,IAAI,aAAa,GAAG,SAAS,IAAI,WAAW,GAAG,SAAS,EAAE;YACtD,WAAW,CAAC,cAAc,GAAG,IAAI,CAAC;SACrC;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ,CAAA;oCA/FY,yBAAyB;IADrC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,0BAA0B,CAAC,CAAA;IAChD,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,wBAAwB,CAAC,CAAA;;GAL1C,yBAAyB,CA+FrC"}
|
|
@@ -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.VehicleDescriptorTripScopeHandler = void 0;
|
|
25
16
|
const VehicleDescriptorCachedRepository_1 = require("../../../../data-access/VehicleDescriptorCachedRepository");
|
|
@@ -33,20 +24,23 @@ let VehicleDescriptorTripScopeHandler = exports.VehicleDescriptorTripScopeHandle
|
|
|
33
24
|
this.vehicleDescriptorRepository = vehicleDescriptorRepository;
|
|
34
25
|
this.vehicleDescriptorTransformation = new PublicVPVehicleDescriptorTransformation_1.PublicVPVehicleDescriptorTransformation();
|
|
35
26
|
}
|
|
36
|
-
handle(output, vehiclePosition) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return output;
|
|
45
|
-
}
|
|
46
|
-
output.vehicle_descriptor = Object.assign(Object.assign({}, output.vehicle_descriptor), { vehicle_type: `${descriptor.manufacturer} ${descriptor.type}`, is_air_conditioned: descriptor.is_air_conditioned, has_usb_chargers: descriptor.has_usb_chargers });
|
|
27
|
+
async handle(output, vehiclePosition) {
|
|
28
|
+
output.vehicle_descriptor = this.vehicleDescriptorTransformation.transformElement(vehiclePosition);
|
|
29
|
+
const registrationNumber = vehiclePosition.detailed_info.registration_number;
|
|
30
|
+
if (registrationNumber) {
|
|
31
|
+
const routeType = vehiclePosition.route_type;
|
|
32
|
+
const descriptor = await this.vehicleDescriptorRepository.getOneByRegNumber(routeType, registrationNumber);
|
|
33
|
+
if (!descriptor) {
|
|
34
|
+
return output;
|
|
47
35
|
}
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
output.vehicle_descriptor = {
|
|
37
|
+
...output.vehicle_descriptor,
|
|
38
|
+
vehicle_type: `${descriptor.manufacturer} ${descriptor.type}`,
|
|
39
|
+
is_air_conditioned: descriptor.is_air_conditioned,
|
|
40
|
+
has_usb_chargers: descriptor.has_usb_chargers,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return output;
|
|
50
44
|
}
|
|
51
45
|
};
|
|
52
46
|
exports.VehicleDescriptorTripScopeHandler = VehicleDescriptorTripScopeHandler = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleDescriptorTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VehicleDescriptorTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iHAA6G;AAE7G,iEAA6D;AAC7D,qIAA4I;AAE5I,iEAAwE;AACxE,yFAAsF;AAG/E,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,mEAAgC;IAGnF,YAEY,2BAA8D;QAEtE,KAAK,EAAE,CAAC;QAFA,gCAA2B,GAA3B,2BAA2B,CAAmC;QAGtE,IAAI,CAAC,+BAA+B,GAAG,IAAI,iFAAuC,EAAE,CAAC;IACzF,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,MAA8B,EAAE,eAAmC;QACnF,MAAM,CAAC,kBAAkB,GAAG,IAAI,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QAEnG,MAAM,kBAAkB,GAAG,eAAe,CAAC,aAAa,CAAC,mBAAmB,CAAC;QAC7E,IAAI,kBAAkB,EAAE;YACpB,MAAM,SAAS,GAAG,eAAe,CAAC,UAAU,CAAC;YAC7C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,iBAAiB,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;YAE3G,IAAI,CAAC,UAAU,EAAE;gBACb,OAAO,MAAM,CAAC;aACjB;YAED,MAAM,CAAC,kBAAkB,GAAG;gBACxB,GAAG,MAAM,CAAC,kBAAkB;gBAC5B,YAAY,EAAE,GAAG,UAAU,CAAC,YAAY,IAAI,UAAU,CAAC,IAAI,EAAE;gBAC7D,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;gBACjD,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;aAChD,CAAC;SACL;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;4CAjCY,iCAAiC;IAD7C,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,iCAAiC,CAAC,CAAA;qCACnB,qEAAiC;GALjE,iCAAiC,CAiC7C"}
|
|
@@ -11,14 +11,13 @@ class PublicDepartureTransformation extends AbstractTransformation_1.AbstractTra
|
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.name = "PublicDepartureTransformation";
|
|
13
13
|
this.transformInternal = (inputDto) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
15
14
|
const { departure, vehiclePosition, vehicleDescriptor } = inputDto;
|
|
16
|
-
const delayInSeconds =
|
|
15
|
+
const delayInSeconds = vehiclePosition?.delay ?? null;
|
|
17
16
|
const departureTime = new Date(departure.departure_datetime);
|
|
18
17
|
const arrivalTime = departure.arrival_datetime ? new Date(departure.arrival_datetime) : null;
|
|
19
18
|
const predictedDepartureTime = DepartureCalculator_1.DepartureCalculator.getPredictedDepartureTime(departureTime, arrivalTime, delayInSeconds);
|
|
20
19
|
let vehicle;
|
|
21
|
-
if (
|
|
20
|
+
if (vehiclePosition?.state_position === const_1.StatePositionEnum.CANCELED || !vehiclePosition) {
|
|
22
21
|
vehicle = {
|
|
23
22
|
id: null,
|
|
24
23
|
is_wheelchair_accessible: null,
|
|
@@ -28,16 +27,16 @@ class PublicDepartureTransformation extends AbstractTransformation_1.AbstractTra
|
|
|
28
27
|
}
|
|
29
28
|
else {
|
|
30
29
|
vehicle = {
|
|
31
|
-
id:
|
|
32
|
-
is_wheelchair_accessible:
|
|
33
|
-
is_air_conditioned:
|
|
34
|
-
has_charger:
|
|
30
|
+
id: vehiclePosition.vehicle_id ?? null,
|
|
31
|
+
is_wheelchair_accessible: vehiclePosition.detailed_info.is_wheelchair_accessible ?? null,
|
|
32
|
+
is_air_conditioned: vehicleDescriptor?.is_air_conditioned ?? null,
|
|
33
|
+
has_charger: vehicleDescriptor?.has_usb_chargers ?? null,
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
36
|
return {
|
|
38
37
|
departure: {
|
|
39
|
-
timestamp_scheduled:
|
|
40
|
-
timestamp_predicted:
|
|
38
|
+
timestamp_scheduled: RopidRouterUtils_1.RopidRouterUtils.formatTimestamp(departureTime) ?? departure.departure_datetime,
|
|
39
|
+
timestamp_predicted: RopidRouterUtils_1.RopidRouterUtils.formatTimestamp(predictedDepartureTime) ?? departure.departure_datetime,
|
|
41
40
|
delay_seconds: delayInSeconds,
|
|
42
41
|
minutes: DepartureCalculator_1.DepartureCalculator.getDepartureMinutes(predictedDepartureTime),
|
|
43
42
|
},
|
|
@@ -53,7 +52,7 @@ class PublicDepartureTransformation extends AbstractTransformation_1.AbstractTra
|
|
|
53
52
|
trip: {
|
|
54
53
|
id: departure.trip_id,
|
|
55
54
|
headsign: departure.trip_headsign,
|
|
56
|
-
is_canceled:
|
|
55
|
+
is_canceled: vehiclePosition?.state_position === const_1.StatePositionEnum.CANCELED,
|
|
57
56
|
},
|
|
58
57
|
vehicle,
|
|
59
58
|
};
|
package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/transformations/PublicDepartureTransformation.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAG5D,6EAAqE;AACrE,uEAA+D;AAC/D,6GAA0G;AAC1G,6CAA8C;AAE9C,MAAa,6BAA8B,SAAQ,+CAGlD;IAHD;;QAIW,SAAI,GAAG,+BAA+B,CAAC;QAEpC,sBAAiB,GAAG,CAAC,QAA2C,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"PublicDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/transformations/PublicDepartureTransformation.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAG5D,6EAAqE;AACrE,uEAA+D;AAC/D,6GAA0G;AAC1G,6CAA8C;AAE9C,MAAa,6BAA8B,SAAQ,+CAGlD;IAHD;;QAIW,SAAI,GAAG,+BAA+B,CAAC;QAEpC,sBAAiB,GAAG,CAAC,QAA2C,EAAE,EAAE;YAC1E,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,iBAAiB,EAAE,GAAG,QAAQ,CAAC;YAEnE,MAAM,cAAc,GAAG,eAAe,EAAE,KAAK,IAAI,IAAI,CAAC;YACtD,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;YAC7D,MAAM,WAAW,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YAC7F,MAAM,sBAAsB,GAAG,yCAAmB,CAAC,yBAAyB,CAAC,aAAa,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;YAEzH,IAAI,OAAmC,CAAC;YAExC,IAAI,eAAe,EAAE,cAAc,KAAK,yBAAiB,CAAC,QAAQ,IAAI,CAAC,eAAe,EAAE;gBACpF,OAAO,GAAG;oBACN,EAAE,EAAE,IAAI;oBACR,wBAAwB,EAAE,IAAI;oBAC9B,kBAAkB,EAAE,IAAI;oBACxB,WAAW,EAAE,IAAI;iBACpB,CAAC;aACL;iBAAM;gBACH,OAAO,GAAG;oBACN,EAAE,EAAE,eAAe,CAAC,UAAU,IAAI,IAAI;oBACtC,wBAAwB,EAAE,eAAe,CAAC,aAAa,CAAC,wBAAwB,IAAI,IAAI;oBACxF,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,IAAI,IAAI;oBACjE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,IAAI,IAAI;iBAC3D,CAAC;aACL;YAED,OAAO;gBACH,SAAS,EAAE;oBACP,mBAAmB,EAAE,mCAAgB,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC,kBAAkB;oBACpG,mBAAmB,EAAE,mCAAgB,CAAC,eAAe,CAAC,sBAAsB,CAAC,IAAI,SAAS,CAAC,kBAAkB;oBAC7G,aAAa,EAAE,cAAc;oBAC7B,OAAO,EAAE,yCAAmB,CAAC,mBAAmB,CAAC,sBAAsB,CAAC;iBAC3E;gBACD,IAAI,EAAE;oBACF,EAAE,EAAE,SAAS,CAAC,OAAO;oBACrB,QAAQ,EAAE,SAAS,CAAC,aAAa;oBACjC,aAAa,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC;iBACtD;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,kCAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE;oBAC3D,UAAU,EAAE,SAAS,CAAC,gBAAgB;iBACzC;gBACD,IAAI,EAAE;oBACF,EAAE,EAAE,SAAS,CAAC,OAAO;oBACrB,QAAQ,EAAE,SAAS,CAAC,aAAa;oBACjC,WAAW,EAAE,eAAe,EAAE,cAAc,KAAK,yBAAiB,CAAC,QAAQ;iBAC9E;gBACD,OAAO;aACV,CAAC;QACN,CAAC,CAAC;QAEF;;;;WAIG;QACK,0BAAqB,GAAG,CAAC,QAA2C,EAAiB,EAAE;YAC3F,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC;YAEzC,IAAI,QAAQ,EAAE;gBACV,OAAO,QAAQ,CAAC,sBAAsB,CAAC;aAC1C;YAED,OAAO,SAAS,CAAC,aAAa,CAAC;QACnC,CAAC,CAAC;IACN,CAAC;CAAA;AAvED,sEAuEC"}
|
package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.PublicVehiclePositionsTransformation = void 0;
|
|
15
4
|
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
@@ -19,10 +8,11 @@ class PublicVehiclePositionsTransformation extends AbstractTransformation_1.Abst
|
|
|
19
8
|
constructor() {
|
|
20
9
|
super(...arguments);
|
|
21
10
|
this.name = "OutputDtoTransformation";
|
|
22
|
-
this.transformInternal = (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
this.transformInternal = ({ detailed_info, ...element }) => {
|
|
12
|
+
return (0, Geo_1.buildGeojsonFeature)({
|
|
13
|
+
...element,
|
|
14
|
+
route_type: (RouteTypeEnums_1.GTFSRouteTypeEnum[element.route_type] ?? RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
|
|
15
|
+
}, "lng", "lat", true);
|
|
26
16
|
};
|
|
27
17
|
}
|
|
28
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicVehiclePositionsTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PublicVehiclePositionsTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAE5D,6GAA0G;AAC1G,+DAA6F;AAE7F,MAAa,oCAAqC,SAAQ,+CAA2D;IAArH;;QACW,SAAI,GAAG,yBAAyB,CAAC;QAE9B,sBAAiB,GAAG,CAAC,EAAE,aAAa,EAAE,GAAG,OAAO,EAAsB,EAAE,EAAE;YAChF,OAAO,IAAA,yBAAmB,EACtB;gBACI,GAAG,OAAO;gBACV,UAAU,EAAE,CAAC,kCAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;aAC/F,EACD,KAAK,EACL,KAAK,EACL,IAAI,CACP,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA;AAdD,oFAcC"}
|
|
@@ -15,15 +15,14 @@ let PublicGtfsTripInfoTransformation = exports.PublicGtfsTripInfoTransformation
|
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.name = "GtfsTripInfoTransformation";
|
|
17
17
|
this.transformInternal = (gtfsTrip) => {
|
|
18
|
-
var _a, _b, _c;
|
|
19
18
|
const routeType = gtfsTrip.route.route_type;
|
|
20
19
|
return {
|
|
21
20
|
gtfs_trip_id: gtfsTrip.trip_id,
|
|
22
|
-
route_type: (
|
|
21
|
+
route_type: (RouteTypeEnums_1.GTFSRouteTypeEnum[routeType ?? 1700] ?? RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
|
|
23
22
|
route_short_name: gtfsTrip.route.route_short_name,
|
|
24
23
|
shape_id: gtfsTrip.shape_id,
|
|
25
24
|
origin_route_name: gtfsTrip.route.route_id.substring(1),
|
|
26
|
-
run_number:
|
|
25
|
+
run_number: gtfsTrip.schedule?.run_number ?? null,
|
|
27
26
|
trip_headsign: gtfsTrip.trip_headsign,
|
|
28
27
|
};
|
|
29
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicGtfsTripInfoTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0EAA4D;AAG5D,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,gCAAgC,8CAAtC,MAAM,gCAAiC,SAAQ,+CAGrD;IAHM;;QAII,SAAI,GAAG,4BAA4B,CAAC;QAEjC,sBAAiB,GAAG,CAAC,QAAkC,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"PublicGtfsTripInfoTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0EAA4D;AAG5D,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,gCAAgC,8CAAtC,MAAM,gCAAiC,SAAQ,+CAGrD;IAHM;;QAII,SAAI,GAAG,4BAA4B,CAAC;QAEjC,sBAAiB,GAAG,CAAC,QAAkC,EAAE,EAAE;YACjE,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC;YAC5C,OAAO;gBACH,YAAY,EAAE,QAAQ,CAAC,OAAO;gBAC9B,UAAU,EAAE,CAAC,kCAAiB,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;gBAC3F,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,gBAAgB;gBACjD,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,iBAAiB,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;gBACvD,UAAU,EAAE,QAAQ,CAAC,QAAQ,EAAE,UAAU,IAAI,IAAI;gBACjD,aAAa,EAAE,QAAQ,CAAC,aAAa;aACxC,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;2CAlBY,gCAAgC;IAD5C,IAAA,qBAAU,GAAE;GACA,gCAAgC,CAkB5C"}
|
package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.PublicVPTripInfoTransformation = void 0;
|
|
15
4
|
const RouteTypeEnums_1 = require("../../../../../helpers/RouteTypeEnums");
|
|
@@ -19,13 +8,11 @@ class PublicVPTripInfoTransformation extends AbstractTransformation_1.AbstractTr
|
|
|
19
8
|
constructor() {
|
|
20
9
|
super(...arguments);
|
|
21
10
|
this.name = "TripInfoTransformation";
|
|
22
|
-
this.transformInternal = (
|
|
23
|
-
var _b;
|
|
24
|
-
var { detailed_info } = _a, element = __rest(_a, ["detailed_info"]);
|
|
11
|
+
this.transformInternal = ({ detailed_info, ...element }) => {
|
|
25
12
|
const originTimestamp = new Date(detailed_info.origin_timestamp);
|
|
26
13
|
return {
|
|
27
14
|
gtfs_trip_id: element.gtfs_trip_id,
|
|
28
|
-
route_type: (
|
|
15
|
+
route_type: (RouteTypeEnums_1.GTFSRouteTypeEnum[element.route_type] ?? RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
|
|
29
16
|
route_short_name: element.gtfs_route_short_name,
|
|
30
17
|
shape_id: detailed_info.shape_id,
|
|
31
18
|
origin_route_name: detailed_info.origin_route_name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicVPTripInfoTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PublicVPTripInfoTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.ts"],"names":[],"mappings":";;;AAAA,0EAA4D;AAE5D,+CAA8C;AAE9C,6GAA0G;AAG1G,MAAa,8BAA+B,SAAQ,+CAA2E;IAA/H;;QACW,SAAI,GAAG,wBAAwB,CAAC;QAE7B,sBAAiB,GAAG,CAAC,EAAE,aAAa,EAAE,GAAG,OAAO,EAAsB,EAAE,EAAE;YAChF,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;YAEjE,OAAO;gBACH,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,UAAU,EAAE,CAAC,kCAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;gBAC5F,gBAAgB,EAAE,OAAO,CAAC,qBAAqB;gBAC/C,QAAQ,EAAE,aAAa,CAAC,QAAQ;gBAChC,iBAAiB,EAAE,aAAa,CAAC,iBAAiB;gBAClD,UAAU,EAAE,aAAa,CAAC,UAAU;gBACpC,aAAa,EAAE,aAAa,CAAC,aAAa;gBAC1C,QAAQ,EAAE;oBACN,IAAI,EAAE,OAAmC;oBACzC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC;iBAC1C;gBACD,mBAAmB,EAAE,aAAa,CAAC,mBAAmB;gBACtD,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,cAAc,EAAE,OAAO,CAAC,cAAc;gBACtC,kBAAkB,EAAE,aAAa,CAAC,kBAAkB;gBACpD,gBAAgB,EAAE,yBAAgB,CAAC,eAAe,CAAC,eAAe,EAAE,eAAe,CAAC;aACvF,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA;AA1BD,wEA0BC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.PublicVPTripStopTimesTransformation = void 0;
|
|
15
4
|
const AccessibilityEnums_1 = require("../../../../../helpers/AccessibilityEnums");
|
|
@@ -20,8 +9,7 @@ class PublicVPTripStopTimesTransformation extends AbstractTransformation_1.Abstr
|
|
|
20
9
|
constructor() {
|
|
21
10
|
super(...arguments);
|
|
22
11
|
this.name = "TripStopTimesTransformation";
|
|
23
|
-
this.transformInternal = (
|
|
24
|
-
var { stop } = _a, stopTime = __rest(_a, ["stop"]);
|
|
12
|
+
this.transformInternal = ({ stop, ...stopTime }) => {
|
|
25
13
|
const properties = {
|
|
26
14
|
stop_name: stop.stop_name,
|
|
27
15
|
stop_sequence: stopTime.stop_sequence,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicVPTripStopTimesTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PublicVPTripStopTimesTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.ts"],"names":[],"mappings":";;;AAAA,kFAA6E;AAC7E,wEAAuD;AAGvD,6GAA0G;AAC1G,sEAAyF;AAEzF,MAAa,mCAAoC,SAAQ,+CAAkD;IAA3G;;QACW,SAAI,GAAG,6BAA6B,CAAC;QAElC,sBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,QAAQ,EAAa,EAAE,EAAE;YAC/D,MAAM,UAAU,GAA6E;gBACzF,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,wBAAwB,EAAE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC;gBAC/D,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;gBACjD,YAAY,EAAE,6BAAa,CAAC,cAAc,CAAC,6BAAa,CAAC,0BAA0B,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;gBACnH,cAAc,EAAE,6BAAa,CAAC,cAAc,CACxC,6BAAa,CAAC,0BAA0B,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAC5E;gBACD,qBAAqB,EAAE,IAAI;gBAC3B,uBAAuB,EAAE,IAAI;gBAC7B,GAAG,EAAE,IAAI,CAAC,QAAQ;gBAClB,GAAG,EAAE,IAAI,CAAC,QAAQ;aACrB,CAAC;YAEF,OAAO,IAAA,oCAAmB,EAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC;QAEM,+BAA0B,GAAG,CAAC,EAAE,mBAAmB,EAAS,EAAkB,EAAE;YACpF,IAAI,mBAAmB,KAAK,IAAI,IAAI,mBAAmB,KAAK,mDAA8B,CAAC,aAAa,EAAE;gBACtG,OAAO,IAAI,CAAC;aACf;YAED,OAAO,mBAAmB,KAAK,mDAA8B,CAAC,iBAAiB,CAAC;QACpF,CAAC,CAAC;IACN,CAAC;CAAA;AA9BD,kFA8BC"}
|
|
@@ -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.CisStopGroupRepository = void 0;
|
|
25
16
|
const const_1 = require("../../../schema-definitions/const");
|
|
@@ -37,23 +28,21 @@ let CisStopGroupRepository = exports.CisStopGroupRepository = class CisStopGroup
|
|
|
37
28
|
.getConnection()
|
|
38
29
|
.define(this.tableName, ropid_gtfs_1.RopidGTFS.cis_stop_groups.outputSequelizeAttributes, { schema: this.schema });
|
|
39
30
|
}
|
|
40
|
-
getNodeByCisId(cisId) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
return cisStopGroup.node;
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
throw new golemio_errors_1.GeneralError("Error while getting CIS stop groups", this.constructor.name, error, 500);
|
|
31
|
+
async getNodeByCisId(cisId) {
|
|
32
|
+
try {
|
|
33
|
+
const cisStopGroup = await this.sequelizeModel.findOne({
|
|
34
|
+
attributes: ["node"],
|
|
35
|
+
raw: true,
|
|
36
|
+
where: { cis: cisId },
|
|
37
|
+
});
|
|
38
|
+
if (!cisStopGroup || cisStopGroup.node === null) {
|
|
39
|
+
return null;
|
|
55
40
|
}
|
|
56
|
-
|
|
41
|
+
return cisStopGroup.node;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
throw new golemio_errors_1.GeneralError("Error while getting CIS stop groups", this.constructor.name, error, 500);
|
|
45
|
+
}
|
|
57
46
|
}
|
|
58
47
|
};
|
|
59
48
|
exports.CisStopGroupRepository = CisStopGroupRepository = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CisStopGroupRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CisStopGroupRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,uEAA4C;AAG5C,kIAA+H;AAC/H,wEAAqE;AACrE,6EAAwE;AAExE,iEAAwE;AAGjE,IAAM,sBAAsB,oCAA5B,MAAM,sBAAuB,SAAQ,iDAAuB;IAK/D,YAAiD,SAA6B,EAA4B,MAAe;QACrH,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QALtB,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,sBAAS,CAAC,eAAe,CAAC,WAAW,CAAC;QAMrD,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,sBAAS,CAAC,eAAe,CAAC,yBAAyB,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9G,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,KAAa;QACrC,IAAI;YACA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;gBACnD,UAAU,EAAE,CAAC,MAAM,CAAC;gBACpB,GAAG,EAAE,IAAI;gBACT,KAAK,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE;aACxB,CAAC,CAAC;YAEH,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,IAAI,KAAK,IAAI,EAAE;gBAC7C,OAAO,IAAI,CAAC;aACf;YAED,OAAO,YAAY,CAAC,IAAI,CAAC;SAC5B;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,IAAI,6BAAY,CAAC,qCAAqC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;SACpG;IACL,CAAC;CACJ,CAAA;iCA9BY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAMI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IAAiC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GALhG,sBAAsB,CA8BlC"}
|
|
@@ -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
|
};
|
|
@@ -57,10 +48,10 @@ class GTFSCalendarModel extends output_gateway_1.SequelizeModel {
|
|
|
57
48
|
* @param {number} [options.offset] Offset
|
|
58
49
|
* @returns Array of the retrieved records
|
|
59
50
|
*/
|
|
60
|
-
this.GetAll = (options = {}) =>
|
|
51
|
+
this.GetAll = async (options = {}) => {
|
|
61
52
|
const { limit, offset, date } = options;
|
|
62
53
|
try {
|
|
63
|
-
const data =
|
|
54
|
+
const data = await this.sequelizeModel.scope({ method: ["forDate", date] }).findAll({
|
|
64
55
|
limit,
|
|
65
56
|
offset,
|
|
66
57
|
order: [["service_id", "asc"]],
|
|
@@ -70,7 +61,7 @@ class GTFSCalendarModel extends output_gateway_1.SequelizeModel {
|
|
|
70
61
|
catch (err) {
|
|
71
62
|
throw new golemio_errors_1.GeneralError("Database error", "GTFSCalendar", err, 500);
|
|
72
63
|
}
|
|
73
|
-
}
|
|
64
|
+
};
|
|
74
65
|
this.GetOne = (id) => {
|
|
75
66
|
throw new golemio_errors_1.FatalError("Method not implemented");
|
|
76
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GTFSCalendarModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/models/GTFSCalendarModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GTFSCalendarModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/models/GTFSCalendarModel.ts"],"names":[],"mappings":";;;;;;AAAA,6DAAuC;AACvC,uEAA4C;AAC5C,2FAAiE;AACjE,sEAAmE;AACnE,6EAAoF;AACpF,gGAA+D;AAC/D,oFAA4D;AAC5D,wBAA8C;AAE9C,MAAa,iBAAkB,SAAQ,+BAAc;IAWjD;QACI,KAAK,CAAC,sBAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,sBAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,yBAAW,CAAC,cAAc,EAAE;YACvF,MAAM,EAAE,iBAAS;YACjB,MAAM,EAAE;gBACJ,OAAO,CAAC,IAAa;oBACjB,IAAI,CAAC,IAAI,EAAE;wBACP,OAAO,EAAE,CAAC;qBACb;oBACD,MAAM,GAAG,GAAG,IAAA,yBAAM,EAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;oBAC/B,MAAM,KAAK,GAAQ;wBACf,CAAC,mBAAS,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE;4BAChB,mBAAS,CAAC,OAAO,CACb,SAAS,IAAI,KAAK,GAAG,2EAA2E,CACnG;4BACD,EAAE,CAAC,SAAe,CAAC,iBAAiB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE;yBAC7D;qBACJ,CAAC;oBACF,OAAO,EAAE,KAAK,EAAE,CAAC;gBACrB,CAAC;aACJ;SACJ,CAAC,CAAC;QA9BA,eAAU,GAA8B;YAC3C,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,SAAS;YACZ,CAAC,EAAE,WAAW;YACd,CAAC,EAAE,UAAU;YACb,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,UAAU;YACb,CAAC,EAAE,QAAQ;SACd,CAAC;QAyBF;;;;;;WAMG;QACI,WAAM,GAAG,KAAK,EACjB,UAII,EAAE,EACM,EAAE;YACd,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;YACxC,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;oBAChF,KAAK;oBACL,MAAM;oBACN,KAAK,EAAE,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;iBACjC,CAAC,CAAC;gBACH,OAAO,IAAI,CAAC;aACf;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,gBAAgB,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACtE;QACL,CAAC,CAAC;QAEK,WAAM,GAAG,CAAC,EAAO,EAAgB,EAAE;YACtC,MAAM,IAAI,2BAAU,CAAC,wBAAwB,CAAC,CAAC;QACnD,CAAC,CAAC;IA/BF,CAAC;CAgCJ;AAhED,8CAgEC"}
|
|
@@ -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.GTFSRoutesModel = void 0;
|
|
13
4
|
const const_1 = require("../../../schema-definitions/const");
|
|
@@ -26,12 +17,12 @@ class GTFSRoutesModel extends output_gateway_1.SequelizeModel {
|
|
|
26
17
|
* @param {number} [options.offset] Offset
|
|
27
18
|
* @returns Array of the retrieved records
|
|
28
19
|
*/
|
|
29
|
-
this.GetAll = (options = {}) =>
|
|
20
|
+
this.GetAll = async (options = {}) => {
|
|
30
21
|
const { limit, offset } = options;
|
|
31
22
|
try {
|
|
32
23
|
const order = [];
|
|
33
24
|
order.push([["route_id", "asc"]]);
|
|
34
|
-
const data =
|
|
25
|
+
const data = await this.sequelizeModel.findAll({
|
|
35
26
|
limit,
|
|
36
27
|
offset,
|
|
37
28
|
order,
|
|
@@ -41,12 +32,12 @@ class GTFSRoutesModel extends output_gateway_1.SequelizeModel {
|
|
|
41
32
|
catch (err) {
|
|
42
33
|
throw new golemio_errors_1.GeneralError("Database error", "GTFSRoutesModel", err, 500);
|
|
43
34
|
}
|
|
44
|
-
}
|
|
35
|
+
};
|
|
45
36
|
/** Retrieves specific gtfs routes
|
|
46
37
|
* @param {string} id Id of the route
|
|
47
38
|
* @returns Object of the retrieved record or null
|
|
48
39
|
*/
|
|
49
|
-
this.GetOne = (id) =>
|
|
40
|
+
this.GetOne = async (id) => this.ConvertItem(await this.sequelizeModel.findByPk(id));
|
|
50
41
|
/**
|
|
51
42
|
* Convert a single db result to proper output format with all tranformation
|
|
52
43
|
* @param {object} route Route object
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GTFSRoutesModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/models/GTFSRoutesModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GTFSRoutesModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/models/GTFSRoutesModel.ts"],"names":[],"mappings":";;;AAAA,6DAAuC;AACvC,uEAA4C;AAC5C,qFAA2D;AAC3D,sEAAmE;AACnE,6EAAwE;AAExE,MAAa,eAAgB,SAAQ,+BAAc;IAC/C;QACI,KAAK,CAAC,sBAAS,CAAC,MAAM,CAAC,IAAI,EAAE,sBAAS,CAAC,MAAM,CAAC,WAAW,EAAE,mBAAQ,CAAC,cAAc,EAAE;YAChF,MAAM,EAAE,iBAAS;SACpB,CAAC,CAAC;QAGP;;;;;WAKG;QACI,WAAM,GAAG,KAAK,EACjB,UAGI,EAAE,EACM,EAAE;YACd,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;YAClC,IAAI;gBACA,MAAM,KAAK,GAAQ,EAAE,CAAC;gBACtB,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;gBAClC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBAC3C,KAAK;oBACL,MAAM;oBACN,KAAK;iBACR,CAAC,CAAC;gBACH,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;aACrD;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACzE;QACL,CAAC,CAAC;QAEF;;;WAGG;QACI,WAAM,GAAG,KAAK,EAAE,EAAU,EAAgB,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAE7G;;;;WAIG;QACK,gBAAW,GAAG,CAAC,KAAU,EAAE,EAAE;YACjC,IAAI,KAAK,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAC;YAEhC,0CAA0C;YAC1C,IAAI,KAAK,CAAC,MAAM;gBAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAEzC,sBAAsB;YACtB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,KAAK,GAAG,CAAC;YACxC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,KAAK,GAAG,CAAC;YAC9C,KAAK,CAAC,uBAAuB,GAAG,KAAK,CAAC,uBAAuB,KAAK,GAAG,CAAC;YAEtE,OAAO,KAAK,CAAC;QACjB,CAAC,CAAC;IApDF,CAAC;CAqDJ;AA1DD,0CA0DC"}
|
|
@@ -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.GTFSShapesModel = void 0;
|
|
13
4
|
const const_1 = require("../../../schema-definitions/const");
|
|
@@ -32,12 +23,12 @@ class GTFSShapesModel extends output_gateway_1.SequelizeModel {
|
|
|
32
23
|
* @param {number} [options.offset] Offset
|
|
33
24
|
* @returns Array of the retrieved records
|
|
34
25
|
*/
|
|
35
|
-
this.GetAll = (options = {}) =>
|
|
26
|
+
this.GetAll = async (options = {}) => {
|
|
36
27
|
const { limit, offset, id } = options;
|
|
37
28
|
try {
|
|
38
29
|
const order = [];
|
|
39
30
|
order.push([["shape_id", "asc"]]);
|
|
40
|
-
const data =
|
|
31
|
+
const data = await this.sequelizeModel.findAll({
|
|
41
32
|
limit,
|
|
42
33
|
offset,
|
|
43
34
|
order,
|
|
@@ -51,10 +42,10 @@ class GTFSShapesModel extends output_gateway_1.SequelizeModel {
|
|
|
51
42
|
catch (err) {
|
|
52
43
|
throw new golemio_errors_1.GeneralError("Database error ~ GetAll", "GTFSShapesModel", err, 500);
|
|
53
44
|
}
|
|
54
|
-
}
|
|
55
|
-
this.GetOne = (id) =>
|
|
45
|
+
};
|
|
46
|
+
this.GetOne = async (id) => {
|
|
56
47
|
return null;
|
|
57
|
-
}
|
|
48
|
+
};
|
|
58
49
|
this.outputAttributes = Object.keys(ShapeDto_1.ShapeDto.attributeModel);
|
|
59
50
|
}
|
|
60
51
|
}
|