@golemio/rush-hour-aggregation 1.0.0 → 1.0.1-dev.532695480

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 (53) hide show
  1. package/README.md +15 -13
  2. package/db/migrations/postgresql/20220505053742-addMaterialViews.js +53 -0
  3. package/db/migrations/postgresql/sqls/20220505053742-addMaterialViews-down.sql +10 -0
  4. package/db/migrations/postgresql/sqls/20220505053742-addMaterialViews-up.sql +565 -0
  5. package/dist/integration-engine/AggregationWorker.d.ts +2 -0
  6. package/dist/integration-engine/AggregationWorker.js +14 -2
  7. package/dist/integration-engine/AggregationWorker.js.map +1 -1
  8. package/dist/integration-engine/dataAccess/AbstractEventsRepository.d.ts +9 -0
  9. package/dist/integration-engine/dataAccess/AbstractEventsRepository.js +35 -0
  10. package/dist/integration-engine/dataAccess/AbstractEventsRepository.js.map +1 -0
  11. package/dist/integration-engine/dataAccess/FcdEventsRepository.d.ts +4 -2
  12. package/dist/integration-engine/dataAccess/FcdEventsRepository.js +4 -2
  13. package/dist/integration-engine/dataAccess/FcdEventsRepository.js.map +1 -1
  14. package/dist/integration-engine/dataAccess/NdicEventRepository.d.ts +4 -2
  15. package/dist/integration-engine/dataAccess/NdicEventRepository.js +4 -2
  16. package/dist/integration-engine/dataAccess/NdicEventRepository.js.map +1 -1
  17. package/dist/integration-engine/dataAccess/TskEventsRepository.d.ts +4 -2
  18. package/dist/integration-engine/dataAccess/TskEventsRepository.js +4 -2
  19. package/dist/integration-engine/dataAccess/TskEventsRepository.js.map +1 -1
  20. package/dist/integration-engine/dataAccess/WazeJamsRepository.d.ts +4 -2
  21. package/dist/integration-engine/dataAccess/WazeJamsRepository.js +4 -2
  22. package/dist/integration-engine/dataAccess/WazeJamsRepository.js.map +1 -1
  23. package/dist/integration-engine/dataAccess/WazeReconstructionsRepository.d.ts +4 -2
  24. package/dist/integration-engine/dataAccess/WazeReconstructionsRepository.js +4 -2
  25. package/dist/integration-engine/dataAccess/WazeReconstructionsRepository.js.map +1 -1
  26. package/dist/integration-engine/queueDefinitions.js +10 -0
  27. package/dist/integration-engine/queueDefinitions.js.map +1 -1
  28. package/dist/integration-engine/service/AggregationFactory.d.ts +2 -2
  29. package/dist/integration-engine/service/AggregationFactory.js.map +1 -1
  30. package/dist/integration-engine/service/aggregators/AbstractAggregator.d.ts +7 -3
  31. package/dist/integration-engine/service/aggregators/AbstractAggregator.js +8 -0
  32. package/dist/integration-engine/service/aggregators/AbstractAggregator.js.map +1 -1
  33. package/dist/integration-engine/service/aggregators/FcdEventsAggregator.d.ts +3 -3
  34. package/dist/integration-engine/service/aggregators/FcdEventsAggregator.js +0 -4
  35. package/dist/integration-engine/service/aggregators/FcdEventsAggregator.js.map +1 -1
  36. package/dist/integration-engine/service/aggregators/NdicEventsAggregator.d.ts +3 -3
  37. package/dist/integration-engine/service/aggregators/NdicEventsAggregator.js +0 -4
  38. package/dist/integration-engine/service/aggregators/NdicEventsAggregator.js.map +1 -1
  39. package/dist/integration-engine/service/aggregators/TskEventsAggregator.d.ts +3 -3
  40. package/dist/integration-engine/service/aggregators/TskEventsAggregator.js +0 -4
  41. package/dist/integration-engine/service/aggregators/TskEventsAggregator.js.map +1 -1
  42. package/dist/integration-engine/service/aggregators/WazeJamsAggregator.d.ts +3 -3
  43. package/dist/integration-engine/service/aggregators/WazeJamsAggregator.js +0 -4
  44. package/dist/integration-engine/service/aggregators/WazeJamsAggregator.js.map +1 -1
  45. package/dist/integration-engine/service/aggregators/WazeReconstructionsAggregator.d.ts +3 -3
  46. package/dist/integration-engine/service/aggregators/WazeReconstructionsAggregator.js +0 -4
  47. package/dist/integration-engine/service/aggregators/WazeReconstructionsAggregator.js.map +1 -1
  48. package/dist/integration-engine/service/aggregators/interfaces/IAbstractAggregator.d.ts +6 -0
  49. package/dist/integration-engine/service/aggregators/interfaces/IAbstractAggregator.js +3 -0
  50. package/dist/integration-engine/service/aggregators/interfaces/IAbstractAggregator.js.map +1 -0
  51. package/package.json +61 -61
  52. package/templates/sqlQueries/FcdEvents.sql +1 -1
  53. package/templates/sqlQueries/NdicEventsFull.sql +2 -2
package/package.json CHANGED
@@ -1,63 +1,63 @@
1
1
  {
2
- "name": "@golemio/rush-hour-aggregation",
3
- "version": "1.0.0",
4
- "description": "Rush hour data agregation for Praha Zasekana project",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
9
- "build-minimal": "run-s 'build --sourceMap false --declaration false'",
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 -r dotenv/config 'test/**/*.test.ts'",
12
- "test-debug": "run-s 'test --inspect-brk=9230'",
13
- "code-coverage": "nyc run-s 'test -r source-map-support/register'",
14
- "generate-docs": "typedoc --out docs/typedoc src",
15
- "lint": "eslint \"{src,test}/**/*.ts\""
16
- },
17
- "keywords": [
18
- "golemio"
19
- ],
20
- "author": "Operator ICT, a.s.",
21
- "license": "MIT",
22
- "repository": {
23
- "type": "git",
24
- "url": "https://gitlab.com/operator-ict/golemio/code/modules/rush-hour-aggregation"
25
- },
26
- "devDependencies": {
27
- "@commitlint/cli": "^11.0.0",
28
- "@commitlint/config-conventional": "^11.0.0",
29
- "@golemio/cli": "1.2.2",
30
- "@golemio/core": "1.2.7",
31
- "@golemio/eslint-config": "^1.1.0",
32
- "@types/amqplib": "^0.5.17",
33
- "@types/chai": "4.2.3",
34
- "@types/chai-as-promised": "7.1.2",
35
- "@types/geojson": "^7946.0.8",
36
- "@types/mocha": "^9.1.0",
37
- "@types/node": "^14.14.20",
38
- "@types/sinon": "^9.0.10",
39
- "@zerollup/ts-transform-paths": "^1.7.18",
40
- "chai": "4.2.0",
41
- "chai-as-promised": "7.1.1",
42
- "cross-env": "^7.0.3",
43
- "dotenv": "^16.0.0",
44
- "eslint": "^8.1.1",
45
- "husky": "^7.0.4",
46
- "mocha": "^9.1.2",
47
- "npm-run-all": "^4.1.5",
48
- "nyc": "^15.1.0",
49
- "prettier": "^2.5.1",
50
- "pretty-quick": "^3.1.3",
51
- "rimraf": "^3.0.2",
52
- "sinon": "^9.2.3",
53
- "source-map-support": "0.5.19",
54
- "ts-node": "^9.1.1",
55
- "ttypescript": "^1.5.13",
56
- "typedoc": "^0.22.15",
57
- "typescript": "4.4.4"
58
- },
59
- "peerDependencies": {
60
- "@golemio/core": "^1.0.0"
61
- },
62
- "dependencies": {}
2
+ "name": "@golemio/rush-hour-aggregation",
3
+ "version": "1.0.1-dev.532695480",
4
+ "description": "Rush hour data agregation for Praha Zasekana project",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
9
+ "build-minimal": "run-s 'build --sourceMap false --declaration false'",
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 -r dotenv/config 'test/**/*.test.ts'",
12
+ "test-debug": "run-s 'test --inspect-brk=9230'",
13
+ "code-coverage": "nyc run-s 'test -r source-map-support/register'",
14
+ "generate-docs": "typedoc --out docs/typedoc src",
15
+ "lint": "eslint \"{src,test}/**/*.ts\""
16
+ },
17
+ "keywords": [
18
+ "golemio"
19
+ ],
20
+ "author": "Operator ICT, a.s.",
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://gitlab.com/operator-ict/golemio/code/modules/rush-hour-aggregation"
25
+ },
26
+ "devDependencies": {
27
+ "@commitlint/cli": "^11.0.0",
28
+ "@commitlint/config-conventional": "^11.0.0",
29
+ "@golemio/cli": "1.2.2",
30
+ "@golemio/core": "1.2.7",
31
+ "@golemio/eslint-config": "^1.1.0",
32
+ "@types/amqplib": "^0.5.17",
33
+ "@types/chai": "4.2.3",
34
+ "@types/chai-as-promised": "7.1.2",
35
+ "@types/geojson": "^7946.0.8",
36
+ "@types/mocha": "^9.1.0",
37
+ "@types/node": "^14.14.20",
38
+ "@types/sinon": "^9.0.10",
39
+ "@zerollup/ts-transform-paths": "^1.7.18",
40
+ "chai": "4.2.0",
41
+ "chai-as-promised": "7.1.1",
42
+ "cross-env": "^7.0.3",
43
+ "dotenv": "^16.0.0",
44
+ "eslint": "^8.1.1",
45
+ "husky": "^7.0.4",
46
+ "mocha": "^9.1.2",
47
+ "npm-run-all": "^4.1.5",
48
+ "nyc": "^15.1.0",
49
+ "prettier": "^2.5.1",
50
+ "pretty-quick": "^3.1.3",
51
+ "rimraf": "^3.0.2",
52
+ "sinon": "^9.2.3",
53
+ "source-map-support": "0.5.19",
54
+ "ts-node": "^9.1.1",
55
+ "ttypescript": "^1.5.13",
56
+ "typedoc": "^0.22.15",
57
+ "typescript": "4.4.4"
58
+ },
59
+ "peerDependencies": {
60
+ "@golemio/core": "^1.0.0"
61
+ },
62
+ "dependencies": {}
63
63
  }
@@ -12,7 +12,7 @@ select
12
12
  'free_flow_speed', a.free_flow_speed
13
13
  ) as properties
14
14
  from
15
- fcd_traff_params_part a
15
+ fcd.fcd_traff_params_part a
16
16
  join praha_zasekana.fcd_geos_90 g on
17
17
  a.source_identification::text = g.source_identification::text
18
18
  where
@@ -69,14 +69,14 @@ from
69
69
  to_timestamp(((date_part('epoch'::text, (timestamp with time zone :to)) / (60 * 30)::double precision)::bigint * 60 * 30)::double precision),
70
70
  '00:30:00'::interval) gs_1(gs)
71
71
  ) gs
72
- join ndic_traffic_info nti on
72
+ join ndic.ndic_traffic_info nti on
73
73
  gs.gs >= nti.validity_overall_start_time
74
74
  and gs.gs <= nti.validity_overall_end_time
75
75
  and nti.situation_version::text = ((
76
76
  select
77
77
  max(nti2.situation_version::text) as max
78
78
  from
79
- ndic_traffic_info nti2
79
+ ndic.ndic_traffic_info nti2
80
80
  where
81
81
  nti2.situation_id::text = nti.situation_id::text
82
82
  and nti2.situation_record_type::text = nti.situation_record_type::text