@golemio/pid 3.9.4-dev.1732067049 → 3.9.4-rc.1735840748
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db/example/00_clear_test_data.sql +1 -2
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +1 -0
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/DeparturePresetsRepository.d.ts +0 -2
- package/dist/integration-engine/ropid-gtfs/data-access/DeparturePresetsRepository.js +6 -15
- package/dist/integration-engine/ropid-gtfs/data-access/DeparturePresetsRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.d.ts +1 -8
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +5 -39
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js +0 -6
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +0 -2
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +0 -2
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.js +0 -12
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +0 -6
- package/dist/output-gateway/pid/ioc/OgPidToken.js +0 -6
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.d.ts +0 -1
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +0 -4
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.d.ts +3 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +30 -4
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
- package/docs/openapi-output.yaml +0 -39
- package/package.json +3 -3
- package/db/example/21_ropid_departures_presets_ropidgtfs_stops.sql +0 -6
- package/db/migrations/postgresql/20250312125125-create-presets-ropidgtfs-stops-table.js +0 -53
- package/db/migrations/postgresql/sqls/20250312125125-create-presets-ropidgtfs-stops-table-down.sql +0 -1
- package/db/migrations/postgresql/sqls/20250312125125-create-presets-ropidgtfs-stops-table-up.sql +0 -7
- package/dist/helpers/GtfsStopParser.d.ts +0 -6
- package/dist/helpers/GtfsStopParser.js +0 -44
- package/dist/helpers/GtfsStopParser.js.map +0 -1
- package/dist/integration-engine/jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository.d.ts +0 -13
- package/dist/integration-engine/jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository.js +0 -39
- package/dist/integration-engine/jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository.js.map +0 -1
- package/dist/output-gateway/pid/controllers/v3/V3DeparturesPresetController.d.ts +0 -8
- package/dist/output-gateway/pid/controllers/v3/V3DeparturesPresetController.js +0 -44
- package/dist/output-gateway/pid/controllers/v3/V3DeparturesPresetController.js.map +0 -1
- package/dist/output-gateway/pid/data-access/RopidDeparturesPresetRepository.d.ts +0 -14
- package/dist/output-gateway/pid/data-access/RopidDeparturesPresetRepository.js +0 -82
- package/dist/output-gateway/pid/data-access/RopidDeparturesPresetRepository.js.map +0 -1
- package/dist/output-gateway/pid/data-access/RopidDeparturesPresetsRopidGTFSStopsRepository.d.ts +0 -13
- package/dist/output-gateway/pid/data-access/RopidDeparturesPresetsRopidGTFSStopsRepository.js +0 -39
- package/dist/output-gateway/pid/data-access/RopidDeparturesPresetsRopidGTFSStopsRepository.js.map +0 -1
- package/dist/output-gateway/pid/domain/DeparturesPresetInterfaces.d.ts +0 -6
- package/dist/output-gateway/pid/domain/DeparturesPresetInterfaces.js +0 -3
- package/dist/output-gateway/pid/domain/DeparturesPresetInterfaces.js.map +0 -1
- package/dist/output-gateway/pid/service/facade/RopidDeparturesPresetFacade.d.ts +0 -9
- package/dist/output-gateway/pid/service/facade/RopidDeparturesPresetFacade.js +0 -37
- package/dist/output-gateway/pid/service/facade/RopidDeparturesPresetFacade.js.map +0 -1
- package/dist/output-gateway/pid/service/transformations/RopidDeparturesPresetTransformation.d.ts +0 -7
- package/dist/output-gateway/pid/service/transformations/RopidDeparturesPresetTransformation.js +0 -30
- package/dist/output-gateway/pid/service/transformations/RopidDeparturesPresetTransformation.js.map +0 -1
- package/dist/schema-definitions/jis/models/RopidDeparturesPresetsRopidGTFSStopsModel.d.ts +0 -12
- package/dist/schema-definitions/jis/models/RopidDeparturesPresetsRopidGTFSStopsModel.js +0 -41
- package/dist/schema-definitions/jis/models/RopidDeparturesPresetsRopidGTFSStopsModel.js.map +0 -1
- package/dist/schema-definitions/jis/models/interfaces/IPresetsGtfsStops.d.ts +0 -4
- package/dist/schema-definitions/jis/models/interfaces/IPresetsGtfsStops.js +0 -3
- package/dist/schema-definitions/jis/models/interfaces/IPresetsGtfsStops.js.map +0 -1
- package/dist/schema-definitions/jis/models/interfaces/IPresetsRopidGTFSStops.d.ts +0 -7
- package/dist/schema-definitions/jis/models/interfaces/IPresetsRopidGTFSStops.js +0 -3
- package/dist/schema-definitions/jis/models/interfaces/IPresetsRopidGTFSStops.js.map +0 -1
- package/dist/schema-definitions/ropid-departures-presets/models/RopidDeparturesPresetsModel.d.ts +0 -19
- package/dist/schema-definitions/ropid-departures-presets/models/RopidDeparturesPresetsModel.js +0 -64
- package/dist/schema-definitions/ropid-departures-presets/models/RopidDeparturesPresetsModel.js.map +0 -1
- package/dist/schema-definitions/ropid-departures-presets/models/interfaces/IRopidDeparturesPresets.d.ts +0 -9
- package/dist/schema-definitions/ropid-departures-presets/models/interfaces/IRopidDeparturesPresets.js +0 -3
- package/dist/schema-definitions/ropid-departures-presets/models/interfaces/IRopidDeparturesPresets.js.map +0 -1
package/docs/openapi-output.yaml
CHANGED
|
@@ -33,8 +33,6 @@ tags:
|
|
|
33
33
|
|
|
34
34
|
- name: 🚏 PID Departure Boards (v3)
|
|
35
35
|
description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" /> <img src="https://img.shields.io/badge/stability-experimental-orange" alt="golemioapi-stability-badge" />
|
|
36
|
-
- name: 🚏 PID Departure Boards (v3) - internal
|
|
37
|
-
description: Endpoints for internal use
|
|
38
36
|
|
|
39
37
|
- name: 🗓️ Public GTFS Static Lookup (v2)
|
|
40
38
|
description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />
|
|
@@ -1334,43 +1332,6 @@ paths:
|
|
|
1334
1332
|
$ref: "#/components/responses/UnauthorizedError"
|
|
1335
1333
|
"404":
|
|
1336
1334
|
description: Not found
|
|
1337
|
-
/v3/pid/departurepresets:
|
|
1338
|
-
get:
|
|
1339
|
-
summary: Get ROPID departures presets linked with gtfs stops
|
|
1340
|
-
tags:
|
|
1341
|
-
- 🚏 PID Departure Boards (v3) - internal
|
|
1342
|
-
|
|
1343
|
-
responses:
|
|
1344
|
-
200:
|
|
1345
|
-
|
|
1346
|
-
description: A list of ROPID departures presets linked with gtfs stops
|
|
1347
|
-
headers:
|
|
1348
|
-
Cache-Control:
|
|
1349
|
-
description: Cache control directive for caching proxies
|
|
1350
|
-
schema:
|
|
1351
|
-
type: string
|
|
1352
|
-
example: public, s-maxage=25, stale-while-revalidate=10
|
|
1353
|
-
content:
|
|
1354
|
-
application/json:
|
|
1355
|
-
schema:
|
|
1356
|
-
type: array
|
|
1357
|
-
items:
|
|
1358
|
-
type: object
|
|
1359
|
-
properties:
|
|
1360
|
-
note:
|
|
1361
|
-
type: string
|
|
1362
|
-
example: "Nádraží Klánovice vlaky"
|
|
1363
|
-
route_name:
|
|
1364
|
-
type: string
|
|
1365
|
-
example: "nadrazi-klanovice-vlaky-xxxx"
|
|
1366
|
-
is_testing:
|
|
1367
|
-
type: boolean
|
|
1368
|
-
example: false
|
|
1369
|
-
stops:
|
|
1370
|
-
type: array
|
|
1371
|
-
items:
|
|
1372
|
-
type: string
|
|
1373
|
-
example: ["U454Z301"]
|
|
1374
1335
|
|
|
1375
1336
|
/v2/public/gtfs/trips/{gtfsTripId}:
|
|
1376
1337
|
get:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/pid",
|
|
3
|
-
"version": "3.9.4-
|
|
3
|
+
"version": "3.9.4-rc.1735840748",
|
|
4
4
|
"description": "Golemio PID Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@commitlint/cli": "^11.0.0",
|
|
38
38
|
"@commitlint/config-conventional": "^11.0.0",
|
|
39
39
|
"@golemio/cli": "1.9.2",
|
|
40
|
-
"@golemio/core": "1.20.
|
|
40
|
+
"@golemio/core": "1.20.3",
|
|
41
41
|
"@golemio/db-common": "1.1.4",
|
|
42
42
|
"@golemio/eslint-config": "1.1.2",
|
|
43
43
|
"@types/amqplib": "^0.5.17",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@golemio/core": ">=1.16.0-rc.1551191551"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@golemio/ovapi-gtfs-realtime-bindings": "1.2.
|
|
79
|
+
"@golemio/ovapi-gtfs-realtime-bindings": "1.2.3",
|
|
80
80
|
"@turf/turf": "^6.5.0",
|
|
81
81
|
"cheap-ruler": "^3.0.2",
|
|
82
82
|
"csv-parser": "^3.0.0",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
INSERT INTO ropid_departures_presets (route_name,api_version,route,url_query_params,note,create_batch_id,created_at,created_by,update_batch_id,updated_at,updated_by,is_testing) VALUES
|
|
3
|
-
('Haje-testovaci',2,'/pid/departureboards','minutesAfter=180&limit=8&mode=departures&filter=routeHeadingOnceNoGapFill&order=real&aswIds=285_1','Testovací tabule pro Haje',NULL,now(),NULL,NULL,now(),NULL,false);
|
|
4
|
-
|
|
5
|
-
INSERT INTO ropid_departures_presets_ropidgtfs_stops (preset_id, stop_id, created_at, updated_at) VALUES
|
|
6
|
-
(3,'U286Z1P', now(), now())
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var dbm;
|
|
4
|
-
var type;
|
|
5
|
-
var seed;
|
|
6
|
-
var fs = require('fs');
|
|
7
|
-
var path = require('path');
|
|
8
|
-
var Promise;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
12
|
-
* This enables us to not have to rely on NODE_PATH.
|
|
13
|
-
*/
|
|
14
|
-
exports.setup = function(options, seedLink) {
|
|
15
|
-
dbm = options.dbmigrate;
|
|
16
|
-
type = dbm.dataType;
|
|
17
|
-
seed = seedLink;
|
|
18
|
-
Promise = options.Promise;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.up = function(db) {
|
|
22
|
-
var filePath = path.join(__dirname, 'sqls', '20250312125125-create-presets-ropidgtfs-stops-table-up.sql');
|
|
23
|
-
return new Promise( function( resolve, reject ) {
|
|
24
|
-
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
25
|
-
if (err) return reject(err);
|
|
26
|
-
console.log('received data: ' + data);
|
|
27
|
-
|
|
28
|
-
resolve(data);
|
|
29
|
-
});
|
|
30
|
-
})
|
|
31
|
-
.then(function(data) {
|
|
32
|
-
return db.runSql(data);
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
exports.down = function(db) {
|
|
37
|
-
var filePath = path.join(__dirname, 'sqls', '20250312125125-create-presets-ropidgtfs-stops-table-down.sql');
|
|
38
|
-
return new Promise( function( resolve, reject ) {
|
|
39
|
-
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
40
|
-
if (err) return reject(err);
|
|
41
|
-
console.log('received data: ' + data);
|
|
42
|
-
|
|
43
|
-
resolve(data);
|
|
44
|
-
});
|
|
45
|
-
})
|
|
46
|
-
.then(function(data) {
|
|
47
|
-
return db.runSql(data);
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
exports._meta = {
|
|
52
|
-
"version": 1
|
|
53
|
-
};
|
package/db/migrations/postgresql/sqls/20250312125125-create-presets-ropidgtfs-stops-table-down.sql
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
DROP TABLE ropid_departures_presets_ropidgtfs_stops
|
package/db/migrations/postgresql/sqls/20250312125125-create-presets-ropidgtfs-stops-table-up.sql
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
CREATE TABLE ropid_departures_presets_ropidgtfs_stops (
|
|
2
|
-
preset_id INT NOT NULL,
|
|
3
|
-
stop_id varchar(50) NOT NULL,
|
|
4
|
-
created_at timestamptz NOT NULL,
|
|
5
|
-
updated_at timestamptz NOT NULL,
|
|
6
|
-
CONSTRAINT ropid_departures_presets_ropidgtfs_stops_pk PRIMARY KEY (preset_id, stop_id)
|
|
7
|
-
);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.GtfsStopParser = void 0;
|
|
10
|
-
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
11
|
-
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
12
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
13
|
-
const const_1 = require("../const");
|
|
14
|
-
let GtfsStopParser = exports.GtfsStopParser = class GtfsStopParser {
|
|
15
|
-
prepareAswWhereOptions(aswIds) {
|
|
16
|
-
let aswWhereOptions = [];
|
|
17
|
-
for (const aswId of aswIds) {
|
|
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) {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
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)));
|
|
28
|
-
}
|
|
29
|
-
return aswWhereOptions;
|
|
30
|
-
}
|
|
31
|
-
isValidInteger(value) {
|
|
32
|
-
return value >= const_1.PG_INT_MIN && value <= const_1.PG_INT_MAX;
|
|
33
|
-
}
|
|
34
|
-
validateAswId(aswId, nodeId, stopId) {
|
|
35
|
-
const nodeIdNum = Number(nodeId);
|
|
36
|
-
if (!this.isValidInteger(nodeIdNum) || (stopId && !this.isValidInteger(Number(stopId)))) {
|
|
37
|
-
throw new golemio_errors_1.GeneralError(`Invalid ASW ID: ${aswId}`, this.constructor.name, `Invalid ASW ID: ${aswId}`, 400);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
exports.GtfsStopParser = GtfsStopParser = __decorate([
|
|
42
|
-
(0, tsyringe_1.injectable)()
|
|
43
|
-
], GtfsStopParser);
|
|
44
|
-
//# sourceMappingURL=GtfsStopParser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/integration-engine/jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RopidDeparturesPresetsRopidGTFSStopsModel } from "../../../schema-definitions/jis/models/RopidDeparturesPresetsRopidGTFSStopsModel";
|
|
2
|
-
import { ILogger } from "@golemio/core/dist/helpers";
|
|
3
|
-
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
4
|
-
import { AbstractValidatableRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository";
|
|
5
|
-
import { JSONSchemaValidator } from "@golemio/core/dist/shared/golemio-validator";
|
|
6
|
-
import { ModelStatic } from "@golemio/core/dist/shared/sequelize";
|
|
7
|
-
export declare class RopidDeparturesPresetsRopidGTFSStopsRepository extends AbstractValidatableRepository {
|
|
8
|
-
validator: JSONSchemaValidator;
|
|
9
|
-
schema: string;
|
|
10
|
-
tableName: string;
|
|
11
|
-
sequelizeModel: ModelStatic<RopidDeparturesPresetsRopidGTFSStopsModel>;
|
|
12
|
-
constructor(connector: IDatabaseConnector, logger: ILogger);
|
|
13
|
-
}
|
package/dist/integration-engine/jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RopidDeparturesPresetsRopidGTFSStopsRepository = void 0;
|
|
16
|
-
const const_1 = require("../../../schema-definitions/const");
|
|
17
|
-
const RopidDeparturesPresetsRopidGTFSStopsModel_1 = require("../../../schema-definitions/jis/models/RopidDeparturesPresetsRopidGTFSStopsModel");
|
|
18
|
-
const AbstractValidatableRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository");
|
|
19
|
-
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
20
|
-
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
21
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
22
|
-
let RopidDeparturesPresetsRopidGTFSStopsRepository = exports.RopidDeparturesPresetsRopidGTFSStopsRepository = class RopidDeparturesPresetsRopidGTFSStopsRepository extends AbstractValidatableRepository_1.AbstractValidatableRepository {
|
|
23
|
-
constructor(connector, logger) {
|
|
24
|
-
super(connector, logger);
|
|
25
|
-
this.schema = const_1.PG_SCHEMA;
|
|
26
|
-
this.tableName = RopidDeparturesPresetsRopidGTFSStopsModel_1.RopidDeparturesPresetsRopidGTFSStopsModel.tableName;
|
|
27
|
-
this.validator = new golemio_validator_1.JSONSchemaValidator("RopidDeparturesPresetsRopidGTFSStopsRepository", RopidDeparturesPresetsRopidGTFSStopsModel_1.RopidDeparturesPresetsRopidGTFSStopsModel.jsonSchema);
|
|
28
|
-
this.sequelizeModel = connector
|
|
29
|
-
.getConnection()
|
|
30
|
-
.define(this.tableName, RopidDeparturesPresetsRopidGTFSStopsModel_1.RopidDeparturesPresetsRopidGTFSStopsModel.attributeModel, { schema: this.schema });
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.RopidDeparturesPresetsRopidGTFSStopsRepository = RopidDeparturesPresetsRopidGTFSStopsRepository = __decorate([
|
|
34
|
-
(0, tsyringe_1.injectable)(),
|
|
35
|
-
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
36
|
-
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
37
|
-
__metadata("design:paramtypes", [Object, Object])
|
|
38
|
-
], RopidDeparturesPresetsRopidGTFSStopsRepository);
|
|
39
|
-
//# sourceMappingURL=RopidDeparturesPresetsRopidGTFSStopsRepository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidDeparturesPresetsRopidGTFSStopsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/RopidDeparturesPresetsRopidGTFSStopsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,gJAAsH;AAGtH,8IAA2I;AAC3I,wEAAqE;AACrE,mFAAkF;AAElF,iEAAwE;AAGjE,IAAM,8CAA8C,4DAApD,MAAM,8CAA+C,SAAQ,6DAA6B;IAM7F,YAAiD,SAA6B,EAA4B,MAAe;QACrH,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QALtB,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,qFAAyC,CAAC,SAAS,CAAC;QAKnE,IAAI,CAAC,SAAS,GAAG,IAAI,uCAAmB,CACpC,gDAAgD,EAChD,qFAAyC,CAAC,UAAU,CACvD,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,qFAAyC,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACnH,CAAC;CACJ,CAAA;yDAhBY,8CAA8C;IAD1D,IAAA,qBAAU,GAAE;IAOI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IAAiC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GANhG,8CAA8C,CAgB1D"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="express" />
|
|
2
|
-
import { RopidDeparturesPresetFacade } from "../../service/facade/RopidDeparturesPresetFacade";
|
|
3
|
-
import { RequestHandler } from "@golemio/core/dist/shared/express";
|
|
4
|
-
export declare class V3RopidDeparturesPresetController {
|
|
5
|
-
private ropidDeparturesPresetFacade;
|
|
6
|
-
constructor(ropidDeparturesPresetFacade: RopidDeparturesPresetFacade);
|
|
7
|
-
getDeparturesPresets: RequestHandler;
|
|
8
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.V3RopidDeparturesPresetController = void 0;
|
|
16
|
-
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
17
|
-
const RopidDeparturesPresetFacade_1 = require("../../service/facade/RopidDeparturesPresetFacade");
|
|
18
|
-
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
19
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
20
|
-
let V3RopidDeparturesPresetController = exports.V3RopidDeparturesPresetController = class V3RopidDeparturesPresetController {
|
|
21
|
-
constructor(ropidDeparturesPresetFacade) {
|
|
22
|
-
this.ropidDeparturesPresetFacade = ropidDeparturesPresetFacade;
|
|
23
|
-
this.getDeparturesPresets = async (_req, res, next) => {
|
|
24
|
-
const span = (0, trace_provider_1.createChildSpan)("V3RopidDeparturesPresetController.getDeparturesPresets");
|
|
25
|
-
try {
|
|
26
|
-
const outputDto = await this.ropidDeparturesPresetFacade.getRopidDeparturesPreset();
|
|
27
|
-
return res.status(200).send(outputDto);
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
span?.recordException(err);
|
|
31
|
-
next(err);
|
|
32
|
-
}
|
|
33
|
-
finally {
|
|
34
|
-
span?.end();
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
exports.V3RopidDeparturesPresetController = V3RopidDeparturesPresetController = __decorate([
|
|
40
|
-
(0, tsyringe_1.injectable)(),
|
|
41
|
-
__param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.RopidDeparturesPresetFacade)),
|
|
42
|
-
__metadata("design:paramtypes", [RopidDeparturesPresetFacade_1.RopidDeparturesPresetFacade])
|
|
43
|
-
], V3RopidDeparturesPresetController);
|
|
44
|
-
//# sourceMappingURL=V3DeparturesPresetController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"V3DeparturesPresetController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v3/V3DeparturesPresetController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qDAAoD;AACpD,kGAAiG;AACjG,+FAA6F;AAE7F,iEAAwE;AAGjE,IAAM,iCAAiC,+CAAvC,MAAM,iCAAiC;IAC1C,YACoD,2BAAgE;QAAxD,gCAA2B,GAA3B,2BAA2B,CAA6B;QAG7G,yBAAoB,GAAmB,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACpE,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,wDAAwD,CAAC,CAAC;YAEvF,IAAI;gBACA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,wBAAwB,EAAE,CAAC;gBACpF,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC1C;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;gBAC3B,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,EAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAC;IAdC,CAAC;CAeP,CAAA;4CAlBY,iCAAiC;IAD7C,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,2BAA2B,CAAC,CAAA;qCAAsC,yDAA2B;GAF3G,iCAAiC,CAkB7C"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RopidDeparturesPresetsModel } from "../../../schema-definitions/ropid-departures-presets/models/RopidDeparturesPresetsModel";
|
|
2
|
-
import { ILogger } from "@golemio/core/dist/helpers";
|
|
3
|
-
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
4
|
-
import { AbstractBasicRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository";
|
|
5
|
-
import { ModelStatic } from "@golemio/core/dist/shared/sequelize";
|
|
6
|
-
import { RopidDeparturesPresetsRopidGTFSStopsRepository } from "./RopidDeparturesPresetsRopidGTFSStopsRepository";
|
|
7
|
-
export declare class RopidDeparturesPresetRepository extends AbstractBasicRepository {
|
|
8
|
-
schema: string;
|
|
9
|
-
tableName: string;
|
|
10
|
-
sequelizeModel: ModelStatic<RopidDeparturesPresetsModel>;
|
|
11
|
-
private gtfsStopRepository;
|
|
12
|
-
constructor(connector: IDatabaseConnector, logger: ILogger, presetStopRepository: RopidDeparturesPresetsRopidGTFSStopsRepository);
|
|
13
|
-
getAllWithStops(): Promise<RopidDeparturesPresetsModel[]>;
|
|
14
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RopidDeparturesPresetRepository = void 0;
|
|
16
|
-
const const_1 = require("../../../schema-definitions/const");
|
|
17
|
-
const RopidDeparturesPresetsModel_1 = require("../../../schema-definitions/ropid-departures-presets/models/RopidDeparturesPresetsModel");
|
|
18
|
-
const AbstractBasicRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository");
|
|
19
|
-
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
20
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
21
|
-
const OgPidToken_1 = require("../ioc/OgPidToken");
|
|
22
|
-
const RopidDeparturesPresetsRopidGTFSStopsRepository_1 = require("./RopidDeparturesPresetsRopidGTFSStopsRepository");
|
|
23
|
-
const GTFSStopModel_1 = require("../../ropid-gtfs/models/GTFSStopModel");
|
|
24
|
-
let RopidDeparturesPresetRepository = exports.RopidDeparturesPresetRepository = class RopidDeparturesPresetRepository extends AbstractBasicRepository_1.AbstractBasicRepository {
|
|
25
|
-
constructor(connector, logger, presetStopRepository) {
|
|
26
|
-
super(connector, logger);
|
|
27
|
-
this.schema = const_1.PG_SCHEMA;
|
|
28
|
-
this.tableName = RopidDeparturesPresetsModel_1.RopidDeparturesPresetsModel.tableName;
|
|
29
|
-
this.sequelizeModel = connector
|
|
30
|
-
.getConnection()
|
|
31
|
-
.define(this.tableName, RopidDeparturesPresetsModel_1.RopidDeparturesPresetsModel.attributeModel, { schema: this.schema });
|
|
32
|
-
this.gtfsStopRepository = new GTFSStopModel_1.GTFSStopModel();
|
|
33
|
-
// associations
|
|
34
|
-
this.sequelizeModel.belongsToMany(this.gtfsStopRepository.sequelizeModel, {
|
|
35
|
-
through: presetStopRepository.sequelizeModel,
|
|
36
|
-
foreignKey: "preset_id",
|
|
37
|
-
otherKey: "stop_id",
|
|
38
|
-
as: "stops",
|
|
39
|
-
});
|
|
40
|
-
this.gtfsStopRepository.sequelizeModel.belongsToMany(this.sequelizeModel, {
|
|
41
|
-
through: presetStopRepository.sequelizeModel,
|
|
42
|
-
foreignKey: "stop_id",
|
|
43
|
-
otherKey: "preset_id",
|
|
44
|
-
});
|
|
45
|
-
presetStopRepository.sequelizeModel.belongsTo(this.sequelizeModel, {
|
|
46
|
-
targetKey: "id",
|
|
47
|
-
foreignKey: "preset_id",
|
|
48
|
-
});
|
|
49
|
-
presetStopRepository.sequelizeModel.belongsTo(this.gtfsStopRepository.sequelizeModel, {
|
|
50
|
-
targetKey: "stop_id",
|
|
51
|
-
foreignKey: "stop_id",
|
|
52
|
-
});
|
|
53
|
-
this.sequelizeModel.hasMany(presetStopRepository.sequelizeModel, {
|
|
54
|
-
sourceKey: "id",
|
|
55
|
-
foreignKey: "preset_id",
|
|
56
|
-
});
|
|
57
|
-
this.gtfsStopRepository.sequelizeModel.hasMany(presetStopRepository.sequelizeModel, {
|
|
58
|
-
sourceKey: "stop_id",
|
|
59
|
-
foreignKey: "stop_id",
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
async getAllWithStops() {
|
|
63
|
-
return await this.sequelizeModel.findAll({
|
|
64
|
-
include: {
|
|
65
|
-
model: this.gtfsStopRepository.sequelizeModel,
|
|
66
|
-
as: "stops",
|
|
67
|
-
attributes: ["stop_id"],
|
|
68
|
-
through: { attributes: [] },
|
|
69
|
-
required: true,
|
|
70
|
-
},
|
|
71
|
-
attributes: ["route_name", "note", "is_testing"],
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
exports.RopidDeparturesPresetRepository = RopidDeparturesPresetRepository = __decorate([
|
|
76
|
-
(0, tsyringe_1.injectable)(),
|
|
77
|
-
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
78
|
-
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
79
|
-
__param(2, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.RopidDeparturesPresetsRopidGTFSStopsRepository)),
|
|
80
|
-
__metadata("design:paramtypes", [Object, Object, RopidDeparturesPresetsRopidGTFSStopsRepository_1.RopidDeparturesPresetsRopidGTFSStopsRepository])
|
|
81
|
-
], RopidDeparturesPresetRepository);
|
|
82
|
-
//# sourceMappingURL=RopidDeparturesPresetRepository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidDeparturesPresetRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/data-access/RopidDeparturesPresetRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,yIAA+G;AAG/G,kIAA+H;AAC/H,wEAAqE;AAErE,iEAAwE;AACxE,kDAA+C;AAC/C,qHAAkH;AAClH,yEAAoE;AAG7D,IAAM,+BAA+B,6CAArC,MAAM,+BAAgC,SAAQ,iDAAuB;IAMxE,YACyC,SAA6B,EACxC,MAAe,EAEzC,oBAAoE;QAEpE,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAXtB,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,yDAA2B,CAAC,SAAS,CAAC;QAWrD,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,yDAA2B,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAEjG,IAAI,CAAC,kBAAkB,GAAG,IAAI,6BAAa,EAAE,CAAC;QAC9C,eAAe;QACf,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE;YACtE,OAAO,EAAE,oBAAoB,CAAC,cAAc;YAC5C,UAAU,EAAE,WAAW;YACvB,QAAQ,EAAE,SAAS;YACnB,EAAE,EAAE,OAAO;SACd,CAAC,CAAC;QACH,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE;YACtE,OAAO,EAAE,oBAAoB,CAAC,cAAc;YAC5C,UAAU,EAAE,SAAS;YACrB,QAAQ,EAAE,WAAW;SACxB,CAAC,CAAC;QACH,oBAAoB,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,EAAE;YAC/D,SAAS,EAAE,IAAI;YACf,UAAU,EAAE,WAAW;SAC1B,CAAC,CAAC;QACH,oBAAoB,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE;YAClF,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,SAAS;SACxB,CAAC,CAAC;QACH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,oBAAoB,CAAC,cAAc,EAAE;YAC7D,SAAS,EAAE,IAAI;YACf,UAAU,EAAE,WAAW;SAC1B,CAAC,CAAC;QACH,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,OAAO,CAAC,oBAAoB,CAAC,cAAc,EAAE;YAChF,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,SAAS;SACxB,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,eAAe;QACjB,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;YACrC,OAAO,EAAE;gBACL,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC,cAAc;gBAC7C,EAAE,EAAE,OAAO;gBACX,UAAU,EAAE,CAAC,SAAS,CAAC;gBACvB,OAAO,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;gBAC3B,QAAQ,EAAE,IAAI;aACjB;YACD,UAAU,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,CAAC;SACnD,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;0CA5DY,+BAA+B;IAD3C,IAAA,qBAAU,GAAE;IAQJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;IACxB,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,8CAA8C,CAAC,CAAA;qDAC5C,+FAA8C;GAV/D,+BAA+B,CA4D3C"}
|
package/dist/output-gateway/pid/data-access/RopidDeparturesPresetsRopidGTFSStopsRepository.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RopidDeparturesPresetsRopidGTFSStopsModel } from "../../../schema-definitions/jis/models/RopidDeparturesPresetsRopidGTFSStopsModel";
|
|
2
|
-
import { ILogger } from "@golemio/core/dist/helpers";
|
|
3
|
-
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
4
|
-
import { AbstractValidatableRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository";
|
|
5
|
-
import { JSONSchemaValidator } from "@golemio/core/dist/shared/golemio-validator";
|
|
6
|
-
import { ModelStatic } from "@golemio/core/dist/shared/sequelize";
|
|
7
|
-
export declare class RopidDeparturesPresetsRopidGTFSStopsRepository extends AbstractValidatableRepository {
|
|
8
|
-
validator: JSONSchemaValidator;
|
|
9
|
-
schema: string;
|
|
10
|
-
tableName: string;
|
|
11
|
-
sequelizeModel: ModelStatic<RopidDeparturesPresetsRopidGTFSStopsModel>;
|
|
12
|
-
constructor(connector: IDatabaseConnector, logger: ILogger);
|
|
13
|
-
}
|
package/dist/output-gateway/pid/data-access/RopidDeparturesPresetsRopidGTFSStopsRepository.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RopidDeparturesPresetsRopidGTFSStopsRepository = void 0;
|
|
16
|
-
const const_1 = require("../../../schema-definitions/const");
|
|
17
|
-
const RopidDeparturesPresetsRopidGTFSStopsModel_1 = require("../../../schema-definitions/jis/models/RopidDeparturesPresetsRopidGTFSStopsModel");
|
|
18
|
-
const AbstractValidatableRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository");
|
|
19
|
-
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
20
|
-
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
21
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
22
|
-
let RopidDeparturesPresetsRopidGTFSStopsRepository = exports.RopidDeparturesPresetsRopidGTFSStopsRepository = class RopidDeparturesPresetsRopidGTFSStopsRepository extends AbstractValidatableRepository_1.AbstractValidatableRepository {
|
|
23
|
-
constructor(connector, logger) {
|
|
24
|
-
super(connector, logger);
|
|
25
|
-
this.schema = const_1.PG_SCHEMA;
|
|
26
|
-
this.tableName = RopidDeparturesPresetsRopidGTFSStopsModel_1.RopidDeparturesPresetsRopidGTFSStopsModel.tableName;
|
|
27
|
-
this.validator = new golemio_validator_1.JSONSchemaValidator("RopidDeparturesPresetsRopidGTFSStopsRepository", RopidDeparturesPresetsRopidGTFSStopsModel_1.RopidDeparturesPresetsRopidGTFSStopsModel.jsonSchema);
|
|
28
|
-
this.sequelizeModel = connector
|
|
29
|
-
.getConnection()
|
|
30
|
-
.define(this.tableName, RopidDeparturesPresetsRopidGTFSStopsModel_1.RopidDeparturesPresetsRopidGTFSStopsModel.attributeModel, { schema: this.schema });
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.RopidDeparturesPresetsRopidGTFSStopsRepository = RopidDeparturesPresetsRopidGTFSStopsRepository = __decorate([
|
|
34
|
-
(0, tsyringe_1.injectable)(),
|
|
35
|
-
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
36
|
-
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
37
|
-
__metadata("design:paramtypes", [Object, Object])
|
|
38
|
-
], RopidDeparturesPresetsRopidGTFSStopsRepository);
|
|
39
|
-
//# sourceMappingURL=RopidDeparturesPresetsRopidGTFSStopsRepository.js.map
|
package/dist/output-gateway/pid/data-access/RopidDeparturesPresetsRopidGTFSStopsRepository.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidDeparturesPresetsRopidGTFSStopsRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/data-access/RopidDeparturesPresetsRopidGTFSStopsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,gJAAsH;AAGtH,8IAA2I;AAC3I,wEAAqE;AACrE,mFAAkF;AAElF,iEAAwE;AAGjE,IAAM,8CAA8C,4DAApD,MAAM,8CAA+C,SAAQ,6DAA6B;IAM7F,YAAiD,SAA6B,EAA4B,MAAe;QACrH,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QALtB,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,qFAAyC,CAAC,SAAS,CAAC;QAKnE,IAAI,CAAC,SAAS,GAAG,IAAI,uCAAmB,CACpC,gDAAgD,EAChD,qFAAyC,CAAC,UAAU,CACvD,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,qFAAyC,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACnH,CAAC;CACJ,CAAA;yDAhBY,8CAA8C;IAD1D,IAAA,qBAAU,GAAE;IAOI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IAAiC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GANhG,8CAA8C,CAgB1D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeparturesPresetInterfaces.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/domain/DeparturesPresetInterfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { RopidDeparturesPresetRepository } from "../../data-access/RopidDeparturesPresetRepository";
|
|
2
|
-
import { RopidDeparturesPresetTransformation } from "../transformations/RopidDeparturesPresetTransformation";
|
|
3
|
-
import { IDeparturesPresetOutputDto } from "../../domain/DeparturesPresetInterfaces";
|
|
4
|
-
export declare class RopidDeparturesPresetFacade {
|
|
5
|
-
private ropidDeparturesPresetRepository;
|
|
6
|
-
private ropidDeparturesPresetTransformation;
|
|
7
|
-
constructor(ropidDeparturesPresetRepository: RopidDeparturesPresetRepository, ropidDeparturesPresetTransformation: RopidDeparturesPresetTransformation);
|
|
8
|
-
getRopidDeparturesPreset(): Promise<IDeparturesPresetOutputDto[]>;
|
|
9
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RopidDeparturesPresetFacade = void 0;
|
|
16
|
-
const RopidDeparturesPresetRepository_1 = require("../../data-access/RopidDeparturesPresetRepository");
|
|
17
|
-
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
18
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
19
|
-
const RopidDeparturesPresetTransformation_1 = require("../transformations/RopidDeparturesPresetTransformation");
|
|
20
|
-
let RopidDeparturesPresetFacade = exports.RopidDeparturesPresetFacade = class RopidDeparturesPresetFacade {
|
|
21
|
-
constructor(ropidDeparturesPresetRepository, ropidDeparturesPresetTransformation) {
|
|
22
|
-
this.ropidDeparturesPresetRepository = ropidDeparturesPresetRepository;
|
|
23
|
-
this.ropidDeparturesPresetTransformation = ropidDeparturesPresetTransformation;
|
|
24
|
-
}
|
|
25
|
-
async getRopidDeparturesPreset() {
|
|
26
|
-
const presets = await this.ropidDeparturesPresetRepository.getAllWithStops();
|
|
27
|
-
return this.ropidDeparturesPresetTransformation.transformArray(presets);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
exports.RopidDeparturesPresetFacade = RopidDeparturesPresetFacade = __decorate([
|
|
31
|
-
(0, tsyringe_1.injectable)(),
|
|
32
|
-
__param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.RopidDeparturesPresetRepository)),
|
|
33
|
-
__param(1, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.RopidDeparturesPresetTransformation)),
|
|
34
|
-
__metadata("design:paramtypes", [RopidDeparturesPresetRepository_1.RopidDeparturesPresetRepository,
|
|
35
|
-
RopidDeparturesPresetTransformation_1.RopidDeparturesPresetTransformation])
|
|
36
|
-
], RopidDeparturesPresetFacade);
|
|
37
|
-
//# sourceMappingURL=RopidDeparturesPresetFacade.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidDeparturesPresetFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/RopidDeparturesPresetFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uGAAsG;AACtG,qDAAoD;AACpD,iEAAwE;AACxE,gHAA6G;AAItG,IAAM,2BAA2B,yCAAjC,MAAM,2BAA2B;IACpC,YAEY,+BAAgE,EAEhE,mCAAwE;QAFxE,oCAA+B,GAA/B,+BAA+B,CAAiC;QAEhE,wCAAmC,GAAnC,mCAAmC,CAAqC;IACjF,CAAC;IAEJ,KAAK,CAAC,wBAAwB;QAC1B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,+BAA+B,CAAC,eAAe,EAAE,CAAC;QAE7E,OAAO,IAAI,CAAC,mCAAmC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAC5E,CAAC;CACJ,CAAA;sCAbY,2BAA2B;IADvC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,+BAA+B,CAAC,CAAA;IAElD,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,mCAAmC,CAAC,CAAA;qCADd,iEAA+B;QAE3B,yEAAmC;GAL3E,2BAA2B,CAavC"}
|
package/dist/output-gateway/pid/service/transformations/RopidDeparturesPresetTransformation.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
2
|
-
import { IDeparturesPresetOutputDto } from "../../domain/DeparturesPresetInterfaces";
|
|
3
|
-
import { RopidDeparturesPresetsModel } from "../../../../schema-definitions/ropid-departures-presets/models/RopidDeparturesPresetsModel";
|
|
4
|
-
export declare class RopidDeparturesPresetTransformation extends AbstractTransformation<RopidDeparturesPresetsModel, IDeparturesPresetOutputDto> {
|
|
5
|
-
name: string;
|
|
6
|
-
protected transformInternal: (preset: RopidDeparturesPresetsModel) => IDeparturesPresetOutputDto;
|
|
7
|
-
}
|
package/dist/output-gateway/pid/service/transformations/RopidDeparturesPresetTransformation.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.RopidDeparturesPresetTransformation = void 0;
|
|
10
|
-
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
11
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
12
|
-
let RopidDeparturesPresetTransformation = exports.RopidDeparturesPresetTransformation = class RopidDeparturesPresetTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.name = "RopidDeparturesPresetTransformation";
|
|
16
|
-
this.transformInternal = (preset) => {
|
|
17
|
-
const stops = preset.stops ?? [];
|
|
18
|
-
return {
|
|
19
|
-
note: preset.note,
|
|
20
|
-
route_name: preset.route_name,
|
|
21
|
-
is_testing: preset.is_testing,
|
|
22
|
-
stops: stops.map(({ stop_id }) => stop_id),
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.RopidDeparturesPresetTransformation = RopidDeparturesPresetTransformation = __decorate([
|
|
28
|
-
(0, tsyringe_1.injectable)()
|
|
29
|
-
], RopidDeparturesPresetTransformation);
|
|
30
|
-
//# sourceMappingURL=RopidDeparturesPresetTransformation.js.map
|
package/dist/output-gateway/pid/service/transformations/RopidDeparturesPresetTransformation.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidDeparturesPresetTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/RopidDeparturesPresetTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6GAA0G;AAC1G,iEAAgE;AAKzD,IAAM,mCAAmC,iDAAzC,MAAM,mCAAoC,SAAQ,+CAGxD;IAHM;;QAII,SAAI,GAAG,qCAAqC,CAAC;QAE1C,sBAAiB,GAAG,CAAC,MAAmC,EAA8B,EAAE;YAC9F,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YACjC,OAAO;gBACH,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC;aAC7C,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;8CAfY,mCAAmC;IAD/C,IAAA,qBAAU,GAAE;GACA,mCAAmC,CAe/C"}
|