@golemio/pid 4.1.4-dev.2059844632 → 4.1.4-dev.2065400061
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/dist/helpers/GtfsStopParser.d.ts +6 -6
- package/dist/helpers/GtfsStopParser.js +16 -25
- package/dist/helpers/GtfsStopParser.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.d.ts +1 -3
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +4 -7
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js +0 -2
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +0 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +0 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.d.ts +1 -3
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js +3 -9
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.d.ts +2 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +24 -5
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.d.ts +3 -4
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js +36 -36
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.d.ts +2 -0
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +3 -0
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
- package/dist/output-gateway/pid/helpers/TransferBoardFilter.d.ts +1 -1
- package/dist/output-gateway/pid/helpers/TransferBoardFilter.js +15 -10
- package/dist/output-gateway/pid/helpers/TransferBoardFilter.js.map +1 -1
- package/dist/output-gateway/pid/index.d.ts +6 -0
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.js +0 -2
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +0 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.js +0 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
- package/dist/output-gateway/pid/models/index.d.ts +0 -3
- package/dist/output-gateway/pid/models/index.js +0 -3
- package/dist/output-gateway/pid/models/index.js.map +1 -1
- package/dist/output-gateway/pid/routers/v2/V2PIDRouter.d.ts +0 -2
- package/dist/output-gateway/pid/routers/v2/V2PIDRouter.js +0 -8
- package/dist/output-gateway/pid/routers/v2/V2PIDRouter.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +0 -1
- package/dist/output-gateway/pid/service/facade/StopFacade.js +2 -3
- package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.d.ts +0 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +2 -4
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopDto.d.ts +2 -1
- package/docs/implementation_documentation.md +0 -5
- package/docs/openapi-output.yaml +1 -76
- package/package.json +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.d.ts +0 -7
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +0 -27
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +0 -1
- package/dist/output-gateway/pid/models/RopidVYMIEventsModel.d.ts +0 -9
- package/dist/output-gateway/pid/models/RopidVYMIEventsModel.js +0 -24
- package/dist/output-gateway/pid/models/RopidVYMIEventsModel.js.map +0 -1
- package/dist/output-gateway/pid/models/RopidVYMIEventsRoutesModel.d.ts +0 -9
- package/dist/output-gateway/pid/models/RopidVYMIEventsRoutesModel.js +0 -22
- package/dist/output-gateway/pid/models/RopidVYMIEventsRoutesModel.js.map +0 -1
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.d.ts +0 -44
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +0 -137
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { WhereOptions } from "@golemio/core/dist/shared/sequelize";
|
|
2
2
|
export declare class GtfsStopParser {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
private validateAswId;
|
|
6
|
-
private parseAswId;
|
|
7
|
-
getAswNodeFromId(aswId: string): string;
|
|
8
|
-
normalizedStopId(stopId: string): string;
|
|
3
|
+
private static isValidInteger;
|
|
4
|
+
static prepareAswWhereOptions(aswIds: string[]): WhereOptions[];
|
|
5
|
+
private static validateAswId;
|
|
6
|
+
private static parseAswId;
|
|
7
|
+
static getAswNodeFromId(aswId: string): string;
|
|
8
|
+
static normalizedStopId(stopId: string): string;
|
|
9
9
|
}
|
|
@@ -1,53 +1,44 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
3
|
exports.GtfsStopParser = void 0;
|
|
10
4
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
11
5
|
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
12
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
13
6
|
const const_1 = require("../const");
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
class GtfsStopParser {
|
|
8
|
+
static isValidInteger(value) {
|
|
9
|
+
return value >= const_1.PG_INT_MIN && value <= const_1.PG_INT_MAX;
|
|
10
|
+
}
|
|
11
|
+
static prepareAswWhereOptions(aswIds) {
|
|
16
12
|
let aswWhereOptions = [];
|
|
17
13
|
for (const aswId of aswIds) {
|
|
18
|
-
const { aswNode, aswStopId } =
|
|
14
|
+
const { aswNode, aswStopId } = GtfsStopParser.parseAswId(aswId);
|
|
19
15
|
if (!aswNode) {
|
|
20
16
|
continue;
|
|
21
17
|
}
|
|
22
|
-
|
|
18
|
+
GtfsStopParser.validateAswId(aswId, aswNode, aswStopId);
|
|
23
19
|
aswWhereOptions.push(sequelize_1.Sequelize.and(sequelize_1.Sequelize.where(sequelize_1.Sequelize.col("asw_node_id"), "=", aswNode), aswStopId && sequelize_1.Sequelize.where(sequelize_1.Sequelize.col("asw_stop_id"), "=", aswStopId)));
|
|
24
20
|
}
|
|
25
21
|
return aswWhereOptions;
|
|
26
22
|
}
|
|
27
|
-
|
|
28
|
-
return value >= const_1.PG_INT_MIN && value <= const_1.PG_INT_MAX;
|
|
29
|
-
}
|
|
30
|
-
validateAswId(aswId, nodeId, stopId) {
|
|
23
|
+
static validateAswId(aswId, nodeId, stopId) {
|
|
31
24
|
const nodeIdNum = Number(nodeId);
|
|
32
|
-
if (!
|
|
33
|
-
throw new golemio_errors_1.GeneralError(`Invalid ASW ID: ${aswId}`,
|
|
25
|
+
if (!GtfsStopParser.isValidInteger(nodeIdNum) || (stopId && !GtfsStopParser.isValidInteger(Number(stopId)))) {
|
|
26
|
+
throw new golemio_errors_1.GeneralError(`Invalid ASW ID: ${aswId}`, GtfsStopParser.constructor.name, `Invalid ASW ID: ${aswId}`, 400);
|
|
34
27
|
}
|
|
35
28
|
}
|
|
36
|
-
parseAswId(aswId) {
|
|
29
|
+
static parseAswId(aswId) {
|
|
37
30
|
const [aswNode, aswStopId] = aswId.replaceAll("_", "/").split("/");
|
|
38
31
|
return { aswNode, aswStopId };
|
|
39
32
|
}
|
|
40
|
-
getAswNodeFromId(aswId) {
|
|
41
|
-
return
|
|
33
|
+
static getAswNodeFromId(aswId) {
|
|
34
|
+
return GtfsStopParser.parseAswId(aswId).aswNode;
|
|
42
35
|
}
|
|
43
|
-
normalizedStopId(stopId) {
|
|
36
|
+
static normalizedStopId(stopId) {
|
|
44
37
|
return stopId
|
|
45
38
|
.split(/[^\d]/g)
|
|
46
39
|
.filter((s) => !!s.length)
|
|
47
40
|
.join("/");
|
|
48
41
|
}
|
|
49
|
-
}
|
|
50
|
-
exports.GtfsStopParser = GtfsStopParser
|
|
51
|
-
(0, tsyringe_1.injectable)()
|
|
52
|
-
], GtfsStopParser);
|
|
42
|
+
}
|
|
43
|
+
exports.GtfsStopParser = GtfsStopParser;
|
|
53
44
|
//# sourceMappingURL=GtfsStopParser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GtfsStopParser.js","sourceRoot":"","sources":["../../src/helpers/GtfsStopParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GtfsStopParser.js","sourceRoot":"","sources":["../../src/helpers/GtfsStopParser.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AACxE,mEAA8E;AAC9E,oCAAmD;AAEnD,MAAa,cAAc;IACf,MAAM,CAAC,cAAc,CA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AAG,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAClC,CAAC;IAEM,MAAM,CAAC,gBAAgB,CAAC,KAAa;QACxC,OAAO,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;IACpD,CAAC;IAEM,MAAM,CAAC,gBAAgB,CAAC,MAAc;QACzC,OAAO,MAAM;aACR,KAAK,CAAC,QAAQ,CAAC;aACf,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;aACzB,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;CACJ;AAlDD,wCAkDC"}
|
|
@@ -5,16 +5,14 @@ import { DeparturePresetsRepository } from "../data-access/DeparturePresetsRepos
|
|
|
5
5
|
import { RopidDeparturesPresetsTransformation } from "../transformations/RopidDeparturesPresetsTransformation";
|
|
6
6
|
import { RopidGTFSStopsModel } from "../RopidGTFSStopsModel";
|
|
7
7
|
import { RopidDeparturesPresetsRopidGTFSStopsRepository } from "../../jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository";
|
|
8
|
-
import { GtfsStopParser } from "../../../helpers/GtfsStopParser";
|
|
9
8
|
export declare class DeparturePresetsFacade {
|
|
10
9
|
private metadataRepository;
|
|
11
10
|
private ropidGTFSStopsModel;
|
|
12
11
|
private departurePresetsRepository;
|
|
13
12
|
private ropidDeparturesPresetsRopidGTFSStopsRepository;
|
|
14
13
|
private transformationDeparturesPresets;
|
|
15
|
-
private gtfsStopParser;
|
|
16
14
|
private logger;
|
|
17
|
-
constructor(metadataRepository: RopidGtfsMetadataRepository, ropidGTFSStopsModel: RopidGTFSStopsModel, departurePresetsRepository: DeparturePresetsRepository, ropidDeparturesPresetsRopidGTFSStopsRepository: RopidDeparturesPresetsRopidGTFSStopsRepository, transformationDeparturesPresets: RopidDeparturesPresetsTransformation,
|
|
15
|
+
constructor(metadataRepository: RopidGtfsMetadataRepository, ropidGTFSStopsModel: RopidGTFSStopsModel, departurePresetsRepository: DeparturePresetsRepository, ropidDeparturesPresetsRopidGTFSStopsRepository: RopidDeparturesPresetsRopidGTFSStopsRepository, transformationDeparturesPresets: RopidDeparturesPresetsTransformation, logger: ILogger);
|
|
18
16
|
handleNewDeparturePresets(data: IRopidDeparturesPreset[], lastModified: string): Promise<void>;
|
|
19
17
|
private mapPresetsToGtfsStops;
|
|
20
18
|
}
|
|
@@ -26,13 +26,12 @@ const RopidGTFSStopsModel_1 = require("../RopidGTFSStopsModel");
|
|
|
26
26
|
const RopidDeparturesPresetsRopidGTFSStopsRepository_1 = require("../../jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository");
|
|
27
27
|
const GtfsStopParser_1 = require("../../../helpers/GtfsStopParser");
|
|
28
28
|
let DeparturePresetsFacade = exports.DeparturePresetsFacade = class DeparturePresetsFacade {
|
|
29
|
-
constructor(metadataRepository, ropidGTFSStopsModel, departurePresetsRepository, ropidDeparturesPresetsRopidGTFSStopsRepository, transformationDeparturesPresets,
|
|
29
|
+
constructor(metadataRepository, ropidGTFSStopsModel, departurePresetsRepository, ropidDeparturesPresetsRopidGTFSStopsRepository, transformationDeparturesPresets, logger) {
|
|
30
30
|
this.metadataRepository = metadataRepository;
|
|
31
31
|
this.ropidGTFSStopsModel = ropidGTFSStopsModel;
|
|
32
32
|
this.departurePresetsRepository = departurePresetsRepository;
|
|
33
33
|
this.ropidDeparturesPresetsRopidGTFSStopsRepository = ropidDeparturesPresetsRopidGTFSStopsRepository;
|
|
34
34
|
this.transformationDeparturesPresets = transformationDeparturesPresets;
|
|
35
|
-
this.gtfsStopParser = gtfsStopParser;
|
|
36
35
|
this.logger = logger;
|
|
37
36
|
}
|
|
38
37
|
async handleNewDeparturePresets(data, lastModified) {
|
|
@@ -79,7 +78,7 @@ let DeparturePresetsFacade = exports.DeparturePresetsFacade = class DeparturePre
|
|
|
79
78
|
const params = new URLSearchParams(preset.url_query_params);
|
|
80
79
|
const aswIds = params.getAll("aswIds");
|
|
81
80
|
const aswIdsWithBrackets = params.getAll("aswIds[]");
|
|
82
|
-
const whereOptions =
|
|
81
|
+
const whereOptions = GtfsStopParser_1.GtfsStopParser.prepareAswWhereOptions([...new Set([...aswIds, ...aswIdsWithBrackets])]);
|
|
83
82
|
for (const whereOption of whereOptions) {
|
|
84
83
|
const stops = await this.ropidGTFSStopsModel.find({
|
|
85
84
|
where: whereOption,
|
|
@@ -103,13 +102,11 @@ exports.DeparturePresetsFacade = DeparturePresetsFacade = __decorate([
|
|
|
103
102
|
__param(2, (0, tsyringe_1.inject)(ModuleContainerToken_1.ModuleContainerToken.DeparturePresetsRepository)),
|
|
104
103
|
__param(3, (0, tsyringe_1.inject)(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidDeparturesPresetsRopidGTFSStopsRepository)),
|
|
105
104
|
__param(4, (0, tsyringe_1.inject)(ModuleContainerToken_1.ModuleContainerToken.RopidDeparturesPresetsTransformation)),
|
|
106
|
-
__param(5, (0, tsyringe_1.inject)(
|
|
107
|
-
__param(6, (0, tsyringe_1.inject)(ContainerToken_1.ContainerToken.Logger)),
|
|
105
|
+
__param(5, (0, tsyringe_1.inject)(ContainerToken_1.ContainerToken.Logger)),
|
|
108
106
|
__metadata("design:paramtypes", [RopidGtfsMetadataRepository_1.RopidGtfsMetadataRepository,
|
|
109
107
|
RopidGTFSStopsModel_1.RopidGTFSStopsModel,
|
|
110
108
|
DeparturePresetsRepository_1.DeparturePresetsRepository,
|
|
111
109
|
RopidDeparturesPresetsRopidGTFSStopsRepository_1.RopidDeparturesPresetsRopidGTFSStopsRepository,
|
|
112
|
-
RopidDeparturesPresetsTransformation_1.RopidDeparturesPresetsTransformation,
|
|
113
|
-
GtfsStopParser_1.GtfsStopParser, Object])
|
|
110
|
+
RopidDeparturesPresetsTransformation_1.RopidDeparturesPresetsTransformation, Object])
|
|
114
111
|
], DeparturePresetsFacade);
|
|
115
112
|
//# sourceMappingURL=DeparturePresetsFacade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeparturePresetsFacade.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yEAAoE;AACpE,wEAAoG;AAGpG,6FAA0F;AAC1F,iEAAwE;AACxE,wDAAiD;AACjD,gFAA6E;AAC7E,0FAAuF;AACvF,4EAAyE;AACzE,kHAA+G;AAC/G,gEAA6D;AAC7D,0IAAqI;AAGrI,oEAAyD;AAGlD,IAAM,sBAAsB,oCAA5B,MAAM,sBAAsB;IAC/B,YACyE,kBAA+C,EACvD,mBAAwC,EACpC,0BAAsD,EAE/G,8CAA8F,EAE9F,+BAAqE,
|
|
1
|
+
{"version":3,"file":"DeparturePresetsFacade.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yEAAoE;AACpE,wEAAoG;AAGpG,6FAA0F;AAC1F,iEAAwE;AACxE,wDAAiD;AACjD,gFAA6E;AAC7E,0FAAuF;AACvF,4EAAyE;AACzE,kHAA+G;AAC/G,gEAA6D;AAC7D,0IAAqI;AAGrI,oEAAyD;AAGlD,IAAM,sBAAsB,oCAA5B,MAAM,sBAAsB;IAC/B,YACyE,kBAA+C,EACvD,mBAAwC,EACpC,0BAAsD,EAE/G,8CAA8F,EAE9F,+BAAqE,EACtC,MAAe;QAPe,uBAAkB,GAAlB,kBAAkB,CAA6B;QACvD,wBAAmB,GAAnB,mBAAmB,CAAqB;QACpC,+BAA0B,GAA1B,0BAA0B,CAA4B;QAE/G,mDAA8C,GAA9C,8CAA8C,CAAgD;QAE9F,oCAA+B,GAA/B,+BAA+B,CAAsC;QACtC,WAAM,GAAN,MAAM,CAAS;IACvD,CAAC;IAEG,KA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AAK,EAAE,WAAW;iBACrB,CAAC,CAAC;gBACH,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;oBACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,0CAA0C,CAAC,CAAC;oBAC1E,SAAS;iBACZ;gBAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;oBACtB,0BAA0B,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;iBACpF;aACJ;SACJ;QAED,OAAO,0BAA0B,CAAC;IACtC,CAAC;CACJ,CAAA;iCArFY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,2BAA2B,CAAC,CAAA;IAC3D,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAA;IACvD,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,8CAA8C,CAAC,CAAA;IAE9E,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,oCAAoC,CAAC,CAAA;IAEjE,WAAA,IAAA,iBAAM,EAAC,+BAAc,CAAC,MAAM,CAAC,CAAA;qCAP2D,yDAA2B;QAClC,yCAAmB;QACR,uDAA0B;QAE/D,+FAA8C;QAE7D,2EAAoC;GARxE,sBAAsB,CAqFlC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RopidGtfsContainer = void 0;
|
|
4
|
-
const GtfsStopParser_1 = require("../../../helpers/GtfsStopParser");
|
|
5
4
|
const Di_1 = require("../../ioc/Di");
|
|
6
5
|
const RopidDeparturesPresetsRopidGTFSStopsRepository_1 = require("../../jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository");
|
|
7
6
|
const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
|
|
@@ -81,7 +80,6 @@ RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContaine
|
|
|
81
80
|
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.SaveStaticDataTask, SaveStaticDataTask_1.SaveStaticDataTask);
|
|
82
81
|
//#endregion
|
|
83
82
|
//#region Helpers
|
|
84
|
-
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.GtfsStopParser, GtfsStopParser_1.GtfsStopParser);
|
|
85
83
|
//#endregion
|
|
86
84
|
//#region Cache
|
|
87
85
|
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.GtfsStopsRedisRepository, GtfsStopsRedisRepository_1.GtfsStopsRedisRepository);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,0IAAqI;AACrI,uEAA4C;AAC5C,qFAA8F;AAC9F,iEAAoF;AACpF,gEAA6D;AAC7D,wDAAqD;AACrD,gFAA6E;AAC7E,wFAAqF;AACrF,4EAAyE;AACzE,8FAA2F;AAC3F,sGAAmG;AACnG,8FAA2F;AAC3F,4DAAkE;AAClE,oFAAiF;AACjF,4HAAyH;AACzH,kHAA+G;AAC/G,6EAA0E;AAC1E,8GAA2G;AAC3G,wFAAqF;AACrF,4GAAyG;AACzG,gHAA6G;AAC7G,0GAAuG;AACvG,qGAAkG;AAClG,yHAAsH;AACtH,uFAAoF;AACpF,yHAAsH;AACtH,qHAAkH;AAClH,yGAA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AC,iBAAiB,CAAC,iDAAuB,CAAC,yBAAyB,EAAE,qDAAyB,CAAC,CAAC;AACnH,kBAAkB,CAAC,iBAAiB,CAChC,iDAAuB,CAAC,mCAAmC,EAC3D,yEAAmC,CACtC,CAAC;AACF,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC,CAAC;AAC3H,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,gCAAgC,EAAE,mEAAgC,CAAC,CAAC;AACjI,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,kBAAkB,EAAE,uCAAkB,CAAC,CAAC;AACrG,YAAY;AAEZ,iBAAiB;AACjB,YAAY;AAEZ,eAAe;AACf,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,wBAAwB,EAAE,mDAAwB,CAAC,CAAC"}
|
|
@@ -29,7 +29,6 @@ declare const RopidGtfsContainerToken: {
|
|
|
29
29
|
SaveStaticDataTask: symbol;
|
|
30
30
|
DeparturesDirectionTransformation: symbol;
|
|
31
31
|
RopidDeparturesPresetsRopidGTFSStopsRepository: symbol;
|
|
32
|
-
GtfsStopParser: symbol;
|
|
33
32
|
GtfsStopsRedisRepository: symbol;
|
|
34
33
|
RopidGTFSCisStopsModel: symbol;
|
|
35
34
|
};
|
|
@@ -32,7 +32,6 @@ const RopidGtfsContainerToken = {
|
|
|
32
32
|
SaveStaticDataTask: Symbol("SaveStaticDataTask"),
|
|
33
33
|
DeparturesDirectionTransformation: Symbol("DeparturesDirectionTransformation"),
|
|
34
34
|
RopidDeparturesPresetsRopidGTFSStopsRepository: Symbol("RopidDeparturesPresetsRopidGTFSStopsRepository"),
|
|
35
|
-
GtfsStopParser: Symbol("GtfsStopParser"),
|
|
36
35
|
GtfsStopsRedisRepository: Symbol("GtfsStopsRedisRepository"),
|
|
37
36
|
RopidGTFSCisStopsModel: Symbol("RopidGTFSCisStopsModel"),
|
|
38
37
|
};
|
|
@@ -1 +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C,EAAE,MAAM,CAAC,qCAAqC,CAAC;IAClF,2BAA2B,EAAE,MAAM,CAAC,6BAA6B,CAAC;IAClE,gCAAgC,EAAE,MAAM,CAAC,kCAAkC,CAAC;IAC5E,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,gCAAgC,EAAE,MAAM,CAAC,kCAAkC,CAAC;IAC5E,2BAA2B,EAAE,MAAM,CAAC,6BAA6B,CAAC;IAClE,gCAAgC,EAAE,MAAM,CAAC,kCAAkC,CAAC;IAC5E,qCAAqC,EAAE,MAAM,CAAC,uCAAuC,CAAC;IACtF,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC;IAChD,iCAAiC,EAAE,MAAM,CAAC,mCAAmC,CAAC;IAC9E,8CAA8C,EAAE,MAAM,CAAC,gDAAgD,CAAC;IACxG,wBAAwB,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAC5D,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC;CAC3D,CAAC;AAEO,0DAAuB"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { GtfsStopParser } from "../../../../../../../helpers/GtfsStopParser";
|
|
2
1
|
import { IStopCisDto } from "../../../../../../../schema-definitions/ropid-gtfs/interfaces/IStopCisDto";
|
|
3
2
|
import { IStopCacheDto } from "../../../../../../../schema-definitions/ropid-gtfs/interfaces/IStopDto";
|
|
4
3
|
import { RedisModel } from "@golemio/core/dist/integration-engine";
|
|
5
4
|
export declare class GtfsStopsRedisRepository extends RedisModel {
|
|
6
|
-
private gtfsStopParser;
|
|
7
5
|
static NAMESPACE_PREFIX: string;
|
|
8
|
-
constructor(
|
|
6
|
+
constructor();
|
|
9
7
|
refreshData(cisStops: Array<Pick<IStopCisDto, "id" | "cis">>, gtfsStops: IStopCacheDto[]): Promise<void>;
|
|
10
8
|
private createNewCache;
|
|
11
9
|
private deleteOldCache;
|
|
@@ -8,14 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
11
|
var GtfsStopsRedisRepository_1;
|
|
15
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
13
|
exports.GtfsStopsRedisRepository = void 0;
|
|
17
14
|
const GtfsStopParser_1 = require("../../../../../../../helpers/GtfsStopParser");
|
|
18
|
-
const RopidGtfsContainerToken_1 = require("../../../../../ioc/RopidGtfsContainerToken");
|
|
19
15
|
const const_1 = require("../../../../../../../schema-definitions/ropid-gtfs/redis/const");
|
|
20
16
|
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
21
17
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
@@ -23,12 +19,11 @@ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
|
23
19
|
const node_crypto_1 = require("node:crypto");
|
|
24
20
|
const TTL_SECONDS_BEFORE_DELETE = 60;
|
|
25
21
|
let GtfsStopsRedisRepository = exports.GtfsStopsRedisRepository = GtfsStopsRedisRepository_1 = class GtfsStopsRedisRepository extends integration_engine_1.RedisModel {
|
|
26
|
-
constructor(
|
|
22
|
+
constructor() {
|
|
27
23
|
super("GtfsStopsRedisRepository", {
|
|
28
24
|
isKeyConstructedFromData: false,
|
|
29
25
|
prefix: GtfsStopsRedisRepository_1.NAMESPACE_PREFIX,
|
|
30
26
|
});
|
|
31
|
-
this.gtfsStopParser = gtfsStopParser;
|
|
32
27
|
}
|
|
33
28
|
async refreshData(cisStops, gtfsStops) {
|
|
34
29
|
try {
|
|
@@ -44,7 +39,7 @@ let GtfsStopsRedisRepository = exports.GtfsStopsRedisRepository = GtfsStopsRedis
|
|
|
44
39
|
try {
|
|
45
40
|
const cisToAswNode = new Map();
|
|
46
41
|
for (const stop of cisStops) {
|
|
47
|
-
cisToAswNode.set(stop.cis,
|
|
42
|
+
cisToAswNode.set(stop.cis, GtfsStopParser_1.GtfsStopParser.getAswNodeFromId(stop.id));
|
|
48
43
|
}
|
|
49
44
|
const aswNodeToGtfsStops = new Map();
|
|
50
45
|
const staticData = new Map();
|
|
@@ -85,7 +80,6 @@ let GtfsStopsRedisRepository = exports.GtfsStopsRedisRepository = GtfsStopsRedis
|
|
|
85
80
|
GtfsStopsRedisRepository.NAMESPACE_PREFIX = const_1.GTFS_STOPS_NAMESPACE_PREFIX;
|
|
86
81
|
exports.GtfsStopsRedisRepository = GtfsStopsRedisRepository = GtfsStopsRedisRepository_1 = __decorate([
|
|
87
82
|
(0, tsyringe_1.injectable)(),
|
|
88
|
-
|
|
89
|
-
__metadata("design:paramtypes", [GtfsStopParser_1.GtfsStopParser])
|
|
83
|
+
__metadata("design:paramtypes", [])
|
|
90
84
|
], GtfsStopsRedisRepository);
|
|
91
85
|
//# sourceMappingURL=GtfsStopsRedisRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GtfsStopsRedisRepository.js","sourceRoot":"","sources":["../../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GtfsStopsRedisRepository.js","sourceRoot":"","sources":["../../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,gFAAyD;AAGzD,0FAA0E;AAC1E,8E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L,CAAC;IAEO,KAAK,CAAC,cAAc,CAAC,OAAe;QACxC,IAAI;YACA,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC5C,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;YAC5E,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,eAAe,EAAE,yBAAyB,CAAC,CAAC;YACtE,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,aAAa,EAAE,yBAAyB,CAAC,CAAC;YACpE,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;SACzB;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAAC,uBAAuB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC/E;IACL,CAAC;;AA7Da,yCAAgB,GAAG,mCAA2B,AAA9B,CAA+B;mCADpD,wBAAwB;IADpC,IAAA,qBAAU,GAAE;;GACA,wBAAwB,CA+DpC"}
|
|
@@ -2,9 +2,10 @@ import { BinaryLike } from "crypto";
|
|
|
2
2
|
import { IEventFetchOutput } from "../interfaces/IEventFetchOutput";
|
|
3
3
|
export default class RopidVYMIApiHelper {
|
|
4
4
|
private static _instance;
|
|
5
|
-
private readonly datasource;
|
|
6
5
|
static getInstance: () => RopidVYMIApiHelper;
|
|
7
6
|
private constructor();
|
|
7
|
+
private createDatasource;
|
|
8
8
|
getAllEvents: () => Promise<IEventFetchOutput>;
|
|
9
9
|
createDigest: (data: BinaryLike) => string;
|
|
10
|
+
private computeCreatedFrom;
|
|
10
11
|
}
|
|
@@ -16,7 +16,8 @@ class RopidVYMIApiHelper {
|
|
|
16
16
|
constructor() {
|
|
17
17
|
this.getAllEvents = async () => {
|
|
18
18
|
try {
|
|
19
|
-
const
|
|
19
|
+
const datasource = this.createDatasource();
|
|
20
|
+
const events = await datasource.getAll();
|
|
20
21
|
const digest = this.createDigest(JSON.stringify(events));
|
|
21
22
|
return {
|
|
22
23
|
data: events,
|
|
@@ -36,14 +37,32 @@ class RopidVYMIApiHelper {
|
|
|
36
37
|
this.createDigest = (data) => {
|
|
37
38
|
return crypto_1.default.createHash("sha1").update(data).digest("hex");
|
|
38
39
|
};
|
|
39
|
-
|
|
40
|
+
}
|
|
41
|
+
createDatasource() {
|
|
42
|
+
const createdFrom = this.computeCreatedFrom();
|
|
43
|
+
return new integration_engine_1.DataSource(ropid_vymi_1.RopidVYMI.events.name + "DataSource", new HTTPFetchProtocolStrategy_1.HTTPFetchProtocolStrategy({
|
|
40
44
|
headers: config_1.config.datasources.RopidVYMIApiHeaders,
|
|
41
45
|
method: "GET",
|
|
42
|
-
timeoutInSeconds:
|
|
43
|
-
url: `${config_1.config.datasources.RopidVYMIApiUrl}
|
|
44
|
-
|
|
46
|
+
timeoutInSeconds: 20,
|
|
47
|
+
url: `${config_1.config.datasources.RopidVYMIApiUrl}` +
|
|
48
|
+
`?level=${RopidVYMIApiOutputLevel_1.RopidVYMIApiOutputLevel.Standard}` +
|
|
49
|
+
`&status=1` +
|
|
50
|
+
`&recordtype=1` +
|
|
51
|
+
`&createdfrom=${createdFrom}`,
|
|
45
52
|
}), new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "vymi-report.vymi-list" }), new golemio_validator_1.JSONSchemaValidator(ropid_vymi_1.RopidVYMI.events.name + "DataSource", ropid_vymi_1.RopidVYMI.events.datasourceJsonSchema));
|
|
46
53
|
}
|
|
54
|
+
computeCreatedFrom() {
|
|
55
|
+
const d = new Date();
|
|
56
|
+
d.setDate(d.getDate() - 100);
|
|
57
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
58
|
+
// Format: YYYYMMDDHHMMSS
|
|
59
|
+
return (d.getFullYear().toString() +
|
|
60
|
+
pad(d.getMonth() + 1) +
|
|
61
|
+
pad(d.getDate()) +
|
|
62
|
+
pad(d.getHours()) +
|
|
63
|
+
pad(d.getMinutes()) +
|
|
64
|
+
pad(d.getSeconds()));
|
|
65
|
+
}
|
|
47
66
|
}
|
|
48
67
|
_a = RopidVYMIApiHelper;
|
|
49
68
|
RopidVYMIApiHelper.getInstance = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidVYMIApiHelper.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.ts"],"names":[],"mappings":";;;;;;AAAA,6EAA6D;AAC7D,8EAA8F;AAC9F,yEAAsE;AACtE,6IAA0I;AAC1I,6EAA8F;AAC9F,mFAAkF;AAClF,oDAA4C;AAE5C,uEAAoE;AAEpE,MAAqB,kBAAkB;
|
|
1
|
+
{"version":3,"file":"RopidVYMIApiHelper.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.ts"],"names":[],"mappings":";;;;;;AAAA,6EAA6D;AAC7D,8EAA8F;AAC9F,yEAAsE;AACtE,6IAA0I;AAC1I,6EAA8F;AAC9F,mFAAkF;AAClF,oDAA4C;AAE5C,uEAAoE;AAEpE,MAAqB,kBAAkB;IAWnC;QAuBO,iBAAY,GAAG,KAAK,IAAgC,EAAE;YACzD,IAAI;gBACA,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBAC3C,MAAM,MAAM,GAAsB,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC;gBAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;gBAEzD,OAAO;oBACH,IAAI,EAAE,MAAM;oBACZ,MAAM;iBACT,CAAC;aACL;YAAC,OAAO,GAAQ,EAAE;gBACf,wBAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACf,IAAI,GAAG,YAAY,qCAAoB,EAAE;oBACrC,MAAM,GAAG,CAAC;iBACb;qBAAM;oBACH,MAAM,IAAI,6BAAY,CAAC,0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CACH,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;YAC1B,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;YACrB,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YAChB,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;YACjB,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;YACnB,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CACtB,CAAC;IACN,CAAC;;;AArEa,8BAAW,GAAG,GAAG,EAAE;IAC7B,IAAI,CAAC,EAAI,CAAC,SAAS,EAAE;QACjB,EAAI,CAAC,SAAS,GAAG,IAAI,kBAAkB,EAAE,CAAC;KAC7C;IAED,OAAO,EAAI,CAAC,SAAS,CAAC;AAC1B,CAAC,AANwB,CAMvB;kBATe,kBAAkB"}
|
|
@@ -4,17 +4,16 @@ import { StopFacade } from "../../service/facade/StopFacade";
|
|
|
4
4
|
import { TransferFacade } from "../../service/facade/TransferFacade";
|
|
5
5
|
import { RequestHandler } from "@golemio/core/dist/shared/express";
|
|
6
6
|
import { TransferDepartureCacheTransformation } from "../../service/transformations/TransferDepartureCacheTransformation";
|
|
7
|
-
import { GtfsStopParser } from "../../../../helpers/GtfsStopParser";
|
|
8
7
|
export declare class V4TransferBoardsController {
|
|
9
8
|
private stopFacade;
|
|
10
9
|
private infotextFacade;
|
|
11
10
|
private transferFacade;
|
|
12
11
|
private transformation;
|
|
13
|
-
private gtfsStopParser;
|
|
14
12
|
private static readonly NO_TRANSFERS;
|
|
15
13
|
private readonly defaultTransferBoardsLimit;
|
|
16
|
-
constructor(stopFacade: StopFacade, infotextFacade: InfotextFacade, transferFacade: TransferFacade, transformation: TransferDepartureCacheTransformation
|
|
14
|
+
constructor(stopFacade: StopFacade, infotextFacade: InfotextFacade, transferFacade: TransferFacade, transformation: TransferDepartureCacheTransformation);
|
|
17
15
|
getTransferBoardData: RequestHandler;
|
|
16
|
+
private accessibilityForStops;
|
|
17
|
+
private enhanceWithTimeAndInfo;
|
|
18
18
|
private parseTransferBoardsParams;
|
|
19
|
-
private getTimeFrom;
|
|
20
19
|
}
|
|
@@ -30,14 +30,14 @@ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
|
30
30
|
const TransferDepartureCacheTransformation_1 = require("../../service/transformations/TransferDepartureCacheTransformation");
|
|
31
31
|
const DepartureCalculator_1 = require("../../../shared/DepartureCalculator");
|
|
32
32
|
const GtfsStopParser_1 = require("../../../../helpers/GtfsStopParser");
|
|
33
|
+
const DepartureBoardMapper_1 = __importDefault(require("../../helpers/DepartureBoardMapper"));
|
|
33
34
|
const DEFAULT_TRANSFER_BOARDS_LIMIT = 8;
|
|
34
35
|
let V4TransferBoardsController = exports.V4TransferBoardsController = V4TransferBoardsController_1 = class V4TransferBoardsController {
|
|
35
|
-
constructor(stopFacade, infotextFacade, transferFacade, transformation
|
|
36
|
+
constructor(stopFacade, infotextFacade, transferFacade, transformation) {
|
|
36
37
|
this.stopFacade = stopFacade;
|
|
37
38
|
this.infotextFacade = infotextFacade;
|
|
38
39
|
this.transferFacade = transferFacade;
|
|
39
40
|
this.transformation = transformation;
|
|
40
|
-
this.gtfsStopParser = gtfsStopParser;
|
|
41
41
|
this.defaultTransferBoardsLimit = DEFAULT_TRANSFER_BOARDS_LIMIT;
|
|
42
42
|
this.getTransferBoardData = async (req, res, next) => {
|
|
43
43
|
const span = (0, trace_provider_1.createChildSpan)("V4TransferBoardsController.getTransferBoardData");
|
|
@@ -63,22 +63,15 @@ let V4TransferBoardsController = exports.V4TransferBoardsController = V4Transfer
|
|
|
63
63
|
return res.status(404).json(V4TransferBoardsController_1.NO_TRANSFERS);
|
|
64
64
|
}
|
|
65
65
|
stopsInfo = await this.stopFacade.getDetailDataFromCacheByStopId(stopIds);
|
|
66
|
-
const normalizedStopId =
|
|
67
|
-
transferStop = stopsInfo.find((stop) =>
|
|
66
|
+
const normalizedStopId = GtfsStopParser_1.GtfsStopParser.normalizedStopId(params.aswId);
|
|
67
|
+
transferStop = stopsInfo.find((stop) => GtfsStopParser_1.GtfsStopParser.normalizedStopId(stop.stop_id) === normalizedStopId);
|
|
68
68
|
if (!transferStop) {
|
|
69
69
|
return res.status(404).json(V4TransferBoardsController_1.NO_TRANSFERS);
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const infotexts = await this.infotextFacade.getInfotextsCache(stopIds, now, timeFrom);
|
|
76
|
-
infotextsToInclude = infotexts;
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
span?.recordException(error);
|
|
80
|
-
throw error;
|
|
81
|
-
}
|
|
71
|
+
const transferCache = await this.transferFacade.getTransferCache(transferStop.stop_id, stopIds, params.limit, parseInt(params.vehicleRegistrationNumber ?? "0", 10), params.routeType, timeFrom || now);
|
|
72
|
+
transferCacheDto = transferCache;
|
|
73
|
+
const infotexts = await this.infotextFacade.getInfotextsCache(stopIds, now, transferCache.plannedTimeFrom);
|
|
74
|
+
infotextsToInclude = infotexts;
|
|
82
75
|
//#endregion
|
|
83
76
|
}
|
|
84
77
|
else if ("cisId" in params && typeof params.cisId === "number") {
|
|
@@ -102,18 +95,15 @@ let V4TransferBoardsController = exports.V4TransferBoardsController = V4Transfer
|
|
|
102
95
|
}
|
|
103
96
|
const transferStopName = transferStop.stop_name;
|
|
104
97
|
// filter out stops with different stop_name
|
|
105
|
-
const sameNameStopIds =
|
|
98
|
+
const sameNameStopIds = stopsInfo.filter((stop) => stop.stop_name === transferStopName).map((stop) => stop.stop_id);
|
|
106
99
|
// add predictedDeparture to transfers
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
t.departure.predictedDepartureTimestamp = t.departure.predictedDepartureDate.getTime();
|
|
110
|
-
return t;
|
|
111
|
-
});
|
|
100
|
+
// compute accessibility for transfers
|
|
101
|
+
transferCacheDto.transfers = this.enhanceWithTimeAndInfo(transferCacheDto.transfers, stopsInfo);
|
|
112
102
|
transferCacheDto.transfers = TransferBoardFilter_1.TransferBoardFilter.minimalTransferTime(transferCacheDto.transfers, transferCacheDto.delayedTimeFrom);
|
|
113
103
|
transferCacheDto.transfers = TransferBoardFilter_1.TransferBoardFilter.sameStopNameTransfer(transferCacheDto.transfers, transferStop, sameNameStopIds);
|
|
114
104
|
TransferBoardSorter_1.TransferBoardSorter.sortDepartures(transferCacheDto.transfers);
|
|
115
105
|
const transformedData = this.transformation.transformArray(transferCacheDto.transfers);
|
|
116
|
-
const filteredData = TransferBoardFilter_1.TransferBoardFilter.filterDepartures(transformedData, params.limit, transferCacheDto.delayedTimeFrom);
|
|
106
|
+
const filteredData = TransferBoardFilter_1.TransferBoardFilter.filterDepartures(transformedData, params.limit, transferCacheDto.delayedTimeFrom.getTime(), now.getTime());
|
|
117
107
|
const output = {
|
|
118
108
|
// possibly share arrival_datetime of the current vehicle?
|
|
119
109
|
platform_code: transferStop.platform_code,
|
|
@@ -132,6 +122,29 @@ let V4TransferBoardsController = exports.V4TransferBoardsController = V4Transfer
|
|
|
132
122
|
}
|
|
133
123
|
};
|
|
134
124
|
}
|
|
125
|
+
accessibilityForStops(stopsInfo) {
|
|
126
|
+
const accessibilityStopIdsMap = new Map();
|
|
127
|
+
for (const stopInfo of stopsInfo) {
|
|
128
|
+
accessibilityStopIdsMap.set(stopInfo.stop_id, stopInfo.wheelchair_boarding);
|
|
129
|
+
}
|
|
130
|
+
return accessibilityStopIdsMap;
|
|
131
|
+
}
|
|
132
|
+
enhanceWithTimeAndInfo(transfers, stopsInfo) {
|
|
133
|
+
const accessibilityStopIdsMap = this.accessibilityForStops(stopsInfo);
|
|
134
|
+
return transfers.map((t) => {
|
|
135
|
+
if (t.position?.detailed_info != null) {
|
|
136
|
+
t.position.detailed_info.is_wheelchair_accessible = DepartureBoardMapper_1.default.resolveAccessibility({
|
|
137
|
+
route_type: t.departure.route_type,
|
|
138
|
+
real_wheelchair_accessible: !!t.position.detailed_info.is_wheelchair_accessible,
|
|
139
|
+
wheelchair_accessible: null,
|
|
140
|
+
wheelchair_boarding: accessibilityStopIdsMap.get(t.departure.stop_id) ?? null,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
t.departure.predictedDepartureDate = DepartureCalculator_1.DepartureCalculator.getPredictedDepartureTime(new Date(t.departure.departure_datetime), t.departure.arrival_datetime ? new Date(t.departure.arrival_datetime) : null, t.position?.delay ?? null);
|
|
144
|
+
t.departure.predictedDepartureTimestamp = t.departure.predictedDepartureDate.getTime();
|
|
145
|
+
return t;
|
|
146
|
+
});
|
|
147
|
+
}
|
|
135
148
|
parseTransferBoardsParams(query) {
|
|
136
149
|
return {
|
|
137
150
|
aswId: (query.aswId ?? null),
|
|
@@ -143,17 +156,6 @@ let V4TransferBoardsController = exports.V4TransferBoardsController = V4Transfer
|
|
|
143
156
|
limit: (query.limit ?? this.defaultTransferBoardsLimit),
|
|
144
157
|
};
|
|
145
158
|
}
|
|
146
|
-
getTimeFrom({ departure, position }) {
|
|
147
|
-
if (!departure?.arrival_datetime || !position) {
|
|
148
|
-
return new Date().getTime();
|
|
149
|
-
}
|
|
150
|
-
const arrivalDate = new Date(departure.arrival_datetime);
|
|
151
|
-
if (!position.delay) {
|
|
152
|
-
return arrivalDate.getTime();
|
|
153
|
-
}
|
|
154
|
-
arrivalDate.setSeconds(arrivalDate.getSeconds() + position.delay);
|
|
155
|
-
return arrivalDate.getTime();
|
|
156
|
-
}
|
|
157
159
|
};
|
|
158
160
|
V4TransferBoardsController.NO_TRANSFERS = { departures: [], infotexts: [] };
|
|
159
161
|
exports.V4TransferBoardsController = V4TransferBoardsController = V4TransferBoardsController_1 = __decorate([
|
|
@@ -162,11 +164,9 @@ exports.V4TransferBoardsController = V4TransferBoardsController = V4TransferBoar
|
|
|
162
164
|
__param(1, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.InfotextFacade)),
|
|
163
165
|
__param(2, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.TransferFacade)),
|
|
164
166
|
__param(3, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.TransferDepartureCacheTransformation)),
|
|
165
|
-
__param(4, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.GtfsStopParser)),
|
|
166
167
|
__metadata("design:paramtypes", [StopFacade_1.StopFacade,
|
|
167
168
|
InfotextFacade_1.InfotextFacade,
|
|
168
169
|
TransferFacade_1.TransferFacade,
|
|
169
|
-
TransferDepartureCacheTransformation_1.TransferDepartureCacheTransformation
|
|
170
|
-
GtfsStopParser_1.GtfsStopParser])
|
|
170
|
+
TransferDepartureCacheTransformation_1.TransferDepartureCacheTransformation])
|
|
171
171
|
], V4TransferBoardsController);
|
|
172
172
|
//# sourceMappingURL=V4TransferBoardsController.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V4TransferBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v4/V4TransferBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,2EAA0E;AAC1E,2EAA0E;AAC1E,qDAAoD;AACpD,wEAAuE;AACvE,gEAA+D;AAC/D,wEAAuE;AACvE,4CAA8C;AAC9C,+FAA6F;AAE7F,gGAA+D;AAE/D,iEAAwE;AAExE,6HAA4H;AAC5H,6EAAqE;AACrE,uEAAyD;
|
|
1
|
+
{"version":3,"file":"V4TransferBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v4/V4TransferBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,2EAA0E;AAC1E,2EAA0E;AAC1E,qDAAoD;AACpD,wEAAuE;AACvE,gEAA+D;AAC/D,wEAAuE;AACvE,4CAA8C;AAC9C,+FAA6F;AAE7F,gGAA+D;AAE/D,iEAAwE;AAExE,6HAA4H;AAC5H,6EAAqE;AACrE,uEAAyD;AAEzD,8FAAwE;AAExE,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAGjC,IAAM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AAK,CAAC,yBAAyB,IAAI,IAAI,CAAkB;YACrF,SAAS,EAAE,KAAK,CAAC,SAA8B;YAC/C,QAAQ,EAAE,CAAC,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAkB;YACnD,KAAK,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,0BAA0B,CAAsB;SAC/E,CAAC;IACN,CAAC;;AAvKuB,uCAAY,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,AAApC,CAAqC;qCADhE,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,UAAU,CAAC,CAAA;IAC7B,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;IACjC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;IACjC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,oCAAoC,CAAC,CAAA;qCAHL,uBAAU;QACF,+BAAc;QACd,+BAAc;QACQ,2EAAoC;GARhH,0BAA0B,CAyKtC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ITransferAccessibility } from "..";
|
|
1
2
|
export default class DepartureBoardMapper {
|
|
2
3
|
static mapDepartures(data: any, preferredTimezone: string, mode: string): any;
|
|
4
|
+
static resolveAccessibility(data: ITransferAccessibility): boolean;
|
|
3
5
|
/**
|
|
4
6
|
* Initiates all routes. Should respond with correct data to a HTTP requests to all routes.
|
|
5
7
|
*/
|
|
@@ -13,6 +13,9 @@ class DepartureBoardMapper {
|
|
|
13
13
|
const result = data.departures.map((d) => this.transformResponseData(d, preferredTimezone, mode));
|
|
14
14
|
return result;
|
|
15
15
|
}
|
|
16
|
+
static resolveAccessibility(data) {
|
|
17
|
+
return this.determineWheelchairAccessibility(data);
|
|
18
|
+
}
|
|
16
19
|
static calculateDepartureMinutes(predicted) {
|
|
17
20
|
if (!predicted)
|
|
18
21
|
return null;
|