@golemio/pid 3.4.1-dev.1622321089 → 3.4.1-dev.1622952033

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 (426) hide show
  1. package/db/migrations/postgresql/20250103092631-skip-missing.js +53 -0
  2. package/db/migrations/postgresql/sqls/20250103092631-skip-missing-down.sql +184 -0
  3. package/db/migrations/postgresql/sqls/20250103092631-skip-missing-up.sql +195 -0
  4. package/dist/input-gateway/jis/JisInfotextsController.js +4 -13
  5. package/dist/input-gateway/jis/JisInfotextsController.js.map +1 -1
  6. package/dist/input-gateway/jis/JisInfotextsRouter.js +3 -12
  7. package/dist/input-gateway/jis/JisInfotextsRouter.js.map +1 -1
  8. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js +4 -13
  9. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js.map +1 -1
  10. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +3 -12
  11. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
  12. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +4 -13
  13. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
  14. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +3 -12
  15. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
  16. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js +4 -15
  17. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js.map +1 -1
  18. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js +8 -19
  19. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js.map +1 -1
  20. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +1 -1
  21. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -1
  22. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +56 -72
  23. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  24. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +32 -48
  25. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
  26. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +24 -37
  27. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
  28. package/dist/integration-engine/jis/services/JISInfotextsDataService.js +24 -35
  29. package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
  30. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +2 -3
  31. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
  32. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +12 -23
  33. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
  34. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -15
  35. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  36. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +3 -12
  37. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
  38. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +2 -11
  39. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  40. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +3 -12
  41. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
  42. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +21 -30
  43. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
  44. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js +20 -29
  45. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js.map +1 -1
  46. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js +33 -52
  47. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js.map +1 -1
  48. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js +12 -23
  49. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js.map +1 -1
  50. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js +12 -23
  51. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  52. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +33 -44
  53. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -1
  54. package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js +2 -1
  55. package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js.map +1 -1
  56. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +10 -21
  57. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
  58. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +15 -24
  59. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
  60. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js +3 -12
  61. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js.map +1 -1
  62. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js +3 -12
  63. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map +1 -1
  64. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +4 -13
  65. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
  66. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +30 -41
  67. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
  68. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +11 -22
  69. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
  70. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +1 -2
  71. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
  72. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +7 -16
  73. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
  74. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +3 -12
  75. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
  76. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +13 -17
  77. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
  78. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +13 -22
  79. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
  80. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js +1 -2
  81. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js.map +1 -1
  82. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js +12 -23
  83. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js.map +1 -1
  84. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +14 -25
  85. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
  86. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +26 -37
  87. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
  88. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +12 -23
  89. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
  90. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js +36 -49
  91. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js.map +1 -1
  92. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js +3 -14
  93. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js.map +1 -1
  94. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +1 -2
  95. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
  96. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +29 -40
  97. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +1 -1
  98. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +64 -81
  99. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  100. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +60 -79
  101. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +1 -1
  102. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +23 -34
  103. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +1 -1
  104. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +26 -38
  105. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -1
  106. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js +21 -32
  107. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js.map +1 -1
  108. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +43 -55
  109. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +1 -1
  110. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js +8 -18
  111. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js.map +1 -1
  112. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js +11 -21
  113. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
  114. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +8 -17
  115. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
  116. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +19 -30
  117. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
  118. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js +8 -1
  119. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js.map +1 -1
  120. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +31 -47
  121. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
  122. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +6 -17
  123. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -1
  124. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +4 -14
  125. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -1
  126. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +6 -17
  127. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -1
  128. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +34 -31
  129. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
  130. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +3 -12
  131. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
  132. package/dist/integration-engine/shared/RopidMetadataModel.js +35 -45
  133. package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
  134. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +13 -24
  135. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
  136. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +9 -6
  137. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
  138. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +113 -128
  139. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
  140. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +20 -34
  141. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
  142. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +3 -12
  143. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -1
  144. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js +3 -12
  145. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js.map +1 -1
  146. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +12 -21
  147. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
  148. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js +7 -16
  149. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js.map +1 -1
  150. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +22 -33
  151. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -1
  152. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js +31 -44
  153. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js.map +1 -1
  154. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +14 -25
  155. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -1
  156. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js +25 -37
  157. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js.map +1 -1
  158. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +53 -63
  159. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
  160. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js +57 -72
  161. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js.map +1 -1
  162. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js +15 -26
  163. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js.map +1 -1
  164. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +10 -21
  165. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
  166. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +19 -30
  167. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
  168. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +10 -21
  169. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
  170. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +5 -14
  171. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
  172. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +4 -14
  173. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
  174. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +1 -2
  175. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -1
  176. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +35 -49
  177. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -1
  178. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +11 -22
  179. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
  180. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +2 -3
  181. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
  182. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js +3 -12
  183. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js.map +1 -1
  184. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +3 -12
  185. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js.map +1 -1
  186. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +19 -29
  187. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
  188. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js +3 -12
  189. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js.map +1 -1
  190. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +3 -12
  191. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js.map +1 -1
  192. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +58 -55
  193. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  194. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js +64 -79
  195. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
  196. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +46 -59
  197. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
  198. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +39 -6
  199. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
  200. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js +8 -19
  201. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js.map +1 -1
  202. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js +2 -13
  203. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js.map +1 -1
  204. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +1 -2
  205. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
  206. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +10 -16
  207. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js.map +1 -1
  208. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +68 -40
  209. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
  210. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js +5 -14
  211. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js.map +1 -1
  212. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -2
  213. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
  214. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +1 -2
  215. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -1
  216. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js +4 -4
  217. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js.map +1 -1
  218. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js +1 -2
  219. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js.map +1 -1
  220. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js +4 -5
  221. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js.map +1 -1
  222. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js +3 -4
  223. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js.map +1 -1
  224. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js +7 -18
  225. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js.map +1 -1
  226. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +7 -16
  227. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
  228. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +40 -57
  229. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
  230. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +36 -53
  231. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
  232. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js +32 -41
  233. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js.map +1 -1
  234. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +61 -33
  235. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
  236. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js +4 -4
  237. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js.map +1 -1
  238. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js +4 -6
  239. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
  240. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js +38 -55
  241. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js.map +1 -1
  242. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js +32 -45
  243. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js.map +1 -1
  244. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js +81 -91
  245. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js.map +1 -1
  246. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js +43 -55
  247. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js.map +1 -1
  248. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js +37 -49
  249. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  250. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js +7 -18
  251. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js.map +1 -1
  252. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +41 -52
  253. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  254. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +32 -43
  255. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
  256. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +95 -115
  257. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
  258. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +150 -162
  259. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js.map +1 -1
  260. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js +82 -94
  261. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js.map +1 -1
  262. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +24 -35
  263. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
  264. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +15 -18
  265. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
  266. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js +1 -1
  267. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js.map +1 -1
  268. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +11 -21
  269. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
  270. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -3
  271. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  272. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +5 -15
  273. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
  274. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +4 -13
  275. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -1
  276. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +4 -13
  277. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -1
  278. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.d.ts +1 -0
  279. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +20 -20
  280. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  281. package/dist/output-gateway/pid/data-access/DeparturesRepository.js +40 -53
  282. package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
  283. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +62 -75
  284. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -1
  285. package/dist/output-gateway/pid/domain/DepartureInterfaces.d.ts +7 -0
  286. package/dist/output-gateway/pid/domain/DepartureInterfaces.js +3 -0
  287. package/dist/output-gateway/pid/domain/DepartureInterfaces.js.map +1 -0
  288. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
  289. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
  290. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +6 -15
  291. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
  292. package/dist/output-gateway/pid/index.d.ts +4 -5
  293. package/dist/output-gateway/pid/index.js +1 -0
  294. package/dist/output-gateway/pid/index.js.map +1 -1
  295. package/dist/output-gateway/pid/ioc/Di.js +4 -0
  296. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  297. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +2 -0
  298. package/dist/output-gateway/pid/ioc/OgPidToken.js +2 -0
  299. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  300. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +14 -28
  301. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +195 -84
  302. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  303. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js +20 -27
  304. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js.map +1 -1
  305. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +16 -25
  306. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
  307. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +28 -18
  308. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
  309. package/dist/output-gateway/pid/models/helpers/SkipHelper.d.ts +19 -0
  310. package/dist/output-gateway/pid/models/helpers/SkipHelper.js +116 -0
  311. package/dist/output-gateway/pid/models/helpers/SkipHelper.js.map +1 -0
  312. package/dist/output-gateway/pid/models/helpers/const.d.ts +4 -0
  313. package/dist/output-gateway/pid/models/helpers/const.js +8 -0
  314. package/dist/output-gateway/pid/models/helpers/const.js.map +1 -0
  315. package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +4 -1
  316. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.d.ts +21 -0
  317. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js +3 -0
  318. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js.map +1 -0
  319. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +1 -1
  320. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -1
  321. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +12 -23
  322. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  323. package/dist/output-gateway/pid/service/facade/StopFacade.js +27 -38
  324. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  325. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +1 -1
  326. package/dist/output-gateway/pid/service/facade/TransferFacade.js +34 -39
  327. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  328. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +3 -4
  329. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -1
  330. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +8 -12
  331. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -1
  332. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +1 -2
  333. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -1
  334. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +1 -2
  335. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -1
  336. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js +4 -13
  337. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -1
  338. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js +4 -13
  339. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -1
  340. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js +9 -18
  341. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -1
  342. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js +13 -26
  343. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js.map +1 -1
  344. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js +22 -33
  345. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js.map +1 -1
  346. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +9 -20
  347. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  348. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +23 -34
  349. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
  350. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +4 -2
  351. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +178 -175
  352. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
  353. package/dist/output-gateway/public/domain/repository/IVehiclePositionsRepository.d.ts +2 -1
  354. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js +2 -2
  355. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js.map +1 -1
  356. package/dist/output-gateway/public/service/VPSubscriber.js +8 -19
  357. package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -1
  358. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +100 -117
  359. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -1
  360. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +18 -29
  361. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
  362. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +20 -31
  363. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -1
  364. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +15 -26
  365. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
  366. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +1 -2
  367. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  368. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +3 -14
  369. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
  370. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +7 -18
  371. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
  372. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +35 -46
  373. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  374. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +16 -22
  375. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
  376. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +9 -10
  377. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -1
  378. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js +5 -15
  379. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js.map +1 -1
  380. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +2 -3
  381. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -1
  382. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js +2 -15
  383. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js.map +1 -1
  384. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js +1 -13
  385. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
  386. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +14 -25
  387. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -1
  388. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.d.ts +10 -0
  389. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js +65 -0
  390. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js.map +1 -0
  391. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.d.ts +4 -0
  392. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js +3 -0
  393. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js.map +1 -0
  394. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +3 -12
  395. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
  396. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +4 -13
  397. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
  398. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +5 -14
  399. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
  400. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +90 -102
  401. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
  402. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +3 -12
  403. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
  404. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +43 -51
  405. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
  406. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +28 -37
  407. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
  408. package/dist/output-gateway/shared/DepartureCalculator.js +1 -1
  409. package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -1
  410. package/dist/output-gateway/shared/constants/validations.js +1 -1
  411. package/dist/output-gateway/shared/constants/validations.js.map +1 -1
  412. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +40 -48
  413. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -1
  414. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +7 -16
  415. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
  416. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +10 -19
  417. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
  418. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js +5 -2
  419. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js.map +1 -1
  420. package/dist/schema-definitions/ropid-gtfs/index.js +16 -4
  421. package/dist/schema-definitions/ropid-gtfs/index.js.map +1 -1
  422. package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
  423. package/dist/schema-definitions/ropid-gtfs/redis/const.js +2 -1
  424. package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
  425. package/docs/openapi-output.yaml +11 -3
  426. package/package.json +2 -2
@@ -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.RopidGtfsRepository = void 0;
25
16
  const const_1 = require("../../../schema-definitions/const");
@@ -36,54 +27,44 @@ let RopidGtfsRepository = exports.RopidGtfsRepository = class RopidGtfsRepositor
36
27
  this.replaceAllProcedure = "ropidgtfs_replaceAllSavedTables";
37
28
  this.createPrecomputedTmpTablesProcedure = "ropidgtfs_preparePrecomputedTmpTables";
38
29
  }
39
- replaceAllTable(tables, t) {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- this.logger.info(`Replacing tmp for actual tables: ${tables.join(", ")}`);
42
- const connection = this.connector.getConnection();
43
- yield connection.query(`CALL ${const_1.PG_SCHEMA}.${this.replaceAllProcedure}($1);`, {
44
- transaction: t,
45
- bind: [tables.join(",")],
46
- });
30
+ async replaceAllTable(tables, t) {
31
+ this.logger.info(`Replacing tmp for actual tables: ${tables.join(", ")}`);
32
+ const connection = this.connector.getConnection();
33
+ await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.replaceAllProcedure}($1);`, {
34
+ transaction: t,
35
+ bind: [tables.join(",")],
47
36
  });
48
37
  }
49
- createTmpTables() {
50
- return __awaiter(this, void 0, void 0, function* () {
51
- this.logger.info(`Creating tmp tables`);
52
- const connection = this.connector.getConnection();
53
- yield connection.query(`CALL ${const_1.PG_SCHEMA}.${this.preparationProcedure}();`);
54
- });
38
+ async createTmpTables() {
39
+ this.logger.info(`Creating tmp tables`);
40
+ const connection = this.connector.getConnection();
41
+ await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.preparationProcedure}();`);
55
42
  }
56
- createPrecomputedTmpTables() {
57
- return __awaiter(this, void 0, void 0, function* () {
58
- this.logger.info(`Creating precomputed tmp tables`);
59
- const connection = this.connector.getConnection();
60
- yield connection.query(`CALL ${const_1.PG_SCHEMA}.${this.createPrecomputedTmpTablesProcedure}();`);
61
- });
43
+ async createPrecomputedTmpTables() {
44
+ this.logger.info(`Creating precomputed tmp tables`);
45
+ const connection = this.connector.getConnection();
46
+ await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.createPrecomputedTmpTablesProcedure}();`);
62
47
  }
63
- cleanTmpAndOldTables() {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- try {
66
- this.logger.info(`Cleaning tmp and old tables`);
67
- const connection = this.connector.getConnection();
68
- yield connection.query(`CALL ${const_1.PG_SCHEMA}.${this.cleaningOldProcedure}();`);
69
- yield connection.query(`CALL ${const_1.PG_SCHEMA}.${this.cleaningTmpProcedure}();`);
70
- }
71
- catch (err) {
72
- this.logger.error(new golemio_errors_1.GeneralError("Error while cleaning tmp and old tables", this.constructor.name, err));
73
- }
74
- });
48
+ async cleanTmpAndOldTables() {
49
+ try {
50
+ this.logger.info(`Cleaning tmp and old tables`);
51
+ const connection = this.connector.getConnection();
52
+ await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.cleaningOldProcedure}();`);
53
+ await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.cleaningTmpProcedure}();`);
54
+ }
55
+ catch (err) {
56
+ this.logger.error(new golemio_errors_1.GeneralError("Error while cleaning tmp and old tables", this.constructor.name, err));
57
+ }
75
58
  }
76
- cleanOldTables() {
77
- return __awaiter(this, void 0, void 0, function* () {
78
- try {
79
- this.logger.info(`Cleaning tmp and old tables`);
80
- const connection = this.connector.getConnection();
81
- yield connection.query(`CALL ${const_1.PG_SCHEMA}.${this.cleaningOldProcedure}();`);
82
- }
83
- catch (err) {
84
- this.logger.error(new golemio_errors_1.GeneralError("Error while cleaning old tables", this.constructor.name, err));
85
- }
86
- });
59
+ async cleanOldTables() {
60
+ try {
61
+ this.logger.info(`Cleaning tmp and old tables`);
62
+ const connection = this.connector.getConnection();
63
+ await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.cleaningOldProcedure}();`);
64
+ }
65
+ catch (err) {
66
+ this.logger.error(new golemio_errors_1.GeneralError("Error while cleaning old tables", this.constructor.name, err));
67
+ }
87
68
  }
88
69
  };
89
70
  exports.RopidGtfsRepository = RopidGtfsRepository = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"RopidGtfsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAuC;AAEvC,wEAAqE;AAErE,6EAAwE;AAExE,iEAAwE;AAGjE,IAAM,mBAAmB,iCAAzB,MAAM,mBAAmB;IAO5B,YACyC,SAAqC,EAChD,MAAuB;QADJ,cAAS,GAAT,SAAS,CAAoB;QACxC,WAAM,GAAN,MAAM,CAAS;QAR7C,yBAAoB,GAAG,4BAA4B,CAAC;QACpD,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,wBAAmB,GAAG,iCAAiC,CAAC;QACxD,wCAAmC,GAAG,uCAAuC,CAAC;IAKnF,CAAC;IAES,eAAe,CAAC,MAAgB,EAAE,CAAc;;YACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1E,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;YAClD,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,iBAAS,IAAI,IAAI,CAAC,mBAAmB,OAAO,EAAE;gBACzE,WAAW,EAAE,CAAC;gBACd,IAAI,EAAE,CAAC,MAAM,CAAC,IAA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,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;gBAClD,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,iBAAS,IAAI,IAAI,CAAC,oBAAoB,KAAK,CAAC,CAAC;aAC/E;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,6BAAY,CAAC,iCAAiC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;aACtG;QACL,CAAC;KAAA;CACJ,CAAA;8BArDY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IASJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GATpB,mBAAmB,CAqD/B"}
1
+ {"version":3,"file":"RopidGtfsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AAEvC,wEAAqE;AAErE,6EAAwE;AAExE,iEAAwE;AAGjE,IAAM,mBAAmB,iCAAzB,MAAM,mBAAmB;IAO5B,YACyC,SAAqC,EAChD,MAAuB;QADJ,cAAS,GAAT,SAAS,CAAoB;QACxC,WAAM,GAAN,MAAM,CAAS;QAR7C,yBAAoB,GAAG,4BAA4B,CAAC;QACpD,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,wBAAmB,GAAG,iCAAiC,CAAC;QACxD,wCAAmC,GAAG,uCAAuC,CAAC;IAKnF,CAAC;IAEG,KAAK,CAAC,eAAe,CAAC,MAAgB,EAAE,CAAc;QACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1E,MAAM,UAAU,GAAG,I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AAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;SAC9G;IACL,CAAC;IAEM,KAAK,CAAC,cAAc;QACvB,IAAI;YACA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAChD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;YAClD,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,iBAAS,IAAI,IAAI,CAAC,oBAAoB,KAAK,CAAC,CAAC;SAC/E;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,6BAAY,CAAC,iCAAiC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;SACtG;IACL,CAAC;CACJ,CAAA;8BArDY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IASJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GATpB,mBAAmB,CAqD/B"}
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.RouteSubAgencyRepository = void 0;
13
4
  const const_1 = require("../../../schema-definitions/const");
@@ -25,20 +16,18 @@ class RouteSubAgencyRepository extends models_1.PostgresModel {
25
16
  savingType: "insertOnly",
26
17
  }, new golemio_validator_1.JSONSchemaValidator("RouteSubAgencyRepository", RouteSubAgencyDto_1.RouteSubAgencyDto.jsonSchema));
27
18
  }
28
- findSubAgenciesByCisLineIds(cisLineIds) {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- try {
31
- return yield this.sequelizeModel.findAll({
32
- attributes: ["route_licence_number", "route_id", "sub_agency_name"],
33
- where: {
34
- route_licence_number: cisLineIds,
35
- },
36
- });
37
- }
38
- catch (err) {
39
- throw new golemio_errors_1.GeneralError("findSubAgenciesByCisLineIds: failed to get sub-agencies", this.name, err);
40
- }
41
- });
19
+ async findSubAgenciesByCisLineIds(cisLineIds) {
20
+ try {
21
+ return await this.sequelizeModel.findAll({
22
+ attributes: ["route_licence_number", "route_id", "sub_agency_name"],
23
+ where: {
24
+ route_licence_number: cisLineIds,
25
+ },
26
+ });
27
+ }
28
+ catch (err) {
29
+ throw new golemio_errors_1.GeneralError("findSubAgenciesByCisLineIds: failed to get sub-agencies", this.name, err);
30
+ }
42
31
  }
43
32
  }
44
33
  exports.RouteSubAgencyRepository = RouteSubAgencyRepository;
@@ -1 +1 @@
1
- {"version":3,"file":"RouteSubAgencyRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAAuC;AACvC,uEAA4C;AAC5C,uGAA6E;AAC7E,yEAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAElF,MAAa,wBAAyB,SAAQ,sBAAa;IACvD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,WAAW,EAAE,sBAAS,CAAC,kBAAkB,CAAC,WAAW;YACrD,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,qCAAiB,CAAC,cAAc;YAC3D,UAAU,EAAE,YAAY;SAC3B,EACD,IAAI,uCAAmB,CAAC,0BAA0B,EAAE,qCAAiB,CAAC,UAAU,CAAC,CACpF,CAAC;IACN,CAAC;IAEY,2BAA2B,CAAC,UAAoB;;YACzD,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAoB;oBACxD,UAAU,EAAE,CAAC,sBAAsB,EAAE,UAAU,EAAE,iBAAiB,CAAC;oBACnE,KAAK,EAAE;wBACH,oBAAoB,EAAE,UAAU;qBACnC;iBACJ,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,yDAAyD,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACrG;QACL,CAAC;KAAA;CACJ;AA1BD,4DA0BC"}
1
+ {"version":3,"file":"RouteSubAgencyRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.ts"],"names":[],"mappings":";;;AAAA,6DAAuC;AACvC,uEAA4C;AAC5C,uGAA6E;AAC7E,yEAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAElF,MAAa,wBAAyB,SAAQ,sBAAa;IACvD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,WAAW,EAAE,sBAAS,CAAC,kBAAkB,CAAC,WAAW;YACrD,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,qCAAiB,CAAC,cAAc;YAC3D,UAAU,EAAE,YAAY;SAC3B,EACD,IAAI,uCAAmB,CAAC,0BAA0B,EAAE,qCAAiB,CAAC,UAAU,CAAC,CACpF,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,2BAA2B,CAAC,UAAoB;QACzD,IAAI;YACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAoB;gBACxD,UAAU,EAAE,CAAC,sBAAsB,EAAE,UAAU,EAAE,iBAAiB,CAAC;gBACnE,KAAK,EAAE;oBACH,oBAAoB,EAAE,UAAU;iBACnC;aACJ,CAAC,CAAC;SACN;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAAC,yDAAyD,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACrG;IACL,CAAC;CACJ;AA1BD,4DA0BC"}
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.DelayComputationRedisRepository = void 0;
13
4
  const DelayComputationDtoSchema_1 = require("../../../../schema-definitions/ropid-gtfs/redis/schemas/DelayComputationDtoSchema");
@@ -24,20 +15,18 @@ class DelayComputationRedisRepository extends RedisModel_1.RedisModel {
24
15
  prefix: DelayComputationRedisRepository.NAMESPACE_PREFIX,
25
16
  }, new golemio_validator_1.JSONSchemaValidator("GTFSDelayComputationRedisRepositoryValidator", DelayComputationDtoSchema_1.DelayComputationDtoSchema));
26
17
  }
27
- expire(keys, ttlInSeconds) {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- const pipeline = this.connection.pipeline();
30
- for (const key of keys) {
31
- const redisKey = `${this.prefix}:${key}`;
32
- pipeline.expire(redisKey, ttlInSeconds);
33
- }
34
- try {
35
- yield pipeline.exec();
36
- }
37
- catch (err) {
38
- throw new golemio_errors_1.GeneralError("Error while expiring keys in Redis", this.constructor.name, err);
39
- }
40
- });
18
+ async expire(keys, ttlInSeconds) {
19
+ const pipeline = this.connection.pipeline();
20
+ for (const key of keys) {
21
+ const redisKey = `${this.prefix}:${key}`;
22
+ pipeline.expire(redisKey, ttlInSeconds);
23
+ }
24
+ try {
25
+ await pipeline.exec();
26
+ }
27
+ catch (err) {
28
+ throw new golemio_errors_1.GeneralError("Error while expiring keys in Redis", this.constructor.name, err);
29
+ }
41
30
  }
42
31
  }
43
32
  exports.DelayComputationRedisRepository = DelayComputationRedisRepository;
@@ -1 +1 @@
1
- {"version":3,"file":"DelayComputationRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iIAAoG;AACpG,wFAA6F;AAC7F,wFAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAElF,MAAa,+BAAgC,SAAQ,uBAAU;IAG3D;QACI,KAAK,CACD,qCAAqC,EACrC;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,IAAI;YAC9B,MAAM,EAAE,+BAA+B,CAAC,gBAAgB;SAC3D,EACD,IAAI,uCAAmB,CAAC,8CAA8C,EAAE,qDAAyB,CAAC,CACrG,CAAC;IACN,CAAC;IAEY,MAAM,CAAC,IAAc,EAAE,YAAoB;;YACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC5C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;gBACpB,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;gBACzC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;aAC3C;YAED,IAAI;gBACA,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;aACzB;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aAC5F;QACL,CAAC;KAAA;;AA5BL,0EA6BC;AA5BiB,gDAAgB,GAAG,+CAAuC,CAAC"}
1
+ {"version":3,"file":"DelayComputationRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.ts"],"names":[],"mappings":";;;AAAA,iIAAoG;AACpG,wFAA6F;AAC7F,wFAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAElF,MAAa,+BAAgC,SAAQ,uBAAU;IAG3D;QACI,KAAK,CACD,qCAAqC,EACrC;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,IAAI;YAC9B,MAAM,EAAE,+BAA+B,CAAC,gBAAgB;SAC3D,EACD,IAAI,uCAAmB,CAAC,8CAA8C,EAAE,qDAAyB,CAAC,CACrG,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,IAAc,EAAE,YAAoB;QACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC5C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACpB,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YACzC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;SAC3C;QAED,IAAI;YACA,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;SACzB;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC5F;IACL,CAAC;;AA5BL,0EA6BC;AA5BiB,gDAAgB,GAAG,+CAAuC,CAAC"}
@@ -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 PublicGtfsDepartureRepository_1;
21
12
  Object.defineProperty(exports, "__esModule", { value: true });
22
13
  exports.PublicGtfsDepartureRepository = void 0;
@@ -41,45 +32,43 @@ let PublicGtfsDepartureRepository = exports.PublicGtfsDepartureRepository = Publ
41
32
  * - remove departures that are in the same time range as the new ones
42
33
  * (to prevent duplicates and to keep the cache clean and up-to-date)
43
34
  */
44
- replaceDeparturesForStop(departures, stopId, intervalParams) {
45
- return __awaiter(this, void 0, void 0, function* () {
46
- try {
47
- yield this.validator.Validate(departures);
48
- }
49
- catch (err) {
50
- throw new golemio_errors_1.ValidationError("Error while validating departures", this.constructor.name, err);
35
+ async replaceDeparturesForStop(departures, stopId, intervalParams) {
36
+ try {
37
+ await this.validator.Validate(departures);
38
+ }
39
+ catch (err) {
40
+ throw new golemio_errors_1.ValidationError("Error while validating departures", this.constructor.name, err);
41
+ }
42
+ try {
43
+ const sortedSetKey = `${this.prefix}:${stopId}`;
44
+ const pipeline = this.connection.pipeline();
45
+ // Automatically remove departures that are older than 3 hours to keep the cache clean
46
+ pipeline.zremrangebyscore(sortedSetKey, "-inf", new Date().getTime() / 1000 - 3 * 3600);
47
+ if (departures.length === 0) {
48
+ // If stop already has an empty object it will just update the empty objects score/time
49
+ pipeline.zadd(sortedSetKey, new Date().getTime() / 1000, "{}");
51
50
  }
52
- try {
53
- const sortedSetKey = `${this.prefix}:${stopId}`;
54
- const pipeline = this.connection.pipeline();
55
- // Automatically remove departures that are older than 3 hours to keep the cache clean
56
- pipeline.zremrangebyscore(sortedSetKey, "-inf", new Date().getTime() / 1000 - 3 * 3600);
57
- if (departures.length === 0) {
58
- // If stop already has an empty object it will just update the empty objects score/time
59
- pipeline.zadd(sortedSetKey, new Date().getTime() / 1000, "{}");
51
+ else {
52
+ // remove empty departures from stop
53
+ pipeline.zrem(sortedSetKey, "{}");
54
+ const firstDepartureScore = new Date(departures[0].departure_datetime).getTime() / 1000;
55
+ const lastDepartureScore = new Date(departures[departures.length - 1].departure_datetime).getTime() / 1000;
56
+ // Remove departures that are in the same time range
57
+ pipeline.zremrangebyscore(sortedSetKey, firstDepartureScore, lastDepartureScore);
58
+ for (const departure of departures) {
59
+ const departureScore = new Date(departure.departure_datetime).getTime() / 1000;
60
+ pipeline.zadd(sortedSetKey, departureScore, JSON.stringify(departure));
60
61
  }
61
- else {
62
- // remove empty departures from stop
63
- pipeline.zrem(sortedSetKey, "{}");
64
- const firstDepartureScore = new Date(departures[0].departure_datetime).getTime() / 1000;
65
- const lastDepartureScore = new Date(departures[departures.length - 1].departure_datetime).getTime() / 1000;
66
- // Remove departures that are in the same time range
67
- pipeline.zremrangebyscore(sortedSetKey, firstDepartureScore, lastDepartureScore);
68
- for (const departure of departures) {
69
- const departureScore = new Date(departure.departure_datetime).getTime() / 1000;
70
- pipeline.zadd(sortedSetKey, departureScore, JSON.stringify(departure));
71
- }
72
- }
73
- pipeline.expire(sortedSetKey, intervalParams.intervalToHours * 3600);
74
- yield pipeline.exec();
75
62
  }
76
- catch (err) {
77
- if (err instanceof golemio_errors_1.AbstractGolemioError) {
78
- throw err;
79
- }
80
- throw new golemio_errors_1.GeneralError(`${this.constructor.name}: error while saving departures`, this.constructor.name, err);
63
+ pipeline.expire(sortedSetKey, intervalParams.intervalToHours * 3600);
64
+ await pipeline.exec();
65
+ }
66
+ catch (err) {
67
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
68
+ throw err;
81
69
  }
82
- });
70
+ throw new golemio_errors_1.GeneralError(`${this.constructor.name}: error while saving departures`, this.constructor.name, err);
71
+ }
83
72
  }
84
73
  };
85
74
  PublicGtfsDepartureRepository.NAMESPACE_PREFIX = const_1.PUBLIC_DEPARTURE_NAMESPACE_PREFIX;
@@ -1 +1 @@
1
- {"version":3,"file":"PublicGtfsDepartureRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,iFAAgF;AAEhF,uIAA0G;AAC1G,wFAAqF;AACrF,6EAA+G;AAC/G,mFAAkF;AAClF,iEAAgE;AAGzD,IAAM,6BAA6B,6EAAnC,MAAM,6BAA8B,SAAQ,uBAAU;IAGzD;QACI,KAAK,CACD,yBAAyB,EACzB;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,+BAA6B,CAAC,gBAAgB;SACzD,EACD,IAAI,uCAAmB,CAAC,wCAAwC,EAAE,2DAA4B,CAAC,CAClG,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACU,wBAAwB,CACjC,UAA0C,EAC1C,MAAc,EACd,cAAuD;;YAEvD,IAAI;gBACA,MAAM,IAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;aAC9C;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,gCAAe,CAAC,mCAAmC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aAC9F;YAED,IAAI;gBACA,MAAM,YAAY,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,EAAE,CAAC;gBAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;gBAC5C,sFAAsF;gBACtF,QAAQ,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAA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AAC;iBACb;gBAED,MAAM,IAAI,6BAAY,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,iCAAiC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACjH;QACL,CAAC;KAAA;;AA/Da,8CAAgB,GAAG,yCAAiC,AAApC,CAAqC;wCAD1D,6BAA6B;IADzC,IAAA,qBAAU,GAAE;;GACA,6BAA6B,CAiEzC"}
1
+ {"version":3,"file":"PublicGtfsDepartureRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,iFAAgF;AAEhF,uIAA0G;AAC1G,wFAAqF;AACrF,6EAA+G;AAC/G,mFAAkF;AAClF,iEAAgE;AAGzD,IAAM,6BAA6B,6EAAnC,MAAM,6BAA8B,SAAQ,uBAAU;IAGzD;QACI,KAAK,CACD,yBAAyB,EACzB;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,+BAA6B,CAAC,gBAAgB;SACzD,EACD,IAAI,uCAAmB,CAAC,wCAAwC,EAAE,2DAA4B,CAAC,CAClG,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,wBAAwB,CACjC,UAA0C,EAC1C,MAAc,EACd,cAAuD;QAEvD,IAAI;YACA,MAAM,IAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;SAC9C;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,gCAAe,CAAC,mCAAmC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC9F;QAED,IAAI;YACA,MAAM,YAAY,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,EAAE,CAAC;YAChD,MAAM,QAAQ,G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IAAI,EAAE,CAAC;SACzB;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;gBACrC,MAAM,GAAG,CAAC;aACb;YAED,MAAM,IAAI,6BAAY,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,iCAAiC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACjH;IACL,CAAC;;AA/Da,8CAAgB,GAAG,yCAAiC,AAApC,CAAqC;wCAD1D,6BAA6B;IADzC,IAAA,qBAAU,GAAE;;GACA,6BAA6B,CAiEzC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RunTripsRedisRepository = void 0;
4
+ const const_1 = require("../../../../schema-definitions/ropid-gtfs/redis/const");
4
5
  const GtfsRunTripCacheDtoSchema_1 = require("../../../../schema-definitions/vehicle-positions/redis/schemas/GtfsRunTripCacheDtoSchema");
5
6
  const RedisModel_1 = require("@golemio/core/dist/integration-engine/models/RedisModel");
6
7
  const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
@@ -15,5 +16,5 @@ class RunTripsRedisRepository extends RedisModel_1.RedisModel {
15
16
  }
16
17
  }
17
18
  exports.RunTripsRedisRepository = RunTripsRedisRepository;
18
- RunTripsRedisRepository.NAMESPACE_PREFIX = "gtfsRunSchedule";
19
+ RunTripsRedisRepository.NAMESPACE_PREFIX = const_1.GTFS_RUN_SCHEDULE_NAMESPACE_PREFIX;
19
20
  //# sourceMappingURL=RunTripsRedisRepository.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RunTripsRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.ts"],"names":[],"mappings":";;;AAAA,wIAA2G;AAC3G,wFAAqF;AACrF,mFAAkF;AAElF,MAAa,uBAAwB,SAAQ,uBAAU;IAGnD;QACI,KAAK,CACD,6BAA6B,EAC7B;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,uBAAuB,CAAC,gBAAgB;SACnD,EACD,IAAI,uCAAmB,CAAC,sCAAsC,EAAE,qDAAyB,CAAC,CAC7F,CAAC;IACN,CAAC;;AAdL,0DAeC;AAdiB,wCAAgB,GAAG,iBAAiB,CAAC"}
1
+ {"version":3,"file":"RunTripsRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.ts"],"names":[],"mappings":";;;AAAA,iFAAiF;AACjF,wIAA2G;AAC3G,wFAAqF;AACrF,mFAAkF;AAElF,MAAa,uBAAwB,SAAQ,uBAAU;IAGnD;QACI,KAAK,CACD,6BAA6B,EAC7B;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,uBAAuB,CAAC,gBAAgB;SACnD,EACD,IAAI,uCAAmB,CAAC,sCAAsC,EAAE,qDAAyB,CAAC,CAC7F,CAAC;IACN,CAAC;;AAdL,0DAeC;AAdiB,wCAAgB,GAAG,0CAAkC,CAAC"}
@@ -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 __importDefault = (this && this.__importDefault) || function (mod) {
21
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
22
13
  };
@@ -33,18 +24,16 @@ let StaticFileRedisRepository = exports.StaticFileRedisRepository = StaticFileRe
33
24
  prefix: StaticFileRedisRepository_1.NAMESPACE_PREFIX,
34
25
  });
35
26
  }
36
- getCsvAsJson(key) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- return yield new Promise((resolve, reject) => {
39
- const results = [];
40
- this.getReadableStream(key)
41
- .pipe((0, csv_parser_1.default)())
42
- .on("data", (data) => {
43
- results.push(data);
44
- })
45
- .on("end", () => {
46
- resolve(results);
47
- });
27
+ async getCsvAsJson(key) {
28
+ return await new Promise((resolve, reject) => {
29
+ const results = [];
30
+ this.getReadableStream(key)
31
+ .pipe((0, csv_parser_1.default)())
32
+ .on("data", (data) => {
33
+ results.push(data);
34
+ })
35
+ .on("end", () => {
36
+ resolve(results);
48
37
  });
49
38
  });
50
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StaticFileRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAAqF;AACrF,iEAAgE;AAChE,4DAA6B;AAItB,IAAM,yBAAyB,qEAA/B,MAAM,yBAA0B,SAAQ,uBAAU;IAGrD;QACI,KAAK,CAAC,+BAA+B,EAAE;YACnC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,2BAAyB,CAAC,gBAAgB;SACrD,CAAC,CAAC;IACP,CAAC;IAEY,YAAY,CAAC,GAAW;;YACjC,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACzC,MAAM,OAAO,GAAyB,EAAE,CAAC;gBAEzC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;qBACtB,IAAI,CAAC,IAAA,oBAAG,GAAE,CAAC;qBACX,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;oBACjB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACvB,CAAC,CAAC;qBACD,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBACZ,OAAO,CAAC,OAAO,CAAC,CAAC;gBACrB,CAAC,CAAC,CAAC;YACX,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;;AAtBa,0CAAgB,GAAG,kBAAkB,AAArB,CAAsB;oCAD3C,yBAAyB;IADrC,IAAA,qBAAU,GAAE;;GACA,yBAAyB,CAwBrC"}
1
+ {"version":3,"file":"StaticFileRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wFAAqF;AACrF,iEAAgE;AAChE,4DAA6B;AAItB,IAAM,yBAAyB,qEAA/B,MAAM,yBAA0B,SAAQ,uBAAU;IAGrD;QACI,KAAK,CAAC,+BAA+B,EAAE;YACnC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,2BAAyB,CAAC,gBAAgB;SACrD,CAAC,CAAC;IACP,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,GAAW;QACjC,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,MAAM,OAAO,GAAyB,EAAE,CAAC;YAEzC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;iBACtB,IAAI,CAAC,IAAA,oBAAG,GAAE,CAAC;iBACX,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBACjB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC,CAAC;iBACD,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACZ,OAAO,CAAC,OAAO,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;IACP,CAAC;;AAtBa,0CAAgB,GAAG,kBAAkB,AAArB,CAAsB;oCAD3C,yBAAyB;IADrC,IAAA,qBAAU,GAAE;;GACA,yBAAyB,CAwBrC"}
@@ -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.DeparturesRepository = void 0;
25
16
  const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
@@ -43,7 +34,7 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
43
34
  }, new golemio_validator_1.JSONSchemaValidator("DeparturesRepository", precomputed_1.DeparturesModel.jsonSchema));
44
35
  this.config = config;
45
36
  this.logger = logger;
46
- this.createAndPopulate = (sourceTableSuffix) => __awaiter(this, void 0, void 0, function* () {
37
+ this.createAndPopulate = async (sourceTableSuffix) => {
47
38
  const nodeEnv = this.config.getValue("env.NODE_ENV", "development");
48
39
  const timeConstraintLiteral = nodeEnv !== "test" ? `WHERE gtfs_timestamp(t.arrival_time, t4.date) > now() - interval '6 hours'` : "";
49
40
  /* eslint-disable max-len */
@@ -95,7 +86,7 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
95
86
  try {
96
87
  const tableName = precomputed_1.DeparturesModel.TABLE_NAME;
97
88
  const tmpTableName = tableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp;
98
- yield this.sequelizeModel.sequelize.query(`
89
+ await this.sequelizeModel.sequelize.query(`
99
90
  SET LOCAL search_path TO ${const_1.PG_SCHEMA};
100
91
  DROP TABLE IF EXISTS ${tmpTableName};
101
92
  CREATE TABLE ${tmpTableName} (LIKE ${tableName} including all);
@@ -109,10 +100,10 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
109
100
  this.logger.error(err);
110
101
  throw err;
111
102
  }
112
- });
113
- this.countDeparturesForPublicCache = (intervalParams) => __awaiter(this, void 0, void 0, function* () {
103
+ };
104
+ this.countDeparturesForPublicCache = async (intervalParams) => {
114
105
  try {
115
- return yield this.sequelizeModel.count({
106
+ return await this.sequelizeModel.count({
116
107
  where: {
117
108
  [sequelize_1.Op.and]: {
118
109
  departure_datetime: {
@@ -131,10 +122,10 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
131
122
  catch (err) {
132
123
  throw new golemio_errors_1.GeneralError("Error while getting number of departures", this.constructor.name, err);
133
124
  }
134
- });
135
- this.getDepaturesForPublicCache = (page, pageSize, intervalParams) => __awaiter(this, void 0, void 0, function* () {
125
+ };
126
+ this.getDepaturesForPublicCache = async (page, pageSize, intervalParams) => {
136
127
  try {
137
- return yield this.sequelizeModel.findAll({
128
+ return await this.sequelizeModel.findAll({
138
129
  attributes: [
139
130
  "stop_id",
140
131
  "departure_datetime",
@@ -168,13 +159,13 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
168
159
  catch (err) {
169
160
  throw new golemio_errors_1.GeneralError("Error while getting departures for public cache", this.constructor.name, err);
170
161
  }
171
- });
172
- this.replaceByTmp = (transaction) => __awaiter(this, void 0, void 0, function* () {
162
+ };
163
+ this.replaceByTmp = async (transaction) => {
173
164
  try {
174
165
  const tableName = precomputed_1.DeparturesModel.TABLE_NAME;
175
166
  const tmpTableName = tableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp;
176
167
  const dropTableName = tableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Drop;
177
- yield this.sequelizeModel.sequelize.query(`
168
+ await this.sequelizeModel.sequelize.query(`
178
169
  SET LOCAL search_path TO ${const_1.PG_SCHEMA};
179
170
  LOCK ${tableName} IN EXCLUSIVE MODE;
180
171
  ALTER TABLE ${tableName} RENAME TO ${dropTableName};
@@ -185,16 +176,16 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
185
176
  this.logger.error(err);
186
177
  throw err;
187
178
  }
188
- });
189
- this.analyze = () => __awaiter(this, void 0, void 0, function* () {
179
+ };
180
+ this.analyze = async () => {
190
181
  try {
191
- yield this.sequelizeModel.sequelize.query(`analyze ${const_1.PG_SCHEMA}.${precomputed_1.DeparturesModel.TABLE_NAME}${SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp};`);
182
+ await this.sequelizeModel.sequelize.query(`analyze ${const_1.PG_SCHEMA}.${precomputed_1.DeparturesModel.TABLE_NAME}${SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp};`);
192
183
  }
193
184
  catch (err) {
194
185
  this.logger.error(err);
195
186
  throw err;
196
187
  }
197
- });
188
+ };
198
189
  }
199
190
  };
200
191
  exports.DeparturesRepository = DeparturesRepository = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"DeparturesRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uEAA4D;AAG5D,gEAAuC;AACvC,8FAAqE;AAErE,wEAAqE;AAErE,yEAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAClF,mEAAiF;AACjF,iEAAwE;AACxE,+EAA4E;AAGrE,IAAM,oBAAoB,kCAA1B,MAAM,oBAAqB,SAAQ,sBAAa;IACnD,YACoC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KAAK,CACtC,WAAW,iBAAS,IAAI,6BAAe,CAAC,UAAU,GAAG,6CAAqB,CAAC,GAAG,GAAG,CACpF,CAAC;aACL;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACvB,MAAM,GAAG,CAAC;aACb;QACL,CAAC,CAAA,CAAC;IAzKF,CAAC;CA0KJ,CAAA;+BA1LY,oBAAoB;IADhC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;IAC9B,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GAHpB,oBAAoB,CA0LhC"}
1
+ {"version":3,"file":"DeparturesRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uEAA4D;AAG5D,gEAAuC;AACvC,8FAAqE;AAErE,wEAAqE;AAErE,yEAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAClF,mEAAiF;AACjF,iEAAwE;AACxE,+EAA4E;AAGrE,IAAM,oBAAoB,kCAA1B,MAAM,oBAAqB,SAAQ,sBAAa;IACnD,YACoC,MAA6B,EACnC,MAAuB;QAEjD,KAAK,CACD,sBAAsB,EACtB;YACI,WAAW,EAAE,6BAAe,CAAC,UAAU;YACvC,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,6BAAe,CAAC,cAAc;YACzD,kBAAkB,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC;YACtD,UAAU,EAAE,YAAY;SAC3B,EACD,IAAI,uCAAmB,CAAC,sBAAsB,EAAE,6BAAe,CAAC,UAAU,CAAC,CAC9E,CAAC;QAbsC,WAAM,GAAN,MAAM,CAAe;QAC3B,WAAM,GAAN,MAAM,CAAS;QAe9C,sBAAiB,GAAG,KAAK,EAAE,i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C,CAAA;;GAHpB,oBAAoB,CA0LhC"}
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.MinMaxStopSequencesRepository = void 0;
13
4
  const const_1 = require("../../../../schema-definitions/const");
@@ -25,7 +16,7 @@ class MinMaxStopSequencesRepository extends models_1.PostgresModel {
25
16
  savingType: "insertOnly",
26
17
  attributesToRemove: ["id", "created_at", "updated_at"],
27
18
  }, new golemio_validator_1.JSONSchemaValidator("MinMaxStopSequencesRepositoryValidator", ropid_gtfs_1.RopidGTFS.minMaxStopSequences.outputJsonSchema));
28
- this.populate = (sourceTableSuffix) => __awaiter(this, void 0, void 0, function* () {
19
+ this.populate = async (sourceTableSuffix) => {
29
20
  const sql = `
30
21
  SELECT
31
22
  trip_id,
@@ -44,13 +35,13 @@ class MinMaxStopSequencesRepository extends models_1.PostgresModel {
44
35
  `;
45
36
  try {
46
37
  const tmpTable = ropid_gtfs_1.RopidGTFS.minMaxStopSequences.pgTableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp;
47
- yield this.sequelizeModel.sequelize.query(`INSERT INTO "${const_1.PG_SCHEMA}"."${tmpTable}" ${sql};`);
38
+ await this.sequelizeModel.sequelize.query(`INSERT INTO "${const_1.PG_SCHEMA}"."${tmpTable}" ${sql};`);
48
39
  }
49
40
  catch (err) {
50
41
  helpers_1.log.error(err);
51
42
  throw err;
52
43
  }
53
- });
44
+ };
54
45
  }
55
46
  }
56
47
  exports.MinMaxStopSequencesRepository = MinMaxStopSequencesRepository;
@@ -1 +1 @@
1
- {"version":3,"file":"MinMaxStopSequencesRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAAuC;AACvC,0EAA4C;AAC5C,2EAAoE;AACpE,yEAAqF;AACrF,mFAAkF;AAClF,+EAA4E;AAE5E,MAAa,6BAA8B,SAAQ,sBAAa;IAC5D;QACI,KAAK,CACD,+BAA+B,EAC/B;YACI,yBAAyB,EAAE,sBAAS,CAAC,mBAAmB,CAAC,yBAAyB;YAClF,WAAW,EAAE,sBAAS,CAAC,mBAAmB,CAAC,WAAW;YACtD,QAAQ,EAAE,iBAAS;YACnB,UAAU,EAAE,YAAY;YACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC;SACzD,EACD,IAAI,uCAAmB,CAAC,wCAAwC,EAAE,sBAAS,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CACpH,CAAC;QAGC,aAAQ,GAAG,CAAO,iBAAwC,EAAiB,EAAE;YAChF,MAAM,GAAG,GAAG;;;;;;;;;;;;;oBAaA,iBAAS,yBAAyB,iBAAiB;;SAE9D,CAAC;YAEF,IAAI;gBACA,MAAM,QAAQ,GAAG,sBAAS,CAAC,mBAAmB,CAAC,WAAW,GAAG,6CAAqB,CAAC,GAAG,CAAC;gBAEvF,MAAM,IAAI,CAAC,cAAc,CAAC,SAAU,CAAC,KAAK,CAAC,gBAAgB,iBAAS,MAAM,QAAQ,KAAK,GAAG,GAAG,CAAC,CAAC;aAClG;YAAC,OAAO,GAAG,EAAE;gBACV,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACf,MAAM,GAAG,CAAC;aACb;QACL,CAAC,CAAA,CAAC;IA5BF,CAAC;CA6BJ;AA1CD,sEA0CC"}
1
+ {"version":3,"file":"MinMaxStopSequencesRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.ts"],"names":[],"mappings":";;;AAAA,gEAAuC;AACvC,0EAA4C;AAC5C,2EAAoE;AACpE,yEAAqF;AACrF,mFAAkF;AAClF,+EAA4E;AAE5E,MAAa,6BAA8B,SAAQ,sBAAa;IAC5D;QACI,KAAK,CACD,+BAA+B,EAC/B;YACI,yBAAyB,EAAE,sBAAS,CAAC,mBAAmB,CAAC,yBAAyB;YAClF,WAAW,EAAE,sBAAS,CAAC,mBAAmB,CAAC,WAAW;YACtD,QAAQ,EAAE,iBAAS;YACnB,UAAU,EAAE,YAAY;YACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC;SACzD,EACD,IAAI,uCAAmB,CAAC,wCAAwC,EAAE,sBAAS,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CACpH,CAAC;QAGC,aAAQ,GAAG,KAAK,EAAE,iBAAwC,EAAiB,EAAE;YAChF,MAAM,GAAG,GAAG;;;;;;;;;;;;;oBAaA,iBAAS,yBAAyB,iBAAiB;;SAE9D,CAAC;YAEF,IAAI;gBACA,MAAM,QAAQ,GAAG,sBAAS,CAAC,mBAAmB,CAAC,WAAW,GAAG,6CAAqB,CAAC,GAAG,CAAC;gBAEvF,MAAM,IAAI,CAAC,cAAc,CAAC,SAAU,CAAC,KAAK,CAAC,gBAAgB,iBAAS,MAAM,QAAQ,KAAK,GAAG,GAAG,CAAC,CAAC;aAClG;YAAC,OAAO,GAAG,EAAE;gBACV,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACf,MAAM,GAAG,CAAC;aACb;QACL,CAAC,CAAC;IA5BF,CAAC;CA6BJ;AA1CD,sEA0CC"}