@golemio/pid 3.9.5-dev.1740291889 → 3.10.0-dev.1754453580
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/db/example/03_ropidgtfs_dump.sql +50 -50
- 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/jis/transformations/JISInfotextsTransformation.js +2 -2
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.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/data-access/TripsRepository.js +2 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/RawQueryProvider.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.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/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js +2 -2
- package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js.map +1 -1
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextStop.d.ts +1 -1
- package/docs/asyncapi.yaml +10 -29
- package/docs/openapi-output.yaml +0 -39
- package/package.json +2 -2
- 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/20250320145302-create-get-stops-by-asw-fnc.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/db/migrations/postgresql/sqls/20250320145302-create-get-stops-by-asw-fnc-down.sql +0 -1
- package/db/migrations/postgresql/sqls/20250320145302-create-get-stops-by-asw-fnc-up.sql +0 -13
- 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
|
@@ -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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
2
|
-
import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
3
|
-
import { IRopidDeparturesPresetsRopidGTFSStops } from "./interfaces/IPresetsGtfsStops";
|
|
4
|
-
export declare class RopidDeparturesPresetsRopidGTFSStopsModel extends Model<InferAttributes<RopidDeparturesPresetsRopidGTFSStopsModel>, InferCreationAttributes<RopidDeparturesPresetsRopidGTFSStopsModel>> implements IRopidDeparturesPresetsRopidGTFSStops {
|
|
5
|
-
static tableName: string;
|
|
6
|
-
preset_id: number;
|
|
7
|
-
stop_id: string;
|
|
8
|
-
created_at: CreationOptional<Date>;
|
|
9
|
-
updated_at: CreationOptional<Date>;
|
|
10
|
-
static attributeModel: ModelAttributes<RopidDeparturesPresetsRopidGTFSStopsModel>;
|
|
11
|
-
static jsonSchema: JSONSchemaType<IRopidDeparturesPresetsRopidGTFSStops[]>;
|
|
12
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RopidDeparturesPresetsRopidGTFSStopsModel = void 0;
|
|
4
|
-
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
-
class RopidDeparturesPresetsRopidGTFSStopsModel extends sequelize_1.Model {
|
|
6
|
-
}
|
|
7
|
-
exports.RopidDeparturesPresetsRopidGTFSStopsModel = RopidDeparturesPresetsRopidGTFSStopsModel;
|
|
8
|
-
RopidDeparturesPresetsRopidGTFSStopsModel.tableName = "ropid_departures_presets_ropidgtfs_stops";
|
|
9
|
-
RopidDeparturesPresetsRopidGTFSStopsModel.attributeModel = {
|
|
10
|
-
preset_id: {
|
|
11
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
12
|
-
primaryKey: true,
|
|
13
|
-
allowNull: false,
|
|
14
|
-
},
|
|
15
|
-
stop_id: {
|
|
16
|
-
primaryKey: true,
|
|
17
|
-
type: sequelize_1.DataTypes.STRING(50),
|
|
18
|
-
allowNull: false,
|
|
19
|
-
},
|
|
20
|
-
created_at: {
|
|
21
|
-
type: sequelize_1.DataTypes.DATE,
|
|
22
|
-
allowNull: false,
|
|
23
|
-
},
|
|
24
|
-
updated_at: {
|
|
25
|
-
type: sequelize_1.DataTypes.DATE,
|
|
26
|
-
allowNull: false,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
RopidDeparturesPresetsRopidGTFSStopsModel.jsonSchema = {
|
|
30
|
-
type: "array",
|
|
31
|
-
items: {
|
|
32
|
-
type: "object",
|
|
33
|
-
properties: {
|
|
34
|
-
preset_id: { type: "number" },
|
|
35
|
-
stop_id: { type: "string" },
|
|
36
|
-
},
|
|
37
|
-
additionalProperties: false,
|
|
38
|
-
required: ["preset_id", "stop_id"],
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=RopidDeparturesPresetsRopidGTFSStopsModel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidDeparturesPresetsRopidGTFSStopsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/models/RopidDeparturesPresetsRopidGTFSStopsModel.ts"],"names":[],"mappings":";;;AACA,mEAO6C;AAG7C,MAAa,yCACT,SAAQ,iBAGP;;AAJL,8FA+CC;AAxCiB,mDAAS,GAAG,0CAA0C,CAAC;AAOvD,wDAAc,GAA+D;IACvF,SAAS,EAAE;QACP,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;KACnB;IACD,OAAO,EAAE;QACL,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;CACJ,CAAC;AAEY,oDAAU,GAA4D;IAChF,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC7B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC9B;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;KACrC;CACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IPresetsGtfsStops.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/IPresetsGtfsStops.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IPresetsRopidGTFSStops.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/IPresetsRopidGTFSStops.ts"],"names":[],"mappings":""}
|
package/dist/schema-definitions/ropid-departures-presets/models/RopidDeparturesPresetsModel.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
2
|
-
import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
3
|
-
import { IRopidDeparturesPresets } from "./interfaces/IRopidDeparturesPresets";
|
|
4
|
-
import { StopDto } from "../../ropid-gtfs/models/StopDto";
|
|
5
|
-
export declare class RopidDeparturesPresetsModel extends Model<InferAttributes<RopidDeparturesPresetsModel>, InferCreationAttributes<RopidDeparturesPresetsModel>> implements IRopidDeparturesPresets {
|
|
6
|
-
static tableName: string;
|
|
7
|
-
id: number;
|
|
8
|
-
route_name: string;
|
|
9
|
-
api_version: number;
|
|
10
|
-
route: string;
|
|
11
|
-
url_query_params: string;
|
|
12
|
-
note: string;
|
|
13
|
-
is_testing: boolean;
|
|
14
|
-
created_at: CreationOptional<Date>;
|
|
15
|
-
updated_at: CreationOptional<Date>;
|
|
16
|
-
stops?: StopDto[];
|
|
17
|
-
static attributeModel: ModelAttributes<RopidDeparturesPresetsModel>;
|
|
18
|
-
static jsonSchema: JSONSchemaType<IRopidDeparturesPresets[]>;
|
|
19
|
-
}
|