@golemio/pid 6.1.0 → 6.1.1-dev.2975266276
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 +0 -6
- package/db/example/03_ropidgtfs_dump.sql +5 -0
- package/db/example/19_train_trip_with_cis_platform_code.sql +2 -1
- package/db/migrations/postgresql/20261009120000-case-insensitive-assigned-stop-id.js +16 -0
- package/db/migrations/postgresql/20261012120000-cis-stop-platforms-view.js +16 -0
- package/db/migrations/postgresql/20261013120000-drop-ropidvymi-tables.js +16 -0
- package/db/migrations/postgresql/20261014120000-add-position-registration-number.js +16 -0
- package/db/migrations/postgresql/sqls/20261009120000-case-insensitive-assigned-stop-id-down.sql +65 -0
- package/db/migrations/postgresql/sqls/20261009120000-case-insensitive-assigned-stop-id-up.sql +66 -0
- package/db/migrations/postgresql/sqls/20261012120000-cis-stop-platforms-view-down.sql +5 -0
- package/db/migrations/postgresql/sqls/20261012120000-cis-stop-platforms-view-up.sql +33 -0
- package/db/migrations/postgresql/sqls/20261013120000-drop-ropidvymi-tables-down.sql +119 -0
- package/db/migrations/postgresql/sqls/20261013120000-drop-ropidvymi-tables-up.sql +7 -0
- package/db/migrations/postgresql/sqls/20261014120000-add-position-registration-number-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20261014120000-add-position-registration-number-up.sql +2 -0
- package/dist/integration-engine/index.d.ts +0 -1
- package/dist/integration-engine/index.js +0 -5
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/shared/RopidMetadataModel.d.ts +1 -2
- package/dist/integration-engine/shared/RopidMetadataModel.js +0 -1
- package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/ioc/Di.js +2 -2
- package/dist/integration-engine/vehicle-positions/ioc/Di.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.d.ts +1 -1
- package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js +1 -1
- package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.d.ts +1 -4
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +3 -11
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +1 -4
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/PositionsMapper.d.ts +3 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/PositionsMapper.js +10 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/PositionsMapper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/CisStopPlatformRepository.d.ts +12 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/CisStopPlatformRepository.js +47 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/CisStopPlatformRepository.js.map +1 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/interfaces/TransformationInterfaces.d.ts +1 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.d.ts +8 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +41 -31
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.d.ts +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +6 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
- package/dist/schema-definitions/index.d.ts +0 -1
- package/dist/schema-definitions/index.js +0 -1
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/PositionDto.d.ts +1 -0
- package/dist/schema-definitions/vehicle-positions/models/PositionDto.js +2 -0
- package/dist/schema-definitions/vehicle-positions/models/PositionDto.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/interfaces/IPositionDto.d.ts +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/CisStopPlatformModel.d.ts +17 -0
- package/dist/schema-definitions/vehicle-positions/models/views/CisStopPlatformModel.js +22 -0
- package/dist/schema-definitions/vehicle-positions/models/views/CisStopPlatformModel.js.map +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/index.d.ts +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/index.js +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/index.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/ICisStopPlatformDto.d.ts +6 -0
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/ICisStopPlatformDto.js +2 -0
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/ICisStopPlatformDto.js.map +1 -0
- package/docs/cache/types/redis.md +2 -2
- package/docs/implementation_documentation.md +3 -62
- package/docs/processing/input_realtime_data/http_mpvnet.md +8 -0
- package/package.json +2 -2
- package/db/example/04_ropidvymi_example.sql +0 -40
- package/db/example/07_tmp_example.sql +0 -4
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.d.ts +0 -21
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +0 -81
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/index.d.ts +0 -2
- package/dist/integration-engine/ropid-vymi/index.js +0 -3
- package/dist/integration-engine/ropid-vymi/index.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsModel.d.ts +0 -9
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsModel.js +0 -37
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsModel.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.d.ts +0 -9
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +0 -29
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsStopsModel.d.ts +0 -7
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsStopsModel.js +0 -21
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsStopsModel.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.d.ts +0 -8
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +0 -30
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/models/index.d.ts +0 -4
- package/dist/integration-engine/ropid-vymi/models/index.js +0 -5
- package/dist/integration-engine/ropid-vymi/models/index.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/workers/RopidVYMIWorker.d.ts +0 -5
- package/dist/integration-engine/ropid-vymi/workers/RopidVYMIWorker.js +0 -14
- package/dist/integration-engine/ropid-vymi/workers/RopidVYMIWorker.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.d.ts +0 -8
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +0 -19
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.d.ts +0 -17
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +0 -94
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.d.ts +0 -11
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +0 -72
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiOutputLevel.d.ts +0 -5
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiOutputLevel.js +0 -7
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiOutputLevel.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/interfaces/IEventFetchOutput.d.ts +0 -5
- package/dist/integration-engine/ropid-vymi/workers/tasks/interfaces/IEventFetchOutput.js +0 -2
- package/dist/integration-engine/ropid-vymi/workers/tasks/interfaces/IEventFetchOutput.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/EventFetchOutputValidationSchema.d.ts +0 -6
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/EventFetchOutputValidationSchema.js +0 -27
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/EventFetchOutputValidationSchema.js.map +0 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/RopidVYMIEventValidationSchema.d.ts +0 -47
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/RopidVYMIEventValidationSchema.js +0 -200
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/RopidVYMIEventValidationSchema.js.map +0 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertCauseMapper.d.ts +0 -2
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertCauseMapper.js +0 -51
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertCauseMapper.js.map +0 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.d.ts +0 -6
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.js +0 -93
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.js.map +0 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.d.ts +0 -14
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +0 -82
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +0 -1
- package/dist/schema-definitions/ropid-vymi/RopidVYMIOutputSchemas.d.ts +0 -151
- package/dist/schema-definitions/ropid-vymi/RopidVYMIOutputSchemas.js +0 -152
- package/dist/schema-definitions/ropid-vymi/RopidVYMIOutputSchemas.js.map +0 -1
- package/dist/schema-definitions/ropid-vymi/RopidVYMISDMA.d.ts +0 -58
- package/dist/schema-definitions/ropid-vymi/RopidVYMISDMA.js +0 -74
- package/dist/schema-definitions/ropid-vymi/RopidVYMISDMA.js.map +0 -1
- package/dist/schema-definitions/ropid-vymi/index.d.ts +0 -52
- package/dist/schema-definitions/ropid-vymi/index.js +0 -171
- package/dist/schema-definitions/ropid-vymi/index.js.map +0 -1
- package/docs/assets/pid_vymi_erd.png +0 -0
package/dist/integration-engine/ropid-vymi/workers/tasks/schema/RopidVYMIEventValidationSchema.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import ClassTransformerCore from "@golemio/core/dist/shared/class-transformer.js";
|
|
11
|
-
const { Type } = ClassTransformerCore;
|
|
12
|
-
import ClassValidatorCore from "@golemio/core/dist/shared/class-validator.js";
|
|
13
|
-
const { IsObject, IsOptional, IsString, ValidateNested } = ClassValidatorCore;
|
|
14
|
-
export class RopidVYMIEventValidationSchema {
|
|
15
|
-
}
|
|
16
|
-
__decorate([
|
|
17
|
-
IsString(),
|
|
18
|
-
__metadata("design:type", String)
|
|
19
|
-
], RopidVYMIEventValidationSchema.prototype, "@id", void 0);
|
|
20
|
-
__decorate([
|
|
21
|
-
IsString(),
|
|
22
|
-
__metadata("design:type", String)
|
|
23
|
-
], RopidVYMIEventValidationSchema.prototype, "@id_dtb", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
IsString(),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], RopidVYMIEventValidationSchema.prototype, "@stav", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
IsString(),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], RopidVYMIEventValidationSchema.prototype, "@pa_01", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
IsString(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], RopidVYMIEventValidationSchema.prototype, "@pa_02", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
IsString(),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], RopidVYMIEventValidationSchema.prototype, "@pa_03", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
IsString(),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], RopidVYMIEventValidationSchema.prototype, "@pa_04", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
IsString(),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], RopidVYMIEventValidationSchema.prototype, "@typ_zaznamu", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
IsString(),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], RopidVYMIEventValidationSchema.prototype, "@typ_udalost", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
IsString(),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], RopidVYMIEventValidationSchema.prototype, "@kanaly", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
IsString(),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], RopidVYMIEventValidationSchema.prototype, "@nazev", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
IsString(),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], RopidVYMIEventValidationSchema.prototype, "@cas_od", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
IsString(),
|
|
66
|
-
__metadata("design:type", String)
|
|
67
|
-
], RopidVYMIEventValidationSchema.prototype, "@typ_do", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
IsOptional(),
|
|
70
|
-
IsString(),
|
|
71
|
-
__metadata("design:type", String)
|
|
72
|
-
], RopidVYMIEventValidationSchema.prototype, "@cas_do", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
IsOptional(),
|
|
75
|
-
IsString(),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], RopidVYMIEventValidationSchema.prototype, "@zobrazit_do", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
IsString(),
|
|
80
|
-
__metadata("design:type", String)
|
|
81
|
-
], RopidVYMIEventValidationSchema.prototype, "@druh_dopr", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
IsOptional(),
|
|
84
|
-
IsString(),
|
|
85
|
-
__metadata("design:type", String)
|
|
86
|
-
], RopidVYMIEventValidationSchema.prototype, "@priorita", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
IsOptional(),
|
|
89
|
-
IsString(),
|
|
90
|
-
__metadata("design:type", String)
|
|
91
|
-
], RopidVYMIEventValidationSchema.prototype, "@duvod", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
IsOptional(),
|
|
94
|
-
IsString(),
|
|
95
|
-
__metadata("design:type", String)
|
|
96
|
-
], RopidVYMIEventValidationSchema.prototype, "@link", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
IsOptional(),
|
|
99
|
-
IsString(),
|
|
100
|
-
__metadata("design:type", String)
|
|
101
|
-
], RopidVYMIEventValidationSchema.prototype, "@opatr_ropid", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
IsOptional(),
|
|
104
|
-
IsString(),
|
|
105
|
-
__metadata("design:type", String)
|
|
106
|
-
], RopidVYMIEventValidationSchema.prototype, "@opatr_dpp", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
IsOptional(),
|
|
109
|
-
IsString(),
|
|
110
|
-
__metadata("design:type", String)
|
|
111
|
-
], RopidVYMIEventValidationSchema.prototype, "@popis", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
IsOptional(),
|
|
114
|
-
IsObject({ each: true }),
|
|
115
|
-
ValidateNested(),
|
|
116
|
-
Type(() => RopidVYMIEventRouteValidationSchema),
|
|
117
|
-
__metadata("design:type", Array)
|
|
118
|
-
], RopidVYMIEventValidationSchema.prototype, "linky-zmena", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
IsOptional(),
|
|
121
|
-
IsObject({ each: true }),
|
|
122
|
-
ValidateNested(),
|
|
123
|
-
Type(() => RopidVYMIEventStopValidationSchema),
|
|
124
|
-
__metadata("design:type", Array)
|
|
125
|
-
], RopidVYMIEventValidationSchema.prototype, "zastavky-zmena", void 0);
|
|
126
|
-
export class RopidVYMIEventRouteValidationSchema {
|
|
127
|
-
}
|
|
128
|
-
__decorate([
|
|
129
|
-
IsString(),
|
|
130
|
-
__metadata("design:type", String)
|
|
131
|
-
], RopidVYMIEventRouteValidationSchema.prototype, "@id", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
IsString(),
|
|
134
|
-
__metadata("design:type", String)
|
|
135
|
-
], RopidVYMIEventRouteValidationSchema.prototype, "@id_dtb", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
IsString(),
|
|
138
|
-
__metadata("design:type", String)
|
|
139
|
-
], RopidVYMIEventRouteValidationSchema.prototype, "@cislo", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
IsString(),
|
|
142
|
-
__metadata("design:type", String)
|
|
143
|
-
], RopidVYMIEventRouteValidationSchema.prototype, "@nazev", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
IsString(),
|
|
146
|
-
__metadata("design:type", String)
|
|
147
|
-
], RopidVYMIEventRouteValidationSchema.prototype, "@linka_typ", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
IsOptional(),
|
|
150
|
-
IsString(),
|
|
151
|
-
__metadata("design:type", String)
|
|
152
|
-
], RopidVYMIEventRouteValidationSchema.prototype, "@plati_od", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
IsOptional(),
|
|
155
|
-
IsString(),
|
|
156
|
-
__metadata("design:type", String)
|
|
157
|
-
], RopidVYMIEventRouteValidationSchema.prototype, "@plati_do", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
IsOptional(),
|
|
160
|
-
IsString(),
|
|
161
|
-
__metadata("design:type", String)
|
|
162
|
-
], RopidVYMIEventRouteValidationSchema.prototype, "#text", void 0);
|
|
163
|
-
export class RopidVYMIEventStopValidationSchema {
|
|
164
|
-
}
|
|
165
|
-
__decorate([
|
|
166
|
-
IsString(),
|
|
167
|
-
__metadata("design:type", String)
|
|
168
|
-
], RopidVYMIEventStopValidationSchema.prototype, "@id", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
IsString(),
|
|
171
|
-
__metadata("design:type", String)
|
|
172
|
-
], RopidVYMIEventStopValidationSchema.prototype, "@id_dtb", void 0);
|
|
173
|
-
__decorate([
|
|
174
|
-
IsString(),
|
|
175
|
-
__metadata("design:type", String)
|
|
176
|
-
], RopidVYMIEventStopValidationSchema.prototype, "@uzelCislo", void 0);
|
|
177
|
-
__decorate([
|
|
178
|
-
IsString(),
|
|
179
|
-
__metadata("design:type", String)
|
|
180
|
-
], RopidVYMIEventStopValidationSchema.prototype, "@zastCislo", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
IsString(),
|
|
183
|
-
__metadata("design:type", String)
|
|
184
|
-
], RopidVYMIEventStopValidationSchema.prototype, "@zast_typ", void 0);
|
|
185
|
-
__decorate([
|
|
186
|
-
IsOptional(),
|
|
187
|
-
IsString(),
|
|
188
|
-
__metadata("design:type", String)
|
|
189
|
-
], RopidVYMIEventStopValidationSchema.prototype, "@plati_od", void 0);
|
|
190
|
-
__decorate([
|
|
191
|
-
IsOptional(),
|
|
192
|
-
IsString(),
|
|
193
|
-
__metadata("design:type", String)
|
|
194
|
-
], RopidVYMIEventStopValidationSchema.prototype, "@plati_do", void 0);
|
|
195
|
-
__decorate([
|
|
196
|
-
IsOptional(),
|
|
197
|
-
IsString(),
|
|
198
|
-
__metadata("design:type", String)
|
|
199
|
-
], RopidVYMIEventStopValidationSchema.prototype, "#text", void 0);
|
|
200
|
-
//# sourceMappingURL=RopidVYMIEventValidationSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidVYMIEventValidationSchema.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-vymi/workers/tasks/schema/RopidVYMIEventValidationSchema.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,oBAAoB,MAAM,gDAAgD,CAAC;AAClF,MAAM,EAAE,IAAI,EAAE,GAAG,oBAAoB,CAAC;AACtC,OAAO,kBAAkB,M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,EAAE,CAAC;IACxB,cAAc,EAAE;IAChB,IAAI,CAAC,GAAG,EAAE,CAAC,kCAAkC,CAAC;;sEACN;AAG7C,MAAM,OAAO,mCAAmC;CAoB/C;AAlBG;IADC,QAAQ,EAAE;;gEACG;AAEd;IADC,QAAQ,EAAE;;oEACO;AAElB;IADC,QAAQ,EAAE;;mEACM;AAEjB;IADC,QAAQ,EAAE;;mEACM;AAEjB;IADC,QAAQ,EAAE;;uEACU;AAGrB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;sEACU;AAGrB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;sEACU;AAGrB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;kEACM;AAGrB,MAAM,OAAO,kCAAkC;CAoB9C;AAlBG;IADC,QAAQ,EAAE;;+DACG;AAEd;IADC,QAAQ,EAAE;;mEACO;AAElB;IADC,QAAQ,EAAE;;sEACU;AAErB;IADC,QAAQ,EAAE;;sEACU;AAErB;IADC,QAAQ,EAAE;;qEACS;AAGpB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;qEACU;AAGrB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;qEACU;AAGrB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;iEACM"}
|
package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertCauseMapper.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { GtfsAlertCauseEnum } from "./enums/AlertCauseEnum.js";
|
|
2
|
-
export function getGtfsCause(causeText) {
|
|
3
|
-
for (const alertKey in GtfsAlertCauseMap) {
|
|
4
|
-
const alertCause = GtfsAlertCauseMap[alertKey];
|
|
5
|
-
for (const causeStringKey in alertCause.strings) {
|
|
6
|
-
if (causeText.includes(alertCause.strings[causeStringKey])) {
|
|
7
|
-
return alertCause.cause;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return GtfsAlertCauseEnum.UNKNOWN_CAUSE;
|
|
12
|
-
}
|
|
13
|
-
const GtfsAlertCauseMap = [
|
|
14
|
-
{
|
|
15
|
-
strings: ["nehoda", "nehody", "překážka", "srážka", "střet", "srážky"],
|
|
16
|
-
cause: GtfsAlertCauseEnum.ACCIDENT,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
strings: ["personální", "stávka"],
|
|
20
|
-
cause: GtfsAlertCauseEnum.STRIKE,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
strings: ["porucha", "závada", "výpadek", "provozni", "kolejnice"],
|
|
24
|
-
cause: GtfsAlertCauseEnum.TECHNICAL_PROBLEM,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
strings: ["uzavřená", "havárie", "oprava", "omezení", "uzavírka", "uzavírky", "práce"],
|
|
28
|
-
cause: GtfsAlertCauseEnum.CONSTRUCTION,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
strings: ["sjízdné", "sjízdnost", "nesjízdná", "povětrnostní", "strom", "klimatické", "vítr"],
|
|
32
|
-
cause: GtfsAlertCauseEnum.WEATHER,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
strings: ["demonstrace", "manifestace"],
|
|
36
|
-
cause: GtfsAlertCauseEnum.DEMONSTRATION,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
strings: ["uzávěra", "pčr", "policie"],
|
|
40
|
-
cause: GtfsAlertCauseEnum.POLICE_ACTIVITY,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
strings: ["zásah"],
|
|
44
|
-
cause: GtfsAlertCauseEnum.MEDICAL_EMERGENCY,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
strings: ["silná"],
|
|
48
|
-
cause: GtfsAlertCauseEnum.OTHER_CAUSE,
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
//# sourceMappingURL=AlertCauseMapper.js.map
|
package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertCauseMapper.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AlertCauseMapper.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertCauseMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC1C,KAAK,MAAM,QAAQ,IAAI,iBAAiB,EAAE,CAAC;QACvC,MAAM,UAAU,GAA0B,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QACtE,KAAK,MAAM,cAAc,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;YAC9C,IAAI,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC;gBACzD,OAAO,UAAU,CAAC,KAAK,CAAC;YAC5B,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,kBAAkB,CAAC,aAAa,CAAC;AAC5C,CAAC;AAOD,MAAM,iBAAiB,GAA4B;IAC/C;QACI,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC;QACtE,KAAK,EAAE,kBAAkB,CAAC,QAAQ;KACrC;IACD;QACI,OAAO,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC;QACjC,KAAK,EAAE,kBAAkB,CAAC,MAAM;KACnC;IACD;QACI,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC;QAClE,KAAK,EAAE,kBAAkB,CAAC,iBAAiB;KAC9C;IACD;QACI,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC;QACtF,KAAK,EAAE,kBAAkB,CAAC,YAAY;KACzC;IACD;QACI,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC;QAC7F,KAAK,EAAE,kBAAkB,CAAC,OAAO;KACpC;IACD;QACI,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC;QACvC,KAAK,EAAE,kBAAkB,CAAC,aAAa;KAC1C;IACD;QACI,OAAO,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC;QACtC,KAAK,EAAE,kBAAkB,CAAC,eAAe;KAC5C;IACD;QACI,OAAO,EAAE,CAAC,OAAO,CAAC;QAClB,KAAK,EAAE,kBAAkB,CAAC,iBAAiB;KAC9C;IACD;QACI,OAAO,EAAE,CAAC,OAAO,CAAC;QAClB,KAAK,EAAE,kBAAkB,CAAC,WAAW;KACxC;CACJ,CAAC"}
|
package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { GtfsAlertEffectEnum } from "./enums/AlertEffectEnum.js";
|
|
2
|
-
/**
|
|
3
|
-
* Mapuje eventType na dopravní efekt. EventType může být i součet několika čísel RopidVyMiEventType.
|
|
4
|
-
* @param eventType number
|
|
5
|
-
*/
|
|
6
|
-
export declare function getGtfsEffectByEventType(eventType: number): GtfsAlertEffectEnum;
|
package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { GtfsAlertEffectEnum } from "./enums/AlertEffectEnum.js";
|
|
2
|
-
const RopidVyMiEventType = {
|
|
3
|
-
PROVOZ_ZASTAVEN: 1,
|
|
4
|
-
PROVOZ_OMEZEN: 3,
|
|
5
|
-
PROVOZ_OBNOVEN: 4,
|
|
6
|
-
PRERUSENI_PROVOZU_METRA: 5,
|
|
7
|
-
PRERUSENI_PROVOZU_TRAMVAJI: 6,
|
|
8
|
-
NEODJETI_SPOJE: 8,
|
|
9
|
-
ZPOZDENI_SPOJE: 12,
|
|
10
|
-
ZPOZDENI_SPOJU: 13,
|
|
11
|
-
STANICE_UZAVRENA: 14,
|
|
12
|
-
PRISTUP_OMEZEN: 15,
|
|
13
|
-
OMEZENI_BEZBARIEROVEHO_PRISTUPU: 16,
|
|
14
|
-
ZMENA_TRASY_A_ZASTAVEK: 17,
|
|
15
|
-
POSILENI_SPOJU: 18,
|
|
16
|
-
ROZVAZANI_PRESTUPNI_VAZBY: 19,
|
|
17
|
-
OSTATNI: 20,
|
|
18
|
-
ODKLON: 21,
|
|
19
|
-
ZRUSENI_ZASTAVKY: 22,
|
|
20
|
-
PREMISTENI_ZASTAVKY: 23,
|
|
21
|
-
NAHRADNI_DOPRAVA: 24,
|
|
22
|
-
PRERUSENI_PROVOZU: 25,
|
|
23
|
-
ZRUSENI_LINKY: 26,
|
|
24
|
-
ZAVEDENI_LINKY: 27,
|
|
25
|
-
ZMENA_TRASY: 28,
|
|
26
|
-
ZMENA_ZASTAVEK: 29,
|
|
27
|
-
ZMENA_JIZDNIHO_RADU: 30,
|
|
28
|
-
OMEZENI_PROVOZU: 31,
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Mapuje eventType na dopravní efekt. EventType může být i součet několika čísel RopidVyMiEventType.
|
|
32
|
-
* @param eventType number
|
|
33
|
-
*/
|
|
34
|
-
export function getGtfsEffectByEventType(eventType) {
|
|
35
|
-
const values = findFromBin(eventType);
|
|
36
|
-
if (values.includes(RopidVyMiEventType.ODKLON)) {
|
|
37
|
-
return GtfsAlertEffectEnum.DETOUR;
|
|
38
|
-
}
|
|
39
|
-
if (values.includes(RopidVyMiEventType.ROZVAZANI_PRESTUPNI_VAZBY) || values.includes(RopidVyMiEventType.NAHRADNI_DOPRAVA)) {
|
|
40
|
-
return GtfsAlertEffectEnum.MODIFIED_SERVICE;
|
|
41
|
-
}
|
|
42
|
-
if (values.includes(RopidVyMiEventType.PROVOZ_ZASTAVEN) ||
|
|
43
|
-
values.includes(RopidVyMiEventType.PROVOZ_OMEZEN) ||
|
|
44
|
-
values.includes(RopidVyMiEventType.NEODJETI_SPOJE) ||
|
|
45
|
-
values.includes(RopidVyMiEventType.PRERUSENI_PROVOZU_METRA) ||
|
|
46
|
-
values.includes(RopidVyMiEventType.PRERUSENI_PROVOZU_TRAMVAJI) ||
|
|
47
|
-
values.includes(RopidVyMiEventType.PRERUSENI_PROVOZU) ||
|
|
48
|
-
values.includes(RopidVyMiEventType.OMEZENI_PROVOZU)) {
|
|
49
|
-
return GtfsAlertEffectEnum.REDUCED_SERVICE;
|
|
50
|
-
}
|
|
51
|
-
if (values.includes(RopidVyMiEventType.ZPOZDENI_SPOJE) || values.includes(RopidVyMiEventType.ZPOZDENI_SPOJU)) {
|
|
52
|
-
return GtfsAlertEffectEnum.SIGNIFICANT_DELAYS;
|
|
53
|
-
}
|
|
54
|
-
if (values.includes(RopidVyMiEventType.POSILENI_SPOJU) || values.includes(RopidVyMiEventType.ZAVEDENI_LINKY)) {
|
|
55
|
-
return GtfsAlertEffectEnum.ADDITIONAL_SERVICE;
|
|
56
|
-
}
|
|
57
|
-
if (values.includes(RopidVyMiEventType.OSTATNI) ||
|
|
58
|
-
values.includes(RopidVyMiEventType.PROVOZ_OBNOVEN) ||
|
|
59
|
-
values.includes(RopidVyMiEventType.PRISTUP_OMEZEN) ||
|
|
60
|
-
values.includes(RopidVyMiEventType.OMEZENI_BEZBARIEROVEHO_PRISTUPU)) {
|
|
61
|
-
return GtfsAlertEffectEnum.OTHER_EFFECT;
|
|
62
|
-
}
|
|
63
|
-
if (values.includes(RopidVyMiEventType.STANICE_UZAVRENA) ||
|
|
64
|
-
values.includes(RopidVyMiEventType.ZRUSENI_ZASTAVKY) ||
|
|
65
|
-
values.includes(RopidVyMiEventType.ZRUSENI_LINKY)) {
|
|
66
|
-
return GtfsAlertEffectEnum.NO_SERVICE;
|
|
67
|
-
}
|
|
68
|
-
if (values.includes(RopidVyMiEventType.ZMENA_ZASTAVEK)) {
|
|
69
|
-
return GtfsAlertEffectEnum.MODIFIED_SERVICE;
|
|
70
|
-
}
|
|
71
|
-
return GtfsAlertEffectEnum.UNKNOWN_EFFECT;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Odhalil @OICT_ParoubekMartin
|
|
75
|
-
* Příklad jak 10551296 přeložit na 17, 22 a 24
|
|
76
|
-
* Desítková: 10551296
|
|
77
|
-
* Binárně: 1010 0001 0000 0000 0000 0000
|
|
78
|
-
* Na 17 místě zprava je 1
|
|
79
|
-
* Na 22 místě zprava je 1
|
|
80
|
-
* Na 24 místě zprava je 1
|
|
81
|
-
*
|
|
82
|
-
* @param num číslo v desítkové soustavě
|
|
83
|
-
**/
|
|
84
|
-
const findFromBin = (num) => {
|
|
85
|
-
let result = [];
|
|
86
|
-
const bin = (num >>> 0).toString(2);
|
|
87
|
-
for (let i = 0; i < bin.length; i++) {
|
|
88
|
-
if (bin[i] === "1")
|
|
89
|
-
result.push(bin.length - i);
|
|
90
|
-
}
|
|
91
|
-
return result;
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=AlertEffectMapper.js.map
|
package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AlertEffectMapper.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,kBAAkB,GAAG;IACvB,eAAe,EAAE,CAAC;IAClB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,CAAC;IACjB,uBAAuB,EAAE,CAAC;IAC1B,0BAA0B,EAAE,CAAC;IAC7B,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,EAAE;IAClB,cAAc,EAAE,EAAE;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AC;AAED;;;;;;;;;;IAUI;AACJ,MAAM,WAAW,GAAG,CAAC,GAAW,EAAY,EAAE;IAC1C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG;YAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RopidVYMIEventsRoutesModel } from "#ie/ropid-vymi/index";
|
|
2
|
-
import { type IRopidVYMIEventOutput } from "#sch/ropid-vymi/index";
|
|
3
|
-
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation.js";
|
|
4
|
-
import { type IGtfsRtAlert, type GtfsTimeRange, type InformedEntityRoute } from "../interfaces/AlertsInterfaces.js";
|
|
5
|
-
export declare class AlertsTransformation extends AbstractTransformation<IRopidVYMIEventOutput, Promise<IGtfsRtAlert>> {
|
|
6
|
-
name: string;
|
|
7
|
-
private eventsRoutesModel;
|
|
8
|
-
constructor(eventsRoutesModel: RopidVYMIEventsRoutesModel);
|
|
9
|
-
transform: (alertEntities: IRopidVYMIEventOutput[]) => Promise<IGtfsRtAlert[]>;
|
|
10
|
-
protected transformInternal: (alertEntity: IRopidVYMIEventOutput) => Promise<IGtfsRtAlert>;
|
|
11
|
-
getDescription: (alertEntity: IRopidVYMIEventOutput) => string;
|
|
12
|
-
getActivePeriod: (alertEntity: IRopidVYMIEventOutput) => GtfsTimeRange;
|
|
13
|
-
getAffectedRoutes(alertEntity: IRopidVYMIEventOutput): Promise<InformedEntityRoute[]>;
|
|
14
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { HTMLUtils } from "#ie/shared/HTMLUtils";
|
|
2
|
-
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation.js";
|
|
3
|
-
import { getGtfsCause } from "../helpers/AlertCauseMapper.js";
|
|
4
|
-
import { getGtfsEffectByEventType } from "../helpers/AlertEffectMapper.js";
|
|
5
|
-
export class AlertsTransformation extends AbstractTransformation {
|
|
6
|
-
constructor(eventsRoutesModel) {
|
|
7
|
-
super();
|
|
8
|
-
this.transform = async (alertEntities) => {
|
|
9
|
-
return Promise.all(alertEntities.map((entity) => this.transformInternal(entity)));
|
|
10
|
-
};
|
|
11
|
-
this.transformInternal = async (alertEntity) => {
|
|
12
|
-
return {
|
|
13
|
-
id: `alert-${alertEntity.vymi_id}-${alertEntity.vymi_id_dtb}`,
|
|
14
|
-
alert: {
|
|
15
|
-
activePeriod: [this.getActivePeriod(alertEntity)],
|
|
16
|
-
informedEntity: await this.getAffectedRoutes(alertEntity),
|
|
17
|
-
cause: getGtfsCause(alertEntity.cause ?? ""),
|
|
18
|
-
causeDetail: {
|
|
19
|
-
translation: [],
|
|
20
|
-
},
|
|
21
|
-
effect: getGtfsEffectByEventType(Number(alertEntity.event_type ?? 0)),
|
|
22
|
-
url: {
|
|
23
|
-
translation: [
|
|
24
|
-
{
|
|
25
|
-
text: `https://pid.cz/mimoradnost/?id=${alertEntity.vymi_id}-${alertEntity.vymi_id_dtb}`,
|
|
26
|
-
language: "cs",
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
headerText: {
|
|
31
|
-
translation: [
|
|
32
|
-
{
|
|
33
|
-
text: alertEntity.title,
|
|
34
|
-
language: "cs",
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
descriptionText: {
|
|
39
|
-
translation: [
|
|
40
|
-
{
|
|
41
|
-
text: this.getDescription(alertEntity),
|
|
42
|
-
language: "cs",
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
this.getDescription = (alertEntity) => {
|
|
50
|
-
const description = [
|
|
51
|
-
HTMLUtils.outputPlainText(alertEntity.description) ?? "",
|
|
52
|
-
HTMLUtils.outputPlainText(alertEntity.dpp_action) ?? "",
|
|
53
|
-
HTMLUtils.outputPlainText(alertEntity.ropid_action) ?? "",
|
|
54
|
-
];
|
|
55
|
-
return description.join(" ").replaceAll("\n", " ").trim();
|
|
56
|
-
};
|
|
57
|
-
this.getActivePeriod = (alertEntity) => {
|
|
58
|
-
if (!alertEntity.expiration_date) {
|
|
59
|
-
return {
|
|
60
|
-
start: new Date(alertEntity.time_from).getTime() / 1000,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
start: new Date(alertEntity.time_from).getTime() / 1000,
|
|
65
|
-
end: new Date(alertEntity.expiration_date).getTime() / 1000,
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
this.name = "GtfsRtAlertTransformation";
|
|
69
|
-
this.eventsRoutesModel = eventsRoutesModel;
|
|
70
|
-
}
|
|
71
|
-
async getAffectedRoutes(alertEntity) {
|
|
72
|
-
const affectedRotues = await this.eventsRoutesModel.findByEventId(alertEntity.vymi_id);
|
|
73
|
-
const routeNames = [];
|
|
74
|
-
for (const route of affectedRotues) {
|
|
75
|
-
routeNames.push({
|
|
76
|
-
routeId: route.gtfs_route_id ?? route.name,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
return routeNames;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=AlertsTransformation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AlertsTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.ts"],"names":[],"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M,KAAK,CAAC,iBAAiB,CAAC,WAAkC;QAC7D,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACvF,MAAM,UAAU,GAA0B,EAAE,CAAC;QAC7C,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;YACjC,UAAU,CAAC,IAAI,CAAC;gBACZ,OAAO,EAAE,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,IAAI;aAC7C,CAAC,CAAC;QACP,CAAC;QACD,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ"}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
declare const outputEventsJsonSchema: {
|
|
2
|
-
type: string;
|
|
3
|
-
items: {
|
|
4
|
-
type: string;
|
|
5
|
-
properties: {
|
|
6
|
-
vymi_id: {
|
|
7
|
-
type: string;
|
|
8
|
-
};
|
|
9
|
-
vymi_id_dtb: {
|
|
10
|
-
type: string;
|
|
11
|
-
};
|
|
12
|
-
state: {
|
|
13
|
-
type: string;
|
|
14
|
-
};
|
|
15
|
-
ropid_created_at: {
|
|
16
|
-
type: string;
|
|
17
|
-
};
|
|
18
|
-
ropid_created_by: {
|
|
19
|
-
type: string;
|
|
20
|
-
};
|
|
21
|
-
ropid_updated_at: {
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
-
ropid_updated_by: {
|
|
25
|
-
type: string;
|
|
26
|
-
};
|
|
27
|
-
record_type: {
|
|
28
|
-
type: string;
|
|
29
|
-
};
|
|
30
|
-
event_type: {
|
|
31
|
-
type: string[];
|
|
32
|
-
};
|
|
33
|
-
channels: {
|
|
34
|
-
type: string;
|
|
35
|
-
};
|
|
36
|
-
title: {
|
|
37
|
-
type: string;
|
|
38
|
-
};
|
|
39
|
-
time_from: {
|
|
40
|
-
type: string;
|
|
41
|
-
};
|
|
42
|
-
time_to_type: {
|
|
43
|
-
type: string;
|
|
44
|
-
};
|
|
45
|
-
time_to: {
|
|
46
|
-
type: string[];
|
|
47
|
-
};
|
|
48
|
-
expiration_date: {
|
|
49
|
-
type: string[];
|
|
50
|
-
};
|
|
51
|
-
transportation_type: {
|
|
52
|
-
type: string;
|
|
53
|
-
};
|
|
54
|
-
priority: {
|
|
55
|
-
type: string[];
|
|
56
|
-
};
|
|
57
|
-
cause: {
|
|
58
|
-
type: string[];
|
|
59
|
-
};
|
|
60
|
-
link: {
|
|
61
|
-
type: string[];
|
|
62
|
-
};
|
|
63
|
-
ropid_action: {
|
|
64
|
-
type: string[];
|
|
65
|
-
};
|
|
66
|
-
dpp_action: {
|
|
67
|
-
type: string[];
|
|
68
|
-
};
|
|
69
|
-
description: {
|
|
70
|
-
type: string[];
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
declare const outputEventsRoutesJsonSchema: {
|
|
76
|
-
type: string;
|
|
77
|
-
items: {
|
|
78
|
-
type: string;
|
|
79
|
-
properties: {
|
|
80
|
-
event_id: {
|
|
81
|
-
type: string;
|
|
82
|
-
};
|
|
83
|
-
gtfs_route_id: {
|
|
84
|
-
type: string[];
|
|
85
|
-
};
|
|
86
|
-
vymi_id: {
|
|
87
|
-
type: string;
|
|
88
|
-
};
|
|
89
|
-
vymi_id_dtb: {
|
|
90
|
-
type: string;
|
|
91
|
-
};
|
|
92
|
-
number: {
|
|
93
|
-
type: string;
|
|
94
|
-
};
|
|
95
|
-
name: {
|
|
96
|
-
type: string;
|
|
97
|
-
};
|
|
98
|
-
route_type: {
|
|
99
|
-
type: string;
|
|
100
|
-
};
|
|
101
|
-
valid_from: {
|
|
102
|
-
type: string[];
|
|
103
|
-
};
|
|
104
|
-
valid_to: {
|
|
105
|
-
type: string[];
|
|
106
|
-
};
|
|
107
|
-
text: {
|
|
108
|
-
type: string[];
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
declare const outputEventsStopsJsonSchema: {
|
|
114
|
-
type: string;
|
|
115
|
-
items: {
|
|
116
|
-
type: string;
|
|
117
|
-
properties: {
|
|
118
|
-
event_id: {
|
|
119
|
-
type: string;
|
|
120
|
-
};
|
|
121
|
-
gtfs_stop_id: {
|
|
122
|
-
type: string[];
|
|
123
|
-
};
|
|
124
|
-
vymi_id: {
|
|
125
|
-
type: string;
|
|
126
|
-
};
|
|
127
|
-
vymi_id_dtb: {
|
|
128
|
-
type: string;
|
|
129
|
-
};
|
|
130
|
-
node_number: {
|
|
131
|
-
type: string;
|
|
132
|
-
};
|
|
133
|
-
stop_number: {
|
|
134
|
-
type: string;
|
|
135
|
-
};
|
|
136
|
-
stop_type: {
|
|
137
|
-
type: string;
|
|
138
|
-
};
|
|
139
|
-
valid_from: {
|
|
140
|
-
type: string[];
|
|
141
|
-
};
|
|
142
|
-
valid_to: {
|
|
143
|
-
type: string[];
|
|
144
|
-
};
|
|
145
|
-
text: {
|
|
146
|
-
type: string[];
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
export { outputEventsJsonSchema, outputEventsRoutesJsonSchema, outputEventsStopsJsonSchema };
|