@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.
Files changed (381) hide show
  1. package/dist/input-gateway/jis/JisInfotextsController.js +4 -13
  2. package/dist/input-gateway/jis/JisInfotextsController.js.map +1 -1
  3. package/dist/input-gateway/jis/JisInfotextsRouter.js +3 -12
  4. package/dist/input-gateway/jis/JisInfotextsRouter.js.map +1 -1
  5. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js +4 -13
  6. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js.map +1 -1
  7. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +3 -12
  8. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
  9. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +4 -13
  10. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
  11. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +3 -12
  12. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
  13. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js +4 -15
  14. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js.map +1 -1
  15. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js +8 -19
  16. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js.map +1 -1
  17. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +1 -1
  18. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -1
  19. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +56 -72
  20. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  21. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +32 -48
  22. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
  23. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +24 -37
  24. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
  25. package/dist/integration-engine/jis/services/JISInfotextsDataService.js +24 -35
  26. package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
  27. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +2 -3
  28. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
  29. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +12 -23
  30. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
  31. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -15
  32. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  33. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +3 -12
  34. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
  35. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +2 -11
  36. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  37. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +3 -12
  38. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
  39. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +21 -30
  40. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
  41. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js +20 -29
  42. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js.map +1 -1
  43. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js +33 -52
  44. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js.map +1 -1
  45. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js +12 -23
  46. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js.map +1 -1
  47. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js +12 -23
  48. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  49. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +33 -44
  50. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -1
  51. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +10 -21
  52. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
  53. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +15 -24
  54. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
  55. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js +3 -12
  56. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js.map +1 -1
  57. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js +3 -12
  58. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map +1 -1
  59. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +4 -13
  60. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
  61. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +30 -41
  62. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
  63. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +11 -22
  64. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
  65. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +1 -2
  66. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
  67. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +7 -16
  68. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
  69. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +3 -12
  70. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
  71. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +13 -17
  72. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
  73. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +13 -22
  74. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
  75. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js +1 -2
  76. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js.map +1 -1
  77. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js +12 -23
  78. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js.map +1 -1
  79. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +14 -25
  80. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
  81. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +26 -37
  82. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
  83. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +12 -23
  84. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
  85. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js +36 -49
  86. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js.map +1 -1
  87. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js +3 -14
  88. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js.map +1 -1
  89. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +1 -2
  90. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
  91. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +29 -40
  92. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +1 -1
  93. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +64 -81
  94. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  95. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +60 -79
  96. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +1 -1
  97. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +23 -34
  98. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +1 -1
  99. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +26 -38
  100. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -1
  101. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js +21 -32
  102. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js.map +1 -1
  103. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +43 -55
  104. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +1 -1
  105. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js +8 -18
  106. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js.map +1 -1
  107. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js +11 -21
  108. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
  109. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +8 -17
  110. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
  111. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +19 -30
  112. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
  113. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js +8 -1
  114. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js.map +1 -1
  115. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +31 -47
  116. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
  117. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +6 -17
  118. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -1
  119. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +4 -14
  120. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -1
  121. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +6 -17
  122. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -1
  123. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +34 -31
  124. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
  125. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +3 -12
  126. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
  127. package/dist/integration-engine/shared/RopidMetadataModel.js +35 -45
  128. package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
  129. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +13 -24
  130. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
  131. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +9 -6
  132. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
  133. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +113 -128
  134. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
  135. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +20 -34
  136. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
  137. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +3 -12
  138. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -1
  139. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js +3 -12
  140. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js.map +1 -1
  141. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +12 -21
  142. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
  143. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js +7 -16
  144. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js.map +1 -1
  145. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +22 -33
  146. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -1
  147. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js +31 -44
  148. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js.map +1 -1
  149. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +14 -25
  150. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -1
  151. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js +25 -37
  152. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js.map +1 -1
  153. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +53 -63
  154. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
  155. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js +57 -72
  156. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js.map +1 -1
  157. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js +15 -26
  158. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js.map +1 -1
  159. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +10 -21
  160. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
  161. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +19 -30
  162. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
  163. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +10 -21
  164. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
  165. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +5 -14
  166. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
  167. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +4 -14
  168. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
  169. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +1 -2
  170. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -1
  171. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +35 -49
  172. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -1
  173. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +11 -22
  174. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
  175. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +2 -3
  176. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
  177. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js +3 -12
  178. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js.map +1 -1
  179. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +3 -12
  180. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js.map +1 -1
  181. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +19 -29
  182. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
  183. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js +3 -12
  184. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js.map +1 -1
  185. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +3 -12
  186. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js.map +1 -1
  187. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +58 -55
  188. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  189. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js +64 -79
  190. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
  191. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +46 -59
  192. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
  193. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +39 -6
  194. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
  195. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js +8 -19
  196. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js.map +1 -1
  197. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js +2 -13
  198. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js.map +1 -1
  199. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +1 -2
  200. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
  201. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +10 -16
  202. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js.map +1 -1
  203. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +68 -40
  204. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
  205. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js +5 -14
  206. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js.map +1 -1
  207. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -2
  208. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
  209. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +1 -2
  210. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -1
  211. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js +4 -4
  212. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js.map +1 -1
  213. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js +1 -2
  214. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js.map +1 -1
  215. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js +4 -5
  216. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js.map +1 -1
  217. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js +3 -4
  218. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js.map +1 -1
  219. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js +7 -18
  220. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js.map +1 -1
  221. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +7 -16
  222. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
  223. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +40 -57
  224. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
  225. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +36 -53
  226. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
  227. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js +32 -41
  228. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js.map +1 -1
  229. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +61 -33
  230. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
  231. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js +4 -4
  232. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js.map +1 -1
  233. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js +4 -6
  234. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
  235. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js +38 -55
  236. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js.map +1 -1
  237. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js +32 -45
  238. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js.map +1 -1
  239. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js +81 -91
  240. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js.map +1 -1
  241. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js +43 -55
  242. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js.map +1 -1
  243. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js +37 -49
  244. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  245. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js +7 -18
  246. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js.map +1 -1
  247. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +41 -52
  248. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  249. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +32 -43
  250. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
  251. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +95 -115
  252. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
  253. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +150 -162
  254. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js.map +1 -1
  255. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js +82 -94
  256. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js.map +1 -1
  257. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +24 -35
  258. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
  259. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +15 -18
  260. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
  261. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js +1 -1
  262. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js.map +1 -1
  263. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +11 -21
  264. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
  265. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -3
  266. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  267. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +5 -15
  268. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
  269. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +4 -13
  270. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -1
  271. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +4 -13
  272. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -1
  273. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +8 -17
  274. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  275. package/dist/output-gateway/pid/data-access/DeparturesRepository.js +40 -53
  276. package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
  277. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +62 -75
  278. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -1
  279. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
  280. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
  281. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +6 -15
  282. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
  283. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +11 -21
  284. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  285. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js +20 -27
  286. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js.map +1 -1
  287. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +16 -25
  288. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
  289. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +2 -4
  290. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
  291. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +12 -23
  292. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  293. package/dist/output-gateway/pid/service/facade/StopFacade.js +27 -38
  294. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  295. package/dist/output-gateway/pid/service/facade/TransferFacade.js +32 -39
  296. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  297. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +3 -4
  298. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -1
  299. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +8 -12
  300. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -1
  301. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +1 -2
  302. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -1
  303. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +1 -2
  304. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -1
  305. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js +4 -13
  306. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -1
  307. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js +4 -13
  308. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -1
  309. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js +9 -18
  310. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -1
  311. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js +13 -26
  312. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js.map +1 -1
  313. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js +22 -33
  314. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js.map +1 -1
  315. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +9 -20
  316. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  317. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +23 -34
  318. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
  319. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +153 -172
  320. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
  321. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js +2 -2
  322. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js.map +1 -1
  323. package/dist/output-gateway/public/service/VPSubscriber.js +8 -19
  324. package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -1
  325. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +100 -117
  326. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -1
  327. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +18 -29
  328. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
  329. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +20 -31
  330. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -1
  331. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +15 -26
  332. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
  333. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +1 -2
  334. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  335. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +3 -14
  336. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
  337. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +7 -18
  338. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
  339. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +35 -46
  340. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  341. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +16 -22
  342. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
  343. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +9 -10
  344. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -1
  345. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js +5 -15
  346. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js.map +1 -1
  347. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +2 -3
  348. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -1
  349. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js +2 -15
  350. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js.map +1 -1
  351. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js +1 -13
  352. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
  353. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +14 -25
  354. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -1
  355. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +3 -12
  356. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
  357. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +4 -13
  358. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
  359. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +5 -14
  360. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
  361. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +90 -102
  362. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
  363. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +3 -12
  364. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
  365. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +43 -51
  366. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
  367. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +28 -37
  368. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
  369. package/dist/output-gateway/shared/DepartureCalculator.js +1 -1
  370. package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -1
  371. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +40 -48
  372. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -1
  373. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +7 -16
  374. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
  375. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +10 -19
  376. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
  377. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js +5 -2
  378. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js.map +1 -1
  379. package/dist/schema-definitions/ropid-gtfs/index.js +16 -4
  380. package/dist/schema-definitions/ropid-gtfs/index.js.map +1 -1
  381. package/package.json +3 -3
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.DepartureBoardFacade = void 0;
13
4
  const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
@@ -23,122 +14,114 @@ class DepartureBoardFacade {
23
14
  this.descriptorRepository = descriptorRepository;
24
15
  this.transformation = new PublicDepartureTransformation_1.PublicDepartureTransformation();
25
16
  }
26
- getAll(stopIds, limit, routeShortNames, minutesAfter) {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- let output;
29
- const sortedStopGroups = this.sortStopGroupsByPriority(stopIds);
30
- const promises = sortedStopGroups.map((stopGroup) => __awaiter(this, void 0, void 0, function* () { return yield this.handleStopGroupDepartures(stopGroup, limit, routeShortNames, minutesAfter); }));
31
- try {
32
- output = yield Promise.all(promises);
17
+ async getAll(stopIds, limit, routeShortNames, minutesAfter) {
18
+ let output;
19
+ const sortedStopGroups = this.sortStopGroupsByPriority(stopIds);
20
+ const promises = sortedStopGroups.map(async (stopGroup) => await this.handleStopGroupDepartures(stopGroup, limit, routeShortNames, minutesAfter));
21
+ try {
22
+ output = await Promise.all(promises);
23
+ }
24
+ catch (err) {
25
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
26
+ throw err;
33
27
  }
34
- catch (err) {
35
- if (err instanceof golemio_errors_1.AbstractGolemioError) {
36
- throw err;
28
+ throw new golemio_errors_1.GeneralError("Error while retrieving cached data", this.constructor.name, err, 500);
29
+ }
30
+ if (output.every((value) => value === null)) {
31
+ return null;
32
+ }
33
+ else {
34
+ return output.map((value) => {
35
+ if (value === null) {
36
+ return [];
37
37
  }
38
- throw new golemio_errors_1.GeneralError("Error while retrieving cached data", this.constructor.name, err, 500);
39
- }
40
- if (output.every((value) => value === null)) {
41
- return null;
42
- }
43
- else {
44
- return output.map((value) => {
45
- if (value === null) {
46
- return [];
47
- }
48
- else {
49
- return value;
50
- }
51
- });
52
- }
53
- });
54
- }
55
- handleStopGroupDepartures(stopGroup, limit, routeShortNames, minutesAfter) {
56
- var _a;
57
- return __awaiter(this, void 0, void 0, function* () {
58
- let outputGroup = [];
59
- const spanDepartures = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.getPublicDepartureCache`);
60
- const departures = yield this.departureRepository.getPublicGtfsDepartureCache(stopGroup.stopIds, minutesAfter);
61
- spanDepartures === null || spanDepartures === void 0 ? void 0 : spanDepartures.end();
62
- if (departures.length === 0) {
63
- return null;
64
- }
65
- const spanPositions = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.getAllVehiclePositions`);
66
- const positionsByTrip = yield this.tripRepository.getAllVehiclePositionsForMultipleTrips(departures.map((departure) => departure.trip_id));
67
- spanPositions === null || spanPositions === void 0 ? void 0 : spanPositions.end();
68
- const spanTransform = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.transformDepartures`);
69
- try {
70
- for (const departure of departures) {
71
- if (Object.keys(departure).length === 0) {
72
- continue;
73
- }
74
- const positions = (_a = positionsByTrip.get(departure.trip_id)) !== null && _a !== void 0 ? _a : [];
75
- const duplicatedDepartures = yield this.duplicateDeparturesWithDifferentVehicleIds(departure, positions);
76
- outputGroup = outputGroup.concat(duplicatedDepartures);
38
+ else {
39
+ return value;
77
40
  }
78
- }
79
- catch (err) {
80
- if (err instanceof golemio_errors_1.AbstractGolemioError) {
81
- throw err;
41
+ });
42
+ }
43
+ }
44
+ async handleStopGroupDepartures(stopGroup, limit, routeShortNames, minutesAfter) {
45
+ let outputGroup = [];
46
+ const spanDepartures = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.getPublicDepartureCache`);
47
+ const departures = await this.departureRepository.getPublicGtfsDepartureCache(stopGroup.stopIds, minutesAfter);
48
+ spanDepartures?.end();
49
+ if (departures.length === 0) {
50
+ return null;
51
+ }
52
+ const spanPositions = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.getAllVehiclePositions`);
53
+ const positionsByTrip = await this.tripRepository.getAllVehiclePositionsForMultipleTrips(departures.map((departure) => departure.trip_id));
54
+ spanPositions?.end();
55
+ const spanTransform = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.transformDepartures`);
56
+ try {
57
+ for (const departure of departures) {
58
+ if (Object.keys(departure).length === 0) {
59
+ continue;
82
60
  }
83
- throw new golemio_errors_1.GeneralError("Error while retrieving cached data", this.constructor.name, err, 500);
84
- }
85
- finally {
86
- spanTransform === null || spanTransform === void 0 ? void 0 : spanTransform.end();
61
+ const positions = positionsByTrip.get(departure.trip_id) ?? [];
62
+ const duplicatedDepartures = await this.duplicateDeparturesWithDifferentVehicleIds(departure, positions);
63
+ outputGroup = outputGroup.concat(duplicatedDepartures);
87
64
  }
88
- const spanManipulate = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.manipulateDepartures`);
89
- try {
90
- outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.filterDeparturesByRouteShortNames(outputGroup, routeShortNames);
91
- outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.sortDeparturesByPredictedTimestamp(outputGroup);
92
- // minutesBefore is set to 0 because we want to display departures that are already happening
93
- // this may change in the future
94
- outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.removeDeparturesOutsideTimeRange(outputGroup, 0, minutesAfter).slice(0, limit);
65
+ }
66
+ catch (err) {
67
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
68
+ throw err;
95
69
  }
96
- catch (err) {
97
- throw new golemio_errors_1.GeneralError("Error while manipulating departures", this.constructor.name, err, 500);
98
- }
99
- finally {
100
- spanManipulate === null || spanManipulate === void 0 ? void 0 : spanManipulate.end();
101
- }
102
- return outputGroup;
103
- });
70
+ throw new golemio_errors_1.GeneralError("Error while retrieving cached data", this.constructor.name, err, 500);
71
+ }
72
+ finally {
73
+ spanTransform?.end();
74
+ }
75
+ const spanManipulate = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.manipulateDepartures`);
76
+ try {
77
+ outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.filterDeparturesByRouteShortNames(outputGroup, routeShortNames);
78
+ outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.sortDeparturesByPredictedTimestamp(outputGroup);
79
+ // minutesBefore is set to 0 because we want to display departures that are already happening
80
+ // this may change in the future
81
+ outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.removeDeparturesOutsideTimeRange(outputGroup, 0, minutesAfter).slice(0, limit);
82
+ }
83
+ catch (err) {
84
+ throw new golemio_errors_1.GeneralError("Error while manipulating departures", this.constructor.name, err, 500);
85
+ }
86
+ finally {
87
+ spanManipulate?.end();
88
+ }
89
+ return outputGroup;
104
90
  }
105
- duplicateDeparturesWithDifferentVehicleIds(departure, vehiclePositions) {
106
- var _a;
107
- return __awaiter(this, void 0, void 0, function* () {
108
- const outputGroup = [];
109
- // If there are no RT data, we still want to display the departure
110
- // but without any RT/vehicle information
111
- if (vehiclePositions.length === 0) {
112
- outputGroup.push(this.transformation.transformElement({
113
- departure,
114
- vehiclePosition: null,
115
- vehicleDescriptor: null,
116
- stopTime: null,
117
- }));
118
- return outputGroup;
119
- }
120
- // Otherwise, we want to duplicate the departure for each vehicleId
121
- // (multiple vehicles can be on the same trip at the same time)
122
- for (const vehiclePosition of vehiclePositions) {
123
- const vehicleDescriptor = (vehiclePosition === null || vehiclePosition === void 0 ? void 0 : vehiclePosition.detailed_info.registration_number)
124
- ? yield this.descriptorRepository.getOneByRegNumber(departure.route_type, vehiclePosition === null || vehiclePosition === void 0 ? void 0 : vehiclePosition.detailed_info.registration_number)
125
- : null;
126
- let currentStopTime = null;
127
- // If the vehicle is a train, we need to get the current stop time
128
- // to later determine the RT CIS platform code (trains don't have platform codes in GTFS)
129
- if (vehiclePosition.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.TRAIN) {
130
- const stopTimes = yield this.stopTimeRepository.getPublicStopTimeCache(vehiclePosition.vehicle_id, departure.trip_id);
131
- currentStopTime = (_a = stopTimes.find((stopTime) => stopTime.sequence === departure.stop_sequence)) !== null && _a !== void 0 ? _a : null;
132
- }
133
- outputGroup.push(this.transformation.transformElement({
134
- departure,
135
- vehiclePosition,
136
- vehicleDescriptor,
137
- stopTime: currentStopTime,
138
- }));
139
- }
91
+ async duplicateDeparturesWithDifferentVehicleIds(departure, vehiclePositions) {
92
+ const outputGroup = [];
93
+ // If there are no RT data, we still want to display the departure
94
+ // but without any RT/vehicle information
95
+ if (vehiclePositions.length === 0) {
96
+ outputGroup.push(this.transformation.transformElement({
97
+ departure,
98
+ vehiclePosition: null,
99
+ vehicleDescriptor: null,
100
+ stopTime: null,
101
+ }));
140
102
  return outputGroup;
141
- });
103
+ }
104
+ // Otherwise, we want to duplicate the departure for each vehicleId
105
+ // (multiple vehicles can be on the same trip at the same time)
106
+ for (const vehiclePosition of vehiclePositions) {
107
+ const vehicleDescriptor = vehiclePosition?.detailed_info.registration_number
108
+ ? await this.descriptorRepository.getOneByRegNumber(departure.route_type, vehiclePosition?.detailed_info.registration_number)
109
+ : null;
110
+ let currentStopTime = null;
111
+ // If the vehicle is a train, we need to get the current stop time
112
+ // to later determine the RT CIS platform code (trains don't have platform codes in GTFS)
113
+ if (vehiclePosition.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.TRAIN) {
114
+ const stopTimes = await this.stopTimeRepository.getPublicStopTimeCache(vehiclePosition.vehicle_id, departure.trip_id);
115
+ currentStopTime = stopTimes.find((stopTime) => stopTime.sequence === departure.stop_sequence) ?? null;
116
+ }
117
+ outputGroup.push(this.transformation.transformElement({
118
+ departure,
119
+ vehiclePosition,
120
+ vehicleDescriptor,
121
+ stopTime: currentStopTime,
122
+ }));
123
+ }
124
+ return outputGroup;
142
125
  }
143
126
  sortStopGroupsByPriority(stopIds) {
144
127
  return Array.from(stopIds).sort((a, b) => a.priority - b.priority);
@@ -1 +1 @@
1
- {"version":3,"file":"DepartureBoardFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/DepartureBoardFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA4D;AAU5D,+FAA6F;AAC7F,6EAA8F;AAC9F,4EAAyE;AACzE,oGAAiG;AAEjG,MAAa,oBAAoB;IAG7B,YACqB,mBAA6C,EAC7C,cAA2C,EAC3C,kBAAuC,EACvC,oBAAuD;QAHvD,wBAAmB,GAAnB,mBAAmB,CAA0B;QAC7C,mBAAc,GAAd,cAAc,CAA6B;QAC3C,uBAAkB,GAAlB,kBAAkB,CAAqB;QACvC,yBAAoB,GAApB,oBAAoB,CAAmC;QAExE,IAAI,CAAC,cAAc,GAAG,IAAI,6DAA6B,EAAE,CAAC;IAC9D,CAAC;IAEY,MAAM,CACf,OAA0C,EAC1C,KAAa,EACb,eAAgC,EAChC,YAAoB;;YAEpB,IAAI,MAAkD,CAAC;YAEvD,MAAM,gBAAgB,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;YAChE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CACjC,CAAO,SAAS,EAAE,EAAE,gDAAC,OAAA,MAAM,IAAI,CAAC,yBAAyB,CAAC,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,YAAY,CAAC,CAAA,GAAA,CAC7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AAU,KAAK,kCAAiB,CAAC,KAAK,EAAE;oBACxD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,sBAAsB,CAClE,eAAe,CAAC,UAAU,EAC1B,SAAS,CAAC,OAAO,CACpB,CAAC;oBAEF,eAAe,GAAG,MAAA,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,KAAK,SAAS,CAAC,aAAa,CAAC,mCAAI,IAAI,CAAC;iBACzG;gBAED,WAAW,CAAC,IAAI,CACZ,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC;oBACjC,SAAS;oBACT,eAAe;oBACf,iBAAiB;oBACjB,QAAQ,EAAE,eAAe;iBAC5B,CAAC,CACL,CAAC;aACL;YAED,OAAO,WAAW,CAAC;;KACtB;IAEO,wBAAwB,CAAC,OAA0C;QACvE,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACvE,CAAC;CACJ;AAnKD,oDAmKC"}
1
+ {"version":3,"file":"DepartureBoardFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/DepartureBoardFacade.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAU5D,+FAA6F;AAC7F,6EAA8F;AAC9F,4EAAyE;AACzE,oGAAiG;AAEjG,MAAa,oBAAoB;IAG7B,YACqB,mBAA6C,EAC7C,cAA2C,EAC3C,kBAAuC,EACvC,oBAAuD;QAHvD,wBAAmB,GAAnB,mBAAmB,CAA0B;QAC7C,mBAAc,GAAd,cAAc,CAA6B;QAC3C,uBAAkB,GAAlB,kBAAkB,CAAqB;QACvC,yBAAoB,GAApB,oBAAoB,CAAmC;QAExE,IAAI,CAAC,cAAc,GAAG,IAAI,6DAA6B,EAAE,CAAC;IAC9D,CAAC;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,eAAe,EAAE,aAAa,CAAC,mBAAmB,CACrD;gBACH,CAAC,CAAC,IAAI,CAAC;YAEX,IAAI,eAAe,GAAmC,IAAI,CAAC;YAE3D,kEAAkE;YAClE,2FAA2F;YAC3F,IAAI,eAAe,CAAC,UAAU,KAAK,kCAAiB,CAAC,KAAK,EAAE;gBACxD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,sBAAsB,CAClE,eAAe,CAAC,UAAU,EAC1B,SAAS,CAAC,OAAO,CACpB,CAAC;gBAEF,eAAe,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,KAAK,SAAS,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC;aACzG;YAED,WAAW,CAAC,IAAI,CACZ,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC;gBACjC,SAAS;gBACT,eAAe;gBACf,iBAAiB;gBACjB,QAAQ,EAAE,eAAe;aAC5B,CAAC,CACL,CAAC;SACL;QAED,OAAO,WAAW,CAAC;IACvB,CAAC;IAEO,wBAAwB,CAAC,OAA0C;QACvE,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACvE,CAAC;CACJ;AAnKD,oDAmKC"}
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.DetailedTripFacade = void 0;
13
4
  const DetailedTripScopeEnum_1 = require("../../routers/v2/helpers/DetailedTripScopeEnum");
@@ -17,28 +8,26 @@ class DetailedTripFacade {
17
8
  this.scopeHandlerFactory = scopeHandlerFactory;
18
9
  this.vehiclePositionRepository = vehiclePositionRepository;
19
10
  }
20
- getOneByVehicleId(vehicleId, scopes, tripId) {
21
- return __awaiter(this, void 0, void 0, function* () {
22
- let vehiclePosition = yield this.vehiclePositionRepository.getDetailedVehiclePosition(vehicleId);
23
- if (tripId && (vehiclePosition === null || vehiclePosition === void 0 ? void 0 : vehiclePosition.gtfs_trip_id) !== tripId) {
24
- vehiclePosition = yield this.vehiclePositionRepository.getDetailedVehiclePosition(vehicleId, tripId);
11
+ async getOneByVehicleId(vehicleId, scopes, tripId) {
12
+ let vehiclePosition = await this.vehiclePositionRepository.getDetailedVehiclePosition(vehicleId);
13
+ if (tripId && vehiclePosition?.gtfs_trip_id !== tripId) {
14
+ vehiclePosition = await this.vehiclePositionRepository.getDetailedVehiclePosition(vehicleId, tripId);
15
+ }
16
+ if (!vehiclePosition) {
17
+ throw new golemio_errors_1.GeneralError("not_found", this.constructor.name, undefined, 404);
18
+ }
19
+ let output = {};
20
+ if (scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Info)) {
21
+ output = await this.scopeHandlerFactory.getStrategy(DetailedTripScopeEnum_1.DetailedTripScope.Info).handle(output, vehiclePosition);
22
+ }
23
+ const promises = scopes.map(async (scope) => {
24
+ if (scope === DetailedTripScopeEnum_1.DetailedTripScope.Info) {
25
+ return;
25
26
  }
26
- if (!vehiclePosition) {
27
- throw new golemio_errors_1.GeneralError("not_found", this.constructor.name, undefined, 404);
28
- }
29
- let output = {};
30
- if (scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Info)) {
31
- output = yield this.scopeHandlerFactory.getStrategy(DetailedTripScopeEnum_1.DetailedTripScope.Info).handle(output, vehiclePosition);
32
- }
33
- const promises = scopes.map((scope) => __awaiter(this, void 0, void 0, function* () {
34
- if (scope === DetailedTripScopeEnum_1.DetailedTripScope.Info) {
35
- return;
36
- }
37
- output = yield this.scopeHandlerFactory.getStrategy(scope).handle(output, vehiclePosition);
38
- }));
39
- yield Promise.all(promises);
40
- return output;
27
+ output = await this.scopeHandlerFactory.getStrategy(scope).handle(output, vehiclePosition);
41
28
  });
29
+ await Promise.all(promises);
30
+ return output;
42
31
  }
43
32
  }
44
33
  exports.DetailedTripFacade = DetailedTripFacade;
@@ -1 +1 @@
1
- {"version":3,"file":"DetailedTripFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/DetailedTripFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,0FAAwF;AACxF,6EAAwE;AAGxE,MAAa,kBAAkB;IAC3B,YACY,mBAA4C,EAC5C,yBAAsD;QADtD,wBAAmB,GAAnB,mBAAmB,CAAyB;QAC5C,8BAAyB,GAAzB,yBAAyB,CAA6B;IAC/D,CAAC;IAES,iBAAiB,CAC1B,SAAiB,EACjB,MAA2B,EAC3B,MAAe;;YAEf,IAAI,eAAe,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC;YAEjG,IAAI,MAAM,IAAI,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,YAAY,MAAK,MAAM,EAAE;gBACpD,eAAe,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,0BAA0B,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;aACxG;YAED,IAAI,CAAC,eAAe,EAAE;gBAClB,MAAM,IAAI,6BAAY,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;aAC9E;YAED,IAAI,MAAM,GAA2B,EAAE,CAAC;YACxC,IAAI,MAAM,CAAC,QAAQ,CAAC,yCAAiB,CAAC,IAAI,CAAC,EAAE;gBACzC,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,yCAAiB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;aAC/G;YAED,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAO,KAAK,EAAE,EAAE;gBACxC,IAAI,KAAK,KAAK,yCAAiB,CAAC,IAAI,EAAE;oBAClC,OAAO;iBACV;gBAED,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,eAAgB,CAAC,CAAC;YAChG,CAAC,CAAA,CAAC,CAAC;YAEH,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;CACJ;AArCD,gDAqCC"}
1
+ {"version":3,"file":"DetailedTripFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/DetailedTripFacade.ts"],"names":[],"mappings":";;;AAEA,0FAAwF;AACxF,6EAAwE;AAGxE,MAAa,kBAAkB;IAC3B,YACY,mBAA4C,EAC5C,yBAAsD;QADtD,wBAAmB,GAAnB,mBAAmB,CAAyB;QAC5C,8BAAyB,GAAzB,yBAAyB,CAA6B;IAC/D,CAAC;IAEG,KAAK,CAAC,iBAAiB,CAC1B,SAAiB,EACjB,MAA2B,EAC3B,MAAe;QAEf,IAAI,eAAe,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC;QAEjG,IAAI,MAAM,IAAI,eAAe,EAAE,YAAY,KAAK,MAAM,EAAE;YACpD,eAAe,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,0BAA0B,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;SACxG;QAED,IAAI,CAAC,eAAe,EAAE;YAClB,MAAM,IAAI,6BAAY,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;SAC9E;QAED,IAAI,MAAM,GAA2B,EAAE,CAAC;QACxC,IAAI,MAAM,CAAC,QAAQ,CAAC,yCAAiB,CAAC,IAAI,CAAC,EAAE;YACzC,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,yCAAiB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;SAC/G;QAED,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACxC,IAAI,KAAK,KAAK,yCAAiB,CAAC,IAAI,EAAE;gBAClC,OAAO;aACV;YAED,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,eAAgB,CAAC,CAAC;QAChG,CAAC,CAAC,CAAC;QAEH,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AArCD,gDAqCC"}
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.GtfsTripLookupFacade = void 0;
13
4
  const DetailedTripScopeEnum_1 = require("../../routers/v2/helpers/DetailedTripScopeEnum");
@@ -18,29 +9,27 @@ class GtfsTripLookupFacade {
18
9
  this.scopeHandlerFactory = scopeHandlerFactory;
19
10
  this.gtfsTripRepository = models_1.models.GTFSTripsModel;
20
11
  }
21
- getOneByGtfsTripId(gtfsTripId, scopes) {
22
- return __awaiter(this, void 0, void 0, function* () {
23
- const shouldIncludeStopTimes = scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.StopTimes);
24
- const shouldIncludeShapes = scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Shapes);
25
- const gtfsTrip = yield this.gtfsTripRepository.getOneForPublicGtfsLookup(gtfsTripId, {
26
- shouldIncludeStopTimes,
27
- shouldIncludeShapes,
28
- });
29
- if (!this.isGtfsTripValid(gtfsTrip)) {
30
- throw new golemio_errors_1.GeneralError("GTFS trip info not found", this.constructor.name, undefined, 404);
31
- }
32
- let output = {};
33
- if (scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Info)) {
34
- output = this.scopeHandlerFactory.getStrategy(DetailedTripScopeEnum_1.DetailedTripScope.Info).handle(output, gtfsTrip);
35
- }
36
- for (const scope of scopes) {
37
- if (scope === DetailedTripScopeEnum_1.DetailedTripScope.Info) {
38
- continue;
39
- }
40
- output = this.scopeHandlerFactory.getStrategy(scope).handle(output, gtfsTrip);
41
- }
42
- return output;
12
+ async getOneByGtfsTripId(gtfsTripId, scopes) {
13
+ const shouldIncludeStopTimes = scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.StopTimes);
14
+ const shouldIncludeShapes = scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Shapes);
15
+ const gtfsTrip = await this.gtfsTripRepository.getOneForPublicGtfsLookup(gtfsTripId, {
16
+ shouldIncludeStopTimes,
17
+ shouldIncludeShapes,
43
18
  });
19
+ if (!this.isGtfsTripValid(gtfsTrip)) {
20
+ throw new golemio_errors_1.GeneralError("GTFS trip info not found", this.constructor.name, undefined, 404);
21
+ }
22
+ let output = {};
23
+ if (scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Info)) {
24
+ output = this.scopeHandlerFactory.getStrategy(DetailedTripScopeEnum_1.DetailedTripScope.Info).handle(output, gtfsTrip);
25
+ }
26
+ for (const scope of scopes) {
27
+ if (scope === DetailedTripScopeEnum_1.DetailedTripScope.Info) {
28
+ continue;
29
+ }
30
+ output = this.scopeHandlerFactory.getStrategy(scope).handle(output, gtfsTrip);
31
+ }
32
+ return output;
44
33
  }
45
34
  isGtfsTripValid(gtfsTrip) {
46
35
  return !!gtfsTrip && !!gtfsTrip.route;
@@ -1 +1 @@
1
- {"version":3,"file":"GtfsTripLookupFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/GtfsTripLookupFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,0FAAwF;AACxF,uDAA+C;AAM/C,6EAAwE;AAGxE,MAAa,oBAAoB;IAG7B,YAAoB,mBAAgD;QAAhD,wBAAmB,GAAnB,mBAAmB,CAA6B;QAChE,IAAI,CAAC,kBAAkB,GAAG,eAAM,CAAC,cAAc,CAAC;IACpD,CAAC;IAEY,kBAAkB,CAAC,UAAkB,EAAE,MAA2B;;YAC3E,MAAM,sBAAsB,GAAG,MAAM,CAAC,QAAQ,CAAC,yCAAiB,CAAC,SAAS,CAAC,CAAC;YAC5E,MAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,yCAAiB,CAAC,MAAM,CAAC,CAAC;YAEtE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,UAAU,EAAE;gBACjF,sBAAsB;gBACtB,mBAAmB;aACtB,CAAC,CAAC;YAEH,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE;gBACjC,MAAM,IAAI,6BAAY,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;aAC7F;YAED,IAAI,MAAM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,yBAAyB,CAAC,UAAU,EAAE;YACjF,sBAAsB;YACtB,mBAAmB;SACtB,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE;YACjC,MAAM,IAAI,6BAAY,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;SAC7F;QAED,IAAI,MAAM,GAAuB,EAAE,CAAC;QACpC,IAAI,MAAM,CAAC,QAAQ,CAAC,yCAAiB,CAAC,IAAI,CAAC,EAAE;YACzC,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,yCAAiB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;SAClG;QAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YACxB,IAAI,KAAK,KAAK,yCAAiB,CAAC,IAAI,EAAE;gBAClC,SAAS;aACZ;YAED,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;SACjF;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAEO,eAAe,CAAC,QAAiD;QACrE,OAAO,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC1C,CAAC;CACJ;AAvCD,oDAuCC"}
@@ -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.PublicVehiclePositionsFacade = void 0;
13
4
  const output_gateway_1 = require("@golemio/core/dist/output-gateway");
@@ -19,23 +10,21 @@ class PublicVehiclePositionsFacade {
19
10
  this.log = log;
20
11
  this.transformation = new PublicVehiclePositionsTransformation_1.PublicVehiclePositionsTransformation();
21
12
  }
22
- getAll(boundingBox, routeShortName, type) {
23
- return __awaiter(this, void 0, void 0, function* () {
24
- const boundingBoxWithCenter = this.boundingBoxHelper.mapToCenterFormat(boundingBox);
25
- this.log.debug(`width: ${boundingBoxWithCenter.width}m, height: ${boundingBoxWithCenter.height}m`);
26
- const vehicleIds = yield this.repository.getAllVehicleIds(boundingBoxWithCenter);
27
- if (vehicleIds.length === 0) {
28
- this.log.debug("No vehicle ids found.");
29
- return (0, output_gateway_1.buildGeojsonFeatureCollection)([]);
30
- }
31
- const vehiclePositions = yield this.repository.getAllVehiclePositions(vehicleIds);
32
- const filteredResults = vehiclePositions.filter((el) => this.filterClientSide(el, routeShortName, type));
33
- if (filteredResults.length === 0) {
34
- this.log.debug("No vehicle positions found.");
35
- return (0, output_gateway_1.buildGeojsonFeatureCollection)([]);
36
- }
37
- return (0, output_gateway_1.buildGeojsonFeatureCollection)(this.transformation.transformArray(filteredResults));
38
- });
13
+ async getAll(boundingBox, routeShortName, type) {
14
+ const boundingBoxWithCenter = this.boundingBoxHelper.mapToCenterFormat(boundingBox);
15
+ this.log.debug(`width: ${boundingBoxWithCenter.width}m, height: ${boundingBoxWithCenter.height}m`);
16
+ const vehicleIds = await this.repository.getAllVehicleIds(boundingBoxWithCenter);
17
+ if (vehicleIds.length === 0) {
18
+ this.log.debug("No vehicle ids found.");
19
+ return (0, output_gateway_1.buildGeojsonFeatureCollection)([]);
20
+ }
21
+ const vehiclePositions = await this.repository.getAllVehiclePositions(vehicleIds);
22
+ const filteredResults = vehiclePositions.filter((el) => this.filterClientSide(el, routeShortName, type));
23
+ if (filteredResults.length === 0) {
24
+ this.log.debug("No vehicle positions found.");
25
+ return (0, output_gateway_1.buildGeojsonFeatureCollection)([]);
26
+ }
27
+ return (0, output_gateway_1.buildGeojsonFeatureCollection)(this.transformation.transformArray(filteredResults));
39
28
  }
40
29
  filterClientSide(el, routeShortName, types) {
41
30
  if (routeShortName instanceof Array && routeShortName.includes(el.gtfs_route_short_name)) {
@@ -1 +1 @@
1
- {"version":3,"file":"VehiclePositionsFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/VehiclePositionsFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,sEAA6G;AAE7G,kHAA+G;AAE/G,MAAa,4BAA4B;IAGrC,YACY,UAAuC,EACvC,iBAAqC,EACrC,GAAY;QAFZ,eAAU,GAAV,UAAU,CAA6B;QACvC,sBAAiB,GAAjB,iBAAiB,CAAoB;QACrC,QAAG,GAAH,GAAG,CAAS;QAEpB,IAAI,CAAC,cAAc,GAAG,IAAI,2EAAoC,EAAE,CAAC;IACrE,CAAC;IAEY,MAAM,CACf,WAAyB,EACzB,cAA6C,EAC7C,IAAqC;;YAErC,MAAM,qBAAqB,GAAG,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;YACpF,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,qBAAqB,CAAC,KAAK,cAAc,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC;YAEnG,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;YACjF,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;gBACzB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;gBACxC,OAAO,IAAA,8CAA6B,EAAC,EAAE,CAAC,CAAC;aAC5C;YAED,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;YAClF,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC;YACzG,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC9B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;gBAC9C,OAAO,IAAA,8CAA6B,EAAC,EAAE,CAAC,CAAC;aAC5C;YAED,OAAO,IAAA,8CAA6B,EAAC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;QAC9F,CAAC;KAAA;IAEO,gBAAgB,CACpB,EAAsB,EACtB,cAA6C,EAC7C,KAAsC;QAEtC,IAAI,cAAc,YAAY,KAAK,IAAI,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,qBAAqB,CAAC,EAAE;YACtF,OAAO,IAAI,CAAC;SACf;QAED,IAAI,cAAc,IAAI,EAAE,CAAC,qBAAqB,KAAK,cAAc,EAAE;YAC/D,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE;YACxD,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAtDD,oEAsDC"}
1
+ {"version":3,"file":"VehiclePositionsFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/VehiclePositionsFacade.ts"],"names":[],"mappings":";;;AAKA,sEAA6G;AAE7G,kHAA+G;AAE/G,MAAa,4BAA4B;IAGrC,YACY,UAAuC,EACvC,iBAAqC,EACrC,GAAY;QAFZ,eAAU,GAAV,UAAU,CAA6B;QACvC,sBAAiB,GAAjB,iBAAiB,CAAoB;QACrC,QAAG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,QAAQ,CAAC,EAAE,CAAC,qBAAqB,CAAC,EAAE;YACtF,OAAO,IAAI,CAAC;SACf;QAED,IAAI,cAAc,IAAI,EAAE,CAAC,qBAAqB,KAAK,cAAc,EAAE;YAC/D,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE;YACxD,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAtDD,oEAsDC"}
@@ -24,8 +24,7 @@ let StopTimesGtfsTripScopeHandler = exports.StopTimesGtfsTripScopeHandler = clas
24
24
  this.tripStopTimesTransformation = tripStopTimesTransformation;
25
25
  }
26
26
  handle(output, gtfsTrip) {
27
- var _a;
28
- const stopTimes = this.tripStopTimesTransformation.transformArray((_a = gtfsTrip.stop_times) !== null && _a !== void 0 ? _a : []);
27
+ const stopTimes = this.tripStopTimesTransformation.transformArray(gtfsTrip.stop_times ?? []);
29
28
  output.stop_times = (0, Geo_1.buildGeojsonFeatureCollection)(stopTimes);
30
29
  return output;
31
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iEAA6D;AAC7D,mIAA8I;AAE9I,+DAAsF;AACtF,iEAAwE;AACxE,iFAA8E;AAGvE,IAAM,6BAA6B,2CAAnC,MAAM,6BAA8B,SAAQ,2DAA4B;IAC3E,YAEY,2BAAkE;QAE1E,KAAK,EAAE,CAAC;QAFA,gCAA2B,GAA3B,2BAA2B,CAAuC;IAG9E,CAAC;IAEM,MAAM,CAAC,MAA0B,EAAE,QAAkC;;QACxE,MAAM,SAAS,GAAG,IAAI,CAAC,2BAA2B,CAAC,cAAc,CAAC,MAAA,QAAQ,CAAC,UAAU,mCAAI,EAAE,CAAC,CAAC;QAE7F,MAAM,CAAC,UAAU,GAAG,IAAA,mCAA6B,EAAC,SAAS,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;wCAdY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,qCAAqC,CAAC,CAAA;qCACvB,yEAAqC;GAHrE,6BAA6B,CAczC"}
1
+ {"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iEAA6D;AAC7D,mIAA8I;AAE9I,+DAAsF;AACtF,iEAAwE;AACxE,iFAA8E;AAGvE,IAAM,6BAA6B,2CAAnC,MAAM,6BAA8B,SAAQ,2DAA4B;IAC3E,YAEY,2BAAkE;QAE1E,KAAK,EAAE,CAAC;QAFA,gCAA2B,GAA3B,2BAA2B,CAAuC;IAG9E,CAAC;IAEM,MAAM,CAAC,MAA0B,EAAE,QAAkC;QACxE,MAAM,SAAS,GAAG,IAAI,CAAC,2BAA2B,CAAC,cAAc,CAAC,QAAQ,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAE7F,MAAM,CAAC,UAAU,GAAG,IAAA,mCAA6B,EAAC,SAAS,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;wCAdY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,qCAAqC,CAAC,CAAA;qCACvB,yEAAqC;GAHrE,6BAA6B,CAczC"}
@@ -8,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
11
  Object.defineProperty(exports, "__esModule", { value: true });
21
12
  exports.InfoTripScopeHandler = void 0;
22
13
  const PublicVPTripInfoTransformation_1 = require("../../../transformations/scopes/PublicVPTripInfoTransformation");
@@ -27,11 +18,9 @@ let InfoTripScopeHandler = exports.InfoTripScopeHandler = class InfoTripScopeHan
27
18
  super();
28
19
  this.tripInfoTransformation = new PublicVPTripInfoTransformation_1.PublicVPTripInfoTransformation();
29
20
  }
30
- handle(output, vehiclePosition) {
31
- return __awaiter(this, void 0, void 0, function* () {
32
- output = this.tripInfoTransformation.transformElement(vehiclePosition);
33
- return output;
34
- });
21
+ async handle(output, vehiclePosition) {
22
+ output = this.tripInfoTransformation.transformElement(vehiclePosition);
23
+ return output;
35
24
  }
36
25
  };
37
26
  exports.InfoTripScopeHandler = InfoTripScopeHandler = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"InfoTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,mHAA0H;AAE1H,iEAAgE;AAChE,yFAAsF;AAG/E,IAAM,oBAAoB,kCAA1B,MAAM,oBAAqB,SAAQ,mEAAgC;IAGtE;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,sBAAsB,GAAG,IAAI,+DAA8B,EAAE,CAAC;IACvE,CAAC;IAEY,MAAM,CAAC,MAA8B,EAAE,eAAmC;;YACnF,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;YACvE,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;CACJ,CAAA;+BAZY,oBAAoB;IADhC,IAAA,qBAAU,GAAE;;GACA,oBAAoB,CAYhC"}
1
+ {"version":3,"file":"InfoTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mHAA0H;AAE1H,iEAAgE;AAChE,yFAAsF;AAG/E,IAAM,oBAAoB,kCAA1B,MAAM,oBAAqB,SAAQ,mEAAgC;IAGtE;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,sBAAsB,GAAG,IAAI,+DAA8B,EAAE,CAAC;IACvE,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,MAA8B,EAAE,eAAmC;QACnF,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QACvE,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;+BAZY,oBAAoB;IADhC,IAAA,qBAAU,GAAE;;GACA,oBAAoB,CAYhC"}
@@ -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.ShapesTripScopeHandler = void 0;
25
16
  const OgModuleToken_1 = require("../../../../ioc/OgModuleToken");
@@ -36,15 +27,13 @@ let ShapesTripScopeHandler = exports.ShapesTripScopeHandler = class ShapesTripSc
36
27
  this.tripShapesTransformation = new PublicVPTripShapesTransformation_1.PublicVPTripShapesTransformation();
37
28
  this.shapeModel = models_1.models.GTFSShapesModel;
38
29
  }
39
- handle(output, vehiclePosition) {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- const delayComputationCache = yield this.delayComputationRepository.getDelayComputationCache(vehiclePosition.gtfs_trip_id);
42
- if (!delayComputationCache) {
43
- throw new golemio_errors_1.GeneralError("delay_computation_cache_not_found", this.constructor.name, undefined, 500);
44
- }
45
- output.shapes = (0, Geo_1.buildGeojsonFeatureCollection)(delayComputationCache.shapes ? this.tripShapesTransformation.transformArray(delayComputationCache.shapes) : []);
46
- return output;
47
- });
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
+ output.shapes = (0, Geo_1.buildGeojsonFeatureCollection)(delayComputationCache.shapes ? this.tripShapesTransformation.transformArray(delayComputationCache.shapes) : []);
36
+ return output;
48
37
  }
49
38
  };
50
39
  exports.ShapesTripScopeHandler = ShapesTripScopeHandler = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"ShapesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,iEAA6D;AAC7D,uHAA8H;AAC9H,6DAA+C;AAG/C,+DAAsF;AACtF,6EAAwE;AACxE,iEAAwE;AACxE,yFAAsF;AAG/E,IAAM,sBAAsB,oCAA5B,MAAM,sBAAuB,SAAQ,mEAAgC;IAIxE,YAC8D,0BAAuD;QAEjH,KAAK,EAAE,CAAC;QAFkD,+BAA0B,GAA1B,0BAA0B,CAA6B;QAGjH,IAAI,CAAC,wBAAwB,GAAG,IAAI,mEAAgC,EAAE,CAAC;QACvE,IAAI,CAAC,UAAU,GAAG,eAAM,CAAC,eAAe,CAAC;IAC7C,CAAC;IAEY,MAAM,CAAC,MAA8B,EAAE,eAAmC;;YACnF,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,wBAAwB,CACxF,eAAe,CAAC,YAAY,CAC/B,CAAC;YAEF,IAAI,CAAC,qBAAqB,EAAE;gBACxB,MAAM,IAAI,6BAAY,CAAC,mCAAmC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;aACtG;YAED,MAAM,CAAC,MAAM,GAAG,IAAA,mCAA6B,EACzC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CACjH,CAAC;YAEF,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;CACJ,CAAA;iCA3BY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,0BAA0B,CAAC,CAAA;;GAL5C,sBAAsB,CA2BlC"}
1
+ {"version":3,"file":"ShapesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,iEAA6D;AAC7D,uHAA8H;AAC9H,6DAA+C;AAG/C,+DAAsF;AACtF,6EAAwE;AACxE,iEAAwE;AACxE,yFAAsF;AAG/E,IAAM,sBAAsB,oCAA5B,MAAM,sBAAuB,SAAQ,mEAAgC;IAIxE,YAC8D,0BAAuD;QAEjH,KAAK,EAAE,CAAC;QAFkD,+BAA0B,GAA1B,0BAA0B,CAA6B;QAGjH,IAAI,CAAC,wBAAwB,GAAG,IAAI,mEAAgC,EAAE,CAAC;QACvE,IAAI,CAAC,UAAU,GAAG,eAAM,CAAC,eAAe,CAAC;IAC7C,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,CAAC,MAAM,GAAG,IAAA,mCAA6B,EACzC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CACjH,CAAC;QAEF,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;iCA3BY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,0BAA0B,CAAC,CAAA;;GAL5C,sBAAsB,CA2BlC"}