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