@golemio/energetics 1.3.5-dev.1300843460 → 1.3.5

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 (174) hide show
  1. package/db/example/00_clear_test_data.sql +0 -6
  2. package/db/migrations/postgresql/.config.json +1 -1
  3. package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.d.ts +4 -0
  4. package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.js +19 -0
  5. package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.js.map +1 -0
  6. package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.d.ts +4 -0
  7. package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.js +19 -0
  8. package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.js.map +1 -0
  9. package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.d.ts +9 -0
  10. package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.js +44 -0
  11. package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.js.map +1 -0
  12. package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js +2 -0
  13. package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js.map +1 -1
  14. package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.d.ts +9 -0
  15. package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.js +44 -0
  16. package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.js.map +1 -0
  17. package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.d.ts +7 -0
  18. package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.js +166 -0
  19. package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.js.map +1 -0
  20. package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.d.ts +7 -0
  21. package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.js +41 -0
  22. package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.js.map +1 -0
  23. package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js +4 -0
  24. package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js.map +1 -1
  25. package/docs/implementation_documentation.md +41 -41
  26. package/package.json +2 -4
  27. package/db/example/01_buildings.sql +0 -206
  28. package/db/example/02_organizations.sql +0 -24
  29. package/db/example/03_devices.sql +0 -24
  30. package/db/migrations/postgresql/20240514074033-buildings.js +0 -53
  31. package/db/migrations/postgresql/20240514111900-organizations.js +0 -53
  32. package/db/migrations/postgresql/sqls/20240514074033-buildings-down.sql +0 -2
  33. package/db/migrations/postgresql/sqls/20240514074033-buildings-up.sql +0 -138
  34. package/db/migrations/postgresql/sqls/20240514111900-organizations-down.sql +0 -3
  35. package/db/migrations/postgresql/sqls/20240514111900-organizations-up.sql +0 -37
  36. package/dist/output-gateway/constants/Links.d.ts +0 -3
  37. package/dist/output-gateway/constants/Links.js +0 -7
  38. package/dist/output-gateway/constants/Links.js.map +0 -1
  39. package/dist/output-gateway/constants/RouteVersion.d.ts +0 -3
  40. package/dist/output-gateway/constants/RouteVersion.js +0 -8
  41. package/dist/output-gateway/constants/RouteVersion.js.map +0 -1
  42. package/dist/output-gateway/controllers/v2/BuildingsController.d.ts +0 -11
  43. package/dist/output-gateway/controllers/v2/BuildingsController.js +0 -74
  44. package/dist/output-gateway/controllers/v2/BuildingsController.js.map +0 -1
  45. package/dist/output-gateway/controllers/v2/V2DevicesController.d.ts +0 -11
  46. package/dist/output-gateway/controllers/v2/V2DevicesController.js +0 -67
  47. package/dist/output-gateway/controllers/v2/V2DevicesController.js.map +0 -1
  48. package/dist/output-gateway/controllers/v2/V2OrganizationsController.d.ts +0 -13
  49. package/dist/output-gateway/controllers/v2/V2OrganizationsController.js +0 -79
  50. package/dist/output-gateway/controllers/v2/V2OrganizationsController.js.map +0 -1
  51. package/dist/output-gateway/helpers/CreateLinkHelper.d.ts +0 -6
  52. package/dist/output-gateway/helpers/CreateLinkHelper.js +0 -32
  53. package/dist/output-gateway/helpers/CreateLinkHelper.js.map +0 -1
  54. package/dist/output-gateway/index.d.ts +0 -1
  55. package/dist/output-gateway/index.js +0 -10
  56. package/dist/output-gateway/index.js.map +0 -1
  57. package/dist/output-gateway/ioc/Di.d.ts +0 -3
  58. package/dist/output-gateway/ioc/Di.js +0 -51
  59. package/dist/output-gateway/ioc/Di.js.map +0 -1
  60. package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +0 -22
  61. package/dist/output-gateway/ioc/ModuleContainerToken.js +0 -26
  62. package/dist/output-gateway/ioc/ModuleContainerToken.js.map +0 -1
  63. package/dist/output-gateway/models/BuildingsPrimaryModel.d.ts +0 -17
  64. package/dist/output-gateway/models/BuildingsPrimaryModel.js +0 -49
  65. package/dist/output-gateway/models/BuildingsPrimaryModel.js.map +0 -1
  66. package/dist/output-gateway/models/BuildingsSecondaryModel.d.ts +0 -124
  67. package/dist/output-gateway/models/BuildingsSecondaryModel.js +0 -338
  68. package/dist/output-gateway/models/BuildingsSecondaryModel.js.map +0 -1
  69. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.d.ts +0 -6
  70. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.js +0 -2
  71. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.js.map +0 -1
  72. package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.d.ts +0 -156
  73. package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.js +0 -3
  74. package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.js.map +0 -1
  75. package/dist/output-gateway/models/interfaces/IPrimaryBuildings.d.ts +0 -10
  76. package/dist/output-gateway/models/interfaces/IPrimaryBuildings.js +0 -3
  77. package/dist/output-gateway/models/interfaces/IPrimaryBuildings.js.map +0 -1
  78. package/dist/output-gateway/models/interfaces/ISecondaryBuildings.d.ts +0 -114
  79. package/dist/output-gateway/models/interfaces/ISecondaryBuildings.js +0 -3
  80. package/dist/output-gateway/models/interfaces/ISecondaryBuildings.js.map +0 -1
  81. package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.d.ts +0 -117
  82. package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.js +0 -3
  83. package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.js.map +0 -1
  84. package/dist/output-gateway/repositories/DevicesRepository.d.ts +0 -8
  85. package/dist/output-gateway/repositories/DevicesRepository.js +0 -64
  86. package/dist/output-gateway/repositories/DevicesRepository.js.map +0 -1
  87. package/dist/output-gateway/repositories/OrganizationBuildingsRepository.d.ts +0 -6
  88. package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js +0 -47
  89. package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js.map +0 -1
  90. package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.d.ts +0 -6
  91. package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js +0 -47
  92. package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js.map +0 -1
  93. package/dist/output-gateway/repositories/OrganizationsRepository.d.ts +0 -17
  94. package/dist/output-gateway/repositories/OrganizationsRepository.js +0 -133
  95. package/dist/output-gateway/repositories/OrganizationsRepository.js.map +0 -1
  96. package/dist/output-gateway/repositories/PrimaryBuildingsRepository.d.ts +0 -15
  97. package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js +0 -86
  98. package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js.map +0 -1
  99. package/dist/output-gateway/repositories/SecondaryBuildingsRepository.d.ts +0 -6
  100. package/dist/output-gateway/repositories/SecondaryBuildingsRepository.js +0 -33
  101. package/dist/output-gateway/repositories/SecondaryBuildingsRepository.js.map +0 -1
  102. package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.d.ts +0 -9
  103. package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.js +0 -47
  104. package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.js.map +0 -1
  105. package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.d.ts +0 -5
  106. package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.js +0 -3
  107. package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.js.map +0 -1
  108. package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.d.ts +0 -18
  109. package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.js +0 -3
  110. package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.js.map +0 -1
  111. package/dist/output-gateway/repositories/interfaces/IOrganizationDto.d.ts +0 -4
  112. package/dist/output-gateway/repositories/interfaces/IOrganizationDto.js +0 -3
  113. package/dist/output-gateway/repositories/interfaces/IOrganizationDto.js.map +0 -1
  114. package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.d.ts +0 -8
  115. package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.js +0 -3
  116. package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.js.map +0 -1
  117. package/dist/output-gateway/routers/helpers/parseParams.d.ts +0 -4
  118. package/dist/output-gateway/routers/helpers/parseParams.js +0 -17
  119. package/dist/output-gateway/routers/helpers/parseParams.js.map +0 -1
  120. package/dist/output-gateway/routers/interfaces/IDeviceResponse.d.ts +0 -6
  121. package/dist/output-gateway/routers/interfaces/IDeviceResponse.js +0 -3
  122. package/dist/output-gateway/routers/interfaces/IDeviceResponse.js.map +0 -1
  123. package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.d.ts +0 -34
  124. package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.js +0 -3
  125. package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.js.map +0 -1
  126. package/dist/output-gateway/routers/interfaces/IOrganizationResponse.d.ts +0 -4
  127. package/dist/output-gateway/routers/interfaces/IOrganizationResponse.js +0 -3
  128. package/dist/output-gateway/routers/interfaces/IOrganizationResponse.js.map +0 -1
  129. package/dist/output-gateway/routers/interfaces/IPaginationParams.d.ts +0 -4
  130. package/dist/output-gateway/routers/interfaces/IPaginationParams.js +0 -3
  131. package/dist/output-gateway/routers/interfaces/IPaginationParams.js.map +0 -1
  132. package/dist/output-gateway/routers/v2/BuildingsRouter.d.ts +0 -10
  133. package/dist/output-gateway/routers/v2/BuildingsRouter.js +0 -26
  134. package/dist/output-gateway/routers/v2/BuildingsRouter.js.map +0 -1
  135. package/dist/output-gateway/routers/v2/V2DevicesRouter.d.ts +0 -7
  136. package/dist/output-gateway/routers/v2/V2DevicesRouter.js +0 -41
  137. package/dist/output-gateway/routers/v2/V2DevicesRouter.js.map +0 -1
  138. package/dist/output-gateway/routers/v2/V2OrganizationsRouter.d.ts +0 -7
  139. package/dist/output-gateway/routers/v2/V2OrganizationsRouter.js +0 -41
  140. package/dist/output-gateway/routers/v2/V2OrganizationsRouter.js.map +0 -1
  141. package/dist/output-gateway/transformations/BuildingTransformationFull.d.ts +0 -14
  142. package/dist/output-gateway/transformations/BuildingTransformationFull.js +0 -215
  143. package/dist/output-gateway/transformations/BuildingTransformationFull.js.map +0 -1
  144. package/dist/output-gateway/transformations/BuildingsTransformation.d.ts +0 -8
  145. package/dist/output-gateway/transformations/BuildingsTransformation.js +0 -38
  146. package/dist/output-gateway/transformations/BuildingsTransformation.js.map +0 -1
  147. package/dist/output-gateway/transformations/DeviceDtoTransformation.d.ts +0 -8
  148. package/dist/output-gateway/transformations/DeviceDtoTransformation.js +0 -43
  149. package/dist/output-gateway/transformations/DeviceDtoTransformation.js.map +0 -1
  150. package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.d.ts +0 -9
  151. package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js +0 -64
  152. package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js.map +0 -1
  153. package/dist/output-gateway/transformations/OrganizationDtoTransformation.d.ts +0 -9
  154. package/dist/output-gateway/transformations/OrganizationDtoTransformation.js +0 -36
  155. package/dist/output-gateway/transformations/OrganizationDtoTransformation.js.map +0 -1
  156. package/dist/schema-definitions/models/OrganizationBuildingModel.d.ts +0 -10
  157. package/dist/schema-definitions/models/OrganizationBuildingModel.js +0 -33
  158. package/dist/schema-definitions/models/OrganizationBuildingModel.js.map +0 -1
  159. package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.d.ts +0 -16
  160. package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.js +0 -44
  161. package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.js.map +0 -1
  162. package/dist/schema-definitions/models/OrganizationsModel.d.ts +0 -21
  163. package/dist/schema-definitions/models/OrganizationsModel.js +0 -59
  164. package/dist/schema-definitions/models/OrganizationsModel.js.map +0 -1
  165. package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.d.ts +0 -4
  166. package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.js +0 -3
  167. package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.js.map +0 -1
  168. package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.d.ts +0 -10
  169. package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.js +0 -3
  170. package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.js.map +0 -1
  171. package/dist/schema-definitions/models/interfaces/IOrganizationsModel.d.ts +0 -15
  172. package/dist/schema-definitions/models/interfaces/IOrganizationsModel.js +0 -3
  173. package/dist/schema-definitions/models/interfaces/IOrganizationsModel.js.map +0 -1
  174. package/docs/openapi-output.yaml +0 -834
@@ -36,7 +36,7 @@ Modul slouží k ukládání dat o spotřebě energií v budovách a jednotlivý
36
36
  - protokol: http
37
37
  - datový typ: json
38
38
  - validační schéma: [datasources](../src/schema-definitions/datasources)
39
- - příklad vstupnich dat: [fixtures](../test/integration-engine/oict-energetika/transformations/fixture)
39
+ - příklad vstupnich dat: [fixtures](../test/integration-engine/workers/oict-energetika/transformations/fixture)
40
40
  - frekvence stahování
41
41
  - cron definice:
42
42
  - cron.dataplatform.energeticsoict.fetchData (data za posledních 14 dní s parametrem `{ "targetDays": 14 }`)
@@ -46,6 +46,7 @@ Modul slouží k ukládání dat o spotřebě energií v budovách a jednotlivý
46
46
  - dataplatform.energeticsoict.fetchData
47
47
  - dataplatform.energeticsoict.fetchBuildings
48
48
  - dataplatform.energeticsoict.fetchConsumption
49
+ - dataplatform.energeticsoict.fetchDevices
49
50
 
50
51
  #### _Unimonitor CEM API - Vrtbovský palác_
51
52
 
@@ -270,16 +271,17 @@ Worker se stará o stahování dat (spotřeba, seznamy budov a meřidel) z datov
270
271
 
271
272
  #### _task: FetchDataTask_
272
273
 
273
- Metoda pouze rozesílá zprávy do ostatních front (fetchBuildings, fetchConsumption)
274
+ Metoda pouze rozesílá zprávy do ostatních front (fetchBuildings, fetchConsumption, fetchDevices)
274
275
 
275
276
  - vstupní rabbitmq fronta
276
277
  - název: dataplatform.energeticsoict.fetchData
277
278
  - TTL: 29 minut
278
279
  - parametry: `{ targetDays }`
279
- - validační schéma: [FetchDataSchema](../src/integration-engine/schema/oict-energetika/FetchDataSchema.ts)
280
+ - validační schéma: [FetchDataSchema](../src/integration-engine/workers/oict-energetika/schema/FetchDataSchema.ts)
280
281
  - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
281
282
  - dataplatform.energeticsoict.fetchBuildings
282
283
  - dataplatform.energeticsoict.fetchConsumption
284
+ - dataplatform.energeticsoict.fetchDevices
283
285
  - datové zdroje
284
286
  - žádné
285
287
  - transformace
@@ -287,6 +289,40 @@ Metoda pouze rozesílá zprávy do ostatních front (fetchBuildings, fetchConsum
287
289
  - data modely
288
290
  - žádné
289
291
 
292
+ #### _task: FetchBuildingsTask_
293
+
294
+ Metoda sbírá informace o budovách
295
+
296
+ - vstupní rabbitmq fronta
297
+ - název: dataplatform.energeticsoict.fetchBuildings
298
+ - TTL: 29 minut
299
+ - parametry: žádné
300
+ - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
301
+ - žádné
302
+ - datové zdroje
303
+ - OICT Energetika (buildings/full)
304
+ - transformace
305
+ - [BuildingsTransformation](../src/integration-engine/workers/oict-energetika/transformations/BuildingsTransformation.ts)
306
+ - data modely
307
+ - BuildingsModel `consumption_energy_buildings`
308
+
309
+ #### _task: FetchDevicesTask_
310
+
311
+ Metoda sbírá informace o měřičích
312
+
313
+ - vstupní rabbitmq fronta
314
+ - název: dataplatform.energeticsoict.fetchDevices
315
+ - TTL: 29 minut
316
+ - parametry: žádné
317
+ - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
318
+ - žádné
319
+ - datové zdroje
320
+ - OICT Energetika (devices/full)
321
+ - transformace
322
+ - [DevicesTransformation](../src/integration-engine/workers/oict-energetika/transformations/DevicesTransformation.ts)
323
+ - data modely
324
+ - DevicesModel `consumption_energy_devices`
325
+
290
326
  #### _task: FetchConsumptionTask_
291
327
 
292
328
  Metoda sbírá data o spotřebách od různých poskytovalů API (consumption) a ze systémů Dot Controls (visapp)
@@ -295,13 +331,13 @@ Metoda sbírá data o spotřebách od různých poskytovalů API (consumption) a
295
331
  - název: dataplatform.energeticsoict.fetchConsumption
296
332
  - TTL: 10 hodin
297
333
  - parametry: `{ dateFrom, dateTo }`
298
- - validační schéma: [FetchDataSchema](../src/integration-engine/schema/oict-energetika/FetchDataSchema.ts)
334
+ - validační schéma: [FetchDataSchema](../src/integration-engine/workers/oict-energetika/schema/FetchDataSchema.ts)
299
335
  - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
300
336
  - žádné
301
337
  - datové zdroje
302
338
  - OICT Energetika (data/consumption, data/visapp)
303
339
  - transformace
304
- - [ConsumptionTransformation](../src/integration-engine/transformations/oict-energetika/ConsumptionTransformation.ts)
340
+ - [ConsumptionTransformation](../src/integration-engine/workers/oict-energetika/transformations/ConsumptionTransformation.ts)
305
341
  - data modely
306
342
  - ConsumptionModel `consumption_energy_consumption`
307
343
 
@@ -364,39 +400,3 @@ Metoda sbírá historická data
364
400
  ![commodity diagram](./assets/commodity_erd.jpg)
365
401
  - retence dat
366
402
  - data si uchováváme
367
-
368
- ## Output API
369
-
370
- ### Obecné
371
-
372
- - OpenAPI v2 dokumentace
373
- - zdrojový soubor: [openapi-output.yaml](./openapi-output.yaml)
374
- - rabin: https://rabin.golemio.cz/v2/docs/openapi/
375
- - golem: https://api.golemio.cz/v2/docs/openapi/
376
-
377
- ### API
378
-
379
- #### _/buildings_
380
-
381
- - zdrojové tabulky
382
- - `consumption_energy_buildings_primary`
383
- - `consumption_energy_buildings_secondary`
384
-
385
- #### _/v2/energetics/organizations_
386
-
387
- #### _/v2/energetics/organizations/full_
388
-
389
- #### _/v2/energetics/organizations/:id_
390
-
391
- - zdrojové tabulky
392
- - organizations
393
- - organization_responsible_users
394
- - organizations_buildings
395
- - consumption_energy_buildings
396
-
397
- #### _/v2/energetics/devices/full_
398
-
399
- #### _/v2/energetics/devices/:id_
400
-
401
- - zdrojové tabulky
402
- - consumption_energy_devices
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/energetics",
3
- "version": "1.3.5-dev.1300843460",
3
+ "version": "1.3.5",
4
4
  "description": "Golemio Energetics Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,9 +11,8 @@
11
11
  "pretest": "golemio import-db-data",
12
12
  "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'",
13
13
  "test-debug": "run-s 'test -- --inspect-brk=9230'",
14
- "apidocs-test": "npm run apidocs-test-input && npm run apidocs-test-output",
14
+ "apidocs-test": "npm run apidocs-test-input",
15
15
  "apidocs-test-input": "cross-env NODE_ENV=test golemio swagger api-test --oas docs/openapi-input.yaml --script test/api-docs/input-gateway/server.js",
16
- "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",
17
16
  "code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
18
17
  "generate-docs": "typedoc --out docs/typedoc src",
19
18
  "lint": "eslint \"{src,test}/**/*.ts\""
@@ -74,7 +73,6 @@
74
73
  "@golemio/core": ">=1.8.4"
75
74
  },
76
75
  "dependencies": {
77
- "basic-ftp": "^5.0.2",
78
76
  "JSONStream": "^1.3.5"
79
77
  },
80
78
  "overrides": {}
@@ -1,206 +0,0 @@
1
- INSERT INTO consumption_energy_buildings_primary (id,description,building_name,building_address_code,building_label,main_use,secondary_use,year_of_construction,create_batch_id,created_at,created_by,update_batch_id,updated_at,updated_by) VALUES
2
- (7, 'Hlavní budova', 'SŠAI Weilova', '2.1', 'SŠAI', 'Budova pro vzdělávání', 'Budova užívaná orgánem veřejné moci', null, NULL, '2023-01-06 15:20:34.708', NULL, NULL, '2024-05-20 13:30:02.235', NULL),
3
- (10, '', 'Gymnázium Na Vítězné pláni', '2.2', 'GVP', 'budova pro vzdělávání', 'budova pro vzdělávání', 1961, NULL, '2023-01-06 15:20:34.709', NULL, NULL, '2024-05-20 13:30:02.235', NULL),
4
- (11, '', 'Gymnázium a Hudební škola hlavního města Prahy', '2.3', 'GYHU', 'budova pro vzdělávání', 'bytový dům, budova pro vzdělávání', null, NULL, '2023-01-06 15:20:34.709', NULL, NULL, '2024-05-20 13:30:02.235', NULL),
5
- (36, 'Školní autoservis – Bohdalec', 'SŠAI Weilova – Bohdalec', '2.1.2', 'SŠAI', 'Budova pro vzdělávání', 'Budova užívaná orgánem veřejné moci', null, NULL, '2023-01-06 15:20:34.730', NULL, NULL, '2024-05-20 13:30:02.237', NULL),
6
- (37, 'Školní autoservis – Libuš', 'SŠAI Weilova – Libuš', '2.1.3', 'SŠAI', 'Budova pro obchodní účely', 'Budova užívaná orgánem veřejné moci', null, NULL, '2023-01-06 15:20:34.730', NULL, NULL, '2024-05-20 13:30:02.237', NULL),
7
- (38, 'Školní chata', 'SŠAI Weilova - Školní chata', '2.1.4', 'SŠAI', 'Budova pro ubytování a stravování', 'Budova užívaná orgánem veřejné moci', 1910, NULL, '2023-01-06 15:20:34.729', NULL, NULL, '2024-05-20 13:30:02.237', NULL),
8
- (100,'Správa služeb hlavního města Prahy - K Sádkám','K sádkám č.p. 141','3.31.3','Administrativní budova','Administrativní budova','Administrativní budova',1987,NULL,NULL,NULL,NULL,NULL,NULL);
9
-
10
- INSERT INTO consumption_energy_buildings_secondary (
11
- id,
12
- address_house_number,
13
- address_city,
14
- address_country,
15
- address_mail,
16
- address_phone,
17
- address_web_address,
18
- penb_penbnumber,
19
- penb_issue_date,
20
- penb_total_building_envelope_area,
21
- penb_volume_factor_of_avshape,
22
- penb_total_energy_reference_area,
23
- penb_total_provided_energy,
24
- penb_total_provided_energy_category,
25
- penb_primary_non_renewable_energy,
26
- penb_primary_non_renewable_energy_category,
27
- penb_building_envelope,
28
- penb_building_envelope_category,
29
- penb_heating,
30
- penb_heating_category,
31
- penb_cooling,
32
- penb_cooling_category,
33
- penb_ventilation,
34
- penb_ventilation_category,
35
- penb_humidity_adjustment,
36
- penb_humidity_adjustment_category,
37
- penb_warm_water,
38
- penb_warm_water_category,
39
- penb_lighting,
40
- penb_lighting_category,
41
- energy_audits_energy_audit,
42
- energy_audits_earegistration_number,
43
- energy_audits_created_at,
44
- building_envelope_side_wall_prevailing_construction,
45
- building_envelope_side_wall_area,
46
- building_envelope_side_wall_heat_insulation,
47
- building_envelope_side_wall_year_of_adjustment,
48
- building_envelope_side_wall_technical_condition,
49
- building_envelope_filling_of_hole_construction,
50
- building_envelope_filling_of_hole_area,
51
- building_envelope_filling_of_hole_year_of_adjustment,
52
- building_envelope_filling_of_hole_technical_condition,
53
- building_envelope_roof_construction,
54
- building_envelope_roof_area,
55
- building_envelope_roof_thermal_insulation,
56
- building_envelope_roof_year_of_adjustment,
57
- building_envelope_roof_technical_condition,
58
- building_envelope_floor_of_the_lowest_heated_floor_construction,
59
- building_envelope_floor_of_the_lowest_heated_floor_area,
60
- floor_of_the_lowest_heated_floor_thermal_insulation,
61
- building_envelope_floor_of_the_lowest_heated_floor_year_of_adju,
62
- floor_of_the_lowest_heated_floor_technical_condition,
63
- fuel_and_energy_coal,
64
- fuel_and_energy_gas,
65
- fuel_and_energy_electricity,
66
- fuel_and_energy_czt,
67
- fuel_and_energy_oze,
68
- fuel_and_energy_other,
69
- technical_equipment_heating_main_source_of_heat,
70
- technical_equipment_heating_heat_percentage,
71
- technical_equipment_heating_secondary_source_of_heat,
72
- technical_equipment_heating_heating_system,
73
- technical_equipment_heating_year,
74
- technical_equipment_heating_technical_condition,
75
- technical_equipment_cooling_cooling_system,
76
- technical_equipment_cooling_cooling_area_percentage,
77
- technical_equipment_cooling_year,
78
- technical_equipment_cooling_technical_condition,
79
- technical_equipment_ventilation_ventilation,
80
- technical_equipment_ventilation_year,
81
- technical_equipment_ventilation_technical_condition,
82
- technical_equipment_humidity_adjustment_humidity_adjustment,
83
- technical_equipment_humidity_adjustment_year,
84
- technical_equipment_humidity_adjustment_technical_condition,
85
- technical_equipment_hot_water_predominant_way_of_heating_tv,
86
- technical_equipment_hot_water_hot_water_source,
87
- technical_equipment_hot_water_year,
88
- technical_equipment_hot_water_technical_condition,
89
- technical_equipment_lighting_lighting,
90
- technical_equipment_lighting_year,
91
- technical_equipment_lighting_technical_condition,
92
- technical_equipment_lighting_other_technological_elements,
93
- technical_equipment_lighting_measurement_method,
94
- oze_energy_production_solar_energy_photovoltaic,
95
- oze_energy_production_solar_energy_photothermal,
96
- oze_energy_production_integrated_turbines_wind_energy,
97
- oze_energy_production_heat_pump,
98
- waste_and_emissions_solid_waste_production,
99
- waste_and_emissions_tied_co2_emissions,
100
- waste_and_emissions_sox_emissions,
101
- waste_and_emissions_operating_co_2emissions,
102
- create_batch_id,
103
- created_at,
104
- created_by,
105
- update_batch_id,
106
- updated_at,
107
- updated_by
108
- ) VALUES (
109
- 100,
110
- 'house_number_value',
111
- 'city_value',
112
- 'country_value',
113
- 'mail_value',
114
- 'phone_value',
115
- 'web_address_value',
116
- 123,
117
- '2022-01-01 00:00:00',
118
- 100.5,
119
- 'volume_factor_value',
120
- 200.5,
121
- 300.5,
122
- 'provided_energy_category_value',
123
- 400.5,
124
- 'non_renewable_energy_category_value',
125
- 500.5,
126
- 'building_envelope_category_value',
127
- 600.5,
128
- 'heating_category_value',
129
- 700.5,
130
- 'cooling_category_value',
131
- 800.5,
132
- 'ventilation_category_value',
133
- 900.5,
134
- 'humidity_adjustment_category_value',
135
- 1000.5,
136
- 'warm_water_category_value',
137
- 1100.5,
138
- 'lighting_category_value',
139
- 'energy_audit_value',
140
- 1234,
141
- '2022-01-01 00:00:00',
142
- 'side_wall_construction_value',
143
- 1200.5,
144
- 'side_wall_heat_insulation_value',
145
- 'side_wall_year_value',
146
- 'side_wall_technical_condition_value',
147
- 'filling_of_hole_construction_value',
148
- 1300.5,
149
- 'filling_of_hole_year_value',
150
- 'filling_of_hole_technical_condition_value',
151
- 'roof_construction_value',
152
- 1400.5,
153
- 'roof_thermal_insulation_value',
154
- 'roof_year_value',
155
- 'roof_technical_condition_value',
156
- 'floor_construction_value',
157
- 1500.5,
158
- 'floor_thermal_insulation_value',
159
- 'floor_year_value',
160
- 'floor_technical_condition_value',
161
- true,
162
- true,
163
- true,
164
- true,
165
- true,
166
- true,
167
- 'heating_source_value',
168
- 80,
169
- 'secondary_heat_source_value',
170
- 'heating_system_value',
171
- 'heating_year_value',
172
- 'heating_technical_condition_value',
173
- 'cooling_system_value',
174
- 70,
175
- 'cooling_year_value',
176
- 'cooling_technical_condition_value',
177
- 'ventilation_value',
178
- 'ventilation_year_value',
179
- 'ventilation_technical_condition_value',
180
- 'humidity_adjustment_value',
181
- 'humidity_adjustment_year_value',
182
- 'humidity_adjustment_technical_condition_value',
183
- 'hot_water_heating_value',
184
- 'hot_water_source_value',
185
- 'hot_water_year_value',
186
- 'hot_water_technical_condition_value',
187
- 'lighting_value',
188
- 'lighting_year_value',
189
- 'lighting_technical_condition_value',
190
- 'other_technological_elements_value',
191
- 'measurement_method_value',
192
- 'solar_photovoltaic_value',
193
- 'solar_photothermal_value',
194
- 'wind_energy_value',
195
- 'heat_pump_value',
196
- 'solid_waste_production_value',
197
- 'tied_co2_emissions_value',
198
- 'sox_emissions_value',
199
- 'operating_co2_emissions_value',
200
- 1,
201
- '2022-01-01 00:00:00',
202
- 'created_by_value',
203
- 2,
204
- '2022-01-02 00:00:00',
205
- 'updated_by_value'
206
- );
@@ -1,24 +0,0 @@
1
- INSERT INTO organization_responsible_users (id, first_name, last_name, "position", phone, mail, company, organization_id) VALUES
2
- (1, 'Milan', 'Vorel', 'ředitel', NULL, 'milan.vorel@skolahostivar.cz', NULL, 1),
3
- (2, 'Zdeněk', 'Kočárek', 'vedoucí technické správy', NULL, 'zdenek.kocarek@skolahostivar.cz', NULL, 1),
4
- (3, 'Jaroslav', 'Malý', 'správa budov', NULL, 'jaroslav.maly@skolahostivar.cz', NULL, 1),
5
- (4, 'Jaroslav', 'Mervínský', 'ředitel', NULL, 'reditel@gvp.cz', NULL, 2),
6
- (5, 'Martin', 'Horyna', 'zástupce ředitele', NULL, 'horyna@gvp.cz', NULL, 2),
7
- (6, 'Milan', 'Slanina', 'školník', NULL, 'slanina@gvp.cz', NULL, 2),
8
- (7, 'Filip', 'Magram', 'ředitel', NULL, 'reditel@gmhs.cz', NULL, 3),
9
- (8, 'Zuzana', 'Koutníková', 'ekonomka školy', NULL, 'ekonom@gmhs.cz', NULL, 3),
10
- (9, 'Blanka', 'Blahová', 'správa budov', NULL, 'spravce@gmhs.cz', NULL, 3),
11
- (10, 'Julius', 'Olšiak', 'referent správy budov (školník)', NULL, NULL, NULL, 3);
12
-
13
- INSERT INTO organizations (id, "name", "label", address_street, address_house_number, address_city, address_country, address_mail, address_phone, address_web_address, category, created_by_id, grafana_url) VALUES
14
- (1, 'SŠAI Weilova', 'SO01 SŠAI', 'Weilova', '12704', 'Praha 10 - Hostivař', 'Česká Republika', 'mailbox@skolahostivar.cz', '242 456 100', 'http://www.skolahostivar.cz', 'Školství', 64, 'http://10.200.0.73:3000/d/l8OJLI2ik/01-ss-automobilni-a-informatiky-weilova?orgId=2'),
15
- (2, 'Gymnázium Na Vítězné pláni', 'SO02 GVP', 'Na Vítězné pláni', '1160', 'Praha 4, 140 00', 'Česká Republika', 'mail@gvp.cz', '261 109 611', 'http://www.gvp.cz/', 'Školství', 64, 'http://10.200.0.73:3000/d/e7zcnRYmk/02-gymnazium-na-vitezne-plani?orgId=2'),
16
- (3, 'Gymnázium a Hudební škola hlavního města Prahy ', 'SO03 GYHU', 'Komenského náměstí ', '400', 'Praha 3, 130 00', 'Česká Republika', 'sekretariat@gmhs.cz', '221 434 711', 'http://www.gmhs.cz/', 'Školství', 64, 'http://10.200.0.73:3000/d/2um5VgYik/03-gymnazium-a-hudebni-skola-hlavniho-mesta-prahy?orgId=2');
17
-
18
- INSERT INTO organizations_buildings (organization_id, building_id) VALUES
19
- (1, 7),
20
- (1, 38),
21
- (1, 37),
22
- (1, 36),
23
- (2, 10),
24
- (3, 11);
@@ -1,24 +0,0 @@
1
- INSERT INTO consumption_energy_devices (id,addr,description,meter_number,meter_index,location_number,location_description,include_in_evaluation,meter_type,category,unit,replaced_meter_id,deleted,building_id,create_batch_id,created_at,created_by,update_batch_id,updated_at,updated_by) VALUES
2
- (16,'/2.2/PF1','Fakturační plynoměr škola','743037','1','27ZG100Z00008560','Škola','true','Plynoměr','Hlavní (fakturační)','m^3','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
3
- (17,'/2.2/PF2','Fakturační plynoměr kuchyně','26033503','2','27ZG100Z00008560','Kuchyně','true','Plynoměr','Hlavní (fakturační)','m^3','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
4
- (18,'/2.2/PF3','Fakturační plynoměr laboratoře','26033504','3','27ZG100Z00008560','Laboratoře','true','Plynoměr','Hlavní (fakturační)','m^3','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
5
- (19,'/2.2/TVP1','TV byt školníka','03360876','1','','TV byt školníka','false','Vodoměr','Podružný','m^3','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
6
- (20,'/2.2/EF1','Fakturační elektroměr škola','50838771','1','859182400305337226','Škola','true','Elektroměr','Hlavní (fakturační)','kWh','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
7
- (21,'/2.2/EF2','Fakturační elektroměr kuchyně','50838773','2','859182400305337486','kuchyně','true','Elektroměr','Hlavní (fakturační)','kWh','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
8
- (22,'/2.2/EP1','Podružný elektroměr byt školníka','25718070072','3','','byt školníka','true','Elektroměr','Podružný','kWh','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
9
- (23,'/2.2/EP2','Podružný elektroměr bufet','25718070073','4','','Bufet','true','Elektroměr','Podružný','kWh','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
10
- (24,'/2.2/VF1','Fakturační vodoměr škola','5038170010','2','302502-46-V1','Škola','true','Vodoměr','Hlavní (fakturační)','m^3','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
11
- (25,'/2.2/VF2','Fakturační vodoměr kuchyně','18BA317996','3','302502-45-V1','Kuchyně','true','Vodoměr','Hlavní (fakturační)','m^3','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
12
- (26,'/2.2/VP1','Podružný vodoměr byt školníka','04946912','4','','Byt školníka','true','Vodoměr','Podružný','m^3','','false',10,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
13
- (27,'/2.3/PF1','Fakturační plynoměr kotelna','9312989','1','27ZG100Z0001191L','Kotelna','true','Plynoměr','Hlavní (fakturační)','m^3','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
14
- (29,'/2.3/TVP1','Podružné měření byt','18372914','1','','Podružné měření byt','true','Vodoměr','Podružný','m^3','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
15
- (30,'/2.3/EF1','Fakturační elektroměr škola','85535937','1','859182400300019356','Škola','true','Elektroměr','Hlavní (fakturační)','kWh','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
16
- (31,'/2.3/EP1','Podružný elektroměr kuchyně','26018040915','2','','Kuchyně','true','Elektroměr','Podružný','kWh','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
17
- (32,'/2.3/EP2','Podružný elektroměr bazén','25718070076','3','','Bazén','true','Elektroměr','Podružný','kWh','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
18
- (33,'/2.3/EP3','Podružný elektroměr byt','25718070078','4','','Byt ','true','Elektroměr','Podružný','kWh','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
19
- (34,'/2.3/VF1','Fakturační vodoměr škola','18BF011549','2','300135-189-V1','Škola','true','Vodoměr','Hlavní (fakturační)','m^3','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
20
- (35,'/2.3/VP1','Měření na studené vodě pro TV kuchyně','42 011 531 860','3','','TV kuchyň','true','Vodoměr','Podružný','m^3','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
21
- (36,'/2.3/VP2','Podružné měření kuchyně','5090290001','4','','Kuchyně','true','Vodoměr','Podružný','m^3','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
22
- (37,'/2.3/VP3','Podružné měření byt','18372914','5','','Byt','true','Vodoměr','Podružný','m^3','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
23
- (38,'/2.3/VP4','Podružné měření bazén','01TE060034','6','','Bazén','true','Vodoměr','Podružný','m^3','','false',11,NULL,'2023-01-06 15:20:34.359',NULL,NULL,'2024-05-20 17:30:01.138',NULL),
24
- (136,'/2.3/PF1','Fakturační plynoměr kotelna','9512360','2','27ZG100Z0001191L','Kotelna','true','Plynoměr','Hlavní (fakturační)','m^3','27','false',11,NULL,'2023-01-06 15:20:34.36',NULL,NULL,'2024-05-20 17:30:01.139',NULL);
@@ -1,53 +0,0 @@
1
- 'use strict';
2
-
3
- var dbm;
4
- var type;
5
- var seed;
6
- var fs = require('fs');
7
- var path = require('path');
8
- var Promise;
9
-
10
- /**
11
- * We receive the dbmigrate dependency from dbmigrate initially.
12
- * This enables us to not have to rely on NODE_PATH.
13
- */
14
- exports.setup = function(options, seedLink) {
15
- dbm = options.dbmigrate;
16
- type = dbm.dataType;
17
- seed = seedLink;
18
- Promise = options.Promise;
19
- };
20
-
21
- exports.up = function(db) {
22
- var filePath = path.join(__dirname, 'sqls', '20240514074033-buildings-up.sql');
23
- return new Promise( function( resolve, reject ) {
24
- fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
25
- if (err) return reject(err);
26
- console.log('received data: ' + data);
27
-
28
- resolve(data);
29
- });
30
- })
31
- .then(function(data) {
32
- return db.runSql(data);
33
- });
34
- };
35
-
36
- exports.down = function(db) {
37
- var filePath = path.join(__dirname, 'sqls', '20240514074033-buildings-down.sql');
38
- return new Promise( function( resolve, reject ) {
39
- fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
40
- if (err) return reject(err);
41
- console.log('received data: ' + data);
42
-
43
- resolve(data);
44
- });
45
- })
46
- .then(function(data) {
47
- return db.runSql(data);
48
- });
49
- };
50
-
51
- exports._meta = {
52
- "version": 1
53
- };
@@ -1,53 +0,0 @@
1
- 'use strict';
2
-
3
- var dbm;
4
- var type;
5
- var seed;
6
- var fs = require('fs');
7
- var path = require('path');
8
- var Promise;
9
-
10
- /**
11
- * We receive the dbmigrate dependency from dbmigrate initially.
12
- * This enables us to not have to rely on NODE_PATH.
13
- */
14
- exports.setup = function(options, seedLink) {
15
- dbm = options.dbmigrate;
16
- type = dbm.dataType;
17
- seed = seedLink;
18
- Promise = options.Promise;
19
- };
20
-
21
- exports.up = function(db) {
22
- var filePath = path.join(__dirname, 'sqls', '20240514111900-organizations-up.sql');
23
- return new Promise( function( resolve, reject ) {
24
- fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
25
- if (err) return reject(err);
26
- console.log('received data: ' + data);
27
-
28
- resolve(data);
29
- });
30
- })
31
- .then(function(data) {
32
- return db.runSql(data);
33
- });
34
- };
35
-
36
- exports.down = function(db) {
37
- var filePath = path.join(__dirname, 'sqls', '20240514111900-organizations-down.sql');
38
- return new Promise( function( resolve, reject ) {
39
- fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
40
- if (err) return reject(err);
41
- console.log('received data: ' + data);
42
-
43
- resolve(data);
44
- });
45
- })
46
- .then(function(data) {
47
- return db.runSql(data);
48
- });
49
- };
50
-
51
- exports._meta = {
52
- "version": 1
53
- };
@@ -1,2 +0,0 @@
1
- drop table consumption_energy_buildings_primary;
2
- drop table consumption_energy_buildings_secondary;