@golemio/ndic 1.6.2-dev.2098430777 → 1.6.2-dev.2201489328
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integration-engine/transformations/TrafficRestrictionsInterface.d.ts +1 -7
- package/dist/integration-engine/transformations/TrafficRestrictionsInterface.js +0 -8
- package/dist/integration-engine/transformations/TrafficRestrictionsInterface.js.map +1 -1
- package/dist/output-gateway/transformations/OutputTrafficRestrictionsTransformation.d.ts +1 -3
- package/dist/output-gateway/transformations/OutputTrafficRestrictionsTransformation.js +1 -19
- package/dist/output-gateway/transformations/OutputTrafficRestrictionsTransformation.js.map +1 -1
- package/package.json +1 -1
|
@@ -117,7 +117,7 @@ export interface IOutputApiSituationRecord {
|
|
|
117
117
|
situationRecordVersionTime: string;
|
|
118
118
|
startTime: string;
|
|
119
119
|
endTime: string;
|
|
120
|
-
type:
|
|
120
|
+
type: string | null;
|
|
121
121
|
version: number;
|
|
122
122
|
generalPublicComment: {
|
|
123
123
|
cs: string;
|
|
@@ -146,12 +146,6 @@ export interface IOutputApiSituationRecord {
|
|
|
146
146
|
};
|
|
147
147
|
osmPath?: number[][];
|
|
148
148
|
}
|
|
149
|
-
export declare enum OutputApiSituationRecordType {
|
|
150
|
-
ConstructionWorks = "CONSTRUCTION_WORKS",
|
|
151
|
-
GeneralObstruction = "GENERAL_OBSTRUCTION",
|
|
152
|
-
MaintenanceWorks = "MAINTENANCE_WORKS",
|
|
153
|
-
RoadOrCarriagewayOrLaneManagement = "ROAD_OR_CARRIAGE_WAY_OR_LANE_MANAGEMENT"
|
|
154
|
-
}
|
|
155
149
|
export interface IOutputApiSituation {
|
|
156
150
|
id: string;
|
|
157
151
|
version: number;
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OutputApiSituationRecordType = void 0;
|
|
4
|
-
var OutputApiSituationRecordType;
|
|
5
|
-
(function (OutputApiSituationRecordType) {
|
|
6
|
-
OutputApiSituationRecordType["ConstructionWorks"] = "CONSTRUCTION_WORKS";
|
|
7
|
-
OutputApiSituationRecordType["GeneralObstruction"] = "GENERAL_OBSTRUCTION";
|
|
8
|
-
OutputApiSituationRecordType["MaintenanceWorks"] = "MAINTENANCE_WORKS";
|
|
9
|
-
OutputApiSituationRecordType["RoadOrCarriagewayOrLaneManagement"] = "ROAD_OR_CARRIAGE_WAY_OR_LANE_MANAGEMENT";
|
|
10
|
-
})(OutputApiSituationRecordType || (exports.OutputApiSituationRecordType = OutputApiSituationRecordType = {}));
|
|
11
3
|
//# sourceMappingURL=TrafficRestrictionsInterface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrafficRestrictionsInterface.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/TrafficRestrictionsInterface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TrafficRestrictionsInterface.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/TrafficRestrictionsInterface.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IOutputApiRestrictions, ITrafficRestrictionsModel
|
|
1
|
+
import { IOutputApiRestrictions, ITrafficRestrictionsModel } from "../../integration-engine/transformations/TrafficRestrictionsInterface";
|
|
2
2
|
import { RsdTmcOsmMappingRepository } from "@golemio/traffic-common/dist/output-gateway";
|
|
3
3
|
export declare class OutputTrafficRestrictionsTransformation {
|
|
4
4
|
name: string;
|
|
@@ -7,9 +7,7 @@ export declare class OutputTrafficRestrictionsTransformation {
|
|
|
7
7
|
transform: (data: ITrafficRestrictionsModel[]) => Promise<IOutputApiRestrictions>;
|
|
8
8
|
private transformSituationsArr;
|
|
9
9
|
private transformRecordsArr;
|
|
10
|
-
getOutputApiSituationRecordType(recordType: string): OutputApiSituationRecordType | null;
|
|
11
10
|
private generalPublicCommentParsing;
|
|
12
11
|
private sourceNameParsing;
|
|
13
12
|
private groupByOneProperty;
|
|
14
|
-
private getRsdTmcOsmMapping;
|
|
15
13
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OutputTrafficRestrictionsTransformation = void 0;
|
|
4
4
|
const ParserHelper_1 = require("../../integration-engine/transformations/ParserHelper");
|
|
5
|
-
const TrafficRestrictionsInterface_1 = require("../../integration-engine/transformations/TrafficRestrictionsInterface");
|
|
6
5
|
const _sch_1 = require("../../schema-definitions");
|
|
7
6
|
const helpers_1 = require("@golemio/core/dist/helpers");
|
|
8
7
|
class OutputTrafficRestrictionsTransformation {
|
|
@@ -87,7 +86,7 @@ class OutputTrafficRestrictionsTransformation {
|
|
|
87
86
|
endTime: (0, helpers_1.dateTime)(record.validity_overall_end_time)
|
|
88
87
|
.setTimeZone("Europe/Prague")
|
|
89
88
|
.toISOString(),
|
|
90
|
-
type:
|
|
89
|
+
type: record.situation_record_type,
|
|
91
90
|
version: (0, ParserHelper_1.parseNumber)(record.situation_record_version),
|
|
92
91
|
generalPublicComment: this.generalPublicCommentParsing(record.general_public_comment),
|
|
93
92
|
sourceName: this.sourceNameParsing(record.source),
|
|
@@ -110,20 +109,6 @@ class OutputTrafficRestrictionsTransformation {
|
|
|
110
109
|
}
|
|
111
110
|
return resultRecordsArr;
|
|
112
111
|
}
|
|
113
|
-
getOutputApiSituationRecordType(recordType) {
|
|
114
|
-
switch (recordType) {
|
|
115
|
-
case "ConstructionWorks":
|
|
116
|
-
return TrafficRestrictionsInterface_1.OutputApiSituationRecordType.ConstructionWorks;
|
|
117
|
-
case "GeneralObstruction":
|
|
118
|
-
return TrafficRestrictionsInterface_1.OutputApiSituationRecordType.GeneralObstruction;
|
|
119
|
-
case "MaintenanceWorks":
|
|
120
|
-
return TrafficRestrictionsInterface_1.OutputApiSituationRecordType.MaintenanceWorks;
|
|
121
|
-
case "RoadOrCarriagewayOrLaneManagement":
|
|
122
|
-
return TrafficRestrictionsInterface_1.OutputApiSituationRecordType.RoadOrCarriagewayOrLaneManagement;
|
|
123
|
-
default:
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
112
|
generalPublicCommentParsing(comment) {
|
|
128
113
|
if (!comment)
|
|
129
114
|
return null;
|
|
@@ -159,9 +144,6 @@ class OutputTrafficRestrictionsTransformation {
|
|
|
159
144
|
}
|
|
160
145
|
return source;
|
|
161
146
|
}
|
|
162
|
-
async getRsdTmcOsmMapping(ltStart, ltEnd) {
|
|
163
|
-
return await this.rsdTmcOsmMappingRepository.GetOne({ ltStart, ltEnd });
|
|
164
|
-
}
|
|
165
147
|
}
|
|
166
148
|
exports.OutputTrafficRestrictionsTransformation = OutputTrafficRestrictionsTransformation;
|
|
167
149
|
//# sourceMappingURL=OutputTrafficRestrictionsTransformation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutputTrafficRestrictionsTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/OutputTrafficRestrictionsTransformation.ts"],"names":[],"mappings":";;;AAAA,wFAA+D;
|
|
1
|
+
{"version":3,"file":"OutputTrafficRestrictionsTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/OutputTrafficRestrictionsTransformation.ts"],"names":[],"mappings":";;;AAAA,wFAA+D;AAO/D,mDAA4B;AAC5B,wDAAsD;AAGtD,MAAa,uCAAuC;IAIhD,YAAY,0BAAsD;QAK3D,cAAS,GAAG,KAAK,EAAE,IAAiC,EAAE,EAAE;YAC3D,iEAAiE;YACjE,MAAM,eAAe,GAAS,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;iBAChH,gBAAmC,CAAC;YAEzC,MAAM,MAAM,GAA2B;gBACnC,gB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