@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
@@ -23,6 +23,7 @@ Modul slouží k ukládání a poskytování informací o jízdních řádech a
23
23
  - Kolejové obvody pro metro
24
24
  - Grafana Loki
25
25
  - Request logy z URL proxy pro monitorovací centrum od ROPIDU
26
+ - JIS Infotexty
26
27
 
27
28
  #### _ROPID FTP (obecně)_
28
29
 
@@ -214,7 +215,25 @@ _:warning: Původním záměrem bylo využití OIS číselníku během zpracová
214
215
  - prod `0 */1 * * * *`
215
216
  - názvy rabbitmq front
216
217
  - vehicle-positions.ropidpresets.collectAndSaveLogs se zprávou `{ "targetMinutes": n }`
217
- -
218
+
219
+ #### _JIS Infotexty_
220
+
221
+ - zdroj dat
222
+ - baseUrl: module.pid.jis.baseUrl
223
+ - infotexts path: module.pid.jis.infotexts.path
224
+ - hlavičky infotexts dotazu: module.pid.jis.infotexts.headers
225
+ - formát dat
226
+ - protokol: http
227
+ - datový typ: json
228
+ - validační schéma: [JISInfotextsJsonSchema](../src/schema-definitions/jis/datasources/JISInfotextsJsonSchema.ts)
229
+ - příklad vstupnich dat: [infotextsDataSourceFixture](../test/integration-engine/jis/fixtures/infotextsDataSourceFixture.ts)
230
+ - frekvence stahování
231
+ - cron definice:
232
+ - cron.vehicle-positions.jis.refreshJISInfotexts
233
+ - rabin `*/30 * * * * *`
234
+ - prod `*/30 * * * * *`
235
+ - název rabbitmq fronty
236
+ - vehicle-positions.jis.refreshJISInfotexts
218
237
 
219
238
  ### _Ropid staticka data_
220
239
 
@@ -225,7 +244,7 @@ _:warning: Původním záměrem bylo využití OIS číselníku během zpracová
225
244
  - formát dat
226
245
  - protokol: http
227
246
  - datový typ: csv
228
- - validační schéma:
247
+ - validační schéma:
229
248
  - [MetroRailTrack](../src/schema-definitions/datasources/static-data/MetroRailTrackJsonSchema.ts)
230
249
  - [DeparturesDirection](../src/schema-definitions/datasources/static-data/DeparturesDirectionsJsonSchema.ts)
231
250
  - příklad vstupnich dat: viz zdroj data
@@ -233,6 +252,7 @@ _:warning: Původním záměrem bylo využití OIS číselníku během zpracová
233
252
  - Po nacteni jizdnich radu (fronta: vehicle-positions.ropidgtfs.checkForNewData)
234
253
  - názvy rabbitmq front
235
254
  - vehicle-positions.ropidgtfs.saveStaticData
255
+
236
256
  ### Data nám jsou posílána
237
257
 
238
258
  **Dostupní poskytovatelé**:
@@ -1085,6 +1105,26 @@ Worker má na starost retenci dat tabulek Azure Table Storage
1085
1105
  - data modely
1086
1106
  - žádné
1087
1107
 
1108
+ ### _JISWorker_
1109
+
1110
+ Worker má na starost stahování VYMI (JIS) infotextů, jejich transformaci a uložení do databáze
1111
+
1112
+ #### _task: RefreshJISInfotextsTask_
1113
+
1114
+ - vstupní rabbitmq fronta
1115
+ - název: vehicle-positions.jis.refreshJISInfotexts
1116
+ - TTL: 1 minuta
1117
+ - parametry: žádné
1118
+ - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
1119
+ - žádné
1120
+ - datové zdroje
1121
+ - JIS Infotexty
1122
+ - transformace
1123
+ - [JISInfotextsTransformation](../src/integration-engine/jis/transformations/JISInfotextsTransformation.ts)
1124
+ - data modely
1125
+ - JISInfotextsModel `jis_infotexts`
1126
+ - JISInfotextsRopidGTFSStopsModel `jis_infotexts_ropidgtfs_stops`
1127
+
1088
1128
  ## Uložení dat
1089
1129
 
1090
1130
  - typ databáze
@@ -1109,12 +1149,15 @@ Worker má na starost retenci dat tabulek Azure Table Storage
1109
1149
  ![pid vp desc diagram](./assets/pid_vp_desc_erd.png)
1110
1150
  - Zastávky RT spojů (pouze MPV)<br/>
1111
1151
  ![pid vp cis diagram](./assets/pid_vp_cis_erd.jpg)
1152
+ - JIS infotexty<br/>
1153
+ ![pid jis diagram](./assets/pid_jis_erd.png)
1112
1154
 
1113
1155
  - retence dat
1114
1156
  - jízdní řády se generují 1-2x denně na 14 dní dopředu
1115
1157
  - polohová data si uchováváme 24 hodin (30 minut od poslední aktualizace, poté v historických tabulkách)
1116
1158
  - popis vozidel si uchováváme 24 hodin
1117
1159
  - preset logy si uchováváme 8 hodin
1160
+ - JIS infotexty si uchováváme do příštího úspěšného znovunačtení (ke kterému by mělo docházet dvakrát za minutu)
1118
1161
 
1119
1162
  ## Input API
1120
1163
 
@@ -1122,8 +1165,8 @@ Worker má na starost retenci dat tabulek Azure Table Storage
1122
1165
 
1123
1166
  - OpenAPI v3 dokumentace
1124
1167
  - zdrojový soubor: [openapi-input.yaml](./openapi-input.yaml)
1125
- - rabin: https://rabin.golemio.cz/v2/pid/input/docs/openapi/
1126
- - golem: https://api.golemio.cz/v2/pid/input/docs/openapi/
1168
+ - rabin: https://rabin.golemio.cz/pid/input-gateway/docs/openapi/
1169
+ - golem: https://api.golemio.cz/pid/input-gateway/docs/openapi/
1127
1170
  - api je neveřejné
1128
1171
  - postman kolekce
1129
1172
  - TBD
@@ -1150,64 +1193,64 @@ Worker má na starost retenci dat tabulek Azure Table Storage
1150
1193
 
1151
1194
  - OpenAPI v3 dokumentace
1152
1195
  - zdrojový soubor: [openapi-output.yaml](./openapi-output.yaml)
1153
- - rabin: https://rabin.golemio.cz/v2/pid/docs/openapi/
1154
- - golem: https://api.golemio.cz/v2/pid/docs/openapi/
1155
- - real-time data jsou veřejná, zbývající endpointy jsou k dispozici všem registrovaným uživatelům
1196
+ - rabin: https://rabin.golemio.cz/pid/docs/openapi/
1197
+ - golem: https://api.golemio.cz/pid/docs/openapi/
1198
+ - GTFS-RT a `/v2/public` data jsou veřejná, zbývající endpointy jsou k dispozici všem registrovaným uživatelům
1156
1199
  - postman kolekce
1157
1200
  - TBD
1158
1201
 
1159
- ### GTFS
1202
+ ### GTFS v2
1160
1203
 
1161
- #### _/gtfs/services_
1204
+ #### _/v2/gtfs/services_
1162
1205
 
1163
1206
  - zdrojové tabulky
1164
1207
  - `ropidgtfs_calendar`
1165
1208
 
1166
- #### _/gtfs/routes_
1209
+ #### _/v2/gtfs/routes_
1167
1210
 
1168
1211
  - zdrojové tabulky
1169
1212
  - `ropidgtfs_routes`
1170
1213
 
1171
- #### _/gtfs/routes/{id}_
1214
+ #### _/v2/gtfs/routes/{id}_
1172
1215
 
1173
1216
  - zdrojové tabulky
1174
1217
  - `ropidgtfs_routes`
1175
1218
 
1176
- #### _/gtfs/trips_
1219
+ #### _/v2/gtfs/trips_
1177
1220
 
1178
1221
  - zdrojové tabulky
1179
1222
  - `ropidgtfs_trips`, `ropidgtfs_stop_times`, `ropidgtfs_calendar`
1180
1223
 
1181
- #### _/gtfs/trips/{id}_
1224
+ #### _/v2/gtfs/trips/{id}_
1182
1225
 
1183
1226
  - zdrojové tabulky
1184
1227
  - `ropidgtfs_trips`, `ropidgtfs_stop_times`, `ropidgtfs_stops`, `ropidgtfs_shapes`, `ropidgtfs_calendar`, `ropidgtfs_routes`
1185
1228
 
1186
- #### _/gtfs/shapes/{id}_
1229
+ #### _/v2/gtfs/shapes/{id}_
1187
1230
 
1188
1231
  - zdrojové tabulky
1189
1232
  - `ropidgtfs_shapes`
1190
1233
 
1191
- #### _/gtfs/stops_
1234
+ #### _/v2/gtfs/stops_
1192
1235
 
1193
1236
  - zdrojové tabulky
1194
1237
  - `ropidgtfs_stops`, `ropidgtfs_cis_stops`
1195
1238
  - dodatečná transformace: Feature collection
1196
1239
 
1197
- #### _/gtfs/stops/{id}_
1240
+ #### _/v2/gtfs/stops/{id}_
1198
1241
 
1199
1242
  - zdrojové tabulky
1200
1243
  - `ropidgtfs_stops`, `ropidgtfs_cis_stops`
1201
1244
  - dodatečná transformace: Feature
1202
1245
 
1203
- #### _/gtfs/stoptimes/{id}_
1246
+ #### _/v2/gtfs/stoptimes/{id}_
1204
1247
 
1205
1248
  - zdrojové tabulky
1206
1249
  - `ropidgtfs_stop_times`, `ropidgtfs_stops`, `ropidgtfs_calendar`, `ropidgtfs_trips`
1207
1250
 
1208
- ### Vehicle Positions
1251
+ ### Vehicle Positions v2
1209
1252
 
1210
- #### _/vehiclepositions_
1253
+ #### _/v2/vehiclepositions_
1211
1254
 
1212
1255
  - zdrojové tabulky
1213
1256
  - `v_vehiclepositions_all_trips_with_last_position` (`vehiclepositions_positions`, `vehiclepositions_trips`)
@@ -1216,7 +1259,7 @@ Worker má na starost retenci dat tabulek Azure Table Storage
1216
1259
  - dodatečná transformace: Feature collection
1217
1260
  - je použit `CompressionByDefaultMiddleware` a odpovědi jsou tak na output gateway komprimovány i pokud klient explicitně nepovolí komprimaci vhodnou hodnotou hlavičky `Accept-Encoding` (lze však komprimaci explicitně zakázat hodnotou `identity`)
1218
1261
 
1219
- #### _/vehiclepositions/{gtfsTripId}_
1262
+ #### _/v2/vehiclepositions/{gtfsTripId}_
1220
1263
 
1221
1264
  - zdrojové tabulky
1222
1265
  - `v_vehiclepositions_all_trips_with_last_position` (`vehiclepositions_positions`, `vehiclepositions_trips`)
@@ -1226,43 +1269,51 @@ Worker má na starost retenci dat tabulek Azure Table Storage
1226
1269
  - dodatečná transformace: Feature
1227
1270
  - je použit `CompressionByDefaultMiddleware` a odpovědi jsou tak na output gateway komprimovány i pokud klient explicitně nepovolí komprimaci vhodnou hodnotou hlavičky `Accept-Encoding` (lze však komprimaci explicitně zakázat hodnotou `identity`)
1228
1271
 
1229
- ### Vehicle Positions GTFS RT
1272
+ ### Vehicle Positions GTFS RT v2
1230
1273
 
1231
- #### _/vehiclepositions/gtfsrt/trip_updates.pb_
1274
+ #### _/v2/vehiclepositions/gtfsrt/trip_updates.pb_
1232
1275
 
1233
1276
  - načtení souboru z Redis cache
1234
1277
  - HGET files:gtfsRt trip_updates.pb
1235
1278
 
1236
- #### _/vehiclepositions/gtfsrt/vehicle_positions.pb_
1279
+ #### _/v2/vehiclepositions/gtfsrt/vehicle_positions.pb_
1237
1280
 
1238
1281
  - načtení souboru z Redis cache
1239
1282
  - HGET files:gtfsRt vehicle_positions.pb
1240
1283
 
1241
- #### _/vehiclepositions/gtfsrt/pid_feed.pb_
1284
+ #### _/v2/vehiclepositions/gtfsrt/pid_feed.pb_
1242
1285
 
1243
1286
  - načtení souboru z Redis cache
1244
1287
  - HGET files:gtfsRt pid_feed.pb
1245
1288
 
1246
- #### _/vehiclepositions/gtfsrt/alerts.pb_
1289
+ #### _/v2/vehiclepositions/gtfsrt/alerts.pb_
1247
1290
 
1248
1291
  - načtení souboru z Redis cache
1249
1292
  - HGET files:gtfsRt alerts.pb
1250
1293
 
1251
- ### PID Departure Boards
1294
+ ### PID Departure Boards v2
1252
1295
 
1253
- #### _/pid/departureboards_
1296
+ #### _/v2/pid/departureboards_
1254
1297
 
1255
1298
  - zdrojové tabulky
1256
- - `ropidgtfs_precomputed_departures`, `ropidgtfs_stops`, `ropidgtfs_cis_stops`, `ropidvymi_events`, `ropidvymi_events_stops`, `ropid_departures_directions`, `vehiclepositions_positions`, `vehiclepositions_trips`
1299
+ - `ropidgtfs_precomputed_departures`, `ropidgtfs_stops`, `ropidgtfs_cis_stops`, `jis_infotexts`, `jis_infotexts_ropidgtfs_stops`, `ropid_departures_directions`, `vehiclepositions_positions`, `vehiclepositions_trips`
1257
1300
 
1258
- #### _/pid/infotexts_
1301
+ #### _/v2/pid/infotexts_
1259
1302
 
1260
1303
  - zdrojové tabulky
1261
1304
  - `ropidvymi_events`, `ropidvymi_events_stops`, `ropidvymi_events_routes`, `ropidgtfs_stops`
1262
1305
 
1263
- ### Public
1306
+ ### PID Departure Boards v3
1307
+
1308
+ #### _/v3/pid/infotexts_
1309
+
1310
+ - načte aktivní infotexty exportované z aplikace VYMI (JIS) Infotexty
1311
+ - zdrojové tabulky
1312
+ - `jis_infotexts`, `jis_infotexts_ropidgtfs_stops`, `ropidgtfs_stops`
1313
+
1314
+ ### Public v2
1264
1315
 
1265
- #### _/public/gtfs/trips/{gtfsTripId}_
1316
+ #### _/v2/public/gtfs/trips/{gtfsTripId}_
1266
1317
 
1267
1318
  - načte statické informace o GTFS spoji z PSQL, případně jeho oběhové číslo pro současný den (pokud je k dispozici), shapes a zastávky
1268
1319
  - `info`: statické informace o GTFS spoji a jeho oběhové číslo pro současný den (pokud je k dispozici)
@@ -1272,14 +1323,14 @@ Worker má na starost retenci dat tabulek Azure Table Storage
1272
1323
  - cachováno na 4 hodiny pomocí cache-control hlavičky
1273
1324
  - je použit `CompressionByDefaultMiddleware` a odpovědi jsou tak na output gateway komprimovány i pokud klient explicitně nepovolí komprimaci vhodnou hodnotou hlavičky `Accept-Encoding` (lze však komprimaci explicitně zakázat hodnotou `identity`)
1274
1325
 
1275
- #### _/public/vehiclepositions_
1326
+ #### _/v2/public/vehiclepositions_
1276
1327
 
1277
1328
  - načte aktuální polohy vozidel z redisu a vrátí je ve formátu geojson
1278
1329
  - možno filtrovat dle bouding box na straně redisu
1279
1330
  - podle typu vozidla a gtfs route number na klientské straně
1280
1331
  - je použit `CompressionByDefaultMiddleware` a odpovědi jsou tak na output gateway komprimovány i pokud klient explicitně nepovolí komprimaci vhodnou hodnotou hlavičky `Accept-Encoding` (lze však komprimaci explicitně zakázat hodnotou `identity`)
1281
1332
 
1282
- #### _/public/vehiclepositions/{vehicleId}_
1333
+ #### _/v2/public/vehiclepositions/{vehicleId}_
1283
1334
 
1284
1335
  - načte jednu aktuální polohu z redisu
1285
1336
  - výstup možno filtrovat podle query parametru `scopes`
@@ -1289,12 +1340,12 @@ Worker má na starost retenci dat tabulek Azure Table Storage
1289
1340
  - `vehicle_descriptor`: informace o vozidle (dopravce, dostupnost klimatizace, USB, ...)
1290
1341
  - je použit `CompressionByDefaultMiddleware` a odpovědi jsou tak na output gateway komprimovány i pokud klient explicitně nepovolí komprimaci vhodnou hodnotou hlavičky `Accept-Encoding` (lze však komprimaci explicitně zakázat hodnotou `identity`)
1291
1342
 
1292
- #### _/public/vehiclepositions/{vehicleId}{gtfsTripId}_
1343
+ #### _/v2/public/vehiclepositions/{vehicleId}{gtfsTripId}_
1293
1344
 
1294
1345
  - rozšíření endpointu výše `/public/vehiclepositions/{vehicleId}` o možnost dotázat se na before track (delayed) spoje podle `gtfsTripId`
1295
1346
  - je použit `CompressionByDefaultMiddleware` a odpovědi jsou tak na output gateway komprimovány i pokud klient explicitně nepovolí komprimaci vhodnou hodnotou hlavičky `Accept-Encoding` (lze však komprimaci explicitně zakázat hodnotou `identity`)
1296
1347
 
1297
- #### _/public/departureboards_
1348
+ #### _/v2/public/departureboards_
1298
1349
 
1299
1350
  - načte nacacheované odjezdy z redisu
1300
1351
  - možno filtrovat podle skupin zastávek `stopIds` (podle GTFS číselníku) s možností nastavení pořadí navrácených skupin s odjezdy - příklad `?stopIds[]={"0": ["U717Z5P"]}&stopIds[]={"1": ["U718Z5P", "U719Z5P"]}`