@golemio/pid 4.0.3-dev.1997942620 → 4.0.3-rc.2001599412

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 (198) hide show
  1. package/README.md +1 -1
  2. package/dist/helpers/GtfsStopParser.d.ts +0 -2
  3. package/dist/helpers/GtfsStopParser.js +8 -11
  4. package/dist/helpers/GtfsStopParser.js.map +1 -1
  5. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +1 -0
  6. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
  7. package/dist/integration-engine/jis/ioc/Di.js +0 -10
  8. package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
  9. package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +0 -4
  10. package/dist/integration-engine/jis/ioc/JISContainerToken.js +0 -5
  11. package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
  12. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +1 -6
  13. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +2 -50
  14. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  15. package/dist/integration-engine/jis/workers/JISWorker.js +0 -1
  16. package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -1
  17. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +2 -1
  18. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -5
  19. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  20. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.d.ts +1 -5
  21. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +0 -24
  22. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  23. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  24. package/dist/integration-engine/ropid-gtfs/index.d.ts +0 -1
  25. package/dist/integration-engine/ropid-gtfs/index.js +0 -1
  26. package/dist/integration-engine/ropid-gtfs/index.js.map +1 -1
  27. package/dist/integration-engine/ropid-gtfs/ioc/Di.js +0 -8
  28. package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
  29. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +0 -3
  30. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +0 -3
  31. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
  32. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js +1 -1
  33. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js.map +1 -1
  34. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +0 -1
  35. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +1 -1
  36. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +5 -8
  37. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  38. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.d.ts +0 -1
  39. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js +0 -1
  40. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js.map +1 -1
  41. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +0 -1
  42. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  43. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/interfaces/TripRepositoryInterfaces.d.ts +1 -2
  44. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.d.ts +1 -3
  45. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +109 -124
  46. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
  47. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.d.ts +1 -3
  48. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +85 -100
  49. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
  50. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  51. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +0 -1
  52. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  53. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +0 -2
  54. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  55. package/dist/output-gateway/index.js +0 -1
  56. package/dist/output-gateway/index.js.map +1 -1
  57. package/dist/output-gateway/jis/ioc/Di.js +2 -2
  58. package/dist/output-gateway/jis/ioc/Di.js.map +1 -1
  59. package/dist/output-gateway/jis/ioc/OgJisToken.d.ts +0 -2
  60. package/dist/output-gateway/jis/ioc/OgJisToken.js +0 -2
  61. package/dist/output-gateway/jis/ioc/OgJisToken.js.map +1 -1
  62. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  63. package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +0 -5
  64. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.d.ts +1 -4
  65. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js +1 -7
  66. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js.map +1 -1
  67. package/dist/output-gateway/pid/index.d.ts +0 -50
  68. package/dist/output-gateway/pid/index.js.map +1 -1
  69. package/dist/output-gateway/pid/ioc/Di.js +6 -64
  70. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  71. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +0 -12
  72. package/dist/output-gateway/pid/ioc/OgPidToken.js +0 -12
  73. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  74. package/dist/output-gateway/pid/routers/index.d.ts +0 -1
  75. package/dist/output-gateway/pid/routers/index.js +1 -3
  76. package/dist/output-gateway/pid/routers/index.js.map +1 -1
  77. package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +2 -7
  78. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +4 -29
  79. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  80. package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +3 -12
  81. package/dist/output-gateway/pid/service/facade/StopFacade.js +7 -43
  82. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  83. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +10 -17
  84. package/dist/output-gateway/pid/service/facade/TransferFacade.js +16 -161
  85. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  86. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +1 -7
  87. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +0 -9
  88. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -1
  89. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.d.ts +1 -1
  90. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +4 -7
  91. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  92. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.d.ts +0 -1
  93. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +0 -21
  94. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
  95. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +1 -2
  96. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +15 -14
  97. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
  98. package/dist/output-gateway/public/domain/repository/IGtfsDepartureRepository.d.ts +1 -1
  99. package/dist/output-gateway/public/ioc/Di.js +1 -1
  100. package/dist/output-gateway/public/ioc/Di.js.map +1 -1
  101. package/dist/output-gateway/{shared → public}/service/VPSubscriber.d.ts +2 -4
  102. package/dist/output-gateway/{shared → public}/service/VPSubscriber.js +1 -1
  103. package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -0
  104. package/dist/output-gateway/shared/constants/route-version.d.ts +1 -2
  105. package/dist/output-gateway/shared/constants/route-version.js +0 -1
  106. package/dist/output-gateway/shared/constants/route-version.js.map +1 -1
  107. package/dist/schema-definitions/jis/redis/const.d.ts +0 -1
  108. package/dist/schema-definitions/jis/redis/const.js +1 -2
  109. package/dist/schema-definitions/jis/redis/const.js.map +1 -1
  110. package/dist/schema-definitions/ropid-departures-presets/index.d.ts +0 -1
  111. package/dist/schema-definitions/ropid-departures-presets/index.js +0 -3
  112. package/dist/schema-definitions/ropid-departures-presets/index.js.map +1 -1
  113. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopDto.d.ts +0 -1
  114. package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +0 -1
  115. package/dist/schema-definitions/ropid-gtfs/redis/const.js +1 -2
  116. package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
  117. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.d.ts +2 -3
  118. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js +0 -4
  119. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js.map +1 -1
  120. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IPublicStopTimeDto.d.ts +0 -1
  121. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto.d.ts +0 -2
  122. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto.d.ts +0 -1
  123. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js +0 -8
  124. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js.map +1 -1
  125. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js +1 -4
  126. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js.map +1 -1
  127. package/docs/asyncapi.yaml +0 -45
  128. package/docs/cache/types/redis.md +2 -82
  129. package/docs/jis/index.md +5 -15
  130. package/docs/openapi-input.yaml +2 -13
  131. package/docs/openapi-output.yaml +4 -326
  132. package/package.json +2 -2
  133. package/db/example/redis/gtfsStopsCacheMock.json +0 -8
  134. package/db/example/redis/jisCacheMock.json +0 -31
  135. package/db/migrations/postgresql/20250716143052-add-stop-name-to-combined-stop-times.js +0 -53
  136. package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-down.sql +0 -47
  137. package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-up.sql +0 -47
  138. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.d.ts +0 -6
  139. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js +0 -11
  140. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js.map +0 -1
  141. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.d.ts +0 -9
  142. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js +0 -86
  143. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js.map +0 -1
  144. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.d.ts +0 -7
  145. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js +0 -37
  146. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js.map +0 -1
  147. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.d.ts +0 -13
  148. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js +0 -47
  149. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js.map +0 -1
  150. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.d.ts +0 -18
  151. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js +0 -44
  152. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js.map +0 -1
  153. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.d.ts +0 -12
  154. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js +0 -44
  155. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js.map +0 -1
  156. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.d.ts +0 -12
  157. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js +0 -87
  158. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js.map +0 -1
  159. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.d.ts +0 -17
  160. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js +0 -113
  161. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js.map +0 -1
  162. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.d.ts +0 -17
  163. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js +0 -155
  164. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js.map +0 -1
  165. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.d.ts +0 -14
  166. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js +0 -3
  167. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js.map +0 -1
  168. package/dist/output-gateway/pid/helpers/TransferBoardFilter.d.ts +0 -5
  169. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js +0 -33
  170. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js.map +0 -1
  171. package/dist/output-gateway/pid/helpers/TransferBoardSorter.d.ts +0 -6
  172. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js +0 -61
  173. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js.map +0 -1
  174. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.d.ts +0 -16
  175. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js +0 -67
  176. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js.map +0 -1
  177. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.d.ts +0 -13
  178. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js +0 -31
  179. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js.map +0 -1
  180. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts +0 -27
  181. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js +0 -77
  182. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map +0 -1
  183. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.d.ts +0 -13
  184. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js +0 -83
  185. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js.map +0 -1
  186. package/dist/output-gateway/shared/service/VPSubscriber.js.map +0 -1
  187. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.d.ts +0 -17
  188. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js +0 -3
  189. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js.map +0 -1
  190. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.d.ts +0 -3
  191. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js +0 -59
  192. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js.map +0 -1
  193. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.d.ts +0 -16
  194. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js +0 -3
  195. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js.map +0 -1
  196. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.d.ts +0 -58
  197. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js +0 -69
  198. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js.map +0 -1
@@ -36,9 +36,6 @@ tags:
36
36
  - name: 🚏 PID Departure Boards (v3) - internal
37
37
  description: Endpoints for internal use
38
38
 
39
- - name: 🚏 PID Departure Boards (v4)
40
- description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" /> <img src="https://img.shields.io/badge/stability-experimental-orange" alt="golemioapi-stability-badge" />
41
-
42
39
  - name: 🗓️ Public GTFS Static Lookup (v2)
43
40
  description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />
44
41
 
@@ -1378,329 +1375,6 @@ paths:
1378
1375
  type: string
1379
1376
  example: ["U454Z301"]
1380
1377
 
1381
- /v4/pid/transferboards:
1382
- get:
1383
- tags:
1384
- - 🚏 PID Departure Boards (v4)
1385
- summary: GET Transfer Boards
1386
- parameters:
1387
- - name: cisId
1388
- in: query
1389
- description: |
1390
- CIS identifier of the stop or node. A list of CIS IDs can be found in [Prague Open data](https://opendata.praha.eu/datasets/https%3A%2F%2Fapi.opendata.praha.eu%2Flod%2Fcatalog%2F6ac8381f-ea19-4ea9-8949-92076809dc5a).
1391
- Includes departures from all stops at the given CIS ID.
1392
- Required if `aswId` is not provided. Only one of `cisId` or `aswId` can be used.
1393
- required: false
1394
- examples:
1395
- cisId1:
1396
- value: 58759
1397
- summary: Anděl
1398
- cisId2:
1399
- value: 13035
1400
- summary: Jesenice
1401
- cisId3:
1402
- value: 5454956
1403
- summary: Praha-Uhříněves
1404
- schema:
1405
- type: number
1406
- - name: aswId
1407
- in: query
1408
- description: |
1409
- ASW identifier of the stop. The format is `nodeId/stopId` where stopId is not mandatory.
1410
- You can use `_` instead of `/` or encode the slash sign with `%2F`,
1411
- Includes departures from the given stop, plus from all stops at the given node (1330_1 -> 1330 -> 1330_1, 1330_2, ...),
1412
- plus from all stops sharing the same name. Departures from associated metro and train stations are also included (Na Knížecí -> Anděl).
1413
- Required if `cisId` is not provided. Only one of `cisId` or `aswId` can be used.
1414
- required: false
1415
- examples:
1416
- aswId1:
1417
- value: "1040_1"
1418
- summary: "Anděl A (tram stop)"
1419
- aswId2:
1420
- value: "1040_14"
1421
- summary: "Anděl G (bus stop)"
1422
- aswId3:
1423
- value: "1330_1"
1424
- summary: "Jesenice A (bus stop - regional)"
1425
- aswId4:
1426
- value: "461_301"
1427
- summary: "Praha-Uhříněves (train station)"
1428
- schema:
1429
- type: string
1430
- maxLength: 20
1431
- - name: tripNumber
1432
- in: query
1433
- description: |
1434
- Trip number of the vehicle in which the transfer is planned.
1435
- Use to filter out transfers for a specific trip.
1436
- Represents the numeric part of the GTFS `trip_short_name` (`Os 2547` -> `2547`).
1437
- Generally, `trip_short_name` is available only for train services.
1438
- Required if `vehicleRegistrationNumber` is not provided. Only one of `tripNumber` or `vehicleRegistrationNumber` can be used.
1439
- required: false
1440
- examples:
1441
- tripNumber1:
1442
- value: 2547
1443
- summary: Os 2547
1444
- schema:
1445
- type: number
1446
- - name: vehicleRegistrationNumber
1447
- in: query
1448
- description: |
1449
- Registration number of the vehicle in which the transfer is planned.
1450
- Use to filter out transfers for a specific vehicle.
1451
- Required if `tripNumber` is not provided. Only one of `tripNumber` or `vehicleRegistrationNumber` can be used.
1452
- required: false
1453
- examples:
1454
- vehicleRegistrationNumber1:
1455
- value: "1001"
1456
- summary: "Vehicle registration number"
1457
- schema:
1458
- type: string
1459
- maxLength: 20
1460
- - name: routeType
1461
- in: query
1462
- description: |
1463
- Transport type of the route in which the transfer is planned. This parameter is required to distinguish between different vehicle types, as trams and buses can share the same registration number. The value is represented by the following enum from GTFS:
1464
- - 0: Tram
1465
- - 1: Subway
1466
- - 2: Train
1467
- - 3: Bus
1468
- - 4: Ferry
1469
- - 7: Funicular
1470
- - 11: Trolleybus
1471
- For example, if you want to get a tram with registration number "1001", use routeType=0. For a bus with the same registration number, use routeType=3.
1472
- required: true
1473
- examples:
1474
- routeType1:
1475
- value: 2
1476
- summary: "Train"
1477
- routeType2:
1478
- value: 3
1479
- summary: "Bus"
1480
- schema:
1481
- type: number
1482
- enum:
1483
- - 0
1484
- - 1
1485
- - 2
1486
- - 3
1487
- - 4
1488
- - 7
1489
- - 11
1490
- - name: timeFrom
1491
- in: query
1492
- description: |
1493
- Set initial timestamp for time interval given by `minutesBefore` (hardcoded to 0) and `minutesAfter` (hardcoded to 60). Use to simulate query time different from now. Use ISO 8601 time format and URL encoded symbols - `%3A` for `:`, `%2B` for `.`, `%2F` for `+`. Time zone is set to `Europe/Prague`. Applicable range is -6 hours +2 days from now.
1494
- required: false
1495
- schema:
1496
- type: string
1497
- example: "2024-11-04T16:51:00"
1498
- - name: limit
1499
- in: query
1500
- description: |
1501
- Limit the number of rows of departures returned. The total number of departures is a union across individual types of departures. The default value is 8.
1502
- required: false
1503
- schema:
1504
- type: number
1505
- default: 8
1506
- responses:
1507
- "200":
1508
- description: List of possible transfers at the provided stop/node (identified by cisId or aswId)
1509
- headers:
1510
- Cache-Control:
1511
- description: Cache control directive for caching proxies
1512
- schema:
1513
- type: string
1514
- example: public, s-maxage=5, stale-while-revalidate=5
1515
- content:
1516
- application/json:
1517
- schema:
1518
- type: object
1519
- required:
1520
- - platform_code
1521
- - stop_name
1522
- - departures
1523
- - infotexts
1524
- properties:
1525
- platform_code:
1526
- type: string
1527
- example: "2/3"
1528
- nullable: true
1529
- stop_name:
1530
- type: string
1531
- example: "Anděl"
1532
- nullable: true
1533
- icons:
1534
- type: array
1535
- items:
1536
- type: string
1537
- nullable: true
1538
- departures:
1539
- type: array
1540
- description: |
1541
- List of departures from the stop.
1542
- The list is sorted by:
1543
- - route type - subway and then other
1544
- - subway is sorted alphabetically, then by departure time, then by direction id
1545
- - departure time
1546
- items:
1547
- type: object
1548
- required:
1549
- - departure_timestamp
1550
- - route
1551
- - trip
1552
- properties:
1553
- departure_timestamp:
1554
- type: object
1555
- required:
1556
- - minutes
1557
- properties:
1558
- minutes:
1559
- type: array
1560
- items:
1561
- type: string
1562
- nullable: true
1563
- example: ["<1", "8"]
1564
- route:
1565
- type: object
1566
- required:
1567
- - short_name
1568
- - type
1569
- properties:
1570
- short_name:
1571
- type: string
1572
- example: "B"
1573
- nullable: true
1574
- type:
1575
- type: number
1576
- example: 1
1577
- nullable: true
1578
- stop:
1579
- type: object
1580
- required:
1581
- - platform_code
1582
- properties:
1583
- platform_code:
1584
- type: string
1585
- example: "2/3"
1586
- nullable: true
1587
- trip:
1588
- type: object
1589
- required:
1590
- - headsign
1591
- - id
1592
- - is_wheelchair_accessible
1593
- properties:
1594
- headsign:
1595
- type: string
1596
- example: "Zličín"
1597
- nullable: false
1598
- description: "If more then one trips are available, the first one is taken. Trips are grouped by direction_id."
1599
- id:
1600
- type: string
1601
- example: "1309_2547_231210"
1602
- nullable: false
1603
- description: "If more then one trips are available, the first one is taken. Trips are grouped by direction_id."
1604
- is_wheelchair_accessible:
1605
- type: boolean
1606
- description: True if the vehicle being used on this trip is wheelchair accessible. Metro trips are deemed accessible if the station is accessible.
1607
- example: false
1608
- icons:
1609
- type: array
1610
- items:
1611
- type: string
1612
- nullable: true
1613
- substitution_text:
1614
- type: object
1615
- required:
1616
- - cs
1617
- properties:
1618
- cs:
1619
- type: string
1620
- example: "Provoz metra přerušen."
1621
- nullable: false
1622
- en:
1623
- type: string
1624
- example: "Metro service interrupted."
1625
- nullable: true
1626
- infotexts:
1627
- type: array
1628
- items:
1629
- type: object
1630
- required:
1631
- - text
1632
- - display_type
1633
- properties:
1634
- text:
1635
- type: object
1636
- required:
1637
- - cs
1638
- properties:
1639
- cs:
1640
- type: string
1641
- example: "Nehoda na trase, odklon linek mimo tuto stanici."
1642
- nullable: false
1643
- en:
1644
- type: string
1645
- example: "Trips are cancelled due to accident on route."
1646
- nullable: true
1647
- display_type:
1648
- type: string
1649
- example: "inline"
1650
- enum:
1651
- - "inline"
1652
- - "general"
1653
- nullable: false
1654
-
1655
- "400":
1656
- description: |
1657
- Bad request - invalid query parameters, including:
1658
- * `cisId` and `aswId` are missing or invalid
1659
- * Both `cisId` and `aswId` are provided
1660
- * `timeFrom` is invalid or out of range
1661
- content:
1662
- application/json:
1663
- schema:
1664
- type: object
1665
- properties:
1666
- error_message:
1667
- type: string
1668
- example: "Bad request"
1669
- nullable: false
1670
- error_status:
1671
- type: integer
1672
- example: 400
1673
- nullable: false
1674
- error_info:
1675
- type: string
1676
- example: "{...}"
1677
- nullable: true
1678
- required:
1679
- - error_message
1680
- - error_status
1681
- "401":
1682
- $ref: "#/components/responses/UnauthorizedError"
1683
- "404":
1684
- description: Not found - no valid GTFS stop found for the given CIS ID or ASW ID
1685
- content:
1686
- application/json:
1687
- schema:
1688
- type: object
1689
- required:
1690
- - departures
1691
- - infotexts
1692
- properties:
1693
- departures:
1694
- type: array
1695
- example: []
1696
- items:
1697
- type: object
1698
- infotexts:
1699
- type: array
1700
- example: []
1701
- items:
1702
- type: object
1703
-
1704
1378
  /v2/public/gtfs/trips/{gtfsTripId}:
1705
1379
  get:
1706
1380
  tags:
@@ -2113,6 +1787,10 @@ paths:
2113
1787
  $ref: "#/components/responses/BadRequestError"
2114
1788
  401:
2115
1789
  $ref: "#/components/responses/UnauthorizedError"
1790
+
1791
+
1792
+
1793
+
2116
1794
 
2117
1795
 
2118
1796
  components:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/pid",
3
- "version": "4.0.3-dev.1997942620",
3
+ "version": "4.0.3-rc.2001599412",
4
4
  "description": "Golemio PID Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -75,7 +75,7 @@
75
75
  "@golemio/core": ">=1.16.0-rc.1551191551"
76
76
  },
77
77
  "dependencies": {
78
- "@golemio/ovapi-gtfs-realtime-bindings": "1.2.4-dev.1288219308",
78
+ "@golemio/ovapi-gtfs-realtime-bindings": "1.2.3",
79
79
  "@turf/turf": "^6.5.0",
80
80
  "cheap-ruler": "^3.0.2",
81
81
  "csv-parser": "^3.0.0",
@@ -1,8 +0,0 @@
1
- {
2
- "awsNodeToGtfsStops": [
3
- {
4
- "476": "U476Z1P,U476Z2P,U476Z5P,U476Z101P,U476Z102P"
5
- }
6
- ],
7
- "cisToAswNode": [{ "59162": "476" }]
8
- }
@@ -1,31 +0,0 @@
1
- {
2
- "infotexts": [
3
- {
4
- "75eb0ccc-2a35-4260-bdaf-c61565a9c888": {
5
- "id": "75eb0ccc-2a35-4260-bdaf-c61565a9c888",
6
- "severity_level": "SEVERE",
7
- "display_type": "INLINE",
8
- "active_period_start": "2000-03-28T09:11:00.000Z",
9
- "active_period_end": null,
10
- "description_text": {
11
- "cs": "test",
12
- "en": "test"
13
- },
14
- "created_timestamp": "2025-03-07T08:49:25.907Z",
15
- "updated_timestamp": "2025-04-10T20:54:14.646Z",
16
- "created_at": "2025-07-01T11:41:41.689Z",
17
- "updated_at": "2025-07-01T11:41:41.689Z",
18
- "stops": [
19
- {
20
- "stop_id": "U476Z2P"
21
- }
22
- ]
23
- }
24
- }
25
- ],
26
- "stops-infotexts": [
27
- {
28
- "U476Z2P": "75eb0ccc-2a35-4260-bdaf-c61565a9c888"
29
- }
30
- ]
31
- }
@@ -1,53 +0,0 @@
1
- 'use strict';
2
-
3
- var dbm;
4
- var type;
5
- var seed;
6
- var fs = require('fs');
7
- var path = require('path');
8
- var Promise;
9
-
10
- /**
11
- * We receive the dbmigrate dependency from dbmigrate initially.
12
- * This enables us to not have to rely on NODE_PATH.
13
- */
14
- exports.setup = function(options, seedLink) {
15
- dbm = options.dbmigrate;
16
- type = dbm.dataType;
17
- seed = seedLink;
18
- Promise = options.Promise;
19
- };
20
-
21
- exports.up = function(db) {
22
- var filePath = path.join(__dirname, 'sqls', '20250716143052-add-stop-name-to-combined-stop-times-up.sql');
23
- return new Promise( function( resolve, reject ) {
24
- fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
25
- if (err) return reject(err);
26
- console.log('received data: ' + data);
27
-
28
- resolve(data);
29
- });
30
- })
31
- .then(function(data) {
32
- return db.runSql(data);
33
- });
34
- };
35
-
36
- exports.down = function(db) {
37
- var filePath = path.join(__dirname, 'sqls', '20250716143052-add-stop-name-to-combined-stop-times-down.sql');
38
- return new Promise( function( resolve, reject ) {
39
- fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
40
- if (err) return reject(err);
41
- console.log('received data: ' + data);
42
-
43
- resolve(data);
44
- });
45
- })
46
- .then(function(data) {
47
- return db.runSql(data);
48
- });
49
- };
50
-
51
- exports._meta = {
52
- "version": 1
53
- };
@@ -1,47 +0,0 @@
1
- drop view v_public_vehiclepositions_combined_stop_times;
2
-
3
- create view v_public_vehiclepositions_combined_stop_times as
4
- select
5
- distinct on (rt_trip_id, stop_sequence) stop_times.rt_trip_id,
6
- vt.gtfs_trip_id,
7
- stop_times.stop_sequence,
8
- stop_times.stop_arr_delay,
9
- stop_times.stop_dep_delay,
10
- vt.gtfs_route_type,
11
- vt.gtfs_route_short_name,
12
- vt.run_number,
13
- vt.internal_run_number,
14
- vt.provider_source_type,
15
- vt.cis_trip_number,
16
- vt.vehicle_registration_number,
17
- stop_times.stop_id,
18
- vcs.cis_stop_platform_code,
19
- rs.platform_code
20
- from
21
- (
22
- select
23
- *
24
- from
25
- v_public_vehiclepositions_future_stop_times prediction
26
- union
27
- all
28
- select
29
- *
30
- from
31
- v_public_vehiclepositions_past_stop_times history
32
- ) as stop_times
33
- join vehiclepositions_trips vt on vt.id = stop_times.rt_trip_id
34
- join vehiclepositions_positions vp on vt.last_position_id = vp.id
35
- and (
36
- vp.valid_to is null
37
- or vp.valid_to >= now()
38
- )
39
- and vp.state_position != 'after_track'
40
- left join ropidgtfs_stops rs on rs.stop_id = stop_times.stop_id
41
- left join ropidgtfs_cis_stops rcs on rcs.id = rs.computed_cis_stop_id
42
- left join vehiclepositions_cis_stops vcs
43
- on vcs.rt_trip_id = stop_times.rt_trip_id
44
- and vcs.cis_stop_group_id = rcs.cis
45
- order by
46
- rt_trip_id,
47
- stop_sequence;
@@ -1,47 +0,0 @@
1
- create
2
- or replace view v_public_vehiclepositions_combined_stop_times as
3
- select
4
- distinct on (rt_trip_id, stop_sequence) stop_times.rt_trip_id,
5
- vt.gtfs_trip_id,
6
- stop_times.stop_sequence,
7
- stop_times.stop_arr_delay,
8
- stop_times.stop_dep_delay,
9
- vt.gtfs_route_type,
10
- vt.gtfs_route_short_name,
11
- vt.run_number,
12
- vt.internal_run_number,
13
- vt.provider_source_type,
14
- vt.cis_trip_number,
15
- vt.vehicle_registration_number,
16
- stop_times.stop_id,
17
- vcs.cis_stop_platform_code,
18
- rs.platform_code,
19
- rs.stop_name
20
- from
21
- (
22
- select
23
- *
24
- from
25
- v_public_vehiclepositions_future_stop_times prediction
26
- union
27
- all
28
- select
29
- *
30
- from
31
- v_public_vehiclepositions_past_stop_times history
32
- ) as stop_times
33
- join vehiclepositions_trips vt on vt.id = stop_times.rt_trip_id
34
- join vehiclepositions_positions vp on vt.last_position_id = vp.id
35
- and (
36
- vp.valid_to is null
37
- or vp.valid_to >= now()
38
- )
39
- and vp.state_position != 'after_track'
40
- left join ropidgtfs_stops rs on rs.stop_id = stop_times.stop_id
41
- left join ropidgtfs_cis_stops rcs on rcs.id = rs.computed_cis_stop_id
42
- left join vehiclepositions_cis_stops vcs
43
- on vcs.rt_trip_id = stop_times.rt_trip_id
44
- and vcs.cis_stop_group_id = rcs.cis
45
- order by
46
- rt_trip_id,
47
- stop_sequence;
@@ -1,6 +0,0 @@
1
- /** Mapping of infotext severity level to numbers, where higher number = higher severity and priority */
2
- export declare const JISInfotextSeverityLevelPriority: {
3
- readonly INFO: 1;
4
- readonly WARNING: 2;
5
- readonly SEVERE: 3;
6
- };
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JISInfotextSeverityLevelPriority = void 0;
4
- const JISInfotextSeverityLevelEnum_1 = require("./JISInfotextSeverityLevelEnum");
5
- /** Mapping of infotext severity level to numbers, where higher number = higher severity and priority */
6
- exports.JISInfotextSeverityLevelPriority = {
7
- [JISInfotextSeverityLevelEnum_1.JISInfotextSeverityLevel.Info]: 1,
8
- [JISInfotextSeverityLevelEnum_1.JISInfotextSeverityLevel.Warning]: 2,
9
- [JISInfotextSeverityLevelEnum_1.JISInfotextSeverityLevel.Severe]: 3,
10
- };
11
- //# sourceMappingURL=JISInfotextSeverityLevelPriority.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JISInfotextSeverityLevelPriority.js","sourceRoot":"","sources":["../../../src/helpers/jis/JISInfotextSeverityLevelPriority.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AAE1E,wGAAwG;AAC3F,QAAA,gCAAgC,GAAG;IAC5C,CAAC,uDAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,CAAC,uDAAwB,CAAC,OAAO,CAAC,EAAE,CAAC;IACrC,CAAC,uDAAwB,CAAC,MAAM,CAAC,EAAE,CAAC;CAC9B,CAAC"}
@@ -1,9 +0,0 @@
1
- import { IJISInfotextDto } from "../../../schema-definitions/jis/redis/interfaces/IJISInfotextDto";
2
- import { RedisModel } from "@golemio/core/dist/integration-engine";
3
- export declare class JISInfotextsRedisRepository extends RedisModel {
4
- static NAMESPACE_PREFIX: string;
5
- constructor();
6
- refreshData(infotexts: IJISInfotextDto[]): Promise<void>;
7
- private createNewCache;
8
- private deleteOldCache;
9
- }
@@ -1,86 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var JISInfotextsRedisRepository_1;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.JISInfotextsRedisRepository = void 0;
14
- const const_1 = require("../../../schema-definitions/jis/redis/const");
15
- const JISInfotextDtoSchema_1 = require("../../../schema-definitions/jis/redis/schemas/JISInfotextDtoSchema");
16
- const integration_engine_1 = require("@golemio/core/dist/integration-engine");
17
- const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
18
- const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
19
- const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
20
- const node_crypto_1 = require("node:crypto");
21
- const TTL_SECONDS_BEFORE_DELETE = 60;
22
- let JISInfotextsRedisRepository = exports.JISInfotextsRedisRepository = JISInfotextsRedisRepository_1 = class JISInfotextsRedisRepository extends integration_engine_1.RedisModel {
23
- constructor() {
24
- super("JISInfotextsRedisRepository", {
25
- isKeyConstructedFromData: false,
26
- prefix: JISInfotextsRedisRepository_1.NAMESPACE_PREFIX,
27
- }, new golemio_validator_1.JSONSchemaValidator("JISInfotextsRedisRepositoryValidator", JISInfotextDtoSchema_1.JISInfotextDtoSchema));
28
- }
29
- async refreshData(infotexts) {
30
- try {
31
- const oldSetName = (await this.connection.get(`${this.prefix}:activeSetName`)) ?? "";
32
- await this.createNewCache(infotexts);
33
- await this.deleteOldCache(oldSetName);
34
- }
35
- catch (err) {
36
- throw new golemio_errors_1.GeneralError("refreshData failed", this.constructor.name, err);
37
- }
38
- }
39
- async createNewCache(infotexts) {
40
- try {
41
- await this.validator.Validate(infotexts);
42
- }
43
- catch (error) {
44
- throw new golemio_errors_1.GeneralError(`JISInfotextsRedisRepository: data validation failed: ${error.message}`, this.constructor.name, error);
45
- }
46
- try {
47
- const infotextIdsByStopId = new Map();
48
- const infotextsByInfotextId = new Map();
49
- for (const infotext of infotexts) {
50
- infotextsByInfotextId.set(infotext.id, JSON.stringify(infotext));
51
- for (const { stop_id } of infotext?.stops ?? []) {
52
- let stopInfotextsIds = infotextIdsByStopId.get(stop_id) ?? [];
53
- stopInfotextsIds.push(infotext.id);
54
- infotextIdsByStopId.set(stop_id, stopInfotextsIds);
55
- }
56
- }
57
- const setName = (0, node_crypto_1.randomBytes)(4).toString("hex");
58
- const pipeline = this.connection.pipeline();
59
- pipeline.hset(`${this.prefix}:${setName}:infotexts`, infotextsByInfotextId);
60
- pipeline.hset(`${this.prefix}:${setName}:stops-infotexts`, infotextIdsByStopId);
61
- pipeline.publish(`${this.prefix}`, `${this.prefix}:${setName}`);
62
- pipeline.set(`${this.prefix}:activeSetName`, `${this.prefix}:${setName}`);
63
- await pipeline.exec();
64
- }
65
- catch (err) {
66
- throw new golemio_errors_1.GeneralError("createNewCache failed", this.constructor.name, err);
67
- }
68
- }
69
- async deleteOldCache(setName) {
70
- try {
71
- const pipeline = this.connection.pipeline();
72
- pipeline.expire(`${setName}:infotexts`, TTL_SECONDS_BEFORE_DELETE);
73
- pipeline.expire(`${setName}:stops-infotexts`, TTL_SECONDS_BEFORE_DELETE);
74
- await pipeline.exec();
75
- }
76
- catch (err) {
77
- throw new golemio_errors_1.GeneralError("deleteOldCache failed", this.constructor.name, err);
78
- }
79
- }
80
- };
81
- JISInfotextsRedisRepository.NAMESPACE_PREFIX = const_1.JIS_NAMESPACE_PREFIX;
82
- exports.JISInfotextsRedisRepository = JISInfotextsRedisRepository = JISInfotextsRedisRepository_1 = __decorate([
83
- (0, tsyringe_1.injectable)(),
84
- __metadata("design:paramtypes", [])
85
- ], JISInfotextsRedisRepository);
86
- //# sourceMappingURL=JISInfotextsRedisRepository.js.map