@golemio/pid 2.18.0 → 2.18.1-dev.1427397189

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 (262) hide show
  1. package/db/example/00_clear_test_data.sql +2 -0
  2. package/db/example/03_ropidgtfs_dump.sql +36 -0
  3. package/db/example/20_jis_infotexts.sql +214 -0
  4. package/db/migrations/postgresql/20240801141948-jis-infotexts.js +53 -0
  5. package/db/migrations/postgresql/20240809084521-jis-infotexts-severity-level.js +53 -0
  6. package/db/migrations/postgresql/sqls/20240801141948-jis-infotexts-down.sql +2 -0
  7. package/db/migrations/postgresql/sqls/20240801141948-jis-infotexts-up.sql +19 -0
  8. package/db/migrations/postgresql/sqls/20240809084521-jis-infotexts-severity-level-down.sql +8 -0
  9. package/db/migrations/postgresql/sqls/20240809084521-jis-infotexts-severity-level-up.sql +7 -0
  10. package/dist/integration-engine/index.js +4 -0
  11. package/dist/integration-engine/index.js.map +1 -1
  12. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.d.ts +10 -0
  13. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +49 -0
  14. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -0
  15. package/dist/integration-engine/jis/index.d.ts +1 -0
  16. package/dist/{output-gateway/pid/controllers → integration-engine/jis}/index.js +1 -2
  17. package/dist/integration-engine/jis/index.js.map +1 -0
  18. package/dist/integration-engine/jis/ioc/Di.d.ts +3 -0
  19. package/dist/integration-engine/jis/ioc/Di.js +31 -0
  20. package/dist/integration-engine/jis/ioc/Di.js.map +1 -0
  21. package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +9 -0
  22. package/dist/integration-engine/jis/ioc/JISContainerToken.js +18 -0
  23. package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -0
  24. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +36 -0
  25. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +101 -0
  26. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -0
  27. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.d.ts +36 -0
  28. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +101 -0
  29. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -0
  30. package/dist/integration-engine/jis/services/JISInfotextsDataService.d.ts +20 -0
  31. package/dist/integration-engine/jis/services/JISInfotextsDataService.js +78 -0
  32. package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -0
  33. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.d.ts +13 -0
  34. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +41 -0
  35. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -0
  36. package/dist/integration-engine/jis/workers/JISWorker.d.ts +7 -0
  37. package/dist/integration-engine/jis/workers/JISWorker.js +21 -0
  38. package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -0
  39. package/dist/integration-engine/jis/workers/constants.d.ts +1 -0
  40. package/dist/integration-engine/jis/workers/constants.js +5 -0
  41. package/dist/integration-engine/jis/workers/constants.js.map +1 -0
  42. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +14 -0
  43. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +72 -0
  44. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -0
  45. package/dist/integration-engine/ropid-gtfs/data-access/helpers/RawQueryProvider.d.ts +3 -0
  46. package/dist/integration-engine/ropid-gtfs/data-access/helpers/RawQueryProvider.js +62 -0
  47. package/dist/integration-engine/ropid-gtfs/data-access/helpers/RawQueryProvider.js.map +1 -0
  48. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.d.ts +2 -0
  49. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +21 -0
  50. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
  51. package/dist/integration-engine/ropid-gtfs/interfaces/TripScheduleInterfaces.d.ts +22 -0
  52. package/dist/integration-engine/ropid-gtfs/interfaces/TripScheduleInterfaces.js +3 -0
  53. package/dist/integration-engine/ropid-gtfs/interfaces/TripScheduleInterfaces.js.map +1 -0
  54. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusMessageFilter.d.ts +1 -4
  55. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusMessageFilter.js +11 -27
  56. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusMessageFilter.js.map +1 -1
  57. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.d.ts +1 -1
  58. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +22 -49
  59. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  60. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/RawQueryProvider.d.ts +0 -1
  61. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/RawQueryProvider.js +1 -80
  62. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/RawQueryProvider.js.map +1 -1
  63. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/interfaces/TripRepositoryInterfaces.d.ts +0 -17
  64. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.d.ts +3 -6
  65. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +8 -19
  66. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
  67. package/dist/output-gateway/departure-boards/index.d.ts +1 -1
  68. package/dist/output-gateway/departure-boards/index.js +1 -1
  69. package/dist/output-gateway/departure-boards/index.js.map +1 -1
  70. package/dist/output-gateway/departure-boards/routers/index.d.ts +1 -0
  71. package/dist/output-gateway/departure-boards/routers/index.js +6 -0
  72. package/dist/output-gateway/departure-boards/routers/index.js.map +1 -0
  73. package/dist/output-gateway/departure-boards/{DepartureBoardsRouter.d.ts → routers/v2/V2DepartureBoardsRouter.d.ts} +9 -8
  74. package/dist/output-gateway/departure-boards/{DepartureBoardsRouter.js → routers/v2/V2DepartureBoardsRouter.js} +19 -18
  75. package/dist/output-gateway/departure-boards/routers/v2/V2DepartureBoardsRouter.js.map +1 -0
  76. package/dist/output-gateway/index.d.ts +1 -0
  77. package/dist/output-gateway/index.js +25 -1
  78. package/dist/output-gateway/index.js.map +1 -1
  79. package/dist/output-gateway/pid/controllers/{DepartureBoardsController.d.ts → v2/V2DepartureBoardsController.d.ts} +1 -1
  80. package/dist/output-gateway/pid/controllers/{DepartureBoardsController.js → v2/V2DepartureBoardsController.js} +9 -9
  81. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -0
  82. package/dist/output-gateway/pid/controllers/{InfotextsController.d.ts → v2/V2InfotextsController.d.ts} +1 -1
  83. package/dist/output-gateway/pid/controllers/{InfotextsController.js → v2/V2InfotextsController.js} +6 -6
  84. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -0
  85. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.d.ts +10 -0
  86. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +57 -0
  87. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -0
  88. package/dist/output-gateway/pid/data-access/JISInfotextRepository.d.ts +27 -0
  89. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +157 -0
  90. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -0
  91. package/dist/output-gateway/pid/data-access/JISInfotextRopidGTFSStopsRepository.d.ts +11 -0
  92. package/dist/output-gateway/pid/data-access/JISInfotextRopidGTFSStopsRepository.js +37 -0
  93. package/dist/output-gateway/pid/data-access/JISInfotextRopidGTFSStopsRepository.js.map +1 -0
  94. package/dist/output-gateway/pid/domain/InfotextDisplayTypeEnum.d.ts +4 -0
  95. package/dist/output-gateway/pid/domain/InfotextDisplayTypeEnum.js +9 -0
  96. package/dist/output-gateway/pid/domain/InfotextDisplayTypeEnum.js.map +1 -0
  97. package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +28 -0
  98. package/dist/output-gateway/pid/domain/InfotextInterfaces.js +3 -0
  99. package/dist/output-gateway/pid/domain/InfotextInterfaces.js.map +1 -0
  100. package/dist/output-gateway/pid/dto/DepartureBoardsDTO.d.ts +3 -3
  101. package/dist/output-gateway/pid/dto/DepartureBoardsDTO.js +1 -1
  102. package/dist/output-gateway/pid/dto/DepartureBoardsDTO.js.map +1 -1
  103. package/dist/output-gateway/pid/index.d.ts +1 -1
  104. package/dist/output-gateway/pid/index.js +1 -1
  105. package/dist/output-gateway/pid/index.js.map +1 -1
  106. package/dist/output-gateway/pid/ioc/Di.d.ts +3 -0
  107. package/dist/output-gateway/pid/ioc/Di.js +23 -0
  108. package/dist/output-gateway/pid/ioc/Di.js.map +1 -0
  109. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +7 -0
  110. package/dist/output-gateway/pid/ioc/OgPidToken.js +17 -0
  111. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -0
  112. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +2 -1
  113. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +20 -10
  114. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  115. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.d.ts +2 -19
  116. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +4 -64
  117. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
  118. package/dist/output-gateway/pid/routers/index.d.ts +2 -0
  119. package/dist/output-gateway/pid/routers/index.js +8 -0
  120. package/dist/output-gateway/pid/routers/index.js.map +1 -0
  121. package/dist/output-gateway/pid/{PIDRouter.d.ts → routers/v2/V2PIDRouter.d.ts} +5 -4
  122. package/dist/output-gateway/pid/{PIDRouter.js → routers/v2/V2PIDRouter.js} +20 -17
  123. package/dist/output-gateway/pid/routers/v2/V2PIDRouter.js.map +1 -0
  124. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.d.ts +11 -0
  125. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +31 -0
  126. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -0
  127. package/dist/output-gateway/pid/service/helpers/DisplayTypeMapper.d.ts +10 -0
  128. package/dist/output-gateway/pid/service/helpers/DisplayTypeMapper.js +25 -0
  129. package/dist/output-gateway/pid/service/helpers/DisplayTypeMapper.js.map +1 -0
  130. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.d.ts +13 -0
  131. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +35 -0
  132. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -0
  133. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.d.ts +19 -0
  134. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +43 -0
  135. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -0
  136. package/dist/output-gateway/public/controllers/{v1/PublicDepartureBoardsController.d.ts → v2/V2PublicDepartureBoardsController.d.ts} +1 -1
  137. package/dist/output-gateway/public/controllers/{v1/PublicDepartureBoardsController.js → v2/V2PublicDepartureBoardsController.js} +5 -5
  138. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -0
  139. package/dist/output-gateway/public/controllers/{v1/PublicGtfsController.d.ts → v2/V2PublicGtfsController.d.ts} +1 -1
  140. package/dist/output-gateway/public/controllers/{v1/PublicGtfsController.js → v2/V2PublicGtfsController.js} +5 -5
  141. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -0
  142. package/dist/output-gateway/public/controllers/{v1/PublicVehiclePositionsController.d.ts → v2/V2PublicVehiclePositionsController.d.ts} +1 -1
  143. package/dist/output-gateway/public/controllers/{v1/PublicVehiclePositionsController.js → v2/V2PublicVehiclePositionsController.js} +4 -4
  144. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -0
  145. package/dist/output-gateway/public/controllers/{v1 → v2}/interfaces/PublicParamsInterfaces.d.ts +1 -1
  146. package/dist/output-gateway/public/controllers/{v1 → v2}/interfaces/PublicParamsInterfaces.js.map +1 -1
  147. package/dist/output-gateway/public/index.d.ts +1 -0
  148. package/dist/output-gateway/public/index.js +18 -0
  149. package/dist/output-gateway/public/index.js.map +1 -0
  150. package/dist/output-gateway/public/routers/index.d.ts +3 -0
  151. package/dist/output-gateway/public/routers/index.js +10 -0
  152. package/dist/output-gateway/public/routers/index.js.map +1 -0
  153. package/dist/output-gateway/public/routers/{v1/PublicDeparturesRouter.d.ts → v2/V2PublicDeparturesRouter.d.ts} +4 -3
  154. package/dist/output-gateway/public/routers/{v1/PublicDeparturesRouter.js → v2/V2PublicDeparturesRouter.js} +11 -8
  155. package/dist/output-gateway/public/routers/v2/V2PublicDeparturesRouter.js.map +1 -0
  156. package/dist/output-gateway/public/routers/{v1/PublicGtfsRouter.d.ts → v2/V2PublicGtfsRouter.d.ts} +4 -3
  157. package/dist/output-gateway/public/routers/{v1/PublicGtfsRouter.js → v2/V2PublicGtfsRouter.js} +11 -8
  158. package/dist/output-gateway/public/routers/v2/V2PublicGtfsRouter.js.map +1 -0
  159. package/dist/output-gateway/public/routers/{v1/PublicVehiclePositionsRouter.d.ts → v2/V2PublicVehiclePositionsRouter.d.ts} +4 -3
  160. package/dist/output-gateway/public/routers/{v1/PublicVehiclePositionsRouter.js → v2/V2PublicVehiclePositionsRouter.js} +11 -8
  161. package/dist/output-gateway/public/routers/v2/V2PublicVehiclePositionsRouter.js.map +1 -0
  162. package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomScopeValidator.js.map +1 -1
  163. package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomStopIdGroupValidator.js.map +1 -1
  164. package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomTypeValidator.js.map +1 -1
  165. package/dist/output-gateway/public/routers/{v1 → v2}/helpers/DetailedTripScopeEnum.js.map +1 -1
  166. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.d.ts +1 -1
  167. package/dist/output-gateway/public/service/facade/DetailedTripFacade.d.ts +1 -1
  168. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +1 -1
  169. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.d.ts +1 -1
  170. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +1 -1
  171. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.d.ts +1 -1
  172. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.js +1 -1
  173. package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.d.ts +1 -1
  174. package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.js +1 -1
  175. package/dist/output-gateway/ropid-gtfs/index.d.ts +1 -1
  176. package/dist/output-gateway/ropid-gtfs/index.js +1 -1
  177. package/dist/output-gateway/ropid-gtfs/index.js.map +1 -1
  178. package/dist/output-gateway/ropid-gtfs/routers/index.d.ts +1 -0
  179. package/dist/output-gateway/ropid-gtfs/routers/index.js +6 -0
  180. package/dist/output-gateway/ropid-gtfs/routers/index.js.map +1 -0
  181. package/dist/output-gateway/ropid-gtfs/{GTFSRouter.d.ts → routers/v2/V2GTFSRouter.d.ts} +11 -13
  182. package/dist/output-gateway/ropid-gtfs/{GTFSRouter.js → routers/v2/V2GTFSRouter.js} +16 -16
  183. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -0
  184. package/dist/output-gateway/shared/RopidRouterUtils.d.ts +4 -0
  185. package/dist/output-gateway/shared/RopidRouterUtils.js +11 -0
  186. package/dist/output-gateway/shared/RopidRouterUtils.js.map +1 -1
  187. package/dist/output-gateway/shared/constants/index.d.ts +1 -0
  188. package/dist/output-gateway/shared/constants/index.js +1 -0
  189. package/dist/output-gateway/shared/constants/index.js.map +1 -1
  190. package/dist/output-gateway/shared/constants/route-version.d.ts +5 -0
  191. package/dist/output-gateway/shared/constants/route-version.js +10 -0
  192. package/dist/output-gateway/shared/constants/route-version.js.map +1 -0
  193. package/dist/output-gateway/vehicle-positions/index.d.ts +1 -1
  194. package/dist/output-gateway/vehicle-positions/index.js +1 -1
  195. package/dist/output-gateway/vehicle-positions/index.js.map +1 -1
  196. package/dist/output-gateway/vehicle-positions/routers/index.d.ts +1 -0
  197. package/dist/output-gateway/vehicle-positions/routers/index.js +6 -0
  198. package/dist/output-gateway/vehicle-positions/routers/index.js.map +1 -0
  199. package/dist/output-gateway/vehicle-positions/{VehiclePositionsRouter.d.ts → routers/v2/V2VehiclePositionsRouter.d.ts} +6 -6
  200. package/dist/output-gateway/vehicle-positions/{VehiclePositionsRouter.js → routers/v2/V2VehiclePositionsRouter.js} +12 -11
  201. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -0
  202. package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.d.ts +3 -0
  203. package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js +59 -0
  204. package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js.map +1 -0
  205. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.d.ts +16 -0
  206. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.js +3 -0
  207. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.js.map +1 -0
  208. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextStop.d.ts +3 -0
  209. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextStop.js +3 -0
  210. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextStop.js.map +1 -0
  211. package/dist/schema-definitions/jis/datasources/interfaces/IJISTranslationText.d.ts +4 -0
  212. package/dist/schema-definitions/jis/datasources/interfaces/IJISTranslationText.js +3 -0
  213. package/dist/schema-definitions/jis/datasources/interfaces/IJISTranslationText.js.map +1 -0
  214. package/dist/schema-definitions/jis/datasources/interfaces/index.d.ts +3 -0
  215. package/dist/schema-definitions/jis/datasources/interfaces/index.js +20 -0
  216. package/dist/schema-definitions/jis/datasources/interfaces/index.js.map +1 -0
  217. package/dist/schema-definitions/jis/models/JISInfotextsModel.d.ts +19 -0
  218. package/dist/schema-definitions/jis/models/JISInfotextsModel.js +80 -0
  219. package/dist/schema-definitions/jis/models/JISInfotextsModel.js.map +1 -0
  220. package/dist/schema-definitions/jis/models/JISInfotextsRopidGTFSStopsModel.d.ts +12 -0
  221. package/dist/schema-definitions/jis/models/JISInfotextsRopidGTFSStopsModel.js +41 -0
  222. package/dist/schema-definitions/jis/models/JISInfotextsRopidGTFSStopsModel.js.map +1 -0
  223. package/dist/schema-definitions/jis/models/interfaces/IJISInfotext.d.ts +10 -0
  224. package/dist/schema-definitions/jis/models/interfaces/IJISInfotext.js +3 -0
  225. package/dist/schema-definitions/jis/models/interfaces/IJISInfotext.js.map +1 -0
  226. package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsRopidGTFSStops.d.ts +4 -0
  227. package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsRopidGTFSStops.js +3 -0
  228. package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsRopidGTFSStops.js.map +1 -0
  229. package/dist/schema-definitions/jis/models/interfaces/IJISTranslationText.d.ts +4 -0
  230. package/dist/schema-definitions/jis/models/interfaces/IJISTranslationText.js +3 -0
  231. package/dist/schema-definitions/jis/models/interfaces/IJISTranslationText.js.map +1 -0
  232. package/dist/schema-definitions/jis/models/interfaces/index.d.ts +3 -0
  233. package/dist/schema-definitions/jis/models/interfaces/index.js +20 -0
  234. package/dist/schema-definitions/jis/models/interfaces/index.js.map +1 -0
  235. package/docs/assets/pid_jis_erd.png +0 -0
  236. package/docs/asyncapi.yaml +1371 -1332
  237. package/docs/implementation_documentation.md +86 -35
  238. package/docs/openapi-output.yaml +128 -69
  239. package/package.json +3 -3
  240. package/dist/output-gateway/departure-boards/DepartureBoardsRouter.js.map +0 -1
  241. package/dist/output-gateway/pid/PIDRouter.js.map +0 -1
  242. package/dist/output-gateway/pid/controllers/DepartureBoardsController.js.map +0 -1
  243. package/dist/output-gateway/pid/controllers/InfotextsController.js.map +0 -1
  244. package/dist/output-gateway/pid/controllers/index.d.ts +0 -2
  245. package/dist/output-gateway/pid/controllers/index.js.map +0 -1
  246. package/dist/output-gateway/public/controllers/v1/PublicDepartureBoardsController.js.map +0 -1
  247. package/dist/output-gateway/public/controllers/v1/PublicGtfsController.js.map +0 -1
  248. package/dist/output-gateway/public/controllers/v1/PublicVehiclePositionsController.js.map +0 -1
  249. package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.js.map +0 -1
  250. package/dist/output-gateway/public/routers/v1/PublicGtfsRouter.js.map +0 -1
  251. package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.js.map +0 -1
  252. package/dist/output-gateway/ropid-gtfs/GTFSRouter.js.map +0 -1
  253. package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js.map +0 -1
  254. /package/dist/output-gateway/public/controllers/{v1 → v2}/interfaces/PublicParamsInterfaces.js +0 -0
  255. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomScopeValidator.d.ts +0 -0
  256. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomScopeValidator.js +0 -0
  257. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomStopIdGroupValidator.d.ts +0 -0
  258. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomStopIdGroupValidator.js +0 -0
  259. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomTypeValidator.d.ts +0 -0
  260. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomTypeValidator.js +0 -0
  261. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/DetailedTripScopeEnum.d.ts +0 -0
  262. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/DetailedTripScopeEnum.js +0 -0
@@ -30,23 +30,6 @@ export interface IUpdateGTFSTripIdData extends Omit<Partial<IVPTripsModel>, "sta
30
30
  origin_route_name: string | null;
31
31
  vehicle_registration_number: number | null;
32
32
  }
33
- export interface IFoundGTFSTripData {
34
- id?: string;
35
- gtfs_trip_id: string;
36
- gtfs_trip_headsign: string;
37
- gtfs_route_id: string;
38
- gtfs_route_short_name: string;
39
- gtfs_direction_id: number;
40
- gtfs_shape_id: string;
41
- min_stop_time: string;
42
- max_stop_time: string;
43
- gtfs_block_id?: string;
44
- gtfs_trip_short_name?: string;
45
- gtfs_route_type?: number;
46
- cis_trip_number?: number;
47
- internal_run_number?: number;
48
- internal_route_name?: string;
49
- }
50
33
  export interface IBulkUpsertOutput {
51
34
  inserted: IUpdateGTFSTripIdData[];
52
35
  updated: Array<{
@@ -3,9 +3,10 @@ import { Moment } from "@golemio/core/dist/shared/moment-timezone";
3
3
  import { IMpvPositionContent } from "../../../../../schema-definitions/vehicle-positions/interfaces/IMpvMessageInterfaces";
4
4
  import { ITransformationElement, ITransformationResult } from "../interfaces/TransformationInterfaces";
5
5
  export declare class MpvMessageTransformation extends BaseTransformation implements ITransformation {
6
+ private static ORIGIN_TIME_FORMAT;
6
7
  name: string;
7
8
  private config;
8
- private static ORIGIN_TIME_FORMAT;
9
+ private skipAgencyNames;
9
10
  constructor();
10
11
  /**
11
12
  * Overrides BaseTransformation::transform
@@ -31,6 +32,7 @@ export declare class MpvMessageTransformation extends BaseTransformation impleme
31
32
  * @returns {number}
32
33
  */
33
34
  private checkMidnight;
35
+ private isBlacklistedAgency;
34
36
  /**
35
37
  * Fix source negative bearing value due to overflow by adding 256
36
38
  *
@@ -45,9 +47,4 @@ export declare class MpvMessageTransformation extends BaseTransformation impleme
45
47
  * @returns {stringList}
46
48
  */
47
49
  private formatASWStopId;
48
- /**
49
- * Returns list of vehicle reg numbers that should be excluded from MPVNet processing
50
- * (already processed from another source)
51
- */
52
- private get regionalBusRegNumberBlacklist();
53
50
  }
@@ -31,6 +31,7 @@ var PositionTrackingEnum;
31
31
  class MpvMessageTransformation extends transformations_1.BaseTransformation {
32
32
  constructor() {
33
33
  super();
34
+ this.skipAgencyNames = [DPPUtils_1.default.DPP_AGENCY_NAME];
34
35
  /**
35
36
  * Overrides BaseTransformation::transform
36
37
  */
@@ -61,16 +62,11 @@ class MpvMessageTransformation extends transformations_1.BaseTransformation {
61
62
  this.transformElement = (element) => __awaiter(this, void 0, void 0, function* () {
62
63
  var _a, _b;
63
64
  const attributes = element.$;
64
- // DPP and regional bus trips to be excluded in HTTP ingress
65
- const isDPPTrip = attributes.dopr === DPPUtils_1.default.DPP_AGENCY_NAME;
66
- const isRegionalBusTrip = !!attributes.vuzevc &&
67
- this.regionalBusRegNumberBlacklist &&
68
- this.regionalBusRegNumberBlacklist.includes(attributes.vuzevc);
69
65
  // Trips with null cpoz (origin time) and falsy or "false" zrus (cancellation) attributes are excluded
70
66
  let hasInvalidAttributes = !attributes.cpoz && (!attributes.zrus || attributes.zrus === "false");
71
67
  // Canceled trips with no lat or lng are accepted because we try to later get the coords from the context if possible
72
68
  hasInvalidAttributes || (hasInvalidAttributes = attributes.zrus !== "true" && (!attributes.lat || !attributes.lng));
73
- if (isDPPTrip || isRegionalBusTrip || hasInvalidAttributes) {
69
+ if (this.isBlacklistedAgency(attributes.dopr) || hasInvalidAttributes) {
74
70
  return null;
75
71
  }
76
72
  attributes.lin = attributes.lin || "none";
@@ -235,6 +231,12 @@ class MpvMessageTransformation extends transformations_1.BaseTransformation {
235
231
  };
236
232
  this.name = vehicle_positions_1.VehiclePositions.name;
237
233
  this.config = Di_1.IntegrationEngineContainer.resolve(CoreToken_1.CoreToken.SimpleConfig);
234
+ this.skipAgencyNames = this.skipAgencyNames.concat(this.config
235
+ .getValue("module.pid.vehicle-positions.mpvIntegration.skipAgencyNames", "ARRIVA CITY,ARRIVA CITY (Neratovice)")
236
+ .split(","));
237
+ }
238
+ isBlacklistedAgency(agency) {
239
+ return agency && this.skipAgencyNames.includes(agency);
238
240
  }
239
241
  /**
240
242
  * Fix source negative bearing value due to overflow by adding 256
@@ -257,19 +259,6 @@ class MpvMessageTransformation extends transformations_1.BaseTransformation {
257
259
  const aswParsedStopPostId = parseInt(stopId, 10) - aswParsedStopNodeId * fixedRightPadFactor;
258
260
  return aswParsedStopNodeId + "/" + aswParsedStopPostId;
259
261
  }
260
- /**
261
- * Returns list of vehicle reg numbers that should be excluded from MPVNet processing
262
- * (already processed from another source)
263
- */
264
- get regionalBusRegNumberBlacklist() {
265
- const valuePath = "old.datasources.pid.vehicle-positions.regNumberWhitelist.regionalBus";
266
- const blacklistDict = this.config.getValue(valuePath, {});
267
- const blacklist = Object.values(blacklistDict);
268
- if (blacklist.length > 0 && blacklist[0] !== "*") {
269
- return blacklist;
270
- }
271
- return null;
272
- }
273
262
  }
274
263
  exports.MpvMessageTransformation = MpvMessageTransformation;
275
264
  MpvMessageTransformation.ORIGIN_TIME_FORMAT = "HH:mm:ss";
@@ -1 +1 @@
1
- {"version":3,"file":"MpvMessageTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2FAA0D;AAG1D,wEAAqE;AACrE,qEAA0F;AAC1F,2FAA4G;AAC5G,gGAA2E;AAC3E,gDAAgE;AAChE,mEAA2C;AAC3C,8EAA2E;AAC3E,oEAAiE;AAGjE,0EAA4D;AAE5D,IAAK,oBAGJ;AAHD,WAAK,oBAAoB;IACrB,0CAAkB,CAAA;IAClB,sCAAc,CAAA;AAClB,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,EAAE,CAAC,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;QAC7F,OAAO,mBAAmB,GAAG,GAAG,GAAG,mBAAmB,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,IAAY,6BAA6B;QACrC,MAAM,SAAS,GAAG,sEAAsE,CAAC;QACzF,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAyB,SAAS,EAAE,EAAE,CAAC,CAAC;QAClF,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAE/C,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YAC9C,OAAO,SAAS,CAAC;SACpB;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;;AAzRL,4DA0RC;AAvRkB,2CAAkB,GAAG,UAAU,AAAb,CAAc"}
1
+ {"version":3,"file":"MpvMessageTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2FAA0D;AAG1D,wEAAqE;AACrE,qEAA0F;AAC1F,2FAA4G;AAC5G,gGAA2E;AAC3E,gDAAgE;AAChE,mEAA2C;AAC3C,8EAA2E;AAC3E,oEAAiE;AAGjE,0EAA4D;AAE5D,IAAK,oBAGJ;AAHD,WAAK,oBAAoB;IACrB,0CAAkB,CAAA;IAClB,sCAAc,CAAA;AAClB,CAAC,EAHI,oBAAoB,KAApB,oBAAoB,QAGxB;AAED,MAAa,wBAAyB,SAAQ,oCAAkB;IAO5D;QACI,KAAK,EAAE,CAAC;QAHJ,oBAAe,GAAG,CAAC,kBAAQ,CAAC,eAAe,CAAC,CAAC;QAgBrD;;WAEG;QACI,cAAS,GAAG,CAAO,IAAiD,EAAkC,EAAE;YAC3G,IAAI,KAAK,GAAG,IAAI,GAAG,EAAqC,CAAC;YACzD,IAAI,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AAAb,CAAc"}
@@ -1 +1 @@
1
- export * from "./DepartureBoardsRouter";
1
+ export * from "./routers";
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./DepartureBoardsRouter"), exports);
17
+ __exportStar(require("./routers"), exports);
18
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/departure-boards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/departure-boards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
@@ -0,0 +1 @@
1
+ export { v2DepartureBoardsRouter } from "./v2/V2DepartureBoardsRouter";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.v2DepartureBoardsRouter = void 0;
4
+ var V2DepartureBoardsRouter_1 = require("./v2/V2DepartureBoardsRouter");
5
+ Object.defineProperty(exports, "v2DepartureBoardsRouter", { enumerable: true, get: function () { return V2DepartureBoardsRouter_1.v2DepartureBoardsRouter; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/departure-boards/routers/index.ts"],"names":[],"mappings":";;;AAAA,wEAAuE;AAA9D,kIAAA,uBAAuB,OAAA"}
@@ -1,19 +1,17 @@
1
1
  /**
2
- * app/routers/DepartureBoardsRouter.ts
3
- *
4
2
  * DEPRECATED!!! use PIDDepartureBoardsRoutes.ts instead
5
3
  *
6
4
  * Router /WEB LAYER/: maps routes to specific controller functions, passes request parameters and handles responses.
7
5
  * Handles web logic (http request, response). Sets response headers, handles error responses.
8
6
  */
9
7
  /// <reference types="express" />
10
- import { PIDDepartureBoardsModel } from "../pid";
11
- import { BaseRouter } from "@golemio/core/dist/output-gateway/routes/BaseRouter";
8
+ import { PIDDepartureBoardsModel } from "../../../pid";
9
+ import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
12
10
  import { NextFunction, Request, Response, Router } from "@golemio/core/dist/shared/express";
13
11
  /**
14
12
  * @deprecated use /pid/departureboards instead
15
13
  */
16
- export declare class DepartureBoardsRouter extends BaseRouter {
14
+ export declare class V2DepartureBoardsRouter extends AbstractRouter {
17
15
  router: Router;
18
16
  private cacheHeaderMiddleware;
19
17
  private defaultQueryParameters;
@@ -27,8 +25,11 @@ export declare class DepartureBoardsRouter extends BaseRouter {
27
25
  /**
28
26
  * Initiates all routes. Should respond with correct data to a HTTP requests to all routes.
29
27
  */
30
- private initRoutes;
28
+ protected initRoutes: () => void;
31
29
  private initDepartureBoardsEndpoints;
32
30
  }
33
- declare const departureBoardsRouter: Router;
34
- export { departureBoardsRouter };
31
+ /**
32
+ * @deprecated use /pid/departureboards instead
33
+ */
34
+ declare const v2DepartureBoardsRouter: AbstractRouter;
35
+ export { v2DepartureBoardsRouter };
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
  /**
3
- * app/routers/DepartureBoardsRouter.ts
4
- *
5
3
  * DEPRECATED!!! use PIDDepartureBoardsRoutes.ts instead
6
4
  *
7
5
  * Router /WEB LAYER/: maps routes to specific controller functions, passes request parameters and handles responses.
@@ -20,23 +18,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
20
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
21
19
  };
22
20
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.departureBoardsRouter = exports.DepartureBoardsRouter = void 0;
24
- const pid_1 = require("../pid");
25
- const shared_1 = require("../shared");
26
- const constants_1 = require("../shared/constants");
21
+ exports.v2DepartureBoardsRouter = exports.V2DepartureBoardsRouter = void 0;
22
+ const pid_1 = require("../../../pid");
23
+ const shared_1 = require("../../../shared");
24
+ const constants_1 = require("../../../shared/constants");
25
+ const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
27
26
  const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
28
27
  const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
29
- const BaseRouter_1 = require("@golemio/core/dist/output-gateway/routes/BaseRouter");
30
28
  const express_1 = require("@golemio/core/dist/shared/express");
31
29
  const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
32
30
  const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
33
- const const_1 = require("../../const");
31
+ const const_1 = require("../../../../const");
34
32
  /**
35
33
  * @deprecated use /pid/departureboards instead
36
34
  */
37
- class DepartureBoardsRouter extends BaseRouter_1.BaseRouter {
35
+ class V2DepartureBoardsRouter extends AbstractRouter_1.AbstractRouter {
38
36
  constructor() {
39
- super();
37
+ super(constants_1.RouteVersion.v2, "departureboards");
40
38
  // Assign router to the express.Router() instance
41
39
  this.router = (0, express_1.Router)();
42
40
  this.defaultQueryParameters = {
@@ -51,10 +49,10 @@ class DepartureBoardsRouter extends BaseRouter_1.BaseRouter {
51
49
  },
52
50
  };
53
51
  this.GetDepartureBoard = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
54
- const aswIds = this.ConvertToArray(req.query.aswIds || []);
55
- const cisIds = this.ConvertToArray(req.query.cisIds || []);
56
- const gtfsIds = this.ConvertToArray(req.query.ids || []);
57
- const names = this.ConvertToArray(req.query.names || []);
52
+ const aswIds = shared_1.RopidRouterUtils.convertParamToArray(req.query.aswIds);
53
+ const cisIds = shared_1.RopidRouterUtils.convertParamToArray(req.query.cisIds);
54
+ const gtfsIds = shared_1.RopidRouterUtils.convertParamToArray(req.query.ids);
55
+ const names = shared_1.RopidRouterUtils.convertParamToArray(req.query.names);
58
56
  const limit = parseInt(req.query.limit || this.defaultQueryParameters.limit, 10);
59
57
  const preferredTimezone = shared_1.RopidRouterUtils.getPreferredTimezone(req.query.preferredTimezone);
60
58
  const timezoneDefinedRegexp = /[T ][\d:\.]+([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)/;
@@ -152,7 +150,10 @@ class DepartureBoardsRouter extends BaseRouter_1.BaseRouter {
152
150
  this.initRoutes();
153
151
  }
154
152
  }
155
- exports.DepartureBoardsRouter = DepartureBoardsRouter;
156
- const departureBoardsRouter = new DepartureBoardsRouter().router;
157
- exports.departureBoardsRouter = departureBoardsRouter;
158
- //# sourceMappingURL=DepartureBoardsRouter.js.map
153
+ exports.V2DepartureBoardsRouter = V2DepartureBoardsRouter;
154
+ /**
155
+ * @deprecated use /pid/departureboards instead
156
+ */
157
+ const v2DepartureBoardsRouter = new V2DepartureBoardsRouter();
158
+ exports.v2DepartureBoardsRouter = v2DepartureBoardsRouter;
159
+ //# sourceMappingURL=V2DepartureBoardsRouter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V2DepartureBoardsRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/departure-boards/routers/v2/V2DepartureBoardsRouter.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;AAEH,sCAAuH;AACvH,4CAA8C;AAC9C,yDAAsE;AACtE,sFAAmF;AAEnF,6EAAkH;AAClH,+DAA+F;AAC/F,+DAA4F;AAC5F,mFAA2E;AAC3E,gGAA2E;AAC3E,6CAAsD;AAEtD;;GAEG;AACH,MAAa,uBAAwB,SAAQ,+BAAc;IAmBvD;QACI,KAAK,CAAC,wBAAY,CAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC;QAnB9C,iDAAiD;QAC1C,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAGzB,2BAAsB,GAAQ;YAClC,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,CAAC;YACT,YAAY,EAAE,GAAG;YACjB,aAAa,EAAE,CAAC;YAChB,kBA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ACrE,EACD,uBAAU,EACV,wBAAW,EACX,IAAA,sCAAyB,EAAC,uBAAuB,CAAC;YAClD,sDAAsD;YACtD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,EACxD,IAAI,CAAC,iBAAiB,CACzB,CAAC;QACN,CAAC,CAAC;QAnHE,IAAI,CAAC,qBAAqB,GAAG,4BAAsB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACzH,IAAI,CAAC,oBAAoB,GAAG,IAAI,6BAAuB,EAAE,CAAC;QAC1D,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CAiHJ;AAzID,0DAyIC;AAED;;GAEG;AACH,MAAM,uBAAuB,GAAmB,IAAI,uBAAuB,EAAE,CAAC;AAErE,0DAAuB"}
@@ -2,3 +2,4 @@ export * as DepartureBoards from "./departure-boards";
2
2
  export * as PID from "./pid";
3
3
  export * as RopidGTFS from "./ropid-gtfs";
4
4
  export * as VehiclePositions from "./vehicle-positions";
5
+ export declare const routers: import("@golemio/core/dist/helpers/routing/AbstractRouter").AbstractRouter[];
@@ -23,9 +23,33 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.VehiclePositions = exports.RopidGTFS = exports.PID = exports.DepartureBoards = void 0;
26
+ exports.routers = exports.VehiclePositions = exports.RopidGTFS = exports.PID = exports.DepartureBoards = void 0;
27
+ const departure_boards_1 = require("./departure-boards");
28
+ const pid_1 = require("./pid");
29
+ const public_1 = require("./public");
30
+ const ropid_gtfs_1 = require("./ropid-gtfs");
31
+ const vehicle_positions_1 = require("./vehicle-positions");
27
32
  exports.DepartureBoards = __importStar(require("./departure-boards"));
28
33
  exports.PID = __importStar(require("./pid"));
29
34
  exports.RopidGTFS = __importStar(require("./ropid-gtfs"));
30
35
  exports.VehiclePositions = __importStar(require("./vehicle-positions"));
36
+ exports.routers = [
37
+ //#region Ropid GTFS
38
+ ropid_gtfs_1.v2GtfsRouter,
39
+ //#endregion
40
+ //#region Vehicle positions
41
+ vehicle_positions_1.v2VehiclepositionsRouter,
42
+ //#region Departure boards (deprecated)
43
+ departure_boards_1.v2DepartureBoardsRouter,
44
+ //#endregion
45
+ //#region PID Departure boards
46
+ pid_1.v2PidRouter,
47
+ pid_1.v3PidRouter,
48
+ //#endregion
49
+ //#region Public Endpoints
50
+ public_1.v2PublicDeparturesRouter,
51
+ public_1.v2PublicGtfsRouter,
52
+ public_1.v2PublicVPRouter,
53
+ //#endregion
54
+ ];
31
55
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAsD;AACtD,6CAA6B;AAC7B,0DAA0C;AAC1C,wEAAwD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAA+D;AAC/D,+BAAmD;AACnD,qCAA4F;AAC5F,6CAA8C;AAC9C,2DAAiE;AAEjE,sEAAsD;AACtD,6CAA6B;AAC7B,0DAA0C;AAC1C,wEAAwD;AAE3C,QAAA,OAAO,GAAG;IACnB,oBAAoB;IACpB,yBAAY;IACZ,YAAY;IAEZ,2BAA2B;IAC3B,4CAAwB;IAExB,uCAAuC;IACvC,0CAAuB;IACvB,YAAY;IAEZ,8BAA8B;IAC9B,iBAAW;IACX,iBAAW;IACX,YAAY;IAEZ,0BAA0B;IAC1B,iCAAwB;IACxB,2BAAkB;IAClB,yBAAgB;IAChB,YAAY;CACf,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="express" />
2
2
  import { RequestHandler } from "@golemio/core/dist/shared/express";
3
- export declare class DepartureBoardsController {
3
+ export declare class V2DepartureBoardsController {
4
4
  private departureBoardsModel;
5
5
  constructor();
6
6
  getDepartureBoard: RequestHandler;
@@ -12,13 +12,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.DepartureBoardsController = void 0;
16
- const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
15
+ exports.V2DepartureBoardsController = void 0;
16
+ const dto_1 = require("../../dto");
17
+ const models_1 = require("../../models");
18
+ const shared_1 = require("../../../shared");
17
19
  const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
18
- const shared_1 = require("../../shared");
19
- const models_1 = require("../models");
20
- const dto_1 = require("../dto");
21
- class DepartureBoardsController {
20
+ const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
21
+ class V2DepartureBoardsController {
22
22
  constructor() {
23
23
  this.getDepartureBoard = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
24
24
  var _a;
@@ -37,7 +37,7 @@ class DepartureBoardsController {
37
37
  ? (0, moment_timezone_1.default)(query.timeFrom)
38
38
  : moment_timezone_1.default.tz(query.timeFrom, preferredTimezone)
39
39
  : undefined;
40
- const span = (0, trace_provider_1.createChildSpan)("DepartureBoardsController.getDepartureBoard");
40
+ const span = (0, trace_provider_1.createChildSpan)("V2DepartureBoardsController.getDepartureBoard");
41
41
  try {
42
42
  const data = yield this.departureBoardsModel.GetAll({
43
43
  aswIds: query.aswIds,
@@ -72,5 +72,5 @@ class DepartureBoardsController {
72
72
  this.departureBoardsModel = new models_1.PIDDepartureBoardsModel();
73
73
  }
74
74
  }
75
- exports.DepartureBoardsController = DepartureBoardsController;
76
- //# sourceMappingURL=DepartureBoardsController.js.map
75
+ exports.V2DepartureBoardsController = V2DepartureBoardsController;
76
+ //# sourceMappingURL=V2DepartureBoardsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V2DepartureBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v2/V2DepartureBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mCAAkF;AAClF,yCAAyD;AACzD,4CAA8C;AAC9C,+FAA6F;AAE7F,gGAA2E;AAE3E,MAAa,2BAA2B;IAGpC;QAIO,sBAAiB,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;;YAChE,MAAM,KAAK,GAAG,yBAAgB,CAAC,sBAAsB,CAAC,6BAAuB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;YAC1F,MAAM,iBAAiB,GAAG,yBAAgB,CAAC,oBAAoB,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;YAEzF,oDAAoD;YACpD,cAAc;YACd,uBAAuB;YACvB,0BAA0B;YAC1B,yBAAyB;YACzB,4BAA4B;YAC5B,MAAM,qBAAqB,GAAW,uDAAuD,CAAC;YAC9F,+DAA+D;YAC/D,MAAM,QAAQ,GAAuB,KAAK,CAAC,QAAQ;gBAC/C,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,qBAAqB,CAAC;oBACzC,CAAC,CAAC,IAAA,yBAAM,EAAC,KAAK,CAAC,QAAQ,CAAC;oBACxB,CAAC,CAAC,yBAAM,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;gBAClD,CAAC,CAAC,SAAS,CAAC;YAEhB,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,+CAA+C,CAAC,CAAC;YAC9E,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC;oBAChD,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,OAAO,EAAE,KAAK,CAAC,GAAG;oBAClB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,YAAY,EAAE,KAAK,CAAC,YAAY;oBAChC,aAAa,EAAE,KAAK,CAAC,aAAa;oBAClC,QAAQ;oBACR,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,KAAK,CAAC,KAAK;oBACjC,QAAQ,EAAE,iBAAiB;oBAC3B,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;oBAC5C,YAAY,EAAE,KAAK,CAAC,YAAY;iBACnC,CAAC,CAAC;gBACH,oCAAoC;gBACpC,GAAG,CAAC,SAAS,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAC;gBACvD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,yBAAgB,CAAC,sBAAsB,CAAC,gCAA0B,EAAE,IAAI,CAAC,CAAC,CAAC;aACnG;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAA,CAAC;QAlDE,IAAI,CAAC,oBAAoB,GAAG,IAAI,gCAAuB,EAAE,CAAC;IAC9D,CAAC;CAkDJ;AAvDD,kEAuDC"}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="express" />
2
2
  import { RequestHandler } from "@golemio/core/dist/shared/express";
3
- export declare class InfotextsController {
3
+ export declare class V2InfotextsController {
4
4
  private readonly eventsStopsModel;
5
5
  constructor();
6
6
  getInfotexts: RequestHandler;
@@ -9,14 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.InfotextsController = void 0;
12
+ exports.V2InfotextsController = void 0;
13
13
  const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
14
14
  const config_1 = require("@golemio/core/dist/output-gateway/config");
15
- const models_1 = require("../models");
16
- class InfotextsController {
15
+ const models_1 = require("../../models");
16
+ class V2InfotextsController {
17
17
  constructor() {
18
18
  this.getInfotexts = (_req, res, next) => __awaiter(this, void 0, void 0, function* () {
19
- const span = (0, trace_provider_1.createChildSpan)("InfotextsController.getInfotexts");
19
+ const span = (0, trace_provider_1.createChildSpan)("V2InfotextsController.getInfotexts");
20
20
  try {
21
21
  const preferredTimezone = config_1.config.vehiclePositions.defaultTimezone;
22
22
  const data = yield this.eventsStopsModel.GetAllWithRoutes(preferredTimezone);
@@ -32,5 +32,5 @@ class InfotextsController {
32
32
  this.eventsStopsModel = new models_1.RopidVYMIEventsStopsModel();
33
33
  }
34
34
  }
35
- exports.InfotextsController = InfotextsController;
36
- //# sourceMappingURL=InfotextsController.js.map
35
+ exports.V2InfotextsController = V2InfotextsController;
36
+ //# sourceMappingURL=V2InfotextsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V2InfotextsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v2/V2InfotextsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+FAA6F;AAC7F,qEAAkE;AAClE,yCAA2D;AAE3D,MAAa,qBAAqB;IAG9B;QAIO,iBAAY,GAAmB,CAAO,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC5D,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,oCAAoC,CAAC,CAAC;YAEnE,IAAI;gBACA,MAAM,iBAAiB,GAAG,eAAM,CAAC,gBAAgB,CAAC,eAAe,CAAC;gBAClE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;gBAC7E,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC9B;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAA,CAAC;QAfE,IAAI,CAAC,gBAAgB,GAAG,IAAI,kCAAyB,EAAE,CAAC;IAC5D,CAAC;CAeJ;AApBD,sDAoBC"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="express" />
2
+ import { JISInfotextRepository } from "../../data-access/JISInfotextRepository";
3
+ import { JISInfotextOverviewTransformation } from "../../service/transformations/JISInfotextOverviewTransformation";
4
+ import { RequestHandler } from "@golemio/core/dist/shared/express";
5
+ export declare class V3InfotextsController {
6
+ private infotextRepository;
7
+ private infotextTransformation;
8
+ constructor(infotextRepository: JISInfotextRepository, infotextTransformation: JISInfotextOverviewTransformation);
9
+ getJisInfotexts: RequestHandler;
10
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
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
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.V3InfotextsController = void 0;
25
+ const JISInfotextRepository_1 = require("../../data-access/JISInfotextRepository");
26
+ const OgPidToken_1 = require("../../ioc/OgPidToken");
27
+ const JISInfotextOverviewTransformation_1 = require("../../service/transformations/JISInfotextOverviewTransformation");
28
+ const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
29
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
30
+ let V3InfotextsController = exports.V3InfotextsController = class V3InfotextsController {
31
+ constructor(infotextRepository, infotextTransformation) {
32
+ this.infotextRepository = infotextRepository;
33
+ this.infotextTransformation = infotextTransformation;
34
+ this.getJisInfotexts = (_req, res, next) => __awaiter(this, void 0, void 0, function* () {
35
+ const span = (0, trace_provider_1.createChildSpan)("V3InfotextsController.getJisInfotexts");
36
+ try {
37
+ const infotexts = yield this.infotextRepository.findAllForOverview();
38
+ const outputDto = this.infotextTransformation.transformArray(infotexts);
39
+ res.status(200).send(outputDto);
40
+ }
41
+ catch (err) {
42
+ next(err);
43
+ }
44
+ finally {
45
+ span === null || span === void 0 ? void 0 : span.end();
46
+ }
47
+ });
48
+ }
49
+ };
50
+ exports.V3InfotextsController = V3InfotextsController = __decorate([
51
+ (0, tsyringe_1.injectable)(),
52
+ __param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextRepository)),
53
+ __param(1, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextOverviewTransformation)),
54
+ __metadata("design:paramtypes", [JISInfotextRepository_1.JISInfotextRepository,
55
+ JISInfotextOverviewTransformation_1.JISInfotextOverviewTransformation])
56
+ ], V3InfotextsController);
57
+ //# sourceMappingURL=V3InfotextsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V3InfotextsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v3/V3InfotextsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,mFAAkF;AAClF,qDAAoD;AACpD,uHAAsH;AACtH,+FAA6F;AAE7F,iEAAwE;AAGjE,IAAM,qBAAqB,mCAA3B,MAAM,qBAAqB;IAC9B,YAC8C,kBAAiD,EACrC,sBAAiE;QADrE,uBAAkB,GAAlB,kBAAkB,CAAuB;QAC7B,2BAAsB,GAAtB,sBAAsB,CAAmC;QAGpH,oBAAe,GAAmB,CAAO,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC/D,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,uCAAuC,CAAC,CAAC;YAEtE,IAAI;gBACA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,CAAC;gBACrE,MAAM,SAAS,GAAG,IAAI,CAAC,sBAAsB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;gBACxE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aACnC;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAA,CAAC;IAdC,CAAC;CAeP,CAAA;gCAnBY,qBAAqB;IADjC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,qBAAqB,CAAC,CAAA;IACxC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,iCAAiC,CAAC,CAAA;qCADiB,6CAAqB;QACL,qEAAiC;GAHlH,qBAAqB,CAmBjC"}
@@ -0,0 +1,27 @@
1
+ import { JISInfotextsModel } from "../../../schema-definitions/jis/models/JISInfotextsModel";
2
+ import { ILogger } from "@golemio/core/dist/helpers";
3
+ import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
4
+ import { AbstractBasicRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository";
5
+ import { JISInfotextRopidGTFSStopsRepository } from "./JISInfotextRopidGTFSStopsRepository";
6
+ export declare class JISInfotextRepository extends AbstractBasicRepository {
7
+ schema: string;
8
+ tableName: string;
9
+ private sequelizeModel;
10
+ private gtfsStopRepository;
11
+ constructor(infotextStopRepository: JISInfotextRopidGTFSStopsRepository, connector: IDatabaseConnector, logger: ILogger);
12
+ /**
13
+ * Find all active infotexts for given stops and time for PID departure boards API
14
+ *
15
+ * @param stopsIds GTFS stop IDs for which the infotexts should be fetched
16
+ * @param timeFrom Time from which the infotexts should be valid (default is current time)
17
+ * @returns Active infotexts
18
+ */
19
+ findAllForDepartureBoard(stopsIds: string[], timeFrom?: Date): Promise<JISInfotextsModel[]>;
20
+ /**
21
+ * Find all active infotexts for given time for PID infotexts API
22
+ *
23
+ * @param timeFrom Time from which the infotexts should be valid (default is current time)
24
+ * @returns Active infotexts
25
+ */
26
+ findAllForOverview(timeFrom?: Date): Promise<JISInfotextsModel[]>;
27
+ }