@golemio/pid 3.4.0 → 3.4.1-dev.1622739356

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/dist/input-gateway/jis/JisInfotextsController.js +4 -13
  2. package/dist/input-gateway/jis/JisInfotextsController.js.map +1 -1
  3. package/dist/input-gateway/jis/JisInfotextsRouter.js +3 -12
  4. package/dist/input-gateway/jis/JisInfotextsRouter.js.map +1 -1
  5. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js +4 -13
  6. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js.map +1 -1
  7. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +3 -12
  8. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
  9. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +4 -13
  10. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
  11. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +3 -12
  12. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
  13. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js +4 -15
  14. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js.map +1 -1
  15. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js +8 -19
  16. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js.map +1 -1
  17. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +1 -1
  18. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -1
  19. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +56 -72
  20. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  21. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +32 -48
  22. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
  23. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +24 -37
  24. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
  25. package/dist/integration-engine/jis/services/JISInfotextsDataService.js +24 -35
  26. package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
  27. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +2 -3
  28. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
  29. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +12 -23
  30. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
  31. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -15
  32. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  33. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +3 -12
  34. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
  35. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +2 -11
  36. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  37. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +3 -12
  38. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
  39. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +21 -30
  40. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
  41. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js +20 -29
  42. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js.map +1 -1
  43. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js +33 -52
  44. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js.map +1 -1
  45. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js +12 -23
  46. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js.map +1 -1
  47. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js +12 -23
  48. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  49. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +33 -44
  50. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -1
  51. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +10 -21
  52. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
  53. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +15 -24
  54. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
  55. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js +3 -12
  56. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js.map +1 -1
  57. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js +3 -12
  58. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map +1 -1
  59. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +4 -13
  60. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
  61. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +30 -41
  62. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
  63. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +11 -22
  64. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
  65. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +1 -2
  66. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
  67. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +7 -16
  68. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
  69. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +3 -12
  70. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
  71. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +13 -17
  72. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
  73. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +13 -22
  74. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
  75. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js +1 -2
  76. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js.map +1 -1
  77. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js +12 -23
  78. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js.map +1 -1
  79. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +14 -25
  80. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
  81. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +26 -37
  82. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
  83. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +12 -23
  84. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
  85. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js +36 -49
  86. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js.map +1 -1
  87. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js +3 -14
  88. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js.map +1 -1
  89. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +1 -2
  90. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
  91. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +29 -40
  92. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +1 -1
  93. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +64 -81
  94. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  95. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +60 -79
  96. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +1 -1
  97. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +23 -34
  98. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +1 -1
  99. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +26 -38
  100. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -1
  101. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js +21 -32
  102. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js.map +1 -1
  103. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +43 -55
  104. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +1 -1
  105. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js +8 -18
  106. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js.map +1 -1
  107. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js +11 -21
  108. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
  109. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +8 -17
  110. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
  111. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +19 -30
  112. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
  113. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js +8 -1
  114. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js.map +1 -1
  115. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +31 -47
  116. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
  117. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +6 -17
  118. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -1
  119. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +4 -14
  120. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -1
  121. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +6 -17
  122. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -1
  123. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +34 -31
  124. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
  125. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +3 -12
  126. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
  127. package/dist/integration-engine/shared/RopidMetadataModel.js +35 -45
  128. package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
  129. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +13 -24
  130. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
  131. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +9 -6
  132. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
  133. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +113 -128
  134. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
  135. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +20 -34
  136. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
  137. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +3 -12
  138. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -1
  139. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js +3 -12
  140. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js.map +1 -1
  141. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +12 -21
  142. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
  143. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js +7 -16
  144. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js.map +1 -1
  145. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +22 -33
  146. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -1
  147. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js +31 -44
  148. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js.map +1 -1
  149. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +14 -25
  150. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -1
  151. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js +25 -37
  152. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js.map +1 -1
  153. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +53 -63
  154. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
  155. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js +57 -72
  156. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js.map +1 -1
  157. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js +15 -26
  158. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js.map +1 -1
  159. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +10 -21
  160. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
  161. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +19 -30
  162. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
  163. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +10 -21
  164. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
  165. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +5 -14
  166. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
  167. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +4 -14
  168. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
  169. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +1 -2
  170. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -1
  171. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +35 -49
  172. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -1
  173. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +11 -22
  174. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
  175. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +2 -3
  176. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
  177. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js +3 -12
  178. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js.map +1 -1
  179. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +3 -12
  180. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js.map +1 -1
  181. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +19 -29
  182. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
  183. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js +3 -12
  184. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js.map +1 -1
  185. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +3 -12
  186. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js.map +1 -1
  187. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +58 -55
  188. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  189. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js +64 -79
  190. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
  191. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +46 -59
  192. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
  193. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +39 -6
  194. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
  195. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js +8 -19
  196. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js.map +1 -1
  197. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js +2 -13
  198. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js.map +1 -1
  199. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +1 -2
  200. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
  201. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +10 -16
  202. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js.map +1 -1
  203. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +68 -40
  204. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
  205. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js +5 -14
  206. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js.map +1 -1
  207. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -2
  208. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
  209. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +1 -2
  210. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -1
  211. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js +4 -4
  212. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js.map +1 -1
  213. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js +1 -2
  214. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js.map +1 -1
  215. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js +4 -5
  216. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js.map +1 -1
  217. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js +3 -4
  218. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js.map +1 -1
  219. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js +7 -18
  220. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js.map +1 -1
  221. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +7 -16
  222. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
  223. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +40 -57
  224. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
  225. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +36 -53
  226. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
  227. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js +32 -41
  228. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js.map +1 -1
  229. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +61 -33
  230. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
  231. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js +4 -4
  232. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js.map +1 -1
  233. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js +4 -6
  234. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
  235. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js +38 -55
  236. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js.map +1 -1
  237. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js +32 -45
  238. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js.map +1 -1
  239. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js +81 -91
  240. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js.map +1 -1
  241. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js +43 -55
  242. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js.map +1 -1
  243. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js +37 -49
  244. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  245. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js +7 -18
  246. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js.map +1 -1
  247. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +41 -52
  248. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  249. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +32 -43
  250. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
  251. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +95 -115
  252. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
  253. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +150 -162
  254. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js.map +1 -1
  255. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js +82 -94
  256. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js.map +1 -1
  257. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +24 -35
  258. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
  259. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +15 -18
  260. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
  261. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js +1 -1
  262. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js.map +1 -1
  263. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +11 -21
  264. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
  265. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -3
  266. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  267. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +5 -15
  268. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
  269. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +4 -13
  270. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -1
  271. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +4 -13
  272. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -1
  273. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +8 -17
  274. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  275. package/dist/output-gateway/pid/data-access/DeparturesRepository.js +40 -53
  276. package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
  277. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +62 -75
  278. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -1
  279. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
  280. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
  281. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +6 -15
  282. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
  283. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +11 -21
  284. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  285. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js +20 -27
  286. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js.map +1 -1
  287. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +16 -25
  288. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
  289. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +2 -4
  290. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
  291. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +12 -23
  292. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  293. package/dist/output-gateway/pid/service/facade/StopFacade.js +27 -38
  294. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  295. package/dist/output-gateway/pid/service/facade/TransferFacade.js +32 -39
  296. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  297. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +3 -4
  298. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -1
  299. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +8 -12
  300. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -1
  301. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +1 -2
  302. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -1
  303. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +1 -2
  304. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -1
  305. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js +4 -13
  306. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -1
  307. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js +4 -13
  308. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -1
  309. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js +9 -18
  310. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -1
  311. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js +13 -26
  312. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js.map +1 -1
  313. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js +22 -33
  314. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js.map +1 -1
  315. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +9 -20
  316. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  317. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +23 -34
  318. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
  319. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +153 -172
  320. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
  321. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js +2 -2
  322. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js.map +1 -1
  323. package/dist/output-gateway/public/service/VPSubscriber.js +8 -19
  324. package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -1
  325. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +100 -117
  326. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -1
  327. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +18 -29
  328. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
  329. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +20 -31
  330. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -1
  331. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +15 -26
  332. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
  333. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +1 -2
  334. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  335. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +3 -14
  336. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
  337. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +7 -18
  338. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
  339. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +35 -46
  340. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  341. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +16 -22
  342. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
  343. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +9 -10
  344. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -1
  345. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js +5 -15
  346. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js.map +1 -1
  347. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +2 -3
  348. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -1
  349. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js +2 -15
  350. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js.map +1 -1
  351. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js +1 -13
  352. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
  353. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +14 -25
  354. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -1
  355. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +3 -12
  356. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
  357. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +4 -13
  358. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
  359. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +5 -14
  360. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
  361. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +90 -102
  362. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
  363. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +3 -12
  364. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
  365. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +43 -51
  366. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
  367. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +28 -37
  368. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
  369. package/dist/output-gateway/shared/DepartureCalculator.js +1 -1
  370. package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -1
  371. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +40 -48
  372. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -1
  373. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +7 -16
  374. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
  375. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +10 -19
  376. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
  377. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js +5 -2
  378. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js.map +1 -1
  379. package/dist/schema-definitions/ropid-gtfs/index.js +16 -4
  380. package/dist/schema-definitions/ropid-gtfs/index.js.map +1 -1
  381. package/package.json +3 -3
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
14
  Object.defineProperty(exports, "__esModule", { value: true });
24
15
  exports.StopTimesTripScopeHandler = void 0;
25
16
  const OgModuleToken_1 = require("../../../../ioc/OgModuleToken");
@@ -36,45 +27,43 @@ let StopTimesTripScopeHandler = exports.StopTimesTripScopeHandler = class StopTi
36
27
  this.stopTimeRepository = stopTimeRepository;
37
28
  this.tripStopTimesTransformation = new PublicVPTripStopTimesTransformation_1.PublicVPTripStopTimesTransformation();
38
29
  }
39
- handle(output, vehiclePosition) {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- const delayComputationCache = yield this.delayComputationRepository.getDelayComputationCache(vehiclePosition.gtfs_trip_id);
42
- if (!delayComputationCache) {
43
- throw new golemio_errors_1.GeneralError("delay_computation_cache_not_found", this.constructor.name, undefined, 500);
44
- }
45
- const filteredStopTimes = this.filterNoStopWaypoints(delayComputationCache.stop_times);
46
- const stopTimes = this.tripStopTimesTransformation.transformArray(filteredStopTimes);
47
- const stopTimesWithDelay = yield this.stopTimeRepository.getPublicStopTimeCache(vehiclePosition.vehicle_id, vehiclePosition.gtfs_trip_id);
48
- if (stopTimesWithDelay.length > 0) {
49
- let prevStopArrivalTime = null;
50
- let prevStopDepartureTime = null;
51
- for (const stopTimeWithDelay of stopTimesWithDelay) {
52
- // note: We can improve performance here if needed
53
- const stopTime = stopTimes.find((currentStopTime) => currentStopTime.properties.stop_sequence === stopTimeWithDelay.sequence);
54
- if (stopTime) {
55
- // note: optimization point here in case of worsening performance on output API (additional cache)
56
- const rtArrivalTime = stopTimeWithDelay.arr_delay === null
57
- ? null
58
- : luxon_1.DateTime.fromFormat(stopTime.properties.arrival_time, "HH:mm:ss").plus({
59
- seconds: stopTimeWithDelay.arr_delay,
60
- });
61
- let rtDepartureTime = stopTimeWithDelay.dep_delay === null
62
- ? null
63
- : luxon_1.DateTime.fromFormat(stopTime.properties.departure_time, "HH:mm:ss").plus({
64
- seconds: stopTimeWithDelay.dep_delay,
65
- });
66
- // note: for better performance, we should address this on the DB side in the future
67
- const { currentArrival, currentDeparture } = this.checkStopTimesSequence(rtArrivalTime, prevStopArrivalTime, rtDepartureTime, prevStopDepartureTime);
68
- prevStopArrivalTime = currentArrival;
69
- prevStopDepartureTime = currentDeparture;
70
- stopTime.properties.realtime_arrival_time = currentArrival ? currentArrival.toFormat("HH:mm:ss") : null;
71
- stopTime.properties.realtime_departure_time = currentDeparture ? currentDeparture.toFormat("HH:mm:ss") : null;
72
- }
30
+ async handle(output, vehiclePosition) {
31
+ const delayComputationCache = await this.delayComputationRepository.getDelayComputationCache(vehiclePosition.gtfs_trip_id);
32
+ if (!delayComputationCache) {
33
+ throw new golemio_errors_1.GeneralError("delay_computation_cache_not_found", this.constructor.name, undefined, 500);
34
+ }
35
+ const filteredStopTimes = this.filterNoStopWaypoints(delayComputationCache.stop_times);
36
+ const stopTimes = this.tripStopTimesTransformation.transformArray(filteredStopTimes);
37
+ const stopTimesWithDelay = await this.stopTimeRepository.getPublicStopTimeCache(vehiclePosition.vehicle_id, vehiclePosition.gtfs_trip_id);
38
+ if (stopTimesWithDelay.length > 0) {
39
+ let prevStopArrivalTime = null;
40
+ let prevStopDepartureTime = null;
41
+ for (const stopTimeWithDelay of stopTimesWithDelay) {
42
+ // note: We can improve performance here if needed
43
+ const stopTime = stopTimes.find((currentStopTime) => currentStopTime.properties.stop_sequence === stopTimeWithDelay.sequence);
44
+ if (stopTime) {
45
+ // note: optimization point here in case of worsening performance on output API (additional cache)
46
+ const rtArrivalTime = stopTimeWithDelay.arr_delay === null
47
+ ? null
48
+ : luxon_1.DateTime.fromFormat(stopTime.properties.arrival_time, "HH:mm:ss").plus({
49
+ seconds: stopTimeWithDelay.arr_delay,
50
+ });
51
+ let rtDepartureTime = stopTimeWithDelay.dep_delay === null
52
+ ? null
53
+ : luxon_1.DateTime.fromFormat(stopTime.properties.departure_time, "HH:mm:ss").plus({
54
+ seconds: stopTimeWithDelay.dep_delay,
55
+ });
56
+ // note: for better performance, we should address this on the DB side in the future
57
+ const { currentArrival, currentDeparture } = this.checkStopTimesSequence(rtArrivalTime, prevStopArrivalTime, rtDepartureTime, prevStopDepartureTime);
58
+ prevStopArrivalTime = currentArrival;
59
+ prevStopDepartureTime = currentDeparture;
60
+ stopTime.properties.realtime_arrival_time = currentArrival ? currentArrival.toFormat("HH:mm:ss") : null;
61
+ stopTime.properties.realtime_departure_time = currentDeparture ? currentDeparture.toFormat("HH:mm:ss") : null;
73
62
  }
74
63
  }
75
- output.stop_times = (0, Geo_1.buildGeojsonFeatureCollection)(stopTimes);
76
- return output;
77
- });
64
+ }
65
+ output.stop_times = (0, Geo_1.buildGeojsonFeatureCollection)(stopTimes);
66
+ return output;
78
67
  }
79
68
  filterNoStopWaypoints(stopTimes) {
80
69
  return stopTimes.filter((stopTime) => !stopTime.is_no_stop_waypoint);
@@ -1 +1 @@
1
- {"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";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,SAAS,CAAC,CAAC;YAC7D,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;IAEO,qBAAqB,CAAC,SAAsB;QAChD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAmB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACpF,CAAC;IAEO,sBAAsB,CAC1B,SAAmB,EACnB,WAAqB,EACrB,WAAqB,EACrB,aAAuB;QAEvB,MAAM,WAAW,GAA2E;YACxF,cAAc,EAAE,SAAS;YACzB,gBAAgB,EAAE,WAAW;SAChC,CAAC;QACF,IAAI,SAAS,GAAG,WAAW,IAAI,aAAa,GAAG,WAAW,IAAI,WAAW,GAAG,WAAW,EAAE;YACrF,WAAW,CAAC,gBAAgB,GAAG,IAAI,CAAC;SACvC;QACD,IAAI,aAAa,GAAG,SAAS,IAAI,WAAW,GAAG,SAAS,EAAE;YACtD,WAAW,CAAC,cAAc,GAAG,IAAI,CAAC;SACrC;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ,CAAA;oCA/FY,yBAAyB;IADrC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,0BAA0B,CAAC,CAAA;IAChD,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,wBAAwB,CAAC,CAAA;;GAL1C,yBAAyB,CA+FrC"}
1
+ {"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,iEAA6D;AAC7D,6HAAoI;AAGpI,+DAAsF;AAEtF,6EAAwE;AACxE,2DAA2D;AAC3D,iEAAwE;AACxE,yFAAsF;AAG/E,IAAM,yBAAyB,uCAA/B,MAAM,yBAA0B,SAAQ,mEAAgC;IAG3E,YAC8D,0BAAuD,EACzD,kBAAuC;QAE/F,KAAK,EAAE,CAAC;QAHk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B,EACrB,aAAuB;QAEvB,MAAM,WAAW,GAA2E;YACxF,cAAc,EAAE,SAAS;YACzB,gBAAgB,EAAE,WAAW;SAChC,CAAC;QACF,IAAI,SAAS,GAAG,WAAW,IAAI,aAAa,GAAG,WAAW,IAAI,WAAW,GAAG,WAAW,EAAE;YACrF,WAAW,CAAC,gBAAgB,GAAG,IAAI,CAAC;SACvC;QACD,IAAI,aAAa,GAAG,SAAS,IAAI,WAAW,GAAG,SAAS,EAAE;YACtD,WAAW,CAAC,cAAc,GAAG,IAAI,CAAC;SACrC;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ,CAAA;oCA/FY,yBAAyB;IADrC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,0BAA0B,CAAC,CAAA;IAChD,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,wBAAwB,CAAC,CAAA;;GAL1C,yBAAyB,CA+FrC"}
@@ -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.VehicleDescriptorTripScopeHandler = void 0;
25
16
  const VehicleDescriptorCachedRepository_1 = require("../../../../data-access/VehicleDescriptorCachedRepository");
@@ -33,20 +24,23 @@ let VehicleDescriptorTripScopeHandler = exports.VehicleDescriptorTripScopeHandle
33
24
  this.vehicleDescriptorRepository = vehicleDescriptorRepository;
34
25
  this.vehicleDescriptorTransformation = new PublicVPVehicleDescriptorTransformation_1.PublicVPVehicleDescriptorTransformation();
35
26
  }
36
- handle(output, vehiclePosition) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- output.vehicle_descriptor = this.vehicleDescriptorTransformation.transformElement(vehiclePosition);
39
- const registrationNumber = vehiclePosition.detailed_info.registration_number;
40
- if (registrationNumber) {
41
- const routeType = vehiclePosition.route_type;
42
- const descriptor = yield this.vehicleDescriptorRepository.getOneByRegNumber(routeType, registrationNumber);
43
- if (!descriptor) {
44
- return output;
45
- }
46
- output.vehicle_descriptor = Object.assign(Object.assign({}, output.vehicle_descriptor), { vehicle_type: `${descriptor.manufacturer} ${descriptor.type}`, is_air_conditioned: descriptor.is_air_conditioned, has_usb_chargers: descriptor.has_usb_chargers });
27
+ async handle(output, vehiclePosition) {
28
+ output.vehicle_descriptor = this.vehicleDescriptorTransformation.transformElement(vehiclePosition);
29
+ const registrationNumber = vehiclePosition.detailed_info.registration_number;
30
+ if (registrationNumber) {
31
+ const routeType = vehiclePosition.route_type;
32
+ const descriptor = await this.vehicleDescriptorRepository.getOneByRegNumber(routeType, registrationNumber);
33
+ if (!descriptor) {
34
+ return output;
47
35
  }
48
- return output;
49
- });
36
+ output.vehicle_descriptor = {
37
+ ...output.vehicle_descriptor,
38
+ vehicle_type: `${descriptor.manufacturer} ${descriptor.type}`,
39
+ is_air_conditioned: descriptor.is_air_conditioned,
40
+ has_usb_chargers: descriptor.has_usb_chargers,
41
+ };
42
+ }
43
+ return output;
50
44
  }
51
45
  };
52
46
  exports.VehicleDescriptorTripScopeHandler = VehicleDescriptorTripScopeHandler = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"VehicleDescriptorTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.ts"],"names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orTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iHAA6G;AAE7G,iEAA6D;AAC7D,qIAA4I;AAE5I,iEAAwE;AACxE,yFAAsF;AAG/E,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,mEAAgC;IAGnF,YAEY,2BAA8D;QAEtE,KAAK,EAAE,CAAC;QAFA,gCAA2B,GAA3B,2BAA2B,CAAmC;QAGtE,IAAI,CAAC,+BAA+B,GAAG,IAAI,iFAAuC,EAAE,CAAC;IACzF,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,MAA8B,EAAE,eAAmC;QACnF,MAAM,CAAC,kBAAkB,GAAG,IAAI,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QAEnG,MAAM,kBAAkB,GAAG,eAAe,CAAC,aAAa,CAAC,mBAAmB,CAAC;QAC7E,IAAI,kBAAkB,EAAE;YACpB,MAAM,SAAS,GAAG,eAAe,CAAC,UAAU,CAAC;YAC7C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,iBAAiB,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;YAE3G,IAAI,CAAC,UAAU,EAAE;gBACb,OAAO,MAAM,CAAC;aACjB;YAED,MAAM,CAAC,kBAAkB,GAAG;gBACxB,GAAG,MAAM,CAAC,kBAAkB;gBAC5B,YAAY,EAAE,GAAG,UAAU,CAAC,YAAY,IAAI,UAAU,CAAC,IAAI,EAAE;gBAC7D,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;gBACjD,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;aAChD,CAAC;SACL;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;4CAjCY,iCAAiC;IAD7C,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,iCAAiC,CAAC,CAAA;qCACnB,qEAAiC;GALjE,iCAAiC,CAiC7C"}
@@ -11,14 +11,13 @@ class PublicDepartureTransformation extends AbstractTransformation_1.AbstractTra
11
11
  super(...arguments);
12
12
  this.name = "PublicDepartureTransformation";
13
13
  this.transformInternal = (inputDto) => {
14
- var _a, _b, _c, _d, _e, _f, _g;
15
14
  const { departure, vehiclePosition, vehicleDescriptor } = inputDto;
16
- const delayInSeconds = (_a = vehiclePosition === null || vehiclePosition === void 0 ? void 0 : vehiclePosition.delay) !== null && _a !== void 0 ? _a : null;
15
+ const delayInSeconds = vehiclePosition?.delay ?? null;
17
16
  const departureTime = new Date(departure.departure_datetime);
18
17
  const arrivalTime = departure.arrival_datetime ? new Date(departure.arrival_datetime) : null;
19
18
  const predictedDepartureTime = DepartureCalculator_1.DepartureCalculator.getPredictedDepartureTime(departureTime, arrivalTime, delayInSeconds);
20
19
  let vehicle;
21
- if ((vehiclePosition === null || vehiclePosition === void 0 ? void 0 : vehiclePosition.state_position) === const_1.StatePositionEnum.CANCELED || !vehiclePosition) {
20
+ if (vehiclePosition?.state_position === const_1.StatePositionEnum.CANCELED || !vehiclePosition) {
22
21
  vehicle = {
23
22
  id: null,
24
23
  is_wheelchair_accessible: null,
@@ -28,16 +27,16 @@ class PublicDepartureTransformation extends AbstractTransformation_1.AbstractTra
28
27
  }
29
28
  else {
30
29
  vehicle = {
31
- id: (_b = vehiclePosition.vehicle_id) !== null && _b !== void 0 ? _b : null,
32
- is_wheelchair_accessible: (_c = vehiclePosition.detailed_info.is_wheelchair_accessible) !== null && _c !== void 0 ? _c : null,
33
- is_air_conditioned: (_d = vehicleDescriptor === null || vehicleDescriptor === void 0 ? void 0 : vehicleDescriptor.is_air_conditioned) !== null && _d !== void 0 ? _d : null,
34
- has_charger: (_e = vehicleDescriptor === null || vehicleDescriptor === void 0 ? void 0 : vehicleDescriptor.has_usb_chargers) !== null && _e !== void 0 ? _e : null,
30
+ id: vehiclePosition.vehicle_id ?? null,
31
+ is_wheelchair_accessible: vehiclePosition.detailed_info.is_wheelchair_accessible ?? null,
32
+ is_air_conditioned: vehicleDescriptor?.is_air_conditioned ?? null,
33
+ has_charger: vehicleDescriptor?.has_usb_chargers ?? null,
35
34
  };
36
35
  }
37
36
  return {
38
37
  departure: {
39
- timestamp_scheduled: (_f = RopidRouterUtils_1.RopidRouterUtils.formatTimestamp(departureTime)) !== null && _f !== void 0 ? _f : departure.departure_datetime,
40
- timestamp_predicted: (_g = RopidRouterUtils_1.RopidRouterUtils.formatTimestamp(predictedDepartureTime)) !== null && _g !== void 0 ? _g : departure.departure_datetime,
38
+ timestamp_scheduled: RopidRouterUtils_1.RopidRouterUtils.formatTimestamp(departureTime) ?? departure.departure_datetime,
39
+ timestamp_predicted: RopidRouterUtils_1.RopidRouterUtils.formatTimestamp(predictedDepartureTime) ?? departure.departure_datetime,
41
40
  delay_seconds: delayInSeconds,
42
41
  minutes: DepartureCalculator_1.DepartureCalculator.getDepartureMinutes(predictedDepartureTime),
43
42
  },
@@ -53,7 +52,7 @@ class PublicDepartureTransformation extends AbstractTransformation_1.AbstractTra
53
52
  trip: {
54
53
  id: departure.trip_id,
55
54
  headsign: departure.trip_headsign,
56
- is_canceled: (vehiclePosition === null || vehiclePosition === void 0 ? void 0 : vehiclePosition.state_position) === const_1.StatePositionEnum.CANCELED,
55
+ is_canceled: vehiclePosition?.state_position === const_1.StatePositionEnum.CANCELED,
57
56
  },
58
57
  vehicle,
59
58
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PublicDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/transformations/PublicDepartureTransformation.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAG5D,6EAAqE;AACrE,uEAA+D;AAC/D,6GAA0G;AAC1G,6CAA8C;AAE9C,MAAa,6BAA8B,SAAQ,+CAGlD;IAHD;;QAIW,SAAI,GAAG,+BAA+B,CAAC;QAEpC,sBAAiB,GAAG,CAAC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AAa,CAAC,mCAAI,SAAS,CAAC,kBAAkB;oBACpG,mBAAmB,EAAE,MAAA,mCAAgB,CAAC,eAAe,CAAC,sBAAsB,CAAC,mCAAI,SAAS,CAAC,kBAAkB;oBAC7G,aAAa,EAAE,cAAc;oBAC7B,OAAO,EAAE,yCAAmB,CAAC,mBAAmB,CAAC,sBAAsB,CAAC;iBAC3E;gBACD,IAAI,EAAE;oBACF,EAAE,EAAE,SAAS,CAAC,OAAO;oBACrB,QAAQ,EAAE,SAAS,CAAC,aAAa;oBACjC,aAAa,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC;iBACtD;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,kCAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE;oBAC3D,UAAU,EAAE,SAAS,CAAC,gBAAgB;iBACzC;gBACD,IAAI,EAAE;oBACF,EAAE,EAAE,SAAS,CAAC,OAAO;oBACrB,QAAQ,EAAE,SAAS,CAAC,aAAa;oBACjC,WAAW,EAAE,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,cAAc,MAAK,yBAAiB,CAAC,QAAQ;iBAC9E;gBACD,OAAO;aACV,CAAC;QACN,CAAC,CAAC;QAEF;;;;WAIG;QACK,0BAAqB,GAAG,CAAC,QAA2C,EAAiB,EAAE;YAC3F,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC;YAEzC,IAAI,QAAQ,EAAE;gBACV,OAAO,QAAQ,CAAC,sBAAsB,CAAC;aAC1C;YAED,OAAO,SAAS,CAAC,aAAa,CAAC;QACnC,CAAC,CAAC;IACN,CAAC;CAAA;AAvED,sEAuEC"}
1
+ {"version":3,"file":"PublicDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/transformations/PublicDepartureTransformation.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAG5D,6EAAqE;AACrE,uEAA+D;AAC/D,6GAA0G;AAC1G,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EAAE,mCAAgB,CAAC,eAAe,CAAC,sBAAsB,CAAC,IAAI,SAAS,CAAC,kBAAkB;oBAC7G,aAAa,EAAE,cAAc;oBAC7B,OAAO,EAAE,yCAAmB,CAAC,mBAAmB,CAAC,sBAAsB,CAAC;iBAC3E;gBACD,IAAI,EAAE;oBACF,EAAE,EAAE,SAAS,CAAC,OAAO;oBACrB,QAAQ,EAAE,SAAS,CAAC,aAAa;oBACjC,aAAa,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC;iBACtD;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,kCAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE;oBAC3D,UAAU,EAAE,SAAS,CAAC,gBAAgB;iBACzC;gBACD,IAAI,EAAE;oBACF,EAAE,EAAE,SAAS,CAAC,OAAO;oBACrB,QAAQ,EAAE,SAAS,CAAC,aAAa;oBACjC,WAAW,EAAE,eAAe,EAAE,cAAc,KAAK,yBAAiB,CAAC,QAAQ;iBAC9E;gBACD,OAAO;aACV,CAAC;QACN,CAAC,CAAC;QAEF;;;;WAIG;QACK,0BAAqB,GAAG,CAAC,QAA2C,EAAiB,EAAE;YAC3F,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC;YAEzC,IAAI,QAAQ,EAAE;gBACV,OAAO,QAAQ,CAAC,sBAAsB,CAAC;aAC1C;YAED,OAAO,SAAS,CAAC,aAAa,CAAC;QACnC,CAAC,CAAC;IACN,CAAC;CAAA;AAvED,sEAuEC"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.PublicVehiclePositionsTransformation = void 0;
15
4
  const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
@@ -19,10 +8,11 @@ class PublicVehiclePositionsTransformation extends AbstractTransformation_1.Abst
19
8
  constructor() {
20
9
  super(...arguments);
21
10
  this.name = "OutputDtoTransformation";
22
- this.transformInternal = (_a) => {
23
- var _b;
24
- var { detailed_info } = _a, element = __rest(_a, ["detailed_info"]);
25
- return (0, Geo_1.buildGeojsonFeature)(Object.assign(Object.assign({}, element), { route_type: ((_b = RouteTypeEnums_1.GTFSRouteTypeEnum[element.route_type]) !== null && _b !== void 0 ? _b : RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase() }), "lng", "lat", true);
11
+ this.transformInternal = ({ detailed_info, ...element }) => {
12
+ return (0, Geo_1.buildGeojsonFeature)({
13
+ ...element,
14
+ route_type: (RouteTypeEnums_1.GTFSRouteTypeEnum[element.route_type] ?? RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
15
+ }, "lng", "lat", true);
26
16
  };
27
17
  }
28
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PublicVehiclePositionsTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uEAA4D;AAE5D,6GAA0G;AAC1G,+DAA6F;AAE7F,MAAa,oCAAqC,SAAQ,+CAA2D;IAArH;;QACW,SAAI,GAAG,yBAAyB,CAAC;QAE9B,sBAAiB,GAAG,CAAC,EAAiD,EAAE,EAAE;;gBAArD,EAAE,aAAa,OAAkC,EAA7B,OAAO,cAA3B,iBAA6B,CAAF;YACtD,OAAO,IAAA,yBAAmB,kCAEf,OAAO,KACV,UAAU,EAAE,CAAC,MAAA,kCAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,mCAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,KAEhG,KAAK,EACL,KAAK,EACL,IAAI,CACP,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA;AAdD,oFAcC"}
1
+ {"version":3,"file":"PublicVehiclePositionsTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAE5D,6GAA0G;AAC1G,+DAA6F;AAE7F,MAAa,oCAAqC,SAAQ,+CAA2D;IAArH;;QACW,SAAI,GAAG,yBAAyB,CAAC;QAE9B,sBAAiB,GAAG,CAAC,EAAE,aAAa,EAAE,GAAG,OAAO,EAAsB,EAAE,EAAE;YAChF,OAAO,IAAA,yBAAmB,EACtB;gBACI,GAAG,OAAO;gBACV,UAAU,EAAE,CAAC,kCAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;aAC/F,EACD,KAAK,EACL,KAAK,EACL,IAAI,CACP,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA;AAdD,oFAcC"}
@@ -15,15 +15,14 @@ let PublicGtfsTripInfoTransformation = exports.PublicGtfsTripInfoTransformation
15
15
  super(...arguments);
16
16
  this.name = "GtfsTripInfoTransformation";
17
17
  this.transformInternal = (gtfsTrip) => {
18
- var _a, _b, _c;
19
18
  const routeType = gtfsTrip.route.route_type;
20
19
  return {
21
20
  gtfs_trip_id: gtfsTrip.trip_id,
22
- route_type: ((_a = RouteTypeEnums_1.GTFSRouteTypeEnum[routeType !== null && routeType !== void 0 ? routeType : 1700]) !== null && _a !== void 0 ? _a : RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
21
+ route_type: (RouteTypeEnums_1.GTFSRouteTypeEnum[routeType ?? 1700] ?? RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
23
22
  route_short_name: gtfsTrip.route.route_short_name,
24
23
  shape_id: gtfsTrip.shape_id,
25
24
  origin_route_name: gtfsTrip.route.route_id.substring(1),
26
- run_number: (_c = (_b = gtfsTrip.schedule) === null || _b === void 0 ? void 0 : _b.run_number) !== null && _c !== void 0 ? _c : null,
25
+ run_number: gtfsTrip.schedule?.run_number ?? null,
27
26
  trip_headsign: gtfsTrip.trip_headsign,
28
27
  };
29
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PublicGtfsTripInfoTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0EAA4D;AAG5D,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,gCAAgC,8CAAtC,MAAM,gCAAiC,SAAQ,+CAGrD;IAHM;;QAII,SAAI,GAAG,4BAA4B,CAAC;QAEjC,sBAAiB,GAAG,CAAC,QAAkC,EAAE,EAAE;;YACjE,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC;YAC5C,OAAO;gBACH,YAAY,EAAE,QAAQ,CAAC,OAAO;gBAC9B,UAAU,EAAE,CAAC,MAAA,kCAAiB,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,CAAC,mCAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;gBAC3F,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,gBAAgB;gBACjD,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,iBAAiB,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;gBACvD,UAAU,EAAE,MAAA,MAAA,QAAQ,CAAC,QAAQ,0CAAE,UAAU,mCAAI,IAAI;gBACjD,aAAa,EAAE,QAAQ,CAAC,aAAa;aACxC,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;2CAlBY,gCAAgC;IAD5C,IAAA,qBAAU,GAAE;GACA,gCAAgC,CAkB5C"}
1
+ {"version":3,"file":"PublicGtfsTripInfoTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0EAA4D;AAG5D,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,gCAAgC,8CAAtC,MAAM,gCAAiC,SAAQ,+CAGrD;IAHM;;QAII,SAAI,GAAG,4BAA4B,CAAC;QAEjC,sBAAiB,GAAG,CAAC,QAAkC,EAAE,EAAE;YACjE,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC;YAC5C,OAAO;gBACH,YAAY,EAAE,QAAQ,CAAC,OAAO;gBAC9B,UAAU,EAAE,CAAC,kCAAiB,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;gBAC3F,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,gBAAgB;gBACjD,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,iBAAiB,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;gBACvD,UAAU,EAAE,QAAQ,CAAC,QAAQ,EAAE,UAAU,IAAI,IAAI;gBACjD,aAAa,EAAE,QAAQ,CAAC,aAAa;aACxC,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;2CAlBY,gCAAgC;IAD5C,IAAA,qBAAU,GAAE;GACA,gCAAgC,CAkB5C"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.PublicVPTripInfoTransformation = void 0;
15
4
  const RouteTypeEnums_1 = require("../../../../../helpers/RouteTypeEnums");
@@ -19,13 +8,11 @@ class PublicVPTripInfoTransformation extends AbstractTransformation_1.AbstractTr
19
8
  constructor() {
20
9
  super(...arguments);
21
10
  this.name = "TripInfoTransformation";
22
- this.transformInternal = (_a) => {
23
- var _b;
24
- var { detailed_info } = _a, element = __rest(_a, ["detailed_info"]);
11
+ this.transformInternal = ({ detailed_info, ...element }) => {
25
12
  const originTimestamp = new Date(detailed_info.origin_timestamp);
26
13
  return {
27
14
  gtfs_trip_id: element.gtfs_trip_id,
28
- route_type: ((_b = RouteTypeEnums_1.GTFSRouteTypeEnum[element.route_type]) !== null && _b !== void 0 ? _b : RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
15
+ route_type: (RouteTypeEnums_1.GTFSRouteTypeEnum[element.route_type] ?? RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
29
16
  route_short_name: element.gtfs_route_short_name,
30
17
  shape_id: detailed_info.shape_id,
31
18
  origin_route_name: detailed_info.origin_route_name,
@@ -1 +1 @@
1
- {"version":3,"file":"PublicVPTripInfoTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,0EAA4D;AAE5D,+CAA8C;AAE9C,6GAA0G;AAG1G,MAAa,8BAA+B,SAAQ,+CAA2E;IAA/H;;QACW,SAAI,GAAG,wBAAwB,CAAC;QAE7B,sBAAiB,GAAG,CAAC,EAAiD,EAAE,EAAE;;gBAArD,EAAE,aAAa,OAAkC,EAA7B,OAAO,cAA3B,iBAA6B,CAAF;YACtD,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;YAEjE,OAAO;gBACH,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,UAAU,EAAE,CAAC,MAAA,kCAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,mCAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;gBAC5F,gBAAgB,EAAE,OAAO,CAAC,qBAAqB;gBAC/C,QAAQ,EAAE,aAAa,CAAC,QAAQ;gBAChC,iBAAiB,EAAE,aAAa,CAAC,iBAAiB;gBAClD,UAAU,EAAE,aAAa,CAAC,UAAU;gBACpC,aAAa,EAAE,aAAa,CAAC,aAAa;gBAC1C,QAAQ,EAAE;oBACN,IAAI,EAAE,OAAmC;oBACzC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC;iBAC1C;gBACD,mBAAmB,EAAE,aAAa,CAAC,mBAAmB;gBACtD,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,cAAc,EAAE,OAAO,CAAC,cAAc;gBACtC,kBAAkB,EAAE,aAAa,CAAC,kBAAkB;gBACpD,gBAAgB,EAAE,yBAAgB,CAAC,eAAe,CAAC,eAAe,EAAE,eAAe,CAAC;aACvF,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA;AA1BD,wEA0BC"}
1
+ {"version":3,"file":"PublicVPTripInfoTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.ts"],"names":[],"mappings":";;;AAAA,0EAA4D;AAE5D,+CAA8C;AAE9C,6GAA0G;AAG1G,MAAa,8BAA+B,SAAQ,+CAA2E;IAA/H;;QACW,SAAI,GAAG,wBAAwB,CAAC;QAE7B,sBAAiB,GAAG,CAAC,EAAE,aAAa,EAAE,GAAG,OAAO,EAAsB,EAAE,EAAE;YAChF,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;YAEjE,OAAO;gBACH,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,UAAU,EAAE,CAAC,kCAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;gBAC5F,gBAAgB,EAAE,OAAO,CAAC,qBAAqB;gBAC/C,QAAQ,EAAE,aAAa,CAAC,QAAQ;gBAChC,iBAAiB,EAAE,aAAa,CAAC,iBAAiB;gBAClD,UAAU,EAAE,aAAa,CAAC,UAAU;gBACpC,aAAa,EAAE,aAAa,CAAC,aAAa;gBAC1C,QAAQ,EAAE;oBACN,IAAI,EAAE,OAAmC;oBACzC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC;iBAC1C;gBACD,mBAAmB,EAAE,aAAa,CAAC,mBAAmB;gBACtD,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,cAAc,EAAE,OAAO,CAAC,cAAc;gBACtC,kBAAkB,EAAE,aAAa,CAAC,kBAAkB;gBACpD,gBAAgB,EAAE,yBAAgB,CAAC,eAAe,CAAC,eAAe,EAAE,eAAe,CAAC;aACvF,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA;AA1BD,wEA0BC"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.PublicVPTripStopTimesTransformation = void 0;
15
4
  const AccessibilityEnums_1 = require("../../../../../helpers/AccessibilityEnums");
@@ -20,8 +9,7 @@ class PublicVPTripStopTimesTransformation extends AbstractTransformation_1.Abstr
20
9
  constructor() {
21
10
  super(...arguments);
22
11
  this.name = "TripStopTimesTransformation";
23
- this.transformInternal = (_a) => {
24
- var { stop } = _a, stopTime = __rest(_a, ["stop"]);
12
+ this.transformInternal = ({ stop, ...stopTime }) => {
25
13
  const properties = {
26
14
  stop_name: stop.stop_name,
27
15
  stop_sequence: stopTime.stop_sequence,
@@ -1 +1 @@
1
- {"version":3,"file":"PublicVPTripStopTimesTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kFAA6E;AAC7E,wEAAuD;AAGvD,6GAA0G;AAC1G,sEAAyF;AAEzF,MAAa,mCAAoC,SAAQ,+CAAkD;IAA3G;;QACW,SAAI,GAAG,6BAA6B,CAAC;QAElC,sBAAiB,GAAG,CAAC,EAAgC,EAAE,EAAE;gBAApC,EAAE,IAAI,OAA0B,EAArB,QAAQ,cAAnB,QAAqB,CAAF;YAC9C,MAAM,UAAU,GAA6E;gBACzF,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,wBAAwB,EAAE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC;gBAC/D,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;gBACjD,YAAY,EAAE,6BAAa,CAAC,cAAc,CAAC,6BAAa,CAAC,0BAA0B,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;gBACnH,cAAc,EAAE,6BAAa,CAAC,cAAc,CACxC,6BAAa,CAAC,0BAA0B,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAC5E;gBACD,qBAAqB,EAAE,IAAI;gBAC3B,uBAAuB,EAAE,IAAI;gBAC7B,GAAG,EAAE,IAAI,CAAC,QAAQ;gBAClB,GAAG,EAAE,IAAI,CAAC,QAAQ;aACrB,CAAC;YAEF,OAAO,IAAA,oCAAmB,EAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC;QAEM,+BAA0B,GAAG,CAAC,EAAE,mBAAmB,EAAS,EAAkB,EAAE;YACpF,IAAI,mBAAmB,KAAK,IAAI,IAAI,mBAAmB,KAAK,mDAA8B,CAAC,aAAa,EAAE;gBACtG,OAAO,IAAI,CAAC;aACf;YAED,OAAO,mBAAmB,KAAK,mDAA8B,CAAC,iBAAiB,CAAC;QACpF,CAAC,CAAC;IACN,CAAC;CAAA;AA9BD,kFA8BC"}
1
+ {"version":3,"file":"PublicVPTripStopTimesTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.ts"],"names":[],"mappings":";;;AAAA,kFAA6E;AAC7E,wEAAuD;AAGvD,6GAA0G;AAC1G,sEAAyF;AAEzF,MAAa,mCAAoC,SAAQ,+CAAkD;IAA3G;;QACW,SAAI,GAAG,6BAA6B,CAAC;QAElC,sBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,QAAQ,EAAa,EAAE,EAAE;YAC/D,MAAM,UAAU,GAA6E;gBACzF,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,wBAAwB,EAAE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC;gBAC/D,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;gBACjD,YAAY,EAAE,6BAAa,CAAC,cAAc,CAAC,6BAAa,CAAC,0BAA0B,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;gBACnH,cAAc,EAAE,6BAAa,CAAC,cAAc,CACxC,6BAAa,CAAC,0BAA0B,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAC5E;gBACD,qBAAqB,EAAE,IAAI;gBAC3B,uBAAuB,EAAE,IAAI;gBAC7B,GAAG,EAAE,IAAI,CAAC,QAAQ;gBAClB,GAAG,EAAE,IAAI,CAAC,QAAQ;aACrB,CAAC;YAEF,OAAO,IAAA,oCAAmB,EAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC;QAEM,+BAA0B,GAAG,CAAC,EAAE,mBAAmB,EAAS,EAAkB,EAAE;YACpF,IAAI,mBAAmB,KAAK,IAAI,IAAI,mBAAmB,KAAK,mDAA8B,CAAC,aAAa,EAAE;gBACtG,OAAO,IAAI,CAAC;aACf;YAED,OAAO,mBAAmB,KAAK,mDAA8B,CAAC,iBAAiB,CAAC;QACpF,CAAC,CAAC;IACN,CAAC;CAAA;AA9BD,kFA8BC"}
@@ -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.CisStopGroupRepository = void 0;
25
16
  const const_1 = require("../../../schema-definitions/const");
@@ -37,23 +28,21 @@ let CisStopGroupRepository = exports.CisStopGroupRepository = class CisStopGroup
37
28
  .getConnection()
38
29
  .define(this.tableName, ropid_gtfs_1.RopidGTFS.cis_stop_groups.outputSequelizeAttributes, { schema: this.schema });
39
30
  }
40
- getNodeByCisId(cisId) {
41
- return __awaiter(this, void 0, void 0, function* () {
42
- try {
43
- const cisStopGroup = yield this.sequelizeModel.findOne({
44
- attributes: ["node"],
45
- raw: true,
46
- where: { cis: cisId },
47
- });
48
- if (!cisStopGroup || cisStopGroup.node === null) {
49
- return null;
50
- }
51
- return cisStopGroup.node;
52
- }
53
- catch (error) {
54
- throw new golemio_errors_1.GeneralError("Error while getting CIS stop groups", this.constructor.name, error, 500);
31
+ async getNodeByCisId(cisId) {
32
+ try {
33
+ const cisStopGroup = await this.sequelizeModel.findOne({
34
+ attributes: ["node"],
35
+ raw: true,
36
+ where: { cis: cisId },
37
+ });
38
+ if (!cisStopGroup || cisStopGroup.node === null) {
39
+ return null;
55
40
  }
56
- });
41
+ return cisStopGroup.node;
42
+ }
43
+ catch (error) {
44
+ throw new golemio_errors_1.GeneralError("Error while getting CIS stop groups", this.constructor.name, error, 500);
45
+ }
57
46
  }
58
47
  };
59
48
  exports.CisStopGroupRepository = CisStopGroupRepository = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"CisStopGroupRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,uEAA4C;AAG5C,kIAA+H;AAC/H,wEAAqE;AACrE,6EAAwE;AAExE,iEAAwE;AAGjE,IAAM,sBAAsB,oCAA5B,MAAM,sBAAuB,SAAQ,iDAAuB;IAK/D,YAAiD,SAA6B,EAA4B,MAAe;QACrH,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QALtB,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,sBAAS,CAAC,eAAe,CAAC,WAAW,CAAC;QAMrD,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,sBAAS,CAAC,eAAe,CAAC,yBAAyB,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9G,CAAC;IAEY,cAAc,CAAC,KAAa;;YACrC,IAAI;gBACA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBACnD,UAAU,EAAE,CAAC,MAAM,CAAC;oBACpB,GAAG,EAAE,IAAI;oBACT,KAAK,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE;iBACxB,CAAC,CAAC;gBAEH,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,IAAI,KAAK,IAAI,EAAE;oBAC7C,OAAO,IAAI,CAAC;iBACf;gBAED,OAAO,YAAY,CAAC,IAAI,CAAC;aAC5B;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,IAAI,6BAAY,CAAC,qCAAqC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;aACpG;QACL,CAAC;KAAA;CACJ,CAAA;iCA9BY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAMI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IAAiC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GALhG,sBAAsB,CA8BlC"}
1
+ {"version":3,"file":"CisStopGroupRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,uEAA4C;AAG5C,kIAA+H;AAC/H,wEAAqE;AACrE,6EAAwE;AAExE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(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
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -57,10 +48,10 @@ class GTFSCalendarModel extends output_gateway_1.SequelizeModel {
57
48
  * @param {number} [options.offset] Offset
58
49
  * @returns Array of the retrieved records
59
50
  */
60
- this.GetAll = (options = {}) => __awaiter(this, void 0, void 0, function* () {
51
+ this.GetAll = async (options = {}) => {
61
52
  const { limit, offset, date } = options;
62
53
  try {
63
- const data = yield this.sequelizeModel.scope({ method: ["forDate", date] }).findAll({
54
+ const data = await this.sequelizeModel.scope({ method: ["forDate", date] }).findAll({
64
55
  limit,
65
56
  offset,
66
57
  order: [["service_id", "asc"]],
@@ -70,7 +61,7 @@ class GTFSCalendarModel extends output_gateway_1.SequelizeModel {
70
61
  catch (err) {
71
62
  throw new golemio_errors_1.GeneralError("Database error", "GTFSCalendar", err, 500);
72
63
  }
73
- });
64
+ };
74
65
  this.GetOne = (id) => {
75
66
  throw new golemio_errors_1.FatalError("Method not implemented");
76
67
  };
@@ -1 +1 @@
1
- {"version":3,"file":"GTFSCalendarModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/models/GTFSCalendarModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,uEAA4C;AAC5C,2FAAiE;AACjE,sEAAmE;AACnE,6EAAoF;AACpF,gGAA+D;AAC/D,oFAA4D;AAC5D,wBAA8C;AAE9C,MA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AE;yBAC7D;qBACJ,CAAC;oBACF,OAAO,EAAE,KAAK,EAAE,CAAC;gBACrB,CAAC;aACJ;SACJ,CAAC,CAAC;QA9BA,eAAU,GAA8B;YAC3C,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,SAAS;YACZ,CAAC,EAAE,WAAW;YACd,CAAC,EAAE,UAAU;YACb,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,UAAU;YACb,CAAC,EAAE,QAAQ;SACd,CAAC;QAyBF;;;;;;WAMG;QACI,WAAM,GAAG,KAAK,EACjB,UAII,EAAE,EACM,EAAE;YACd,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;YACxC,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;oBAChF,KAAK;oBACL,MAAM;oBACN,KAAK,EAAE,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;iBACjC,CAAC,CAAC;gBACH,OAAO,IAAI,CAAC;aACf;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,gBAAgB,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACtE;QACL,CAAC,CAAC;QAEK,WAAM,GAAG,CAAC,EAAO,EAAgB,EAAE;YACtC,MAAM,IAAI,2BAAU,CAAC,wBAAwB,CAAC,CAAC;QACnD,CAAC,CAAC;IA/BF,CAAC;CAgCJ;AAhED,8CAgEC"}
@@ -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.GTFSRoutesModel = void 0;
13
4
  const const_1 = require("../../../schema-definitions/const");
@@ -26,12 +17,12 @@ class GTFSRoutesModel extends output_gateway_1.SequelizeModel {
26
17
  * @param {number} [options.offset] Offset
27
18
  * @returns Array of the retrieved records
28
19
  */
29
- this.GetAll = (options = {}) => __awaiter(this, void 0, void 0, function* () {
20
+ this.GetAll = async (options = {}) => {
30
21
  const { limit, offset } = options;
31
22
  try {
32
23
  const order = [];
33
24
  order.push([["route_id", "asc"]]);
34
- const data = yield this.sequelizeModel.findAll({
25
+ const data = await this.sequelizeModel.findAll({
35
26
  limit,
36
27
  offset,
37
28
  order,
@@ -41,12 +32,12 @@ class GTFSRoutesModel extends output_gateway_1.SequelizeModel {
41
32
  catch (err) {
42
33
  throw new golemio_errors_1.GeneralError("Database error", "GTFSRoutesModel", err, 500);
43
34
  }
44
- });
35
+ };
45
36
  /** Retrieves specific gtfs routes
46
37
  * @param {string} id Id of the route
47
38
  * @returns Object of the retrieved record or null
48
39
  */
49
- this.GetOne = (id) => __awaiter(this, void 0, void 0, function* () { return this.ConvertItem(yield this.sequelizeModel.findByPk(id)); });
40
+ this.GetOne = async (id) => this.ConvertItem(await this.sequelizeModel.findByPk(id));
50
41
  /**
51
42
  * Convert a single db result to proper output format with all tranformation
52
43
  * @param {object} route Route object
@@ -1 +1 @@
1
- {"version":3,"file":"GTFSRoutesModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/models/GTFSRoutesModel.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAAuC;AACvC,uEAA4C;AAC5C,qFAA2D;AAC3D,sEAAmE;AACnE,6EAAwE;AAExE,MAAa,eAAgB,SAAQ,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EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACzE;QACL,CAAC,CAAC;QAEF;;;WAGG;QACI,WAAM,GAAG,KAAK,EAAE,EAAU,EAAgB,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAE7G;;;;WAIG;QACK,gBAAW,GAAG,CAAC,KAAU,EAAE,EAAE;YACjC,IAAI,KAAK,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAC;YAEhC,0CAA0C;YAC1C,IAAI,KAAK,CAAC,MAAM;gBAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAEzC,sBAAsB;YACtB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,KAAK,GAAG,CAAC;YACxC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,KAAK,GAAG,CAAC;YAC9C,KAAK,CAAC,uBAAuB,GAAG,KAAK,CAAC,uBAAuB,KAAK,GAAG,CAAC;YAEtE,OAAO,KAAK,CAAC;QACjB,CAAC,CAAC;IApDF,CAAC;CAqDJ;AA1DD,0CA0DC"}
@@ -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.GTFSShapesModel = void 0;
13
4
  const const_1 = require("../../../schema-definitions/const");
@@ -32,12 +23,12 @@ class GTFSShapesModel extends output_gateway_1.SequelizeModel {
32
23
  * @param {number} [options.offset] Offset
33
24
  * @returns Array of the retrieved records
34
25
  */
35
- this.GetAll = (options = {}) => __awaiter(this, void 0, void 0, function* () {
26
+ this.GetAll = async (options = {}) => {
36
27
  const { limit, offset, id } = options;
37
28
  try {
38
29
  const order = [];
39
30
  order.push([["shape_id", "asc"]]);
40
- const data = yield this.sequelizeModel.findAll({
31
+ const data = await this.sequelizeModel.findAll({
41
32
  limit,
42
33
  offset,
43
34
  order,
@@ -51,10 +42,10 @@ class GTFSShapesModel extends output_gateway_1.SequelizeModel {
51
42
  catch (err) {
52
43
  throw new golemio_errors_1.GeneralError("Database error ~ GetAll", "GTFSShapesModel", err, 500);
53
44
  }
54
- });
55
- this.GetOne = (id) => __awaiter(this, void 0, void 0, function* () {
45
+ };
46
+ this.GetOne = async (id) => {
56
47
  return null;
57
- });
48
+ };
58
49
  this.outputAttributes = Object.keys(ShapeDto_1.ShapeDto.attributeModel);
59
50
  }
60
51
  }