@golemio/pid 6.0.3-dev.2946669933 → 6.0.3-dev.2950030701

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 (66) hide show
  1. package/db/example/00_clear_test_data.sql +2 -0
  2. package/db/example/03_ropidgtfs_dump.sql +205 -0
  3. package/db/migrations/postgresql/20261012131524-add-gtfs-pathways-levels.js +16 -0
  4. package/db/migrations/postgresql/sqls/20261009120000-case-insensitive-assigned-stop-id-down.sql +2 -1
  5. package/db/migrations/postgresql/sqls/20261009120000-case-insensitive-assigned-stop-id-up.sql +2 -1
  6. package/db/migrations/postgresql/sqls/20261012131524-add-gtfs-pathways-levels-down.sql +100 -0
  7. package/db/migrations/postgresql/sqls/20261012131524-add-gtfs-pathways-levels-up.sql +180 -0
  8. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.d.ts +5 -0
  9. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +16 -1
  10. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
  11. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +2 -0
  12. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
  13. package/dist/output-gateway/pid/helpers/ParamValidatorManager.d.ts +3 -1
  14. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +10 -0
  15. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
  16. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +1 -1
  17. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  18. package/dist/output-gateway/ropid-gtfs/data-access/AbstractGtfsCollectionRepository.d.ts +17 -0
  19. package/dist/output-gateway/ropid-gtfs/data-access/AbstractGtfsCollectionRepository.js +34 -0
  20. package/dist/output-gateway/ropid-gtfs/data-access/AbstractGtfsCollectionRepository.js.map +1 -0
  21. package/dist/output-gateway/ropid-gtfs/data-access/GtfsLevelRepository.d.ts +7 -0
  22. package/dist/output-gateway/ropid-gtfs/data-access/GtfsLevelRepository.js +30 -0
  23. package/dist/output-gateway/ropid-gtfs/data-access/GtfsLevelRepository.js.map +1 -0
  24. package/dist/output-gateway/ropid-gtfs/data-access/GtfsPathwayRepository.d.ts +7 -0
  25. package/dist/output-gateway/ropid-gtfs/data-access/GtfsPathwayRepository.js +30 -0
  26. package/dist/output-gateway/ropid-gtfs/data-access/GtfsPathwayRepository.js.map +1 -0
  27. package/dist/output-gateway/ropid-gtfs/data-access/GtfsTransferRepository.d.ts +7 -0
  28. package/dist/output-gateway/ropid-gtfs/data-access/GtfsTransferRepository.js +39 -0
  29. package/dist/output-gateway/ropid-gtfs/data-access/GtfsTransferRepository.js.map +1 -0
  30. package/dist/output-gateway/ropid-gtfs/domain/IGtfsTransferOutputDto.d.ts +7 -0
  31. package/dist/output-gateway/ropid-gtfs/domain/IGtfsTransferOutputDto.js +2 -0
  32. package/dist/output-gateway/ropid-gtfs/domain/IGtfsTransferOutputDto.js.map +1 -0
  33. package/dist/output-gateway/ropid-gtfs/domain/repository/IGtfsCollectionRepository.d.ts +10 -0
  34. package/dist/output-gateway/ropid-gtfs/domain/repository/IGtfsCollectionRepository.js +2 -0
  35. package/dist/output-gateway/ropid-gtfs/domain/repository/IGtfsCollectionRepository.js.map +1 -0
  36. package/dist/output-gateway/ropid-gtfs/ioc/Di.d.ts +3 -0
  37. package/dist/output-gateway/ropid-gtfs/ioc/Di.js +13 -0
  38. package/dist/output-gateway/ropid-gtfs/ioc/Di.js.map +1 -0
  39. package/dist/output-gateway/ropid-gtfs/ioc/OgGtfsToken.d.ts +5 -0
  40. package/dist/output-gateway/ropid-gtfs/ioc/OgGtfsToken.js +8 -0
  41. package/dist/output-gateway/ropid-gtfs/ioc/OgGtfsToken.js.map +1 -0
  42. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +2 -2
  43. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
  44. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModelInterfaces.d.ts +2 -1
  45. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.d.ts +9 -0
  46. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +27 -0
  47. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
  48. package/dist/schema-definitions/ropid-gtfs/RopidGtfsSchedule.d.ts +18 -0
  49. package/dist/schema-definitions/ropid-gtfs/RopidGtfsSchedule.js +18 -0
  50. package/dist/schema-definitions/ropid-gtfs/RopidGtfsSchedule.js.map +1 -1
  51. package/dist/schema-definitions/ropid-gtfs/interfaces/ILevelDto.d.ts +5 -0
  52. package/dist/schema-definitions/ropid-gtfs/interfaces/ILevelDto.js +2 -0
  53. package/dist/schema-definitions/ropid-gtfs/interfaces/ILevelDto.js.map +1 -0
  54. package/dist/schema-definitions/ropid-gtfs/interfaces/IPathwayDto.d.ts +15 -0
  55. package/dist/schema-definitions/ropid-gtfs/interfaces/IPathwayDto.js +2 -0
  56. package/dist/schema-definitions/ropid-gtfs/interfaces/IPathwayDto.js.map +1 -0
  57. package/dist/schema-definitions/ropid-gtfs/models/LevelDto.d.ts +16 -0
  58. package/dist/schema-definitions/ropid-gtfs/models/LevelDto.js +25 -0
  59. package/dist/schema-definitions/ropid-gtfs/models/LevelDto.js.map +1 -0
  60. package/dist/schema-definitions/ropid-gtfs/models/PathwayDto.d.ts +26 -0
  61. package/dist/schema-definitions/ropid-gtfs/models/PathwayDto.js +65 -0
  62. package/dist/schema-definitions/ropid-gtfs/models/PathwayDto.js.map +1 -0
  63. package/docs/assets/pid_scheduled_erd.png +0 -0
  64. package/docs/implementation_documentation.md +27 -1
  65. package/docs/openapi-output.yaml +292 -0
  66. package/package.json +1 -1
@@ -400,6 +400,21 @@ paths:
400
400
  schema:
401
401
  type: string
402
402
  example: "U476Z103P"
403
+ - name: locationTypes
404
+ in: query
405
+ description: >-
406
+ Get stops by GTFS `location_type` (0 = stop/platform, 1 = station, 2 = entrance/exit, 3 = generic node,
407
+ 4 = boarding area). Preferably use with square brackets `locationTypes[]=1&locationTypes[]=2`
408
+ (though repeating the parameter without brackets is also accepted).
409
+ required: false
410
+ style: form
411
+ explode: true
412
+ schema:
413
+ type: array
414
+ items:
415
+ type: integer
416
+ enum: [0, 1, 2, 3, 4]
417
+ example: [0]
403
418
  - name: aswIds
404
419
  in: query
405
420
  description: Get stops by ASW, use `_` instead of `/` or encode the slash sign with `%2F`. Use with square brackets `aswId[]`.
@@ -576,6 +591,129 @@ paths:
576
591
  "404":
577
592
  description: Not found
578
593
 
594
+ /v2/gtfs/levels:
595
+ get:
596
+ summary: GET All GTFS Levels
597
+ description: Levels within stations from GTFS `levels.txt`, ordered by `level_id` ascending.
598
+ tags:
599
+ - 🧾 GTFS Static (v2)
600
+ parameters:
601
+ - name: limit
602
+ in: query
603
+ description: Limits number of retrieved items. The maximum is 10000 (default value).
604
+ required: false
605
+ schema:
606
+ type: number
607
+ format: int64
608
+ example: 10
609
+ - name: offset
610
+ in: query
611
+ description: Number of the first items that are skipped.
612
+ required: false
613
+ schema:
614
+ type: number
615
+ format: int64
616
+ example: 0
617
+ responses:
618
+ "200":
619
+ description: successful operation
620
+ headers:
621
+ Cache-Control:
622
+ description: Cache control directive for caching proxies
623
+ schema:
624
+ type: string
625
+ example: public, s-maxage=14400, stale-while-revalidate=60
626
+ content:
627
+ application/json:
628
+ schema:
629
+ type: array
630
+ items:
631
+ $ref: "#/components/schemas/GTFSLevel"
632
+ "401":
633
+ $ref: "#/components/responses/UnauthorizedError"
634
+
635
+ /v2/gtfs/pathways:
636
+ get:
637
+ summary: GET All GTFS Pathways
638
+ description: Pathways linking locations within stations from GTFS `pathways.txt`, ordered by `pathway_id` ascending.
639
+ tags:
640
+ - 🧾 GTFS Static (v2)
641
+ parameters:
642
+ - name: limit
643
+ in: query
644
+ description: Limits number of retrieved items. The maximum is 10000 (default value).
645
+ required: false
646
+ schema:
647
+ type: number
648
+ format: int64
649
+ example: 10
650
+ - name: offset
651
+ in: query
652
+ description: Number of the first items that are skipped.
653
+ required: false
654
+ schema:
655
+ type: number
656
+ format: int64
657
+ example: 0
658
+ responses:
659
+ "200":
660
+ description: successful operation
661
+ headers:
662
+ Cache-Control:
663
+ description: Cache control directive for caching proxies
664
+ schema:
665
+ type: string
666
+ example: public, s-maxage=14400, stale-while-revalidate=60
667
+ content:
668
+ application/json:
669
+ schema:
670
+ type: array
671
+ items:
672
+ $ref: "#/components/schemas/GTFSPathway"
673
+ "401":
674
+ $ref: "#/components/responses/UnauthorizedError"
675
+
676
+ /v2/gtfs/transfers:
677
+ get:
678
+ summary: GET All GTFS Transfers
679
+ description: Transfer rules from GTFS `transfers.txt`, ordered by `from_stop_id`, `to_stop_id`, `from_trip_id` and `to_trip_id`, all ascending with empty values last.
680
+ tags:
681
+ - 🧾 GTFS Static (v2)
682
+ parameters:
683
+ - name: limit
684
+ in: query
685
+ description: Limits number of retrieved items. The maximum is 10000 (default value).
686
+ required: false
687
+ schema:
688
+ type: number
689
+ format: int64
690
+ example: 10
691
+ - name: offset
692
+ in: query
693
+ description: Number of the first items that are skipped.
694
+ required: false
695
+ schema:
696
+ type: number
697
+ format: int64
698
+ example: 0
699
+ responses:
700
+ "200":
701
+ description: successful operation
702
+ headers:
703
+ Cache-Control:
704
+ description: Cache control directive for caching proxies
705
+ schema:
706
+ type: string
707
+ example: public, s-maxage=14400, stale-while-revalidate=60
708
+ content:
709
+ application/json:
710
+ schema:
711
+ type: array
712
+ items:
713
+ $ref: "#/components/schemas/GTFSTransfer"
714
+ "401":
715
+ $ref: "#/components/responses/UnauthorizedError"
716
+
579
717
  /v2/vehiclepositions:
580
718
  get:
581
719
  summary: GET All Vehicle Positions
@@ -2632,6 +2770,160 @@ components:
2632
2770
  - route_type
2633
2771
  - route_url
2634
2772
 
2773
+ GTFSLevel:
2774
+ title: GTFS Level
2775
+ description: See GTFS Schedule Reference for [levels.txt](https://gtfs.org/documentation/schedule/reference/#levelstxt).
2776
+ type: object
2777
+ properties:
2778
+ level_id:
2779
+ type: string
2780
+ example: "U400L1"
2781
+ level_index:
2782
+ type: number
2783
+ format: double
2784
+ description: Numeric index of the level that indicates its relative position. Ground level is 0.
2785
+ example: -1
2786
+ level_name:
2787
+ type: string
2788
+ nullable: true
2789
+ example: "Chodba"
2790
+ required:
2791
+ - level_id
2792
+ - level_index
2793
+ - level_name
2794
+
2795
+ GTFSPathway:
2796
+ title: GTFS Pathway
2797
+ description: See GTFS Schedule Reference for [pathways.txt](https://gtfs.org/documentation/schedule/reference/#pathwaystxt).
2798
+ type: object
2799
+ properties:
2800
+ pathway_id:
2801
+ type: string
2802
+ example: "U400P13"
2803
+ from_stop_id:
2804
+ type: string
2805
+ example: "U400N11"
2806
+ to_stop_id:
2807
+ type: string
2808
+ example: "U400N29"
2809
+ pathway_mode:
2810
+ type: integer
2811
+ enum: [1, 2, 3, 4, 5, 6, 7]
2812
+ description: >-
2813
+ 1 = walkway, 2 = stairs, 3 = moving sidewalk/travelator, 4 = escalator, 5 = elevator,
2814
+ 6 = fare gate, 7 = exit gate
2815
+ example: 1
2816
+ is_bidirectional:
2817
+ type: integer
2818
+ enum: [0, 1]
2819
+ description: 0 = unidirectional (from `from_stop_id` to `to_stop_id` only), 1 = bidirectional
2820
+ example: 1
2821
+ length:
2822
+ type: number
2823
+ format: double
2824
+ nullable: true
2825
+ description: Horizontal length in meters.
2826
+ example: null
2827
+ traversal_time:
2828
+ type: integer
2829
+ nullable: true
2830
+ description: Average time in seconds needed to walk through the pathway.
2831
+ example: 30
2832
+ stair_count:
2833
+ type: integer
2834
+ nullable: true
2835
+ description: Number of stairs, positive when going up from `from_stop_id` to `to_stop_id`, negative when going down.
2836
+ example: -28
2837
+ max_slope:
2838
+ type: number
2839
+ format: double
2840
+ nullable: true
2841
+ description: Maximum slope ratio of the pathway.
2842
+ example: null
2843
+ min_width:
2844
+ type: number
2845
+ format: double
2846
+ nullable: true
2847
+ description: Minimum width of the pathway in meters.
2848
+ example: null
2849
+ signposted_as:
2850
+ type: string
2851
+ nullable: true
2852
+ description: Public facing text from physical signage visible to riders.
2853
+ example: "Linka C, Line C"
2854
+ reversed_signposted_as:
2855
+ type: string
2856
+ nullable: true
2857
+ description: Same as `signposted_as`, but when the pathway is used from `to_stop_id` to `from_stop_id`.
2858
+ example: "E4, E5 Vinohradská, Legerova"
2859
+ bikes_prohibited:
2860
+ type: integer
2861
+ enum: [0, 1]
2862
+ nullable: true
2863
+ description: 0 = bicycles allowed, 1 = bicycles prohibited. A PID extension of GTFS.
2864
+ example: 0
2865
+ required:
2866
+ - pathway_id
2867
+ - from_stop_id
2868
+ - to_stop_id
2869
+ - pathway_mode
2870
+ - is_bidirectional
2871
+ - length
2872
+ - traversal_time
2873
+ - stair_count
2874
+ - max_slope
2875
+ - min_width
2876
+ - signposted_as
2877
+ - reversed_signposted_as
2878
+ - bikes_prohibited
2879
+
2880
+ GTFSTransfer:
2881
+ title: GTFS Transfer
2882
+ description: See GTFS Schedule Reference for [transfers.txt](https://gtfs.org/documentation/schedule/reference/#transferstxt).
2883
+ type: object
2884
+ properties:
2885
+ from_stop_id:
2886
+ type: string
2887
+ nullable: true
2888
+ example: "U1071Z3P"
2889
+ to_stop_id:
2890
+ type: string
2891
+ nullable: true
2892
+ example: "U1071Z3P"
2893
+ from_trip_id:
2894
+ type: string
2895
+ nullable: true
2896
+ example: "909_271_251110"
2897
+ to_trip_id:
2898
+ type: string
2899
+ nullable: true
2900
+ example: "916_175_260101"
2901
+ transfer_type:
2902
+ type: integer
2903
+ enum: [0, 1, 2, 3, 4, 5]
2904
+ description: >-
2905
+ 0 = recommended transfer point, 1 = timed transfer point, 2 = transfer requires `min_transfer_time`,
2906
+ 3 = transfer not possible, 4 = in-seat transfer, 5 = in-seat transfer not allowed
2907
+ example: 1
2908
+ min_transfer_time:
2909
+ type: integer
2910
+ nullable: true
2911
+ description: Minimum time in seconds needed for the transfer.
2912
+ example: null
2913
+ max_waiting_time:
2914
+ type: integer
2915
+ nullable: true
2916
+ description: Maximum time in seconds the connecting vehicle waits. A PID extension of GTFS.
2917
+ example: 180
2918
+ required:
2919
+ - from_stop_id
2920
+ - to_stop_id
2921
+ - from_trip_id
2922
+ - to_trip_id
2923
+ - transfer_type
2924
+ - min_transfer_time
2925
+ - max_waiting_time
2926
+
2635
2927
  Point:
2636
2928
  title: Point
2637
2929
  type: array
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/pid",
3
- "version": "6.0.3-dev.2946669933",
3
+ "version": "6.0.3-dev.2950030701",
4
4
  "description": "Golemio PID Module",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",