@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,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
11
  var PublicApiCacheRepository_1;
21
12
  Object.defineProperty(exports, "__esModule", { value: true });
22
13
  exports.PublicApiCacheRepository = void 0;
@@ -35,84 +26,78 @@ let PublicApiCacheRepository = exports.PublicApiCacheRepository = PublicApiCache
35
26
  }, new golemio_validator_1.JSONSchemaValidator("PublicApiCacheRepository", PublicApiCacheDtoSchema_1.PublicApiCacheDtoSchema));
36
27
  this.CACHE_TTL = 1 * 60; // 1 minute
37
28
  }
38
- geoadd(data, futureData, canceledData) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- try {
41
- yield this.validator.Validate(data);
29
+ async geoadd(data, futureData, canceledData) {
30
+ try {
31
+ await this.validator.Validate(data);
32
+ }
33
+ catch (err) {
34
+ throw new golemio_errors_1.GeneralError(`PublicApiCacheRepository: data validation failed: ${err.message}`, this.constructor.name, err);
35
+ }
36
+ const pipeline = this.connection.pipeline();
37
+ try {
38
+ const newSetKey = `${PublicApiCacheRepository_1.NAMESPACE_PREFIX}:${(0, node_crypto_1.randomBytes)(4).toString("hex")}`;
39
+ for (const item of data) {
40
+ // geo sorted set with vehicle ids (for quick lookup of vehicle ids in given area)
41
+ pipeline.geoadd(newSetKey, item.lng, item.lat, item.vehicle_id);
42
+ // list with vehicle ids for each trip (for quick lookup of vehicle ids for each trip)
43
+ pipeline.rpush(`${newSetKey}:trip-${item.gtfs_trip_id}`, item.vehicle_id);
44
+ pipeline.expire(`${newSetKey}:trip-${item.gtfs_trip_id}`, this.CACHE_TTL);
45
+ // vehicle data for each vehicle id (for quick lookup of vehicle data for each vehicle id)
46
+ pipeline.set(`${newSetKey}:vehicle-${item.vehicle_id}`, JSON.stringify(item), "EX", this.CACHE_TTL);
42
47
  }
43
- catch (err) {
44
- throw new golemio_errors_1.GeneralError(`PublicApiCacheRepository: data validation failed: ${err.message}`, this.constructor.name, err);
48
+ if (futureData.length > 0) {
49
+ await this.geoaddFuture(futureData, newSetKey, pipeline);
45
50
  }
46
- const pipeline = this.connection.pipeline();
47
- try {
48
- const newSetKey = `${PublicApiCacheRepository_1.NAMESPACE_PREFIX}:${(0, node_crypto_1.randomBytes)(4).toString("hex")}`;
49
- for (const item of data) {
50
- // geo sorted set with vehicle ids (for quick lookup of vehicle ids in given area)
51
- pipeline.geoadd(newSetKey, item.lng, item.lat, item.vehicle_id);
52
- // list with vehicle ids for each trip (for quick lookup of vehicle ids for each trip)
53
- pipeline.rpush(`${newSetKey}:trip-${item.gtfs_trip_id}`, item.vehicle_id);
54
- pipeline.expire(`${newSetKey}:trip-${item.gtfs_trip_id}`, this.CACHE_TTL);
55
- // vehicle data for each vehicle id (for quick lookup of vehicle data for each vehicle id)
56
- pipeline.set(`${newSetKey}:vehicle-${item.vehicle_id}`, JSON.stringify(item), "EX", this.CACHE_TTL);
57
- }
58
- if (futureData.length > 0) {
59
- yield this.geoaddFuture(futureData, newSetKey, pipeline);
60
- }
61
- if (canceledData.length > 0) {
62
- yield this.geoaddCanceled(canceledData, newSetKey, pipeline);
63
- }
64
- pipeline.expire(newSetKey, this.CACHE_TTL);
65
- yield pipeline.exec();
66
- return newSetKey;
51
+ if (canceledData.length > 0) {
52
+ await this.geoaddCanceled(canceledData, newSetKey, pipeline);
67
53
  }
68
- catch (err) {
69
- pipeline.quit();
70
- if (err instanceof golemio_errors_1.AbstractGolemioError) {
71
- throw err;
72
- }
73
- throw new golemio_errors_1.GeneralError("PublicApiCacheRepository: geoadd failed", err);
54
+ pipeline.expire(newSetKey, this.CACHE_TTL);
55
+ await pipeline.exec();
56
+ return newSetKey;
57
+ }
58
+ catch (err) {
59
+ pipeline.quit();
60
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
61
+ throw err;
74
62
  }
75
- });
63
+ throw new golemio_errors_1.GeneralError("PublicApiCacheRepository: geoadd failed", err);
64
+ }
76
65
  }
77
- geoaddFuture(futureData, newSetKey, pipeline) {
78
- return __awaiter(this, void 0, void 0, function* () {
79
- try {
80
- yield this.validator.Validate(futureData);
81
- }
82
- catch (err) {
83
- throw new golemio_errors_1.GeneralError(`PublicApiCacheRepository: future data validation failed: ${err.message}`, this.constructor.name, err);
84
- }
85
- try {
86
- for (const item of futureData) {
87
- // list with vehicle ids for future trips (for quick lookup of vehicle ids for each trip in the future)
88
- pipeline.rpush(`${newSetKey}:future-trip-${item.gtfs_trip_id}`, item.vehicle_id);
89
- pipeline.expire(`${newSetKey}:future-trip-${item.gtfs_trip_id}`, this.CACHE_TTL);
90
- // vehicle data for each vehicle id (for quick lookup of vehicle data for each vehicle id)
91
- pipeline.set(`${newSetKey}:future-vehicle-${item.vehicle_id}-${item.gtfs_trip_id}`, JSON.stringify(item), "EX", this.CACHE_TTL);
92
- }
93
- }
94
- catch (err) {
95
- throw new golemio_errors_1.GeneralError("PublicApiCacheRepository: geoaddFuture failed", err);
66
+ async geoaddFuture(futureData, newSetKey, pipeline) {
67
+ try {
68
+ await this.validator.Validate(futureData);
69
+ }
70
+ catch (err) {
71
+ throw new golemio_errors_1.GeneralError(`PublicApiCacheRepository: future data validation failed: ${err.message}`, this.constructor.name, err);
72
+ }
73
+ try {
74
+ for (const item of futureData) {
75
+ // list with vehicle ids for future trips (for quick lookup of vehicle ids for each trip in the future)
76
+ pipeline.rpush(`${newSetKey}:future-trip-${item.gtfs_trip_id}`, item.vehicle_id);
77
+ pipeline.expire(`${newSetKey}:future-trip-${item.gtfs_trip_id}`, this.CACHE_TTL);
78
+ // vehicle data for each vehicle id (for quick lookup of vehicle data for each vehicle id)
79
+ pipeline.set(`${newSetKey}:future-vehicle-${item.vehicle_id}-${item.gtfs_trip_id}`, JSON.stringify(item), "EX", this.CACHE_TTL);
96
80
  }
97
- });
81
+ }
82
+ catch (err) {
83
+ throw new golemio_errors_1.GeneralError("PublicApiCacheRepository: geoaddFuture failed", err);
84
+ }
98
85
  }
99
- geoaddCanceled(canceledData, newSetKey, pipeline) {
100
- return __awaiter(this, void 0, void 0, function* () {
101
- try {
102
- yield this.validator.Validate(canceledData);
103
- }
104
- catch (err) {
105
- throw new golemio_errors_1.GeneralError(`PublicApiCacheRepository: future data validation failed: ${err.message}`, this.constructor.name, err);
106
- }
107
- try {
108
- for (const item of canceledData) {
109
- pipeline.set(`${newSetKey}:canceled-trips-${item.gtfs_trip_id}`, JSON.stringify(item), "EX", this.CACHE_TTL);
110
- }
111
- }
112
- catch (err) {
113
- throw new golemio_errors_1.GeneralError("PublicApiCacheRepository: geoaddCanceled failed", err);
86
+ async geoaddCanceled(canceledData, newSetKey, pipeline) {
87
+ try {
88
+ await this.validator.Validate(canceledData);
89
+ }
90
+ catch (err) {
91
+ throw new golemio_errors_1.GeneralError(`PublicApiCacheRepository: future data validation failed: ${err.message}`, this.constructor.name, err);
92
+ }
93
+ try {
94
+ for (const item of canceledData) {
95
+ pipeline.set(`${newSetKey}:canceled-trips-${item.gtfs_trip_id}`, JSON.stringify(item), "EX", this.CACHE_TTL);
114
96
  }
115
- });
97
+ }
98
+ catch (err) {
99
+ throw new golemio_errors_1.GeneralError("PublicApiCacheRepository: geoaddCanceled failed", err);
100
+ }
116
101
  }
117
102
  };
118
103
  PublicApiCacheRepository.NAMESPACE_PREFIX = const_1.PUBLIC_CACHE_NAMESPACE_PREFIX;
@@ -1 +1 @@
1
- {"version":3,"file":"PublicApiCacheRepository.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,8FAAmF;AAEnF,0IAAuG;AACvG,wFAAqF;AACrF,6EAA8F;AAC9F,mFAAkF;AAClF,iEAAgE;AAEhE,6CAA0C;AAGnC,IAAM,wBAAwB,mEAA9B,MAAM,wBAAyB,SAAQ,uBAAU;IAIpD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,0BAAwB,CAAC,gBAAgB;SACpD,EACD,IAAI,uCAAmB,CAAC,0BAA0B,EAAE,iDAAuB,CAAC,CAC/E,CAAC;QAVW,cAAS,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW;IAWhD,CAAC;IAEY,MAAM,CACf,IAA0B,EAC1B,UAAgC,EAChC,YAAkC;;YAElC,IAAI;gBACA,MAAM,IAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aACxC;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAClB,qDAAqD,GAAG,CAAC,OAAO,EAAE,EAClE,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;aACL;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;YAE5C,IAAI;gBACA,MAAM,SAAS,GAAG,GAAG,0BAAwB,CAAC,gBAAgB,IAAI,IAAA,yBAAW,EAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBAEnG,KAAK,MAAM,IAAI,IAAI,I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AAI,IAAI,YAAY,EAAE;oBAC7B,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,mBAAmB,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;iBAChH;aACJ;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,iDAAiD,EAAE,GAAG,CAAC,CAAC;aAClF;QACL,CAAC;KAAA;;AAxHa,yCAAgB,GAAG,qCAA6B,AAAhC,CAAiC;mCADtD,wBAAwB;IADpC,IAAA,qBAAU,GAAE;;GACA,wBAAwB,CA0HpC"}
1
+ {"version":3,"file":"PublicApiCacheRepository.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,8FAAmF;AAEnF,0IAAuG;AACvG,wFAAqF;AACrF,6EAA8F;AAC9F,mFAAkF;AAClF,iEAAgE;AAEhE,6CAA0C;AAGnC,IAAM,wBAAwB,mEAA9B,MAAM,wBAAyB,SAAQ,uBAAU;IAIpD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,0BAAwB,CAAC,gBAAgB;SACpD,EACD,IAAI,uCAAmB,CAAC,0BAA0B,EAAE,iDAAuB,CAAC,CAC/E,CAAC;QAVW,cAAS,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW;IAWhD,CAAC;IAEM,KAAK,CAAC,MAAM,CACf,IAA0B,EAC1B,UAAgC,EAChC,YAAkC;QAElC,IAAI;YACA,MAAM,IAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SACxC;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAClB,qDAAqD,GAAG,CAAC,OAAO,EAAE,EAClE,IAAI,CA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B,EACjB,QAA4B;QAE5B,IAAI;YACA,MAAM,IAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;SAChD;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAClB,4DAA4D,GAAG,CAAC,OAAO,EAAE,EACzE,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;SACL;QACD,IAAI;YACA,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE;gBAC7B,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,mBAAmB,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;aAChH;SACJ;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAAC,iDAAiD,EAAE,GAAG,CAAC,CAAC;SAClF;IACL,CAAC;;AAxHa,yCAAgB,GAAG,qCAA6B,AAAhC,CAAiC;mCADtD,wBAAwB;IADpC,IAAA,qBAAU,GAAE;;GACA,wBAAwB,CA0HpC"}
@@ -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 PublicStopTimeCacheRepository_1;
24
15
  Object.defineProperty(exports, "__esModule", { value: true });
25
16
  exports.PublicStopTimeCacheRepository = void 0;
@@ -38,64 +29,60 @@ let PublicStopTimeCacheRepository = exports.PublicStopTimeCacheRepository = Publ
38
29
  }, new golemio_validator_1.JSONSchemaValidator("PublicStopTimeCacheRepository", PublicStopTimeCacheDtoSchema_1.PublicStopTimeCacheDtoSchema));
39
30
  this.log = log;
40
31
  }
41
- createOrUpdate(data, ttlInSeconds) {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- try {
44
- for (const stopTimes of data.values()) {
45
- yield this.validator.Validate(stopTimes);
46
- }
47
- }
48
- catch (err) {
49
- throw new golemio_errors_1.GeneralError(`PublicStopTimeCacheRepository: data validation failed: ${err.message}`, this.constructor.name, err);
32
+ async createOrUpdate(data, ttlInSeconds) {
33
+ try {
34
+ for (const stopTimes of data.values()) {
35
+ await this.validator.Validate(stopTimes);
50
36
  }
51
- try {
52
- const stringifiedData = new Map();
53
- for (const [key, stopTimes] of data.entries()) {
54
- const redisKey = `${this.prefix}:${key}`;
55
- stringifiedData.set(redisKey, JSON.stringify(stopTimes));
56
- }
57
- const pipeline = this.connection.pipeline();
58
- pipeline.mset(stringifiedData);
59
- for (const key of stringifiedData.keys()) {
60
- pipeline.expire(key, ttlInSeconds);
61
- }
62
- yield pipeline.exec();
37
+ }
38
+ catch (err) {
39
+ throw new golemio_errors_1.GeneralError(`PublicStopTimeCacheRepository: data validation failed: ${err.message}`, this.constructor.name, err);
40
+ }
41
+ try {
42
+ const stringifiedData = new Map();
43
+ for (const [key, stopTimes] of data.entries()) {
44
+ const redisKey = `${this.prefix}:${key}`;
45
+ stringifiedData.set(redisKey, JSON.stringify(stopTimes));
63
46
  }
64
- catch (err) {
65
- throw new golemio_errors_1.GeneralError("PublicStopTimeCacheRepository: mset failed", err);
47
+ const pipeline = this.connection.pipeline();
48
+ pipeline.mset(stringifiedData);
49
+ for (const key of stringifiedData.keys()) {
50
+ pipeline.expire(key, ttlInSeconds);
66
51
  }
67
- });
52
+ await pipeline.exec();
53
+ }
54
+ catch (err) {
55
+ throw new golemio_errors_1.GeneralError("PublicStopTimeCacheRepository: mset failed", err);
56
+ }
68
57
  }
69
- getPublicStopTimeCache(vehicleIds) {
70
- return __awaiter(this, void 0, void 0, function* () {
71
- let stopTimeCache = [];
72
- try {
73
- stopTimeCache = yield this.connection.mget(vehicleIds.map((id) => `${const_1.PUBLIC_STOP_TIME_CACHE_NAMESPACE_PREFIX}:${id}`));
74
- }
75
- catch (err) {
76
- throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot get public stop time cache from cache: ${err.message}`, this.constructor.name, err);
58
+ async getPublicStopTimeCache(vehicleIds) {
59
+ let stopTimeCache = [];
60
+ try {
61
+ stopTimeCache = await this.connection.mget(vehicleIds.map((id) => `${const_1.PUBLIC_STOP_TIME_CACHE_NAMESPACE_PREFIX}:${id}`));
62
+ }
63
+ catch (err) {
64
+ throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot get public stop time cache from cache: ${err.message}`, this.constructor.name, err);
65
+ }
66
+ const results = new Map();
67
+ for (let i = 0; i < vehicleIds.length; i++) {
68
+ const vehicleId = vehicleIds[i];
69
+ const cacheValue = stopTimeCache[i];
70
+ let value;
71
+ if (cacheValue === null) {
72
+ this.log.info(`${this.constructor.name}: Cannot find public stop time cache with key '${vehicleId}'`);
73
+ value = [];
77
74
  }
78
- const results = new Map();
79
- for (let i = 0; i < vehicleIds.length; i++) {
80
- const vehicleId = vehicleIds[i];
81
- const cacheValue = stopTimeCache[i];
82
- let value;
83
- if (cacheValue === null) {
84
- this.log.info(`${this.constructor.name}: Cannot find public stop time cache with key '${vehicleId}'`);
85
- value = [];
75
+ else {
76
+ try {
77
+ value = JSON.parse(cacheValue);
86
78
  }
87
- else {
88
- try {
89
- value = JSON.parse(cacheValue);
90
- }
91
- catch (err) {
92
- throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot parse public stop time cache: ${err.message}`, this.constructor.name, err);
93
- }
79
+ catch (err) {
80
+ throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot parse public stop time cache: ${err.message}`, this.constructor.name, err);
94
81
  }
95
- results.set(vehicleId, value);
96
82
  }
97
- return results;
98
- });
83
+ results.set(vehicleId, value);
84
+ }
85
+ return results;
99
86
  }
100
87
  };
101
88
  PublicStopTimeCacheRepository.NAMESPACE_PREFIX = const_1.PUBLIC_STOP_TIME_CACHE_NAMESPACE_PREFIX;
@@ -1 +1 @@
1
- {"version":3,"file":"PublicStopTimeCacheRepository.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA6F;AAE7F,oJAAiH;AAEjH,wEAAqE;AACrE,wFAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAClF,iEAAwE;AAGjE,IAAM,6BAA6B,6EAAnC,MAAM,6BAA8B,SAAQ,uBAAU;IAGzD,YAA8C,GAAY;QACtD,KAAK,CACD,+BAA+B,EAC/B;YACI,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,+BAA6B,CAAC,gBAAgB;SACzD,EACD,IAAI,uCAAmB,CAAC,+BAA+B,EAAE,2DAA4B,CAAC,CACzF,CAAC;QARwC,QAAG,GAAH,GAAG,CAAS;IAS1D,CAAC;IAEY,cAAc,CAAC,IAA4C,EAAE,YAAoB;;YAC1F,IAAI;gBACA,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;oBACnC,MAAM,IAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;iBAC7C;aACJ;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAClB,0DAA0D,GAAG,CAAC,OAAO,EAAE,EACvE,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;aACL;YAED,IAAI;gBACA,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;g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M,EAAE,CAAC,EAAE,EAAE;gBACxC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;gBAChC,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;gBACpC,IAAI,KAAgC,CAAC;gBACrC,IAAI,UAAU,KAAK,IAAI,EAAE;oBACrB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,kDAAkD,SAAS,GAAG,CAAC,CAAC;oBACtG,KAAK,GAAG,EAAE,CAAC;iBACd;qBAAM;oBACH,IAAI;wBACA,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;qBAClC;oBAAC,OAAO,GAAG,EAAE;wBACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,0CAA0C,GAAG,CAAC,OAAO,EAAE,EAC/E,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;qBACL;iBACJ;gBACD,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;aACjC;YAED,OAAO,OAAO,CAAC;QACnB,CAAC;KAAA;;AAnFa,8CAAgB,GAAG,+CAAuC,AAA1C,CAA2C;wCADhE,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAII,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GAH5B,6BAA6B,CAqFzC"}
1
+ {"version":3,"file":"PublicStopTimeCacheRepository.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8FAA6F;AAE7F,oJAAiH;AAEjH,wEAAqE;AACrE,wFAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAClF,iEAAwE;AAGjE,IAAM,6BAA6B,6EAAnC,MAAM,6BAA8B,SAAQ,uB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AC,IAAI,EACrB,GAAG,CACN,CAAC;iBACL;aACJ;YACD,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;SACjC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;;AAnFa,8CAAgB,GAAG,+CAAuC,AAA1C,CAA2C;wCADhE,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAII,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GAH5B,6BAA6B,CAqFzC"}
@@ -10,7 +10,18 @@ const ProviderSourceTypeEnum_1 = require("../../helpers/ProviderSourceTypeEnum")
10
10
  const TripsIdGenerator_1 = __importDefault(require("./TripsIdGenerator"));
11
11
  class TripsMapper {
12
12
  static mapCommonRunToDto(gtfsTrip, runInput) {
13
- return Object.assign(Object.assign({}, this.getGTFSAttributes(gtfsTrip)), { id: TripsIdGenerator_1.default.generateFromCommonRun(gtfsTrip, runInput), origin_route_name: runInput.route_id, internal_route_name: runInput.route_id, run_number: runInput.run_number, internal_run_number: runInput.run_number, vehicle_registration_number: parseInt(runInput.registration_number), vehicle_type_id: this.getVehicleTypeId(+gtfsTrip.route_type, !!+gtfsTrip.is_night, !!+gtfsTrip.is_regional, !!+gtfsTrip.is_substitute_transport), wheelchair_accessible: runInput.wheelchair_accessible, provider_source_type: ProviderSourceTypeEnum_1.ProviderSourceTypeEnum.TcpCommon });
13
+ return {
14
+ ...this.getGTFSAttributes(gtfsTrip),
15
+ id: TripsIdGenerator_1.default.generateFromCommonRun(gtfsTrip, runInput),
16
+ origin_route_name: runInput.route_id,
17
+ internal_route_name: runInput.route_id,
18
+ run_number: runInput.run_number,
19
+ internal_run_number: runInput.run_number,
20
+ vehicle_registration_number: parseInt(runInput.registration_number),
21
+ vehicle_type_id: this.getVehicleTypeId(+gtfsTrip.route_type, !!+gtfsTrip.is_night, !!+gtfsTrip.is_regional, !!+gtfsTrip.is_substitute_transport),
22
+ wheelchair_accessible: runInput.wheelchair_accessible,
23
+ provider_source_type: ProviderSourceTypeEnum_1.ProviderSourceTypeEnum.TcpCommon,
24
+ };
14
25
  }
15
26
  static mapCommonRunNotPublicToDto(runInput, tripId, lastPositionId) {
16
27
  return {
@@ -30,14 +41,36 @@ class TripsMapper {
30
41
  };
31
42
  }
32
43
  static mapMetroRunToDto(gtfsTrip, runInput) {
33
- var _a;
34
- return Object.assign(Object.assign({}, this.getGTFSAttributes(gtfsTrip)), { id: TripsIdGenerator_1.default.generateFromMetroRun(gtfsTrip, runInput), origin_route_name: runInput.routeId, internal_route_name: runInput.routeId, run_number: runInput.runNumber, internal_run_number: (_a = runInput.internalRunNumber) !== null && _a !== void 0 ? _a : runInput.runNumber, vehicle_type_id: RouteTypeEnums_1.MPVRouteTypesEnum.METRO, wheelchair_accessible: true, provider_source_type: ProviderSourceTypeEnum_1.ProviderSourceTypeEnum.TcpMetro });
44
+ return {
45
+ ...this.getGTFSAttributes(gtfsTrip),
46
+ id: TripsIdGenerator_1.default.generateFromMetroRun(gtfsTrip, runInput),
47
+ origin_route_name: runInput.routeId,
48
+ internal_route_name: runInput.routeId,
49
+ run_number: runInput.runNumber,
50
+ internal_run_number: runInput.internalRunNumber ?? runInput.runNumber,
51
+ vehicle_type_id: RouteTypeEnums_1.MPVRouteTypesEnum.METRO,
52
+ wheelchair_accessible: true,
53
+ provider_source_type: ProviderSourceTypeEnum_1.ProviderSourceTypeEnum.TcpMetro,
54
+ };
35
55
  }
36
56
  static mapRegionalBusRunToDto(gtfsTrip, runInput) {
37
- return Object.assign(Object.assign({}, this.getGTFSAttributes(gtfsTrip)), { id: TripsIdGenerator_1.default.generateFromRegionalBusRun(gtfsTrip, runInput.runMessage), agency_name_real: runInput.agencyName, agency_name_scheduled: runInput.agencyName, cis_line_id: runInput.runMessage.cis_line_id, cis_trip_number: runInput.runMessage.cis_trip_number, origin_route_name: gtfsTrip.origin_route_name, internal_route_name: gtfsTrip.origin_route_name, run_number: gtfsTrip.run_number, vehicle_registration_number: runInput.runMessage.registration_number, vehicle_type_id: this.getVehicleTypeId(+gtfsTrip.route_type, !!+gtfsTrip.is_night, !!+gtfsTrip.is_regional, !!+gtfsTrip.is_substitute_transport), wheelchair_accessible: runInput.isWheelchairAccessible, provider_source_type: ProviderSourceTypeEnum_1.ProviderSourceTypeEnum.TcpRegionalBus });
57
+ return {
58
+ ...this.getGTFSAttributes(gtfsTrip),
59
+ id: TripsIdGenerator_1.default.generateFromRegionalBusRun(gtfsTrip, runInput.runMessage),
60
+ agency_name_real: runInput.agencyName,
61
+ agency_name_scheduled: runInput.agencyName,
62
+ cis_line_id: runInput.runMessage.cis_line_id,
63
+ cis_trip_number: runInput.runMessage.cis_trip_number,
64
+ origin_route_name: gtfsTrip.origin_route_name,
65
+ internal_route_name: gtfsTrip.origin_route_name,
66
+ run_number: gtfsTrip.run_number,
67
+ vehicle_registration_number: runInput.runMessage.registration_number,
68
+ vehicle_type_id: this.getVehicleTypeId(+gtfsTrip.route_type, !!+gtfsTrip.is_night, !!+gtfsTrip.is_regional, !!+gtfsTrip.is_substitute_transport),
69
+ wheelchair_accessible: runInput.isWheelchairAccessible,
70
+ provider_source_type: ProviderSourceTypeEnum_1.ProviderSourceTypeEnum.TcpRegionalBus,
71
+ };
38
72
  }
39
73
  static mapTripEntitiesToUpdateDto(tripEntities, taskStartTimestamp) {
40
- var _a, _b;
41
74
  const output = {
42
75
  inserted: [],
43
76
  updated: [],
@@ -51,7 +84,7 @@ class TripsMapper {
51
84
  start_asw_stop_id: tripEntity.start_asw_stop_id,
52
85
  start_cis_stop_id: tripEntity.start_cis_stop_id,
53
86
  start_cis_stop_platform_code: tripEntity.start_cis_stop_platform_code,
54
- start_timestamp: (_b = (_a = tripEntity.start_timestamp) === null || _a === void 0 ? void 0 : _a.toISOString()) !== null && _b !== void 0 ? _b : null,
87
+ start_timestamp: tripEntity.start_timestamp?.toISOString() ?? null,
55
88
  agency_name_real: tripEntity.agency_name_real,
56
89
  agency_name_scheduled: tripEntity.agency_name_scheduled,
57
90
  cis_line_id: tripEntity.cis_line_id,
@@ -1 +1 @@
1
- {"version":3,"file":"TripsMapper.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.ts"],"names":[],"mappings":";;;;;AAAA,2EAAuD;AAGvD,sEAAwF;AAKxF,6EAAkF;AAClF,iFAA8E;AAE9E,0EAAoD;AAEpD,MAAqB,WAAW;IACrB,MAAM,CAAC,iBAAiB,CAAC,QAAsB,EAAE,QAA0B;QAC9E,uCACO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,KACnC,EAAE,EAAE,0BAAkB,CAAC,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAChE,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,EACpC,mBAAmB,EAAE,QAAQ,CAAC,QAAQ,EACtC,UAAU,EAAE,QAAQ,CAAC,UAAU,EAC/B,mBAAmB,EAAE,QAAQ,CAAC,UAAU,EACxC,2BAA2B,EAAE,QAAQ,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EACnE,eAAe,EAAE,IAAI,CAAC,gBAAgB,CAClC,CAAC,QAAQ,CAAC,UAAU,EACpB,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EACpB,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EACvB,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CACtC,EACD,qBAAqB,EAAE,QAAQ,CAAC,qBAAqB,EACrD,oBAAoB,EAAE,+CAAsB,CAAC,SAAS,IACxD;IACN,CAAC;IAEM,MAAM,CAAC,0BAA0B,CACpC,QAA0B,EAC1B,MAAc,EACd,cAAsB;QAEtB,OAAO;YACH,gBAAgB,EAAE,kBAAQ,CAAC,eAAe;YAC1C,qBAAqB,EAAE,kBAAQ,CAAC,eAAe;YAC/C,eAAe,EAAE,kCAAiB,CAAC,IAAI;YACvC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ;YACpC,mBAAmB,EA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,CAAC,SAAS,CAAC;YACjC,MAAM;QACV,KAAK,kCAAiB,CAAC,UAAU;YAC7B,EAAE,GAAG,kCAAiB,CAAC,UAAU,CAAC;YAClC,MAAM;QACV;YACI,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KAC/C;IACD,OAAO,EAAE,CAAC;AACd,CAAC,CAAC;kBArMe,WAAW"}
1
+ {"version":3,"file":"TripsMapper.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.ts"],"names":[],"mappings":";;;;;AAAA,2EAAuD;AAGvD,sEAAwF;AAKxF,6EAAkF;AAClF,iFAA8E;AAE9E,0EAAoD;AAEpD,MAAqB,WAAW;IACrB,MAAM,CAAC,iBAAiB,CAAC,QAAsB,EAAE,QAA0B;QAC9E,OAAO;YACH,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC;YACnC,EAAE,EAAE,0BAAkB,CAAC,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,CAAC;YAChE,iBAAiB,EAAE,QAAQ,CAAC,QAAQ;YACpC,mBAAmB,EAAE,QAAQ,CAAC,QAAQ;YACtC,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,mBAAmB,EAAE,QAAQ,CAAC,UAAU;YACxC,2BAA2B,EAAE,QAAQ,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YACnE,eAAe,EAAE,IAAI,CAAC,gBAAgB,CAClC,CAAC,QAAQ,CAAC,UAAU,EACpB,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EACpB,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EACvB,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CACtC;YACD,qBAAqB,EAAE,QAAQ,CAAC,qBAAqB;YACrD,oBAAoB,EAAE,+CAAsB,CAAC,SAAS;SACzD,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,0BAA0B,CACpC,QAA0B,EAC1B,M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C;iBAAM;gBACH,EAAE,GAAG,kCAAiB,CAAC,QAAQ,CAAC;aACnC;YACD,MAAM;QACV,KAAK,kCAAiB,CAAC,KAAK;YACxB,EAAE,GAAG,kCAAiB,CAAC,KAAK,CAAC;YAC7B,MAAM;QACV,KAAK,kCAAiB,CAAC,SAAS;YAC5B,EAAE,GAAG,kCAAiB,CAAC,SAAS,CAAC;YACjC,MAAM;QACV,KAAK,kCAAiB,CAAC,UAAU;YAC7B,EAAE,GAAG,kCAAiB,CAAC,UAAU,CAAC;YAClC,MAAM;QACV;YACI,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KAC/C;IACD,OAAO,EAAE,CAAC;AACd,CAAC,CAAC;kBArMe,WAAW"}
@@ -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.CachedMetroRailTrackLookup = void 0;
25
16
  const MetroRailtrackGPSRepository_1 = require("../../../../../ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository");
@@ -32,16 +23,14 @@ let CachedMetroRailTrackLookup = exports.CachedMetroRailTrackLookup = class Cach
32
23
  constructor(metroRailtrackGPSRepository) {
33
24
  this.metroRailtrackGPSRepository = metroRailtrackGPSRepository;
34
25
  }
35
- getAllByRouteName(route_name) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- if (!this.cachedLookup) {
38
- const result = yield this.metroRailtrackGPSRepository["sequelizeModel"].findAll({
39
- raw: true,
40
- });
41
- this.cachedLookup = this.groupByRouteName(result);
42
- }
43
- return this.cachedLookup[route_name];
44
- });
26
+ async getAllByRouteName(route_name) {
27
+ if (!this.cachedLookup) {
28
+ const result = await this.metroRailtrackGPSRepository["sequelizeModel"].findAll({
29
+ raw: true,
30
+ });
31
+ this.cachedLookup = this.groupByRouteName(result);
32
+ }
33
+ return this.cachedLookup[route_name];
45
34
  }
46
35
  groupByRouteName(result) {
47
36
  return result.reduce((r, a) => {
@@ -1 +1 @@
1
- {"version":3,"file":"CachedMetroRailtrackLookup.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,4IAA8H;AAC9H,uEAA8E;AAG9E,iEAAwE;AAExE;;GAEG;AAGI,IAAM,0BAA0B,wCAAhC,MAAM,0BAA0B;IAEnC,YACkE,2BAAwD;QAAxD,gCAA2B,GAA3B,2BAA2B,CAA6B;IACvH,CAAC;IAES,iBAAiB,CAAC,UAAkB;;YAC7C,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;gBACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAyB;oBACpG,GAAG,EAAE,IAAI;iBACZ,CAAC,CAAC;gBACH,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;aACrD;YAED,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QACzC,CAAC;KAAA;IAEO,gBAAgB,CAAC,MAAgC;QACrD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAC1B,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACxC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACxB,OAAO,CAAC,CAAC;QACb,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5B,CAAC;CACJ,CAAA;qCAxBY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAIJ,WAAA,IAAA,iBAAM,EAAC,mCAAgB,CAAC,2BAA2B,CAAC,CAAA;qCAAsC,yDAA2B;GAHjH,0BAA0B,CAwBtC"}
1
+ {"version":3,"file":"CachedMetroRailtrackLookup.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4IAA8H;AAC9H,uEAA8E;AAG9E,iEAAwE;AAExE;;GAEG;AAGI,IAAM,0BAA0B,wCAAhC,MAAM,0BAA0B;IAEnC,YACkE,2BAAwD;QAAxD,gCAA2B,GAA3B,2BAA2B,CAA6B;IACvH,CAAC;IAEG,KAAK,CAAC,iBAAiB,CAAC,UAAkB;QAC7C,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAyB;gBACpG,GAAG,EAAE,IAAI;aACZ,CAAC,CAAC;YACH,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;SACrD;QAED,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAEO,gBAAgB,CAAC,MAAgC;QACrD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAC1B,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACxC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACxB,OAAO,CAAC,CAAC;QACb,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5B,CAAC;CACJ,CAAA;qCAxBY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAIJ,WAAA,IAAA,iBAAM,EAAC,mCAAgB,CAAC,2BAA2B,CAAC,CAAA;qCAAsC,yDAA2B;GAHjH,0BAA0B,CAwBtC"}
@@ -8,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
11
  Object.defineProperty(exports, "__esModule", { value: true });
21
12
  exports.PublicStopTimeRepository = void 0;
22
13
  const const_1 = require("../../../../../../schema-definitions/const");
@@ -36,10 +27,8 @@ let PublicStopTimeRepository = exports.PublicStopTimeRepository = class PublicSt
36
27
  },
37
28
  }, new golemio_validator_1.JSONSchemaValidator("PublicStopTimeReadOnly", {}));
38
29
  }
39
- findAll() {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- return this.sequelizeModel.findAll({ raw: true });
42
- });
30
+ async findAll() {
31
+ return this.sequelizeModel.findAll({ raw: true });
43
32
  }
44
33
  };
45
34
  exports.PublicStopTimeRepository = PublicStopTimeRepository = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"PublicStopTimeRepository.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuC;AACvC,+FAA0E;AAE1E,yEAAqF;AACrF,mFAAkF;AAElF,iEAAgE;AAGzD,IAAM,wBAAwB,sCAA9B,MAAM,wBAAyB,SAAQ,sBAAa;IAGvD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,WAAW,EAAE,2BAAmB,CAAC,SAAS;YAC1C,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,2BAAmB,CAAC,cAAc;YAC7D,UAAU,EAAE,YAAY;YACxB,2BAA2B,EAAE;gBACzB,UAAU,EAAE,KAAK;aACpB;SACJ,EACD,IAAI,uCAAmB,CAAC,wBAAwB,EAAE,EAAE,CAAC,CACxD,CAAC;IACN,CAAC;IAEY,OAAO;;YAChB,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;QACtD,CAAC;KAAA;CACJ,CAAA;mCAtBY,wBAAwB;IADpC,IAAA,qBAAU,GAAE;;GACA,wBAAwB,CAsBpC"}
1
+ {"version":3,"file":"PublicStopTimeRepository.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sEAAuC;AACvC,+FAA0E;AAE1E,yEAAqF;AACrF,mFAAkF;AAElF,iEAAgE;AAGzD,IAAM,wBAAwB,sCAA9B,MAAM,wBAAyB,SAAQ,sBAAa;IAGvD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,WAAW,EAAE,2BAAmB,CAAC,SAAS;YAC1C,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,2BAAmB,CAAC,cAAc;YAC7D,UAAU,EAAE,YAAY;YACxB,2BAA2B,EAAE;gBACzB,UAAU,EAAE,KAAK;aACpB;SACJ,EACD,IAAI,uCAAmB,CAAC,wBAAwB,EAAE,EAAE,CAAC,CACxD,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,OAAO;QAChB,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;CACJ,CAAA;mCAtBY,wBAAwB;IADpC,IAAA,qBAAU,GAAE;;GACA,wBAAwB,CAsBpC"}
@@ -22,14 +22,13 @@ DPPUtils.TIME_THRESHOLD_IN_MS = 1 * 60 * 1000;
22
22
  DPPUtils.DISTANCE_THRESHOLD_IN_KM = 0.5;
23
23
  // Decide DPP trips to set invisible, in cases when vehicle is on the way from or to garage.
24
24
  DPPUtils.isInvisible = (agencyNameScheduled, originTimestamp, startTimestamp, currentCoordinates, firstStopCoordinates, schedule, gtfsTripId, lastPositionTracking, isTracked) => {
25
- var _a;
26
25
  // For DPP PRAHA we need filter all buses which are not close to first/last stop (.5km)
27
26
  // and still not tracking (except those with time in range of theirs trip stop times)
28
27
  if (agencyNameScheduled !== DPPUtils.DPP_AGENCY_NAME)
29
28
  return false;
30
29
  if (!schedule)
31
30
  return false;
32
- const tripDate = (_a = schedule.find((el) => new Date(el.start_timestamp).valueOf() == startTimestamp)) === null || _a === void 0 ? void 0 : _a.date;
31
+ const tripDate = schedule.find((el) => new Date(el.start_timestamp).valueOf() == startTimestamp)?.date;
33
32
  const tripsForDay = schedule.filter((el) => el.date == tripDate);
34
33
  if (tripsForDay.length === 0)
35
34
  return false;
@@ -1 +1 @@
1
- {"version":3,"file":"DPPUtils.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-posit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,CAAC;IAC5B,MAAM,QAAQ,GAAG,MAAA,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,IAAI,cAAc,CAAC,0CAAE,IAAI,CAAC;IACvG,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC;IACjE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAExD,OAAO,CACH,QAAQ,CAAC,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,CAAC;QACtG,QAAQ,CAAC,kBAAkB,CAAC,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,oBAAoB,CAAC,CACxF,CAAC;AACN,CAAC,CAAC;kBA/Be,QAAQ"}
1
+ {"version":3,"file":"DPPUtils.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.ts"],"names":[],"mappings":";;AACA,+EAAoE;AACpE,wCAA2D;AAK3D,MAAqB,QAAQ;IAiCjB,MAAM,CAAC,oBAAoB,CAC/B,eAAqB,EACrB,YAA0B,EAC1B,kBAAoC,EACpC,oBAAsC;QAEtC,MAAM,SAAS,GAAG,gBAAW,CAAC,OAAO,CAAwB,2CAAoB,CAAC,oBAAoB,CAAC,CAAC;QAExG,IAAI,eAAe,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE;YAC1G,MAAM,qB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