@golemio/pid 2.13.6-dev.1313101349 → 2.13.6-dev.1313748965
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/02_pid_line_example_115.sql +148 -0
- package/db/migrations/postgresql/20240529165139-gtfs-index-optimization.js +53 -0
- package/db/migrations/postgresql/sqls/20240529165139-gtfs-index-optimization-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20240529165139-gtfs-index-optimization-up.sql +2 -0
- package/dist/helpers/PassengerTransferEnums.d.ts +20 -0
- package/dist/helpers/PassengerTransferEnums.js +26 -0
- package/dist/helpers/PassengerTransferEnums.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
- package/dist/output-gateway/departure-boards/DepartureBoardsRouter.d.ts +1 -0
- package/dist/output-gateway/departure-boards/DepartureBoardsRouter.js +9 -6
- package/dist/output-gateway/departure-boards/DepartureBoardsRouter.js.map +1 -1
- package/dist/output-gateway/pid/PIDRouter.d.ts +1 -0
- package/dist/output-gateway/pid/PIDRouter.js +9 -9
- package/dist/output-gateway/pid/PIDRouter.js.map +1 -1
- package/dist/output-gateway/public/controllers/v1/PublicGtfsController.d.ts +6 -0
- package/dist/output-gateway/public/controllers/v1/PublicGtfsController.js +44 -0
- package/dist/output-gateway/public/controllers/v1/PublicGtfsController.js.map +1 -0
- package/dist/output-gateway/public/controllers/v1/interfaces/PublicParamsInterfaces.d.ts +4 -0
- package/dist/output-gateway/public/domain/ITripScopeHandler.d.ts +7 -0
- package/dist/output-gateway/public/domain/{ITripScopeHandlerFactory.js → ITripScopeHandler.js} +1 -1
- package/dist/output-gateway/public/domain/ITripScopeHandler.js.map +1 -0
- package/dist/output-gateway/public/domain/PublicApiGtfsTripLookupInterfaces.d.ts +35 -0
- package/dist/output-gateway/public/domain/PublicApiGtfsTripLookupInterfaces.js +3 -0
- package/dist/output-gateway/public/domain/PublicApiGtfsTripLookupInterfaces.js.map +1 -0
- package/dist/output-gateway/public/ioc/Di.js +34 -8
- package/dist/output-gateway/public/ioc/Di.js.map +1 -1
- package/dist/output-gateway/public/ioc/OgModuleToken.d.ts +10 -0
- package/dist/output-gateway/public/ioc/OgModuleToken.js +14 -0
- package/dist/output-gateway/public/ioc/OgModuleToken.js.map +1 -1
- package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.d.ts +2 -1
- package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.js +8 -4
- package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.js.map +1 -1
- package/dist/output-gateway/public/routers/v1/PublicGtfsRouter.d.ts +11 -0
- package/dist/output-gateway/public/routers/v1/PublicGtfsRouter.js +27 -0
- package/dist/output-gateway/public/routers/v1/PublicGtfsRouter.js.map +1 -0
- package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.d.ts +2 -1
- package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.js +12 -4
- package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.d.ts +2 -2
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.d.ts +10 -0
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +50 -0
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.d.ts +11 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.js +43 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/GtfsTripScopeHandlerFactory.js.map +1 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/AbstractGtfsTripScopeHandler.d.ts +6 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/AbstractGtfsTripScopeHandler.js +7 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/AbstractGtfsTripScopeHandler.js.map +1 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/InfoTripScopeHandler.d.ts +9 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/InfoTripScopeHandler.js +35 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/InfoTripScopeHandler.js.map +1 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/ShapesTripScopeHandler.d.ts +9 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/ShapesTripScopeHandler.js +36 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.d.ts +9 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +38 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/VehicleDescriptorTripScopeHandler.d.ts +9 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +35 -0
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -0
- package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.d.ts +4 -5
- package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.js +6 -6
- package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/{AbstractTripScopeHandler.d.ts → AbstractDetailedTripScopeHandler.d.ts} +2 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/AbstractDetailedTripScopeHandler.js +7 -0
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/AbstractDetailedTripScopeHandler.js.map +1 -0
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.d.ts +2 -2
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +2 -2
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.d.ts +2 -2
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +2 -2
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.d.ts +2 -2
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +2 -2
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.d.ts +2 -2
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +2 -2
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.d.ts +15 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +35 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripShapesTransformation.d.ts +7 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripShapesTransformation.js +30 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripShapesTransformation.js.map +1 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation.d.ts +10 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation.js +33 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation.js.map +1 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicTripStopTimesTransformation.d.ts +8 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicTripStopTimesTransformation.js +46 -0
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicTripStopTimesTransformation.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/GTFSRouter.d.ts +2 -1
- package/dist/output-gateway/ropid-gtfs/GTFSRouter.js +30 -27
- package/dist/output-gateway/ropid-gtfs/GTFSRouter.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/data-access/GtfsTripScheduleRepository.d.ts +8 -0
- package/dist/output-gateway/ropid-gtfs/data-access/GtfsTripScheduleRepository.js +22 -0
- package/dist/output-gateway/ropid-gtfs/data-access/GtfsTripScheduleRepository.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +2 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.d.ts +9 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +93 -2
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.d.ts +1 -0
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js +27 -9
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.js +8 -2
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.d.ts +1 -1
- package/dist/schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto.d.ts +19 -0
- package/dist/schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto.js +3 -0
- package/dist/schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto.js.map +1 -0
- package/docs/implementation_documentation.md +10 -1
- package/docs/openapi-output.yaml +151 -13
- package/package.json +2 -2
- package/dist/output-gateway/public/domain/ITripScopeHandlerFactory.d.ts +0 -5
- package/dist/output-gateway/public/domain/ITripScopeHandlerFactory.js.map +0 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/AbstractTripScopeHandler.js +0 -7
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/AbstractTripScopeHandler.js.map +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
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.StopTimesGtfsTripScopeHandler = void 0;
|
|
16
|
+
const OgModuleToken_1 = require("../../../../ioc/OgModuleToken");
|
|
17
|
+
const PublicTripStopTimesTransformation_1 = require("../../../transformations/gtfs-trip-scopes/PublicTripStopTimesTransformation");
|
|
18
|
+
const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
|
|
19
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
20
|
+
const AbstractGtfsTripScopeHandler_1 = require("./AbstractGtfsTripScopeHandler");
|
|
21
|
+
let StopTimesGtfsTripScopeHandler = exports.StopTimesGtfsTripScopeHandler = class StopTimesGtfsTripScopeHandler extends AbstractGtfsTripScopeHandler_1.AbstractGtfsTripScopeHandler {
|
|
22
|
+
constructor(tripStopTimesTransformation) {
|
|
23
|
+
super();
|
|
24
|
+
this.tripStopTimesTransformation = tripStopTimesTransformation;
|
|
25
|
+
}
|
|
26
|
+
handle(output, gtfsTrip) {
|
|
27
|
+
var _a;
|
|
28
|
+
const stopTimes = this.tripStopTimesTransformation.transformArray((_a = gtfsTrip.stop_times) !== null && _a !== void 0 ? _a : []);
|
|
29
|
+
output.stop_times = (0, Geo_1.buildGeojsonFeatureCollection)(stopTimes);
|
|
30
|
+
return output;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.StopTimesGtfsTripScopeHandler = StopTimesGtfsTripScopeHandler = __decorate([
|
|
34
|
+
(0, tsyringe_1.injectable)(),
|
|
35
|
+
__param(0, (0, tsyringe_1.inject)(OgModuleToken_1.OgModuleToken.PublicGtfsTripStopTimesTransformation)),
|
|
36
|
+
__metadata("design:paramtypes", [PublicTripStopTimesTransformation_1.PublicGtfsTripStopTimesTransformation])
|
|
37
|
+
], StopTimesGtfsTripScopeHandler);
|
|
38
|
+
//# sourceMappingURL=StopTimesTripScopeHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iEAA6D;AAC7D,mIAA8I;AAE9I,+DAAsF;AACtF,iEAAwE;AACxE,iFAA8E;AAGvE,IAAM,6BAA6B,2CAAnC,MAAM,6BAA8B,SAAQ,2DAA4B;IAC3E,YAEY,2BAAkE;QAE1E,KAAK,EAAE,CAAC;QAFA,gCAA2B,GAA3B,2BAA2B,CAAuC;IAG9E,CAAC;IAEM,MAAM,CAAC,MAA0B,EAAE,QAAkC;;QACxE,MAAM,SAAS,GAAG,IAAI,CAAC,2BAA2B,CAAC,cAAc,CAAC,MAAA,QAAQ,CAAC,UAAU,mCAAI,EAAE,CAAC,CAAC;QAE7F,MAAM,CAAC,UAAU,GAAG,IAAA,mCAA6B,EAAC,SAAS,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;wCAdY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,qCAAqC,CAAC,CAAA;qCACvB,yEAAqC;GAHrE,6BAA6B,CAczC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPublicApiGtfsTrip } from "../../../../domain/PublicApiGtfsTripLookupInterfaces";
|
|
2
|
+
import { PublicGtfsVehicleDescriptorTransformation } from "../../../transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation";
|
|
3
|
+
import { ITripWithDefinedRouteDto } from "../../../../../../schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto";
|
|
4
|
+
import { AbstractGtfsTripScopeHandler } from "./AbstractGtfsTripScopeHandler";
|
|
5
|
+
export declare class VehicleDescriptorGtfsTripScopeHandler extends AbstractGtfsTripScopeHandler {
|
|
6
|
+
private vehicleDescriptorTransformation;
|
|
7
|
+
constructor(vehicleDescriptorTransformation: PublicGtfsVehicleDescriptorTransformation);
|
|
8
|
+
handle(output: IPublicApiGtfsTrip, gtfsTrip: ITripWithDefinedRouteDto): IPublicApiGtfsTrip;
|
|
9
|
+
}
|
|
@@ -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
|
+
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.VehicleDescriptorGtfsTripScopeHandler = void 0;
|
|
16
|
+
const OgModuleToken_1 = require("../../../../ioc/OgModuleToken");
|
|
17
|
+
const PublicGtfsVehicleDescriptorTransformation_1 = require("../../../transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation");
|
|
18
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
19
|
+
const AbstractGtfsTripScopeHandler_1 = require("./AbstractGtfsTripScopeHandler");
|
|
20
|
+
let VehicleDescriptorGtfsTripScopeHandler = exports.VehicleDescriptorGtfsTripScopeHandler = class VehicleDescriptorGtfsTripScopeHandler extends AbstractGtfsTripScopeHandler_1.AbstractGtfsTripScopeHandler {
|
|
21
|
+
constructor(vehicleDescriptorTransformation) {
|
|
22
|
+
super();
|
|
23
|
+
this.vehicleDescriptorTransformation = vehicleDescriptorTransformation;
|
|
24
|
+
}
|
|
25
|
+
handle(output, gtfsTrip) {
|
|
26
|
+
output.vehicle_descriptor = this.vehicleDescriptorTransformation.transformElement(gtfsTrip);
|
|
27
|
+
return output;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.VehicleDescriptorGtfsTripScopeHandler = VehicleDescriptorGtfsTripScopeHandler = __decorate([
|
|
31
|
+
(0, tsyringe_1.injectable)(),
|
|
32
|
+
__param(0, (0, tsyringe_1.inject)(OgModuleToken_1.OgModuleToken.PublicGtfsVehicleDescriptorTransformation)),
|
|
33
|
+
__metadata("design:paramtypes", [PublicGtfsVehicleDescriptorTransformation_1.PublicGtfsVehicleDescriptorTransformation])
|
|
34
|
+
], VehicleDescriptorGtfsTripScopeHandler);
|
|
35
|
+
//# sourceMappingURL=VehicleDescriptorTripScopeHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VehicleDescriptorTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/VehicleDescriptorTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iEAA6D;AAC7D,mJAA0J;AAE1J,iEAAwE;AACxE,iFAA8E;AAGvE,IAAM,qCAAqC,mDAA3C,MAAM,qCAAsC,SAAQ,2DAA4B;IACnF,YAEY,+BAA0E;QAElF,KAAK,EAAE,CAAC;QAFA,oCAA+B,GAA/B,+BAA+B,CAA2C;IAGtF,CAAC;IAEM,MAAM,CAAC,MAA0B,EAAE,QAAkC;QACxE,MAAM,CAAC,kBAAkB,GAAG,IAAI,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC5F,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;gDAZY,qCAAqC;IADjD,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,yCAAyC,CAAC,CAAA;qCACvB,qFAAyC;GAH7E,qCAAqC,CAYjD"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ITripScopeHandlerFactory } from "../../../domain/ITripScopeHandlerFactory";
|
|
2
1
|
import { DetailedTripScope } from "../../../routers/v1/helpers/DetailedTripScopeEnum";
|
|
3
|
-
import {
|
|
4
|
-
export declare class TripScopeHandlerFactory
|
|
2
|
+
import { AbstractDetailedTripScopeHandler } from "./strategy/AbstractDetailedTripScopeHandler";
|
|
3
|
+
export declare class TripScopeHandlerFactory {
|
|
5
4
|
private dictionary;
|
|
6
|
-
constructor(infoTripScopeHandler:
|
|
7
|
-
getStrategy(scope: DetailedTripScope):
|
|
5
|
+
constructor(infoTripScopeHandler: AbstractDetailedTripScopeHandler, stopTimesTripScopeHandler: AbstractDetailedTripScopeHandler, shapeTripScopeHandler: AbstractDetailedTripScopeHandler, vehicleDescriptorTripScopeHandler: AbstractDetailedTripScopeHandler);
|
|
6
|
+
getStrategy(scope: DetailedTripScope): AbstractDetailedTripScopeHandler;
|
|
8
7
|
}
|
|
@@ -17,7 +17,7 @@ const OgModuleToken_1 = require("../../../ioc/OgModuleToken");
|
|
|
17
17
|
const DetailedTripScopeEnum_1 = require("../../../routers/v1/helpers/DetailedTripScopeEnum");
|
|
18
18
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
19
19
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
20
|
-
const
|
|
20
|
+
const AbstractDetailedTripScopeHandler_1 = require("./strategy/AbstractDetailedTripScopeHandler");
|
|
21
21
|
let TripScopeHandlerFactory = exports.TripScopeHandlerFactory = class TripScopeHandlerFactory {
|
|
22
22
|
constructor(infoTripScopeHandler, stopTimesTripScopeHandler, shapeTripScopeHandler, vehicleDescriptorTripScopeHandler) {
|
|
23
23
|
this.dictionary = new Map();
|
|
@@ -30,7 +30,7 @@ let TripScopeHandlerFactory = exports.TripScopeHandlerFactory = class TripScopeH
|
|
|
30
30
|
if (this.dictionary.has(scope)) {
|
|
31
31
|
return this.dictionary.get(scope);
|
|
32
32
|
}
|
|
33
|
-
throw new golemio_errors_1.GeneralError("
|
|
33
|
+
throw new golemio_errors_1.GeneralError("Unknown detailed trip scope strategy", this.constructor.name, undefined, 500);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
exports.TripScopeHandlerFactory = TripScopeHandlerFactory = __decorate([
|
|
@@ -39,9 +39,9 @@ exports.TripScopeHandlerFactory = TripScopeHandlerFactory = __decorate([
|
|
|
39
39
|
__param(1, (0, tsyringe_1.inject)(OgModuleToken_1.OgModuleToken.StopTimesTripScopeHandler)),
|
|
40
40
|
__param(2, (0, tsyringe_1.inject)(OgModuleToken_1.OgModuleToken.ShapesTripScopeHandler)),
|
|
41
41
|
__param(3, (0, tsyringe_1.inject)(OgModuleToken_1.OgModuleToken.VehicleDescriptorTripScopeHandler)),
|
|
42
|
-
__metadata("design:paramtypes", [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
__metadata("design:paramtypes", [AbstractDetailedTripScopeHandler_1.AbstractDetailedTripScopeHandler,
|
|
43
|
+
AbstractDetailedTripScopeHandler_1.AbstractDetailedTripScopeHandler,
|
|
44
|
+
AbstractDetailedTripScopeHandler_1.AbstractDetailedTripScopeHandler,
|
|
45
|
+
AbstractDetailedTripScopeHandler_1.AbstractDetailedTripScopeHandler])
|
|
46
46
|
], TripScopeHandlerFactory);
|
|
47
47
|
//# sourceMappingURL=TripScopeHandlerFactory.js.map
|
package/dist/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TripScopeHandlerFactory.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"TripScopeHandlerFactory.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/helpers/trip-scope/TripScopeHandlerFactory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8DAA6D;AAC7D,6FAAwF;AACxF,6EAAwE;AACxE,iEAAwE;AACxE,kGAA+F;AAGxF,IAAM,uBAAuB,qCAA7B,MAAM,uBAAuB;IAGhC,YACgD,oBAAsD,EAElG,yBAA2D,EACb,qBAAuD,EAErG,iCAAmE;QAEnE,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAuD,CAAC;QACjF,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,yCAAiB,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;QAClE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,yCAAiB,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;QAC5E,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,yCAAiB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;QACrE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,yCAAiB,CAAC,iBAAiB,EAAE,iCAAiC,CAAC,CAAC;IAChG,CAAC;IAEM,WAAW,CAAC,KAAwB;QACvC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;YAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC;SACtC;QAED,MAAM,IAAI,6BAAY,CAAC,sCAAsC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;IAC1G,CAAC;CACJ,CAAA;kCAzBY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,oBAAoB,CAAC,CAAA;IAC1C,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,yBAAyB,CAAC,CAAA;IAE/C,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,sBAAsB,CAAC,CAAA;IAC5C,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,iCAAiC,CAAC,CAAA;qCAJU,mEAAgC;QAEvE,mEAAgC;QACU,mEAAgC;QAElE,mEAAgC;GAT9D,uBAAuB,CAyBnC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ITripScopeAsyncHandler } from "../../../../domain/ITripScopeHandler";
|
|
1
2
|
import { IPublicApiDetailedTrip } from "../../../../domain/PublicApiDetailedTripInterfaces";
|
|
2
3
|
import { IPublicApiCacheDto } from "../../../../../../schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto";
|
|
3
|
-
export declare abstract class
|
|
4
|
+
export declare abstract class AbstractDetailedTripScopeHandler implements ITripScopeAsyncHandler<IPublicApiDetailedTrip, IPublicApiCacheDto> {
|
|
4
5
|
abstract handle(output: IPublicApiDetailedTrip, vehiclePosition: IPublicApiCacheDto): Promise<IPublicApiDetailedTrip>;
|
|
5
6
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbstractDetailedTripScopeHandler = void 0;
|
|
4
|
+
class AbstractDetailedTripScopeHandler {
|
|
5
|
+
}
|
|
6
|
+
exports.AbstractDetailedTripScopeHandler = AbstractDetailedTripScopeHandler;
|
|
7
|
+
//# sourceMappingURL=AbstractDetailedTripScopeHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractDetailedTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/AbstractDetailedTripScopeHandler.ts"],"names":[],"mappings":";;;AAIA,MAAsB,gCAAgC;CAIrD;AAJD,4EAIC"}
|
package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IPublicApiDetailedTrip } from "../../../../domain/PublicApiDetailedTripInterfaces";
|
|
2
2
|
import { IPublicApiCacheDto } from "../../../../../../schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto";
|
|
3
|
-
import {
|
|
4
|
-
export declare class InfoTripScopeHandler extends
|
|
3
|
+
import { AbstractDetailedTripScopeHandler } from "./AbstractDetailedTripScopeHandler";
|
|
4
|
+
export declare class InfoTripScopeHandler extends AbstractDetailedTripScopeHandler {
|
|
5
5
|
private tripInfoTransformation;
|
|
6
6
|
constructor();
|
|
7
7
|
handle(output: IPublicApiDetailedTrip, vehiclePosition: IPublicApiCacheDto): Promise<IPublicApiDetailedTrip>;
|
package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js
CHANGED
|
@@ -21,8 +21,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
exports.InfoTripScopeHandler = void 0;
|
|
22
22
|
const PublicVPTripInfoTransformation_1 = require("../../../transformations/scopes/PublicVPTripInfoTransformation");
|
|
23
23
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
24
|
-
const
|
|
25
|
-
let InfoTripScopeHandler = exports.InfoTripScopeHandler = class InfoTripScopeHandler extends
|
|
24
|
+
const AbstractDetailedTripScopeHandler_1 = require("./AbstractDetailedTripScopeHandler");
|
|
25
|
+
let InfoTripScopeHandler = exports.InfoTripScopeHandler = class InfoTripScopeHandler extends AbstractDetailedTripScopeHandler_1.AbstractDetailedTripScopeHandler {
|
|
26
26
|
constructor() {
|
|
27
27
|
super();
|
|
28
28
|
this.tripInfoTransformation = new PublicVPTripInfoTransformation_1.PublicVPTripInfoTransformation();
|
package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,mHAA0H;AAE1H,iEAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"InfoTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,mHAA0H;AAE1H,iEAAgE;AAChE,yFAAsF;AAG/E,IAAM,oBAAoB,kCAA1B,MAAM,oBAAqB,SAAQ,mEAAgC;IAGtE;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,sBAAsB,GAAG,IAAI,+DAA8B,EAAE,CAAC;IACvE,CAAC;IAEY,MAAM,CAAC,MAA8B,EAAE,eAAmC;;YACnF,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;YACvE,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;CACJ,CAAA;+BAZY,oBAAoB;IADhC,IAAA,qBAAU,GAAE;;GACA,oBAAoB,CAYhC"}
|
package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { IPublicApiDetailedTrip } from "../../../../domain/PublicApiDetailedTrip
|
|
|
2
2
|
import { IDelayComputationRepository } from "../../../../domain/repository/IDelayComputationRepository";
|
|
3
3
|
import { GTFSShapesModel } from "../../../../../ropid-gtfs/models/GTFSShapesModel";
|
|
4
4
|
import { IPublicApiCacheDto } from "../../../../../../schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto";
|
|
5
|
-
import {
|
|
6
|
-
export declare class ShapesTripScopeHandler extends
|
|
5
|
+
import { AbstractDetailedTripScopeHandler } from "./AbstractDetailedTripScopeHandler";
|
|
6
|
+
export declare class ShapesTripScopeHandler extends AbstractDetailedTripScopeHandler {
|
|
7
7
|
private delayComputationRepository;
|
|
8
8
|
private tripShapesTransformation;
|
|
9
9
|
protected shapeModel: GTFSShapesModel;
|
package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js
CHANGED
|
@@ -28,8 +28,8 @@ const models_1 = require("../../../../../ropid-gtfs/models");
|
|
|
28
28
|
const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
|
|
29
29
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
30
30
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
31
|
-
const
|
|
32
|
-
let ShapesTripScopeHandler = exports.ShapesTripScopeHandler = class ShapesTripScopeHandler extends
|
|
31
|
+
const AbstractDetailedTripScopeHandler_1 = require("./AbstractDetailedTripScopeHandler");
|
|
32
|
+
let ShapesTripScopeHandler = exports.ShapesTripScopeHandler = class ShapesTripScopeHandler extends AbstractDetailedTripScopeHandler_1.AbstractDetailedTripScopeHandler {
|
|
33
33
|
constructor(delayComputationRepository) {
|
|
34
34
|
super();
|
|
35
35
|
this.delayComputationRepository = delayComputationRepository;
|
package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShapesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,iEAA6D;AAC7D,uHAA8H;AAC9H,6DAA+C;AAG/C,+DAAsF;AACtF,6EAAwE;AACxE,iEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"ShapesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,iEAA6D;AAC7D,uHAA8H;AAC9H,6DAA+C;AAG/C,+DAAsF;AACtF,6EAAwE;AACxE,iEAAwE;AACxE,yFAAsF;AAG/E,IAAM,sBAAsB,oCAA5B,MAAM,sBAAuB,SAAQ,mEAAgC;IAIxE,YAC8D,0BAAuD;QAEjH,KAAK,EAAE,CAAC;QAFkD,+BAA0B,GAA1B,0BAA0B,CAA6B;QAGjH,IAAI,CAAC,wBAAwB,GAAG,IAAI,mEAAgC,EAAE,CAAC;QACvE,IAAI,CAAC,UAAU,GAAG,eAAM,CAAC,eAAe,CAAC;IAC7C,CAAC;IAEY,MAAM,CAAC,MAA8B,EAAE,eAAmC;;YACnF,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,wBAAwB,CACxF,eAAe,CAAC,YAAY,CAC/B,CAAC;YAEF,IAAI,CAAC,qBAAqB,EAAE;gBACxB,MAAM,IAAI,6BAAY,CAAC,mCAAmC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;aACtG;YAED,MAAM,CAAC,MAAM,GAAG,IAAA,mCAA6B,EACzC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CACjH,CAAC;YAEF,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;CACJ,CAAA;iCA3BY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,0BAA0B,CAAC,CAAA;;GAL5C,sBAAsB,CA2BlC"}
|
|
@@ -2,8 +2,8 @@ import { IPublicApiDetailedTrip } from "../../../../domain/PublicApiDetailedTrip
|
|
|
2
2
|
import { IDelayComputationRepository } from "../../../../domain/repository/IDelayComputationRepository";
|
|
3
3
|
import { IStopTimeRepository } from "../../../../domain/repository/IStopTimeRepository";
|
|
4
4
|
import { IPublicApiCacheDto } from "../../../../../../schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto";
|
|
5
|
-
import {
|
|
6
|
-
export declare class StopTimesTripScopeHandler extends
|
|
5
|
+
import { AbstractDetailedTripScopeHandler } from "./AbstractDetailedTripScopeHandler";
|
|
6
|
+
export declare class StopTimesTripScopeHandler extends AbstractDetailedTripScopeHandler {
|
|
7
7
|
private delayComputationRepository;
|
|
8
8
|
private stopTimeRepository;
|
|
9
9
|
private tripStopTimesTransformation;
|
package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js
CHANGED
|
@@ -28,8 +28,8 @@ const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
|
|
|
28
28
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
29
29
|
const luxon_1 = require("@golemio/core/dist/shared/luxon");
|
|
30
30
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
31
|
-
const
|
|
32
|
-
let StopTimesTripScopeHandler = exports.StopTimesTripScopeHandler = class StopTimesTripScopeHandler extends
|
|
31
|
+
const AbstractDetailedTripScopeHandler_1 = require("./AbstractDetailedTripScopeHandler");
|
|
32
|
+
let StopTimesTripScopeHandler = exports.StopTimesTripScopeHandler = class StopTimesTripScopeHandler extends AbstractDetailedTripScopeHandler_1.AbstractDetailedTripScopeHandler {
|
|
33
33
|
constructor(delayComputationRepository, stopTimeRepository) {
|
|
34
34
|
super();
|
|
35
35
|
this.delayComputationRepository = delayComputationRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAMA,iEAA6D;AAC7D,6HAAoI;AAGpI,+DAAsF;AAEtF,6EAAwE;AACxE,2DAA2D;AAC3D,iEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"StopTimesTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAMA,iEAA6D;AAC7D,6HAAoI;AAGpI,+DAAsF;AAEtF,6EAAwE;AACxE,2DAA2D;AAC3D,iEAAwE;AACxE,yFAAsF;AAG/E,IAAM,yBAAyB,uCAA/B,MAAM,yBAA0B,SAAQ,mEAAgC;IAG3E,YAC8D,0BAAuD,EACzD,kBAAuC;QAE/F,KAAK,EAAE,CAAC;QAHkD,+BAA0B,GAA1B,0BAA0B,CAA6B;QACzD,uBAAkB,GAAlB,kBAAkB,CAAqB;QAG/F,IAAI,CAAC,2BAA2B,GAAG,IAAI,yEAAmC,EAAE,CAAC;IACjF,CAAC;IAEY,MAAM,CAAC,MAA8B,EAAE,eAAmC;;YACnF,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,wBAAwB,CACxF,eAAe,CAAC,YAAY,CAC/B,CAAC;YAEF,IAAI,CAAC,qBAAqB,EAAE;gBACxB,MAAM,IAAI,6BAAY,CAAC,mCAAmC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;aACtG;YAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;YACvF,MAAM,SAAS,GAAG,IAAI,CAAC,2BAA2B,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;YAErF,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,sBAAsB,CAC3E,eAAe,CAAC,UAAU,EAC1B,eAAe,CAAC,YAAY,CAC/B,CAAC;YACF,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC/B,KAAK,MAAM,iBAAiB,IAAI,kBAAkB,EAAE;oBAChD,MAAM,QAAQ,GAAG,SAAS,CAAC,iBAAiB,CAAC,QAAQ,GAAG,CAAC,CAGxD,CAAC;oBAEF,IAAI,QAAQ,EAAE;wBACV,kGAAkG;wBAClG,MAAM,aAAa,GACf,iBAAiB,CAAC,SAAS,KAAK,IAAI;4BAChC,CAAC,CAAC,IAAI;4BACN,CAAC,CAAC,gBAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC;iCAC5D,IAAI,CAAC,EAAE,OAAO,EAAE,iBAAiB,CAAC,SAAS,EAAE,CAAC;iCAC9C,QAAQ,CAAC,UAAU,CAAC,CAAC;wBAEpC,MAAM,eAAe,GACjB,iBAAiB,CAAC,SAAS,KAAK,IAAI;4BAChC,CAAC,CAAC,IAAI;4BACN,CAAC,CAAC,gBAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC;iCAC9D,IAAI,CAAC,EAAE,OAAO,EAAE,iBAAiB,CAAC,SAAS,EAAE,CAAC;iCAC9C,QAAQ,CAAC,UAAU,CAAC,CAAC;wBAEpC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,GAAG,aAAa,CAAC;wBAC1D,QAAQ,CAAC,UAAU,CAAC,uBAAuB,GAAG,eAAe,CAAC;qBACjE;iBACJ;aACJ;YAED,MAAM,CAAC,UAAU,GAAG,IAAA,mCAA6B,EAAC,SAAS,CAAC,CAAC;YAC7D,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;IAEO,qBAAqB,CAAC,SAAsB;QAChD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAmB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACpF,CAAC;CACJ,CAAA;oCA/DY,yBAAyB;IADrC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,0BAA0B,CAAC,CAAA;IAChD,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,wBAAwB,CAAC,CAAA;;GAL1C,yBAAyB,CA+DrC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VehicleDescriptorCachedRepository } from "../../../../data-access/VehicleDescriptorCachedRepository";
|
|
2
2
|
import { IPublicApiDetailedTrip } from "../../../../domain/PublicApiDetailedTripInterfaces";
|
|
3
3
|
import { IPublicApiCacheDto } from "../../../../../../schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto";
|
|
4
|
-
import {
|
|
5
|
-
export declare class VehicleDescriptorTripScopeHandler extends
|
|
4
|
+
import { AbstractDetailedTripScopeHandler } from "./AbstractDetailedTripScopeHandler";
|
|
5
|
+
export declare class VehicleDescriptorTripScopeHandler extends AbstractDetailedTripScopeHandler {
|
|
6
6
|
private vehicleDescriptorRepository;
|
|
7
7
|
private vehicleDescriptorTransformation;
|
|
8
8
|
constructor(vehicleDescriptorRepository: VehicleDescriptorCachedRepository);
|
|
@@ -26,8 +26,8 @@ const VehicleDescriptorCachedRepository_1 = require("../../../../data-access/Veh
|
|
|
26
26
|
const OgModuleToken_1 = require("../../../../ioc/OgModuleToken");
|
|
27
27
|
const PublicVPVehicleDescriptorTransformation_1 = require("../../../transformations/scopes/PublicVPVehicleDescriptorTransformation");
|
|
28
28
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
29
|
-
const
|
|
30
|
-
let VehicleDescriptorTripScopeHandler = exports.VehicleDescriptorTripScopeHandler = class VehicleDescriptorTripScopeHandler extends
|
|
29
|
+
const AbstractDetailedTripScopeHandler_1 = require("./AbstractDetailedTripScopeHandler");
|
|
30
|
+
let VehicleDescriptorTripScopeHandler = exports.VehicleDescriptorTripScopeHandler = class VehicleDescriptorTripScopeHandler extends AbstractDetailedTripScopeHandler_1.AbstractDetailedTripScopeHandler {
|
|
31
31
|
constructor(vehicleDescriptorRepository) {
|
|
32
32
|
super();
|
|
33
33
|
this.vehicleDescriptorRepository = vehicleDescriptorRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleDescriptorTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,iHAA6G;AAE7G,iEAA6D;AAC7D,qIAA4I;AAE5I,iEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"VehicleDescriptorTripScopeHandler.js","sourceRoot":"","sources":["../../../../../../../src/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,iHAA6G;AAE7G,iEAA6D;AAC7D,qIAA4I;AAE5I,iEAAwE;AACxE,yFAAsF;AAG/E,IAAM,iCAAiC,+CAAvC,MAAM,iCAAkC,SAAQ,mEAAgC;IAGnF,YAEY,2BAA8D;QAEtE,KAAK,EAAE,CAAC;QAFA,gCAA2B,GAA3B,2BAA2B,CAAmC;QAGtE,IAAI,CAAC,+BAA+B,GAAG,IAAI,iFAAuC,EAAE,CAAC;IACzF,CAAC;IAEY,MAAM,CAAC,MAA8B,EAAE,eAAmC;;YACnF,MAAM,CAAC,kBAAkB,GAAG,IAAI,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;YAEnG,MAAM,kBAAkB,GAAG,eAAe,CAAC,aAAa,CAAC,mBAAmB,CAAC;YAC7E,IAAI,kBAAkB,EAAE;gBACpB,MAAM,SAAS,GAAG,eAAe,CAAC,UAAU,CAAC;gBAC7C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,iBAAiB,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;gBAE3G,IAAI,CAAC,UAAU,EAAE;oBACb,OAAO,MAAM,CAAC;iBACjB;gBAED,MAAM,CAAC,kBAAkB,mCAClB,MAAM,CAAC,kBAAkB,KAC5B,YAAY,EAAE,GAAG,UAAU,CAAC,YAAY,IAAI,UAAU,CAAC,IAAI,EAAE,EAC7D,kBAAkB,EAAE,UAAU,CAAC,kBAAkB,EACjD,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,GAChD,CAAC;aACL;YAED,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;CACJ,CAAA;4CAjCY,iCAAiC;IAD7C,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6BAAa,CAAC,iCAAiC,CAAC,CAAA;qCACnB,qEAAiC;GALjE,iCAAiC,CAiC7C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IPublicApiGtfsTripScopeInfo } from "../../../domain/PublicApiGtfsTripLookupInterfaces";
|
|
2
|
+
import { ITripWithDefinedRouteDto } from "../../../../../schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto";
|
|
3
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
4
|
+
export declare class PublicGtfsTripInfoTransformation extends AbstractTransformation<ITripWithDefinedRouteDto, IPublicApiGtfsTripScopeInfo> {
|
|
5
|
+
name: string;
|
|
6
|
+
protected transformInternal: (gtfsTrip: ITripWithDefinedRouteDto) => {
|
|
7
|
+
gtfs_trip_id: string;
|
|
8
|
+
route_type: string;
|
|
9
|
+
route_short_name: string;
|
|
10
|
+
shape_id: string;
|
|
11
|
+
origin_route_name: string;
|
|
12
|
+
run_number: number | null;
|
|
13
|
+
trip_headsign: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -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.PublicGtfsTripInfoTransformation = void 0;
|
|
10
|
+
const RouteTypeEnums_1 = require("../../../../../helpers/RouteTypeEnums");
|
|
11
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
12
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
13
|
+
let PublicGtfsTripInfoTransformation = exports.PublicGtfsTripInfoTransformation = class PublicGtfsTripInfoTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.name = "GtfsTripInfoTransformation";
|
|
17
|
+
this.transformInternal = (gtfsTrip) => {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
const routeType = gtfsTrip.route.route_type;
|
|
20
|
+
return {
|
|
21
|
+
gtfs_trip_id: gtfsTrip.trip_id,
|
|
22
|
+
route_type: ((_a = RouteTypeEnums_1.GTFSRouteTypeEnum[routeType !== null && routeType !== void 0 ? routeType : 1700]) !== null && _a !== void 0 ? _a : RouteTypeEnums_1.GTFSRouteTypeEnum[1700]).toLowerCase(),
|
|
23
|
+
route_short_name: gtfsTrip.route.route_short_name,
|
|
24
|
+
shape_id: gtfsTrip.shape_id,
|
|
25
|
+
origin_route_name: gtfsTrip.route.route_id.substring(1),
|
|
26
|
+
run_number: (_c = (_b = gtfsTrip.schedule) === null || _b === void 0 ? void 0 : _b.run_number) !== null && _c !== void 0 ? _c : null,
|
|
27
|
+
trip_headsign: gtfsTrip.trip_headsign,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.PublicGtfsTripInfoTransformation = PublicGtfsTripInfoTransformation = __decorate([
|
|
33
|
+
(0, tsyringe_1.injectable)()
|
|
34
|
+
], PublicGtfsTripInfoTransformation);
|
|
35
|
+
//# sourceMappingURL=PublicGtfsTripInfoTransformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublicGtfsTripInfoTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0EAA4D;AAG5D,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,gCAAgC,8CAAtC,MAAM,gCAAiC,SAAQ,+CAGrD;IAHM;;QAII,SAAI,GAAG,4BAA4B,CAAC;QAEjC,sBAAiB,GAAG,CAAC,QAAkC,EAAE,EAAE;;YACjE,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC;YAC5C,OAAO;gBACH,YAAY,EAAE,QAAQ,CAAC,OAAO;gBAC9B,UAAU,EAAE,CAAC,MAAA,kCAAiB,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,CAAC,mCAAI,kCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;gBAC3F,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,gBAAgB;gBACjD,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,iBAAiB,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;gBACvD,UAAU,EAAE,MAAA,MAAA,QAAQ,CAAC,QAAQ,0CAAE,UAAU,mCAAI,IAAI;gBACjD,aAAa,EAAE,QAAQ,CAAC,aAAa;aACxC,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;2CAlBY,gCAAgC;IAD5C,IAAA,qBAAU,GAAE;GACA,gCAAgC,CAkB5C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IShapeDto } from "../../../../../schema-definitions/ropid-gtfs/interfaces/IShapeDto";
|
|
2
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
3
|
+
import { IGeoJSONFeature } from "@golemio/core/dist/output-gateway";
|
|
4
|
+
export declare class PublicGtfsTripShapesTransformation extends AbstractTransformation<IShapeDto, IGeoJSONFeature> {
|
|
5
|
+
name: string;
|
|
6
|
+
protected transformInternal: (shape: IShapeDto) => IGeoJSONFeature;
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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.PublicGtfsTripShapesTransformation = void 0;
|
|
10
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
11
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
12
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
13
|
+
let PublicGtfsTripShapesTransformation = exports.PublicGtfsTripShapesTransformation = class PublicGtfsTripShapesTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.name = "GtfsTripShapesTransformation";
|
|
17
|
+
this.transformInternal = (shape) => {
|
|
18
|
+
const properties = {
|
|
19
|
+
shape_dist_traveled: shape.shape_dist_traveled,
|
|
20
|
+
lng: shape.shape_pt_lon,
|
|
21
|
+
lat: shape.shape_pt_lat,
|
|
22
|
+
};
|
|
23
|
+
return (0, output_gateway_1.buildGeojsonFeature)(properties, "lng", "lat", true);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.PublicGtfsTripShapesTransformation = PublicGtfsTripShapesTransformation = __decorate([
|
|
28
|
+
(0, tsyringe_1.injectable)()
|
|
29
|
+
], PublicGtfsTripShapesTransformation);
|
|
30
|
+
//# sourceMappingURL=PublicGtfsTripShapesTransformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublicGtfsTripShapesTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripShapesTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,6GAA0G;AAC1G,sEAAyF;AACzF,iEAAgE;AAGzD,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,+CAAkD;IAAnG;;QACI,SAAI,GAAG,8BAA8B,CAAC;QAEnC,sBAAiB,GAAG,CAAC,KAAgB,EAAE,EAAE;YAC/C,MAAM,UAAU,GAA0E;gBACtF,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;gBAC9C,GAAG,EAAE,KAAK,CAAC,YAAY;gBACvB,GAAG,EAAE,KAAK,CAAC,YAAY;aAC1B,CAAC;YAEF,OAAO,IAAA,oCAAmB,EAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;6CAZY,kCAAkC;IAD9C,IAAA,qBAAU,GAAE;GACA,kCAAkC,CAY9C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IPublicApiGtfsTripScopeDescriptor } from "../../../domain/PublicApiGtfsTripLookupInterfaces";
|
|
2
|
+
import { ITripWithOptionalAssociationsDto } from "../../../../../schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto";
|
|
3
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
4
|
+
export declare class PublicGtfsVehicleDescriptorTransformation extends AbstractTransformation<ITripWithOptionalAssociationsDto, IPublicApiGtfsTripScopeDescriptor> {
|
|
5
|
+
name: string;
|
|
6
|
+
protected transformInternal: (gtfsTrip: ITripWithOptionalAssociationsDto) => {
|
|
7
|
+
is_wheelchair_accessible: boolean | null;
|
|
8
|
+
};
|
|
9
|
+
private isVehicleWheelchairAccessible;
|
|
10
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.PublicGtfsVehicleDescriptorTransformation = void 0;
|
|
10
|
+
const AccessibilityEnums_1 = require("../../../../../helpers/AccessibilityEnums");
|
|
11
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
12
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
13
|
+
let PublicGtfsVehicleDescriptorTransformation = exports.PublicGtfsVehicleDescriptorTransformation = class PublicGtfsVehicleDescriptorTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.name = "GtfsVehicleDescriptorTransformation";
|
|
17
|
+
this.transformInternal = (gtfsTrip) => {
|
|
18
|
+
return {
|
|
19
|
+
is_wheelchair_accessible: this.isVehicleWheelchairAccessible(gtfsTrip),
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
this.isVehicleWheelchairAccessible = ({ wheelchair_accessible }) => {
|
|
23
|
+
if (wheelchair_accessible === null || wheelchair_accessible === AccessibilityEnums_1.GtfsTripWheelchairAccessEnum.NoInformation) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return wheelchair_accessible === AccessibilityEnums_1.GtfsTripWheelchairAccessEnum.AccessibleVehicle;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.PublicGtfsVehicleDescriptorTransformation = PublicGtfsVehicleDescriptorTransformation = __decorate([
|
|
31
|
+
(0, tsyringe_1.injectable)()
|
|
32
|
+
], PublicGtfsVehicleDescriptorTransformation);
|
|
33
|
+
//# sourceMappingURL=PublicGtfsVehicleDescriptorTransformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublicGtfsVehicleDescriptorTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsVehicleDescriptorTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kFAA2E;AAG3E,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,yCAAyC,uDAA/C,MAAM,yCAA0C,SAAQ,+CAG9D;IAHM;;QAII,SAAI,GAAG,qCAAqC,CAAC;QAE1C,sBAAiB,GAAG,CAAC,QAA0C,EAAE,EAAE;YACzE,OAAO;gBACH,wBAAwB,EAAE,IAAI,CAAC,6BAA6B,CAAC,QAAQ,CAAC;aACzE,CAAC;QACN,CAAC,CAAC;QAEM,kCAA6B,GAAG,CAAC,EAAE,qBAAqB,EAAoC,EAAkB,EAAE;YACpH,IAAI,qBAAqB,KAAK,IAAI,IAAI,qBAAqB,KAAK,iDAA4B,CAAC,aAAa,EAAE;gBACxG,OAAO,IAAI,CAAC;aACf;YAED,OAAO,qBAAqB,KAAK,iDAA4B,CAAC,iBAAiB,CAAC;QACpF,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;oDAnBY,yCAAyC;IADrD,IAAA,qBAAU,GAAE;GACA,yCAAyC,CAmBrD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IStopTimeWithStopDto } from "../../../../../schema-definitions/ropid-gtfs/interfaces/ITripWithOptionalAssociationsDto";
|
|
2
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
3
|
+
import { IGeoJSONFeature } from "@golemio/core/dist/output-gateway";
|
|
4
|
+
export declare class PublicGtfsTripStopTimesTransformation extends AbstractTransformation<IStopTimeWithStopDto, IGeoJSONFeature> {
|
|
5
|
+
name: string;
|
|
6
|
+
protected transformInternal: (stopTime: IStopTimeWithStopDto) => IGeoJSONFeature;
|
|
7
|
+
private isStopWheelchairAccessible;
|
|
8
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.PublicGtfsTripStopTimesTransformation = void 0;
|
|
10
|
+
const AccessibilityEnums_1 = require("../../../../../helpers/AccessibilityEnums");
|
|
11
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
12
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
13
|
+
const luxon_1 = require("@golemio/core/dist/shared/luxon");
|
|
14
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
15
|
+
let PublicGtfsTripStopTimesTransformation = exports.PublicGtfsTripStopTimesTransformation = class PublicGtfsTripStopTimesTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.name = "GtfsTripStopTimesTransformation";
|
|
19
|
+
this.transformInternal = (stopTime) => {
|
|
20
|
+
const stop = stopTime.stop;
|
|
21
|
+
const startDateTime = luxon_1.DateTime.now().startOf("day");
|
|
22
|
+
const properties = {
|
|
23
|
+
stop_name: stop.stop_name,
|
|
24
|
+
stop_sequence: stopTime.stop_sequence,
|
|
25
|
+
zone_id: stop.zone_id,
|
|
26
|
+
is_wheelchair_accessible: this.isStopWheelchairAccessible(stop),
|
|
27
|
+
shape_dist_traveled: stopTime.shape_dist_traveled,
|
|
28
|
+
arrival_time: startDateTime.plus({ seconds: stopTime.arrival_time_seconds }).toFormat("HH:mm:ss"),
|
|
29
|
+
departure_time: startDateTime.plus({ seconds: stopTime.departure_time_seconds }).toFormat("HH:mm:ss"),
|
|
30
|
+
lng: stop.stop_lon,
|
|
31
|
+
lat: stop.stop_lat,
|
|
32
|
+
};
|
|
33
|
+
return (0, output_gateway_1.buildGeojsonFeature)(properties, "lng", "lat", true);
|
|
34
|
+
};
|
|
35
|
+
this.isStopWheelchairAccessible = ({ wheelchair_boarding }) => {
|
|
36
|
+
if (wheelchair_boarding === null || wheelchair_boarding === AccessibilityEnums_1.GtfsStopWheelchairBoardingEnum.NoInformation) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return wheelchair_boarding === AccessibilityEnums_1.GtfsStopWheelchairBoardingEnum.AccessibleStation;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.PublicGtfsTripStopTimesTransformation = PublicGtfsTripStopTimesTransformation = __decorate([
|
|
44
|
+
(0, tsyringe_1.injectable)()
|
|
45
|
+
], PublicGtfsTripStopTimesTransformation);
|
|
46
|
+
//# sourceMappingURL=PublicTripStopTimesTransformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublicTripStopTimesTransformation.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicTripStopTimesTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kFAA6E;AAI7E,6GAA0G;AAC1G,sEAAyF;AACzF,2DAA2D;AAC3D,iEAAgE;AAGzD,IAAM,qCAAqC,mDAA3C,MAAM,qCAAsC,SAAQ,+CAA6D;IAAjH;;QACI,SAAI,GAAG,iCAAiC,CAAC;QAEtC,sBAAiB,GAAG,CAAC,QAA8B,EAAE,EAAE;YAC7D,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;YAE3B,MAAM,aAAa,GAAG,gBAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpD,MAAM,UAAU,GAAyE;gBACrF,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,wBAAwB,EAAE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC;gBAC/D,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;gBACjD,YAAY,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;gBACjG,cAAc,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,sBAAsB,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;gBACrG,GAAG,EAAE,IAAI,CAAC,QAAQ;gBAClB,GAAG,EAAE,IAAI,CAAC,QAAQ;aACrB,CAAC;YAEF,OAAO,IAAA,oCAAmB,EAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC;QAEM,+BAA0B,GAAG,CAAC,EAAE,mBAAmB,EAAS,EAAkB,EAAE;YACpF,IAAI,mBAAmB,KAAK,IAAI,IAAI,mBAAmB,KAAK,mDAA8B,CAAC,aAAa,EAAE;gBACtG,OAAO,IAAI,CAAC;aACf;YAED,OAAO,mBAAmB,KAAK,mDAA8B,CAAC,iBAAiB,CAAC;QACpF,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;gDA7BY,qCAAqC;IADjD,IAAA,qBAAU,GAAE;GACA,qCAAqC,CA6BjD"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Handles web logic (http request, response). Sets response headers, handles error responses.
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="express" />
|
|
8
|
-
import { NextFunction, Request, Response, Router } from "@golemio/core/dist/shared/express";
|
|
9
8
|
import { BaseRouter } from "@golemio/core/dist/output-gateway/routes/BaseRouter";
|
|
9
|
+
import { NextFunction, Request, Response, Router } from "@golemio/core/dist/shared/express";
|
|
10
10
|
import { GTFSCalendarModel } from "./models/GTFSCalendarModel";
|
|
11
11
|
import { GTFSRoutesModel } from "./models/GTFSRoutesModel";
|
|
12
12
|
import { GTFSShapesModel } from "./models/GTFSShapesModel";
|
|
@@ -15,6 +15,7 @@ import { GTFSStopTimesModel } from "./models/GTFSStopTimesModel";
|
|
|
15
15
|
import { GTFSTripsModel } from "./models/GTFSTripsModel";
|
|
16
16
|
export declare class GTFSRouter extends BaseRouter {
|
|
17
17
|
router: Router;
|
|
18
|
+
private cacheHeaderMiddleware;
|
|
18
19
|
protected tripModel: GTFSTripsModel;
|
|
19
20
|
protected serviceModel: GTFSCalendarModel;
|
|
20
21
|
protected stopModel: GTFSStopModel;
|