@golemio/pid 3.17.2-dev.1969248519 → 4.0.0-rc.1977811756
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 +0 -2
- package/dist/helpers/GtfsStopParser.js +8 -11
- package/dist/helpers/GtfsStopParser.js.map +1 -1
- package/dist/input-gateway/index.d.ts +1 -1
- package/dist/input-gateway/index.js +13 -25
- package/dist/input-gateway/index.js.map +1 -1
- package/dist/input-gateway/jis/{JisInfotextsRouter.d.ts → JISRouter.d.ts} +5 -2
- package/dist/input-gateway/jis/{JisInfotextsRouter.js → JISRouter.js} +12 -10
- package/dist/input-gateway/jis/JISRouter.js.map +1 -0
- package/dist/input-gateway/jis/controllers/{JisEventsController.js → JISEventsController.js} +2 -2
- package/dist/input-gateway/jis/controllers/{JisEventsController.js.map → JISEventsController.js.map} +1 -1
- package/dist/input-gateway/jis/controllers/{JisInfotextsController.d.ts → JISInfotextsController.d.ts} +1 -1
- package/dist/input-gateway/jis/controllers/{JisInfotextsController.js → JISInfotextsController.js} +5 -5
- package/dist/input-gateway/jis/controllers/{JisInfotextsController.js.map → JISInfotextsController.js.map} +1 -1
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.d.ts +5 -2
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +6 -2
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +1 -0
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.d.ts +4 -3
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +6 -4
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
- package/dist/integration-engine/jis/ioc/Di.js +0 -8
- package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
- package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +0 -3
- package/dist/integration-engine/jis/ioc/JISContainerToken.js +0 -4
- package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISEventsRepository.js +2 -5
- package/dist/integration-engine/jis/repositories/JISEventsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISEventsRopidGTFSRoutesRepository.js +2 -5
- package/dist/integration-engine/jis/repositories/JISEventsRopidGTFSRoutesRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +1 -14
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +4 -75
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +2 -5
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
- package/dist/integration-engine/jis/workers/JISWorker.js +0 -1
- package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +2 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -5
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.d.ts +1 -5
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +0 -24
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/index.d.ts +0 -1
- package/dist/integration-engine/ropid-gtfs/index.js +0 -1
- package/dist/integration-engine/ropid-gtfs/index.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js +0 -8
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +0 -3
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +0 -3
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +5 -8
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
- package/dist/integration-engine/shared/RepositoryUtils.d.ts +3 -0
- package/dist/integration-engine/shared/RepositoryUtils.js +19 -0
- package/dist/integration-engine/shared/RepositoryUtils.js.map +1 -0
- package/dist/integration-engine/shared/index.d.ts +1 -0
- package/dist/integration-engine/shared/index.js +1 -0
- package/dist/integration-engine/shared/index.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.d.ts +61 -10
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +280 -67
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.d.ts +49 -10
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +229 -16
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/output-gateway/jis/controllers/v1/V1EventsController.d.ts +1 -1
- package/dist/output-gateway/jis/controllers/v1/V1EventsController.js +1 -1
- package/dist/output-gateway/jis/ioc/Di.js +1 -1
- package/dist/output-gateway/jis/{transofrmations → transformations}/JISEventsCustomFormatTransformation.js.map +1 -1
- package/dist/schema-definitions/jis/redis/const.d.ts +0 -1
- package/dist/schema-definitions/jis/redis/const.js +1 -2
- package/dist/schema-definitions/jis/redis/const.js.map +1 -1
- package/dist/schema-definitions/ropid-departures-presets/index.d.ts +0 -1
- package/dist/schema-definitions/ropid-departures-presets/index.js +0 -3
- package/dist/schema-definitions/ropid-departures-presets/index.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopDto.d.ts +0 -1
- package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +0 -1
- package/dist/schema-definitions/ropid-gtfs/redis/const.js +1 -2
- package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
- package/docs/asyncapi.yaml +0 -45
- package/docs/cache/types/redis.md +2 -82
- package/docs/jis/index.md +5 -15
- package/docs/openapi-input.yaml +6 -17
- package/package.json +2 -2
- package/dist/input-gateway/jis/JisInfotextsRouter.js.map +0 -1
- package/dist/input-gateway/vehicle-positions/index.d.ts +0 -2
- package/dist/input-gateway/vehicle-positions/index.js +0 -19
- package/dist/input-gateway/vehicle-positions/index.js.map +0 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.d.ts +0 -9
- package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js +0 -78
- package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js.map +0 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.d.ts +0 -11
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js +0 -42
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.d.ts +0 -18
- package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js +0 -44
- package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.d.ts +0 -12
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js +0 -44
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.d.ts +0 -12
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js +0 -87
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js.map +0 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/BasePositionsManager.d.ts +0 -90
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/BasePositionsManager.js +0 -316
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/BasePositionsManager.js.map +0 -1
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.d.ts +0 -16
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js +0 -3
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js.map +0 -1
- package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.d.ts +0 -58
- package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js +0 -69
- package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js.map +0 -1
- /package/dist/input-gateway/jis/controllers/{JisEventsController.d.ts → JISEventsController.d.ts} +0 -0
- /package/dist/output-gateway/jis/{transofrmations → transformations}/JISEventsCustomFormatTransformation.d.ts +0 -0
- /package/dist/output-gateway/jis/{transofrmations → transformations}/JISEventsCustomFormatTransformation.js +0 -0
|
@@ -15,12 +15,16 @@ let GtfsStopParser = exports.GtfsStopParser = class GtfsStopParser {
|
|
|
15
15
|
prepareAswWhereOptions(aswIds) {
|
|
16
16
|
let aswWhereOptions = [];
|
|
17
17
|
for (const aswId of aswIds) {
|
|
18
|
-
|
|
19
|
-
if (
|
|
18
|
+
let aswIdLike = aswId.replaceAll("_", "/");
|
|
19
|
+
if (aswIdLike.slice(-1) === "/") {
|
|
20
|
+
aswIdLike = aswIdLike.slice(0, -1);
|
|
21
|
+
}
|
|
22
|
+
const [nodeId, stopId] = aswIdLike.split("/");
|
|
23
|
+
if (!nodeId) {
|
|
20
24
|
continue;
|
|
21
25
|
}
|
|
22
|
-
this.validateAswId(aswId,
|
|
23
|
-
aswWhereOptions.push(sequelize_1.Sequelize.and(sequelize_1.Sequelize.where(sequelize_1.Sequelize.col("asw_node_id"), "=",
|
|
26
|
+
this.validateAswId(aswId, nodeId, stopId);
|
|
27
|
+
aswWhereOptions.push(sequelize_1.Sequelize.and(sequelize_1.Sequelize.where(sequelize_1.Sequelize.col("asw_node_id"), "=", nodeId), stopId && sequelize_1.Sequelize.where(sequelize_1.Sequelize.col("asw_stop_id"), "=", stopId)));
|
|
24
28
|
}
|
|
25
29
|
return aswWhereOptions;
|
|
26
30
|
}
|
|
@@ -33,13 +37,6 @@ let GtfsStopParser = exports.GtfsStopParser = class GtfsStopParser {
|
|
|
33
37
|
throw new golemio_errors_1.GeneralError(`Invalid ASW ID: ${aswId}`, this.constructor.name, `Invalid ASW ID: ${aswId}`, 400);
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
|
-
parseAswId(aswId) {
|
|
37
|
-
const [aswNode, aswStopId] = aswId.replaceAll("_", "/").split("/");
|
|
38
|
-
return { aswNode, aswStopId };
|
|
39
|
-
}
|
|
40
|
-
getAswNodeFromId(aswId) {
|
|
41
|
-
return this.parseAswId(aswId).aswNode;
|
|
42
|
-
}
|
|
43
40
|
};
|
|
44
41
|
exports.GtfsStopParser = GtfsStopParser = __decorate([
|
|
45
42
|
(0, tsyringe_1.injectable)()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GtfsStopParser.js","sourceRoot":"","sources":["../../src/helpers/GtfsStopParser.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6EAAwE;AACxE,mEAA8E;AAC9E,iEAAgE;AAChE,oCAAmD;AAG5C,IAAM,cAAc,4BAApB,MAAM,cAAc;IAChB,sBAAsB,CAAC,MAAgB;QAC1C,IAAI,eAAe,GAAmB,EAAE,CAAC;QACzC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YACxB,
|
|
1
|
+
{"version":3,"file":"GtfsStopParser.js","sourceRoot":"","sources":["../../src/helpers/GtfsStopParser.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6EAAwE;AACxE,mEAA8E;AAC9E,iEAAgE;AAChE,oCAAmD;AAG5C,IAAM,cAAc,4BAApB,MAAM,cAAc;IAChB,sBAAsB,CAAC,MAAgB;QAC1C,IAAI,eAAe,GAAmB,EAAE,CAAC;QACzC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YACxB,IAAI,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAE3C,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;gBAC7B,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;aACtC;YAED,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAE9C,IAAI,CAAC,MAAM,EAAE;gBACT,SAAS;aACZ;YAED,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;YAE1C,eAAe,CAAC,IAAI,CAChB,qBAAS,CAAC,GAAG,CACT,qBAAS,CAAC,KAAK,CAAC,qBAAS,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAC1D,MAAM,IAAI,qBAAS,CAAC,KAAK,CAAC,qBAAS,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CACvE,CACJ,CAAC;SACL;QACD,OAAO,eAAe,CAAC;IAC3B,CAAC;IAEO,cAAc,CAAC,KAAa;QAChC,OAAO,KAAK,IAAI,kBAAU,IAAI,KAAK,IAAI,kBAAU,CAAC;IACtD,CAAC;IAEO,aAAa,CAAC,KAAa,EAAE,MAAc,EAAE,MAAe;QAChE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAEjC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACrF,MAAM,IAAI,6BAAY,CAAC,mBAAmB,KAAK,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,mBAAmB,KAAK,EAAE,EAAE,GAAG,CAAC,CAAC;SAC9G;IACL,CAAC;CACJ,CAAA;yBAvCY,cAAc;IAD1B,IAAA,qBAAU,GAAE;GACA,cAAc,CAuC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const routers: import("@golemio/core/dist/helpers/routing/AbstractRouter").AbstractRouter[];
|
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
|
|
3
|
+
exports.routers = void 0;
|
|
4
|
+
const JISRouter_1 = require("./jis/JISRouter");
|
|
5
|
+
const RopidGtfsRouter_1 = require("./ropid-gtfs/RopidGtfsRouter");
|
|
6
|
+
const VehiclePositionsRouter_1 = require("./vehicle-positions/VehiclePositionsRouter");
|
|
7
|
+
exports.routers = [
|
|
8
|
+
//#region Ropid GTFS
|
|
9
|
+
RopidGtfsRouter_1.ropidGtfsRouter,
|
|
10
|
+
//#region Vehicle positions
|
|
11
|
+
VehiclePositionsRouter_1.vehiclePositionsRouter,
|
|
12
|
+
//#region Jis
|
|
13
|
+
JISRouter_1.jisRouter,
|
|
14
|
+
//#endregionP
|
|
15
|
+
];
|
|
28
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/input-gateway/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/input-gateway/index.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,kEAA+D;AAC/D,uFAAoF;AAEvE,QAAA,OAAO,GAAG;IACnB,oBAAoB;IACpB,iCAAe;IAEf,2BAA2B;IAC3B,+CAAsB;IAEtB,aAAa;IACb,qBAAS;IACT,aAAa;CAChB,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/// <reference types="express" />
|
|
2
2
|
import { Router } from "@golemio/core/dist/shared/express";
|
|
3
|
-
|
|
3
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
4
|
+
export declare class JISRouter extends AbstractRouter {
|
|
4
5
|
router: Router;
|
|
5
6
|
private eventsController;
|
|
6
7
|
private infotextsController;
|
|
7
8
|
constructor();
|
|
8
|
-
|
|
9
|
+
protected initRoutes(): void;
|
|
9
10
|
private postEvents;
|
|
10
11
|
private postInfotexts;
|
|
11
12
|
}
|
|
13
|
+
declare const jisRouter: AbstractRouter;
|
|
14
|
+
export { jisRouter };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.jisRouter = exports.JISRouter = void 0;
|
|
4
4
|
const CheckContentTypeMiddleware_1 = require("@golemio/core/dist/input-gateway/helpers/CheckContentTypeMiddleware");
|
|
5
5
|
const express_1 = require("@golemio/core/dist/shared/express");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
6
|
+
const JISEventsController_1 = require("./controllers/JISEventsController");
|
|
7
|
+
const JISInfotextsController_1 = require("./controllers/JISInfotextsController");
|
|
8
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
9
|
+
class JISRouter extends AbstractRouter_1.AbstractRouter {
|
|
9
10
|
constructor() {
|
|
11
|
+
super("v1", "jis");
|
|
10
12
|
this.postEvents = async (req, res, next) => {
|
|
11
13
|
try {
|
|
12
14
|
await this.eventsController.processData(req.body);
|
|
@@ -26,16 +28,16 @@ class JisInfotextsRouter {
|
|
|
26
28
|
}
|
|
27
29
|
};
|
|
28
30
|
this.router = (0, express_1.Router)();
|
|
29
|
-
this.eventsController = new
|
|
30
|
-
this.infotextsController = new
|
|
31
|
+
this.eventsController = new JISEventsController_1.JISEventsController();
|
|
32
|
+
this.infotextsController = new JISInfotextsController_1.JISInfotextsController();
|
|
31
33
|
this.initRoutes();
|
|
32
34
|
}
|
|
33
35
|
initRoutes() {
|
|
34
|
-
// TODO: Either rename this router to just "JISRouter", or move to a separate "JISEventsRouter"
|
|
35
|
-
// TODO: This can be done later along with possible addition of RouterLoader to (VP) Input Gateway
|
|
36
36
|
this.router.post("/events", (0, CheckContentTypeMiddleware_1.checkContentTypeMiddleware)(["application/json"]), this.postEvents);
|
|
37
37
|
this.router.post("/infotexts", (0, CheckContentTypeMiddleware_1.checkContentTypeMiddleware)(["application/json"]), this.postInfotexts);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
exports.
|
|
41
|
-
|
|
40
|
+
exports.JISRouter = JISRouter;
|
|
41
|
+
const jisRouter = new JISRouter();
|
|
42
|
+
exports.jisRouter = jisRouter;
|
|
43
|
+
//# sourceMappingURL=JISRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JISRouter.js","sourceRoot":"","sources":["../../../src/input-gateway/jis/JISRouter.ts"],"names":[],"mappings":";;;AAAA,oHAAiH;AACjH,+DAA4F;AAC5F,2EAAwE;AACxE,iFAA8E;AAC9E,sFAAmF;AAEnF,MAAa,SAAU,SAAQ,+BAAc;IAKzC;QACI,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAYf,eAAU,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAiB,EAAE;YAC1F,IAAI;gBACA,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAClD,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;aACvB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAC;QAEM,kBAAa,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAiB,EAAE;YAC7F,IAAI;gBACA,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACrD,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;aACvB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAC;QA3BE,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,gBAAgB,GAAG,IAAI,yCAAmB,EAAE,CAAC;QAClD,IAAI,CAAC,mBAAmB,GAAG,IAAI,+CAAsB,EAAE,CAAC;QACxD,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAES,UAAU;QAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,IAAA,uDAA0B,EAAC,CAAC,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC/F,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,IAAA,uDAA0B,EAAC,CAAC,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACzG,CAAC;CAmBJ;AAnCD,8BAmCC;AAED,MAAM,SAAS,GAAmB,IAAI,SAAS,EAAE,CAAC;AAEzC,8BAAS"}
|
package/dist/input-gateway/jis/controllers/{JisEventsController.js → JISEventsController.js}
RENAMED
|
@@ -7,7 +7,7 @@ const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
|
7
7
|
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
8
8
|
class JISEventsController extends controllers_1.BaseController {
|
|
9
9
|
constructor() {
|
|
10
|
-
super("
|
|
10
|
+
super("JISEvents", new golemio_validator_1.JSONSchemaValidator("JISEventsDataValidation", JISEventsJsonSchema_1.jisEventsJsonSchema));
|
|
11
11
|
this.processData = async (inputData) => {
|
|
12
12
|
try {
|
|
13
13
|
await this.validator.Validate(inputData);
|
|
@@ -25,4 +25,4 @@ class JISEventsController extends controllers_1.BaseController {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
exports.JISEventsController = JISEventsController;
|
|
28
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=JISEventsController.js.map
|
package/dist/input-gateway/jis/controllers/{JisEventsController.js.map → JISEventsController.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"JISEventsController.js","sourceRoot":"","sources":["../../../../src/input-gateway/jis/controllers/JISEventsController.ts"],"names":[],"mappings":";;;AAAA,yGAA+E;AAC/E,8EAA8E;AAC9E,6EAA8F;AAC9F,mFAAkF;AAElF,MAAa,mBAAoB,SAAQ,4BAAc;IAKnD;QACI,KAAK,CAAC,WAAW,EAAE,IAAI,uCAAmB,CAAC,yBAAyB,EAAE,yCAAmB,CAAC,CAAC,CAAC;QAGzF,gBAAW,GAAG,KAAK,EAAE,SAAc,EAAiB,EAAE;YACzD,IAAI;gBACA,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;gBACzC,MAAM,IAAI,CAAC,qBAAqB,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,GAAG,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;aAClH;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;oBACrC,MAAM,GAAG,CAAC;iBACb;qBAAM;oBACH,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;iBACjG;aACJ;QACL,CAAC,CAAC;IAbF,CAAC;CAcJ;AArBD,kDAqBC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseController } from "@golemio/core/dist/input-gateway/controllers";
|
|
2
2
|
import { JSONSchemaValidator } from "@golemio/core/dist/shared/golemio-validator";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class JISInfotextsController extends BaseController {
|
|
4
4
|
name: string;
|
|
5
5
|
protected validator: JSONSchemaValidator;
|
|
6
6
|
protected queuePrefix: string;
|
package/dist/input-gateway/jis/controllers/{JisInfotextsController.js → JISInfotextsController.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.JISInfotextsController = void 0;
|
|
4
4
|
const JISInfotextsJsonSchema_1 = require("../../../schema-definitions/jis/datasources/JISInfotextsJsonSchema");
|
|
5
5
|
const controllers_1 = require("@golemio/core/dist/input-gateway/controllers");
|
|
6
6
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
7
7
|
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
8
|
-
class
|
|
8
|
+
class JISInfotextsController extends controllers_1.BaseController {
|
|
9
9
|
constructor() {
|
|
10
|
-
super("
|
|
10
|
+
super("JISInfotexts", new golemio_validator_1.JSONSchemaValidator("JISInfotextsDataValidation", JISInfotextsJsonSchema_1.jisInfotextsJsonSchema));
|
|
11
11
|
this.processData = async (inputData) => {
|
|
12
12
|
try {
|
|
13
13
|
await this.validator.Validate(inputData);
|
|
@@ -24,5 +24,5 @@ class JisInfotextsController extends controllers_1.BaseController {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
exports.
|
|
28
|
-
//# sourceMappingURL=
|
|
27
|
+
exports.JISInfotextsController = JISInfotextsController;
|
|
28
|
+
//# sourceMappingURL=JISInfotextsController.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"JISInfotextsController.js","sourceRoot":"","sources":["../../../../src/input-gateway/jis/controllers/JISInfotextsController.ts"],"names":[],"mappings":";;;AAAA,+GAAqF;AACrF,8EAA8E;AAC9E,6EAA8F;AAC9F,mFAAkF;AAElF,MAAa,sBAAuB,SAAQ,4BAAc;IAKtD;QACI,KAAK,CAAC,cAAc,EAAE,IAAI,uCAAmB,CAAC,4BAA4B,EAAE,+CAAsB,CAAC,CAAC,CAAC;QAGlG,gBAAW,GAAG,KAAK,EAAE,SAAc,EAAiB,EAAE;YACzD,IAAI;gBACA,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;gBACzC,MAAM,IAAI,CAAC,qBAAqB,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,GAAG,sBAAsB,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;aACrH;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;oBACrC,MAAM,GAAG,CAAC;iBACb;qBAAM;oBACH,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;iBACjG;aACJ;QACL,CAAC,CAAC;IAbF,CAAC;CAcJ;AArBD,wDAqBC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/// <reference types="express" />
|
|
2
2
|
import { Router } from "@golemio/core/dist/shared/express";
|
|
3
|
-
|
|
3
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
4
|
+
export declare class RopidGtfsRouter extends AbstractRouter {
|
|
4
5
|
router: Router;
|
|
5
6
|
private controller;
|
|
6
7
|
constructor();
|
|
7
|
-
|
|
8
|
+
protected initRoutes(): void;
|
|
8
9
|
private post;
|
|
9
10
|
}
|
|
11
|
+
declare const ropidGtfsRouter: AbstractRouter;
|
|
12
|
+
export { ropidGtfsRouter };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RopidGtfsRouter = void 0;
|
|
3
|
+
exports.ropidGtfsRouter = exports.RopidGtfsRouter = void 0;
|
|
4
4
|
const CheckContentTypeMiddleware_1 = require("@golemio/core/dist/input-gateway/helpers/CheckContentTypeMiddleware");
|
|
5
5
|
const express_1 = require("@golemio/core/dist/shared/express");
|
|
6
6
|
const RopidGtfsController_1 = require("./RopidGtfsController");
|
|
7
|
-
|
|
7
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
8
|
+
class RopidGtfsRouter extends AbstractRouter_1.AbstractRouter {
|
|
8
9
|
constructor() {
|
|
10
|
+
super("v1", "ropidgtfs");
|
|
9
11
|
this.post = async (req, res, next) => {
|
|
10
12
|
try {
|
|
11
13
|
await this.controller.processData(req.body);
|
|
@@ -24,4 +26,6 @@ class RopidGtfsRouter {
|
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
exports.RopidGtfsRouter = RopidGtfsRouter;
|
|
29
|
+
const ropidGtfsRouter = new RopidGtfsRouter();
|
|
30
|
+
exports.ropidGtfsRouter = ropidGtfsRouter;
|
|
27
31
|
//# sourceMappingURL=RopidGtfsRouter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGtfsRouter.js","sourceRoot":"","sources":["../../../src/input-gateway/ropid-gtfs/RopidGtfsRouter.ts"],"names":[],"mappings":";;;AAAA,oHAAiH;AACjH,+DAA4F;AAC5F,+DAA4D;
|
|
1
|
+
{"version":3,"file":"RopidGtfsRouter.js","sourceRoot":"","sources":["../../../src/input-gateway/ropid-gtfs/RopidGtfsRouter.ts"],"names":[],"mappings":";;;AAAA,oHAAiH;AACjH,+DAA4F;AAC5F,+DAA4D;AAC5D,sFAAmF;AAEnF,MAAa,eAAgB,SAAQ,+BAAc;IAI/C;QACI,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAWrB,SAAI,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAiB,EAAE;YACpF,IAAI;gBACA,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAE5C,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;aACvB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAC;QAjBE,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,IAAI,yCAAmB,EAAE,CAAC;QAC5C,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAES,UAAU;QAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,IAAA,uDAA0B,EAAC,CAAC,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9F,CAAC;CAWJ;AAzBD,0CAyBC;AAED,MAAM,eAAe,GAAmB,IAAI,eAAe,EAAE,CAAC;AAErD,0CAAe"}
|
|
@@ -20,6 +20,7 @@ class VehiclePositionsController extends controllers_1.BaseController {
|
|
|
20
20
|
const dataBatches = this.splitData(inputData);
|
|
21
21
|
for (const batch of dataBatches) {
|
|
22
22
|
await this.sendMessageToExchange("input." + this.queuePrefix + ".saveDataToDB", JSON.stringify(batch), {
|
|
23
|
+
persistent: true,
|
|
23
24
|
timestamp: new Date().getTime(),
|
|
24
25
|
});
|
|
25
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehiclePositionsController.js","sourceRoot":"","sources":["../../../src/input-gateway/vehicle-positions/VehiclePositionsController.ts"],"names":[],"mappings":";;;AAAA,kFAA0D;AAG1D,wEAAqE;AACrE,8EAA8E;AAC9E,8DAA6E;AAC7E,6EAA8F;AAC9F,mFAAkF;AAElF,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,MAAa,0BAA2B,SAAQ,4BAAc;IAM1D;QACI,KAAK,CACD,oCAAgB,CAAC,IAAI,EACrB,IAAI,uCAAmB,CAAC,oCAAgB,CAAC,IAAI,GAAG,YAAY,EAAE,oCAAgB,CAAC,oBAAoB,CAAC,CACvG,CAAC;QAMN;;WAEG;QACI,gBAAW,GAAG,KAAK,EAAE,SAA2B,EAAiB,EAAE;YACtE,IAAI;gBACA,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB;gBAC5D,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;gBAC9C,KAAK,MAAM,KAAK,IAAI,WAAW,EAAE;oBAC7B,MAAM,IAAI,CAAC,qBAAqB,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,GAAG,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;wBACnG,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;qBAClC,CAAC,CAAC;iBACN;aACJ;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;oBACrC,MAAM,GAAG,CAAC;iBACb;qBAAM;oBACH,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;iBACrF;aACJ;QACL,CAAC,CAAC;QAEM,cAAS,GAAG,CAAC,IAAsB,EAAsB,EAAE;YAC/D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;gBAC7B,OAAO,CAAC,IAAI,CAAC,CAAC;aACjB;YAED,MAAM,MAAM,GAAuB,EAAE,CAAC;YACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,SAAS,EAAE;gBAChF,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;gBAClD,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;aACvC;YACD,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"VehiclePositionsController.js","sourceRoot":"","sources":["../../../src/input-gateway/vehicle-positions/VehiclePositionsController.ts"],"names":[],"mappings":";;;AAAA,kFAA0D;AAG1D,wEAAqE;AACrE,8EAA8E;AAC9E,8DAA6E;AAC7E,6EAA8F;AAC9F,mFAAkF;AAElF,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,MAAa,0BAA2B,SAAQ,4BAAc;IAM1D;QACI,KAAK,CACD,oCAAgB,CAAC,IAAI,EACrB,IAAI,uCAAmB,CAAC,oCAAgB,CAAC,IAAI,GAAG,YAAY,EAAE,oCAAgB,CAAC,oBAAoB,CAAC,CACvG,CAAC;QAMN;;WAEG;QACI,gBAAW,GAAG,KAAK,EAAE,SAA2B,EAAiB,EAAE;YACtE,IAAI;gBACA,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB;gBAC5D,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;gBAC9C,KAAK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AM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,4CAA4C,EAAE,kBAAkB,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC/G,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;CAoCJ;AAlDD,gEAkDC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/// <reference types="express" />
|
|
2
2
|
import { Router } from "@golemio/core/dist/shared/express";
|
|
3
|
-
|
|
3
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
4
|
+
export declare class VehiclePositionsRouter extends AbstractRouter {
|
|
4
5
|
router: Router;
|
|
5
6
|
private controller;
|
|
6
7
|
constructor();
|
|
7
8
|
/**
|
|
8
9
|
* Initiates all routes. Should respond with correct data to a HTTP requests to all routes.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
+
protected initRoutes: () => void;
|
|
11
12
|
private Post;
|
|
12
13
|
}
|
|
13
|
-
declare const vehiclePositionsRouter:
|
|
14
|
+
declare const vehiclePositionsRouter: AbstractRouter;
|
|
14
15
|
export { vehiclePositionsRouter };
|
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.vehiclePositionsRouter = exports.VehiclePositionsRouter = void 0;
|
|
4
4
|
const helpers_1 = require("@golemio/core/dist/input-gateway/helpers");
|
|
5
5
|
const express_1 = require("@golemio/core/dist/shared/express");
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const VehiclePositionsController_1 = require("./VehiclePositionsController");
|
|
7
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
8
|
+
class VehiclePositionsRouter extends AbstractRouter_1.AbstractRouter {
|
|
8
9
|
constructor() {
|
|
10
|
+
super("v1", "vehiclepositions");
|
|
9
11
|
/**
|
|
10
12
|
* Initiates all routes. Should respond with correct data to a HTTP requests to all routes.
|
|
11
13
|
*/
|
|
@@ -32,11 +34,11 @@ class VehiclePositionsRouter {
|
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
36
|
this.router = (0, express_1.Router)();
|
|
35
|
-
this.controller = new
|
|
37
|
+
this.controller = new VehiclePositionsController_1.VehiclePositionsController();
|
|
36
38
|
this.initRoutes();
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
exports.VehiclePositionsRouter = VehiclePositionsRouter;
|
|
40
|
-
const vehiclePositionsRouter = new VehiclePositionsRouter()
|
|
42
|
+
const vehiclePositionsRouter = new VehiclePositionsRouter();
|
|
41
43
|
exports.vehiclePositionsRouter = vehiclePositionsRouter;
|
|
42
44
|
//# sourceMappingURL=VehiclePositionsRouter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehiclePositionsRouter.js","sourceRoot":"","sources":["../../../src/input-gateway/vehicle-positions/VehiclePositionsRouter.ts"],"names":[],"mappings":";;;AACA,sEAAqH;AACrH,+DAA4F;AAC5F,
|
|
1
|
+
{"version":3,"file":"VehiclePositionsRouter.js","sourceRoot":"","sources":["../../../src/input-gateway/vehicle-positions/VehiclePositionsRouter.ts"],"names":[],"mappings":";;;AACA,sEAAqH;AACrH,+DAA4F;AAC5F,6EAA0E;AAC1E,sFAAmF;AAEnF,MAAa,sBAAuB,SAAQ,+BAAc;IAItD;QACI,KAAK,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;QAMpC;;WAEG;QACO,eAAU,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAA,oCAA0B,EAAC,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/E,CAAC,CAAC;QAEM,SAAI,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAiB,EAAE;YACpF,IAAI;gBACA,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC5C,4BAA4B;gBAC5B,MAAM,UAAU,GAA6B;oBACzC,eAAe,EACX,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,YAAY,KAAK;wBACzE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;wBACxB,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;4BAC3C,CAAC,CAAC,CAAC;4BACH,CAAC,CAAC,CAAC;oBACX,GAAG;iBACN,CAAC;gBACF,sBAAY,CAAC,IAAI,CAAC,yBAAe,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;gBAC/D,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;aACvB;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAC;QA9BE,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,IAAI,uDAA0B,EAAE,CAAC;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CA4BJ;AArCD,wDAqCC;AAED,MAAM,sBAAsB,GAAmB,IAAI,sBAAsB,EAAE,CAAC;AAEnE,wDAAsB"}
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.JISContainer = void 0;
|
|
4
4
|
const Di_1 = require("../../ioc/Di");
|
|
5
|
-
const RopidGTFSStopsModel_1 = require("../../ropid-gtfs/RopidGTFSStopsModel");
|
|
6
5
|
const JISEventsDataSourceFactory_1 = require("../datasources/JISEventsDataSourceFactory");
|
|
7
6
|
const JISInfotextsDataSourceFactory_1 = require("../datasources/JISInfotextsDataSourceFactory");
|
|
8
7
|
const JISEventsRepository_1 = require("../repositories/JISEventsRepository");
|
|
9
8
|
const JISEventsRopidGTFSRoutesRepository_1 = require("../repositories/JISEventsRopidGTFSRoutesRepository");
|
|
10
|
-
const JISInfotextsRedisRepository_1 = require("../repositories/JISInfotextsRedisRepository");
|
|
11
9
|
const JISInfotextsRepository_1 = require("../repositories/JISInfotextsRepository");
|
|
12
10
|
const JISInfotextsRopidGTFSStopsRepository_1 = require("../repositories/JISInfotextsRopidGTFSStopsRepository");
|
|
13
11
|
const JISMetadataRepository_1 = require("../repositories/JISMetadataRepository");
|
|
@@ -19,7 +17,6 @@ const JISInfotextsTransformation_1 = require("../transformations/JISInfotextsTra
|
|
|
19
17
|
const FetchJISEventsTask_1 = require("../workers/tasks/FetchJISEventsTask");
|
|
20
18
|
const FetchJISInfotextsTask_1 = require("../workers/tasks/FetchJISInfotextsTask");
|
|
21
19
|
const RefreshJISEventsTask_1 = require("../workers/tasks/RefreshJISEventsTask");
|
|
22
|
-
const RefreshJISInfotextsCacheTask_1 = require("../workers/tasks/RefreshJISInfotextsCacheTask");
|
|
23
20
|
const RefreshJISInfotextsTask_1 = require("../workers/tasks/RefreshJISInfotextsTask");
|
|
24
21
|
const JISContainerToken_1 = require("./JISContainerToken");
|
|
25
22
|
//#region Initialization
|
|
@@ -30,16 +27,12 @@ exports.JISContainer = JISContainer;
|
|
|
30
27
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISEventsDataSourceFactory, JISEventsDataSourceFactory_1.JISEventsDataSourceFactory);
|
|
31
28
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISInfotextsDataSourceFactory, JISInfotextsDataSourceFactory_1.JISInfotextsDataSourceFactory);
|
|
32
29
|
//#endregion
|
|
33
|
-
//#region Cache Repositories
|
|
34
|
-
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISInfotextsRedisRepository, JISInfotextsRedisRepository_1.JISInfotextsRedisRepository);
|
|
35
|
-
//#endregion
|
|
36
30
|
//#region Repositories
|
|
37
31
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISEventsRepository, JISEventsRepository_1.JISEventsRepository);
|
|
38
32
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISEventsRopidGTFSRoutesRepository, JISEventsRopidGTFSRoutesRepository_1.JISEventsRopidGTFSRoutesRepository);
|
|
39
33
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISInfotextsRepository, JISInfotextsRepository_1.JISInfotextsRepository);
|
|
40
34
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISInfotextsRopidGTFSStopsRepository, JISInfotextsRopidGTFSStopsRepository_1.JISInfotextsRopidGTFSStopsRepository);
|
|
41
35
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISMetadataRepository, JISMetadataRepository_1.JISMetadataRepository);
|
|
42
|
-
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.RopidGTFSStopsRepository, RopidGTFSStopsModel_1.RopidGTFSStopsModel);
|
|
43
36
|
//#endregion
|
|
44
37
|
//#region Services
|
|
45
38
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISEventsDataService, JISEventsDataService_1.JISEventsDataService);
|
|
@@ -50,7 +43,6 @@ JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.FetchJISEve
|
|
|
50
43
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.FetchJISInfotextsTask, FetchJISInfotextsTask_1.FetchJISInfotextsTask);
|
|
51
44
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.RefreshJISEventsTask, RefreshJISEventsTask_1.RefreshJISEventsTask);
|
|
52
45
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.RefreshJISInfotextsTask, RefreshJISInfotextsTask_1.RefreshJISInfotextsTask);
|
|
53
|
-
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.RefreshJISInfotextsCacheTask, RefreshJISInfotextsCacheTask_1.RefreshJISInfotextsCacheTask);
|
|
54
46
|
//#endregion
|
|
55
47
|
//#region Transformations
|
|
56
48
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISEventsTransformation, JISEventsTransformation_1.JISEventsTransformation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAE1C,0FAAuF;AACvF,gGAA6F;AAC7F,6EAA0E;AAC1E,2GAAwG;AACxG,mFAAgF;AAChF,+GAA4G;AAC5G,iFAA8E;AAC9E,2EAAwE;AACxE,iFAA8E;AAC9E,oGAAiG;AACjG,wFAAqF;AACrF,8FAA2F;AAC3F,4EAAyE;AACzE,kFAA+E;AAC/E,gFAA6E;AAC7E,sFAAmF;AACnF,2DAAwD;AAExD,wBAAwB;AACxB,MAAM,YAAY,GAAwB,iBAAY,CAAC,oBAAoB,EAAE,CAAC;AAkCrE,oCAAY;AAjCrB,YAAY;AAEZ,sBAAsB;AACtB,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,0BAA0B,EAAE,uDAA0B,CAAC,CAAC;AACzG,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC,CAAC;AAC/G,YAAY;AAEZ,sBAAsB;AACtB,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,mBAAmB,EAAE,yCAAmB,CAAC,CAAC;AAC3F,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,kCAAkC,EAAE,uEAAkC,CAAC,CAAC;AACzH,YAAY,CAAC,iBAAiB,CAAC,qCAAi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|
JISEventsRopidGTFSRoutesRepository: symbol;
|
|
7
6
|
JISInfotextsRepository: symbol;
|
|
8
7
|
JISInfotextsRopidGTFSStopsRepository: symbol;
|
|
9
8
|
JISMetadataRepository: symbol;
|
|
10
|
-
RopidGTFSStopsRepository: symbol;
|
|
11
9
|
JISEventsDataService: symbol;
|
|
12
10
|
JISInfotextsDataService: symbol;
|
|
13
11
|
JISEventsTransformation: symbol;
|
|
@@ -17,6 +15,5 @@ declare const JISContainerToken: {
|
|
|
17
15
|
FetchJISInfotextsTask: symbol;
|
|
18
16
|
RefreshJISEventsTask: symbol;
|
|
19
17
|
RefreshJISInfotextsTask: symbol;
|
|
20
|
-
RefreshJISInfotextsCacheTask: symbol;
|
|
21
18
|
};
|
|
22
19
|
export { JISContainerToken };
|
|
@@ -5,15 +5,12 @@ const JISContainerToken = {
|
|
|
5
5
|
/* Data Sources */
|
|
6
6
|
JISEventsDataSourceFactory: Symbol("JISEventsDataSourceFactory"),
|
|
7
7
|
JISInfotextsDataSourceFactory: Symbol("JISInfotextsDataSourceFactory"),
|
|
8
|
-
/* Cache Repositories */
|
|
9
|
-
JISInfotextsRedisRepository: Symbol("JISInfotextsRedisRepository"),
|
|
10
8
|
/* Repositories */
|
|
11
9
|
JISEventsRepository: Symbol("JISEventsRepository"),
|
|
12
10
|
JISEventsRopidGTFSRoutesRepository: Symbol("JISEventsRopidGTFSRoutesRepository"),
|
|
13
11
|
JISInfotextsRepository: Symbol("JISInfotextsRepository"),
|
|
14
12
|
JISInfotextsRopidGTFSStopsRepository: Symbol("JISInfotextsRopidGTFSStopsRepository"),
|
|
15
13
|
JISMetadataRepository: Symbol("JISMetadataRepository"),
|
|
16
|
-
RopidGTFSStopsRepository: Symbol("RopidGTFSStopsRepository"),
|
|
17
14
|
/* Services */
|
|
18
15
|
JISEventsDataService: Symbol("JISEventsDataService"),
|
|
19
16
|
JISInfotextsDataService: Symbol("JISInfotextsDataService"),
|
|
@@ -26,7 +23,6 @@ const JISContainerToken = {
|
|
|
26
23
|
FetchJISInfotextsTask: Symbol("FetchJISInfotextsTask"),
|
|
27
24
|
RefreshJISEventsTask: Symbol("RefreshJISEventsTask"),
|
|
28
25
|
RefreshJISInfotextsTask: Symbol("RefreshJISInfotextsTask"),
|
|
29
|
-
RefreshJISInfotextsCacheTask: Symbol("RefreshJISInfotextsCacheTask"),
|
|
30
26
|
};
|
|
31
27
|
exports.JISContainerToken = JISContainerToken;
|
|
32
28
|
//# sourceMappingURL=JISContainerToken.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISContainerToken.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/ioc/JISContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAG;IACtB,kBAAkB;IAClB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,
|
|
1
|
+
{"version":3,"file":"JISContainerToken.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/ioc/JISContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAG;IACtB,kBAAkB;IAClB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,kBAAkB;IAClB,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,kCAAkC,EAAE,MAAM,CAAC,oCAAoC,CAAC;IAChF,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC;IACxD,oCAAoC,EAAE,MAAM,CAAC,sCAAsC,CAAC;IACpF,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,cAAc;IACd,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,qBAAqB;IACrB,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,WAAW;IACX,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC;IAChD,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;CAC7D,CAAC;AAEO,8CAAiB"}
|
|
@@ -25,6 +25,7 @@ const JISContainerToken_1 = require("../ioc/JISContainerToken");
|
|
|
25
25
|
const JISEventsRopidGTFSRoutesRepository_1 = require("./JISEventsRopidGTFSRoutesRepository");
|
|
26
26
|
const Di_1 = require("../../ropid-gtfs/ioc/Di");
|
|
27
27
|
const RopidGtfsContainerToken_1 = require("../../ropid-gtfs/ioc/RopidGtfsContainerToken");
|
|
28
|
+
const RepositoryUtils_1 = require("../../shared/RepositoryUtils");
|
|
28
29
|
let JISEventsRepository = exports.JISEventsRepository = class JISEventsRepository extends AbstractValidatableRepository_1.AbstractValidatableRepository {
|
|
29
30
|
constructor(connector, logger, eventsRopidGTFSRoutesRepository) {
|
|
30
31
|
super(connector, logger);
|
|
@@ -101,11 +102,7 @@ let JISEventsRepository = exports.JISEventsRepository = class JISEventsRepositor
|
|
|
101
102
|
return upserted;
|
|
102
103
|
}
|
|
103
104
|
catch (err) {
|
|
104
|
-
|
|
105
|
-
const mappedErrors = err.errors.map((e) => `${e.message} (${e.value})`).join(", ");
|
|
106
|
-
throw new golemio_errors_1.ValidationError(`Validation error in upsertAll: ${mappedErrors}`, this.constructor.name, err, undefined, "pid");
|
|
107
|
-
}
|
|
108
|
-
throw new golemio_errors_1.GeneralError("Error in upsertAll", this.constructor.name, err);
|
|
105
|
+
RepositoryUtils_1.RepositoryUtils.mapSequelizeError(err, this.constructor.name, "upsertAll");
|
|
109
106
|
}
|
|
110
107
|
}
|
|
111
108
|
getUpdateAttributes() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISEventsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISEventsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,6DAAuC;AACvC,0FAAgE;AAIhE,8IAA2I;AAC3I,wEAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"JISEventsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISEventsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,6DAAuC;AACvC,0FAAgE;AAIhE,8IAA2I;AAC3I,wEAAqE;AACrE,6EAAwE;AACxE,mFAAkF;AAClF,mEAAmF;AACnF,iEAAwE;AACxE,gEAA6D;AAC7D,6FAA0F;AAC1F,gDAA2D;AAC3D,0FAAqF;AACrF,kEAA6D;AAOtD,IAAM,mBAAmB,iCAAzB,MAAM,mBAAoB,SAAQ,6DAA6B;IAQlE,YACyC,SAA6B,EACxC,MAAuB,EAEjD,+BAA2E;QAE3E,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAJS,WAAM,GAAN,MAAM,CAAS;QAEzC,oCAA+B,GAA/B,+BAA+B,CAAoC;QAVxE,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,+BAAc,CAAC,SAAS,CAAC;QAYxC,IAAI,CAAC,SAAS,GAAG,IAAI,uCAAmB,CAAC,qBAAqB,EAAE,+BAAc,CAAC,UAAU,CAAC,CAAC;QAC3F,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,+BAAc,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACpF,IAAI,CAAC,yBAAyB,GAAG,uBAAkB,CAAC,OAAO,CACvD,iDAAuB,CAAC,yBAAyB,CACpD,CAAC;QAEF,IAAI,CAAC,cAAc,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C,IAAI,EAAE,WAAW,CAAC,CAAC;SAC9E;IACL,CAAC;IAEO,mBAAmB;QACvB,OAAO,MAAM,CAAC,IAAI,CAAC,+BAAc,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IACjH,CAAC;CACJ,CAAA;8BA1GY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IAUJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;IACxB,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,kCAAkC,CAAC,CAAA;qDACpB,uEAAkC;GAZtE,mBAAmB,CA0G/B"}
|
|
@@ -21,6 +21,7 @@ const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
|
21
21
|
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
22
22
|
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
23
23
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
24
|
+
const RepositoryUtils_1 = require("../../shared/RepositoryUtils");
|
|
24
25
|
let JISEventsRopidGTFSRoutesRepository = exports.JISEventsRopidGTFSRoutesRepository = class JISEventsRopidGTFSRoutesRepository extends AbstractValidatableRepository_1.AbstractValidatableRepository {
|
|
25
26
|
constructor(connector, logger) {
|
|
26
27
|
super(connector, logger);
|
|
@@ -61,11 +62,7 @@ let JISEventsRopidGTFSRoutesRepository = exports.JISEventsRopidGTFSRoutesReposit
|
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
catch (err) {
|
|
64
|
-
|
|
65
|
-
const mappedErrors = err.errors.map((e) => `${e.message} (${e.value})`).join(", ");
|
|
66
|
-
throw new golemio_errors_1.ValidationError(`Validation error in upsertAll: ${mappedErrors}`, this.constructor.name, err, undefined, "pid");
|
|
67
|
-
}
|
|
68
|
-
throw new golemio_errors_1.GeneralError("Error in upsertAll", this.constructor.name, err);
|
|
65
|
+
RepositoryUtils_1.RepositoryUtils.mapSequelizeError(err, this.constructor.name, "upsertAll");
|
|
69
66
|
}
|
|
70
67
|
}
|
|
71
68
|
getUpdateAttributes() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISEventsRopidGTFSRoutesRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISEventsRopidGTFSRoutesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,wHAA8F;AAI9F,8IAA2I;AAC3I,wEAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"JISEventsRopidGTFSRoutesRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISEventsRopidGTFSRoutesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,wHAA8F;AAI9F,8IAA2I;AAC3I,wEAAqE;AACrE,6EAAwE;AACxE,mFAAkF;AAClF,mEAAmF;AACnF,iEAAwE;AACxE,kEAA6D;AAOtD,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,6DAA6B;IAOjF,YACyC,SAA6B,EACxC,MAAuB;QAEjD,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAFS,WAAM,GAAN,MAAM,CAAS;QAP9C,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,6DAA6B,CAAC,SAAS,CAAC;QASvD,IAAI,CAAC,SAAS,GAAG,IAAI,uCAAmB,CAAC,oCAAoC,EAAE,6DAA6B,CAAC,UAAU,CAAC,CAAC;QACzH,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,6DAA6B,CAAC,cAAc,EAAE,EAAE,MAAM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CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CACrD,CAAC;IACN,CAAC;CACJ,CAAA;6CA1DY,kCAAkC;IAD9C,IAAA,qBAAU,GAAE;IASJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GATpB,kCAAkC,CA0D9C"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RopidGTFSStopsModel } from "../../ropid-gtfs";
|
|
2
1
|
import { JISInfotextsModel } from "../../../schema-definitions/jis/models/JISInfotextsModel";
|
|
3
2
|
import { IJISInfotext } from "../../../schema-definitions/jis/models/interfaces";
|
|
4
3
|
import { ILogger } from "@golemio/core/dist/helpers";
|
|
@@ -6,27 +5,16 @@ import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postg
|
|
|
6
5
|
import { AbstractValidatableRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository";
|
|
7
6
|
import { JSONSchemaValidator } from "@golemio/core/dist/shared/golemio-validator";
|
|
8
7
|
import { Transaction } from "@golemio/core/dist/shared/sequelize";
|
|
9
|
-
import { JISInfotextsRopidGTFSStopsRepository } from "./JISInfotextsRopidGTFSStopsRepository";
|
|
10
8
|
type RepositoryOptions = {
|
|
11
9
|
transaction?: Transaction;
|
|
12
10
|
};
|
|
13
11
|
export declare class JISInfotextsRepository extends AbstractValidatableRepository {
|
|
14
12
|
private logger;
|
|
15
|
-
private infotextStopRepository;
|
|
16
|
-
private gtfsStopRepository;
|
|
17
13
|
validator: JSONSchemaValidator;
|
|
18
14
|
schema: string;
|
|
19
15
|
tableName: string;
|
|
20
16
|
private sequelizeModel;
|
|
21
|
-
constructor(connector: IDatabaseConnector, logger: ILogger
|
|
22
|
-
/**
|
|
23
|
-
* Delete all items last updated before a given date and time (where their `updated_at` is less than the given limit)
|
|
24
|
-
*
|
|
25
|
-
* @param dateTime The `updated_at` limit, where all items last updated before this limit shall be deleted
|
|
26
|
-
* @param options Options for the operation
|
|
27
|
-
* @returns The number of deleted items
|
|
28
|
-
*/
|
|
29
|
-
deleteAllLastUpdatedBefore(dateTime: Date, options?: RepositoryOptions): Promise<number>;
|
|
17
|
+
constructor(connector: IDatabaseConnector, logger: ILogger);
|
|
30
18
|
/**
|
|
31
19
|
* Refresh all data from VYMI and delete old data
|
|
32
20
|
*
|
|
@@ -40,6 +28,5 @@ export declare class JISInfotextsRepository extends AbstractValidatableRepositor
|
|
|
40
28
|
* @returns The number of deleted items
|
|
41
29
|
*/
|
|
42
30
|
deleteAll(options?: RepositoryOptions): Promise<number>;
|
|
43
|
-
findAll(): Promise<JISInfotextsModel[]>;
|
|
44
31
|
}
|
|
45
32
|
export {};
|