@golemio/pid 6.0.3-dev.2954837172 → 6.1.0-rc.2962399658
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 +6 -0
- package/db/example/03_ropidgtfs_dump.sql +0 -5
- package/db/example/04_ropidvymi_example.sql +40 -0
- package/db/example/07_tmp_example.sql +4 -0
- package/db/example/19_train_trip_with_cis_platform_code.sql +1 -2
- package/dist/integration-engine/index.d.ts +1 -0
- package/dist/integration-engine/index.js +5 -0
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.d.ts +21 -0
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +81 -0
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/index.d.ts +2 -0
- package/dist/integration-engine/ropid-vymi/index.js +3 -0
- package/dist/integration-engine/ropid-vymi/index.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsModel.d.ts +9 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsModel.js +37 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsModel.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.d.ts +9 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +29 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsStopsModel.d.ts +7 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsStopsModel.js +21 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsStopsModel.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.d.ts +8 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +30 -0
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/models/index.d.ts +4 -0
- package/dist/integration-engine/ropid-vymi/models/index.js +5 -0
- package/dist/integration-engine/ropid-vymi/models/index.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/workers/RopidVYMIWorker.d.ts +5 -0
- package/dist/integration-engine/ropid-vymi/workers/RopidVYMIWorker.js +14 -0
- package/dist/integration-engine/ropid-vymi/workers/RopidVYMIWorker.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.d.ts +8 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +19 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.d.ts +17 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +94 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.d.ts +11 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +72 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiOutputLevel.d.ts +5 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiOutputLevel.js +7 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiOutputLevel.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/interfaces/IEventFetchOutput.d.ts +5 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/interfaces/IEventFetchOutput.js +2 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/interfaces/IEventFetchOutput.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/EventFetchOutputValidationSchema.d.ts +6 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/EventFetchOutputValidationSchema.js +27 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/EventFetchOutputValidationSchema.js.map +1 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/RopidVYMIEventValidationSchema.d.ts +47 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/RopidVYMIEventValidationSchema.js +200 -0
- package/dist/integration-engine/ropid-vymi/workers/tasks/schema/RopidVYMIEventValidationSchema.js.map +1 -0
- package/dist/integration-engine/shared/RopidMetadataModel.d.ts +2 -1
- package/dist/integration-engine/shared/RopidMetadataModel.js +1 -0
- 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/AlertCauseMapper.d.ts +2 -0
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertCauseMapper.js +51 -0
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertCauseMapper.js.map +1 -0
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.d.ts +6 -0
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.js +93 -0
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertEffectMapper.js.map +1 -0
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.d.ts +4 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +11 -3
- 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 +4 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.d.ts +14 -0
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +82 -0
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.d.ts +3 -8
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +31 -41
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
- package/dist/schema-definitions/index.d.ts +1 -0
- package/dist/schema-definitions/index.js +1 -0
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/ropid-vymi/RopidVYMIOutputSchemas.d.ts +151 -0
- package/dist/schema-definitions/ropid-vymi/RopidVYMIOutputSchemas.js +152 -0
- package/dist/schema-definitions/ropid-vymi/RopidVYMIOutputSchemas.js.map +1 -0
- package/dist/schema-definitions/ropid-vymi/RopidVYMISDMA.d.ts +58 -0
- package/dist/schema-definitions/ropid-vymi/RopidVYMISDMA.js +74 -0
- package/dist/schema-definitions/ropid-vymi/RopidVYMISDMA.js.map +1 -0
- package/dist/schema-definitions/ropid-vymi/index.d.ts +52 -0
- package/dist/schema-definitions/ropid-vymi/index.js +171 -0
- package/dist/schema-definitions/ropid-vymi/index.js.map +1 -0
- package/dist/schema-definitions/vehicle-positions/models/views/index.d.ts +0 -1
- package/dist/schema-definitions/vehicle-positions/models/views/index.js +0 -1
- package/dist/schema-definitions/vehicle-positions/models/views/index.js.map +1 -1
- package/docs/assets/pid_vymi_erd.png +0 -0
- package/docs/cache/types/redis.md +2 -2
- package/docs/implementation_documentation.md +62 -3
- package/docs/processing/input_realtime_data/http_mpvnet.md +0 -8
- package/package.json +6 -6
- package/db/migrations/postgresql/20261009120000-case-insensitive-assigned-stop-id.js +0 -16
- package/db/migrations/postgresql/20261012120000-cis-stop-platforms-view.js +0 -16
- package/db/migrations/postgresql/20261013120000-drop-ropidvymi-tables.js +0 -16
- package/db/migrations/postgresql/sqls/20261009120000-case-insensitive-assigned-stop-id-down.sql +0 -65
- package/db/migrations/postgresql/sqls/20261009120000-case-insensitive-assigned-stop-id-up.sql +0 -66
- package/db/migrations/postgresql/sqls/20261012120000-cis-stop-platforms-view-down.sql +0 -5
- package/db/migrations/postgresql/sqls/20261012120000-cis-stop-platforms-view-up.sql +0 -33
- package/db/migrations/postgresql/sqls/20261013120000-drop-ropidvymi-tables-down.sql +0 -119
- package/db/migrations/postgresql/sqls/20261013120000-drop-ropidvymi-tables-up.sql +0 -7
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/CisStopPlatformRepository.d.ts +0 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/CisStopPlatformRepository.js +0 -47
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/CisStopPlatformRepository.js.map +0 -1
- package/dist/schema-definitions/vehicle-positions/models/views/CisStopPlatformModel.d.ts +0 -17
- package/dist/schema-definitions/vehicle-positions/models/views/CisStopPlatformModel.js +0 -22
- package/dist/schema-definitions/vehicle-positions/models/views/CisStopPlatformModel.js.map +0 -1
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/ICisStopPlatformDto.d.ts +0 -6
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/ICisStopPlatformDto.js +0 -2
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/ICisStopPlatformDto.js.map +0 -1
|
@@ -11,21 +11,23 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
var SaveDataToDBTask_1;
|
|
14
|
+
import { RopidGTFSCisStopsModel } from "#ie/ropid-gtfs/RopidGTFSCisStopsModel";
|
|
14
15
|
import { VPContainerToken } from "#ie/vehicle-positions/ioc/VPContainerToken";
|
|
15
16
|
import { CoreToken } from "@golemio/core/dist/helpers/ioc/CoreToken.js";
|
|
16
17
|
import { QueueManager } from "@golemio/core/dist/integration-engine/queueprocessors/index.js";
|
|
17
18
|
import { AbstractTask } from "@golemio/core/dist/integration-engine/workers/index.js";
|
|
18
19
|
import GolemioErrorsCore from "@golemio/core/dist/shared/golemio-errors.js";
|
|
19
20
|
const { AbstractGolemioError, GeneralError } = GolemioErrorsCore;
|
|
21
|
+
import SequelizeCore from "@golemio/core/dist/shared/sequelize.js";
|
|
22
|
+
const { Op } = SequelizeCore;
|
|
20
23
|
import { inject, injectable } from "@golemio/core/dist/shared/tsyringe.js";
|
|
21
24
|
import { CisStopRepository } from "../data-access/CisStopRepository.js";
|
|
22
|
-
import { CisStopPlatformRepository } from "../data-access/views/CisStopPlatformRepository.js";
|
|
23
25
|
import TripsMapper from "../data-access/helpers/TripsMapper.js";
|
|
24
26
|
import { SaveDataToDBValidationSchema } from "../schema/SaveDataToDBSchema.js";
|
|
25
27
|
import { MpvMessageTransformation } from "../transformations/MpvMessageTransformation.js";
|
|
26
28
|
import { WORKER_NAME } from "../constants.js";
|
|
27
29
|
let SaveDataToDBTask = SaveDataToDBTask_1 = class SaveDataToDBTask extends AbstractTask {
|
|
28
|
-
constructor(tripsRepository, cisStopRepository, messageTransformation,
|
|
30
|
+
constructor(tripsRepository, cisStopRepository, messageTransformation, ropidGTFSCisStopsModel, logger) {
|
|
29
31
|
super(WORKER_NAME);
|
|
30
32
|
this.queueName = "saveDataToDB";
|
|
31
33
|
this.queueTtl = 5 * 60 * 1000; // 5 minutes
|
|
@@ -33,7 +35,7 @@ let SaveDataToDBTask = SaveDataToDBTask_1 = class SaveDataToDBTask extends Abstr
|
|
|
33
35
|
this.tripsRepository = tripsRepository;
|
|
34
36
|
this.cisStopRepository = cisStopRepository;
|
|
35
37
|
this.messageTransformation = messageTransformation;
|
|
36
|
-
this.
|
|
38
|
+
this.ropidGTFSCisStopsModel = ropidGTFSCisStopsModel;
|
|
37
39
|
this.logger = logger;
|
|
38
40
|
}
|
|
39
41
|
async execute(data, messageProperties) {
|
|
@@ -132,52 +134,40 @@ let SaveDataToDBTask = SaveDataToDBTask_1 = class SaveDataToDBTask extends Abstr
|
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
|
-
/**
|
|
136
|
-
* Synthetic before_track position is placed on the GTFS platform of the current track
|
|
137
|
-
* (`start_cis_stop_platform_code`) when mapped, otherwise on the station coordinates.
|
|
138
|
-
*/
|
|
139
137
|
async preparePositionsFromCisStops(tripsWithCisStops, trips, tsText, ts) {
|
|
140
138
|
if (!tripsWithCisStops?.size) {
|
|
141
139
|
return [];
|
|
142
140
|
}
|
|
143
|
-
const tripsById = new Map(trips.map((trip) => [trip.id, trip]));
|
|
144
|
-
const stationsByCis = await this.findStationCoordinatesByCis(Array.from(new Set(tripsWithCisStops.values())));
|
|
145
141
|
const newPositions = [];
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
const trip = tripsById.get(tripId);
|
|
152
|
-
const platformCode = trip?.start_cis_stop_platform_code;
|
|
153
|
-
const coordinates = (platformCode && station.platforms.get(platformCode.toUpperCase())) || station;
|
|
154
|
-
newPositions.push(this.messageTransformation.positionWithCisStopCoords(tripId, coordinates.lat.toString(), coordinates.lon.toString(), tsText, ts,
|
|
142
|
+
const cisList = new Set();
|
|
143
|
+
const cisToTrips = new Map();
|
|
144
|
+
const tripToFirstStopDepartureTime = new Map();
|
|
145
|
+
for (const trip of trips) {
|
|
155
146
|
// we want to have positions of a before_track trip valid_to its departure (start_timestamp)
|
|
156
|
-
trip
|
|
147
|
+
tripToFirstStopDepartureTime.set(trip.id, trip.start_timestamp);
|
|
157
148
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
const rows = await this.cisStopPlatformRepository.findByCisList(cisList);
|
|
162
|
-
const stationsByCis = new Map();
|
|
163
|
-
// station rows (platform_code null) first, so platforms can be attached to them
|
|
164
|
-
for (const row of rows) {
|
|
165
|
-
if (row.platform_code === null && !stationsByCis.has(row.cis)) {
|
|
166
|
-
stationsByCis.set(row.cis, { lat: row.lat, lon: row.lon, platforms: new Map() });
|
|
167
|
-
}
|
|
149
|
+
for (const [tripId, cisStop] of tripsWithCisStops.entries()) {
|
|
150
|
+
cisList.add(cisStop);
|
|
151
|
+
cisToTrips.set(cisStop, (cisToTrips.get(cisStop) ?? []).concat([tripId]));
|
|
168
152
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
153
|
+
const rawCisStops = await this.ropidGTFSCisStopsModel.find({
|
|
154
|
+
where: {
|
|
155
|
+
cis: { [Op.in]: Array.from(cisList) },
|
|
156
|
+
id: { [Op.like]: `%/301` }, // We want only asw-code like XYZ/301
|
|
157
|
+
},
|
|
158
|
+
attributes: ["cis", "lat", "lon"],
|
|
159
|
+
raw: true,
|
|
160
|
+
});
|
|
161
|
+
for (const cisStop of rawCisStops) {
|
|
162
|
+
if (cisList.has(cisStop.cis) && cisToTrips.has(cisStop.cis)) {
|
|
163
|
+
cisList.delete(cisStop.cis); // prevents to create positions for the same cis stop returning multiple rows
|
|
164
|
+
for (const tripId of cisToTrips.get(cisStop.cis)) {
|
|
165
|
+
const validTo = tripToFirstStopDepartureTime.get(tripId) ?? null;
|
|
166
|
+
newPositions.push(this.messageTransformation.positionWithCisStopCoords(tripId, cisStop.lat, cisStop.lon, tsText, ts, validTo));
|
|
167
|
+
}
|
|
178
168
|
}
|
|
179
169
|
}
|
|
180
|
-
return
|
|
170
|
+
return newPositions;
|
|
181
171
|
}
|
|
182
172
|
async getTripDataAndSendToUpdateDelay(chunk, positions, firstMessageCreatedAt) {
|
|
183
173
|
try {
|
|
@@ -204,11 +194,11 @@ SaveDataToDBTask = SaveDataToDBTask_1 = __decorate([
|
|
|
204
194
|
__param(0, inject(VPContainerToken.TripRepository)),
|
|
205
195
|
__param(1, inject(VPContainerToken.CisStopRepository)),
|
|
206
196
|
__param(2, inject(VPContainerToken.MpvMessageTransformation)),
|
|
207
|
-
__param(3, inject(VPContainerToken.
|
|
197
|
+
__param(3, inject(VPContainerToken.RopidGTFSCisStopsModel)),
|
|
208
198
|
__param(4, inject(CoreToken.Logger)),
|
|
209
199
|
__metadata("design:paramtypes", [Function, CisStopRepository,
|
|
210
200
|
MpvMessageTransformation,
|
|
211
|
-
|
|
201
|
+
RopidGTFSCisStopsModel, Object])
|
|
212
202
|
], SaveDataToDBTask);
|
|
213
203
|
export { SaveDataToDBTask };
|
|
214
204
|
//# sourceMappingURL=SaveDataToDBTask.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveDataToDBTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAK9E,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gEAAgE,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC;AACtF,OAAO,iBAAiB,MAAM,6CAA6C,CAAC;AAC5E,MAAM,EAAE,oBAAoB,EAAE,YAAY,EAAE,GAAG,iBAAiB,CAAC;AAGjE,OAAO,
|
|
1
|
+
{"version":3,"file":"SaveDataToDBTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAK9E,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gEAAgE,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC;AACtF,OAAO,iBAAiB,MAAM,6CAA6C,CAAC;AAC5E,MAAM,EAAE,oBAAoB,EAAE,YAAY,EAAE,GAAG,iBAAiB,CAAC;AAGjE,OAAO,aAAa,MAAM,wCAAwC,CAAC;AACnE,MAAM,EAAE,EAAE,EAAE,GAAG,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,WAAW,MAAM,uCAAuC,CAAC;AAGhE,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGvC,IAAM,gBAAgB,wBAAtB,MAAM,gBAAiB,SAAQ,YAA8B;IAWhE,YAC6C,eAAgC,EAC7B,iBAAoC,EAC7B,qBAA+C,EACjD,sBAA8C,EACrE,MAAe;QAEzC,KAAK,CAAC,WAAW,CAAC,CAAC;QAjBP,cAAS,GAAG,cAAc,CAAC;QAC3B,aAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;QACtC,WAAM,GAAG,4BAA4B,CAAC;QAgBlD,IAAI,CAAC,eAAe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AC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,MAAM,CAAC,KAAK,CACb,IAAI,YAAY,CACZ,0CAA0C,EAC1C,kBAAgB,CAAC,IAAI,EACrB,KAAK,EACL,SAAS,EACT,KAAK,EACL,IAAI,CAAC,SAAS,CACjB,CACJ,CAAC;YACN,CAAC;QACL,CAAC;IACL,CAAC;CACJ,CAAA;AA9PY,gBAAgB;IAD5B,UAAU,EAAE;IAaJ,WAAA,MAAM,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAA;IACvC,WAAA,MAAM,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAC1C,WAAA,MAAM,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAA;IACjD,WAAA,MAAM,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAA;IAC/C,WAAA,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;+CAHsC,iBAAiB;QACN,wBAAwB;QACzB,sBAAsB;GAf1F,gBAAgB,CA8P5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
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 };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
const outputEventsJsonSchema = {
|
|
2
|
+
type: "array",
|
|
3
|
+
items: {
|
|
4
|
+
type: "object",
|
|
5
|
+
properties: {
|
|
6
|
+
vymi_id: {
|
|
7
|
+
type: "number",
|
|
8
|
+
},
|
|
9
|
+
vymi_id_dtb: {
|
|
10
|
+
type: "number",
|
|
11
|
+
},
|
|
12
|
+
state: {
|
|
13
|
+
type: "number",
|
|
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: "number",
|
|
29
|
+
},
|
|
30
|
+
event_type: {
|
|
31
|
+
type: ["null", "number"],
|
|
32
|
+
},
|
|
33
|
+
channels: {
|
|
34
|
+
type: "number",
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
type: "string",
|
|
38
|
+
},
|
|
39
|
+
time_from: {
|
|
40
|
+
type: "string",
|
|
41
|
+
},
|
|
42
|
+
time_to_type: {
|
|
43
|
+
type: "number",
|
|
44
|
+
},
|
|
45
|
+
time_to: {
|
|
46
|
+
type: ["null", "string"],
|
|
47
|
+
},
|
|
48
|
+
expiration_date: {
|
|
49
|
+
type: ["null", "string"],
|
|
50
|
+
},
|
|
51
|
+
transportation_type: {
|
|
52
|
+
type: "number",
|
|
53
|
+
},
|
|
54
|
+
priority: {
|
|
55
|
+
type: ["null", "number"],
|
|
56
|
+
},
|
|
57
|
+
cause: {
|
|
58
|
+
type: ["null", "string"],
|
|
59
|
+
},
|
|
60
|
+
link: {
|
|
61
|
+
type: ["null", "string"],
|
|
62
|
+
},
|
|
63
|
+
ropid_action: {
|
|
64
|
+
type: ["null", "string"],
|
|
65
|
+
},
|
|
66
|
+
dpp_action: {
|
|
67
|
+
type: ["null", "string"],
|
|
68
|
+
},
|
|
69
|
+
description: {
|
|
70
|
+
type: ["null", "string"],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
const outputEventsRoutesJsonSchema = {
|
|
76
|
+
type: "array",
|
|
77
|
+
items: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
event_id: {
|
|
81
|
+
type: "number",
|
|
82
|
+
},
|
|
83
|
+
gtfs_route_id: {
|
|
84
|
+
type: ["null", "string"],
|
|
85
|
+
},
|
|
86
|
+
vymi_id: {
|
|
87
|
+
type: "number",
|
|
88
|
+
},
|
|
89
|
+
vymi_id_dtb: {
|
|
90
|
+
type: "number",
|
|
91
|
+
},
|
|
92
|
+
number: {
|
|
93
|
+
type: "number",
|
|
94
|
+
},
|
|
95
|
+
name: {
|
|
96
|
+
type: "string",
|
|
97
|
+
},
|
|
98
|
+
route_type: {
|
|
99
|
+
type: "number",
|
|
100
|
+
},
|
|
101
|
+
valid_from: {
|
|
102
|
+
type: ["null", "string"],
|
|
103
|
+
},
|
|
104
|
+
valid_to: {
|
|
105
|
+
type: ["null", "string"],
|
|
106
|
+
},
|
|
107
|
+
text: {
|
|
108
|
+
type: ["null", "string"],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
const outputEventsStopsJsonSchema = {
|
|
114
|
+
type: "array",
|
|
115
|
+
items: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: {
|
|
118
|
+
event_id: {
|
|
119
|
+
type: "number",
|
|
120
|
+
},
|
|
121
|
+
gtfs_stop_id: {
|
|
122
|
+
type: ["null", "string"],
|
|
123
|
+
},
|
|
124
|
+
vymi_id: {
|
|
125
|
+
type: "number",
|
|
126
|
+
},
|
|
127
|
+
vymi_id_dtb: {
|
|
128
|
+
type: "number",
|
|
129
|
+
},
|
|
130
|
+
node_number: {
|
|
131
|
+
type: "number",
|
|
132
|
+
},
|
|
133
|
+
stop_number: {
|
|
134
|
+
type: "number",
|
|
135
|
+
},
|
|
136
|
+
stop_type: {
|
|
137
|
+
type: "number",
|
|
138
|
+
},
|
|
139
|
+
valid_from: {
|
|
140
|
+
type: ["null", "string"],
|
|
141
|
+
},
|
|
142
|
+
valid_to: {
|
|
143
|
+
type: ["null", "string"],
|
|
144
|
+
},
|
|
145
|
+
text: {
|
|
146
|
+
type: ["null", "string"],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
export { outputEventsJsonSchema, outputEventsRoutesJsonSchema, outputEventsStopsJsonSchema };
|
|
152
|
+
//# sourceMappingURL=RopidVYMIOutputSchemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RopidVYMIOutputSchemas.js","sourceRoot":"","sources":["../../../src/schema-definitions/ropid-vymi/RopidVYMIOutputSchemas.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG;IAC3B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;aACjB;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;aACjB;YACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;YACD,gBAAgB,EAAE;gBACd,IAAI,EAAE,QAAQ;aACjB;YACD,gBAAgB,EAAE;gBACd,IAAI,EAAE,QAAQ;aACjB;YACD,gBAAgB,EAAE;gBACd,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B;SACJ;KACJ;CACJ,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ModelAttributes } from "@golemio/core/dist/shared/sequelize.js";
|
|
2
|
+
import { GTFSRouteTypeEnum } from "../../helpers/RouteTypeEnums.js";
|
|
3
|
+
interface IRopidVYMIEventOutput {
|
|
4
|
+
vymi_id: number;
|
|
5
|
+
vymi_id_dtb: number;
|
|
6
|
+
state: number;
|
|
7
|
+
ropid_created_at: string;
|
|
8
|
+
ropid_created_by: string;
|
|
9
|
+
ropid_updated_at: string;
|
|
10
|
+
ropid_updated_by: string;
|
|
11
|
+
record_type: number;
|
|
12
|
+
event_type: number | null;
|
|
13
|
+
channels: number;
|
|
14
|
+
title: string;
|
|
15
|
+
time_from: string;
|
|
16
|
+
time_to_type: number;
|
|
17
|
+
time_to: string | null;
|
|
18
|
+
expiration_date: string | null;
|
|
19
|
+
transportation_type: number;
|
|
20
|
+
priority: number | null;
|
|
21
|
+
cause: string | null;
|
|
22
|
+
link: string | null;
|
|
23
|
+
ropid_action: string | null;
|
|
24
|
+
dpp_action: string | null;
|
|
25
|
+
description: string | null;
|
|
26
|
+
[audit: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
interface IRopidVYMIEventRouteOutput {
|
|
29
|
+
event_id: number;
|
|
30
|
+
gtfs_route_id: string | null;
|
|
31
|
+
vymi_id: number;
|
|
32
|
+
vymi_id_dtb: number;
|
|
33
|
+
number: number;
|
|
34
|
+
name: string;
|
|
35
|
+
route_type: GTFSRouteTypeEnum;
|
|
36
|
+
valid_from: string | null;
|
|
37
|
+
valid_to: string | null;
|
|
38
|
+
text: string | null;
|
|
39
|
+
[audit: string]: unknown;
|
|
40
|
+
}
|
|
41
|
+
interface IRopidVYMIEventStopOutput {
|
|
42
|
+
event_id: number;
|
|
43
|
+
gtfs_stop_id: string | null;
|
|
44
|
+
vymi_id: number;
|
|
45
|
+
vymi_id_dtb: number;
|
|
46
|
+
node_number: number;
|
|
47
|
+
stop_number: number;
|
|
48
|
+
stop_type: number;
|
|
49
|
+
valid_from: string | null;
|
|
50
|
+
valid_to: string | null;
|
|
51
|
+
text: string | null;
|
|
52
|
+
[audit: string]: unknown;
|
|
53
|
+
}
|
|
54
|
+
declare const outputEventsSDMA: ModelAttributes<any, IRopidVYMIEventOutput>;
|
|
55
|
+
declare const outputEventsRoutesSDMA: ModelAttributes<any, IRopidVYMIEventRouteOutput>;
|
|
56
|
+
declare const outputEventsStopsSDMA: ModelAttributes<any, IRopidVYMIEventStopOutput>;
|
|
57
|
+
export { outputEventsSDMA, outputEventsRoutesSDMA, outputEventsStopsSDMA };
|
|
58
|
+
export type { IRopidVYMIEventOutput, IRopidVYMIEventRouteOutput, IRopidVYMIEventStopOutput };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import SequelizeCore from "@golemio/core/dist/shared/sequelize.js";
|
|
2
|
+
const { DataTypes } = SequelizeCore;
|
|
3
|
+
const outputEventsSDMA = {
|
|
4
|
+
vymi_id: {
|
|
5
|
+
type: DataTypes.INTEGER,
|
|
6
|
+
primaryKey: true,
|
|
7
|
+
unique: true,
|
|
8
|
+
},
|
|
9
|
+
vymi_id_dtb: DataTypes.INTEGER,
|
|
10
|
+
state: DataTypes.INTEGER,
|
|
11
|
+
ropid_created_at: DataTypes.DATE,
|
|
12
|
+
ropid_created_by: DataTypes.STRING(150),
|
|
13
|
+
ropid_updated_at: DataTypes.DATE,
|
|
14
|
+
ropid_updated_by: DataTypes.STRING(150),
|
|
15
|
+
record_type: DataTypes.INTEGER,
|
|
16
|
+
event_type: DataTypes.BIGINT,
|
|
17
|
+
channels: DataTypes.INTEGER,
|
|
18
|
+
title: DataTypes.STRING(255),
|
|
19
|
+
time_from: DataTypes.DATE,
|
|
20
|
+
time_to_type: DataTypes.INTEGER,
|
|
21
|
+
time_to: DataTypes.DATE,
|
|
22
|
+
expiration_date: DataTypes.DATE,
|
|
23
|
+
transportation_type: DataTypes.INTEGER,
|
|
24
|
+
priority: DataTypes.INTEGER,
|
|
25
|
+
cause: DataTypes.STRING(255),
|
|
26
|
+
link: DataTypes.STRING(255),
|
|
27
|
+
ropid_action: DataTypes.STRING(100000),
|
|
28
|
+
dpp_action: DataTypes.STRING(100000),
|
|
29
|
+
description: DataTypes.STRING(1000),
|
|
30
|
+
};
|
|
31
|
+
const outputEventsRoutesSDMA = {
|
|
32
|
+
event_id: {
|
|
33
|
+
type: DataTypes.INTEGER,
|
|
34
|
+
primaryKey: true,
|
|
35
|
+
},
|
|
36
|
+
gtfs_route_id: DataTypes.STRING(255),
|
|
37
|
+
vymi_id: {
|
|
38
|
+
type: DataTypes.INTEGER,
|
|
39
|
+
primaryKey: true,
|
|
40
|
+
},
|
|
41
|
+
vymi_id_dtb: DataTypes.INTEGER,
|
|
42
|
+
number: DataTypes.INTEGER,
|
|
43
|
+
name: DataTypes.STRING(255),
|
|
44
|
+
route_type: DataTypes.INTEGER,
|
|
45
|
+
valid_from: DataTypes.DATE,
|
|
46
|
+
valid_to: DataTypes.DATE,
|
|
47
|
+
text: DataTypes.STRING(10000),
|
|
48
|
+
};
|
|
49
|
+
const outputEventsStopsSDMA = {
|
|
50
|
+
event_id: {
|
|
51
|
+
type: DataTypes.INTEGER,
|
|
52
|
+
primaryKey: true,
|
|
53
|
+
},
|
|
54
|
+
gtfs_stop_id: DataTypes.STRING(255),
|
|
55
|
+
vymi_id: {
|
|
56
|
+
type: DataTypes.INTEGER,
|
|
57
|
+
primaryKey: true,
|
|
58
|
+
},
|
|
59
|
+
vymi_id_dtb: DataTypes.INTEGER,
|
|
60
|
+
node_number: {
|
|
61
|
+
type: DataTypes.INTEGER,
|
|
62
|
+
primaryKey: true,
|
|
63
|
+
},
|
|
64
|
+
stop_number: {
|
|
65
|
+
type: DataTypes.INTEGER,
|
|
66
|
+
primaryKey: true,
|
|
67
|
+
},
|
|
68
|
+
stop_type: DataTypes.INTEGER,
|
|
69
|
+
valid_from: DataTypes.DATE,
|
|
70
|
+
valid_to: DataTypes.DATE,
|
|
71
|
+
text: DataTypes.STRING(10000),
|
|
72
|
+
};
|
|
73
|
+
export { outputEventsSDMA, outputEventsRoutesSDMA, outputEventsStopsSDMA };
|
|
74
|
+
//# sourceMappingURL=RopidVYMISDMA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RopidVYMISDMA.js","sourceRoot":"","sources":["../../../src/schema-definitions/ropid-vymi/RopidVYMISDMA.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,wCAAwC,CAAC;AACnE,MAAM,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC;AAyDpC,MAAM,gBAAgB,GAAgD;IAClE,OAAO,EAAE;QACL,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;KACf;IACD,WAAW,EAAE,SAAS,CAAC,OAAO;IAC9B,KAAK,EAAE,SAAS,CAAC,OAAO;IACxB,gBAAgB,EAAE,SAAS,CAAC,IAAI;IAChC,gBAAgB,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC;IACvC,gBAAgB,EAAE,SAAS,CAAC,IAAI;IAChC,gBAAgB,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC;IACvC,WAAW,EAAE,SAAS,CAAC,OAAO;IAC9B,UAAU,EAAE,SAAS,CAAC,MAAM;IAC5B,QAAQ,EAAE,SAAS,CAAC,OAAO;IAC3B,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC;IAC5B,SAAS,EAAE,SAAS,CAAC,IAAI;IACzB,YAAY,EAAE,SAAS,CAAC,OAAO;IAC/B,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,eAAe,EAAE,SAAS,CAAC,IAAI;IAC/B,mBAAmB,EAAE,SAAS,CAAC,OAAO;IACtC,QAAQ,EAAE,SAAS,CAAC,OAAO;IAC3B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