@golemio/pid 2.23.2 → 2.23.3-dev.1527535265

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 (68) hide show
  1. package/db/example/03_ropidgtfs_dump.sql +7 -1
  2. package/db/example/09_departureboards_testdata_nogapfilter.sql +4 -1
  3. package/db/example/20_jis_infotexts.sql +6 -0
  4. package/db/migrations/postgresql/20241104000200-transfer-boards.js +53 -0
  5. package/db/migrations/postgresql/sqls/20241104000200-transfer-boards-down.sql +1 -0
  6. package/db/migrations/postgresql/sqls/20241104000200-transfer-boards-up.sql +96 -0
  7. package/dist/helpers/StopEnums.d.ts +12 -0
  8. package/dist/helpers/StopEnums.js +17 -0
  9. package/dist/helpers/StopEnums.js.map +1 -0
  10. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  11. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.d.ts +13 -0
  12. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +116 -0
  13. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -0
  14. package/dist/output-gateway/pid/data-access/DeparturesRepository.d.ts +14 -14
  15. package/dist/output-gateway/pid/data-access/DeparturesRepository.js +86 -34
  16. package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
  17. package/dist/output-gateway/pid/data-access/interfaces/DepartureInterfaces.d.ts +16 -0
  18. package/dist/output-gateway/pid/data-access/interfaces/DepartureInterfaces.js +3 -0
  19. package/dist/output-gateway/pid/data-access/interfaces/DepartureInterfaces.js.map +1 -0
  20. package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +5 -0
  21. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.d.ts +0 -7
  22. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +5 -16
  23. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
  24. package/dist/output-gateway/pid/index.d.ts +31 -0
  25. package/dist/output-gateway/pid/index.js.map +1 -1
  26. package/dist/output-gateway/pid/ioc/Di.js +19 -0
  27. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  28. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +8 -0
  29. package/dist/output-gateway/pid/ioc/OgPidToken.js +10 -0
  30. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  31. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +4 -2
  32. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  33. package/dist/output-gateway/pid/models/helpers/FilterHelper.d.ts +4 -4
  34. package/dist/output-gateway/pid/models/helpers/FilterHelper.js.map +1 -1
  35. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.d.ts +4 -3
  36. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +31 -8
  37. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
  38. package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +1 -0
  39. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.d.ts +1 -0
  40. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +10 -0
  41. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -1
  42. package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +13 -0
  43. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +62 -0
  44. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -0
  45. package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +9 -0
  46. package/dist/output-gateway/pid/service/facade/StopFacade.js +76 -0
  47. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -0
  48. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +20 -0
  49. package/dist/output-gateway/pid/service/facade/TransferFacade.js +104 -0
  50. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -0
  51. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +10 -0
  52. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +20 -0
  53. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -0
  54. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.d.ts +11 -0
  55. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +30 -0
  56. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -0
  57. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.d.ts +22 -0
  58. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +52 -0
  59. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -0
  60. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.d.ts +11 -0
  61. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +65 -0
  62. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -0
  63. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.d.ts +4 -0
  64. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +25 -2
  65. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
  66. package/docs/implementation_documentation.md +4 -0
  67. package/docs/openapi-output.yaml +152 -1
  68. package/package.json +3 -3
@@ -32,7 +32,7 @@ tags:
32
32
  description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />
33
33
 
34
34
  - name: 🚏 PID Departure Boards (v3)
35
- description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />
35
+ 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" />
36
36
 
37
37
  - name: 🗓️ Public GTFS Static Lookup (v2)
38
38
  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" />
@@ -1100,6 +1100,157 @@ paths:
1100
1100
  "404":
1101
1101
  description: Not found
1102
1102
 
1103
+ /v3/pid/transferboards:
1104
+ get:
1105
+ tags:
1106
+ - 🚏 PID Departure Boards (v3)
1107
+ summary: GET Transfer Boards
1108
+ description: |
1109
+ ⚠️ Note: This endpoint is experimental and may be subject to change.
1110
+ Tested and optimized for train transfers only (as in transfering from a train to other all kinds of transport).
1111
+ parameters:
1112
+ - name: cisId
1113
+ in: query
1114
+ description: CIS identifier of the stop. 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).
1115
+ required: true
1116
+ schema:
1117
+ type: number
1118
+ example: 5454956 # Praha-Uhříněves
1119
+ - name: tripNumber
1120
+ in: query
1121
+ description: Trip number of the vehicle in which the transfer is planned. Use to filter out transfers for a specific trip. Represents the numeric part of the GTFS `trip_short_name` (Os 2547 -> 2547).
1122
+ required: true
1123
+ schema:
1124
+ type: number
1125
+ example: 2547
1126
+ - name: timeFrom
1127
+ in: query
1128
+ description: 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.
1129
+ required: false
1130
+ schema:
1131
+ type: string
1132
+ example: "2024-11-04T16:51:00"
1133
+ responses:
1134
+ "200":
1135
+ description: List of all active transfer boards
1136
+ headers:
1137
+ Cache-Control:
1138
+ description: Cache control directive for caching proxies
1139
+ schema:
1140
+ type: string
1141
+ example: public, s-maxage=5, stale-while-revalidate=5
1142
+ content:
1143
+ application/json:
1144
+ schema:
1145
+ type: object
1146
+ required:
1147
+ - departures
1148
+ - infotexts
1149
+ properties:
1150
+ departures:
1151
+ type: array
1152
+ items:
1153
+ type: object
1154
+ required:
1155
+ - departure_timestamp
1156
+ - route
1157
+ - stop
1158
+ - trip
1159
+ properties:
1160
+ departure_timestamp:
1161
+ type: object
1162
+ required:
1163
+ - minutes
1164
+ properties:
1165
+ minutes:
1166
+ type: string
1167
+ example: "<1"
1168
+ nullable: true
1169
+ route:
1170
+ type: object
1171
+ required:
1172
+ - short_name
1173
+ - type
1174
+ properties:
1175
+ short_name:
1176
+ type: string
1177
+ example: "S9"
1178
+ nullable: true
1179
+ type:
1180
+ type: number
1181
+ example: 2
1182
+ nullable: true
1183
+ stop:
1184
+ type: object
1185
+ required:
1186
+ - platform_code
1187
+ properties:
1188
+ platform_code:
1189
+ type: string
1190
+ example: "2/3"
1191
+ nullable: true
1192
+ trip:
1193
+ type: object
1194
+ required:
1195
+ - headsign
1196
+ - id
1197
+ properties:
1198
+ headsign:
1199
+ type: string
1200
+ example: "Benešov u Prahy"
1201
+ nullable: false
1202
+ id:
1203
+ type: string
1204
+ example: "1309_2547_231210"
1205
+ nullable: false
1206
+ infotexts:
1207
+ type: array
1208
+ items:
1209
+ type: object
1210
+ required:
1211
+ - text
1212
+ - text_en
1213
+ - display_type
1214
+ properties:
1215
+ text:
1216
+ type: string
1217
+ example: "Nehoda na trase, odklon linek mimo tuto stanici."
1218
+ nullable: false
1219
+ text_en:
1220
+ type: string
1221
+ example: "Trips are cancelled due to accident on route."
1222
+ nullable: true
1223
+ display_type:
1224
+ type: string
1225
+ example: "inline"
1226
+ enum:
1227
+ - "inline"
1228
+ - "general"
1229
+ nullable: false
1230
+
1231
+ "401":
1232
+ $ref: "#/components/responses/UnauthorizedError"
1233
+ "404":
1234
+ description: Not found - no valid GTFS stop found for the given CIS ID
1235
+ content:
1236
+ application/json:
1237
+ schema:
1238
+ type: object
1239
+ required:
1240
+ - departures
1241
+ - infotexts
1242
+ properties:
1243
+ departures:
1244
+ type: array
1245
+ example: []
1246
+ items:
1247
+ type: object
1248
+ infotexts:
1249
+ type: array
1250
+ example: []
1251
+ items:
1252
+ type: object
1253
+
1103
1254
  /v3/pid/infotexts:
1104
1255
  get:
1105
1256
  summary: GET Infotexts (export from the VYMI (JIS) Infotexts system)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/pid",
3
- "version": "2.23.2",
3
+ "version": "2.23.3-dev.1527535265",
4
4
  "description": "Golemio PID Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -76,7 +76,7 @@
76
76
  "@golemio/core": ">=1.14.1-rc.1470811358"
77
77
  },
78
78
  "dependencies": {
79
- "@golemio/ovapi-gtfs-realtime-bindings": "1.2.3",
79
+ "@golemio/ovapi-gtfs-realtime-bindings": "1.2.4-dev.1288219308",
80
80
  "@turf/turf": "^6.5.0",
81
81
  "cheap-ruler": "^3.0.2",
82
82
  "csv-parser": "^3.0.0",
@@ -84,4 +84,4 @@
84
84
  "html-entities": "^2.3.3",
85
85
  "pg-copy-streams": "^5.1.1"
86
86
  }
87
- }
87
+ }