@golemio/flow 1.3.4-dev.1510445431 → 1.3.4-rc.1848372728
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/dist/integration-engine/CountersWorker.js +11 -20
- package/dist/integration-engine/CountersWorker.js.map +1 -1
- package/dist/integration-engine/FlowWorker.js +57 -71
- package/dist/integration-engine/FlowWorker.js.map +1 -1
- package/dist/integration-engine/queueDefinitions.js +0 -57
- package/dist/integration-engine/queueDefinitions.js.map +1 -1
- package/dist/integration-engine/transformations/EcoCounterMeasurementsTransformation.js +2 -11
- package/dist/integration-engine/transformations/EcoCounterMeasurementsTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/EcoCounterTransformation.js +9 -18
- package/dist/integration-engine/transformations/EcoCounterTransformation.js.map +1 -1
- package/dist/output-gateway/PedestriansRouter.js +8 -17
- package/dist/output-gateway/PedestriansRouter.js.map +1 -1
- package/dist/output-gateway/models/PedestriansLocationsModel.js +6 -15
- package/dist/output-gateway/models/PedestriansLocationsModel.js.map +1 -1
- package/dist/output-gateway/models/PedestriansMeasurementsModel.js +5 -14
- package/dist/output-gateway/models/PedestriansMeasurementsModel.js.map +1 -1
- package/docs/implementation_documentation_CZ.md +1 -1
- package/docs/{openapi.yaml → openapi-output.yaml} +23 -19
- package/package.json +7 -4
- package/dist/integration-engine/FlowWorkerTest.d.ts +0 -29
- package/dist/integration-engine/FlowWorkerTest.js +0 -469
- package/dist/integration-engine/FlowWorkerTest.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EcoCounterMeasurementsTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/EcoCounterMeasurementsTransformation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EcoCounterMeasurementsTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/EcoCounterMeasurementsTransformation.ts"],"names":[],"mappings":";;;AAAA,mDAAgC;AAChC,2FAA4G;AAC5G,kEAA+D;AAE/D,MAAa,oCAAqC,SAAQ,oCAAkB;IAGxE;QACI,KAAK,EAAE,CAAC;QAIF,qBAAgB,GAAG,KAAK,EAAE,OAAY,EAAgB,EAAE;YAC9D,wGAAwG;YACxG,sGAAsG;YACtG,gBAAgB;YAEhB,MAAM,YAAY,GAAG,IAAA,mBAAQ,EAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;YAEjG,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;YAE3D,MAAM,GAAG,GAAG;gBACR,aAAa,EAAE,IAAI;gBACnB,YAAY,EAAE,IAAI;gBAClB,aAAa,EAAE,YAAY,CAAC,MAAM,EAAE;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,EAAE;gBAChC,KAAK,EAAE,OAAO,CAAC,MAAM;aACxB,CAAC;YAEF,OAAO,GAAG,CAAC;QACf,CAAC,CAAC;QArBE,IAAI,CAAC,IAAI,GAAG,eAAQ,CAAC,UAAU,CAAC,IAAI,GAAG,4BAA4B,CAAC;IACxE,CAAC;CAqBJ;AA3BD,oFA2BC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.EcoCounterTransformation = void 0;
|
|
13
4
|
const _sch_1 = require("../../schema-definitions");
|
|
@@ -18,7 +9,7 @@ class EcoCounterTransformation extends integration_engine_1.BaseTransformation {
|
|
|
18
9
|
/**
|
|
19
10
|
* Overrides BaseTransformation::transform
|
|
20
11
|
*/
|
|
21
|
-
this.transform = (data) =>
|
|
12
|
+
this.transform = async (data) => {
|
|
22
13
|
const res = {
|
|
23
14
|
directions: [],
|
|
24
15
|
directionsPedestrians: [],
|
|
@@ -26,8 +17,8 @@ class EcoCounterTransformation extends integration_engine_1.BaseTransformation {
|
|
|
26
17
|
locationsPedestrians: [],
|
|
27
18
|
};
|
|
28
19
|
if (data instanceof Array) {
|
|
29
|
-
const promises = data.map((element, i) =>
|
|
30
|
-
const elemRes =
|
|
20
|
+
const promises = data.map(async (element, i) => {
|
|
21
|
+
const elemRes = await this.transformElement(element);
|
|
31
22
|
if (elemRes) {
|
|
32
23
|
res.directions = res.directions.concat(elemRes.directions);
|
|
33
24
|
res.directionsPedestrians = res.directionsPedestrians.concat(elemRes.directionsPedestrians);
|
|
@@ -35,12 +26,12 @@ class EcoCounterTransformation extends integration_engine_1.BaseTransformation {
|
|
|
35
26
|
res.locationsPedestrians.push(elemRes.locationPedestrians);
|
|
36
27
|
}
|
|
37
28
|
return;
|
|
38
|
-
})
|
|
39
|
-
|
|
29
|
+
});
|
|
30
|
+
await Promise.all(promises);
|
|
40
31
|
return res;
|
|
41
32
|
}
|
|
42
33
|
else {
|
|
43
|
-
const elemRes =
|
|
34
|
+
const elemRes = await this.transformElement(data);
|
|
44
35
|
if (elemRes) {
|
|
45
36
|
res.directions = res.directions.concat(elemRes.directions);
|
|
46
37
|
res.directionsPedestrians = res.directionsPedestrians.concat(elemRes.directionsPedestrians);
|
|
@@ -49,8 +40,8 @@ class EcoCounterTransformation extends integration_engine_1.BaseTransformation {
|
|
|
49
40
|
}
|
|
50
41
|
return res;
|
|
51
42
|
}
|
|
52
|
-
}
|
|
53
|
-
this.transformElement = (element) =>
|
|
43
|
+
};
|
|
44
|
+
this.transformElement = async (element) => {
|
|
54
45
|
const res = {
|
|
55
46
|
directions: element.channels
|
|
56
47
|
? element.channels
|
|
@@ -91,7 +82,7 @@ class EcoCounterTransformation extends integration_engine_1.BaseTransformation {
|
|
|
91
82
|
},
|
|
92
83
|
};
|
|
93
84
|
return res;
|
|
94
|
-
}
|
|
85
|
+
};
|
|
95
86
|
this.name = _sch_1.Counters.ecoCounter.name + "Transformation";
|
|
96
87
|
}
|
|
97
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EcoCounterTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/EcoCounterTransformation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EcoCounterTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/EcoCounterTransformation.ts"],"names":[],"mappings":";;;AAAA,mDAAgC;AAChC,8EAA4F;AAS5F,MAAa,wBAAyB,SAAQ,uCAAkB;IAG5D;QACI,KAAK,EAAE,CAAC;QAIZ;;WAEG;QACI,cAAS,GAAG,KAAK,EAAE,IAAiB,EAA0B,EAAE;YACnE,MAAM,GAAG,GAAkB;gBACvB,UAAU,EAAE,EAAE;gBACd,qBAAqB,EAAE,EAAE;gBACzB,SAAS,EAAE,EAAE;gBACb,oBAAoB,EAAE,EAAE;aAC3B,CAAC;YAEF,IAAI,IAAI,YAAY,KAAK,EAAE;gBACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE;oBAC3C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;oBACrD,IAAI,OAAO,EAAE;wBACT,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC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OAAO,GAAG,CAAC;QACf,CAAC,CAAC;QAjFE,IAAI,CAAC,IAAI,GAAG,eAAQ,CAAC,UAAU,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC5D,CAAC;CAiFJ;AAvFD,4DAuFC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.pedestriansRouter = exports.PedestriansRouter = void 0;
|
|
13
4
|
const Di_1 = require("./ioc/Di");
|
|
@@ -21,15 +12,15 @@ class PedestriansRouter extends BaseRouter_1.BaseRouter {
|
|
|
21
12
|
super();
|
|
22
13
|
this.pedestriansLocationsModel = new models_1.PedestriansLocationsModel();
|
|
23
14
|
this.pedestriansMeasurementsModel = new models_1.PedestriansMeasurementsModel();
|
|
24
|
-
this.GetPedestriansLocations = (req, res, next) =>
|
|
15
|
+
this.GetPedestriansLocations = async (req, res, next) => {
|
|
25
16
|
try {
|
|
26
|
-
const data =
|
|
17
|
+
const data = await this.pedestriansLocationsModel.GetAll({
|
|
27
18
|
locationId: req.query.locationId,
|
|
28
19
|
locationName: req.query.locationName,
|
|
29
20
|
limit: req.query.limit ? +req.query.limit : undefined,
|
|
30
21
|
offset: req.query.offset ? +req.query.offset : undefined,
|
|
31
22
|
});
|
|
32
|
-
if (!
|
|
23
|
+
if (!data?.length)
|
|
33
24
|
return res.status(404).send();
|
|
34
25
|
else
|
|
35
26
|
res.status(200).send(data);
|
|
@@ -37,10 +28,10 @@ class PedestriansRouter extends BaseRouter_1.BaseRouter {
|
|
|
37
28
|
catch (err) {
|
|
38
29
|
next(err);
|
|
39
30
|
}
|
|
40
|
-
}
|
|
41
|
-
this.GetPedestriansMeasurements = (req, res, next) =>
|
|
31
|
+
};
|
|
32
|
+
this.GetPedestriansMeasurements = async (req, res, next) => {
|
|
42
33
|
try {
|
|
43
|
-
const data =
|
|
34
|
+
const data = await this.pedestriansMeasurementsModel.GetAll({
|
|
44
35
|
locationId: req.query.locationId,
|
|
45
36
|
directionId: req.query.directionId,
|
|
46
37
|
limit: req.query.limit ? +req.query.limit : undefined,
|
|
@@ -48,7 +39,7 @@ class PedestriansRouter extends BaseRouter_1.BaseRouter {
|
|
|
48
39
|
from: req.query.from,
|
|
49
40
|
to: req.query.to,
|
|
50
41
|
});
|
|
51
|
-
if (!
|
|
42
|
+
if (!data?.length)
|
|
52
43
|
return res.status(404).send();
|
|
53
44
|
else
|
|
54
45
|
res.status(200).send(data);
|
|
@@ -56,7 +47,7 @@ class PedestriansRouter extends BaseRouter_1.BaseRouter {
|
|
|
56
47
|
catch (err) {
|
|
57
48
|
next(err);
|
|
58
49
|
}
|
|
59
|
-
}
|
|
50
|
+
};
|
|
60
51
|
this.cacheHeaderMiddleware = Di_1.FlowContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
|
|
61
52
|
this.router.get("/locations", [
|
|
62
53
|
(0, express_validator_1.query)("locationId").optional().not().isEmpty({ ignore_whitespace: true }).not().isArray(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PedestriansRouter.js","sourceRoot":"","sources":["../../src/output-gateway/PedestriansRouter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PedestriansRouter.js","sourceRoot":"","sources":["../../src/output-gateway/PedestriansRouter.ts"],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
-
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -32,7 +23,7 @@ class PedestriansLocationsModel extends models_1.SequelizeModel {
|
|
|
32
23
|
* @param {string} [options.locationName] Human readable location name<br>
|
|
33
24
|
* @returns Array of the retrieved records
|
|
34
25
|
*/
|
|
35
|
-
this.GetAll = (options = {}) =>
|
|
26
|
+
this.GetAll = async (options = {}) => {
|
|
36
27
|
const { limit, offset, locationId, locationName } = options;
|
|
37
28
|
try {
|
|
38
29
|
const and = sequelize_1.default.Op.and;
|
|
@@ -59,7 +50,7 @@ class PedestriansLocationsModel extends models_1.SequelizeModel {
|
|
|
59
50
|
];
|
|
60
51
|
order.push(["location_id", "DESC"]);
|
|
61
52
|
// Request to pedestrians_locations_api
|
|
62
|
-
const pedestriansLocationsData =
|
|
53
|
+
const pedestriansLocationsData = await this.sequelizeModel.findAll({
|
|
63
54
|
attributes,
|
|
64
55
|
limit,
|
|
65
56
|
offset,
|
|
@@ -72,7 +63,7 @@ class PedestriansLocationsModel extends models_1.SequelizeModel {
|
|
|
72
63
|
SELECT *
|
|
73
64
|
FROM ${index_1.Flow.pgSchema}.v_pedestrians_directions_api
|
|
74
65
|
`;
|
|
75
|
-
let pedestriansDirectionsFromDB =
|
|
66
|
+
let pedestriansDirectionsFromDB = await database_1.sequelizeConnection?.query(pedestriansDirectionsQuery);
|
|
76
67
|
const pedestriansDirectionsData = (pedestriansDirectionsFromDB || [])[0];
|
|
77
68
|
// datatransformation to responseArr
|
|
78
69
|
let responseArr = [];
|
|
@@ -111,10 +102,10 @@ class PedestriansLocationsModel extends models_1.SequelizeModel {
|
|
|
111
102
|
catch (err) {
|
|
112
103
|
throw new golemio_errors_1.GeneralError("Database error", "PedestriansLocationsModel", err, 500);
|
|
113
104
|
}
|
|
114
|
-
}
|
|
115
|
-
this.GetOne = (id) =>
|
|
105
|
+
};
|
|
106
|
+
this.GetOne = async (id) => {
|
|
116
107
|
return null;
|
|
117
|
-
}
|
|
108
|
+
};
|
|
118
109
|
}
|
|
119
110
|
}
|
|
120
111
|
exports.PedestriansLocationsModel = PedestriansLocationsModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PedestriansLocationsModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/PedestriansLocationsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PedestriansLocationsModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/PedestriansLocationsModel.ts"],"names":[],"mappings":";;;;;;AAAA,6EAAwE;AACxE,yEAAiF;AACjF,oFAA4D;AAC5D,qEAA0E;AAC1E,kEAA+D;AAC/D,0DAAkC;AAUlC,MAAa,yBAA0B,SAAQ,uBAAc;IACzD;QACI,KAAK,CACD,YAAI,CAAC,uBAAuB,CAAC,IAAI,EACjC,YAAI,CAAC,uBAAuB,CAAC,WAAW,EACxC,YAAI,CAAC,uBAAuB,CAAC,yBAAyB,EACtD;YACI,MAAM,EAAE,YAAI,CAAC,QAAQ;SACxB,CACJ,CAAC;QAGN;;;;;;;WAOG;QAEI,WAAM,GAAG,KAAK,EACjB,UAKI,EAAE,EACM,EAAE;YACd,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;YAC5D,IAAI;gBACA,MAAM,GAAG,GAAW,mBAAS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C,CAAC;aACnF;QACL,CAAC,CAAC;QAEK,WAAM,GAAG,KAAK,EAAE,EAAU,EAA0B,EAAE;YACzD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IA7GF,CAAC;CA8GJ;AAxHD,8DAwHC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -32,7 +23,7 @@ class PedestriansMeasurementsModel extends models_1.SequelizeModel {
|
|
|
32
23
|
* @param {string} [options.to] ISO date<br>
|
|
33
24
|
* @returns Array of the retrieved records
|
|
34
25
|
*/
|
|
35
|
-
this.GetAll = (options = {}) =>
|
|
26
|
+
this.GetAll = async (options = {}) => {
|
|
36
27
|
const { limit, offset, locationId, directionId, from, to } = options;
|
|
37
28
|
try {
|
|
38
29
|
// Request to pedestrians_detections_api
|
|
@@ -63,7 +54,7 @@ class PedestriansMeasurementsModel extends models_1.SequelizeModel {
|
|
|
63
54
|
}
|
|
64
55
|
const attributes = ["measured_from", "measured_to", "location_id", "direction_id", "value", "quality"];
|
|
65
56
|
order.push(["location_id", "DESC"]);
|
|
66
|
-
return
|
|
57
|
+
return await this.sequelizeModel.findAll({
|
|
67
58
|
attributes,
|
|
68
59
|
limit,
|
|
69
60
|
offset,
|
|
@@ -75,10 +66,10 @@ class PedestriansMeasurementsModel extends models_1.SequelizeModel {
|
|
|
75
66
|
catch (err) {
|
|
76
67
|
throw new golemio_errors_1.GeneralError("Database error", "PedestriansMeasurementsModel", err, 500);
|
|
77
68
|
}
|
|
78
|
-
}
|
|
79
|
-
this.GetOne = (id) =>
|
|
69
|
+
};
|
|
70
|
+
this.GetOne = async (id) => {
|
|
80
71
|
return null;
|
|
81
|
-
}
|
|
72
|
+
};
|
|
82
73
|
}
|
|
83
74
|
}
|
|
84
75
|
exports.PedestriansMeasurementsModel = PedestriansMeasurementsModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PedestriansMeasurementsModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/PedestriansMeasurementsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PedestriansMeasurementsModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/PedestriansMeasurementsModel.ts"],"names":[],"mappings":";;;;;;AAAA,oFAA4D;AAC5D,6EAAwE;AACxE,qEAA0E;AAC1E,0DAAkC;AAElC,MAAa,4BAA6B,SAAQ,uBAAc;IAC5D;QACI,KAAK,CACD,YAAI,CAAC,0BAA0B,CAAC,IAAI,EACpC,YAAI,CAAC,0BAA0B,CAAC,WAAW,EAC3C,YAAI,CAAC,0BAA0B,CAAC,yBAAyB,EACzD;YACI,MAAM,EAAE,YAAI,CAAC,QAAQ;SACxB,CACJ,CAAC;QAGN;;;;;;;;;WASG;QACI,WAAM,GAAG,KAAK,EACjB,UAOI,EAAE,EACM,EAAE;YACd,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;YACrE,IAAI;gBACA,wCAAwC;gBACxC,MAAM,GAAG,GAAW,mBAAS,CAAC,EAAE,CAAC,GAAG,CAAC;gBACrC,MAAM,K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EAAU,EAA0B,EAAE;YACzD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IA1EF,CAAC;CA2EJ;AArFD,oEAqFC"}
|
|
@@ -33,12 +33,14 @@ paths:
|
|
|
33
33
|
schema:
|
|
34
34
|
type: integer
|
|
35
35
|
format: int64
|
|
36
|
+
example: 1
|
|
36
37
|
- name: locationName
|
|
37
38
|
in: query
|
|
38
39
|
description: Lists only locations with this NAME
|
|
39
40
|
required: false
|
|
40
41
|
schema:
|
|
41
42
|
type: string
|
|
43
|
+
example: "Výstaviště - viadukt VO 2"
|
|
42
44
|
- name: limit
|
|
43
45
|
in: query
|
|
44
46
|
description: Limits number of retrieved items
|
|
@@ -46,6 +48,7 @@ paths:
|
|
|
46
48
|
schema:
|
|
47
49
|
type: integer
|
|
48
50
|
format: int64
|
|
51
|
+
example: 5
|
|
49
52
|
- name: offset
|
|
50
53
|
in: query
|
|
51
54
|
description: Number of the first items that are skipped
|
|
@@ -53,6 +56,7 @@ paths:
|
|
|
53
56
|
schema:
|
|
54
57
|
type: integer
|
|
55
58
|
format: int64
|
|
59
|
+
example: 0
|
|
56
60
|
responses:
|
|
57
61
|
"200":
|
|
58
62
|
description: successful operation
|
|
@@ -65,7 +69,9 @@ paths:
|
|
|
65
69
|
content:
|
|
66
70
|
application/json:
|
|
67
71
|
schema:
|
|
68
|
-
|
|
72
|
+
type: array
|
|
73
|
+
items:
|
|
74
|
+
$ref: "#/components/schemas/PedestriansLocation"
|
|
69
75
|
"401":
|
|
70
76
|
$ref: "#/components/responses/UnauthorizedError"
|
|
71
77
|
"404":
|
|
@@ -83,17 +89,15 @@ paths:
|
|
|
83
89
|
description: Lists only measurements for this location
|
|
84
90
|
required: false
|
|
85
91
|
schema:
|
|
86
|
-
type:
|
|
87
|
-
|
|
88
|
-
example: 0
|
|
92
|
+
type: string
|
|
93
|
+
example: wifi1
|
|
89
94
|
- name: directionId
|
|
90
95
|
in: query
|
|
91
96
|
description: Lists only measurements for this direction
|
|
92
97
|
required: false
|
|
93
98
|
schema:
|
|
94
|
-
type:
|
|
95
|
-
|
|
96
|
-
example: 4
|
|
99
|
+
type: string
|
|
100
|
+
example: dir2
|
|
97
101
|
- name: limit
|
|
98
102
|
in: query
|
|
99
103
|
description: Limits number of retrieved items
|
|
@@ -101,7 +105,7 @@ paths:
|
|
|
101
105
|
schema:
|
|
102
106
|
type: integer
|
|
103
107
|
format: int64
|
|
104
|
-
example:
|
|
108
|
+
example: 2
|
|
105
109
|
- name: offset
|
|
106
110
|
in: query
|
|
107
111
|
description: Number of the first items that are skipped
|
|
@@ -109,7 +113,7 @@ paths:
|
|
|
109
113
|
schema:
|
|
110
114
|
type: integer
|
|
111
115
|
format: int64
|
|
112
|
-
example:
|
|
116
|
+
example: 0
|
|
113
117
|
- name: from
|
|
114
118
|
in: query
|
|
115
119
|
description: Date in ISO8601, limits data measured from this datetime
|
|
@@ -117,7 +121,7 @@ paths:
|
|
|
117
121
|
schema:
|
|
118
122
|
type: string
|
|
119
123
|
format: date
|
|
120
|
-
example: 2020-
|
|
124
|
+
example: 2020-11-24T10:30:00.000Z
|
|
121
125
|
- name: to
|
|
122
126
|
in: query
|
|
123
127
|
description: Date in ISO8601, limits data measured up until this datetime
|
|
@@ -125,7 +129,7 @@ paths:
|
|
|
125
129
|
schema:
|
|
126
130
|
type: string
|
|
127
131
|
format: date
|
|
128
|
-
example: 2020-
|
|
132
|
+
example: 2020-11-24T10:45:00.000Z
|
|
129
133
|
responses:
|
|
130
134
|
"200":
|
|
131
135
|
description: successful operation
|
|
@@ -138,7 +142,9 @@ paths:
|
|
|
138
142
|
content:
|
|
139
143
|
application/json:
|
|
140
144
|
schema:
|
|
141
|
-
|
|
145
|
+
type: array
|
|
146
|
+
items:
|
|
147
|
+
$ref: "#/components/schemas/PedestriansMeasurement"
|
|
142
148
|
"401":
|
|
143
149
|
$ref: "#/components/responses/UnauthorizedError"
|
|
144
150
|
"404":
|
|
@@ -187,12 +193,11 @@ components:
|
|
|
187
193
|
example: https://storage.golemio.cz/intenzita-pesi-dopravy/2.png
|
|
188
194
|
measurement_start:
|
|
189
195
|
type: string
|
|
190
|
-
format: date
|
|
191
196
|
example: 2020-09-02 12:00
|
|
192
197
|
measurement_end:
|
|
193
198
|
type: string
|
|
194
|
-
format: date
|
|
195
199
|
example: 2020-09-05 12:00
|
|
200
|
+
nullable: true
|
|
196
201
|
directions:
|
|
197
202
|
type: array
|
|
198
203
|
items:
|
|
@@ -213,8 +218,7 @@ components:
|
|
|
213
218
|
type: object
|
|
214
219
|
properties:
|
|
215
220
|
id:
|
|
216
|
-
type:
|
|
217
|
-
format: int64
|
|
221
|
+
type: string
|
|
218
222
|
example: "2"
|
|
219
223
|
name:
|
|
220
224
|
type: string
|
|
@@ -222,7 +226,7 @@ components:
|
|
|
222
226
|
to:
|
|
223
227
|
type: integer
|
|
224
228
|
format: int64
|
|
225
|
-
example:
|
|
229
|
+
example: 1
|
|
226
230
|
required:
|
|
227
231
|
- id
|
|
228
232
|
- name
|
|
@@ -245,11 +249,11 @@ components:
|
|
|
245
249
|
example: "1.00000000000000000000"
|
|
246
250
|
measured_from:
|
|
247
251
|
type: string
|
|
248
|
-
format: date
|
|
252
|
+
format: date-time
|
|
249
253
|
example: 2020-08-21T17:30:00.000Z
|
|
250
254
|
measured_to:
|
|
251
255
|
type: string
|
|
252
|
-
format: date
|
|
256
|
+
format: date-time
|
|
253
257
|
example: 2020-08-21T17:45:00.000Z
|
|
254
258
|
required:
|
|
255
259
|
- location_id
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/flow",
|
|
3
|
-
"version": "1.3.4-
|
|
3
|
+
"version": "1.3.4-rc.1848372728",
|
|
4
4
|
"description": "Golemio Flow Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
"test": "cross-env NODE_ENV=test mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r tsconfig-paths/register -r dotenv/config --file 'test/setup.ts' 'test/**/*.test.ts'",
|
|
14
14
|
"test-debug": "run-s 'test -- --inspect-brk=9230'",
|
|
15
15
|
"code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
|
|
16
|
+
"apidocs-test": "npm run apidocs-test-output",
|
|
17
|
+
"apidocs-test-output": "cross-env NODE_ENV=test golemio swagger api-test --oas docs/openapi-output.yaml --script test/api-docs/output-gateway/server.js --config test/api-docs/output-gateway/portman-config.json",
|
|
16
18
|
"generate-docs": "typedoc --out docs/typedoc src",
|
|
17
19
|
"lint": "eslint \"{src,test}/**/*.ts\""
|
|
18
20
|
},
|
|
@@ -30,11 +32,12 @@
|
|
|
30
32
|
"npm": ">=8.0.0"
|
|
31
33
|
},
|
|
32
34
|
"devDependencies": {
|
|
35
|
+
"@apideck/portman": "^1.26.5",
|
|
33
36
|
"@commitlint/cli": "^11.0.0",
|
|
34
37
|
"@commitlint/config-conventional": "^11.0.0",
|
|
35
|
-
"@golemio/cli": "1.
|
|
36
|
-
"@golemio/core": "1.
|
|
37
|
-
"@golemio/db-common": "1.
|
|
38
|
+
"@golemio/cli": "1.10.0",
|
|
39
|
+
"@golemio/core": "1.20.7",
|
|
40
|
+
"@golemio/db-common": "1.2.0",
|
|
38
41
|
"@golemio/eslint-config": "1.1.2",
|
|
39
42
|
"@types/chai": "^4.2.3",
|
|
40
43
|
"@types/chai-as-promised": "^7.1.2",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { BaseWorker } from "@golemio/core/dist/integration-engine/workers";
|
|
2
|
-
/**
|
|
3
|
-
* Temporary worker for testing purposes
|
|
4
|
-
*/
|
|
5
|
-
export declare class FlowWorkerTest extends BaseWorker {
|
|
6
|
-
private static testSchema;
|
|
7
|
-
private test_url;
|
|
8
|
-
private cubesDataSource;
|
|
9
|
-
private analyticsDataSource;
|
|
10
|
-
private sinksDataSource;
|
|
11
|
-
private sinksHistoryDataSource;
|
|
12
|
-
private flowCubesModel;
|
|
13
|
-
private flowMeasurementModel;
|
|
14
|
-
private flowODMeasurementModel;
|
|
15
|
-
private flowSinksModel;
|
|
16
|
-
private queuePrefix;
|
|
17
|
-
constructor();
|
|
18
|
-
private getHistoryIntervalFromMsg;
|
|
19
|
-
refreshCubes: (msg: any) => Promise<void>;
|
|
20
|
-
getAnalytics: (msg: any) => Promise<void>;
|
|
21
|
-
getSinks: (msg: any) => Promise<void>;
|
|
22
|
-
getSinksHistoryPayloads: (msg: any) => Promise<void>;
|
|
23
|
-
getSinksHistory: (msg: any) => Promise<void>;
|
|
24
|
-
private getMeasurementsDistribution;
|
|
25
|
-
private getMeasurementsOdMatrix;
|
|
26
|
-
private getHistoryPayload;
|
|
27
|
-
private getTimeRanges;
|
|
28
|
-
private getHttpSettings;
|
|
29
|
-
}
|