@golemio/pid 6.1.0 → 6.1.1-dev.2962474907
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/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/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/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/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/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/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/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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C,QAAQ,CAAC,kBAAkB,CAAC,gBAAgB,CAAC;QACpD,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,aAAa,CAAC,EACnD,CAAC;QACC,OAAO,mBAAmB,CAAC,UAAU,CAAC;IAC1C,CAAC;IAED,IAAI,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;QACrD,OAAO,mBAAmB,CAAC,gBAAgB,CAAC;IAChD,CAAC;IAED,OAAO,mBAAmB,CAAC,cAAc,CAAC;AAC9C,CAAC;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":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qEAAqE,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,MAAM,OAAO,oBAAqB,SAAQ,sBAAoE;IAI1G,YAAY,iBAA6C;QACrD,KAAK,EAAE,CAAC;QAKL,cAAS,GAAG,KAAK,EAAE,aAAsC,EAA2B,EAAE;YACzF,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACtF,CAAC,CAAC;QAEQ,sBAAiB,GAAG,KAAK,EAAE,WAAkC,EAAyB,EAAE;YAC9F,OAAO;gBACH,EAAE,EAAE,SAAS,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,WAAW,EAAE;gBAC7D,KAAK,EAAE;oBACH,YAAY,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;oBACjD,cAAc,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC;oBACzD,KAAK,EAAE,YAAY,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC;oBAC5C,WAAW,E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CAAC;YACD,OAAO;gBACH,KAAK,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI;gBACvD,GAAG,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI;aAC9D,CAAC;QACN,CAAC,CAAC;QAlEE,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;IAkEM,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 };
|
|
@@ -1,152 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,IAAI,EAAE,QAAQ;aACjB;YACD,gBAAgB,EAAE;gBACd,IAAI,EAAE,QAAQ;aACjB;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;aACjB;YACD,UAAU,EAAE;gBACR,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC3B;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;YACD,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;aACjB;YACD,YAAY,EAAE;gBACV,IA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;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC3B;YACD,IAAI,EAAE;gBACF,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC3B;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,2BAA2B,GAAG;IAChC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,YAAY,EAAE;gBACV,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC3B;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;aACjB;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;aACjB;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;aACjB;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;aACjB;YACD,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;aACjB;YACD,UAAU,EAAE;gBACR,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC3B;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC3B;YACD,IAAI,EAAE;gBACF,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC3B;SACJ;KACJ;CACJ,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
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 };
|
|
@@ -1,74 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidVYMISDMA.js","sourceRoot":"","sources":["../../../src/schema-definitions/ropid-vymi/RopidVYMISDMA.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,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