@golemio/waze-ccp 1.1.0 → 1.1.1-dev.791266521
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/migrations/postgresql/20230220093543-waze-alerts.js +53 -0
- package/db/migrations/postgresql/sqls/20230220093543-waze-alerts-down.sql +35 -0
- package/db/migrations/postgresql/sqls/20230220093543-waze-alerts-up.sql +96 -0
- package/dist/integration-engine/WazeCCPAlertsTransformation.d.ts +3 -2
- package/dist/integration-engine/WazeCCPAlertsTransformation.js +17 -24
- package/dist/integration-engine/WazeCCPAlertsTransformation.js.map +1 -1
- package/dist/integration-engine/WazeCCPWorker.js +9 -11
- package/dist/integration-engine/WazeCCPWorker.js.map +1 -1
- package/dist/integration-engine/helpers/AlertsHelper.d.ts +4 -0
- package/dist/integration-engine/helpers/AlertsHelper.js +22 -0
- package/dist/integration-engine/helpers/AlertsHelper.js.map +1 -0
- package/dist/integration-engine/interfaces/WazeAlertsInterface.d.ts +24 -0
- package/dist/integration-engine/interfaces/WazeAlertsInterface.js +3 -0
- package/dist/integration-engine/interfaces/WazeAlertsInterface.js.map +1 -0
- package/dist/integration-engine/repositories/WazeAlertsRepository.d.ts +7 -0
- package/dist/integration-engine/repositories/WazeAlertsRepository.js +50 -0
- package/dist/integration-engine/repositories/WazeAlertsRepository.js.map +1 -0
- package/dist/schema-definitions/index.d.ts +0 -38
- package/dist/schema-definitions/index.js +0 -201
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/interfaces/IAlertDto.d.ts +24 -0
- package/dist/schema-definitions/interfaces/IAlertDto.js +3 -0
- package/dist/schema-definitions/interfaces/IAlertDto.js.map +1 -0
- package/dist/schema-definitions/interfaces/IIrregularityDto.d.ts +36 -0
- package/dist/schema-definitions/interfaces/IIrregularityDto.js +3 -0
- package/dist/schema-definitions/interfaces/IIrregularityDto.js.map +1 -0
- package/dist/schema-definitions/interfaces/IJamDto.d.ts +29 -0
- package/dist/schema-definitions/interfaces/IJamDto.js +3 -0
- package/dist/schema-definitions/interfaces/IJamDto.js.map +1 -0
- package/dist/schema-definitions/models/AlertDto.d.ts +29 -0
- package/dist/schema-definitions/models/AlertDto.js +64 -0
- package/dist/schema-definitions/models/AlertDto.js.map +1 -0
- package/dist/schema-definitions/models/IrregularityDto.d.ts +41 -0
- package/dist/schema-definitions/models/IrregularityDto.js +108 -0
- package/dist/schema-definitions/models/IrregularityDto.js.map +1 -0
- package/dist/schema-definitions/models/JamDto.d.ts +34 -0
- package/dist/schema-definitions/models/JamDto.js +82 -0
- package/dist/schema-definitions/models/JamDto.js.map +1 -0
- package/package.json +10 -10
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IJamDto } from "../interfaces/IJamDto";
|
|
2
|
+
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
3
|
+
import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
4
|
+
export declare class JamDto extends Model<IJamDto> implements IJamDto {
|
|
5
|
+
blocking_alert_id: string | null;
|
|
6
|
+
city: string | null;
|
|
7
|
+
country: string | null;
|
|
8
|
+
delay: number | null;
|
|
9
|
+
downloaded_at: number | null;
|
|
10
|
+
end_node: string | null;
|
|
11
|
+
id: string;
|
|
12
|
+
length: number | null;
|
|
13
|
+
level: number | null;
|
|
14
|
+
line: Array<{
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}> | null;
|
|
18
|
+
pub_millis: number;
|
|
19
|
+
pub_utc_date: Date;
|
|
20
|
+
road_type: number | null;
|
|
21
|
+
speed: number | null;
|
|
22
|
+
speed_kmh: number | null;
|
|
23
|
+
start_node: string | null;
|
|
24
|
+
street: string | null;
|
|
25
|
+
turn_line: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
} | null;
|
|
29
|
+
turn_type: string | null;
|
|
30
|
+
type: string | null;
|
|
31
|
+
uuid: number;
|
|
32
|
+
static attributeModel: ModelAttributes<JamDto>;
|
|
33
|
+
static jsonSchema: JSONSchemaType<IJamDto[]>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JamDto = void 0;
|
|
4
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
+
class JamDto extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.JamDto = JamDto;
|
|
8
|
+
JamDto.attributeModel = {
|
|
9
|
+
blocking_alert_id: sequelize_1.DataTypes.TEXT,
|
|
10
|
+
city: sequelize_1.DataTypes.TEXT,
|
|
11
|
+
country: sequelize_1.DataTypes.TEXT,
|
|
12
|
+
delay: sequelize_1.DataTypes.INTEGER,
|
|
13
|
+
downloaded_at: sequelize_1.DataTypes.BIGINT,
|
|
14
|
+
end_node: sequelize_1.DataTypes.TEXT,
|
|
15
|
+
id: { type: sequelize_1.DataTypes.STRING, primaryKey: true, allowNull: false },
|
|
16
|
+
length: sequelize_1.DataTypes.INTEGER,
|
|
17
|
+
level: sequelize_1.DataTypes.INTEGER,
|
|
18
|
+
line: sequelize_1.DataTypes.JSONB,
|
|
19
|
+
pub_millis: { type: sequelize_1.DataTypes.BIGINT, allowNull: false },
|
|
20
|
+
pub_utc_date: sequelize_1.DataTypes.DATE,
|
|
21
|
+
road_type: sequelize_1.DataTypes.INTEGER,
|
|
22
|
+
speed: sequelize_1.DataTypes.REAL,
|
|
23
|
+
speed_kmh: sequelize_1.DataTypes.REAL,
|
|
24
|
+
start_node: sequelize_1.DataTypes.TEXT,
|
|
25
|
+
street: sequelize_1.DataTypes.TEXT,
|
|
26
|
+
turn_line: sequelize_1.DataTypes.JSONB,
|
|
27
|
+
turn_type: sequelize_1.DataTypes.TEXT,
|
|
28
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
29
|
+
uuid: { type: sequelize_1.DataTypes.STRING, allowNull: false },
|
|
30
|
+
};
|
|
31
|
+
JamDto.jsonSchema = {
|
|
32
|
+
type: "array",
|
|
33
|
+
items: {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: {
|
|
36
|
+
blocking_alert_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
37
|
+
city: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
38
|
+
country: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
39
|
+
delay: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
|
|
40
|
+
downloaded_at: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
|
|
41
|
+
end_node: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
42
|
+
id: { type: "string" },
|
|
43
|
+
length: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
|
|
44
|
+
level: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
|
|
45
|
+
line: {
|
|
46
|
+
oneOf: [
|
|
47
|
+
{
|
|
48
|
+
type: "array",
|
|
49
|
+
items: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: { x: { type: "number" }, y: { type: "number" } },
|
|
52
|
+
required: ["x", "y"],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{ type: "null", nullable: true },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
pub_millis: { type: "integer" },
|
|
59
|
+
pub_utc_date: { type: "object", required: ["toISOString"] },
|
|
60
|
+
road_type: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
|
|
61
|
+
speed: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
|
|
62
|
+
speed_kmh: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
|
|
63
|
+
start_node: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
64
|
+
street: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
65
|
+
turn_line: {
|
|
66
|
+
oneOf: [
|
|
67
|
+
{
|
|
68
|
+
type: "object",
|
|
69
|
+
properties: { x: { type: "number" }, y: { type: "number" } },
|
|
70
|
+
required: ["x", "y"],
|
|
71
|
+
},
|
|
72
|
+
{ type: "null", nullable: true },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
turn_type: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
76
|
+
type: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
77
|
+
uuid: { type: "integer" },
|
|
78
|
+
},
|
|
79
|
+
required: ["id", "pub_millis", "pub_utc_date", "uuid"],
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=JamDto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JamDto.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/JamDto.ts"],"names":[],"mappings":";;;AAEA,mEAAwF;AAExF,MAAa,MAAO,SAAQ,iBAAc;;AAA1C,wBAkGC;AA3EiB,qBAAc,GAA4B;IACpD,iBAAiB,EAAE,qBAAS,CAAC,IAAI;IACjC,IAAI,EAAE,qBAAS,CAAC,IAAI;IACpB,OAAO,EAAE,qBAAS,CAAC,IAAI;IACvB,KAAK,EAAE,qBAAS,CAAC,OAAO;IACxB,aAAa,EAAE,qBAAS,CAAC,MAAM;IAC/B,QAAQ,EAAE,qBAAS,CAAC,IAAI;IACxB,EAAE,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IAClE,MAAM,EAAE,qBAAS,CAAC,OAAO;IACzB,KAAK,EAAE,qBAAS,CAAC,OAAO;IACxB,IAAI,EAAE,qBAAS,CAAC,KAAK;IACrB,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;IACxD,YAAY,EAAE,qBAAS,CAAC,IAAI;IAC5B,SAAS,EAAE,qBAAS,CAAC,OAAO;IAC5B,KAAK,EA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ANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/waze-ccp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1-dev.791266521",
|
|
4
4
|
"description": "Golemio Waze CCP Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
|
|
9
9
|
"build-minimal": "run-s 'build -- --sourceMap false --declaration false'",
|
|
10
10
|
"build-watch": "run-s 'build -- --watch --preserveWatchOutput'",
|
|
11
|
-
"test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register 'test/**/*.test.ts'",
|
|
11
|
+
"test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register --file 'test/setup.ts' 'test/**/*.test.ts'",
|
|
12
12
|
"test-debug": "run-s 'test -- --inspect-brk=9230'",
|
|
13
13
|
"code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
|
|
14
14
|
"generate-docs": "typedoc --out docs/typedoc src",
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
"url": "https://gitlab.com/operator-ict/golemio/code/modules/waze-ccp"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
27
|
+
"node": ">=18.0.0",
|
|
28
28
|
"npm": ">=8.0.0",
|
|
29
29
|
"yarn": "Use npm!"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@commitlint/cli": "^11.0.0",
|
|
33
33
|
"@commitlint/config-conventional": "^11.0.0",
|
|
34
|
-
"@golemio/cli": "1.
|
|
35
|
-
"@golemio/core": "1.
|
|
36
|
-
"@golemio/db-common": "1.0
|
|
37
|
-
"@golemio/eslint-config": "
|
|
34
|
+
"@golemio/cli": "1.4.2",
|
|
35
|
+
"@golemio/core": "1.6.0",
|
|
36
|
+
"@golemio/db-common": "1.1.0",
|
|
37
|
+
"@golemio/eslint-config": "1.1.0",
|
|
38
38
|
"@ovos-media/ts-transform-paths": "^1.7.18-1",
|
|
39
39
|
"@types/chai": "4.2.3",
|
|
40
40
|
"@types/chai-as-promised": "7.1.2",
|
|
41
41
|
"@types/mocha": "^9.1.1",
|
|
42
|
-
"@types/node": "^
|
|
42
|
+
"@types/node": "^18.13.0",
|
|
43
43
|
"@types/object-hash": "^1.3.0",
|
|
44
44
|
"@types/sinon": "^9.0.10",
|
|
45
45
|
"chai": "4.2.0",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"typescript": "4.6.4"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@golemio/core": "
|
|
64
|
+
"@golemio/core": ">=1.5.0"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"object-hash": "^2.0.0"
|
|
68
68
|
}
|
|
69
|
-
}
|
|
69
|
+
}
|