@golemio/pid 2.16.0 → 2.16.1-dev.1405891097
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.
- package/db/example/00_clear_test_data.sql +2 -0
- package/db/example/20_jis_infotexts.sql +214 -0
- package/db/migrations/postgresql/20240801141948-jis-infotexts.js +53 -0
- package/db/migrations/postgresql/sqls/20240801141948-jis-infotexts-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20240801141948-jis-infotexts-up.sql +19 -0
- package/dist/integration-engine/index.js +4 -0
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.d.ts +10 -0
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +49 -0
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -0
- package/dist/integration-engine/jis/index.d.ts +1 -0
- package/dist/{output-gateway/pid/controllers → integration-engine/jis}/index.js +1 -2
- package/dist/integration-engine/jis/index.js.map +1 -0
- package/dist/integration-engine/jis/ioc/Di.d.ts +3 -0
- package/dist/integration-engine/jis/ioc/Di.js +31 -0
- package/dist/integration-engine/jis/ioc/Di.js.map +1 -0
- package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +9 -0
- package/dist/integration-engine/jis/ioc/JISContainerToken.js +18 -0
- package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +36 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +101 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.d.ts +36 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +101 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -0
- package/dist/integration-engine/jis/services/JISInfotextsDataService.d.ts +20 -0
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js +78 -0
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -0
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.d.ts +13 -0
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +40 -0
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -0
- package/dist/integration-engine/jis/workers/JISWorker.d.ts +7 -0
- package/dist/integration-engine/jis/workers/JISWorker.js +21 -0
- package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -0
- package/dist/integration-engine/jis/workers/constants.d.ts +1 -0
- package/dist/integration-engine/jis/workers/constants.js +5 -0
- package/dist/integration-engine/jis/workers/constants.js.map +1 -0
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +14 -0
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +72 -0
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -0
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusMessageFilter.d.ts +1 -4
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusMessageFilter.js +11 -27
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusMessageFilter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +15 -10
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.d.ts +3 -6
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +8 -19
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
- package/dist/output-gateway/departure-boards/index.d.ts +1 -1
- package/dist/output-gateway/departure-boards/index.js +1 -1
- package/dist/output-gateway/departure-boards/index.js.map +1 -1
- package/dist/output-gateway/departure-boards/routers/index.d.ts +1 -0
- package/dist/output-gateway/departure-boards/routers/index.js +6 -0
- package/dist/output-gateway/departure-boards/routers/index.js.map +1 -0
- package/dist/output-gateway/departure-boards/{DepartureBoardsRouter.d.ts → routers/v2/V2DepartureBoardsRouter.d.ts} +9 -8
- package/dist/output-gateway/departure-boards/{DepartureBoardsRouter.js → routers/v2/V2DepartureBoardsRouter.js} +19 -18
- package/dist/output-gateway/departure-boards/routers/v2/V2DepartureBoardsRouter.js.map +1 -0
- package/dist/output-gateway/index.d.ts +1 -0
- package/dist/output-gateway/index.js +25 -1
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/pid/controllers/{DepartureBoardsController.d.ts → v2/V2DepartureBoardsController.d.ts} +1 -1
- package/dist/output-gateway/pid/controllers/{DepartureBoardsController.js → v2/V2DepartureBoardsController.js} +9 -9
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -0
- package/dist/output-gateway/pid/controllers/{InfotextsController.d.ts → v2/V2InfotextsController.d.ts} +1 -1
- package/dist/output-gateway/pid/controllers/{InfotextsController.js → v2/V2InfotextsController.js} +6 -6
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -0
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.d.ts +10 -0
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +57 -0
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -0
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.d.ts +27 -0
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +147 -0
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -0
- package/dist/output-gateway/pid/data-access/JISInfotextRopidGTFSStopsRepository.d.ts +11 -0
- package/dist/output-gateway/pid/data-access/JISInfotextRopidGTFSStopsRepository.js +37 -0
- package/dist/output-gateway/pid/data-access/JISInfotextRopidGTFSStopsRepository.js.map +1 -0
- package/dist/output-gateway/pid/domain/InfotextDisplayTypeEnum.d.ts +4 -0
- package/dist/output-gateway/pid/domain/InfotextDisplayTypeEnum.js +9 -0
- package/dist/output-gateway/pid/domain/InfotextDisplayTypeEnum.js.map +1 -0
- package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +28 -0
- package/dist/output-gateway/pid/domain/InfotextInterfaces.js +3 -0
- package/dist/output-gateway/pid/domain/InfotextInterfaces.js.map +1 -0
- package/dist/output-gateway/pid/dto/DepartureBoardsDTO.d.ts +3 -3
- package/dist/output-gateway/pid/dto/DepartureBoardsDTO.js +1 -1
- package/dist/output-gateway/pid/dto/DepartureBoardsDTO.js.map +1 -1
- package/dist/output-gateway/pid/index.d.ts +1 -1
- package/dist/output-gateway/pid/index.js +1 -1
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.d.ts +3 -0
- package/dist/output-gateway/pid/ioc/Di.js +23 -0
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +7 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js +17 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -0
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +2 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +20 -10
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.d.ts +2 -19
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +4 -64
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
- package/dist/output-gateway/pid/routers/index.d.ts +2 -0
- package/dist/output-gateway/pid/routers/index.js +8 -0
- package/dist/output-gateway/pid/routers/index.js.map +1 -0
- package/dist/output-gateway/pid/{PIDRouter.d.ts → routers/v2/V2PIDRouter.d.ts} +5 -4
- package/dist/output-gateway/pid/{PIDRouter.js → routers/v2/V2PIDRouter.js} +20 -17
- package/dist/output-gateway/pid/routers/v2/V2PIDRouter.js.map +1 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.d.ts +11 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +31 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -0
- package/dist/output-gateway/pid/service/helpers/DisplayTypeMapper.d.ts +10 -0
- package/dist/output-gateway/pid/service/helpers/DisplayTypeMapper.js +25 -0
- package/dist/output-gateway/pid/service/helpers/DisplayTypeMapper.js.map +1 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.d.ts +13 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +35 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.d.ts +19 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +43 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -0
- package/dist/output-gateway/public/controllers/{v1/PublicDepartureBoardsController.d.ts → v2/V2PublicDepartureBoardsController.d.ts} +1 -1
- package/dist/output-gateway/public/controllers/{v1/PublicDepartureBoardsController.js → v2/V2PublicDepartureBoardsController.js} +5 -5
- package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -0
- package/dist/output-gateway/public/controllers/{v1/PublicGtfsController.d.ts → v2/V2PublicGtfsController.d.ts} +1 -1
- package/dist/output-gateway/public/controllers/{v1/PublicGtfsController.js → v2/V2PublicGtfsController.js} +5 -5
- package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -0
- package/dist/output-gateway/public/controllers/{v1/PublicVehiclePositionsController.d.ts → v2/V2PublicVehiclePositionsController.d.ts} +1 -1
- package/dist/output-gateway/public/controllers/{v1/PublicVehiclePositionsController.js → v2/V2PublicVehiclePositionsController.js} +4 -4
- package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -0
- package/dist/output-gateway/public/controllers/{v1 → v2}/interfaces/PublicParamsInterfaces.d.ts +1 -1
- package/dist/output-gateway/public/controllers/{v1 → v2}/interfaces/PublicParamsInterfaces.js.map +1 -1
- package/dist/output-gateway/public/index.d.ts +1 -0
- package/dist/output-gateway/public/index.js +18 -0
- package/dist/output-gateway/public/index.js.map +1 -0
- package/dist/output-gateway/public/routers/index.d.ts +3 -0
- package/dist/output-gateway/public/routers/index.js +10 -0
- package/dist/output-gateway/public/routers/index.js.map +1 -0
- package/dist/output-gateway/public/routers/{v1/PublicDeparturesRouter.d.ts → v2/V2PublicDeparturesRouter.d.ts} +4 -3
- package/dist/output-gateway/public/routers/{v1/PublicDeparturesRouter.js → v2/V2PublicDeparturesRouter.js} +11 -8
- package/dist/output-gateway/public/routers/v2/V2PublicDeparturesRouter.js.map +1 -0
- package/dist/output-gateway/public/routers/{v1/PublicGtfsRouter.d.ts → v2/V2PublicGtfsRouter.d.ts} +4 -3
- package/dist/output-gateway/public/routers/{v1/PublicGtfsRouter.js → v2/V2PublicGtfsRouter.js} +11 -8
- package/dist/output-gateway/public/routers/v2/V2PublicGtfsRouter.js.map +1 -0
- package/dist/output-gateway/public/routers/{v1/PublicVehiclePositionsRouter.d.ts → v2/V2PublicVehiclePositionsRouter.d.ts} +4 -3
- package/dist/output-gateway/public/routers/{v1/PublicVehiclePositionsRouter.js → v2/V2PublicVehiclePositionsRouter.js} +11 -8
- package/dist/output-gateway/public/routers/v2/V2PublicVehiclePositionsRouter.js.map +1 -0
- package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomScopeValidator.js.map +1 -1
- package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomStopIdGroupValidator.js.map +1 -1
- package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomTypeValidator.js.map +1 -1
- package/dist/output-gateway/public/routers/{v1 → v2}/helpers/DetailedTripScopeEnum.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.d.ts +1 -1
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.d.ts +1 -1
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +1 -1
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.d.ts +1 -1
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +1 -1
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.d.ts +1 -1
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.js +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.d.ts +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.js +1 -1
- package/dist/output-gateway/ropid-gtfs/index.d.ts +1 -1
- package/dist/output-gateway/ropid-gtfs/index.js +1 -1
- package/dist/output-gateway/ropid-gtfs/index.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/routers/index.d.ts +1 -0
- package/dist/output-gateway/ropid-gtfs/routers/index.js +6 -0
- package/dist/output-gateway/ropid-gtfs/routers/index.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/{GTFSRouter.d.ts → routers/v2/V2GTFSRouter.d.ts} +11 -13
- package/dist/output-gateway/ropid-gtfs/{GTFSRouter.js → routers/v2/V2GTFSRouter.js} +16 -16
- package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -0
- package/dist/output-gateway/shared/RopidRouterUtils.d.ts +4 -0
- package/dist/output-gateway/shared/RopidRouterUtils.js +11 -0
- package/dist/output-gateway/shared/RopidRouterUtils.js.map +1 -1
- package/dist/output-gateway/shared/constants/index.d.ts +1 -0
- package/dist/output-gateway/shared/constants/index.js +1 -0
- package/dist/output-gateway/shared/constants/index.js.map +1 -1
- package/dist/output-gateway/shared/constants/route-version.d.ts +5 -0
- package/dist/output-gateway/shared/constants/route-version.js +10 -0
- package/dist/output-gateway/shared/constants/route-version.js.map +1 -0
- package/dist/output-gateway/vehicle-positions/index.d.ts +1 -1
- package/dist/output-gateway/vehicle-positions/index.js +1 -1
- package/dist/output-gateway/vehicle-positions/index.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/routers/index.d.ts +1 -0
- package/dist/output-gateway/vehicle-positions/routers/index.js +6 -0
- package/dist/output-gateway/vehicle-positions/routers/index.js.map +1 -0
- package/dist/output-gateway/vehicle-positions/{VehiclePositionsRouter.d.ts → routers/v2/V2VehiclePositionsRouter.d.ts} +6 -6
- package/dist/output-gateway/vehicle-positions/{VehiclePositionsRouter.js → routers/v2/V2VehiclePositionsRouter.js} +12 -11
- package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -0
- package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.d.ts +3 -0
- package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js +59 -0
- package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js.map +1 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.d.ts +15 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.js +3 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.js.map +1 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextStop.d.ts +3 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextStop.js +3 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextStop.js.map +1 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISTranslationText.d.ts +4 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISTranslationText.js +3 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISTranslationText.js.map +1 -0
- package/dist/schema-definitions/jis/datasources/interfaces/index.d.ts +3 -0
- package/dist/schema-definitions/jis/datasources/interfaces/index.js +20 -0
- package/dist/schema-definitions/jis/datasources/interfaces/index.js.map +1 -0
- package/dist/schema-definitions/jis/models/JISInfotextsModel.d.ts +18 -0
- package/dist/schema-definitions/jis/models/JISInfotextsModel.js +75 -0
- package/dist/schema-definitions/jis/models/JISInfotextsModel.js.map +1 -0
- package/dist/schema-definitions/jis/models/JISInfotextsRopidGTFSStopsModel.d.ts +12 -0
- package/dist/schema-definitions/jis/models/JISInfotextsRopidGTFSStopsModel.js +41 -0
- package/dist/schema-definitions/jis/models/JISInfotextsRopidGTFSStopsModel.js.map +1 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISInfotext.d.ts +9 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISInfotext.js +3 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISInfotext.js.map +1 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsRopidGTFSStops.d.ts +4 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsRopidGTFSStops.js +3 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsRopidGTFSStops.js.map +1 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISTranslationText.d.ts +4 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISTranslationText.js +3 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISTranslationText.js.map +1 -0
- package/dist/schema-definitions/jis/models/interfaces/index.d.ts +3 -0
- package/dist/schema-definitions/jis/models/interfaces/index.js +20 -0
- package/dist/schema-definitions/jis/models/interfaces/index.js.map +1 -0
- package/dist/schema-definitions/vehicle-positions/models/VPTripsModel.js +6 -0
- package/dist/schema-definitions/vehicle-positions/models/VPTripsModel.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/interfaces/VPTripsLastPositionInterfaces.d.ts +2 -0
- package/docs/assets/pid_jis_erd.png +0 -0
- package/docs/implementation_documentation.md +86 -35
- package/docs/openapi-output.yaml +128 -69
- package/package.json +2 -2
- package/dist/output-gateway/departure-boards/DepartureBoardsRouter.js.map +0 -1
- package/dist/output-gateway/pid/PIDRouter.js.map +0 -1
- package/dist/output-gateway/pid/controllers/DepartureBoardsController.js.map +0 -1
- package/dist/output-gateway/pid/controllers/InfotextsController.js.map +0 -1
- package/dist/output-gateway/pid/controllers/index.d.ts +0 -2
- package/dist/output-gateway/pid/controllers/index.js.map +0 -1
- package/dist/output-gateway/public/controllers/v1/PublicDepartureBoardsController.js.map +0 -1
- package/dist/output-gateway/public/controllers/v1/PublicGtfsController.js.map +0 -1
- package/dist/output-gateway/public/controllers/v1/PublicVehiclePositionsController.js.map +0 -1
- package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.js.map +0 -1
- package/dist/output-gateway/public/routers/v1/PublicGtfsRouter.js.map +0 -1
- package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.js.map +0 -1
- package/dist/output-gateway/ropid-gtfs/GTFSRouter.js.map +0 -1
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js.map +0 -1
- /package/dist/output-gateway/public/controllers/{v1 → v2}/interfaces/PublicParamsInterfaces.js +0 -0
- /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomScopeValidator.d.ts +0 -0
- /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomScopeValidator.js +0 -0
- /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomStopIdGroupValidator.d.ts +0 -0
- /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomStopIdGroupValidator.js +0 -0
- /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomTypeValidator.d.ts +0 -0
- /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/CustomTypeValidator.js +0 -0
- /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/DetailedTripScopeEnum.d.ts +0 -0
- /package/dist/output-gateway/public/routers/{v1 → v2}/helpers/DetailedTripScopeEnum.js +0 -0
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { SequelizeModel } from "@golemio/core/dist/output-gateway";
|
|
2
|
-
import
|
|
3
|
-
export declare enum InfotextsDisplayTypeEnum {
|
|
4
|
-
INLINE = "inline",
|
|
5
|
-
GENERAL = "general"
|
|
6
|
-
}
|
|
2
|
+
import { InfotextDisplayType } from "../domain/InfotextDisplayTypeEnum";
|
|
7
3
|
interface IInfotextsStopsWithEventModel {
|
|
8
4
|
valid_from: Date | null;
|
|
9
5
|
valid_to: Date | null;
|
|
@@ -19,14 +15,8 @@ interface IInfotextsStopsWithRoutesModel extends IInfotextsStopsWithEventModel {
|
|
|
19
15
|
last_updated_user: string;
|
|
20
16
|
related_routes: string[];
|
|
21
17
|
}
|
|
22
|
-
export interface IInfotextsStopsWithEventOutputModel extends Omit<IInfotextsStopsWithEventModel, "stop_type" | "valid_from" | "valid_to"> {
|
|
23
|
-
display_type: InfotextsDisplayTypeEnum;
|
|
24
|
-
text_en: null;
|
|
25
|
-
valid_from: string | null;
|
|
26
|
-
valid_to: string | null;
|
|
27
|
-
}
|
|
28
18
|
interface IInfotextsStopsWithRoutesOutputModel extends Omit<IInfotextsStopsWithRoutesModel, "stop_type" | "expiration_date" | "last_updated" | "valid_from" | "valid_to"> {
|
|
29
|
-
display_type:
|
|
19
|
+
display_type: InfotextDisplayType;
|
|
30
20
|
text_en: null;
|
|
31
21
|
expiration_date: string | null;
|
|
32
22
|
last_updated: string;
|
|
@@ -44,17 +34,10 @@ export declare class RopidVYMIEventsStopsModel extends SequelizeModel {
|
|
|
44
34
|
GetAll(options?: any): Promise<any>;
|
|
45
35
|
GetOne(id: any): Promise<any>;
|
|
46
36
|
constructor();
|
|
47
|
-
/** Retrieves all infotexts with event, could be inner joined with set of stops
|
|
48
|
-
*
|
|
49
|
-
* @param {string[]} stopsIds - Array of GTFS stop ids to be inner joined with corresponding infotexts
|
|
50
|
-
* @param {Moment} timeFrom - Timestamp to filter out specified expiration_date column greater than this value
|
|
51
|
-
*/
|
|
52
|
-
GetAllDistinctWithEvents: (stopsIds: string[], timeFrom: moment.Moment | undefined, timezone: string) => Promise<IInfotextsStopsWithEventOutputModel[]>;
|
|
53
37
|
/**
|
|
54
38
|
* Retrieve all infotexts with routes
|
|
55
39
|
*/
|
|
56
40
|
GetAllWithRoutes: (timezone: string) => Promise<IInfotextsStopsWithRoutesOutputModel[]>;
|
|
57
|
-
private mapDataWithEvent;
|
|
58
41
|
private mapDataWithRoutes;
|
|
59
42
|
private mapStopTypeToDisplayType;
|
|
60
43
|
}
|
|
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.RopidVYMIEventsStopsModel =
|
|
26
|
+
exports.RopidVYMIEventsStopsModel = void 0;
|
|
27
27
|
const models_1 = require("./");
|
|
28
28
|
const GTFSStopModel_1 = require("../../ropid-gtfs/models/GTFSStopModel");
|
|
29
29
|
const shared_1 = require("../../shared");
|
|
@@ -31,20 +31,9 @@ const const_1 = require("../../../schema-definitions/const");
|
|
|
31
31
|
const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
|
|
32
32
|
const ropid_vymi_1 = require("../../../schema-definitions/ropid-vymi");
|
|
33
33
|
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
34
|
-
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
35
|
-
const sequelize_1 = __importDefault(require("@golemio/core/dist/shared/sequelize"));
|
|
36
34
|
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc/");
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
InfotextsRecordTypeEnum[InfotextsRecordTypeEnum["EXCEPTION"] = 1] = "EXCEPTION";
|
|
40
|
-
InfotextsRecordTypeEnum[InfotextsRecordTypeEnum["PLANNED_RESTRICTION"] = 2] = "PLANNED_RESTRICTION";
|
|
41
|
-
InfotextsRecordTypeEnum[InfotextsRecordTypeEnum["PERMANENT_CHANGE"] = 3] = "PERMANENT_CHANGE";
|
|
42
|
-
})(InfotextsRecordTypeEnum || (InfotextsRecordTypeEnum = {}));
|
|
43
|
-
var InfotextsDisplayTypeEnum;
|
|
44
|
-
(function (InfotextsDisplayTypeEnum) {
|
|
45
|
-
InfotextsDisplayTypeEnum["INLINE"] = "inline";
|
|
46
|
-
InfotextsDisplayTypeEnum["GENERAL"] = "general";
|
|
47
|
-
})(InfotextsDisplayTypeEnum || (exports.InfotextsDisplayTypeEnum = InfotextsDisplayTypeEnum = {}));
|
|
35
|
+
const sequelize_1 = __importDefault(require("@golemio/core/dist/shared/sequelize"));
|
|
36
|
+
const InfotextDisplayTypeEnum_1 = require("../domain/InfotextDisplayTypeEnum");
|
|
48
37
|
/**
|
|
49
38
|
* Custom Postgres model for Ropid VYMI Events
|
|
50
39
|
*/
|
|
@@ -57,49 +46,6 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
|
|
|
57
46
|
}
|
|
58
47
|
constructor() {
|
|
59
48
|
super(ropid_vymi_1.RopidVYMI.eventsStops.name + "Model", ropid_vymi_1.RopidVYMI.eventsStops.pgTableName, ropid_vymi_1.RopidVYMI.eventsStops.outputSequelizeAttributes, { schema: const_1.PG_SCHEMA });
|
|
60
|
-
/** Retrieves all infotexts with event, could be inner joined with set of stops
|
|
61
|
-
*
|
|
62
|
-
* @param {string[]} stopsIds - Array of GTFS stop ids to be inner joined with corresponding infotexts
|
|
63
|
-
* @param {Moment} timeFrom - Timestamp to filter out specified expiration_date column greater than this value
|
|
64
|
-
*/
|
|
65
|
-
this.GetAllDistinctWithEvents = (stopsIds, timeFrom = (0, moment_timezone_1.default)(), timezone) => __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
if (stopsIds.length < 1) {
|
|
67
|
-
return [];
|
|
68
|
-
}
|
|
69
|
-
const data = yield this.sequelizeModel.findAll({
|
|
70
|
-
attributes: [
|
|
71
|
-
"valid_from",
|
|
72
|
-
"valid_to",
|
|
73
|
-
"text",
|
|
74
|
-
"stop_type",
|
|
75
|
-
[sequelize_1.default.fn("ARRAY_AGG", sequelize_1.default.col("gtfs_stop_id")), "related_stops"],
|
|
76
|
-
],
|
|
77
|
-
include: {
|
|
78
|
-
attributes: [],
|
|
79
|
-
as: "vymi_event",
|
|
80
|
-
model: this.dbConnector.getConnection().models[ropid_vymi_1.RopidVYMI.events.pgTableName],
|
|
81
|
-
where: {
|
|
82
|
-
time_from: {
|
|
83
|
-
[sequelize_1.default.Op.lte]: new Date().toISOString(),
|
|
84
|
-
},
|
|
85
|
-
expiration_date: {
|
|
86
|
-
[sequelize_1.default.Op.or]: [null, { [sequelize_1.default.Op.gte]: timeFrom.toISOString() }],
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
where: {
|
|
91
|
-
gtfs_stop_id: {
|
|
92
|
-
[sequelize_1.default.Op.in]: stopsIds,
|
|
93
|
-
},
|
|
94
|
-
text: {
|
|
95
|
-
[sequelize_1.default.Op.and]: [{ [sequelize_1.default.Op.ne]: null }, { [sequelize_1.default.Op.ne]: "" }],
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
group: ["valid_from", "valid_to", "text", "stop_type", "vymi_event.vymi_id"],
|
|
99
|
-
raw: true,
|
|
100
|
-
});
|
|
101
|
-
return this.mapDataWithEvent(data, timezone);
|
|
102
|
-
});
|
|
103
49
|
/**
|
|
104
50
|
* Retrieve all infotexts with routes
|
|
105
51
|
*/
|
|
@@ -165,12 +111,6 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
|
|
|
165
111
|
});
|
|
166
112
|
return this.mapDataWithRoutes(data, timezone);
|
|
167
113
|
});
|
|
168
|
-
this.mapDataWithEvent = (items, timezone) => {
|
|
169
|
-
return items.map((item) => {
|
|
170
|
-
const { stop_type: stopType, valid_from, valid_to } = item, infotextsStopModel = __rest(item, ["stop_type", "valid_from", "valid_to"]);
|
|
171
|
-
return Object.assign(Object.assign({ display_type: this.mapStopTypeToDisplayType(stopType), text_en: null }, infotextsStopModel), { valid_from: shared_1.RopidRouterUtils.formatTimestamp(valid_from, timezone), valid_to: shared_1.RopidRouterUtils.formatTimestamp(valid_to, timezone) });
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
114
|
this.mapDataWithRoutes = (items, timezone) => {
|
|
175
115
|
return items.map((item) => {
|
|
176
116
|
const { vymi_id, vymi_id_dtb, stop_type: stopType, expiration_date, last_updated, valid_from, valid_to, last_updated_user } = item, infotextsStopModel = __rest(item, ["vymi_id", "vymi_id_dtb", "stop_type", "expiration_date", "last_updated", "valid_from", "valid_to", "last_updated_user"]);
|
|
@@ -179,7 +119,7 @@ class RopidVYMIEventsStopsModel extends output_gateway_1.SequelizeModel {
|
|
|
179
119
|
};
|
|
180
120
|
this.mapStopTypeToDisplayType = (stopType) => {
|
|
181
121
|
// stop type 1 and 9 leads to general infotext type
|
|
182
|
-
return stopType === 1 || stopType === 9 ?
|
|
122
|
+
return stopType === 1 || stopType === 9 ? InfotextDisplayTypeEnum_1.InfotextDisplayType.General : InfotextDisplayTypeEnum_1.InfotextDisplayType.Inline;
|
|
183
123
|
};
|
|
184
124
|
this.dbConnector = ioc_1.OutputGatewayContainer.resolve(ioc_1.ContainerToken.PostgresDatabase);
|
|
185
125
|
this.eventsModel = new models_1.RopidVYMIEventsModel();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidVYMIEventsStopsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidVYMIEventsStopsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAkF;AAClF,yEAAoE;AACpE,yCAA8C;AAC9C,6DAAuC;AACvC,uEAA4C;AAC5C,uEAA4C;
|
|
1
|
+
{"version":3,"file":"RopidVYMIEventsStopsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/RopidVYMIEventsStopsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAkF;AAClF,yEAAoE;AACpE,yCAA8C;AAC9C,6DAAuC;AACvC,uEAA4C;AAC5C,uEAA4C;AAE5C,sEAAmE;AACnE,gEAAgG;AAChG,oFAA4D;AAC5D,+EAAwE;AA6BxE;;GAEG;AACH,MAAa,yBAA0B,SAAQ,+BAAc;IAMzD,MAAM,CAAC,OAAa;QAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,CAAC,EAAO;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED;QACI,KAAK,CACD,sBAAS,CAAC,WAAW,CAAC,IAAI,GAAG,OAAO,EACpC,sBAAS,CAAC,WAAW,CAAC,WAAW,EACjC,sBAAS,CAAC,WAAW,CAAC,yBAAyB,EAC/C,EAAE,MAAM,EAAE,iBAAS,EAAE,CACxB,CAAC;QA2BN;;WAEG;QACI,qBAAgB,GAAG,CAAO,QAAgB,EAAmD,EAAE;YAClG,MAAM,cAAc,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YAChD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;gBAC3C,UAAU,EAAE;oBACR,YAAY;oBACZ,UAAU;oBACV,MAAM;oBACN,WAAW;oBACX,CAAC,mBAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC;oBACpD,CAAC,mBAAS,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,aAAa,CAAC;oBAC5D,CAAC,mBAAS,CAAC,OAAO,CAAC,4BAA4B,CAAC,EAAE,iBAAiB,CAAC;oBACpE,CAAC,mBAAS,CAAC,OAAO,CAAC,6BAA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ACnD,OAAO,QAAQ,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,6CAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,6CAAmB,CAAC,MAAM,CAAC;QACvG,CAAC,CAAC;QA/HE,IAAI,CAAC,WAAW,GAAG,4BAAsB,CAAC,OAAO,CAAqB,oBAAc,CAAC,gBAAgB,CAAC,CAAC;QAEvG,IAAI,CAAC,WAAW,GAAG,IAAI,6BAAoB,EAAE,CAAC;QAC9C,IAAI,CAAC,iBAAiB,GAAG,IAAI,mCAA0B,EAAE,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,IAAI,6BAAa,EAAE,CAAC;QAE1C,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE;YAC3D,EAAE,EAAE,YAAY;YAChB,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,UAAU;SACzB,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE;YAC/D,EAAE,EAAE,YAAY;YAChB,UAAU,EAAE,UAAU;YACtB,SAAS,EAAE,UAAU;SACxB,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE;YAC3D,EAAE,EAAE,WAAW;YACf,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,cAAc;SAC5B,CAAC,CAAC;IACP,CAAC;CAyGJ;AArJD,8DAqJC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.v3PidRouter = exports.v2PidRouter = void 0;
|
|
4
|
+
var V2PIDRouter_1 = require("./v2/V2PIDRouter");
|
|
5
|
+
Object.defineProperty(exports, "v2PidRouter", { enumerable: true, get: function () { return V2PIDRouter_1.v2PidRouter; } });
|
|
6
|
+
var V3PIDRouter_1 = require("./v3/V3PIDRouter");
|
|
7
|
+
Object.defineProperty(exports, "v3PidRouter", { enumerable: true, get: function () { return V3PIDRouter_1.v3PidRouter; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/routers/index.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAAtC,0GAAA,WAAW,OAAA;AACpB,gDAA+C;AAAtC,0GAAA,WAAW,OAAA"}
|
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
* Handles web logic (http request, response). Sets response headers, handles error responses.
|
|
4
4
|
*/
|
|
5
5
|
/// <reference types="express" />
|
|
6
|
-
import {
|
|
6
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
7
7
|
import { Router } from "@golemio/core/dist/shared/express";
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class V2PIDRouter extends AbstractRouter {
|
|
9
9
|
readonly router: Router;
|
|
10
10
|
private cacheHeaderMiddleware;
|
|
11
11
|
private readonly departureBoardsController;
|
|
12
12
|
private readonly infotextsController;
|
|
13
13
|
constructor();
|
|
14
|
+
protected initRoutes: () => void;
|
|
14
15
|
private registerDepartureBoardsRoutes;
|
|
15
16
|
private registerInfotextsRoutes;
|
|
16
17
|
private commonMiddleware;
|
|
17
18
|
}
|
|
18
|
-
declare const
|
|
19
|
-
export {
|
|
19
|
+
declare const v2PidRouter: AbstractRouter;
|
|
20
|
+
export { v2PidRouter };
|
|
@@ -4,20 +4,25 @@
|
|
|
4
4
|
* Handles web logic (http request, response). Sets response headers, handles error responses.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.v2PidRouter = exports.V2PIDRouter = void 0;
|
|
8
|
+
const V2DepartureBoardsController_1 = require("../../controllers/v2/V2DepartureBoardsController");
|
|
9
|
+
const V2InfotextsController_1 = require("../../controllers/v2/V2InfotextsController");
|
|
10
|
+
const ParamValidatorManager_1 = require("../../helpers/ParamValidatorManager");
|
|
11
|
+
const constants_1 = require("../../../shared/constants");
|
|
12
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
8
13
|
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
9
14
|
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
10
|
-
const BaseRouter_1 = require("@golemio/core/dist/output-gateway/routes/BaseRouter");
|
|
11
15
|
const express_1 = require("@golemio/core/dist/shared/express");
|
|
12
16
|
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
13
|
-
const const_1 = require("
|
|
14
|
-
|
|
15
|
-
const controllers_1 = require("./controllers");
|
|
16
|
-
const ParamValidatorManager_1 = require("./helpers/ParamValidatorManager");
|
|
17
|
-
class PIDRouter extends BaseRouter_1.BaseRouter {
|
|
17
|
+
const const_1 = require("../../../../const");
|
|
18
|
+
class V2PIDRouter extends AbstractRouter_1.AbstractRouter {
|
|
18
19
|
constructor() {
|
|
19
|
-
super();
|
|
20
|
+
super(constants_1.RouteVersion.v2, "pid");
|
|
20
21
|
this.router = (0, express_1.Router)();
|
|
22
|
+
this.initRoutes = () => {
|
|
23
|
+
this.registerDepartureBoardsRoutes();
|
|
24
|
+
this.registerInfotextsRoutes();
|
|
25
|
+
};
|
|
21
26
|
this.registerDepartureBoardsRoutes = () => {
|
|
22
27
|
const { preferredTimezone, departureBoards: { departureMode, order, filter, skip }, } = constants_1.ValidationArrays;
|
|
23
28
|
const validation = [
|
|
@@ -67,14 +72,12 @@ class PIDRouter extends BaseRouter_1.BaseRouter {
|
|
|
67
72
|
};
|
|
68
73
|
this.commonMiddleware = (name) => [Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)(name)];
|
|
69
74
|
this.cacheHeaderMiddleware = ioc_1.OutputGatewayContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
|
|
70
|
-
this.departureBoardsController = new
|
|
71
|
-
this.infotextsController = new
|
|
72
|
-
|
|
73
|
-
this.registerDepartureBoardsRoutes();
|
|
74
|
-
this.registerInfotextsRoutes();
|
|
75
|
+
this.departureBoardsController = new V2DepartureBoardsController_1.V2DepartureBoardsController();
|
|
76
|
+
this.infotextsController = new V2InfotextsController_1.V2InfotextsController();
|
|
77
|
+
this.initRoutes();
|
|
75
78
|
}
|
|
76
79
|
}
|
|
77
|
-
exports.
|
|
78
|
-
const
|
|
79
|
-
exports.
|
|
80
|
-
//# sourceMappingURL=
|
|
80
|
+
exports.V2PIDRouter = V2PIDRouter;
|
|
81
|
+
const v2PidRouter = new V2PIDRouter();
|
|
82
|
+
exports.v2PidRouter = v2PidRouter;
|
|
83
|
+
//# sourceMappingURL=V2PIDRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V2PIDRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/routers/v2/V2PIDRouter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kGAAiG;AACjG,sFAAqF;AACrF,+EAA8E;AAC9E,yDAAsE;AACtE,sFAAmF;AAEnF,6EAAkH;AAClH,+DAA+F;AAC/F,+DAA2D;AAC3D,mFAA2E;AAC3E,6CAAsF;AAEtF,MAAa,WAAY,SAAQ,+BAAc;IAM3C;QACI,KAAK,CAAC,wBAAY,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QANlB,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAahC,eAAU,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,6BAA6B,EAAE,CAAC;YACrC,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACnC,CAAC,CAAC;QAEM,kCAA6B,GAAG,GAAG,EAAE;YACzC,MAAM,EACF,iBAAiB,EACjB,eAAe,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,E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AAG,CACX,kBAAkB,EAClB,UAAU,EACV,GAAG,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,CAAC;YAC9C,sDAAsD;YACtD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC9C,IAAI,CAAC,yBAAyB,CAAC,iBAAiB,CACnD,CAAC;QACN,CAAC,CAAC;QAEM,4BAAuB,GAAG,GAAG,EAAE;YACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,YAAY,EACZ,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC;YACxC,wDAAwD;YACxD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,EAChD,IAAI,CAAC,mBAAmB,CAAC,YAAY,CACxC,CAAC;QACN,CAAC,CAAC;QAEM,qBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,uBAAU,EAAE,wBAAW,EAAE,IAAA,sCAAyB,EAAC,IAAI,CAAC,CAAC,CAAC;QA3EpG,IAAI,CAAC,qBAAqB,GAAG,4BAAsB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACzH,IAAI,CAAC,yBAAyB,GAAG,IAAI,yDAA2B,EAAE,CAAC;QACnE,IAAI,CAAC,mBAAmB,GAAG,IAAI,6CAAqB,EAAE,CAAC;QACvD,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CAwEJ;AApFD,kCAoFC;AAED,MAAM,WAAW,GAAmB,IAAI,WAAW,EAAE,CAAC;AAC7C,kCAAW"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
2
|
+
export declare class V3PIDRouter extends AbstractRouter {
|
|
3
|
+
readonly router: import("express-serve-static-core").Router;
|
|
4
|
+
private readonly cacheHeaderMiddleware;
|
|
5
|
+
private readonly infotextsController;
|
|
6
|
+
constructor();
|
|
7
|
+
protected initRoutes: () => void;
|
|
8
|
+
private registerInfotextsRoutes;
|
|
9
|
+
}
|
|
10
|
+
declare const v3PidRouter: AbstractRouter;
|
|
11
|
+
export { v3PidRouter };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.v3PidRouter = exports.V3PIDRouter = void 0;
|
|
4
|
+
const Di_1 = require("../../ioc/Di");
|
|
5
|
+
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
6
|
+
const constants_1 = require("../../../shared/constants");
|
|
7
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
8
|
+
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
9
|
+
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
10
|
+
const express_1 = require("@golemio/core/dist/shared/express");
|
|
11
|
+
class V3PIDRouter extends AbstractRouter_1.AbstractRouter {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(constants_1.RouteVersion.v3, "pid");
|
|
14
|
+
this.router = (0, express_1.Router)();
|
|
15
|
+
this.initRoutes = () => {
|
|
16
|
+
this.registerInfotextsRoutes();
|
|
17
|
+
};
|
|
18
|
+
this.registerInfotextsRoutes = () => {
|
|
19
|
+
this.router.get("/infotexts", Validation_1.checkErrors,
|
|
20
|
+
// max-age 10 seconds, stale-while-revalidate 10 seconds
|
|
21
|
+
this.cacheHeaderMiddleware.getMiddleware(10, 10), this.infotextsController.getJisInfotexts);
|
|
22
|
+
};
|
|
23
|
+
this.cacheHeaderMiddleware = Di_1.OgPidContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
|
|
24
|
+
this.infotextsController = Di_1.OgPidContainer.resolve(OgPidToken_1.OgPidToken.V3InfotextsController);
|
|
25
|
+
this.initRoutes();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.V3PIDRouter = V3PIDRouter;
|
|
29
|
+
const v3PidRouter = new V3PIDRouter();
|
|
30
|
+
exports.v3PidRouter = v3PidRouter;
|
|
31
|
+
//# sourceMappingURL=V3PIDRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V3PIDRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/routers/v3/V3PIDRouter.ts"],"names":[],"mappings":";;;AACA,qCAAgD;AAChD,qDAAoD;AACpD,yDAAoD;AACpD,sFAAmF;AAEnF,6EAA2E;AAC3E,+DAAuE;AACvE,+DAA2D;AAE3D,MAAa,WAAY,SAAQ,+BAAc;IAK3C;QACI,KAAK,CAAC,wBAAY,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QALlB,WAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QAWxB,eAAU,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACnC,CAAC,CAAC;QAEM,4BAAuB,GAAG,GAAG,EAAE;YACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,YAAY,EACZ,wBAAW;YACX,wDAAwD;YACxD,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,EAChD,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAC3C,CAAC;QACN,CAAC,CAAC;QAjBE,IAAI,CAAC,qBAAqB,GAAG,mBAAc,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACjH,IAAI,CAAC,mBAAmB,GAAG,mBAAc,CAAC,OAAO,CAAwB,uBAAU,CAAC,qBAAqB,CAAC,CAAC;QAC3G,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CAeJ;AAzBD,kCAyBC;AAED,MAAM,WAAW,GAAmB,IAAI,WAAW,EAAE,CAAC;AAC7C,kCAAW"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InfotextDisplayType } from "../../domain/InfotextDisplayTypeEnum";
|
|
2
|
+
export declare class DisplayTypeMapper {
|
|
3
|
+
/**
|
|
4
|
+
* Map input display type from DB to output display type for API
|
|
5
|
+
*
|
|
6
|
+
* @param input Display type from DB
|
|
7
|
+
* @returns Display type for API
|
|
8
|
+
*/
|
|
9
|
+
static mapInputToOutputDisplayType(input: string): InfotextDisplayType;
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DisplayTypeMapper = void 0;
|
|
4
|
+
const InfotextDisplayTypeEnum_1 = require("../../domain/InfotextDisplayTypeEnum");
|
|
5
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
6
|
+
class DisplayTypeMapper {
|
|
7
|
+
/**
|
|
8
|
+
* Map input display type from DB to output display type for API
|
|
9
|
+
*
|
|
10
|
+
* @param input Display type from DB
|
|
11
|
+
* @returns Display type for API
|
|
12
|
+
*/
|
|
13
|
+
static mapInputToOutputDisplayType(input) {
|
|
14
|
+
switch (input) {
|
|
15
|
+
case "INLINE":
|
|
16
|
+
return InfotextDisplayTypeEnum_1.InfotextDisplayType.Inline;
|
|
17
|
+
case "GENERAL":
|
|
18
|
+
return InfotextDisplayTypeEnum_1.InfotextDisplayType.General;
|
|
19
|
+
default:
|
|
20
|
+
throw new golemio_errors_1.GeneralError(`Unknown display type: ${input}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.DisplayTypeMapper = DisplayTypeMapper;
|
|
25
|
+
//# sourceMappingURL=DisplayTypeMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisplayTypeMapper.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/helpers/DisplayTypeMapper.ts"],"names":[],"mappings":";;;AAAA,kFAA6E;AAC7E,6EAAwE;AAExE,MAAa,iBAAiB;IAC1B;;;;;OAKG;IACI,MAAM,CAAC,2BAA2B,CAAC,KAAa;QACnD,QAAQ,KAAK,EAAE;YACX,KAAK,QAAQ;gBACT,OAAO,6CAAmB,CAAC,MAAM,CAAC;YACtC,KAAK,SAAS;gBACV,OAAO,6CAAmB,CAAC,OAAO,CAAC;YACvC;gBACI,MAAM,IAAI,6BAAY,CAAC,yBAAyB,KAAK,EAAE,CAAC,CAAC;SAChE;IACL,CAAC;CACJ;AAjBD,8CAiBC"}
|
package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IInfotextDepartureInputDto, IInfotextDepartureOutputDto } from "../../domain/InfotextInterfaces";
|
|
2
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
3
|
+
export declare class JISInfotextDepartureTransformation extends AbstractTransformation<IInfotextDepartureInputDto, IInfotextDepartureOutputDto> {
|
|
4
|
+
name: string;
|
|
5
|
+
protected transformInternal: ({ data, timeZone }: IInfotextDepartureInputDto) => {
|
|
6
|
+
display_type: import("../../domain/InfotextDisplayTypeEnum").InfotextDisplayType;
|
|
7
|
+
text: string;
|
|
8
|
+
text_en: string | null;
|
|
9
|
+
related_stops: string[];
|
|
10
|
+
valid_from: string;
|
|
11
|
+
valid_to: string | null;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.JISInfotextDepartureTransformation = void 0;
|
|
10
|
+
const shared_1 = require("../../../shared");
|
|
11
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
12
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
13
|
+
const DisplayTypeMapper_1 = require("../helpers/DisplayTypeMapper");
|
|
14
|
+
let JISInfotextDepartureTransformation = exports.JISInfotextDepartureTransformation = class JISInfotextDepartureTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.name = "JISInfotextDepartureTransformation";
|
|
18
|
+
this.transformInternal = ({ data, timeZone }) => {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
const stops = (_a = data.stops) !== null && _a !== void 0 ? _a : [];
|
|
21
|
+
return {
|
|
22
|
+
display_type: DisplayTypeMapper_1.DisplayTypeMapper.mapInputToOutputDisplayType(data.display_type),
|
|
23
|
+
text: data.description_text.cs,
|
|
24
|
+
text_en: (_b = data.description_text.en) !== null && _b !== void 0 ? _b : null,
|
|
25
|
+
related_stops: stops.map((stop) => stop.stop_id),
|
|
26
|
+
valid_from: (_c = shared_1.RopidRouterUtils.formatTimestamp(data.active_period_start, timeZone)) !== null && _c !== void 0 ? _c : data.active_period_start.toISOString(),
|
|
27
|
+
valid_to: shared_1.RopidRouterUtils.formatTimestamp(data.active_period_end, timeZone),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.JISInfotextDepartureTransformation = JISInfotextDepartureTransformation = __decorate([
|
|
33
|
+
(0, tsyringe_1.injectable)()
|
|
34
|
+
], JISInfotextDepartureTransformation);
|
|
35
|
+
//# sourceMappingURL=JISInfotextDepartureTransformation.js.map
|
package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JISInfotextDepartureTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,4CAA8C;AAC9C,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AAG1D,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,+CAGvD;IAHM;;QAII,SAAI,GAAG,oCAAoC,CAAC;QAEzC,sBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAA8B,EAAE,EAAE;;YAC7E,MAAM,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC;YAC/B,OAAO;gBACH,YAAY,EAAE,qCAAiB,CAAC,2BAA2B,CAAC,IAAI,CAAC,YAAY,CAAC;gBAC9E,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,EAAE;gBAC9B,OAAO,EAAE,MAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,mCAAI,IAAI;gBACzC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;gBAChD,UAAU,EACN,MAAA,yBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,mCAAI,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE;gBAClH,QAAQ,EAAE,yBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC;aAC/E,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;6CAlBY,kCAAkC;IAD9C,IAAA,qBAAU,GAAE;GACA,kCAAkC,CAkB9C"}
|
package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IInfotextOverviewOutputDto } from "../../domain/InfotextInterfaces";
|
|
2
|
+
import { JISInfotextsModel } from "../../../../schema-definitions/jis/models/JISInfotextsModel";
|
|
3
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
4
|
+
export declare class JISInfotextOverviewTransformation extends AbstractTransformation<JISInfotextsModel, IInfotextOverviewOutputDto> {
|
|
5
|
+
name: string;
|
|
6
|
+
protected transformInternal: (inputDto: JISInfotextsModel) => {
|
|
7
|
+
id: string;
|
|
8
|
+
display_type: import("../../domain/InfotextDisplayTypeEnum").InfotextDisplayType;
|
|
9
|
+
text: string;
|
|
10
|
+
text_en: string | null;
|
|
11
|
+
related_stops: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
platform_code: string;
|
|
15
|
+
}[];
|
|
16
|
+
valid_from: string;
|
|
17
|
+
valid_to: string | null;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.JISInfotextOverviewTransformation = void 0;
|
|
10
|
+
const shared_1 = require("../../../shared");
|
|
11
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
12
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
13
|
+
const DisplayTypeMapper_1 = require("../helpers/DisplayTypeMapper");
|
|
14
|
+
let JISInfotextOverviewTransformation = exports.JISInfotextOverviewTransformation = class JISInfotextOverviewTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.name = "JISInfotextOverviewTransformation";
|
|
18
|
+
this.transformInternal = (inputDto) => {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
const stops = (_a = inputDto.stops) !== null && _a !== void 0 ? _a : [];
|
|
21
|
+
return {
|
|
22
|
+
id: inputDto.id,
|
|
23
|
+
display_type: DisplayTypeMapper_1.DisplayTypeMapper.mapInputToOutputDisplayType(inputDto.display_type),
|
|
24
|
+
text: inputDto.description_text.cs,
|
|
25
|
+
text_en: (_b = inputDto.description_text.en) !== null && _b !== void 0 ? _b : null,
|
|
26
|
+
related_stops: stops.map((stop) => {
|
|
27
|
+
var _a;
|
|
28
|
+
return ({
|
|
29
|
+
id: stop.stop_id,
|
|
30
|
+
name: stop.stop_name,
|
|
31
|
+
platform_code: (_a = stop.platform_code) !== null && _a !== void 0 ? _a : null,
|
|
32
|
+
});
|
|
33
|
+
}),
|
|
34
|
+
valid_from: (_c = shared_1.RopidRouterUtils.formatTimestamp(inputDto.active_period_start)) !== null && _c !== void 0 ? _c : inputDto.active_period_start.toISOString(),
|
|
35
|
+
valid_to: shared_1.RopidRouterUtils.formatTimestamp(inputDto.active_period_end),
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.JISInfotextOverviewTransformation = JISInfotextOverviewTransformation = __decorate([
|
|
41
|
+
(0, tsyringe_1.injectable)()
|
|
42
|
+
], JISInfotextOverviewTransformation);
|
|
43
|
+
//# sourceMappingURL=JISInfotextOverviewTransformation.js.map
|
package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JISInfotextOverviewTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,4CAA8C;AAE9C,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AAG1D,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,+CAAqE;IAArH;;QACI,SAAI,GAAG,mCAAmC,CAAC;QAExC,sBAAiB,GAAG,CAAC,QAA2B,EAAE,EAAE;;YAC1D,MAAM,KAAK,GAAG,MAAA,QAAQ,CAAC,KAAK,mCAAI,EAAE,CAAC;YACnC,OAAO;gBACH,EAAE,EAAE,QAAQ,CAAC,EAAE;gBACf,YAAY,EAAE,qCAAiB,CAAC,2BAA2B,CAAC,QAAQ,CAAC,YAAY,CAAC;gBAClF,IAAI,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE;gBAClC,OAAO,EAAE,MAAA,QAAQ,CAAC,gBAAgB,CAAC,EAAE,mCAAI,IAAI;gBAC7C,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;oBAAC,OAAA,CAAC;wBAChC,EAAE,EAAE,IAAI,CAAC,OAAO;wBAChB,IAAI,EAAE,IAAI,CAAC,SAAS;wBACpB,aAAa,EAAE,MAAA,IAAI,CAAC,aAAa,mCAAI,IAAI;qBAC5C,CAAC,CAAA;iBAAA,CAAC;gBACH,UAAU,EACN,MAAA,yBAAgB,CAAC,eAAe,CAAC,QAAQ,CAAC,mBAAmB,CAAC,mCAAI,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE;gBAChH,QAAQ,EAAE,yBAAgB,CAAC,eAAe,CAAC,QAAQ,CAAC,iBAAiB,CAAC;aACzE,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;4CApBY,iCAAiC;IAD7C,IAAA,qBAAU,GAAE;GACA,iCAAiC,CAoB7C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="express" />
|
|
2
2
|
import { RequestHandler } from "@golemio/core/dist/shared/express";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class V2PublicDepartureBoardsController {
|
|
4
4
|
constructor();
|
|
5
5
|
getAll: RequestHandler;
|
|
6
6
|
private parseDepartureParams;
|
|
@@ -9,14 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.V2PublicDepartureBoardsController = void 0;
|
|
13
13
|
const Di_1 = require("../../ioc/Di");
|
|
14
14
|
const OgModuleToken_1 = require("../../ioc/OgModuleToken");
|
|
15
15
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
16
|
-
class
|
|
16
|
+
class V2PublicDepartureBoardsController {
|
|
17
17
|
constructor() {
|
|
18
18
|
this.getAll = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const span = (0, trace_provider_1.createChildSpan)("
|
|
19
|
+
const span = (0, trace_provider_1.createChildSpan)("V2PublicDepartureBoardsController.getAll");
|
|
20
20
|
try {
|
|
21
21
|
const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.DepartureBoardFacade);
|
|
22
22
|
const params = this.parseDepartureParams(req.query);
|
|
@@ -61,5 +61,5 @@ class PublicDepartureBoardsController {
|
|
|
61
61
|
return output;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
exports.
|
|
65
|
-
//# sourceMappingURL=
|
|
64
|
+
exports.V2PublicDepartureBoardsController = V2PublicDepartureBoardsController;
|
|
65
|
+
//# sourceMappingURL=V2PublicDepartureBoardsController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V2PublicDepartureBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicDep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,KAAK;oBACpC,CAAC,CAAE,KAAK,CAAC,eAA4B;oBACrC,CAAC,CAAC,CAAC,KAAK,CAAC,eAAyB,CAAC;gBACvC,CAAC,CAAC,IAAI;YACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAsB,CAAC,CAAC,CAAC,CAAC,EAAE;SACjF,CAAC;IACN,CAAC;IAEO,YAAY,CAAC,gBAA0B;QAC3C,IAAI,MAAM,GAAsC,IAAI,GAAG,EAAE,CAAC;QAE1D,KAAK,MAAM,MAAM,IAAI,gBAAgB,EAAE;YACnC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACxC,MAAM,OAAO,GAAa,MAAM,CAAC,QAAQ,CAAC,CAAC;YAE3C,MAAM,CAAC,GAAG,CAAC;gBACP,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACnC,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;aACjC,CAAC,CAAC;SACN;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AApDD,8EAoDC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="express" />
|
|
2
2
|
import { RequestHandler } from "@golemio/core/dist/shared/express";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class V2PublicGtfsController {
|
|
4
4
|
getOneTrip: RequestHandler;
|
|
5
5
|
private parseGtfsTripLookupParams;
|
|
6
6
|
}
|
|
@@ -9,14 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.V2PublicGtfsController = void 0;
|
|
13
13
|
const Di_1 = require("../../ioc/Di");
|
|
14
14
|
const OgModuleToken_1 = require("../../ioc/OgModuleToken");
|
|
15
15
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
16
|
-
class
|
|
16
|
+
class V2PublicGtfsController {
|
|
17
17
|
constructor() {
|
|
18
18
|
this.getOneTrip = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const span = (0, trace_provider_1.createChildSpan)("
|
|
19
|
+
const span = (0, trace_provider_1.createChildSpan)("V2PublicGtfsController.getOneTrip");
|
|
20
20
|
try {
|
|
21
21
|
const facade = Di_1.OgPublicContainer.resolve(OgModuleToken_1.OgModuleToken.GtfsTripLookupFacade);
|
|
22
22
|
const params = this.parseGtfsTripLookupParams(req);
|
|
@@ -40,5 +40,5 @@ class PublicGtfsController {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
exports.
|
|
44
|
-
//# sourceMappingURL=
|
|
43
|
+
exports.V2PublicGtfsController = V2PublicGtfsController;
|
|
44
|
+
//# sourceMappingURL=V2PublicGtfsController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V2PublicGtfsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/controllers/v2/V2PublicGtfsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAsD;AACtD,2DAA6D;AAG7D,+FAA6F;AAI7F,MAAa,sBAAsB;IAAnC;QACW,eAAU,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACzD,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,mCAAmC,CAAC,CAAC;YAElE,IAAI;gBACA,MAAM,MAAM,GAAG,sBAAiB,CAAC,OAAO,CAAuB,6BAAa,CAAC,oBAAoB,CAAC,CAAC;gBACnG,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBACnD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBAE/E,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAA,CAAC;IAWN,CAAC;IATW,yBAAyB,CAAC,GAAY;QAC1C,OAAO;YACH,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU;YACjC,MAAM,EACF,GAAG,CAAC,KAAK,CAAC,MAAM,YAAY,KAAK;gBAC7B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,MAA6B,CAAC,CAAC;gBAC9D,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAA2B,CAAC;SACpD,CAAC;IACN,CAAC;CACJ;AA1BD,wDA0BC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="express" />
|
|
2
2
|
import { RequestHandler } from "@golemio/core/dist/shared/express";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class V2PublicVehiclePositionsController {
|
|
4
4
|
constructor();
|
|
5
5
|
getAll: RequestHandler;
|
|
6
6
|
getOneByVehicleId: RequestHandler;
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.V2PublicVehiclePositionsController = void 0;
|
|
13
13
|
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
14
14
|
const const_1 = require("../../domain/const");
|
|
15
15
|
const Di_1 = require("../../ioc/Di");
|
|
16
16
|
const OgModuleToken_1 = require("../../ioc/OgModuleToken");
|
|
17
|
-
class
|
|
17
|
+
class V2PublicVehiclePositionsController {
|
|
18
18
|
constructor() {
|
|
19
19
|
this.getAll = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
try {
|
|
@@ -82,5 +82,5 @@ class PublicVehiclePositionsController {
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
exports.
|
|
86
|
-
//# sourceMappingURL=
|
|
85
|
+
exports.V2PublicVehiclePositionsController = V2PublicVehiclePositionsController;
|
|
86
|
+
//# sourceMappingURL=V2PublicVehiclePositionsController.js.map
|