@golemio/pid 5.9.2 → 5.9.3-dev.2497470687

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 (60) hide show
  1. package/db/migrations/postgresql/20260428091015-jis-infotexts-presets.js +49 -0
  2. package/db/migrations/postgresql/sqls/20260428091015-jis-infotexts-presets-down.sql +2 -0
  3. package/db/migrations/postgresql/sqls/20260428091015-jis-infotexts-presets-up.sql +8 -0
  4. package/dist/integration-engine/jis/ioc/Di.js +2 -0
  5. package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
  6. package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +1 -0
  7. package/dist/integration-engine/jis/ioc/JISContainerToken.js +1 -0
  8. package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
  9. package/dist/integration-engine/jis/repositories/JISInfotextsPresetsRepository.d.ts +32 -0
  10. package/dist/integration-engine/jis/repositories/JISInfotextsPresetsRepository.js +89 -0
  11. package/dist/integration-engine/jis/repositories/JISInfotextsPresetsRepository.js.map +1 -0
  12. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +3 -1
  13. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +15 -2
  14. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  15. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.d.ts +6 -15
  16. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +12 -20
  17. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
  18. package/dist/integration-engine/jis/services/JISInfotextsDataService.d.ts +7 -8
  19. package/dist/integration-engine/jis/services/JISInfotextsDataService.js +17 -12
  20. package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
  21. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.d.ts +2 -1
  22. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +5 -0
  23. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
  24. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +8 -4
  25. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  26. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.d.ts +4 -0
  27. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +69 -37
  28. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
  29. package/dist/output-gateway/pid/helpers/MpvnetTransportTypeMapper.d.ts +8 -0
  30. package/dist/output-gateway/pid/helpers/MpvnetTransportTypeMapper.js +45 -0
  31. package/dist/output-gateway/pid/helpers/MpvnetTransportTypeMapper.js.map +1 -0
  32. package/dist/output-gateway/pid/helpers/MpvnetXmlSerializer.d.ts +16 -0
  33. package/dist/output-gateway/pid/helpers/MpvnetXmlSerializer.js +137 -0
  34. package/dist/output-gateway/pid/helpers/MpvnetXmlSerializer.js.map +1 -0
  35. package/dist/output-gateway/pid/routers/v2/V2PIDRouter.js +3 -0
  36. package/dist/output-gateway/pid/routers/v2/V2PIDRouter.js.map +1 -1
  37. package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js +12 -0
  38. package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js.map +1 -1
  39. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.d.ts +2 -0
  40. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.d.ts +3 -0
  41. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.js +3 -0
  42. package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.js.map +1 -0
  43. package/dist/schema-definitions/jis/datasources/interfaces/index.d.ts +1 -0
  44. package/dist/schema-definitions/jis/datasources/interfaces/index.js +1 -0
  45. package/dist/schema-definitions/jis/datasources/interfaces/index.js.map +1 -1
  46. package/dist/schema-definitions/jis/models/JISInfotextsModel.d.ts +2 -0
  47. package/dist/schema-definitions/jis/models/JISInfotextsModel.js.map +1 -1
  48. package/dist/schema-definitions/jis/models/JISInfotextsPresetsModel.d.ts +12 -0
  49. package/dist/schema-definitions/jis/models/JISInfotextsPresetsModel.js +41 -0
  50. package/dist/schema-definitions/jis/models/JISInfotextsPresetsModel.js.map +1 -0
  51. package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.d.ts +4 -0
  52. package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.js +3 -0
  53. package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.js.map +1 -0
  54. package/dist/schema-definitions/jis/models/interfaces/index.d.ts +1 -0
  55. package/dist/schema-definitions/jis/models/interfaces/index.js +1 -0
  56. package/dist/schema-definitions/jis/models/interfaces/index.js.map +1 -1
  57. package/docs/asyncapi.yaml +16 -5
  58. package/docs/openapi-input.yaml +14 -3
  59. package/docs/openapi-output.yaml +256 -137
  60. package/package.json +8 -15
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JISInfotextsPresetsModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class JISInfotextsPresetsModel extends sequelize_1.Model {
6
+ }
7
+ exports.JISInfotextsPresetsModel = JISInfotextsPresetsModel;
8
+ JISInfotextsPresetsModel.tableName = "jis_infotexts_presets";
9
+ JISInfotextsPresetsModel.attributeModel = {
10
+ infotext_id: {
11
+ primaryKey: true,
12
+ type: sequelize_1.DataTypes.UUID,
13
+ allowNull: false,
14
+ },
15
+ route_name: {
16
+ primaryKey: true,
17
+ type: sequelize_1.DataTypes.STRING(100),
18
+ allowNull: false,
19
+ },
20
+ created_at: {
21
+ type: sequelize_1.DataTypes.DATE,
22
+ allowNull: false,
23
+ },
24
+ updated_at: {
25
+ type: sequelize_1.DataTypes.DATE,
26
+ allowNull: false,
27
+ },
28
+ };
29
+ JISInfotextsPresetsModel.jsonSchema = {
30
+ type: "array",
31
+ items: {
32
+ type: "object",
33
+ properties: {
34
+ infotext_id: { type: "string" },
35
+ route_name: { type: "string" },
36
+ },
37
+ additionalProperties: false,
38
+ required: ["infotext_id", "route_name"],
39
+ },
40
+ };
41
+ //# sourceMappingURL=JISInfotextsPresetsModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JISInfotextsPresetsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/models/JISInfotextsPresetsModel.ts"],"names":[],"mappings":";;;AACA,mEAO6C;AAG7C,MAAa,wBACT,SAAQ,iBAAmG;;AAD/G,4DA4CC;AAxCiB,kCAAS,GAAG,uBAAuB,CAAC;AAOpC,uCAAc,GAA8C;IACtE,WAAW,EAAE;QACT,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;CACJ,CAAC;AAEY,mCAAU,GAA2C;IAC/D,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC/B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACjC;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC;KAC1C;CACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface IJISInfotextsPresets {
2
+ infotext_id: string;
3
+ route_name: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IJISInfotextsPresets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IJISInfotextsPresets.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.ts"],"names":[],"mappings":""}
@@ -1,5 +1,6 @@
1
1
  export * from "./IJISEvent";
2
2
  export * from "./IJISEventsRopidGTFSRoutes";
3
3
  export * from "./IJISInfotext";
4
+ export * from "./IJISInfotextsPresets";
4
5
  export * from "./IJISInfotextsRopidGTFSStops";
5
6
  export * from "./IJISTranslationText";
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./IJISEvent"), exports);
18
18
  __exportStar(require("./IJISEventsRopidGTFSRoutes"), exports);
19
19
  __exportStar(require("./IJISInfotext"), exports);
20
+ __exportStar(require("./IJISInfotextsPresets"), exports);
20
21
  __exportStar(require("./IJISInfotextsRopidGTFSStops"), exports);
21
22
  __exportStar(require("./IJISTranslationText"), exports);
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8DAA4C;AAC5C,iDAA+B;AAC/B,gEAA8C;AAC9C,wDAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8DAA4C;AAC5C,iDAA+B;AAC/B,yDAAuC;AACvC,gEAA8C;AAC9C,wDAAsC"}
@@ -1959,19 +1959,31 @@ components:
1959
1959
  description: Localized descriptions of the infotext
1960
1960
  informed_entity:
1961
1961
  type: object
1962
+ nullable: true
1962
1963
  properties:
1963
1964
  stops:
1964
1965
  type: array
1966
+ nullable: true
1965
1967
  items:
1966
1968
  type: object
1967
1969
  properties:
1968
- stop_id:
1970
+ id:
1969
1971
  type: string
1970
1972
  description: Unique identifier for the stop
1971
1973
  required:
1972
- - stop_id
1973
- required:
1974
- - stops
1974
+ - id
1975
+ presets:
1976
+ type: array
1977
+ nullable: true
1978
+ description: Departure presets connected to this infotext (optional, migration period)
1979
+ items:
1980
+ type: object
1981
+ properties:
1982
+ route_name:
1983
+ type: string
1984
+ description: Route name of the departure preset (ropid_departures_presets.route_name)
1985
+ required:
1986
+ - route_name
1975
1987
  created_timestamp:
1976
1988
  type: string
1977
1989
  format: date-time
@@ -1986,6 +1998,5 @@ components:
1986
1998
  - display_type
1987
1999
  - active_period
1988
2000
  - description_text
1989
- - informed_entity
1990
2001
  - created_timestamp
1991
2002
  - last_modified_timestamp
@@ -786,9 +786,11 @@ components:
786
786
  description: Localized descriptions of the infotext
787
787
  informed_entity:
788
788
  type: object
789
+ nullable: true
789
790
  properties:
790
791
  stops:
791
792
  type: array
793
+ nullable: true
792
794
  items:
793
795
  type: object
794
796
  properties:
@@ -797,8 +799,18 @@ components:
797
799
  description: Unique identifier for the stop
798
800
  required:
799
801
  - id
800
- required:
801
- - stops
802
+ presets:
803
+ type: array
804
+ nullable: true
805
+ description: Departure presets connected to this infotext (optional, migration period)
806
+ items:
807
+ type: object
808
+ properties:
809
+ route_name:
810
+ type: string
811
+ description: Route name of the departure preset (ropid_departures_presets.route_name)
812
+ required:
813
+ - route_name
802
814
  created_timestamp:
803
815
  type: string
804
816
  format: date-time
@@ -813,7 +825,6 @@ components:
813
825
  - display_type
814
826
  - active_period
815
827
  - description_text
816
- - informed_entity
817
828
  - created_timestamp
818
829
  - last_modified_timestamp
819
830
  examples:
@@ -887,77 +887,16 @@ paths:
887
887
  tags:
888
888
  - 🚏 PID Departure Boards (v2)
889
889
  parameters:
890
- - name: ids
891
- in: query
892
- description: Get result by GTFS stop_id. Can be used to retrive individual stops and to separate departures of Prague and intercity routes, even if they depart from the same physical stop. A list of GTFS stops can be found in `stops.txt` file of the [GTFS feed](https://opendata.praha.eu/datasets/https%3A%2F%2Fapi.opendata.praha.eu%2Flod%2Fcatalog%2F9a6a1d8e-45b9-41de-b9ae-0bcec7126876).
893
- required: false
894
- schema:
895
- type: string
896
- example: "U458Z101P"
897
- - name: aswIds
898
- in: query
899
- description: "Get result by ASW ID. First part of the number represents the whole node. Usually it groups the stops of the same name or all stops associated with a metro station. Also returns related train stations in the node. The second part of the number is optional and represents individual stops in the node. Use `_` instead of `/` as a separator or encode the slash sign with `%2F`. A list of ASW 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). ⚠️ Note: combination with `includeMetroTrains` is currently not supported, see [issue pid#222](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/issues/222)."
900
- required: false
901
- schema:
902
- type: string
903
- example: "458_101"
904
- - name: cisIds
905
- in: query
906
- description: Get result by CIS ID. 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).
907
- required: false
908
- schema:
909
- type: number
910
- example: 28004
911
- - name: names
912
- in: query
913
- description: Get results by exact name of stop (case and whitespace sensitive). May return stops of the same name from different towns. Using `names` in combination with other identifiers will return an intersection of stops with `names` and stops of ASW, CIS or GTFS identifiers in the same node. Use this feature to filter out a subset of stops of the same name while guaranteeing them to be from the desired node only.
914
- required: false
915
- schema:
916
- type: string
917
- example: "Smíchovské nádraží"
918
- - name: minutesBefore
919
- in: query
920
- description: Set the start of interval from which to retrieve departures. Positive numbers are set in past relative to the time of request or `timeFrom` timestamp, negative numbers set the start in the future. Use to compensate for walking distance to a stop. Default is set to 0. Maximum value is 30 because of implemented data retention. Minimum value is -4320 (0 - 3 days GTFS calendar maximum).
921
- required: false
922
- schema:
923
- type: number
924
- example: 10
925
- - name: minutesAfter
926
- in: query
927
- description: Set the end of interval from which to retrieve departures. Positive numbers are set in future relative to the time of request or `timeFrom` timestamp, negative are in the past. The sum of minutesBefore and minutesAfter must be larger than zero. Default is set to 180. Maximum value is 4320 (GTFS calendar maximum). Minimum value is -4350 (0 - 3 days GTFS calendar maximum - 30 minutes data retention).
928
- required: false
929
- schema:
930
- type: number
931
- example: 60
932
- - name: timeFrom
933
- in: query
934
- description: Set initial timestamp for time interval given by `minutesBefore` and `minutesAfter`. 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 according to the `preferredTimezone` parameter. Applicable range is -6 hours +2 days from now.
935
- required: false
936
- schema:
937
- type: string
938
- example: "2021-01-21T06:00:00"
939
- - name: includeMetroTrains
940
- in: query
941
- description: "When selecting a node by `name`, when `true`, will include metro and/or train stops that are a member of the same node. I.e. when querying _Na Knížecí_, setting this to `true` will add the metro station _Anděl_ to results as well because both have the same ASW node number 1040. ⚠️ Note: combination with `aswIds` is currently not supported, see [issue pid#222](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/issues/222)."
942
- required: false
943
- schema:
944
- type: boolean
945
- example: true
946
- - name: airCondition
947
- in: query
948
- description: Enrich departures with vehicle air condition information. Setting to `false` will force all items to be `null`. Useful for disabling the indication of air condition during cold season.
949
- required: false
950
- schema:
951
- type: boolean
952
- example: true
953
- default: true
954
- - name: preferredTimezone
955
- in: query
956
- description: Preferred timezone offset as defined in the IANA Time zone database in the form of Country/City (use an URL encoded slash sign `%2F` or use an underscore _ symbol), default is Europe/Prague
957
- required: false
958
- schema:
959
- type: string
960
- example: "Europe_Prague"
890
+ - $ref: "#/components/parameters/DepartureBoardsIds"
891
+ - $ref: "#/components/parameters/DepartureBoardsAswIds"
892
+ - $ref: "#/components/parameters/DepartureBoardsCisIds"
893
+ - $ref: "#/components/parameters/DepartureBoardsNames"
894
+ - $ref: "#/components/parameters/DepartureBoardsMinutesBefore"
895
+ - $ref: "#/components/parameters/DepartureBoardsMinutesAfter"
896
+ - $ref: "#/components/parameters/DepartureBoardsTimeFrom"
897
+ - $ref: "#/components/parameters/DepartureBoardsIncludeMetroTrains"
898
+ - $ref: "#/components/parameters/DepartureBoardsAirCondition"
899
+ - $ref: "#/components/parameters/DepartureBoardsPreferredTimezone"
961
900
  - name: mode
962
901
  in: query
963
902
  description: >-
@@ -966,72 +905,13 @@ paths:
966
905
  schema:
967
906
  type: string
968
907
  example: "departures"
969
- - name: order
970
- in: query
971
- description: >-
972
- Valid entries: `real` (default), `timetable`. Order results by predicted time including trip delay or by timetable time.
973
- required: false
974
- schema:
975
- type: string
976
- example: "real"
977
- - name: filter
978
- in: query
979
- description: >-
980
- Valid entries: `none` (default), `routeOnce`, `routeOnceFill`, `routeHeadingOnce`, `routeHeadingOnceFill`, `routeHeadingOnceNoGap`, `routeHeadingOnceNoGapFill`. Defines how should be the list of departures returned. `none` returns all departures within the time and item limit. `routeOnce` returns exactly one occurence of departure for each `route_id`. Works best when querying a single stop. `routeHeadingOnce` returns one entry for each pair of `route_id` and `trip_headsign`, i.e. returns departures for routes that have multiple end stops. Works well when quering one or more stops in a node. `...NoGap` will ensure that departures with a distinct trip headsign will not be displayed if they should arrive too far in the future. `...Fill` attributes will behave the same as their namesakes but afterwards will fill the rest of request up to `total/limit` with further departures. Use to have every line/destination represented and have the display filled with departures at the same time.
981
- required: false
982
- schema:
983
- type: string
984
- example: "routeOnce"
985
- - name: skip
986
- in: query
987
- description: |
988
- Filters out trips matching the given states.
989
- Multiple filters can be applied using array syntax, e.g., `&skip[]=canceled&skip[]=atStop`.
990
- Using both `untracked` and `missing` will exclude all untracked vehicles, as missing vehicles are a subset of untracked vehicles.
991
- We recommend using `missing` instead of `untracked`, as skipping all untracked vehicles may result in departures not appearing in the API response until the last few minutes before departure, especially for departure boards near the starting station/stop.
992
- required: false
993
- schema:
994
- type: string
995
- example: "canceled"
996
- enum:
997
- - canceled
998
- - atStop
999
- - untracked
1000
- - missing
1001
- - name: limit
1002
- in: query
1003
- description: Limits the number of items in response. The maximum is 1000 (default value is 20).
1004
- required: false
1005
- schema:
1006
- type: number
1007
- format: int64
1008
- example: 0
1009
- - name: total
1010
- in: query
1011
- description: Sets the number of items that will be queried. Use in conjunction with `offset`. Up to `total - offset`, but not more than `limit` items will be then returned. If unset, is same as `limit`. The maximum is 1000 (default value is 20).
1012
- required: false
1013
- schema:
1014
- type: number
1015
- format: int64
1016
- example: 0
1017
- - name: offset
1018
- in: query
1019
- description: Number of the initial departures that are skipped. Useful for multi-page displays.
1020
- required: false
1021
- schema:
1022
- type: number
1023
- format: int64
1024
- example: 0
1025
- - name: appendHeadsignsLimit
1026
- in: query
1027
- description: >-
1028
- Number of stops before route switch at which headsign is enriched with continuation info.
1029
- When set and a departure has route-switch data, headsign becomes `<headsign> → <next_route> <next_headsign>`.
1030
- required: false
1031
- schema:
1032
- type: integer
1033
- minimum: 0
1034
- example: 3
908
+ - $ref: "#/components/parameters/DepartureBoardsOrder"
909
+ - $ref: "#/components/parameters/DepartureBoardsFilter"
910
+ - $ref: "#/components/parameters/DepartureBoardsSkip"
911
+ - $ref: "#/components/parameters/DepartureBoardsLimit"
912
+ - $ref: "#/components/parameters/DepartureBoardsTotal"
913
+ - $ref: "#/components/parameters/DepartureBoardsOffset"
914
+ - $ref: "#/components/parameters/DepartureBoardsAppendHeadsignsLimit"
1035
915
 
1036
916
  responses:
1037
917
  "200":
@@ -1056,6 +936,89 @@ paths:
1056
936
  "404":
1057
937
  description: Not found
1058
938
 
939
+ /v2/pid/departureboards/xml:
940
+ get:
941
+ summary: "[DEPRECATED] GET Departure Boards (legacy MPVnet XML)"
942
+ description: |
943
+ **DEPRECATED.** Legacy MPVnet XML for ROPID information panels that cannot consume JSON.
944
+ For new integrations use `/v2/pid/departureboards` (JSON).
945
+
946
+ UTF-8, no `<?xml ...?>` prologue. Only `mode=departures` is supported (others return 400).
947
+ Same query parameters and identifier rules as the JSON endpoint
948
+ (`ids` / `cisIds` / `aswIds` / `names`, at least one required, max 100 stops).
949
+
950
+ See the example response below for the exact attribute set.
951
+ deprecated: true
952
+ tags:
953
+ - 🚏 PID Departure Boards (v2)
954
+ parameters:
955
+ - $ref: "#/components/parameters/DepartureBoardsIds"
956
+ - $ref: "#/components/parameters/DepartureBoardsAswIds"
957
+ - $ref: "#/components/parameters/DepartureBoardsCisIds"
958
+ - $ref: "#/components/parameters/DepartureBoardsNames"
959
+ - $ref: "#/components/parameters/DepartureBoardsMinutesBefore"
960
+ - $ref: "#/components/parameters/DepartureBoardsMinutesAfter"
961
+ - $ref: "#/components/parameters/DepartureBoardsTimeFrom"
962
+ - $ref: "#/components/parameters/DepartureBoardsIncludeMetroTrains"
963
+ - $ref: "#/components/parameters/DepartureBoardsAirCondition"
964
+ - $ref: "#/components/parameters/DepartureBoardsPreferredTimezone"
965
+ - name: mode
966
+ in: query
967
+ description: >-
968
+ Only `departures` is supported for this XML endpoint; other values return 400.
969
+ Valid entries: `departures` (default), `arrivals`, `mixed`.
970
+ required: false
971
+ schema:
972
+ type: string
973
+ example: "departures"
974
+ - $ref: "#/components/parameters/DepartureBoardsOrder"
975
+ - $ref: "#/components/parameters/DepartureBoardsFilter"
976
+ - $ref: "#/components/parameters/DepartureBoardsSkip"
977
+ - $ref: "#/components/parameters/DepartureBoardsLimit"
978
+ - $ref: "#/components/parameters/DepartureBoardsTotal"
979
+ - $ref: "#/components/parameters/DepartureBoardsOffset"
980
+ - $ref: "#/components/parameters/DepartureBoardsAppendHeadsignsLimit"
981
+
982
+ responses:
983
+ "200":
984
+ description: |
985
+ Single-line MPVnet XML response. Example body
986
+
987
+ ```xml
988
+ <TBL cas="2026-03-20T15:30:00" text="Odjezdy poskytuje Golemio">
989
+ <t id="458/1,458/2" zast="Smíchovské nádraží" zobraz_stan="True" stan="A,B">
990
+ <o stan="A" lin="129" alias="129" spoj="" smer="Baně"
991
+ odj="2026-03-20T15:31:00+01:00" sled="true" zpoz="0" np="true" nad="false" dd="3"/>
992
+ <o stan="A" lin="5" alias="5" spoj="" smer="Slivenec"
993
+ odj="2026-03-20T15:31:00+01:00" sled="true" zpoz="2" np="false" nad="false"
994
+ pz="Plzeňka" dd="2"/>
995
+ <o stan="B" lin="B" alias="B" spoj="" smer="Černý Most"
996
+ odj="2026-03-20T15:32:00+01:00" sled="true" zpoz="1" np="true" nad="false"
997
+ pz="Radlická" dd="1"/>
998
+ <o stan="A" lin="X22" alias="X22" spoj="" smer="Nádraží Hostivař"
999
+ odj="2026-03-20T15:33:00+01:00" sled="false" zpoz="0" np="false" nad="true"
1000
+ info="nejede" dd="7"/>
1001
+ <i stan="A">Výluka tramvají na Smíchově.</i>
1002
+ </t>
1003
+ </TBL>
1004
+ ```
1005
+ headers:
1006
+ Cache-Control:
1007
+ description: Cache control directive for caching proxies
1008
+ schema:
1009
+ type: string
1010
+ example: public, s-maxage=5, stale-while-revalidate=5
1011
+ content:
1012
+ text/xml; charset=utf-8:
1013
+ schema:
1014
+ type: string
1015
+ "400":
1016
+ $ref: "#/components/responses/BadRequestError"
1017
+ "401":
1018
+ $ref: "#/components/responses/UnauthorizedError"
1019
+ "404":
1020
+ description: Not found
1021
+
1059
1022
  /v3/pid/transferboards:
1060
1023
  get:
1061
1024
  tags:
@@ -2071,6 +2034,162 @@ components:
2071
2034
  - error_status
2072
2035
 
2073
2036
 
2037
+ parameters:
2038
+ DepartureBoardsIds:
2039
+ name: ids
2040
+ in: query
2041
+ description: Get result by GTFS stop_id. Can be used to retrive individual stops and to separate departures of Prague and intercity routes, even if they depart from the same physical stop. A list of GTFS stops can be found in `stops.txt` file of the [GTFS feed](https://opendata.praha.eu/datasets/https%3A%2F%2Fapi.opendata.praha.eu%2Flod%2Fcatalog%2F9a6a1d8e-45b9-41de-b9ae-0bcec7126876).
2042
+ required: false
2043
+ schema:
2044
+ type: string
2045
+ example: "U458Z101P"
2046
+ DepartureBoardsAswIds:
2047
+ name: aswIds
2048
+ in: query
2049
+ description: "Get result by ASW ID. First part of the number represents the whole node. Usually it groups the stops of the same name or all stops associated with a metro station. Also returns related train stations in the node. The second part of the number is optional and represents individual stops in the node. Use `_` instead of `/` as a separator or encode the slash sign with `%2F`. A list of ASW 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). ⚠️ Note: combination with `includeMetroTrains` is currently not supported, see [issue pid#222](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/issues/222)."
2050
+ required: false
2051
+ schema:
2052
+ type: string
2053
+ example: "458_101"
2054
+ DepartureBoardsCisIds:
2055
+ name: cisIds
2056
+ in: query
2057
+ description: Get result by CIS ID. 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).
2058
+ required: false
2059
+ schema:
2060
+ type: number
2061
+ example: 28004
2062
+ DepartureBoardsNames:
2063
+ name: names
2064
+ in: query
2065
+ description: Get results by exact name of stop (case and whitespace sensitive). May return stops of the same name from different towns. Using `names` in combination with other identifiers will return an intersection of stops with `names` and stops of ASW, CIS or GTFS identifiers in the same node. Use this feature to filter out a subset of stops of the same name while guaranteeing them to be from the desired node only.
2066
+ required: false
2067
+ schema:
2068
+ type: string
2069
+ example: "Smíchovské nádraží"
2070
+ DepartureBoardsMinutesBefore:
2071
+ name: minutesBefore
2072
+ in: query
2073
+ description: Set the start of interval from which to retrieve departures. Positive numbers are set in past relative to the time of request or `timeFrom` timestamp, negative numbers set the start in the future. Use to compensate for walking distance to a stop. Default is set to 0. Maximum value is 30 because of implemented data retention. Minimum value is -4320 (0 - 3 days GTFS calendar maximum).
2074
+ required: false
2075
+ schema:
2076
+ type: number
2077
+ example: 10
2078
+ DepartureBoardsMinutesAfter:
2079
+ name: minutesAfter
2080
+ in: query
2081
+ description: Set the end of interval from which to retrieve departures. Positive numbers are set in future relative to the time of request or `timeFrom` timestamp, negative are in the past. The sum of minutesBefore and minutesAfter must be larger than zero. Default is set to 180. Maximum value is 4320 (GTFS calendar maximum). Minimum value is -4350 (0 - 3 days GTFS calendar maximum - 30 minutes data retention).
2082
+ required: false
2083
+ schema:
2084
+ type: number
2085
+ example: 60
2086
+ DepartureBoardsTimeFrom:
2087
+ name: timeFrom
2088
+ in: query
2089
+ description: Set initial timestamp for time interval given by `minutesBefore` and `minutesAfter`. 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 according to the `preferredTimezone` parameter. Applicable range is -6 hours +2 days from now.
2090
+ required: false
2091
+ schema:
2092
+ type: string
2093
+ example: "2021-01-21T06:00:00"
2094
+ DepartureBoardsIncludeMetroTrains:
2095
+ name: includeMetroTrains
2096
+ in: query
2097
+ description: "When selecting a node by `name`, when `true`, will include metro and/or train stops that are a member of the same node. I.e. when querying _Na Knížecí_, setting this to `true` will add the metro station _Anděl_ to results as well because both have the same ASW node number 1040. ⚠️ Note: combination with `aswIds` is currently not supported, see [issue pid#222](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/issues/222)."
2098
+ required: false
2099
+ schema:
2100
+ type: boolean
2101
+ example: true
2102
+ DepartureBoardsAirCondition:
2103
+ name: airCondition
2104
+ in: query
2105
+ description: Enrich departures with vehicle air condition information. Setting to `false` will force all items to be `null`. Useful for disabling the indication of air condition during cold season.
2106
+ required: false
2107
+ schema:
2108
+ type: boolean
2109
+ example: true
2110
+ default: true
2111
+ DepartureBoardsPreferredTimezone:
2112
+ name: preferredTimezone
2113
+ in: query
2114
+ description: Preferred timezone offset as defined in the IANA Time zone database in the form of Country/City (use an URL encoded slash sign `%2F` or use an underscore _ symbol), default is Europe/Prague
2115
+ required: false
2116
+ schema:
2117
+ type: string
2118
+ example: "Europe_Prague"
2119
+ DepartureBoardsOrder:
2120
+ name: order
2121
+ in: query
2122
+ description: >-
2123
+ Valid entries: `real` (default), `timetable`. Order results by predicted time including trip delay or by timetable time.
2124
+ required: false
2125
+ schema:
2126
+ type: string
2127
+ example: "real"
2128
+ DepartureBoardsFilter:
2129
+ name: filter
2130
+ in: query
2131
+ description: >-
2132
+ Valid entries: `none` (default), `routeOnce`, `routeOnceFill`, `routeHeadingOnce`, `routeHeadingOnceFill`, `routeHeadingOnceNoGap`, `routeHeadingOnceNoGapFill`. Defines how should be the list of departures returned. `none` returns all departures within the time and item limit. `routeOnce` returns exactly one occurence of departure for each `route_id`. Works best when querying a single stop. `routeHeadingOnce` returns one entry for each pair of `route_id` and `trip_headsign`, i.e. returns departures for routes that have multiple end stops. Works well when quering one or more stops in a node. `...NoGap` will ensure that departures with a distinct trip headsign will not be displayed if they should arrive too far in the future. `...Fill` attributes will behave the same as their namesakes but afterwards will fill the rest of request up to `total/limit` with further departures. Use to have every line/destination represented and have the display filled with departures at the same time.
2133
+ required: false
2134
+ schema:
2135
+ type: string
2136
+ example: "routeOnce"
2137
+ DepartureBoardsSkip:
2138
+ name: skip
2139
+ in: query
2140
+ description: |
2141
+ Filters out trips matching the given states.
2142
+ Multiple filters can be applied using array syntax, e.g., `&skip[]=canceled&skip[]=atStop`.
2143
+ Using both `untracked` and `missing` will exclude all untracked vehicles, as missing vehicles are a subset of untracked vehicles.
2144
+ We recommend using `missing` instead of `untracked`, as skipping all untracked vehicles may result in departures not appearing in the API response until the last few minutes before departure, especially for departure boards near the starting station/stop.
2145
+ required: false
2146
+ schema:
2147
+ type: string
2148
+ example: "canceled"
2149
+ enum:
2150
+ - canceled
2151
+ - atStop
2152
+ - untracked
2153
+ - missing
2154
+ DepartureBoardsLimit:
2155
+ name: limit
2156
+ in: query
2157
+ description: Limits the number of items in response. The maximum is 1000 (default value is 20).
2158
+ required: false
2159
+ schema:
2160
+ type: number
2161
+ format: int64
2162
+ example: 0
2163
+ DepartureBoardsTotal:
2164
+ name: total
2165
+ in: query
2166
+ description: Sets the number of items that will be queried. Use in conjunction with `offset`. Up to `total - offset`, but not more than `limit` items will be then returned. If unset, is same as `limit`. The maximum is 1000 (default value is 20).
2167
+ required: false
2168
+ schema:
2169
+ type: number
2170
+ format: int64
2171
+ example: 0
2172
+ DepartureBoardsOffset:
2173
+ name: offset
2174
+ in: query
2175
+ description: Number of the initial departures that are skipped. Useful for multi-page displays.
2176
+ required: false
2177
+ schema:
2178
+ type: number
2179
+ format: int64
2180
+ example: 0
2181
+ DepartureBoardsAppendHeadsignsLimit:
2182
+ name: appendHeadsignsLimit
2183
+ in: query
2184
+ description: >-
2185
+ Number of stops before route switch at which headsign is enriched with continuation info.
2186
+ When set and a departure has route-switch data, headsign becomes `&lt;headsign&gt; → &lt;next_route&gt; &lt;next_headsign&gt;`.
2187
+ required: false
2188
+ schema:
2189
+ type: integer
2190
+ minimum: 0
2191
+ example: 3
2192
+
2074
2193
  schemas:
2075
2194
  RepeatOnlyTimes:
2076
2195
  title: Repeat Only Times