@golemio/pid 2.16.1-dev.1403887169 → 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/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/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 +1 -1
- 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
|
@@ -23,9 +23,33 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.VehiclePositions = exports.RopidGTFS = exports.PID = exports.DepartureBoards = void 0;
|
|
26
|
+
exports.routers = exports.VehiclePositions = exports.RopidGTFS = exports.PID = exports.DepartureBoards = void 0;
|
|
27
|
+
const departure_boards_1 = require("./departure-boards");
|
|
28
|
+
const pid_1 = require("./pid");
|
|
29
|
+
const public_1 = require("./public");
|
|
30
|
+
const ropid_gtfs_1 = require("./ropid-gtfs");
|
|
31
|
+
const vehicle_positions_1 = require("./vehicle-positions");
|
|
27
32
|
exports.DepartureBoards = __importStar(require("./departure-boards"));
|
|
28
33
|
exports.PID = __importStar(require("./pid"));
|
|
29
34
|
exports.RopidGTFS = __importStar(require("./ropid-gtfs"));
|
|
30
35
|
exports.VehiclePositions = __importStar(require("./vehicle-positions"));
|
|
36
|
+
exports.routers = [
|
|
37
|
+
//#region Ropid GTFS
|
|
38
|
+
ropid_gtfs_1.v2GtfsRouter,
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region Vehicle positions
|
|
41
|
+
vehicle_positions_1.v2VehiclepositionsRouter,
|
|
42
|
+
//#region Departure boards (deprecated)
|
|
43
|
+
departure_boards_1.v2DepartureBoardsRouter,
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region PID Departure boards
|
|
46
|
+
pid_1.v2PidRouter,
|
|
47
|
+
pid_1.v3PidRouter,
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region Public Endpoints
|
|
50
|
+
public_1.v2PublicDeparturesRouter,
|
|
51
|
+
public_1.v2PublicGtfsRouter,
|
|
52
|
+
public_1.v2PublicVPRouter,
|
|
53
|
+
//#endregion
|
|
54
|
+
];
|
|
31
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAsD;AACtD,6CAA6B;AAC7B,0DAA0C;AAC1C,wEAAwD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAA+D;AAC/D,+BAAmD;AACnD,qCAA4F;AAC5F,6CAA8C;AAC9C,2DAAiE;AAEjE,sEAAsD;AACtD,6CAA6B;AAC7B,0DAA0C;AAC1C,wEAAwD;AAE3C,QAAA,OAAO,GAAG;IACnB,oBAAoB;IACpB,yBAAY;IACZ,YAAY;IAEZ,2BAA2B;IAC3B,4CAAwB;IAExB,uCAAuC;IACvC,0CAAuB;IACvB,YAAY;IAEZ,8BAA8B;IAC9B,iBAAW;IACX,iBAAW;IACX,YAAY;IAEZ,0BAA0B;IAC1B,iCAAwB;IACxB,2BAAkB;IAClB,yBAAgB;IAChB,YAAY;CACf,CAAC"}
|
|
@@ -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 V2DepartureBoardsController {
|
|
4
4
|
private departureBoardsModel;
|
|
5
5
|
constructor();
|
|
6
6
|
getDepartureBoard: RequestHandler;
|
|
@@ -12,13 +12,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
const
|
|
15
|
+
exports.V2DepartureBoardsController = void 0;
|
|
16
|
+
const dto_1 = require("../../dto");
|
|
17
|
+
const models_1 = require("../../models");
|
|
18
|
+
const shared_1 = require("../../../shared");
|
|
17
19
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const dto_1 = require("../dto");
|
|
21
|
-
class DepartureBoardsController {
|
|
20
|
+
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
21
|
+
class V2DepartureBoardsController {
|
|
22
22
|
constructor() {
|
|
23
23
|
this.getDepartureBoard = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
24
24
|
var _a;
|
|
@@ -37,7 +37,7 @@ class DepartureBoardsController {
|
|
|
37
37
|
? (0, moment_timezone_1.default)(query.timeFrom)
|
|
38
38
|
: moment_timezone_1.default.tz(query.timeFrom, preferredTimezone)
|
|
39
39
|
: undefined;
|
|
40
|
-
const span = (0, trace_provider_1.createChildSpan)("
|
|
40
|
+
const span = (0, trace_provider_1.createChildSpan)("V2DepartureBoardsController.getDepartureBoard");
|
|
41
41
|
try {
|
|
42
42
|
const data = yield this.departureBoardsModel.GetAll({
|
|
43
43
|
aswIds: query.aswIds,
|
|
@@ -72,5 +72,5 @@ class DepartureBoardsController {
|
|
|
72
72
|
this.departureBoardsModel = new models_1.PIDDepartureBoardsModel();
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
exports.
|
|
76
|
-
//# sourceMappingURL=
|
|
75
|
+
exports.V2DepartureBoardsController = V2DepartureBoardsController;
|
|
76
|
+
//# sourceMappingURL=V2DepartureBoardsController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V2DepartureBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v2/V2DepartureBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mCAAkF;AAClF,yCAAyD;AACzD,4CAA8C;AAC9C,+FAA6F;AAE7F,gGAA2E;AAE3E,MAAa,2BAA2B;IAGpC;QAIO,sBAAiB,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;;YAChE,MAAM,KAAK,GAAG,yBAAgB,CAAC,sBAAsB,CAAC,6BAAuB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;YAC1F,MAAM,iBAAiB,GAAG,yBAAgB,CAAC,oBAAoB,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;YAEzF,oDAAoD;YACpD,cAAc;YACd,uBAAuB;YACvB,0BAA0B;YAC1B,yBAAyB;YACzB,4BAA4B;YAC5B,MAAM,qBAAqB,GAAW,uDAAuD,CAAC;YAC9F,+DAA+D;YAC/D,MAAM,QAAQ,GAAuB,KAAK,CAAC,QAAQ;gBAC/C,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,qBAAqB,CAAC;oBACzC,CAAC,CAAC,IAAA,yBAAM,EAAC,KAAK,CAAC,QAAQ,CAAC;oBACxB,CAAC,CAAC,yBAAM,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;gBAClD,CAAC,CAAC,SAAS,CAAC;YAEhB,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,+CAA+C,CAAC,CAAC;YAC9E,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC;oBAChD,MAAM,EA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class
|
|
3
|
+
export declare class V2InfotextsController {
|
|
4
4
|
private readonly eventsStopsModel;
|
|
5
5
|
constructor();
|
|
6
6
|
getInfotexts: RequestHandler;
|
package/dist/output-gateway/pid/controllers/{InfotextsController.js → v2/V2InfotextsController.js}
RENAMED
|
@@ -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.V2InfotextsController = void 0;
|
|
13
13
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
14
14
|
const config_1 = require("@golemio/core/dist/output-gateway/config");
|
|
15
|
-
const models_1 = require("
|
|
16
|
-
class
|
|
15
|
+
const models_1 = require("../../models");
|
|
16
|
+
class V2InfotextsController {
|
|
17
17
|
constructor() {
|
|
18
18
|
this.getInfotexts = (_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)("V2InfotextsController.getInfotexts");
|
|
20
20
|
try {
|
|
21
21
|
const preferredTimezone = config_1.config.vehiclePositions.defaultTimezone;
|
|
22
22
|
const data = yield this.eventsStopsModel.GetAllWithRoutes(preferredTimezone);
|
|
@@ -32,5 +32,5 @@ class InfotextsController {
|
|
|
32
32
|
this.eventsStopsModel = new models_1.RopidVYMIEventsStopsModel();
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
exports.
|
|
36
|
-
//# sourceMappingURL=
|
|
35
|
+
exports.V2InfotextsController = V2InfotextsController;
|
|
36
|
+
//# sourceMappingURL=V2InfotextsController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V2InfotextsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v2/V2InfotextsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+FAA6F;AAC7F,qEAAkE;AAClE,yCAA2D;AAE3D,MAAa,qBAAqB;IAG9B;QAIO,iBAAY,GAAmB,CAAO,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC5D,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,oCAAoC,CAAC,CAAC;YAEnE,IAAI;gBACA,MAAM,iBAAiB,GAAG,eAAM,CAAC,gBAAgB,CAAC,eAAe,CAAC;gBAClE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;gBAC7E,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC9B;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;QAfE,IAAI,CAAC,gBAAgB,GAAG,IAAI,kCAAyB,EAAE,CAAC;IAC5D,CAAC;CAeJ;AApBD,sDAoBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="express" />
|
|
2
|
+
import { JISInfotextRepository } from "../../data-access/JISInfotextRepository";
|
|
3
|
+
import { JISInfotextOverviewTransformation } from "../../service/transformations/JISInfotextOverviewTransformation";
|
|
4
|
+
import { RequestHandler } from "@golemio/core/dist/shared/express";
|
|
5
|
+
export declare class V3InfotextsController {
|
|
6
|
+
private infotextRepository;
|
|
7
|
+
private infotextTransformation;
|
|
8
|
+
constructor(infotextRepository: JISInfotextRepository, infotextTransformation: JISInfotextOverviewTransformation);
|
|
9
|
+
getJisInfotexts: RequestHandler;
|
|
10
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.V3InfotextsController = void 0;
|
|
25
|
+
const JISInfotextRepository_1 = require("../../data-access/JISInfotextRepository");
|
|
26
|
+
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
27
|
+
const JISInfotextOverviewTransformation_1 = require("../../service/transformations/JISInfotextOverviewTransformation");
|
|
28
|
+
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
29
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
30
|
+
let V3InfotextsController = exports.V3InfotextsController = class V3InfotextsController {
|
|
31
|
+
constructor(infotextRepository, infotextTransformation) {
|
|
32
|
+
this.infotextRepository = infotextRepository;
|
|
33
|
+
this.infotextTransformation = infotextTransformation;
|
|
34
|
+
this.getJisInfotexts = (_req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const span = (0, trace_provider_1.createChildSpan)("V3InfotextsController.getJisInfotexts");
|
|
36
|
+
try {
|
|
37
|
+
const infotexts = yield this.infotextRepository.findAllForOverview();
|
|
38
|
+
const outputDto = this.infotextTransformation.transformArray(infotexts);
|
|
39
|
+
res.status(200).send(outputDto);
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
next(err);
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
span === null || span === void 0 ? void 0 : span.end();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.V3InfotextsController = V3InfotextsController = __decorate([
|
|
51
|
+
(0, tsyringe_1.injectable)(),
|
|
52
|
+
__param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextRepository)),
|
|
53
|
+
__param(1, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextOverviewTransformation)),
|
|
54
|
+
__metadata("design:paramtypes", [JISInfotextRepository_1.JISInfotextRepository,
|
|
55
|
+
JISInfotextOverviewTransformation_1.JISInfotextOverviewTransformation])
|
|
56
|
+
], V3InfotextsController);
|
|
57
|
+
//# sourceMappingURL=V3InfotextsController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V3InfotextsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v3/V3InfotextsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,mFAAkF;AAClF,qDAAoD;AACpD,uHAAsH;AACtH,+FAA6F;AAE7F,iEAAwE;AAGjE,IAAM,qBAAqB,mCAA3B,MAAM,qBAAqB;IAC9B,YAC8C,kBAAiD,EACrC,sBAAiE;QADrE,uBAAkB,GAAlB,kBAAkB,CAAuB;QAC7B,2BAAsB,GAAtB,sBAAsB,CAAmC;QAGpH,oBAAe,GAAmB,CAAO,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC/D,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,uCAAuC,CAAC,CAAC;YAEtE,IAAI;gBACA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,CAAC;gBACrE,MAAM,SAAS,GAAG,IAAI,CAAC,sBAAsB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;gBACxE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aACnC;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;IAdC,CAAC;CAeP,CAAA;gCAnBY,qBAAqB;IADjC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,qBAAqB,CAAC,CAAA;IACxC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,iCAAiC,CAAC,CAAA;qCADiB,6CAAqB;QACL,qEAAiC;GAHlH,qBAAqB,CAmBjC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { JISInfotextsModel } from "../../../schema-definitions/jis/models/JISInfotextsModel";
|
|
2
|
+
import { ILogger } from "@golemio/core/dist/helpers";
|
|
3
|
+
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
4
|
+
import { AbstractBasicRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository";
|
|
5
|
+
import { JISInfotextRopidGTFSStopsRepository } from "./JISInfotextRopidGTFSStopsRepository";
|
|
6
|
+
export declare class JISInfotextRepository extends AbstractBasicRepository {
|
|
7
|
+
schema: string;
|
|
8
|
+
tableName: string;
|
|
9
|
+
private sequelizeModel;
|
|
10
|
+
private gtfsStopRepository;
|
|
11
|
+
constructor(infotextStopRepository: JISInfotextRopidGTFSStopsRepository, connector: IDatabaseConnector, logger: ILogger);
|
|
12
|
+
/**
|
|
13
|
+
* Find all active infotexts for given stops and time for PID departure boards API
|
|
14
|
+
*
|
|
15
|
+
* @param stopsIds GTFS stop IDs for which the infotexts should be fetched
|
|
16
|
+
* @param timeFrom Time from which the infotexts should be valid (default is current time)
|
|
17
|
+
* @returns Active infotexts
|
|
18
|
+
*/
|
|
19
|
+
findAllForDepartureBoard(stopsIds: string[], timeFrom?: Date): Promise<JISInfotextsModel[]>;
|
|
20
|
+
/**
|
|
21
|
+
* Find all active infotexts for given time for PID infotexts API
|
|
22
|
+
*
|
|
23
|
+
* @param timeFrom Time from which the infotexts should be valid (default is current time)
|
|
24
|
+
* @returns Active infotexts
|
|
25
|
+
*/
|
|
26
|
+
findAllForOverview(timeFrom?: Date): Promise<JISInfotextsModel[]>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.JISInfotextRepository = void 0;
|
|
25
|
+
const GTFSStopModel_1 = require("../../ropid-gtfs/models/GTFSStopModel");
|
|
26
|
+
const const_1 = require("../../../schema-definitions/const");
|
|
27
|
+
const JISInfotextsModel_1 = require("../../../schema-definitions/jis/models/JISInfotextsModel");
|
|
28
|
+
const AbstractBasicRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository");
|
|
29
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
30
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
31
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
32
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
33
|
+
const OgPidToken_1 = require("../ioc/OgPidToken");
|
|
34
|
+
const JISInfotextRopidGTFSStopsRepository_1 = require("./JISInfotextRopidGTFSStopsRepository");
|
|
35
|
+
let JISInfotextRepository = exports.JISInfotextRepository = class JISInfotextRepository extends AbstractBasicRepository_1.AbstractBasicRepository {
|
|
36
|
+
constructor(infotextStopRepository, connector, logger) {
|
|
37
|
+
super(connector, logger);
|
|
38
|
+
this.schema = const_1.PG_SCHEMA;
|
|
39
|
+
this.tableName = JISInfotextsModel_1.JISInfotextsModel.tableName;
|
|
40
|
+
this.sequelizeModel = connector
|
|
41
|
+
.getConnection()
|
|
42
|
+
.define(this.tableName, JISInfotextsModel_1.JISInfotextsModel.attributeModel, { schema: this.schema, timestamps: false });
|
|
43
|
+
this.gtfsStopRepository = new GTFSStopModel_1.GTFSStopModel();
|
|
44
|
+
// associations
|
|
45
|
+
this.sequelizeModel.belongsToMany(this.gtfsStopRepository.sequelizeModel, {
|
|
46
|
+
through: infotextStopRepository.sequelizeModel,
|
|
47
|
+
foreignKey: "infotext_id",
|
|
48
|
+
otherKey: "stop_id",
|
|
49
|
+
as: "stops",
|
|
50
|
+
});
|
|
51
|
+
this.gtfsStopRepository.sequelizeModel.belongsToMany(this.sequelizeModel, {
|
|
52
|
+
through: infotextStopRepository.sequelizeModel,
|
|
53
|
+
foreignKey: "stop_id",
|
|
54
|
+
otherKey: "infotext_id",
|
|
55
|
+
});
|
|
56
|
+
infotextStopRepository.sequelizeModel.belongsTo(this.sequelizeModel, {
|
|
57
|
+
targetKey: "id",
|
|
58
|
+
foreignKey: "infotext_id",
|
|
59
|
+
});
|
|
60
|
+
infotextStopRepository.sequelizeModel.belongsTo(this.gtfsStopRepository.sequelizeModel, {
|
|
61
|
+
targetKey: "stop_id",
|
|
62
|
+
foreignKey: "stop_id",
|
|
63
|
+
});
|
|
64
|
+
this.sequelizeModel.hasMany(infotextStopRepository.sequelizeModel, {
|
|
65
|
+
sourceKey: "id",
|
|
66
|
+
foreignKey: "infotext_id",
|
|
67
|
+
});
|
|
68
|
+
this.gtfsStopRepository.sequelizeModel.hasMany(infotextStopRepository.sequelizeModel, {
|
|
69
|
+
sourceKey: "stop_id",
|
|
70
|
+
foreignKey: "stop_id",
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Find all active infotexts for given stops and time for PID departure boards API
|
|
75
|
+
*
|
|
76
|
+
* @param stopsIds GTFS stop IDs for which the infotexts should be fetched
|
|
77
|
+
* @param timeFrom Time from which the infotexts should be valid (default is current time)
|
|
78
|
+
* @returns Active infotexts
|
|
79
|
+
*/
|
|
80
|
+
findAllForDepartureBoard(stopsIds, timeFrom = new Date()) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
try {
|
|
83
|
+
return yield this.sequelizeModel.findAll({
|
|
84
|
+
attributes: ["display_type", "active_period_start", "active_period_end", "description_text"],
|
|
85
|
+
where: {
|
|
86
|
+
active_period_start: { [sequelize_1.Op.lte]: timeFrom },
|
|
87
|
+
active_period_end: { [sequelize_1.Op.or]: [{ [sequelize_1.Op.gte]: timeFrom }, { [sequelize_1.Op.is]: null }] },
|
|
88
|
+
},
|
|
89
|
+
include: [
|
|
90
|
+
{
|
|
91
|
+
model: this.gtfsStopRepository.sequelizeModel,
|
|
92
|
+
as: "stops",
|
|
93
|
+
attributes: ["stop_id"],
|
|
94
|
+
where: {
|
|
95
|
+
stop_id: { [sequelize_1.Op.in]: stopsIds },
|
|
96
|
+
},
|
|
97
|
+
through: { attributes: [] },
|
|
98
|
+
required: true,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
catch (err) {
|
|
104
|
+
throw new golemio_errors_1.GeneralError("Error while getting infotexts for departure board", this.constructor.name, err);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Find all active infotexts for given time for PID infotexts API
|
|
110
|
+
*
|
|
111
|
+
* @param timeFrom Time from which the infotexts should be valid (default is current time)
|
|
112
|
+
* @returns Active infotexts
|
|
113
|
+
*/
|
|
114
|
+
findAllForOverview(timeFrom = new Date()) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
try {
|
|
117
|
+
return yield this.sequelizeModel.findAll({
|
|
118
|
+
attributes: ["id", "display_type", "active_period_start", "active_period_end", "description_text"],
|
|
119
|
+
where: {
|
|
120
|
+
active_period_start: { [sequelize_1.Op.lte]: timeFrom },
|
|
121
|
+
active_period_end: { [sequelize_1.Op.or]: [{ [sequelize_1.Op.gte]: timeFrom }, { [sequelize_1.Op.is]: null }] },
|
|
122
|
+
},
|
|
123
|
+
include: [
|
|
124
|
+
{
|
|
125
|
+
model: this.gtfsStopRepository.sequelizeModel,
|
|
126
|
+
as: "stops",
|
|
127
|
+
attributes: ["stop_id", "stop_name", "platform_code"],
|
|
128
|
+
through: { attributes: [] },
|
|
129
|
+
required: true,
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
throw new golemio_errors_1.GeneralError("Error while getting infotexts for overview", this.constructor.name, err);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
exports.JISInfotextRepository = JISInfotextRepository = __decorate([
|
|
141
|
+
(0, tsyringe_1.injectable)(),
|
|
142
|
+
__param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.JISInfotextRopidGTFSStopsRepository)),
|
|
143
|
+
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
144
|
+
__param(2, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
145
|
+
__metadata("design:paramtypes", [JISInfotextRopidGTFSStopsRepository_1.JISInfotextRopidGTFSStopsRepository, Object, Object])
|
|
146
|
+
], JISInfotextRepository);
|
|
147
|
+
//# sourceMappingURL=JISInfotextRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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,CAAC,CAAC;aACpG;QACL,CAAC;KAAA;CACJ,CAAA;gCA7GY,qBAAqB;IADjC,IAAA,qBAAU,GAAE;IAQJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,mCAAmC,CAAC,CAAA;IACtD,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCAFuD,yEAAmC;GAP9G,qBAAqB,CA6GjC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JISInfotextsRopidGTFSStopsModel } from "../../../schema-definitions/jis/models/JISInfotextsRopidGTFSStopsModel";
|
|
2
|
+
import { ILogger } from "@golemio/core/dist/helpers";
|
|
3
|
+
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
4
|
+
import { AbstractBasicRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository";
|
|
5
|
+
import { ModelStatic } from "@golemio/core/dist/shared/sequelize";
|
|
6
|
+
export declare class JISInfotextRopidGTFSStopsRepository extends AbstractBasicRepository {
|
|
7
|
+
schema: string;
|
|
8
|
+
tableName: string;
|
|
9
|
+
sequelizeModel: ModelStatic<JISInfotextsRopidGTFSStopsModel>;
|
|
10
|
+
constructor(connector: IDatabaseConnector, logger: ILogger);
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.JISInfotextRopidGTFSStopsRepository = void 0;
|
|
16
|
+
const const_1 = require("../../../schema-definitions/const");
|
|
17
|
+
const JISInfotextsRopidGTFSStopsModel_1 = require("../../../schema-definitions/jis/models/JISInfotextsRopidGTFSStopsModel");
|
|
18
|
+
const AbstractBasicRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository");
|
|
19
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
20
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
21
|
+
let JISInfotextRopidGTFSStopsRepository = exports.JISInfotextRopidGTFSStopsRepository = class JISInfotextRopidGTFSStopsRepository extends AbstractBasicRepository_1.AbstractBasicRepository {
|
|
22
|
+
constructor(connector, logger) {
|
|
23
|
+
super(connector, logger);
|
|
24
|
+
this.schema = const_1.PG_SCHEMA;
|
|
25
|
+
this.tableName = JISInfotextsRopidGTFSStopsModel_1.JISInfotextsRopidGTFSStopsModel.tableName;
|
|
26
|
+
this.sequelizeModel = connector
|
|
27
|
+
.getConnection()
|
|
28
|
+
.define(this.tableName, JISInfotextsRopidGTFSStopsModel_1.JISInfotextsRopidGTFSStopsModel.attributeModel, { schema: this.schema, timestamps: false });
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.JISInfotextRopidGTFSStopsRepository = JISInfotextRopidGTFSStopsRepository = __decorate([
|
|
32
|
+
(0, tsyringe_1.injectable)(),
|
|
33
|
+
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
34
|
+
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
35
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
36
|
+
], JISInfotextRopidGTFSStopsRepository);
|
|
37
|
+
//# sourceMappingURL=JISInfotextRopidGTFSStopsRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JISInfotextRopidGTFSStopsRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/data-access/JISInfotextRopidGTFSStopsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,4HAAkG;AAGlG,kIAA+H;AAC/H,wEAAqE;AAErE,iEAAwE;AAGjE,IAAM,mCAAmC,iDAAzC,MAAM,mCAAoC,SAAQ,iDAAuB;IAK5E,YAAiD,SAA6B,EAA4B,MAAe;QACrH,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QALtB,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,iEAA+B,CAAC,SAAS,CAAC;QAKzD,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,iEAA+B,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5H,CAAC;CACJ,CAAA;8CAXY,mCAAmC;IAD/C,IAAA,qBAAU,GAAE;IAMI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IAAiC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GALhG,mCAAmC,CAW/C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfotextDisplayType = void 0;
|
|
4
|
+
var InfotextDisplayType;
|
|
5
|
+
(function (InfotextDisplayType) {
|
|
6
|
+
InfotextDisplayType["Inline"] = "inline";
|
|
7
|
+
InfotextDisplayType["General"] = "general";
|
|
8
|
+
})(InfotextDisplayType || (exports.InfotextDisplayType = InfotextDisplayType = {}));
|
|
9
|
+
//# sourceMappingURL=InfotextDisplayTypeEnum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfotextDisplayTypeEnum.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/domain/InfotextDisplayTypeEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;AACvB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { JISInfotextsModel } from "../../../schema-definitions/jis/models/JISInfotextsModel";
|
|
2
|
+
import { InfotextDisplayType } from "./InfotextDisplayTypeEnum";
|
|
3
|
+
export interface IInfotextDepartureInputDto {
|
|
4
|
+
data: JISInfotextsModel;
|
|
5
|
+
timeZone: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IInfotextStopDto {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
platform_code: string | null;
|
|
11
|
+
}
|
|
12
|
+
export interface IInfotextDepartureOutputDto {
|
|
13
|
+
display_type: InfotextDisplayType;
|
|
14
|
+
text: string;
|
|
15
|
+
text_en: string | null;
|
|
16
|
+
related_stops: string[];
|
|
17
|
+
valid_from: string;
|
|
18
|
+
valid_to: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface IInfotextOverviewOutputDto {
|
|
21
|
+
id: string;
|
|
22
|
+
display_type: InfotextDisplayType;
|
|
23
|
+
text: string;
|
|
24
|
+
text_en: string | null;
|
|
25
|
+
related_stops: IInfotextStopDto[];
|
|
26
|
+
valid_from: string;
|
|
27
|
+
valid_to: string | null;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfotextInterfaces.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/domain/InfotextInterfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { DepartureFilter, DepartureMode, DepartureOrder, DepartureSkip, IPIDDepartureOutput } from "..";
|
|
1
2
|
import { IGTFSStopGetAllOutput } from "../../ropid-gtfs/models/GTFSStopModelInterfaces";
|
|
2
|
-
import {
|
|
3
|
-
import { IPIDDepartureOutput, DepartureMode, DepartureFilter, DepartureOrder, DepartureSkip } from "..";
|
|
3
|
+
import { IInfotextDepartureOutputDto } from "../domain/InfotextInterfaces";
|
|
4
4
|
import { IDepartureBoardsQueryDTO } from "./interfaces/IDepartureBoardsQueryDTO";
|
|
5
5
|
export declare class DepartureBoardsQueryDTO implements IDepartureBoardsQueryDTO {
|
|
6
6
|
aswIds: string[];
|
|
@@ -24,5 +24,5 @@ export declare class DepartureBoardsQueryDTO implements IDepartureBoardsQueryDTO
|
|
|
24
24
|
export declare class DepartureBoardsResponseDTO {
|
|
25
25
|
stops: IGTFSStopGetAllOutput[];
|
|
26
26
|
departures: IPIDDepartureOutput[];
|
|
27
|
-
infotexts:
|
|
27
|
+
infotexts: IInfotextDepartureOutputDto[];
|
|
28
28
|
}
|
|
@@ -10,8 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DepartureBoardsResponseDTO = exports.DepartureBoardsQueryDTO = void 0;
|
|
13
|
-
const decorators_1 = require("../../shared/decorators");
|
|
14
13
|
const pid_1 = require("..");
|
|
14
|
+
const decorators_1 = require("../../shared/decorators");
|
|
15
15
|
class DepartureBoardsQueryDTO {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.aswIds = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepartureBoardsDTO.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/dto/DepartureBoardsDTO.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"DepartureBoardsDTO.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/dto/DepartureBoardsDTO.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAA6G;AAE7G,wDAA2F;AAI3F,MAAa,uBAAuB;IAApC;QAEI,WAAM,GAAa,EAAE,CAAC;QAGtB,WAAM,GAAa,EAAE,CAAC;QAGtB,QAAG,GAAa,EAAE,CAAC;QAGnB,UAAK,GAAa,EAAE,CAAC;QAGrB,SAAI,GAAoB,EAAE,CAAC;QAG3B,UAAK,GAAW,EAAE,CAAC;QAGnB,iBAAY,GAAW,GAAG,CAAC;QAG3B,kBAAa,GAAW,CAAC,CAAC;QAG1B,uBAAkB,GAAY,KAAK,CAAC;QAGpC,iBAAY,GAAY,IAAI,CAAC;QAE7B,SAAI,GAAkB,mBAAa,CAAC,UAAU,CAAC;QAE/C,UAAK,GAAmB,oBAAc,CAAC,IAAI,CAAC;QAE5C,WAAM,GAAoB,qBAAe,CAAC,IAAI,CAAC;QAG/C,WAAM,GAAW,CAAC,CAAC;IAQvB,CAAC;CAAA;AA9CD,0DA8CC;AA5CG;IADC,IAAA,2BAAc,GAAE;;uDACK;AAGtB;IADC,IAAA,2BAAc,GAAE;;uDACK;AAGtB;IADC,IAAA,2BAAc,GAAE;;oDACE;AAGnB;IADC,IAAA,2BAAc,GAAE;;sDACI;AAGrB;IADC,IAAA,2BAAc,GAAE;;qDACU;AAG3B;IADC,IAAA,6BAAgB,GAAE;;sDACA;AAGnB;IADC,IAAA,6BAAgB,GAAE;;6DACQ;AAG3B;IADC,IAAA,6BAAgB,GAAE;;8DACO;AAG1B;IADC,IAAA,6BAAgB,GAAE;;mEACiB;AAGpC;IADC,IAAA,6BAAgB,GAAE;;6DACU;AAS7B;IADC,IAAA,6BAAgB,GAAE;;uDACA;AAGnB;IADC,IAAA,6BAAgB,GAAE;;sDACJ;AAOnB,MAAa,0BAA0B;IAAvC;QACI,UAAK,GAA4B,EAAE,CAAC;QACpC,eAAU,GAA0B,EAAE,CAAC;QACvC,cAAS,GAAkC,EAAE,CAAC;IAClD,CAAC;CAAA;AAJD,gEAIC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GtfsStopWheelchairBoardingEnum, GtfsTripWheelchairAccessEnum } from "../../helpers/AccessibilityEnums";
|
|
2
2
|
import { GTFSRouteTypeEnum } from "../../helpers/RouteTypeEnums";
|
|
3
3
|
import { DeparturesDirectionsEnum } from "../../schema-definitions/ropid-departures-directions";
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./routers";
|
|
5
5
|
export * from "./models";
|
|
6
6
|
export interface IPIDDeparture {
|
|
7
7
|
stop_sequence: number;
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.DepartureSkip = exports.DepartureFilter = exports.DepartureOrder = exports.DepartureMode = void 0;
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./routers"), exports);
|
|
19
19
|
__exportStar(require("./models"), exports);
|
|
20
20
|
var DepartureMode;
|
|
21
21
|
(function (DepartureMode) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/pid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/pid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,4CAA0B;AAC1B,2CAAyB;AAkFzB,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;IACrB,gCAAe,CAAA;AACnB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,yCAAuB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,eAQX;AARD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,2CAAwB,CAAA;IACxB,0DAAuC,CAAA;IACvC,oDAAiC,CAAA;IACjC,mEAAgD,CAAA;IAChD,qEAAkD,CAAA;IAClD,8EAA2D,CAAA;AAC/D,CAAC,EARW,eAAe,+BAAf,eAAe,QAQ1B;AAED,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,mCAAkB,CAAA;IAClB,8BAA8B;AAClC,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OgPidContainer = void 0;
|
|
4
|
+
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
5
|
+
const V3InfotextsController_1 = require("../controllers/v3/V3InfotextsController");
|
|
6
|
+
const JISInfotextRepository_1 = require("../data-access/JISInfotextRepository");
|
|
7
|
+
const JISInfotextRopidGTFSStopsRepository_1 = require("../data-access/JISInfotextRopidGTFSStopsRepository");
|
|
8
|
+
const JISInfotextDepartureTransformation_1 = require("../service/transformations/JISInfotextDepartureTransformation");
|
|
9
|
+
const JISInfotextOverviewTransformation_1 = require("../service/transformations/JISInfotextOverviewTransformation");
|
|
10
|
+
const OgPidToken_1 = require("./OgPidToken");
|
|
11
|
+
const ogPidContainer = ioc_1.OutputGatewayContainer.createChildContainer();
|
|
12
|
+
exports.OgPidContainer = ogPidContainer;
|
|
13
|
+
//#region Repositories
|
|
14
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRopidGTFSStopsRepository, JISInfotextRopidGTFSStopsRepository_1.JISInfotextRopidGTFSStopsRepository);
|
|
15
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextRepository, JISInfotextRepository_1.JISInfotextRepository);
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region Transformations
|
|
18
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextDepartureTransformation, JISInfotextDepartureTransformation_1.JISInfotextDepartureTransformation);
|
|
19
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.JISInfotextOverviewTransformation, JISInfotextOverviewTransformation_1.JISInfotextOverviewTransformation);
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region Controllers
|
|
22
|
+
ogPidContainer.registerSingleton(OgPidToken_1.OgPidToken.V3InfotextsController, V3InfotextsController_1.V3InfotextsController);
|
|
23
|
+
//# sourceMappingURL=Di.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,+DAA+E;AAE/E,mFAAgF;AAChF,gFAA6E;AAC7E,4GAAyG;AACzG,sHAAmH;AACnH,oHAAiH;AACjH,6CAA0C;AAE1C,MAAM,cAAc,GAAwB,4BAAsB,CAAC,oBAAoB,EAAE,CAAC;AAgB/D,wCAAc;AAdzC,sBAAsB;AACtB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,mCAAmC,EAAE,yEAAmC,CAAC,CAAC;AACtH,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,qBAAqB,EAAE,6CAAqB,CAAC,CAAC;AAC1F,YAAY;AAEZ,yBAAyB;AACzB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,kCAAkC,EAAE,uEAAkC,CAAC,CAAC;AACpH,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,iCAAiC,EAAE,qEAAiC,CAAC,CAAC;AAClH,YAAY;AAEZ,qBAAqB;AACrB,cAAc,CAAC,iBAAiB,CAAC,uBAAU,CAAC,qBAAqB,EAAE,6CAAqB,CAAC,CAAC"}
|