@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
@@ -8,26 +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
- var __rest = (this && this.__rest) || function (s, e) {
21
- var t = {};
22
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
23
- t[p] = s[p];
24
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
25
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
26
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
27
- t[p[i]] = s[p[i]];
28
- }
29
- return t;
30
- };
31
11
  Object.defineProperty(exports, "__esModule", { value: true });
32
12
  exports.GenerateFilesTask = void 0;
33
13
  const RouteTypeEnums_1 = require("../../../../../helpers/RouteTypeEnums");
@@ -61,109 +41,107 @@ class GenerateFilesTask extends workers_1.AbstractEmptyTask {
61
41
  this.alertsGenerator = new AlertsGenerator_1.AlertsGenerator(this.gtfsRtRedisRepository, vymiEventsRepository, vymiRoutesRepository);
62
42
  this.vehicleDescriptor = new VehicleDescriptor_1.VehicleDescriptor();
63
43
  }
64
- execute() {
65
- return __awaiter(this, void 0, void 0, function* () {
66
- const startDateTime = new Date();
67
- const tripData = yield this.tripsRepository.findAllForGTFSRt(startDateTime);
68
- const feedHeader = this.createFeedHeader();
69
- const updatesMessage = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedMessage.create({ header: feedHeader });
70
- const positionsMessage = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedMessage.create({ header: feedHeader });
71
- const pidFeedMessage = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedMessage.create({ header: feedHeader });
72
- const stopTimesIds = [];
73
- for (const tripRecord of tripData) {
74
- const { id } = this.vehicleDescriptor.getVehicleDescriptor(tripRecord);
75
- if (typeof id === "string") {
76
- stopTimesIds.push(`${id}-${tripRecord.gtfs_trip_id}`);
77
- }
44
+ async execute() {
45
+ const startDateTime = new Date();
46
+ const tripData = await this.tripsRepository.findAllForGTFSRt(startDateTime);
47
+ const feedHeader = this.createFeedHeader();
48
+ const updatesMessage = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedMessage.create({ header: feedHeader });
49
+ const positionsMessage = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedMessage.create({ header: feedHeader });
50
+ const pidFeedMessage = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedMessage.create({ header: feedHeader });
51
+ const stopTimesIds = [];
52
+ for (const tripRecord of tripData) {
53
+ const { id } = this.vehicleDescriptor.getVehicleDescriptor(tripRecord);
54
+ if (typeof id === "string") {
55
+ stopTimesIds.push(`${id}-${tripRecord.gtfs_trip_id}`);
78
56
  }
79
- if (stopTimesIds.length === 0) {
80
- this.logger.warn("No stop time ids found for GTFS-RT generation. Most likely no vehicles are running.");
81
- return;
57
+ }
58
+ if (stopTimesIds.length === 0) {
59
+ this.logger.warn("No stop time ids found for GTFS-RT generation. Most likely no vehicles are running.");
60
+ return;
61
+ }
62
+ const stopTimes = await this.stopTimeRepository.getPublicStopTimeCache(stopTimesIds);
63
+ const gtfsTripIdMap = {};
64
+ const entityTripStarts = [];
65
+ for (const tripRecord of tripData) {
66
+ let tripUpdateFeedEntity = undefined;
67
+ let feedMessageEntity = undefined;
68
+ const vehicleDescriptor = this.vehicleDescriptor.getVehicleDescriptor(tripRecord);
69
+ const entityTimestamp = Math.round(new Date(tripRecord.last_position.origin_timestamp).getTime() / 1000);
70
+ if (tripRecord.last_position.is_canceled && !gtfsTripIdMap[tripRecord.gtfs_trip_id]) {
71
+ tripUpdateFeedEntity = this.handleCanceledTrip(tripRecord, entityTimestamp, updatesMessage);
72
+ gtfsTripIdMap[tripRecord.gtfs_trip_id] = true;
73
+ // For canceled trips we don't want to create positions because they have lng 0 and lat 0
82
74
  }
83
- const stopTimes = yield this.stopTimeRepository.getPublicStopTimeCache(stopTimesIds);
84
- const gtfsTripIdMap = {};
85
- const entityTripStarts = [];
86
- for (const tripRecord of tripData) {
87
- let tripUpdateFeedEntity = undefined;
88
- let feedMessageEntity = undefined;
89
- const vehicleDescriptor = this.vehicleDescriptor.getVehicleDescriptor(tripRecord);
90
- const entityTimestamp = Math.round(new Date(tripRecord.last_position.origin_timestamp).getTime() / 1000);
91
- if (tripRecord.last_position.is_canceled && !gtfsTripIdMap[tripRecord.gtfs_trip_id]) {
92
- tripUpdateFeedEntity = this.handleCanceledTrip(tripRecord, entityTimestamp, updatesMessage);
93
- gtfsTripIdMap[tripRecord.gtfs_trip_id] = true;
94
- // For canceled trips we don't want to create positions because they have lng 0 and lat 0
75
+ else {
76
+ const tripDescriptor = {
77
+ scheduleRelationship: ovapi_gtfs_realtime_bindings_1.transit_realtime.TripDescriptor.ScheduleRelationship.SCHEDULED,
78
+ startDate: this.parseUTCDateFromISO(tripRecord.start_timestamp),
79
+ startTime: tripRecord.start_time,
80
+ tripId: tripRecord.gtfs_trip_id,
81
+ routeId: tripRecord.gtfs_route_id,
82
+ };
83
+ let stopTimeUpdates = [];
84
+ if (typeof vehicleDescriptor.id === "string") {
85
+ const stopTimesForVehicle = stopTimes.get(`${vehicleDescriptor.id}-${tripRecord.gtfs_trip_id}`);
86
+ stopTimeUpdates = this.generateStopTimeUpdate(tripRecord.gtfs_route_type, stopTimesForVehicle, tripRecord.last_position);
95
87
  }
96
88
  else {
97
- const tripDescriptor = {
98
- scheduleRelationship: ovapi_gtfs_realtime_bindings_1.transit_realtime.TripDescriptor.ScheduleRelationship.SCHEDULED,
99
- startDate: this.parseUTCDateFromISO(tripRecord.start_timestamp),
100
- startTime: tripRecord.start_time,
101
- tripId: tripRecord.gtfs_trip_id,
102
- routeId: tripRecord.gtfs_route_id,
103
- };
104
- let stopTimeUpdates = [];
105
- if (typeof vehicleDescriptor.id === "string") {
106
- const stopTimesForVehicle = stopTimes.get(`${vehicleDescriptor.id}-${tripRecord.gtfs_trip_id}`);
107
- stopTimeUpdates = this.generateStopTimeUpdate(tripRecord.gtfs_route_type, stopTimesForVehicle, tripRecord.last_position);
108
- }
109
- else {
110
- this.logger.error(new golemio_errors_1.GeneralError(`Cannot get stopTimeUpdates for trip with unknown vehicleId and gtfsTripId \
89
+ this.logger.error(new golemio_errors_1.GeneralError(`Cannot get stopTimeUpdates for trip with unknown vehicleId and gtfsTripId \
111
90
  '${tripRecord.gtfs_trip_id}'`, this.constructor.name, undefined, undefined, "pid"));
112
- }
113
- const shouldSkipTripUpdate = stopTimeUpdates.every((el) => el.scheduleRelationship === ovapi_gtfs_realtime_bindings_1.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.NO_DATA ||
114
- gtfsTripIdMap[tripRecord.gtfs_trip_id]);
115
- entityTripStarts.push(tripRecord.start_timestamp);
116
- const positionEntity = {
117
- id: tripRecord.id,
118
- vehicle: {
119
- currentStopSequence: tripRecord.last_position.last_stop_sequence,
120
- position: {
121
- bearing: tripRecord.last_position.bearing,
122
- latitude: tripRecord.last_position.lat,
123
- longitude: tripRecord.last_position.lng,
124
- speed: tripRecord.last_position.speed &&
125
- parseFloat((tripRecord.last_position.speed / const_2.MPS_TO_KMH).toFixed(2)),
126
- },
127
- timestamp: entityTimestamp,
128
- trip: tripDescriptor,
129
- vehicle: vehicleDescriptor,
91
+ }
92
+ const shouldSkipTripUpdate = stopTimeUpdates.every((el) => el.scheduleRelationship === ovapi_gtfs_realtime_bindings_1.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.NO_DATA ||
93
+ gtfsTripIdMap[tripRecord.gtfs_trip_id]);
94
+ entityTripStarts.push(tripRecord.start_timestamp);
95
+ const positionEntity = {
96
+ id: tripRecord.id,
97
+ vehicle: {
98
+ currentStopSequence: tripRecord.last_position.last_stop_sequence,
99
+ position: {
100
+ bearing: tripRecord.last_position.bearing,
101
+ latitude: tripRecord.last_position.lat,
102
+ longitude: tripRecord.last_position.lng,
103
+ speed: tripRecord.last_position.speed &&
104
+ parseFloat((tripRecord.last_position.speed / const_2.MPS_TO_KMH).toFixed(2)),
130
105
  },
106
+ timestamp: entityTimestamp,
107
+ trip: tripDescriptor,
108
+ vehicle: vehicleDescriptor,
109
+ },
110
+ };
111
+ const positionsMessageEntity = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedEntity.fromObject(positionEntity);
112
+ positionsMessage.entity.push(positionsMessageEntity);
113
+ feedMessageEntity = structuredClone(positionsMessageEntity);
114
+ if (!shouldSkipTripUpdate) {
115
+ const tripUpdate = {
116
+ stopTimeUpdate: stopTimeUpdates,
117
+ timestamp: entityTimestamp,
118
+ trip: tripDescriptor,
119
+ vehicle: vehicleDescriptor,
131
120
  };
132
- const positionsMessageEntity = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedEntity.fromObject(positionEntity);
133
- positionsMessage.entity.push(positionsMessageEntity);
134
- feedMessageEntity = structuredClone(positionsMessageEntity);
135
- if (!shouldSkipTripUpdate) {
136
- const tripUpdate = {
137
- stopTimeUpdate: stopTimeUpdates,
138
- timestamp: entityTimestamp,
139
- trip: tripDescriptor,
140
- vehicle: vehicleDescriptor,
141
- };
142
- const updateEntity = {
143
- id: tripRecord.id,
144
- tripUpdate,
145
- };
146
- const updatesMessageEntity = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedEntity.fromObject(updateEntity);
147
- updatesMessage.entity.push(updatesMessageEntity);
148
- gtfsTripIdMap[tripRecord.gtfs_trip_id] = true;
149
- feedMessageEntity.tripUpdate = tripUpdate;
150
- }
151
- }
152
- if (feedMessageEntity) {
153
- pidFeedMessage.entity.push(feedMessageEntity);
154
- }
155
- else if (tripUpdateFeedEntity) {
156
- // If the trip is canceled we want to update just the trip without positions
157
- pidFeedMessage.entity.push(tripUpdateFeedEntity);
121
+ const updateEntity = {
122
+ id: tripRecord.id,
123
+ tripUpdate,
124
+ };
125
+ const updatesMessageEntity = ovapi_gtfs_realtime_bindings_1.transit_realtime.FeedEntity.fromObject(updateEntity);
126
+ updatesMessage.entity.push(updatesMessageEntity);
127
+ gtfsTripIdMap[tripRecord.gtfs_trip_id] = true;
128
+ feedMessageEntity.tripUpdate = tripUpdate;
158
129
  }
159
130
  }
160
- this.removeDuplicateVehicleDescriptors(positionsMessage, entityTripStarts);
161
- this.removeDuplicateVehicleDescriptors(pidFeedMessage, entityTripStarts, { shouldRemoveVehicleOnly: true });
162
- this.validateAndSaveBuffer("trip_updates", updatesMessage);
163
- this.validateAndSaveBuffer("vehicle_positions", positionsMessage);
164
- this.validateAndSaveBuffer("pid_feed", pidFeedMessage);
165
- yield this.alertsGenerator.generateAlerts(feedHeader);
166
- });
131
+ if (feedMessageEntity) {
132
+ pidFeedMessage.entity.push(feedMessageEntity);
133
+ }
134
+ else if (tripUpdateFeedEntity) {
135
+ // If the trip is canceled we want to update just the trip without positions
136
+ pidFeedMessage.entity.push(tripUpdateFeedEntity);
137
+ }
138
+ }
139
+ this.removeDuplicateVehicleDescriptors(positionsMessage, entityTripStarts);
140
+ this.removeDuplicateVehicleDescriptors(pidFeedMessage, entityTripStarts, { shouldRemoveVehicleOnly: true });
141
+ this.validateAndSaveBuffer("trip_updates", updatesMessage);
142
+ this.validateAndSaveBuffer("vehicle_positions", positionsMessage);
143
+ this.validateAndSaveBuffer("pid_feed", pidFeedMessage);
144
+ await this.alertsGenerator.generateAlerts(feedHeader);
167
145
  }
168
146
  /**
169
147
  * Get rid of vehicle descriptors with duplicate IDs from a given GTFS-RT message
@@ -178,7 +156,6 @@ class GenerateFilesTask extends workers_1.AbstractEmptyTask {
178
156
  removeDuplicateVehicleDescriptors(message, entityTripStarts, options = {
179
157
  shouldRemoveVehicleOnly: false,
180
158
  }) {
181
- var _a, _b, _c;
182
159
  if (!message.entity) {
183
160
  return;
184
161
  }
@@ -187,7 +164,7 @@ class GenerateFilesTask extends workers_1.AbstractEmptyTask {
187
164
  const entityWithTripStartByVehicleId = new Map();
188
165
  for (let i = 0; i < message.entity.length; i++) {
189
166
  const entity = message.entity[i];
190
- const vehicleId = (_c = (_b = (_a = entity.vehicle) === null || _a === void 0 ? void 0 : _a.vehicle) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : null;
167
+ const vehicleId = entity.vehicle?.vehicle?.id ?? null;
191
168
  const entityTripStart = new Date(entityTripStarts[i]);
192
169
  if (vehicleId === null) {
193
170
  entitiesWithoutVehicleId.push(entity);
@@ -198,7 +175,7 @@ class GenerateFilesTask extends workers_1.AbstractEmptyTask {
198
175
  else {
199
176
  const unusedEntity = this.conditionallyUpdateEntityByVehicleId(entityWithTripStartByVehicleId, vehicleId, entity, entityTripStart);
200
177
  if (options.shouldRemoveVehicleOnly) {
201
- const { vehicle = null } = unusedEntity, entityWithoutVehicle = __rest(unusedEntity, ["vehicle"]);
178
+ const { vehicle = null, ...entityWithoutVehicle } = unusedEntity;
202
179
  if (Object.keys(entityWithoutVehicle).find((key) => key !== "id")) {
203
180
  entitiesWithoutTheirDuplicateVehicle.push(entityWithoutVehicle);
204
181
  }
@@ -220,9 +197,8 @@ class GenerateFilesTask extends workers_1.AbstractEmptyTask {
220
197
  * @param entityTripStart The entity trip start date/time to use as part of the new value, if the conditions are met
221
198
  */
222
199
  conditionallyUpdateEntityByVehicleId(entityWithTripStartByVehicleId, vehicleId, entity, entityTripStart) {
223
- var _a, _b, _c;
224
200
  const mapItem = entityWithTripStartByVehicleId.get(vehicleId);
225
- const entityTripScheduleRelationship = (_c = (_b = (_a = entity.vehicle) === null || _a === void 0 ? void 0 : _a.trip) === null || _b === void 0 ? void 0 : _b.scheduleRelationship) !== null && _c !== void 0 ? _c : null;
201
+ const entityTripScheduleRelationship = entity.vehicle?.trip?.scheduleRelationship ?? null;
226
202
  if (entityTripScheduleRelationship !== ovapi_gtfs_realtime_bindings_1.transit_realtime.TripDescriptor.ScheduleRelationship.CANCELED &&
227
203
  entityTripStart < mapItem.entityTripStart) {
228
204
  entityWithTripStartByVehicleId.set(vehicleId, { entity, entityTripStart });
@@ -231,7 +207,6 @@ class GenerateFilesTask extends workers_1.AbstractEmptyTask {
231
207
  return entity;
232
208
  }
233
209
  generateStopTimeUpdate(routeType, stopTimes, vehiclePosition) {
234
- var _a, _b;
235
210
  const stopTimeUpdates = [];
236
211
  // TODO this is a temporary solution, we need to fix the underlying issue in the source view
237
212
  // v_public_vehiclepositions_combined_stop_times, the delay prediction is seemingly not working properly
@@ -243,16 +218,26 @@ class GenerateFilesTask extends workers_1.AbstractEmptyTask {
243
218
  if (routeType === RouteTypeEnums_1.GTFSRouteTypeEnum.TRAIN) {
244
219
  actualTrack = stopTime.cis_stop_platform_code;
245
220
  }
246
- const arrivalDelay = shouldFallbackToScheduleTime ? 0 : (_a = stopTime.arr_delay) !== null && _a !== void 0 ? _a : stopTime.dep_delay;
247
- const departureDelay = shouldFallbackToScheduleTime ? 0 : (_b = stopTime.dep_delay) !== null && _b !== void 0 ? _b : stopTime.arr_delay;
248
- stopTimeUpdates.push(Object.assign(Object.assign({ arrival: {
221
+ const arrivalDelay = shouldFallbackToScheduleTime ? 0 : stopTime.arr_delay ?? stopTime.dep_delay;
222
+ const departureDelay = shouldFallbackToScheduleTime ? 0 : stopTime.dep_delay ?? stopTime.arr_delay;
223
+ stopTimeUpdates.push({
224
+ arrival: {
249
225
  delay: arrivalDelay,
250
- }, departure: {
226
+ },
227
+ departure: {
251
228
  delay: departureDelay,
252
- } }, (arrivalDelay === null &&
253
- departureDelay === null && {
254
- scheduleRelationship: ovapi_gtfs_realtime_bindings_1.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.NO_DATA,
255
- })), { stopSequence: stopTime.sequence, stopId: stopTime.stop_id, ".transit_realtime.ovapiStopTimeUpdate": Object.assign(Object.assign({}, (scheduledTrack && { scheduledTrack })), (actualTrack && { actualTrack })) }));
229
+ },
230
+ ...(arrivalDelay === null &&
231
+ departureDelay === null && {
232
+ scheduleRelationship: ovapi_gtfs_realtime_bindings_1.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.NO_DATA,
233
+ }),
234
+ stopSequence: stopTime.sequence,
235
+ stopId: stopTime.stop_id,
236
+ ".transit_realtime.ovapiStopTimeUpdate": {
237
+ ...(scheduledTrack && { scheduledTrack }),
238
+ ...(actualTrack && { actualTrack }),
239
+ },
240
+ });
256
241
  }
257
242
  return stopTimeUpdates;
258
243
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GenerateFilesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0EAA4D;AAC5D,uDAAkF;AAClF,wCAA2D;AAC3D,oEAA8E;AAC9E,yFAA8G;AAI9G,wEAAqE;AAErE,mEAA2E;AAC3E,2EAAkF;AAClF,oIAAiI;AACjI,+GAA4G;AAC5G,6EAAwE;AACxE,wFAAyF;AACzF,gDAA8C;AAE9C,gFAA6E;AAC7E,gEAA6D;AAC7D,oEAAiE;AACjE,4CAA8C;AAK9C,MAAa,iBAAkB,SAAQ,2BAAiB;IAapD,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAXP,cAAS,GAAG,eAAe,CAAC;QAC5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,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvC,OAAO,UAAU,CAAC;IACtB,CAAC;;AA7WL,8CA8WC;AA7W2B,wBAAM,GAAkB,gBAAW,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,AAA5E,CAA6E;AAmC3F;IAPf,qCAAiB,CAAC,KAAK,CACpB,IAAI,yDAA2B,CAC3B,MAAM,CAAC,MAAM,CACT,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAyB,yCAAyC,EAAE,EAAE,CAAC,CAC3G,CACJ,CACJ;;;;gDAiIA"}
1
+ {"version":3,"file":"GenerateFilesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0EAA4D;AAC5D,uDAAkF;AAClF,wCAA2D;AAC3D,oEAA8E;AAC9E,yFAA8G;AAI9G,wEAAqE;AAErE,mEAA2E;AAC3E,2EAAkF;AAClF,oIAAiI;AACjI,+GAA4G;AAC5G,6EAAwE;AACxE,wFAAyF;AACzF,gDAA8C;AAE9C,gFAA6E;AAC7E,gEAA6D;AAC7D,oEAAiE;AACjE,4CAA8C;AAK9C,MAAa,iBAAkB,SAAQ,2BAAiB;IAapD,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAXP,cAAS,GAAG,eAAe,CAAC;QAC5B,aAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QAW/C,IAAI,CAAC,MAAM,GAAG,gBAAW,CAAC,OAAO,CAAU,oBAAc,CAAC,MAAM,CAAC,CAAC;QAElE,IAAI,CAAC,kBAAkB,GAAG,gBAAW,CAAC,OAAO,CACzC,mCAAgB,CAAC,6BAA6B,CACjD,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;QAC7C,IAAI,CAAC,qBAAqB,GAAG,IAAI,6CAAqB,EAAE,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 +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.AlertsTransformation = void 0;
13
4
  const HTMLUtils_1 = require("../../../../shared/HTMLUtils");
@@ -17,22 +8,21 @@ const AlertEffectMapper_1 = require("../helpers/AlertEffectMapper");
17
8
  class AlertsTransformation extends transformations_1.BaseTransformation {
18
9
  constructor(eventsRoutesModel) {
19
10
  super();
20
- this.transform = (alertEntities) => __awaiter(this, void 0, void 0, function* () {
11
+ this.transform = async (alertEntities) => {
21
12
  const transformedEntities = [];
22
13
  for (const alertEntity of alertEntities) {
23
- transformedEntities.push(yield this.transformElement(alertEntity));
14
+ transformedEntities.push(await this.transformElement(alertEntity));
24
15
  }
25
16
  return transformedEntities;
26
- });
27
- this.transformElement = (alertEntity) => __awaiter(this, void 0, void 0, function* () {
28
- var _a, _b;
17
+ };
18
+ this.transformElement = async (alertEntity) => {
29
19
  return {
30
20
  id: `alert-${alertEntity.vymi_id}-${alertEntity.vymi_id_dtb}`,
31
21
  alert: {
32
22
  activePeriod: [this.getActivePeriod(alertEntity)],
33
- informedEntity: yield this.getAffectedRoutes(alertEntity),
34
- cause: (0, AlertCauseMapper_1.getGtfsCause)((_a = alertEntity.cause) !== null && _a !== void 0 ? _a : ""),
35
- effect: (0, AlertEffectMapper_1.getGtfsEffectByEventType)(Number((_b = alertEntity.event_type) !== null && _b !== void 0 ? _b : 0)),
23
+ informedEntity: await this.getAffectedRoutes(alertEntity),
24
+ cause: (0, AlertCauseMapper_1.getGtfsCause)(alertEntity.cause ?? ""),
25
+ effect: (0, AlertEffectMapper_1.getGtfsEffectByEventType)(Number(alertEntity.event_type ?? 0)),
36
26
  url: {
37
27
  translation: [
38
28
  {
@@ -59,13 +49,12 @@ class AlertsTransformation extends transformations_1.BaseTransformation {
59
49
  },
60
50
  },
61
51
  };
62
- });
52
+ };
63
53
  this.getDescription = (alertEntity) => {
64
- var _a, _b, _c;
65
54
  const description = [
66
- (_a = HTMLUtils_1.HTMLUtils.outputPlainText(alertEntity.description)) !== null && _a !== void 0 ? _a : "",
67
- (_b = HTMLUtils_1.HTMLUtils.outputPlainText(alertEntity.dpp_action)) !== null && _b !== void 0 ? _b : "",
68
- (_c = HTMLUtils_1.HTMLUtils.outputPlainText(alertEntity.ropid_action)) !== null && _c !== void 0 ? _c : "",
55
+ HTMLUtils_1.HTMLUtils.outputPlainText(alertEntity.description) ?? "",
56
+ HTMLUtils_1.HTMLUtils.outputPlainText(alertEntity.dpp_action) ?? "",
57
+ HTMLUtils_1.HTMLUtils.outputPlainText(alertEntity.ropid_action) ?? "",
69
58
  ];
70
59
  return description.join(" ").replaceAll("\n", " ").trim();
71
60
  };
@@ -83,18 +72,15 @@ class AlertsTransformation extends transformations_1.BaseTransformation {
83
72
  this.name = "GtfsRtAlertTransformation";
84
73
  this.eventsRoutesModel = eventsRoutesModel;
85
74
  }
86
- getAffectedRoutes(alertEntity) {
87
- var _a;
88
- return __awaiter(this, void 0, void 0, function* () {
89
- const affectedRotues = yield this.eventsRoutesModel.findByEventId(alertEntity.vymi_id);
90
- const routeNames = [];
91
- for (const route of affectedRotues) {
92
- routeNames.push({
93
- routeId: (_a = route.gtfs_route_id) !== null && _a !== void 0 ? _a : route.name,
94
- });
95
- }
96
- return routeNames;
97
- });
75
+ async getAffectedRoutes(alertEntity) {
76
+ const affectedRotues = await this.eventsRoutesModel.findByEventId(alertEntity.vymi_id);
77
+ const routeNames = [];
78
+ for (const route of affectedRotues) {
79
+ routeNames.push({
80
+ routeId: route.gtfs_route_id ?? route.name,
81
+ });
82
+ }
83
+ return routeNames;
98
84
  }
99
85
  }
100
86
  exports.AlertsTransformation = AlertsTransformation;
@@ -1 +1 @@
1
- {"version":3,"file":"AlertsTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4DAAiD;AAEjD,2FAA4G;AAC5G,kEAA2D;AAC3D,oEAAwE;AAGxE,MAAa,oBAAqB,SAAQ,oCAAkB;IAIxD,YAAY,iBAA6C;QACrD,KAAK,EAAE,CAAC;QAKL,cAAS,GAAG,CAAO,aAAsC,EAA2B,EAAE;YACzF,MAAM,mBAAmB,GAAmB,EAAE,CAAC;YAC/C,KAAK,MAAM,WAAW,IAAI,aAAa,EAAE;gBACrC,mBAAmB,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;aACtE;YACD,OAAO,mBAAmB,CAAC;QAC/B,CAAC,CAAA,CAAC;QAEK,qBAAgB,GAAG,CAAO,WAAkC,EAAyB,EAAE;;YAC1F,OAAO;gBACH,EAAE,EAAE,SAAS,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,WAAW,EAAE;gBAC7D,KAAK,EAAE;oBACH,YAAY,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;oBACjD,cAAc,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC;oBACzD,KAAK,EAAE,IAAA,+BAAY,EAAC,MAAA,WAAW,CAAC,KAAK,mCAAI,EAAE,CAAC;oBAC5C,MAAM,EAAE,IAAA,4CAAwB,EAAC,MAAM,CAAC,MAAA,WAAW,CAAC,UAAU,mCAAI,CAAC,CAAC,CAAC;oBACrE,GAAG,EAAE;wBACD,WAAW,EAAE;4BACT;gCACI,IAAI,EAAE,kC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C,CAAC,OAAO,EAAE,GAAG,IAAI;aAC9D,CAAC;QACN,CAAC,CAAC;QAnEE,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;IAmEY,iBAAiB,CAAC,WAAkC;;;YAC7D,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACvF,MAAM,UAAU,GAA0B,EAAE,CAAC;YAC7C,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE;gBAChC,UAAU,CAAC,IAAI,CAAC;oBACZ,OAAO,EAAE,MAAA,KAAK,CAAC,aAAa,mCAAI,KAAK,CAAC,IAAI;iBAC7C,CAAC,CAAC;aACN;YACD,OAAO,UAAU,CAAC;;KACrB;CACJ;AArFD,oDAqFC"}
1
+ {"version":3,"file":"AlertsTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.ts"],"names":[],"mappings":";;;AACA,4DAAiD;AAEjD,2FAA4G;AAC5G,kEAA2D;AAC3D,oEAAwE;AAGxE,MAAa,oBAAqB,SAAQ,oCAAkB;IAIxD,YAAY,iBAA6C;QACrD,KAAK,EAAE,CAAC;QAKL,cAAS,GAAG,KAAK,EAAE,aAAsC,EAA2B,EAAE;YACzF,MAAM,mBAAmB,GAAmB,EAAE,CAAC;YAC/C,KAAK,MAAM,WAAW,IAAI,aAAa,EAAE;gBACrC,mBAAmB,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;aACtE;YACD,OAAO,mBAAmB,CAAC;QAC/B,CAAC,CAAC;QAEK,qBAAgB,GAAG,KAAK,EAAE,WAAkC,EAAyB,EAAE;YAC1F,OAAO;gBACH,EAAE,EAAE,SAAS,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,WAAW,EA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AAG,CAAC,WAAkC,EAAiB,EAAE;YAC3E,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE;gBAC9B,OAAO;oBACH,KAAK,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI;iBAC1D,CAAC;aACL;YACD,OAAO;gBACH,KAAK,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI;gBACvD,GAAG,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI;aAC9D,CAAC;QACN,CAAC,CAAC;QAnEE,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;IAmEM,KAAK,CAAC,iBAAiB,CAAC,WAAkC;QAC7D,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACvF,MAAM,UAAU,GAA0B,EAAE,CAAC;QAC7C,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE;YAChC,UAAU,CAAC,IAAI,CAAC;gBACZ,OAAO,EAAE,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,IAAI;aAC7C,CAAC,CAAC;SACN;QACD,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AArFD,oDAqFC"}
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
25
  Object.defineProperty(exports, "__esModule", { value: true });
35
26
  exports.AbstractRunRepository = void 0;
36
27
  const models_1 = require("@golemio/core/dist/integration-engine/models");
@@ -39,9 +30,9 @@ const sequelize_1 = __importStar(require("@golemio/core/dist/shared/sequelize"))
39
30
  class AbstractRunRepository extends models_1.PostgresModel {
40
31
  constructor() {
41
32
  super(...arguments);
42
- this.deleteNHoursOldData = (hours, columnToCheck) => __awaiter(this, void 0, void 0, function* () {
33
+ this.deleteNHoursOldData = async (hours, columnToCheck) => {
43
34
  try {
44
- return yield this.sequelizeModel.destroy({
35
+ return await this.sequelizeModel.destroy({
45
36
  where: {
46
37
  [columnToCheck]: {
47
38
  [sequelize_1.Op.lt]: sequelize_1.default.literal(`NOW() - INTERVAL '${hours} HOURS'`),
@@ -52,7 +43,7 @@ class AbstractRunRepository extends models_1.PostgresModel {
52
43
  catch (err) {
53
44
  throw new golemio_errors_1.GeneralError("Error while purging old data", this.constructor.name, err);
54
45
  }
55
- });
46
+ };
56
47
  }
57
48
  }
58
49
  exports.AbstractRunRepository = AbstractRunRepository;
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractRunRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAA6E;AAC7E,6EAAwE;AACxE,iFAAoE;AAEpE,MAAsB,qBAAsB,SAAQ,sBAAa;IAAjE;;QACW,wBAAmB,GAAG,CAAO,KAAa,EAAE,aAAqB,EAAmB,EAAE;YACzF,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBACrC,KAAK,EAAE;wBACH,CAAC,aAAa,CAAC,EAAE;4BACb,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,mBAAS,CAAC,OAAO,CAAC,qBAAqB,KAAK,SAAS,CAAC;yBAClE;qBACJ;iBACJ,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACtF;QACL,CAAC,CAAA,CAAC;IACN,CAAC;CAAA;AAdD,sDAcC"}
1
+ {"version":3,"file":"AbstractRunRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAA6E;AAC7E,6EAAwE;AACxE,iFAAoE;AAEpE,MAAsB,qBAAsB,SAAQ,sBAAa;IAAjE;;QACW,wBAAmB,GAAG,KAAK,EAAE,KAAa,EAAE,aAAqB,EAAmB,EAAE;YACzF,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBACrC,KAAK,EAAE;wBACH,CAAC,aAAa,CAAC,EAAE;4BACb,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,mBAAS,CAAC,OAAO,CAAC,qBAAqB,KAAK,SAAS,CAAC;yBAClE;qBACJ;iBACJ,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACtF;QACL,CAAC,CAAC;IACN,CAAC;CAAA;AAdD,sDAcC"}
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
25
  Object.defineProperty(exports, "__esModule", { value: true });
35
26
  exports.CommonRunsMessagesRepository = void 0;
36
27
  const const_1 = require("../../../../../schema-definitions/const");
@@ -54,8 +45,8 @@ class CommonRunsMessagesRepository extends models_2.PostgresModel {
54
45
  ],
55
46
  },
56
47
  }, new golemio_validator_1.JSONSchemaValidator("CommonRunsMessagesRepositoryValidator", models_1.CommonRunsMessagesModel.arrayJsonSchema));
57
- this.getLastMessage = (runId) => __awaiter(this, void 0, void 0, function* () {
58
- const result = yield this.find({
48
+ this.getLastMessage = async (runId) => {
49
+ const result = await this.find({
59
50
  where: {
60
51
  runs_id: runId,
61
52
  msg_timestamp: {
@@ -67,7 +58,7 @@ class CommonRunsMessagesRepository extends models_2.PostgresModel {
67
58
  raw: true,
68
59
  });
69
60
  return result && result.length === 1 ? result[0] : undefined;
70
- });
61
+ };
71
62
  }
72
63
  }
73
64
  exports.CommonRunsMessagesRepository = CommonRunsMessagesRepository;
@@ -1 +1 @@
1
- {"version":3,"file":"CommonRunsMessagesRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAuC;AACvC,uFAAwE;AACxE,yEAAqF;AACrF,mFAAkF;AAClF,iFAAoE;AAEpE,MAAa,4BAA6B,SAAQ,sBAAa;IAY3D;QACI,KAAK,CACD,8BAA8B,EAC9B;YACI,WAAW,EAAE,gCAAuB,CAAC,UAAU;YAC/C,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,gCAAuB,CAAC,cAAc;YACjE,UAAU,EAAE,YAAY;YACxB,2BAA2B,EAAE;gBACzB,OAAO,EAAE;oBACL;wBACI,MAAM,EAAE,CAAC,IAAI,CAAC;wBACd,IAAI,EAAE,qCAAqC;qBAC9C;iBACJ;aACJ;SACJ,EACD,IAAI,uCAAmB,CAAC,uCAAuC,EAAE,gCAAuB,CAAC,eAAe,CAAC,CAC5G,CAAC;QAGC,mBAAc,GAAG,CAAO,KAAa,EAAE,EAAE;YAC5C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC;gBAC3B,KAAK,EAAE;oBACH,OAAO,EAAE,KAAK;oBACd,aAAa,EAAE;wBACX,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,mBAAS,CAAC,OAAO,CAAC,4BAA4B,CAAC;qBAC3D;iBACJ;gBACD,KAAK,EAAE,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;gBAClC,KAAK,EAAE,CAAC;gBACR,GAAG,EAAE,IAAI;aACZ,CAAC,CAAC;YACH,OAAO,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACjE,CAAC,CAAA,CAAC;IAfF,CAAC;CAgBJ;AA/CD,oEA+CC"}
1
+ {"version":3,"file":"CommonRunsMessagesRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAuC;AACvC,uFAAwE;AACxE,yEAAqF;AACrF,mFAAkF;AAClF,iFAAoE;AAEpE,MAAa,4BAA6B,SAAQ,sBAAa;IAY3D;QACI,KAAK,CACD,8BAA8B,EAC9B;YACI,WAAW,EAAE,gCAAuB,CAAC,UAAU;YAC/C,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,gCAAuB,CAAC,cAAc;YACjE,UAAU,EAAE,YAAY;YACxB,2BAA2B,EAAE;gBACzB,OAAO,EAAE;oBACL;wBACI,MAAM,EAAE,CAAC,IAAI,CAAC;wBACd,IAAI,EAAE,qCAAqC;qBAC9C;iBACJ;aACJ;SACJ,EACD,IAAI,uCAAmB,CAAC,uCAAuC,EAAE,gCAAuB,CAAC,eAAe,CAAC,CAC5G,CAAC;QAGC,mBAAc,GAAG,KAAK,EAAE,KAAa,EAAE,EAAE;YAC5C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC;gBAC3B,KAAK,EAAE;oBACH,OAAO,EAAE,KAAK;oBACd,aAAa,EAAE;wBACX,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,mBAAS,CAAC,OAAO,CAAC,4BAA4B,CAAC;qBAC3D;iBACJ;gBACD,KAAK,EAAE,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;gBAClC,KAAK,EAAE,CAAC;gBACR,GAAG,EAAE,IAAI;aACZ,CAAC,CAAC;YACH,OAAO,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACjE,CAAC,CAAC;IAfF,CAAC;CAgBJ;AA/CD,oEA+CC"}