@golemio/waze-ccp 1.1.7 → 1.1.8-dev.1078494126

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.
Files changed (58) hide show
  1. package/db/migrations/postgresql/20231108112825-new-alerts.js +53 -0
  2. package/db/migrations/postgresql/sqls/20231108112825-new-alerts-down.sql +25 -0
  3. package/db/migrations/postgresql/sqls/20231108112825-new-alerts-up.sql +65 -0
  4. package/dist/integration-engine/WazeCCPAlertsAlternativeTransformation.d.ts +10 -0
  5. package/dist/integration-engine/WazeCCPAlertsAlternativeTransformation.js +67 -0
  6. package/dist/integration-engine/WazeCCPAlertsAlternativeTransformation.js.map +1 -0
  7. package/dist/integration-engine/WazeCCPAlertsTransformation.d.ts +6 -8
  8. package/dist/integration-engine/WazeCCPAlertsTransformation.js +21 -45
  9. package/dist/integration-engine/WazeCCPAlertsTransformation.js.map +1 -1
  10. package/dist/integration-engine/WazeCCPWorker.d.ts +3 -1
  11. package/dist/integration-engine/WazeCCPWorker.js +18 -4
  12. package/dist/integration-engine/WazeCCPWorker.js.map +1 -1
  13. package/dist/integration-engine/helpers/AlertsIdHelper.d.ts +6 -0
  14. package/dist/integration-engine/helpers/AlertsIdHelper.js +43 -0
  15. package/dist/integration-engine/helpers/AlertsIdHelper.js.map +1 -0
  16. package/dist/integration-engine/index.d.ts +1 -0
  17. package/dist/integration-engine/index.js +1 -0
  18. package/dist/integration-engine/index.js.map +1 -1
  19. package/dist/integration-engine/interfaces/WazeAlertsAlternativeInterface.d.ts +24 -0
  20. package/dist/integration-engine/interfaces/WazeAlertsAlternativeInterface.js +3 -0
  21. package/dist/integration-engine/interfaces/WazeAlertsAlternativeInterface.js.map +1 -0
  22. package/dist/integration-engine/interfaces/WazeAlertsInterface.d.ts +3 -23
  23. package/dist/integration-engine/queueDefinitions.js +11 -1
  24. package/dist/integration-engine/queueDefinitions.js.map +1 -1
  25. package/dist/integration-engine/repositories/WazeAlertsAlternativeRepository.d.ts +7 -0
  26. package/dist/integration-engine/repositories/WazeAlertsAlternativeRepository.js +57 -0
  27. package/dist/integration-engine/repositories/WazeAlertsAlternativeRepository.js.map +1 -0
  28. package/dist/integration-engine/repositories/WazeAlertsRepository.js +7 -12
  29. package/dist/integration-engine/repositories/WazeAlertsRepository.js.map +1 -1
  30. package/dist/schema-definitions/datasources/InputAlertsJsonSchema.d.ts +3 -0
  31. package/dist/schema-definitions/datasources/InputAlertsJsonSchema.js +47 -0
  32. package/dist/schema-definitions/datasources/InputAlertsJsonSchema.js.map +1 -0
  33. package/dist/schema-definitions/datasources/InputIrregularitiesJsonSchema.d.ts +116 -0
  34. package/dist/schema-definitions/datasources/InputIrregularitiesJsonSchema.js +55 -0
  35. package/dist/schema-definitions/datasources/InputIrregularitiesJsonSchema.js.map +1 -0
  36. package/dist/schema-definitions/datasources/InputJamsJsonSchema.d.ts +92 -0
  37. package/dist/schema-definitions/datasources/InputJamsJsonSchema.js +51 -0
  38. package/dist/schema-definitions/datasources/InputJamsJsonSchema.js.map +1 -0
  39. package/dist/schema-definitions/datasources/interfaces/IInputAlerts.d.ts +29 -0
  40. package/dist/schema-definitions/datasources/interfaces/IInputAlerts.js +3 -0
  41. package/dist/schema-definitions/datasources/interfaces/IInputAlerts.js.map +1 -0
  42. package/dist/schema-definitions/index.d.ts +1 -301
  43. package/dist/schema-definitions/index.js +12 -138
  44. package/dist/schema-definitions/index.js.map +1 -1
  45. package/dist/schema-definitions/interfaces/IAlertAlternativeDto.d.ts +25 -0
  46. package/dist/schema-definitions/interfaces/IAlertAlternativeDto.js +3 -0
  47. package/dist/schema-definitions/interfaces/IAlertAlternativeDto.js.map +1 -0
  48. package/dist/schema-definitions/interfaces/IAlertDto.d.ts +4 -24
  49. package/dist/schema-definitions/models/AlertAlternativeDto.d.ts +30 -0
  50. package/dist/schema-definitions/models/AlertAlternativeDto.js +65 -0
  51. package/dist/schema-definitions/models/AlertAlternativeDto.js.map +1 -0
  52. package/dist/schema-definitions/models/AlertDto.d.ts +3 -1
  53. package/dist/schema-definitions/models/AlertDto.js +6 -2
  54. package/dist/schema-definitions/models/AlertDto.js.map +1 -1
  55. package/package.json +2 -2
  56. package/dist/integration-engine/helpers/AlertsHelper.d.ts +0 -4
  57. package/dist/integration-engine/helpers/AlertsHelper.js +0 -22
  58. package/dist/integration-engine/helpers/AlertsHelper.js.map +0 -1
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.WazeAlertsAlternativeRepository = void 0;
13
+ const _sch_1 = require("../../schema-definitions");
14
+ const AlertAlternativeDto_1 = require("../../schema-definitions/models/AlertAlternativeDto");
15
+ const models_1 = require("@golemio/core/dist/integration-engine/models");
16
+ const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
17
+ class WazeAlertsAlternativeRepository extends models_1.PostgresModel {
18
+ constructor() {
19
+ super(_sch_1.WazeCCP.alertsAlternative.name + "Repository", {
20
+ outputSequelizeAttributes: AlertAlternativeDto_1.AlertAlternativeDto.attributeModel,
21
+ pgTableName: _sch_1.WazeCCP.alertsAlternative.pgTableName,
22
+ pgSchema: _sch_1.WazeCCP.pgSchema,
23
+ savingType: "insertOrUpdate",
24
+ }, new golemio_validator_1.JSONSchemaValidator(_sch_1.WazeCCP.alertsAlternative.name + "Validator", AlertAlternativeDto_1.AlertAlternativeDto.jsonSchema));
25
+ this.saveAlerts = (data) => __awaiter(this, void 0, void 0, function* () {
26
+ for (const item of data) {
27
+ yield this.saveAlert(item);
28
+ }
29
+ });
30
+ this.saveAlert = (data) => __awaiter(this, void 0, void 0, function* () {
31
+ if (yield this.validate([data])) {
32
+ const record = yield this.sequelizeModel.findOne({
33
+ where: {
34
+ uuid: data.uuid,
35
+ pub_millis: data.pub_millis,
36
+ road_type: data.road_type,
37
+ type: data.type,
38
+ subtype: data.subtype,
39
+ city: data.city,
40
+ country: data.country,
41
+ report_by_municipality_user: data.report_by_municipality_user,
42
+ jam_uuid: data.jam_uuid,
43
+ "location.x": data.location.x,
44
+ "location.y": data.location.y,
45
+ },
46
+ order: [["downloaded_at", "DESC"]],
47
+ });
48
+ if (record) {
49
+ return this.update({ downloaded_at: data.downloaded_at, updated_at: data.downloaded_at }, { where: { uuid: data.uuid, pub_utc_date: data.pub_utc_date, valid_from: record.valid_from } });
50
+ }
51
+ return this.sequelizeModel.create(Object.assign(Object.assign({}, data), { valid_from: data.downloaded_at }));
52
+ }
53
+ });
54
+ }
55
+ }
56
+ exports.WazeAlertsAlternativeRepository = WazeAlertsAlternativeRepository;
57
+ //# sourceMappingURL=WazeAlertsAlternativeRepository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WazeAlertsAlternativeRepository.js","sourceRoot":"","sources":["../../../src/integration-engine/repositories/WazeAlertsAlternativeRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mDAA+B;AAC/B,6FAAsE;AACtE,yEAAqF;AACrF,mFAAkF;AAElF,MAAa,+BAAgC,SAAQ,sBAAa;IAC9D;QACI,KAAK,CACD,cAAO,CAAC,iBAAiB,CAAC,IAAI,GAAG,YAAY,EAC7C;YACI,yBAAyB,EAAE,yCAAmB,CAAC,cAAc;YAC7D,WAAW,EAAE,cAAO,CAAC,iBAAiB,CAAC,WAAW;YAClD,QAAQ,EAAE,cAAO,CAAC,QAAQ;YAC1B,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,cAAO,C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,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,CACjG,CAAC;iBACL;gBAED,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,iCAAM,IAAI,KAAE,UAAU,EAAE,IAAI,CAAC,aAAa,IAAG,CAAC;aAClF;QACL,CAAC,CAAA,CAAC;IAnCF,CAAC;CAoCJ;AAhDD,0EAgDC"}
@@ -31,24 +31,19 @@ class WazeAlertsRepository extends models_1.PostgresModel {
31
31
  if (yield this.validate([data])) {
32
32
  const record = yield this.sequelizeModel.findOne({
33
33
  where: {
34
+ id: data.id,
34
35
  uuid: data.uuid,
35
- pub_millis: data.pub_millis,
36
- road_type: data.road_type,
37
- type: data.type,
38
- subtype: data.subtype,
39
- city: data.city,
40
- country: data.country,
41
- report_by_municipality_user: data.report_by_municipality_user,
42
- jam_uuid: data.jam_uuid,
43
- "location.x": data.location.x,
44
- "location.y": data.location.y,
45
36
  },
46
37
  order: [["downloaded_at", "DESC"]],
47
38
  });
48
39
  if (record) {
49
- return this.update({ downloaded_at: data.downloaded_at }, { where: { uuid: data.uuid, pub_utc_date: data.pub_utc_date, valid_from: record.valid_from } });
40
+ return this.update({
41
+ duplicate_count: record.duplicate_count + 1,
42
+ downloaded_at: data.downloaded_at,
43
+ updated_at: data.downloaded_at,
44
+ }, { where: { uuid: data.uuid, id: data.id } });
50
45
  }
51
- return this.sequelizeModel.create(Object.assign(Object.assign({}, data), { valid_from: data.downloaded_at }));
46
+ return this.sequelizeModel.create(Object.assign(Object.assign({}, data), { duplicate_count: 0, valid_from: data.downloaded_at }));
52
47
  }
53
48
  });
54
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WazeAlertsRepository.js","sourceRoot":"","sources":["../../../src/integration-engine/repositories/WazeAlertsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,mDAA+B;AAC/B,uEAAgD;AAChD,yEAAqF;AACrF,mFAAkF;AAElF,MAAa,oBAAqB,SAAQ,sBAAa;IACnD;QACI,KAAK,CACD,cAA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IAAI,MAAM,EAAE;oBACR,OAAO,IAAI,CAAC,MAAM,CACd,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,EACrC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,CACjG,CAAC;iBACL;gBAED,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,iCAAM,IAAI,KAAE,UAAU,EAAE,IAAI,CAAC,aAAa,IAAG,CAAC;aAClF;QACL,CAAC,CAAA,CAAC;IAnCF,CAAC;CAoCJ;AAhDD,oDAgDC"}
1
+ {"version":3,"file":"WazeAlertsRepository.js","sourceRoot":"","sources":["../../../src/integration-engine/repositories/WazeAlertsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mDAA+B;AAC/B,uEAAgD;AAChD,yEAAqF;AACrF,mFAAkF;AAElF,MAAa,oBAAqB,SAAQ,sBAAa;IACnD;QACI,KAAK,CACD,cAAO,CAAC,MAAM,CAAC,IAAI,GAAG,YAAY,EAClC;YACI,yBAAyB,EAAE,mBAAQ,CAAC,cAAc;YAClD,WAAW,EAAE,cAAO,CAAC,MAAM,CAAC,WAAW;YACvC,QAAQ,EAAE,cAAO,CAAC,QAAQ;YAC1B,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,cAAO,CAAC,MAAM,CAAC,IAAI,GAAG,WAAW,EAAE,mBAAQ,CAAC,UAAU,CAAC,CAClF,CAAC;QAGC,eAAU,GAAG,CAAO,IAAmB,EAAE,EAAE;YAC9C,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;gBACrB,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;aAC9B;QACL,CAAC,CAAA,CAAC;QAEM,cAAS,GAAG,CAAO,IAAiB,EAAE,EAAE;YAC5C,IAAI,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;gBAC7B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBAC7C,KAAK,EAAE;wBACH,EAAE,EAAE,IAAI,CAAC,EAAE;wBACX,IAAI,EAAE,IAAI,CAAC,IAAI;qBAClB;oBACD,KAAK,EAAE,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;iBACrC,CAAC,CAAC;gBACH,IAAI,MAAM,EAAE;oBACR,OAAO,IAAI,CAAC,MAAM,CACd;wBACI,eAAe,EAAE,MAAM,CAAC,eAAe,GAAG,CAAC;wBAC3C,aAAa,EAAE,IAAI,CAAC,aAAa;wBACjC,UAAU,EAAE,IAAI,CAAC,aAAa;qBACjC,EACD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAC9C,CAAC;iBACL;gBAED,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,iCAAM,IAAI,KAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,aAAa,IAAG,CAAC;aACtG;QACL,CAAC,CAAA,CAAC;IA9BF,CAAC;CA+BJ;AA3CD,oDA2CC"}
@@ -0,0 +1,3 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IInputAlerts } from "./interfaces/IInputAlerts";
3
+ export declare const InputAlertsJsonSchema: JSONSchemaType<IInputAlerts>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InputAlertsJsonSchema = void 0;
4
+ exports.InputAlertsJsonSchema = {
5
+ type: "object",
6
+ properties: {
7
+ alerts: {
8
+ type: "array",
9
+ items: {
10
+ type: "object",
11
+ properties: {
12
+ city: { type: "string" },
13
+ confidence: { type: "number" },
14
+ country: { type: "string" },
15
+ jamUuid: { type: "string" },
16
+ location: {
17
+ type: "object",
18
+ properties: {
19
+ x: { type: "number" },
20
+ y: { type: "number" },
21
+ },
22
+ required: ["x", "y"],
23
+ },
24
+ magvar: { type: "number" },
25
+ nThumbsUp: { type: "number" },
26
+ pubMillis: { type: "number" },
27
+ reliability: { type: "number" },
28
+ reportByMunicipalityUser: { type: "string" },
29
+ reportDescription: { type: "string" },
30
+ reportRating: { type: "number" },
31
+ roadType: { type: "number" },
32
+ street: { type: "string" },
33
+ subtype: { type: "string" },
34
+ type: { type: "string" },
35
+ uuid: { type: "string" },
36
+ },
37
+ required: ["pubMillis", "uuid"],
38
+ },
39
+ },
40
+ endTime: { type: "string" },
41
+ endTimeMillis: { type: "number" },
42
+ startTime: { type: "string" },
43
+ startTimeMillis: { type: "number" },
44
+ },
45
+ required: ["startTimeMillis"],
46
+ };
47
+ //# sourceMappingURL=InputAlertsJsonSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputAlertsJsonSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/InputAlertsJsonSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,qBAAqB,GAAiC;IAC/D,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACxB,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC9B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC3B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC3B,QAAQ,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACR,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BACrB,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;yBACxB;wBACD,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;qBACvB;oBACD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC7B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC7B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC/B,wBAAwB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC5C,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACrC,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAChC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC5B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC3B;gBACD,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC;aAClC;SACJ;QACD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACjC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KACtC;IACD,QAAQ,EAAE,CAAC,iBAAiB,CAAC;CAChC,CAAC"}
@@ -0,0 +1,116 @@
1
+ export declare const InputIrregularitiesJsonSchema: {
2
+ type: string;
3
+ properties: {
4
+ endTime: {
5
+ type: string;
6
+ };
7
+ endTimeMillis: {
8
+ type: string;
9
+ };
10
+ irregularities: {
11
+ type: string;
12
+ items: {
13
+ type: string;
14
+ properties: {
15
+ alertsCount: {
16
+ type: string;
17
+ };
18
+ causeType: {
19
+ type: string;
20
+ };
21
+ country: {
22
+ type: string;
23
+ };
24
+ delaySeconds: {
25
+ type: string;
26
+ };
27
+ detectionDate: {
28
+ type: string;
29
+ };
30
+ detectionDateMillis: {
31
+ type: string;
32
+ };
33
+ driversCount: {
34
+ type: string;
35
+ };
36
+ endNode: {
37
+ type: string;
38
+ };
39
+ highway: {
40
+ type: string;
41
+ };
42
+ id: {
43
+ type: string;
44
+ };
45
+ jamLevel: {
46
+ type: string;
47
+ };
48
+ length: {
49
+ type: string;
50
+ };
51
+ line: {
52
+ type: string;
53
+ items: {
54
+ type: string;
55
+ properties: {
56
+ x: {
57
+ type: string;
58
+ };
59
+ y: {
60
+ type: string;
61
+ };
62
+ };
63
+ };
64
+ };
65
+ nComments: {
66
+ type: string;
67
+ };
68
+ nImages: {
69
+ type: string;
70
+ };
71
+ nThumbsUp: {
72
+ type: string;
73
+ };
74
+ regularSpeed: {
75
+ type: string;
76
+ };
77
+ seconds: {
78
+ type: string;
79
+ };
80
+ severity: {
81
+ type: string;
82
+ };
83
+ speed: {
84
+ type: string;
85
+ };
86
+ startNode: {
87
+ type: string;
88
+ };
89
+ street: {
90
+ type: string;
91
+ };
92
+ trend: {
93
+ type: string;
94
+ };
95
+ type: {
96
+ type: string;
97
+ };
98
+ updateDate: {
99
+ type: string;
100
+ };
101
+ updateDateMillis: {
102
+ type: string;
103
+ };
104
+ };
105
+ required: string[];
106
+ };
107
+ };
108
+ startTime: {
109
+ type: string;
110
+ };
111
+ startTimeMillis: {
112
+ type: string;
113
+ };
114
+ };
115
+ required: string[];
116
+ };
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InputIrregularitiesJsonSchema = void 0;
4
+ exports.InputIrregularitiesJsonSchema = {
5
+ type: "object",
6
+ properties: {
7
+ endTime: { type: "string" },
8
+ endTimeMillis: { type: "number" },
9
+ irregularities: {
10
+ type: "array",
11
+ items: {
12
+ type: "object",
13
+ properties: {
14
+ alertsCount: { type: "number" },
15
+ causeType: { type: "string" },
16
+ country: { type: "string" },
17
+ delaySeconds: { type: "number" },
18
+ detectionDate: { type: "string" },
19
+ detectionDateMillis: { type: "number" },
20
+ driversCount: { type: "number" },
21
+ endNode: { type: "string" },
22
+ highway: { type: "boolean" },
23
+ id: { type: "number" },
24
+ jamLevel: { type: "number" },
25
+ length: { type: "number" },
26
+ line: {
27
+ type: "array",
28
+ items: {
29
+ type: "object",
30
+ properties: { x: { type: "number" }, y: { type: "number" } },
31
+ },
32
+ },
33
+ nComments: { type: "number" },
34
+ nImages: { type: "number" },
35
+ nThumbsUp: { type: "number" },
36
+ regularSpeed: { type: "number" },
37
+ seconds: { type: "number" },
38
+ severity: { type: "number" },
39
+ speed: { type: "number" },
40
+ startNode: { type: "string" },
41
+ street: { type: "string" },
42
+ trend: { type: "number" },
43
+ type: { type: "string" },
44
+ updateDate: { type: "string" },
45
+ updateDateMillis: { type: "number" },
46
+ },
47
+ required: ["detectionDateMillis", "id", "updateDateMillis"],
48
+ },
49
+ },
50
+ startTime: { type: "string" },
51
+ startTimeMillis: { type: "number" },
52
+ },
53
+ required: ["startTimeMillis"],
54
+ };
55
+ //# sourceMappingURL=InputIrregularitiesJsonSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputIrregularitiesJsonSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/InputIrregularitiesJsonSchema.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG;IACzC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACjC,cAAc,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC/B,SAAS,EAAE,EAAE,I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B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACxB,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC9B,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBACvC;gBACD,QAAQ,EAAE,CAAC,qBAAqB,EAAE,IAAI,EAAE,kBAAkB,CAAC;aAC9D;SACJ;QACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KACtC;IACD,QAAQ,EAAE,CAAC,iBAAiB,CAAC;CAChC,CAAC"}
@@ -0,0 +1,92 @@
1
+ export declare const InputJamsJsonSchema: {
2
+ type: string;
3
+ properties: {
4
+ endTime: {
5
+ type: string;
6
+ };
7
+ endTimeMillis: {
8
+ type: string;
9
+ };
10
+ jams: {
11
+ type: string;
12
+ items: {
13
+ type: string;
14
+ properties: {
15
+ blockingAlertUuid: {
16
+ type: string;
17
+ };
18
+ city: {
19
+ type: string;
20
+ };
21
+ country: {
22
+ type: string;
23
+ };
24
+ delay: {
25
+ type: string;
26
+ };
27
+ endNode: {
28
+ type: string;
29
+ };
30
+ length: {
31
+ type: string;
32
+ };
33
+ level: {
34
+ type: string;
35
+ };
36
+ line: {
37
+ type: string;
38
+ items: {
39
+ type: string;
40
+ properties: {
41
+ x: {
42
+ type: string;
43
+ };
44
+ y: {
45
+ type: string;
46
+ };
47
+ };
48
+ };
49
+ };
50
+ pubMillis: {
51
+ type: string;
52
+ };
53
+ roadType: {
54
+ type: string;
55
+ };
56
+ segments: {
57
+ type: string;
58
+ items: {
59
+ type: string;
60
+ };
61
+ };
62
+ speed: {
63
+ type: string;
64
+ };
65
+ speedKMH: {
66
+ type: string;
67
+ };
68
+ street: {
69
+ type: string;
70
+ };
71
+ turnType: {
72
+ type: string;
73
+ };
74
+ type: {
75
+ type: string;
76
+ };
77
+ uuid: {
78
+ type: string;
79
+ };
80
+ };
81
+ required: string[];
82
+ };
83
+ };
84
+ startTime: {
85
+ type: string;
86
+ };
87
+ startTimeMillis: {
88
+ type: string;
89
+ };
90
+ };
91
+ required: string[];
92
+ };
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InputJamsJsonSchema = void 0;
4
+ exports.InputJamsJsonSchema = {
5
+ type: "object",
6
+ properties: {
7
+ endTime: { type: "string" },
8
+ endTimeMillis: { type: "number" },
9
+ jams: {
10
+ type: "array",
11
+ items: {
12
+ type: "object",
13
+ properties: {
14
+ blockingAlertUuid: { type: "string" },
15
+ city: { type: "string" },
16
+ country: { type: "string" },
17
+ delay: { type: "number" },
18
+ endNode: { type: "string" },
19
+ length: { type: "number" },
20
+ level: { type: "number" },
21
+ line: {
22
+ type: "array",
23
+ items: {
24
+ type: "object",
25
+ properties: { x: { type: "number" }, y: { type: "number" } },
26
+ },
27
+ },
28
+ pubMillis: { type: "number" },
29
+ roadType: { type: "number" },
30
+ segments: {
31
+ type: "array",
32
+ items: {
33
+ type: "object",
34
+ },
35
+ },
36
+ speed: { type: "number" },
37
+ speedKMH: { type: "number" },
38
+ street: { type: "string" },
39
+ turnType: { type: "string" },
40
+ type: { type: "string" },
41
+ uuid: { type: "number" },
42
+ },
43
+ required: ["pubMillis", "uuid"],
44
+ },
45
+ },
46
+ startTime: { type: "string" },
47
+ startTimeMillis: { type: "number" },
48
+ },
49
+ required: ["startTimeMillis"],
50
+ };
51
+ //# sourceMappingURL=InputJamsJsonSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputJamsJsonSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/InputJamsJsonSchema.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;IAC/B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE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AAE,QAAQ,EAAE;iBAC3B;gBACD,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC;aAClC;SACJ;QACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KACtC;IACD,QAAQ,EAAE,CAAC,iBAAiB,CAAC;CAChC,CAAC"}
@@ -0,0 +1,29 @@
1
+ export interface IInputAlertsInfo {
2
+ city: string;
3
+ confidence: number;
4
+ country: string;
5
+ jamUuid: string;
6
+ location: {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ magvar: number;
11
+ nThumbsUp: number;
12
+ pubMillis: number;
13
+ reliability: number;
14
+ reportByMunicipalityUser: string;
15
+ reportDescription: string;
16
+ reportRating: number;
17
+ roadType: number;
18
+ street: string;
19
+ subtype: string;
20
+ type: string;
21
+ uuid: string;
22
+ }
23
+ export interface IInputAlerts {
24
+ alerts: IInputAlertsInfo[];
25
+ endTime: string;
26
+ endTimeMillis: number;
27
+ startTime: string;
28
+ startTimeMillis: number;
29
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IInputAlerts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IInputAlerts.js","sourceRoot":"","sources":["../../../../src/schema-definitions/datasources/interfaces/IInputAlerts.ts"],"names":[],"mappings":""}