@golemio/pid 2.18.0 → 2.18.1-dev.1418114865

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 (261) 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/implementation_documentation.md +86 -35
  237. package/docs/openapi-output.yaml +128 -69
  238. package/package.json +3 -3
  239. package/dist/output-gateway/departure-boards/DepartureBoardsRouter.js.map +0 -1
  240. package/dist/output-gateway/pid/PIDRouter.js.map +0 -1
  241. package/dist/output-gateway/pid/controllers/DepartureBoardsController.js.map +0 -1
  242. package/dist/output-gateway/pid/controllers/InfotextsController.js.map +0 -1
  243. package/dist/output-gateway/pid/controllers/index.d.ts +0 -2
  244. package/dist/output-gateway/pid/controllers/index.js.map +0 -1
  245. package/dist/output-gateway/public/controllers/v1/PublicDepartureBoardsController.js.map +0 -1
  246. package/dist/output-gateway/public/controllers/v1/PublicGtfsController.js.map +0 -1
  247. package/dist/output-gateway/public/controllers/v1/PublicVehiclePositionsController.js.map +0 -1
  248. package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.js.map +0 -1
  249. package/dist/output-gateway/public/routers/v1/PublicGtfsRouter.js.map +0 -1
  250. package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.js.map +0 -1
  251. package/dist/output-gateway/ropid-gtfs/GTFSRouter.js.map +0 -1
  252. package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js.map +0 -1
  253. /package/dist/output-gateway/public/controllers/{v1 → v2}/interfaces/PublicParamsInterfaces.js +0 -0
  254. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomScopeValidator.d.ts +0 -0
  255. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomScopeValidator.js +0 -0
  256. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomStopIdGroupValidator.d.ts +0 -0
  257. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomStopIdGroupValidator.js +0 -0
  258. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomTypeValidator.d.ts +0 -0
  259. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomTypeValidator.js +0 -0
  260. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/DetailedTripScopeEnum.d.ts +0 -0
  261. /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/DetailedTripScopeEnum.js +0 -0
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.RopidVYMIEventsStopsModel = exports.InfotextsDisplayTypeEnum = void 0;
26
+ exports.RopidVYMIEventsStopsModel = void 0;
27
27
  const models_1 = require("./");
28
28
  const GTFSStopModel_1 = require("../../ropid-gtfs/models/GTFSStopModel");
29
29
  const shared_1 = require("../../shared");
@@ -31,20 +31,9 @@ const const_1 = require("../../../schema-definitions/const");
31
31
  const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
32
32
  const ropid_vymi_1 = require("../../../schema-definitions/ropid-vymi");
33
33
  const output_gateway_1 = require("@golemio/core/dist/output-gateway");
34
- const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
35
- const sequelize_1 = __importDefault(require("@golemio/core/dist/shared/sequelize"));
36
34
  const ioc_1 = require("@golemio/core/dist/output-gateway/ioc/");
37
- var InfotextsRecordTypeEnum;
38
- (function (InfotextsRecordTypeEnum) {
39
- InfotextsRecordTypeEnum[InfotextsRecordTypeEnum["EXCEPTION"] = 1] = "EXCEPTION";
40
- InfotextsRecordTypeEnum[InfotextsRecordTypeEnum["PLANNED_RESTRICTION"] = 2] = "PLANNED_RESTRICTION";
41
- InfotextsRecordTypeEnum[InfotextsRecordTypeEnum["PERMANENT_CHANGE"] = 3] = "PERMANENT_CHANGE";
42
- })(InfotextsRecordTypeEnum || (InfotextsRecordTypeEnum = {}));
43
- var InfotextsDisplayTypeEnum;
44
- (function (InfotextsDisplayTypeEnum) {
45
- InfotextsDisplayTypeEnum["INLINE"] = "inline";
46
- InfotextsDisplayTypeEnum["GENERAL"] = "general";
47
- })(InfotextsDisplayTypeEnum || (exports.InfotextsDisplayTypeEnum = InfotextsDisplayTypeEnum = {}));
35
+ const sequelize_1 = __importDefault(require("@golemio/core/dist/shared/sequelize"));
36
+ const InfotextDisplayTypeEnum_1 = require("../domain/InfotextDisplayTypeEnum");
48
37
  /**
49
38
  * Custom Postgres model for Ropid VYMI Events
50
39
  */
@@ -57,49 +46,6 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
57
46
  }
58
47
  constructor() {
59
48
  super(ropid_vymi_1.RopidVYMI.eventsStops.name + "Model", ropid_vymi_1.RopidVYMI.eventsStops.pgTableName, ropid_vymi_1.RopidVYMI.eventsStops.outputSequelizeAttributes, { schema: const_1.PG_SCHEMA });
60
- /** Retrieves all infotexts with event, could be inner joined with set of stops
61
- *
62
- * @param {string[]} stopsIds - Array of GTFS stop ids to be inner joined with corresponding infotexts
63
- * @param {Moment} timeFrom - Timestamp to filter out specified expiration_date column greater than this value
64
- */
65
- this.GetAllDistinctWithEvents = (stopsIds, timeFrom = (0, moment_timezone_1.default)(), timezone) => __awaiter(this, void 0, void 0, function* () {
66
- if (stopsIds.length < 1) {
67
- return [];
68
- }
69
- const data = yield this.sequelizeModel.findAll({
70
- attributes: [
71
- "valid_from",
72
- "valid_to",
73
- "text",
74
- "stop_type",
75
- [sequelize_1.default.fn("ARRAY_AGG", sequelize_1.default.col("gtfs_stop_id")), "related_stops"],
76
- ],
77
- include: {
78
- attributes: [],
79
- as: "vymi_event",
80
- model: this.dbConnector.getConnection().models[ropid_vymi_1.RopidVYMI.events.pgTableName],
81
- where: {
82
- time_from: {
83
- [sequelize_1.default.Op.lte]: new Date().toISOString(),
84
- },
85
- expiration_date: {
86
- [sequelize_1.default.Op.or]: [null, { [sequelize_1.default.Op.gte]: timeFrom.toISOString() }],
87
- },
88
- },
89
- },
90
- where: {
91
- gtfs_stop_id: {
92
- [sequelize_1.default.Op.in]: stopsIds,
93
- },
94
- text: {
95
- [sequelize_1.default.Op.and]: [{ [sequelize_1.default.Op.ne]: null }, { [sequelize_1.default.Op.ne]: "" }],
96
- },
97
- },
98
- group: ["valid_from", "valid_to", "text", "stop_type", "vymi_event.vymi_id"],
99
- raw: true,
100
- });
101
- return this.mapDataWithEvent(data, timezone);
102
- });
103
49
  /**
104
50
  * Retrieve all infotexts with routes
105
51
  */
@@ -165,12 +111,6 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
165
111
  });
166
112
  return this.mapDataWithRoutes(data, timezone);
167
113
  });
168
- this.mapDataWithEvent = (items, timezone) => {
169
- return items.map((item) => {
170
- const { stop_type: stopType, valid_from, valid_to } = item, infotextsStopModel = __rest(item, ["stop_type", "valid_from", "valid_to"]);
171
- return Object.assign(Object.assign({ display_type: this.mapStopTypeToDisplayType(stopType), text_en: null }, infotextsStopModel), { valid_from: shared_1.RopidRouterUtils.formatTimestamp(valid_from, timezone), valid_to: shared_1.RopidRouterUtils.formatTimestamp(valid_to, timezone) });
172
- });
173
- };
174
114
  this.mapDataWithRoutes = (items, timezone) => {
175
115
  return items.map((item) => {
176
116
  const { vymi_id, vymi_id_dtb, stop_type: stopType, expiration_date, last_updated, valid_from, valid_to, last_updated_user } = item, infotextsStopModel = __rest(item, ["vymi_id", "vymi_id_dtb", "stop_type", "expiration_date", "last_updated", "valid_from", "valid_to", "last_updated_user"]);
@@ -179,7 +119,7 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
179
119
  };
180
120
  this.mapStopTypeToDisplayType = (stopType) => {
181
121
  // stop type 1 and 9 leads to general infotext type
182
- return stopType === 1 || stopType === 9 ? InfotextsDisplayTypeEnum.GENERAL : InfotextsDisplayTypeEnum.INLINE;
122
+ return stopType === 1 || stopType === 9 ? InfotextDisplayTypeEnum_1.InfotextDisplayType.General : InfotextDisplayTypeEnum_1.InfotextDisplayType.Inline;
183
123
  };
184
124
  this.dbConnector = ioc_1.OutputGatewayContainer.resolve(ioc_1.ContainerToken.PostgresDatabase);
185
125
  this.eventsModel = new models_1.RopidVYMIEventsModel();
@@ -1 +1 @@
1
- {"version":3,"file":"RopidVYMIEventsStopsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidVYMIEventsStopsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAkF;AAClF,yEAAoE;AACpE,yCAA8C;AAC9C,6DAAuC;AACvC,uEAA4C;AAC5C,uEAA4C;AAC5C,sEAAmE;AACnE,gGAA2E;AAC3E,oFAA4D;AAE5D,gEAAgG;AAEhG,IAAK,uBAIJ;AAJD,WAAK,uBAAuB;IACxB,+EAAa,CAAA;IACb,mGAAuB,CAAA;IACvB,6FAAoB,CAAA;AACxB,CAAC,EAJI,uBAAuB,KAAvB,uBAAuB,QAI3B;AAED,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAChC,6CAAiB,CAAA;IACjB,+CAAmB,CAAA;AACvB,CAAC,EAHW,wBAAwB,wCAAxB,wBAAwB,QAGnC;AAqCD;;GAEG;AACH,MAAa,yBAA0B,SAAQ,+BAAc;IAMzD,MAAM,CAAC,OAAa;QAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,CAAC,EAAO;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED;QACI,KAAK,CACD,sBAAS,CAAC,WAAW,CAAC,IAAI,GAAG,OAAO,EACpC,sBAAS,CAAC,WAAW,CAAC,WAAW,EACjC,sBAAS,CAAC,WAAW,CAAC,yBAAyB,EAC/C,EAAE,MAAM,EAAE,iBAAS,EAAE,CACxB,CAAC;QA2BN;;;;WAIG;QACI,6BAAwB,GAAG,CAC9B,QAAkB,EAClB,WAAmB,IAAA,yBAAM,GAAE,EAC3B,QAAgB,EAC8B,EAAE;YAChD,I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AC;QAEvG,IAAI,CAAC,WAAW,GAAG,IAAI,6BAAoB,EAAE,CAAC;QAC9C,IAAI,CAAC,iBAAiB,GAAG,IAAI,mCAA0B,EAAE,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,IAAI,6BAAa,EAAE,CAAC;QAE1C,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE;YAC3D,EAAE,EAAE,YAAY;YAChB,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,UAAU;SACzB,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE;YAC/D,EAAE,EAAE,YAAY;YAChB,UAAU,EAAE,UAAU;YACtB,SAAS,EAAE,UAAU;SACxB,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE;YAC3D,EAAE,EAAE,WAAW;YACf,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,cAAc;SAC5B,CAAC,CAAC;IACP,CAAC;CAyGJ;AArJD,8DAqJC"}
@@ -0,0 +1,2 @@
1
+ export { v2PidRouter } from "./v2/V2PIDRouter";
2
+ export { v3PidRouter } from "./v3/V3PIDRouter";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.v3PidRouter = exports.v2PidRouter = void 0;
4
+ var V2PIDRouter_1 = require("./v2/V2PIDRouter");
5
+ Object.defineProperty(exports, "v2PidRouter", { enumerable: true, get: function () { return V2PIDRouter_1.v2PidRouter; } });
6
+ var V3PIDRouter_1 = require("./v3/V3PIDRouter");
7
+ Object.defineProperty(exports, "v3PidRouter", { enumerable: true, get: function () { return V3PIDRouter_1.v3PidRouter; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/routers/index.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAAtC,0GAAA,WAAW,OAAA;AACpB,gDAA+C;AAAtC,0GAAA,WAAW,OAAA"}
@@ -3,17 +3,18 @@
3
3
  * Handles web logic (http request, response). Sets response headers, handles error responses.
4
4
  */
5
5
  /// <reference types="express" />
6
- import { BaseRouter } from "@golemio/core/dist/output-gateway/routes/BaseRouter";
6
+ import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
7
7
  import { Router } from "@golemio/core/dist/shared/express";
8
- export declare class PIDRouter extends BaseRouter {
8
+ export declare class V2PIDRouter extends AbstractRouter {
9
9
  readonly router: Router;
10
10
  private cacheHeaderMiddleware;
11
11
  private readonly departureBoardsController;
12
12
  private readonly infotextsController;
13
13
  constructor();
14
+ protected initRoutes: () => void;
14
15
  private registerDepartureBoardsRoutes;
15
16
  private registerInfotextsRoutes;
16
17
  private commonMiddleware;
17
18
  }
18
- declare const pidRouter: Router;
19
- export { pidRouter };
19
+ declare const v2PidRouter: AbstractRouter;
20
+ export { v2PidRouter };
@@ -4,20 +4,25 @@
4
4
  * Handles web logic (http request, response). Sets response headers, handles error responses.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.pidRouter = exports.PIDRouter = void 0;
7
+ exports.v2PidRouter = exports.V2PIDRouter = void 0;
8
+ const V2DepartureBoardsController_1 = require("../../controllers/v2/V2DepartureBoardsController");
9
+ const V2InfotextsController_1 = require("../../controllers/v2/V2InfotextsController");
10
+ const ParamValidatorManager_1 = require("../../helpers/ParamValidatorManager");
11
+ const constants_1 = require("../../../shared/constants");
12
+ const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
8
13
  const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
9
14
  const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
10
- const BaseRouter_1 = require("@golemio/core/dist/output-gateway/routes/BaseRouter");
11
15
  const express_1 = require("@golemio/core/dist/shared/express");
12
16
  const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
13
- const const_1 = require("../../const");
14
- const constants_1 = require("../shared/constants");
15
- const controllers_1 = require("./controllers");
16
- const ParamValidatorManager_1 = require("./helpers/ParamValidatorManager");
17
- class PIDRouter extends BaseRouter_1.BaseRouter {
17
+ const const_1 = require("../../../../const");
18
+ class V2PIDRouter extends AbstractRouter_1.AbstractRouter {
18
19
  constructor() {
19
- super();
20
+ super(constants_1.RouteVersion.v2, "pid");
20
21
  this.router = (0, express_1.Router)();
22
+ this.initRoutes = () => {
23
+ this.registerDepartureBoardsRoutes();
24
+ this.registerInfotextsRoutes();
25
+ };
21
26
  this.registerDepartureBoardsRoutes = () => {
22
27
  const { preferredTimezone, departureBoards: { departureMode, order, filter, skip }, } = constants_1.ValidationArrays;
23
28
  const validation = [
@@ -67,14 +72,12 @@ class PIDRouter extends BaseRouter_1.BaseRouter {
67
72
  };
68
73
  this.commonMiddleware = (name) => [Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)(name)];
69
74
  this.cacheHeaderMiddleware = ioc_1.OutputGatewayContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
70
- this.departureBoardsController = new controllers_1.DepartureBoardsController();
71
- this.infotextsController = new controllers_1.InfotextsController();
72
- // Register routes
73
- this.registerDepartureBoardsRoutes();
74
- this.registerInfotextsRoutes();
75
+ this.departureBoardsController = new V2DepartureBoardsController_1.V2DepartureBoardsController();
76
+ this.infotextsController = new V2InfotextsController_1.V2InfotextsController();
77
+ this.initRoutes();
75
78
  }
76
79
  }
77
- exports.PIDRouter = PIDRouter;
78
- const pidRouter = new PIDRouter().router;
79
- exports.pidRouter = pidRouter;
80
- //# sourceMappingURL=PIDRouter.js.map
80
+ exports.V2PIDRouter = V2PIDRouter;
81
+ const v2PidRouter = new V2PIDRouter();
82
+ exports.v2PidRouter = v2PidRouter;
83
+ //# sourceMappingURL=V2PIDRouter.js.map
@@ -0,0 +1 @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AU,EAAE,wBAAW,EAAE,IAAA,sCAAyB,EAAC,IAAI,CAAC,CAAC,CAAC;QA3EpG,IAAI,CAAC,qBAAqB,GAAG,4BAAsB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACzH,IAAI,CAAC,yBAAyB,GAAG,IAAI,yDAA2B,EAAE,CAAC;QACnE,IAAI,CAAC,mBAAmB,GAAG,IAAI,6CAAqB,EAAE,CAAC;QACvD,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CAwEJ;AApFD,kCAoFC;AAED,MAAM,WAAW,GAAmB,IAAI,WAAW,EAAE,CAAC;AAC7C,kCAAW"}
@@ -0,0 +1,11 @@
1
+ import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
2
+ export declare class V3PIDRouter extends AbstractRouter {
3
+ readonly router: import("express-serve-static-core").Router;
4
+ private readonly cacheHeaderMiddleware;
5
+ private readonly infotextsController;
6
+ constructor();
7
+ protected initRoutes: () => void;
8
+ private registerInfotextsRoutes;
9
+ }
10
+ declare const v3PidRouter: AbstractRouter;
11
+ export { v3PidRouter };
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.v3PidRouter = exports.V3PIDRouter = void 0;
4
+ const Di_1 = require("../../ioc/Di");
5
+ const OgPidToken_1 = require("../../ioc/OgPidToken");
6
+ const constants_1 = require("../../../shared/constants");
7
+ const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
8
+ const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
9
+ const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
10
+ const express_1 = require("@golemio/core/dist/shared/express");
11
+ class V3PIDRouter extends AbstractRouter_1.AbstractRouter {
12
+ constructor() {
13
+ super(constants_1.RouteVersion.v3, "pid");
14
+ this.router = (0, express_1.Router)();
15
+ this.initRoutes = () => {
16
+ this.registerInfotextsRoutes();
17
+ };
18
+ this.registerInfotextsRoutes = () => {
19
+ this.router.get("/infotexts", Validation_1.checkErrors,
20
+ // max-age 10 seconds, stale-while-revalidate 10 seconds
21
+ this.cacheHeaderMiddleware.getMiddleware(10, 10), this.infotextsController.getJisInfotexts);
22
+ };
23
+ this.cacheHeaderMiddleware = Di_1.OgPidContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
24
+ this.infotextsController = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.V3InfotextsController);
25
+ this.initRoutes();
26
+ }
27
+ }
28
+ exports.V3PIDRouter = V3PIDRouter;
29
+ const v3PidRouter = new V3PIDRouter();
30
+ exports.v3PidRouter = v3PidRouter;
31
+ //# sourceMappingURL=V3PIDRouter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V3PIDRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/routers/v3/V3PIDRouter.ts"],"names":[],"mappings":";;;AACA,qCAAgD;AAChD,qDAAoD;AACpD,yDAAoD;AACpD,sFAAmF;AAEnF,6EAA2E;AAC3E,+DAAuE;AACvE,+DAA2D;AAE3D,MAAa,WAAY,SAAQ,+BAAc;IAK3C;QACI,KAAK,CAAC,wBAAY,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QALlB,WAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QAWxB,eAAU,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACnC,CAAC,CAAC;QAEM,4BAAuB,GAAG,GAAG,EAAE;YACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,YAAY,EACZ,wBAAW;YACX,wDAAwD;YACxD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,EAChD,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAC3C,CAAC;QACN,CAAC,CAAC;QAjBE,IAAI,CAAC,qBAAqB,GAAG,mBAAc,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACjH,IAAI,CAAC,mBAAmB,GAAG,mBAAc,CAAC,OAAO,CAAwB,uBAAU,CAAC,qBAAqB,CAAC,CAAC;QAC3G,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CAeJ;AAzBD,kCAyBC;AAED,MAAM,WAAW,GAAmB,IAAI,WAAW,EAAE,CAAC;AAC7C,kCAAW"}
@@ -0,0 +1,10 @@
1
+ import { InfotextDisplayType } from "../../domain/InfotextDisplayTypeEnum";
2
+ export declare class DisplayTypeMapper {
3
+ /**
4
+ * Map input display type from DB to output display type for API
5
+ *
6
+ * @param input Display type from DB
7
+ * @returns Display type for API
8
+ */
9
+ static mapInputToOutputDisplayType(input: string): InfotextDisplayType;
10
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DisplayTypeMapper = void 0;
4
+ const InfotextDisplayTypeEnum_1 = require("../../domain/InfotextDisplayTypeEnum");
5
+ const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
6
+ class DisplayTypeMapper {
7
+ /**
8
+ * Map input display type from DB to output display type for API
9
+ *
10
+ * @param input Display type from DB
11
+ * @returns Display type for API
12
+ */
13
+ static mapInputToOutputDisplayType(input) {
14
+ switch (input) {
15
+ case "INLINE":
16
+ return InfotextDisplayTypeEnum_1.InfotextDisplayType.Inline;
17
+ case "GENERAL":
18
+ return InfotextDisplayTypeEnum_1.InfotextDisplayType.General;
19
+ default:
20
+ throw new golemio_errors_1.GeneralError(`Unknown display type: ${input}`);
21
+ }
22
+ }
23
+ }
24
+ exports.DisplayTypeMapper = DisplayTypeMapper;
25
+ //# sourceMappingURL=DisplayTypeMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisplayTypeMapper.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/helpers/DisplayTypeMapper.ts"],"names":[],"mappings":";;;AAAA,kFAA6E;AAC7E,6EAAwE;AAExE,MAAa,iBAAiB;IAC1B;;;;;OAKG;IACI,MAAM,CAAC,2BAA2B,CAAC,KAAa;QACnD,QAAQ,KAAK,EAAE;YACX,KAAK,QAAQ;gBACT,OAAO,6CAAmB,CAAC,MAAM,CAAC;YACtC,KAAK,SAAS;gBACV,OAAO,6CAAmB,CAAC,OAAO,CAAC;YACvC;gBACI,MAAM,IAAI,6BAAY,CAAC,yBAAyB,KAAK,EAAE,CAAC,CAAC;SAChE;IACL,CAAC;CACJ;AAjBD,8CAiBC"}
@@ -0,0 +1,13 @@
1
+ import { IInfotextDepartureInputDto, IInfotextDepartureOutputDto } from "../../domain/InfotextInterfaces";
2
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
3
+ export declare class JISInfotextDepartureTransformation extends AbstractTransformation<IInfotextDepartureInputDto, IInfotextDepartureOutputDto> {
4
+ name: string;
5
+ protected transformInternal: ({ data, timeZone }: IInfotextDepartureInputDto) => {
6
+ display_type: import("../../domain/InfotextDisplayTypeEnum").InfotextDisplayType;
7
+ text: string;
8
+ text_en: string | null;
9
+ related_stops: string[];
10
+ valid_from: string;
11
+ valid_to: string | null;
12
+ };
13
+ }
@@ -0,0 +1,35 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.JISInfotextDepartureTransformation = void 0;
10
+ const shared_1 = require("../../../shared");
11
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
12
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
13
+ const DisplayTypeMapper_1 = require("../helpers/DisplayTypeMapper");
14
+ let JISInfotextDepartureTransformation = exports.JISInfotextDepartureTransformation = class JISInfotextDepartureTransformation extends AbstractTransformation_1.AbstractTransformation {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.name = "JISInfotextDepartureTransformation";
18
+ this.transformInternal = ({ data, timeZone }) => {
19
+ var _a, _b, _c;
20
+ const stops = (_a = data.stops) !== null && _a !== void 0 ? _a : [];
21
+ return {
22
+ display_type: DisplayTypeMapper_1.DisplayTypeMapper.mapInputToOutputDisplayType(data.display_type),
23
+ text: data.description_text.cs,
24
+ text_en: (_b = data.description_text.en) !== null && _b !== void 0 ? _b : null,
25
+ related_stops: stops.map((stop) => stop.stop_id),
26
+ valid_from: (_c = shared_1.RopidRouterUtils.formatTimestamp(data.active_period_start, timeZone)) !== null && _c !== void 0 ? _c : data.active_period_start.toISOString(),
27
+ valid_to: shared_1.RopidRouterUtils.formatTimestamp(data.active_period_end, timeZone),
28
+ };
29
+ };
30
+ }
31
+ };
32
+ exports.JISInfotextDepartureTransformation = JISInfotextDepartureTransformation = __decorate([
33
+ (0, tsyringe_1.injectable)()
34
+ ], JISInfotextDepartureTransformation);
35
+ //# sourceMappingURL=JISInfotextDepartureTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JISInfotextDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,4CAA8C;AAC9C,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AAG1D,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,+CAGvD;IAHM;;QAII,SAAI,GAAG,oCAAoC,CAAC;QAEzC,sBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAA8B,EAAE,EAAE;;YAC7E,MAAM,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC;YAC/B,OAAO;gBACH,YAAY,EAAE,qCAAiB,CAAC,2BAA2B,CAAC,IAAI,CAAC,YAAY,CAAC;gBAC9E,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,EAAE;gBAC9B,OAAO,EAAE,MAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,mCAAI,IAAI;gBACzC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;gBAChD,UAAU,EACN,MAAA,yBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,mCAAI,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE;gBAClH,QAAQ,EAAE,yBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC;aAC/E,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;6CAlBY,kCAAkC;IAD9C,IAAA,qBAAU,GAAE;GACA,kCAAkC,CAkB9C"}
@@ -0,0 +1,19 @@
1
+ import { IInfotextOverviewOutputDto } from "../../domain/InfotextInterfaces";
2
+ import { JISInfotextsModel } from "../../../../schema-definitions/jis/models/JISInfotextsModel";
3
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
4
+ export declare class JISInfotextOverviewTransformation extends AbstractTransformation<JISInfotextsModel, IInfotextOverviewOutputDto> {
5
+ name: string;
6
+ protected transformInternal: (inputDto: JISInfotextsModel) => {
7
+ id: string;
8
+ display_type: import("../../domain/InfotextDisplayTypeEnum").InfotextDisplayType;
9
+ text: string;
10
+ text_en: string | null;
11
+ related_stops: {
12
+ id: string;
13
+ name: string;
14
+ platform_code: string;
15
+ }[];
16
+ valid_from: string;
17
+ valid_to: string | null;
18
+ };
19
+ }
@@ -0,0 +1,43 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.JISInfotextOverviewTransformation = void 0;
10
+ const shared_1 = require("../../../shared");
11
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
12
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
13
+ const DisplayTypeMapper_1 = require("../helpers/DisplayTypeMapper");
14
+ let JISInfotextOverviewTransformation = exports.JISInfotextOverviewTransformation = class JISInfotextOverviewTransformation extends AbstractTransformation_1.AbstractTransformation {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.name = "JISInfotextOverviewTransformation";
18
+ this.transformInternal = (inputDto) => {
19
+ var _a, _b, _c;
20
+ const stops = (_a = inputDto.stops) !== null && _a !== void 0 ? _a : [];
21
+ return {
22
+ id: inputDto.id,
23
+ display_type: DisplayTypeMapper_1.DisplayTypeMapper.mapInputToOutputDisplayType(inputDto.display_type),
24
+ text: inputDto.description_text.cs,
25
+ text_en: (_b = inputDto.description_text.en) !== null && _b !== void 0 ? _b : null,
26
+ related_stops: stops.map((stop) => {
27
+ var _a;
28
+ return ({
29
+ id: stop.stop_id,
30
+ name: stop.stop_name,
31
+ platform_code: (_a = stop.platform_code) !== null && _a !== void 0 ? _a : null,
32
+ });
33
+ }),
34
+ valid_from: (_c = shared_1.RopidRouterUtils.formatTimestamp(inputDto.active_period_start)) !== null && _c !== void 0 ? _c : inputDto.active_period_start.toISOString(),
35
+ valid_to: shared_1.RopidRouterUtils.formatTimestamp(inputDto.active_period_end),
36
+ };
37
+ };
38
+ }
39
+ };
40
+ exports.JISInfotextOverviewTransformation = JISInfotextOverviewTransformation = __decorate([
41
+ (0, tsyringe_1.injectable)()
42
+ ], JISInfotextOverviewTransformation);
43
+ //# sourceMappingURL=JISInfotextOverviewTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JISInfotextOverviewTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,4CAA8C;AAE9C,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AAG1D,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,+CAAqE;IAArH;;QACI,SAAI,GAAG,mCAAmC,CAAC;QAExC,sBAAiB,GAAG,CAAC,QAA2B,EAAE,EAAE;;YAC1D,MAAM,KAAK,GAAG,MAAA,QAAQ,CAAC,KAAK,mCAAI,EAAE,CAAC;YACnC,OAAO;gBACH,EAAE,EAAE,QAAQ,CAAC,EAAE;gBACf,YAAY,EAAE,qCAAiB,CAAC,2BAA2B,CAAC,QAAQ,CAAC,YAAY,CAAC;gBAClF,IAAI,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE;gBAClC,OAAO,EAAE,MAAA,QAAQ,CAAC,gBAAgB,CAAC,EAAE,mCAAI,IAAI;gBAC7C,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;oBAAC,OAAA,CAAC;wBAChC,EAAE,EAAE,IAAI,CAAC,OAAO;wBAChB,IAAI,EAAE,IAAI,CAAC,SAAS;wBACpB,aAAa,EAAE,MAAA,IAAI,CAAC,aAAa,mCAAI,IAAI;qBAC5C,CAAC,CAAA;iBAAA,CAAC;gBACH,UAAU,EACN,MAAA,yBAAgB,CAAC,eAAe,CAAC,QAAQ,CAAC,mBAAmB,CAAC,mCAAI,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE;gBAChH,QAAQ,EAAE,yBAAgB,CAAC,eAAe,CAAC,QAAQ,CAAC,iBAAiB,CAAC;aACzE,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;4CApBY,iCAAiC;IAD7C,IAAA,qBAAU,GAAE;GACA,iCAAiC,CAoB7C"}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="express" />
2
2
  import { RequestHandler } from "@golemio/core/dist/shared/express";
3
- export declare class PublicDepartureBoardsController {
3
+ export declare class V2PublicDepartureBoardsController {
4
4
  constructor();
5
5
  getAll: RequestHandler;
6
6
  private parseDepartureParams;
@@ -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.PublicDepartureBoardsController = void 0;
12
+ exports.V2PublicDepartureBoardsController = void 0;
13
13
  const Di_1 = require("../../ioc/Di");
14
14
  const OgModuleToken_1 = require("../../ioc/OgModuleToken");
15
15
  const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
16
- class PublicDepartureBoardsController {
16
+ class V2PublicDepartureBoardsController {
17
17
  constructor() {
18
18
  this.getAll = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
19
- const span = (0, trace_provider_1.createChildSpan)("PublicDepartureBoardsController.getAll");
19
+ const span = (0, trace_provider_1.createChildSpan)("V2PublicDepartureBoardsController.getAll");
20
20
  try {
21
21
  const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.DepartureBoardFacade);
22
22
  const params = this.parseDepartureParams(req.query);
@@ -61,5 +61,5 @@ class PublicDepartureBoardsController {
61
61
  return output;
62
62
  }
63
63
  }
64
- exports.PublicDepartureBoardsController = PublicDepartureBoardsController;
65
- //# sourceMappingURL=PublicDepartureBoardsController.js.map
64
+ exports.V2PublicDepartureBoardsController = V2PublicDepartureBoardsController;
65
+ //# sourceMappingURL=V2PublicDepartureBoardsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V2PublicDepartureBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAsD;AACtD,2DAA6D;AAK7D,+FAA6F;AAE7F,MAAa,iCAAiC;IAC1C;QAEO,WAAM,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACrD,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,0CAA0C,CAAC,CAAC;YAEzE,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAAuB,6BAAa,CAAC,oBAAoB,CAAC,CAAC;gBACnG,MAAM,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACpD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;gBAE9G,IAAI,MAAM,KAAK,IAAI,EAAE;oBACjB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACzB,OAAO;iBACV;gBACD,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACpB;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;IApBa,CAAC;IAsBR,oBAAoB,CAAC,KAAe;QACxC,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,YAAY,KAAK,CAAC,CAAC,CAAE,KAAK,CAAC,OAAoB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAiB,CAAC,CAAC;YACpH,eAAe,EAAE,KAAK,CAAC,eAAe;gBAClC,CAAC,CAAC,KAAK,CAAC,eAAe,YAAY,KAAK;oBACpC,CAAC,CAAE,KAAK,CAAC,eAA4B;oBACrC,CAAC,CAAC,CAAC,KAAK,CAAC,eAAyB,CAAC;gBACvC,CAAC,CAAC,IAAI;YACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAsB,CAAC,CAAC,CAAC,CAAC,EAAE;SACjF,CAAC;IACN,CAAC;IAEO,YAAY,CAAC,gBAA0B;QAC3C,IAAI,MAAM,GAAsC,IAAI,GAAG,EAAE,CAAC;QAE1D,KAAK,MAAM,MAAM,IAAI,gBAAgB,EAAE;YACnC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACxC,MAAM,OAAO,GAAa,MAAM,CAAC,QAAQ,CAAC,CAAC;YAE3C,MAAM,CAAC,GAAG,CAAC;gBACP,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACnC,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;aACjC,CAAC,CAAC;SACN;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AApDD,8EAoDC"}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="express" />
2
2
  import { RequestHandler } from "@golemio/core/dist/shared/express";
3
- export declare class PublicGtfsController {
3
+ export declare class V2PublicGtfsController {
4
4
  getOneTrip: RequestHandler;
5
5
  private parseGtfsTripLookupParams;
6
6
  }
@@ -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.PublicGtfsController = void 0;
12
+ exports.V2PublicGtfsController = void 0;
13
13
  const Di_1 = require("../../ioc/Di");
14
14
  const OgModuleToken_1 = require("../../ioc/OgModuleToken");
15
15
  const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
16
- class PublicGtfsController {
16
+ class V2PublicGtfsController {
17
17
  constructor() {
18
18
  this.getOneTrip = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
19
- const span = (0, trace_provider_1.createChildSpan)("PublicGtfsController.getOneTrip");
19
+ const span = (0, trace_provider_1.createChildSpan)("V2PublicGtfsController.getOneTrip");
20
20
  try {
21
21
  const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.GtfsTripLookupFacade);
22
22
  const params = this.parseGtfsTripLookupParams(req);
@@ -40,5 +40,5 @@ class PublicGtfsController {
40
40
  };
41
41
  }
42
42
  }
43
- exports.PublicGtfsController = PublicGtfsController;
44
- //# sourceMappingURL=PublicGtfsController.js.map
43
+ exports.V2PublicGtfsController = V2PublicGtfsController;
44
+ //# sourceMappingURL=V2PublicGtfsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V2PublicGtfsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicGtfsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAsD;AACtD,2DAA6D;AAG7D,+FAA6F;AAI7F,MAAa,sBAAsB;IAAnC;QACW,eAAU,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACzD,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,mCAAmC,CAAC,CAAC;YAElE,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAAuB,6BAAa,CAAC,oBAAoB,CAAC,CAAC;gBACnG,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBACnD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBAE/E,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClB;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;IAWN,CAAC;IATW,yBAAyB,CAAC,GAAY;QAC1C,OAAO;YACH,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU;YACjC,MAAM,EACF,GAAG,CAAC,KAAK,CAAC,MAAM,YAAY,KAAK;gBAC7B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,MAA6B,CAAC,CAAC;gBAC9D,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAA2B,CAAC;SACpD,CAAC;IACN,CAAC;CACJ;AA1BD,wDA0BC"}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="express" />
2
2
  import { RequestHandler } from "@golemio/core/dist/shared/express";
3
- export declare class PublicVehiclePositionsController {
3
+ export declare class V2PublicVehiclePositionsController {
4
4
  constructor();
5
5
  getAll: RequestHandler;
6
6
  getOneByVehicleId: RequestHandler;
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.PublicVehiclePositionsController = void 0;
12
+ exports.V2PublicVehiclePositionsController = void 0;
13
13
  const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
14
14
  const const_1 = require("../../domain/const");
15
15
  const Di_1 = require("../../ioc/Di");
16
16
  const OgModuleToken_1 = require("../../ioc/OgModuleToken");
17
- class PublicVehiclePositionsController {
17
+ class V2PublicVehiclePositionsController {
18
18
  constructor() {
19
19
  this.getAll = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
20
20
  try {
@@ -82,5 +82,5 @@ class PublicVehiclePositionsController {
82
82
  };
83
83
  }
84
84
  }
85
- exports.PublicVehiclePositionsController = PublicVehiclePositionsController;
86
- //# sourceMappingURL=PublicVehiclePositionsController.js.map
85
+ exports.V2PublicVehiclePositionsController = V2PublicVehiclePositionsController;
86
+ //# sourceMappingURL=V2PublicVehiclePositionsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V2PublicVehiclePositionsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA2D;AAC3D,8CAA6D;AAC7D,qCAAsD;AACtD,2DAA6D;AAQ7D,MAAa,kCAAkC;IAC3C;QAEO,WAAM,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACrD,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAA+B,6BAAa,CAAC,4BAA4B,CAAC,CAAC;gBACnH,MAAM,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACpD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;gBAE3F,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACpB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAA,CAAC;QAEK,sBAAiB,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAChE,IAAI;gBACA,MAA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C,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,MAA6B,CAAC,CAAC;gBAC9D,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAA2B,CAAC;SACpD,CAAC;IACN,CAAC;CACJ;AAxED,gFAwEC"}
@@ -1,6 +1,6 @@
1
1
  import { GTFSRouteTypeEnum } from "../../../../../helpers/RouteTypeEnums";
2
2
  import { IBoundingBox } from "../../../domain/IBoudingBox";
3
- import { DetailedTripScope } from "../../../routers/v1/helpers/DetailedTripScopeEnum";
3
+ import { DetailedTripScope } from "../../../routers/v2/helpers/DetailedTripScopeEnum";
4
4
  export interface IVehiclePositionsParams {
5
5
  boundingBox: IBoundingBox;
6
6
  routeShortName: string | string[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"PublicParamsInterfaces.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/controllers/v1/interfaces/PublicParamsInterfaces.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"PublicParamsInterfaces.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/controllers/v2/interfaces/PublicParamsInterfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from "./routers";