@golemio/energetics 1.3.5 → 1.3.7-dev.1315648116

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 +6 -0
  2. package/db/example/01_buildings.sql +206 -0
  3. package/db/example/02_organizations.sql +24 -0
  4. package/db/example/03_devices.sql +24 -0
  5. package/db/migrations/postgresql/.config.json +1 -1
  6. package/db/migrations/postgresql/20240514074033-buildings.js +53 -0
  7. package/db/migrations/postgresql/20240514111900-organizations.js +53 -0
  8. package/db/migrations/postgresql/sqls/20240514074033-buildings-down.sql +2 -0
  9. package/db/migrations/postgresql/sqls/20240514074033-buildings-up.sql +138 -0
  10. package/db/migrations/postgresql/sqls/20240514111900-organizations-down.sql +3 -0
  11. package/db/migrations/postgresql/sqls/20240514111900-organizations-up.sql +37 -0
  12. package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js +0 -2
  13. package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js.map +1 -1
  14. package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js +0 -4
  15. package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js.map +1 -1
  16. package/dist/output-gateway/constants/Links.d.ts +3 -0
  17. package/dist/output-gateway/constants/Links.js +7 -0
  18. package/dist/output-gateway/constants/Links.js.map +1 -0
  19. package/dist/output-gateway/constants/RouteVersion.d.ts +3 -0
  20. package/dist/output-gateway/constants/RouteVersion.js +8 -0
  21. package/dist/output-gateway/constants/RouteVersion.js.map +1 -0
  22. package/dist/output-gateway/controllers/v2/BuildingsController.d.ts +11 -0
  23. package/dist/output-gateway/controllers/v2/BuildingsController.js +74 -0
  24. package/dist/output-gateway/controllers/v2/BuildingsController.js.map +1 -0
  25. package/dist/output-gateway/controllers/v2/V2DevicesController.d.ts +11 -0
  26. package/dist/output-gateway/controllers/v2/V2DevicesController.js +67 -0
  27. package/dist/output-gateway/controllers/v2/V2DevicesController.js.map +1 -0
  28. package/dist/output-gateway/controllers/v2/V2OrganizationsController.d.ts +13 -0
  29. package/dist/output-gateway/controllers/v2/V2OrganizationsController.js +79 -0
  30. package/dist/output-gateway/controllers/v2/V2OrganizationsController.js.map +1 -0
  31. package/dist/output-gateway/helpers/CreateLinkHelper.d.ts +6 -0
  32. package/dist/output-gateway/helpers/CreateLinkHelper.js +32 -0
  33. package/dist/output-gateway/helpers/CreateLinkHelper.js.map +1 -0
  34. package/dist/output-gateway/index.d.ts +1 -0
  35. package/dist/output-gateway/index.js +10 -0
  36. package/dist/output-gateway/index.js.map +1 -0
  37. package/dist/output-gateway/ioc/Di.d.ts +3 -0
  38. package/dist/output-gateway/ioc/Di.js +51 -0
  39. package/dist/output-gateway/ioc/Di.js.map +1 -0
  40. package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +22 -0
  41. package/dist/output-gateway/ioc/ModuleContainerToken.js +26 -0
  42. package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -0
  43. package/dist/output-gateway/models/BuildingsPrimaryModel.d.ts +17 -0
  44. package/dist/output-gateway/models/BuildingsPrimaryModel.js +49 -0
  45. package/dist/output-gateway/models/BuildingsPrimaryModel.js.map +1 -0
  46. package/dist/output-gateway/models/BuildingsSecondaryModel.d.ts +124 -0
  47. package/dist/output-gateway/models/BuildingsSecondaryModel.js +338 -0
  48. package/dist/output-gateway/models/BuildingsSecondaryModel.js.map +1 -0
  49. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.d.ts +6 -0
  50. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.js +2 -0
  51. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.js.map +1 -0
  52. package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.d.ts +156 -0
  53. package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.js +3 -0
  54. package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.js.map +1 -0
  55. package/dist/output-gateway/models/interfaces/IPrimaryBuildings.d.ts +10 -0
  56. package/dist/output-gateway/models/interfaces/IPrimaryBuildings.js +3 -0
  57. package/dist/output-gateway/models/interfaces/IPrimaryBuildings.js.map +1 -0
  58. package/dist/output-gateway/models/interfaces/ISecondaryBuildings.d.ts +114 -0
  59. package/dist/output-gateway/models/interfaces/ISecondaryBuildings.js +3 -0
  60. package/dist/output-gateway/models/interfaces/ISecondaryBuildings.js.map +1 -0
  61. package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.d.ts +117 -0
  62. package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.js +3 -0
  63. package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.js.map +1 -0
  64. package/dist/output-gateway/repositories/DevicesRepository.d.ts +8 -0
  65. package/dist/output-gateway/repositories/DevicesRepository.js +64 -0
  66. package/dist/output-gateway/repositories/DevicesRepository.js.map +1 -0
  67. package/dist/output-gateway/repositories/OrganizationBuildingsRepository.d.ts +6 -0
  68. package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js +47 -0
  69. package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js.map +1 -0
  70. package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.d.ts +6 -0
  71. package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js +47 -0
  72. package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js.map +1 -0
  73. package/dist/output-gateway/repositories/OrganizationsRepository.d.ts +17 -0
  74. package/dist/output-gateway/repositories/OrganizationsRepository.js +133 -0
  75. package/dist/output-gateway/repositories/OrganizationsRepository.js.map +1 -0
  76. package/dist/output-gateway/repositories/PrimaryBuildingsRepository.d.ts +15 -0
  77. package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js +86 -0
  78. package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js.map +1 -0
  79. package/dist/output-gateway/repositories/SecondaryBuildingsRepository.d.ts +6 -0
  80. package/dist/output-gateway/repositories/SecondaryBuildingsRepository.js +33 -0
  81. package/dist/output-gateway/repositories/SecondaryBuildingsRepository.js.map +1 -0
  82. package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.d.ts +9 -0
  83. package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.js +47 -0
  84. package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.js.map +1 -0
  85. package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.d.ts +5 -0
  86. package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.js +3 -0
  87. package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.js.map +1 -0
  88. package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.d.ts +18 -0
  89. package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.js +3 -0
  90. package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.js.map +1 -0
  91. package/dist/output-gateway/repositories/interfaces/IOrganizationDto.d.ts +4 -0
  92. package/dist/output-gateway/repositories/interfaces/IOrganizationDto.js +3 -0
  93. package/dist/output-gateway/repositories/interfaces/IOrganizationDto.js.map +1 -0
  94. package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.d.ts +8 -0
  95. package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.js +3 -0
  96. package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.js.map +1 -0
  97. package/dist/output-gateway/routers/helpers/parseParams.d.ts +4 -0
  98. package/dist/output-gateway/routers/helpers/parseParams.js +17 -0
  99. package/dist/output-gateway/routers/helpers/parseParams.js.map +1 -0
  100. package/dist/output-gateway/routers/interfaces/IDeviceResponse.d.ts +6 -0
  101. package/dist/output-gateway/routers/interfaces/IDeviceResponse.js +3 -0
  102. package/dist/output-gateway/routers/interfaces/IDeviceResponse.js.map +1 -0
  103. package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.d.ts +34 -0
  104. package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.js +3 -0
  105. package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.js.map +1 -0
  106. package/dist/output-gateway/routers/interfaces/IOrganizationResponse.d.ts +4 -0
  107. package/dist/output-gateway/routers/interfaces/IOrganizationResponse.js +3 -0
  108. package/dist/output-gateway/routers/interfaces/IOrganizationResponse.js.map +1 -0
  109. package/dist/output-gateway/routers/interfaces/IPaginationParams.d.ts +4 -0
  110. package/dist/output-gateway/routers/interfaces/IPaginationParams.js +3 -0
  111. package/dist/output-gateway/routers/interfaces/IPaginationParams.js.map +1 -0
  112. package/dist/output-gateway/routers/v2/BuildingsRouter.d.ts +10 -0
  113. package/dist/output-gateway/routers/v2/BuildingsRouter.js +28 -0
  114. package/dist/output-gateway/routers/v2/BuildingsRouter.js.map +1 -0
  115. package/dist/output-gateway/routers/v2/V2DevicesRouter.d.ts +7 -0
  116. package/dist/output-gateway/routers/v2/V2DevicesRouter.js +41 -0
  117. package/dist/output-gateway/routers/v2/V2DevicesRouter.js.map +1 -0
  118. package/dist/output-gateway/routers/v2/V2OrganizationsRouter.d.ts +7 -0
  119. package/dist/output-gateway/routers/v2/V2OrganizationsRouter.js +41 -0
  120. package/dist/output-gateway/routers/v2/V2OrganizationsRouter.js.map +1 -0
  121. package/dist/output-gateway/transformations/BuildingTransformationFull.d.ts +14 -0
  122. package/dist/output-gateway/transformations/BuildingTransformationFull.js +218 -0
  123. package/dist/output-gateway/transformations/BuildingTransformationFull.js.map +1 -0
  124. package/dist/output-gateway/transformations/BuildingsTransformation.d.ts +8 -0
  125. package/dist/output-gateway/transformations/BuildingsTransformation.js +38 -0
  126. package/dist/output-gateway/transformations/BuildingsTransformation.js.map +1 -0
  127. package/dist/output-gateway/transformations/DeviceDtoTransformation.d.ts +8 -0
  128. package/dist/output-gateway/transformations/DeviceDtoTransformation.js +43 -0
  129. package/dist/output-gateway/transformations/DeviceDtoTransformation.js.map +1 -0
  130. package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.d.ts +9 -0
  131. package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js +64 -0
  132. package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js.map +1 -0
  133. package/dist/output-gateway/transformations/OrganizationDtoTransformation.d.ts +9 -0
  134. package/dist/output-gateway/transformations/OrganizationDtoTransformation.js +36 -0
  135. package/dist/output-gateway/transformations/OrganizationDtoTransformation.js.map +1 -0
  136. package/dist/schema-definitions/models/OrganizationBuildingModel.d.ts +10 -0
  137. package/dist/schema-definitions/models/OrganizationBuildingModel.js +33 -0
  138. package/dist/schema-definitions/models/OrganizationBuildingModel.js.map +1 -0
  139. package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.d.ts +16 -0
  140. package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.js +44 -0
  141. package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.js.map +1 -0
  142. package/dist/schema-definitions/models/OrganizationsModel.d.ts +21 -0
  143. package/dist/schema-definitions/models/OrganizationsModel.js +59 -0
  144. package/dist/schema-definitions/models/OrganizationsModel.js.map +1 -0
  145. package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.d.ts +4 -0
  146. package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.js +3 -0
  147. package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.js.map +1 -0
  148. package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.d.ts +10 -0
  149. package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.js +3 -0
  150. package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.js.map +1 -0
  151. package/dist/schema-definitions/models/interfaces/IOrganizationsModel.d.ts +15 -0
  152. package/dist/schema-definitions/models/interfaces/IOrganizationsModel.js +3 -0
  153. package/dist/schema-definitions/models/interfaces/IOrganizationsModel.js.map +1 -0
  154. package/docs/implementation_documentation.md +41 -41
  155. package/docs/openapi-output.yaml +854 -0
  156. package/package.json +5 -3
  157. package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.d.ts +0 -4
  158. package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.js +0 -19
  159. package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.js.map +0 -1
  160. package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.d.ts +0 -4
  161. package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.js +0 -19
  162. package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.js.map +0 -1
  163. package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.d.ts +0 -9
  164. package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.js +0 -44
  165. package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.js.map +0 -1
  166. package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.d.ts +0 -9
  167. package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.js +0 -44
  168. package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.js.map +0 -1
  169. package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.d.ts +0 -7
  170. package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.js +0 -166
  171. package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.js.map +0 -1
  172. package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.d.ts +0 -7
  173. package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.js +0 -41
  174. package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/energetics",
3
- "version": "1.3.5",
3
+ "version": "1.3.7-dev.1315648116",
4
4
  "description": "Golemio Energetics Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,8 +11,9 @@
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",
14
+ "apidocs-test": "npm run apidocs-test-input && npm run apidocs-test-output",
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",
16
17
  "code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
17
18
  "generate-docs": "typedoc --out docs/typedoc src",
18
19
  "lint": "eslint \"{src,test}/**/*.ts\""
@@ -35,7 +36,7 @@
35
36
  "@commitlint/cli": "^11.0.0",
36
37
  "@commitlint/config-conventional": "^11.0.0",
37
38
  "@golemio/cli": "1.5.0",
38
- "@golemio/core": "1.10.2",
39
+ "@golemio/core": "1.10.3",
39
40
  "@golemio/db-common": "1.1.4",
40
41
  "@golemio/eslint-config": "1.1.2",
41
42
  "@types/chai": "4.2.3",
@@ -73,6 +74,7 @@
73
74
  "@golemio/core": ">=1.8.4"
74
75
  },
75
76
  "dependencies": {
77
+ "basic-ftp": "^5.0.2",
76
78
  "JSONStream": "^1.3.5"
77
79
  },
78
80
  "overrides": {}
@@ -1,4 +0,0 @@
1
- import { IModel, PostgresModel } from "@golemio/core/dist/integration-engine/models";
2
- export declare class BuildingsRepository extends PostgresModel implements IModel {
3
- constructor();
4
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BuildingsRepository = void 0;
4
- const _sch_1 = require("../../../schema-definitions");
5
- const models_1 = require("../../../schema-definitions/models");
6
- const models_2 = require("@golemio/core/dist/integration-engine/models");
7
- const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
8
- class BuildingsRepository extends models_2.PostgresModel {
9
- constructor() {
10
- super("BuildingsRepository", {
11
- pgTableName: models_1.BuildingsModel.TABLE_NAME,
12
- pgSchema: _sch_1.EnergeticsSchema.pgSchema,
13
- outputSequelizeAttributes: models_1.BuildingsModel.attributeModel,
14
- savingType: "insertOrUpdate",
15
- }, new golemio_validator_1.JSONSchemaValidator("BuildingsRepositoryValidator", models_1.BuildingsModel.arrayJsonSchema));
16
- }
17
- }
18
- exports.BuildingsRepository = BuildingsRepository;
19
- //# sourceMappingURL=BuildingsRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BuildingsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/oict-energetika/BuildingsRepository.ts"],"names":[],"mappings":";;;AAAA,sDAAwC;AACxC,+DAA6C;AAC7C,yEAAqF;AACrF,mFAAkF;AAElF,MAAa,mBAAoB,SAAQ,sBAAa;IAClD;QACI,KAAK,CACD,qBAAqB,EACrB;YACI,WAAW,EAAE,uBAAc,CAAC,UAAU;YACtC,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,yBAAyB,EAAE,uBAAc,CAAC,cAAc;YACxD,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,8BAA8B,EAAE,uBAAc,CAAC,eAAe,CAAC,CAC1F,CAAC;IACN,CAAC;CACJ;AAbD,kDAaC"}
@@ -1,4 +0,0 @@
1
- import { IModel, PostgresModel } from "@golemio/core/dist/integration-engine/models";
2
- export declare class DevicesRepository extends PostgresModel implements IModel {
3
- constructor();
4
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DevicesRepository = void 0;
4
- const _sch_1 = require("../../../schema-definitions");
5
- const models_1 = require("../../../schema-definitions/models");
6
- const models_2 = require("@golemio/core/dist/integration-engine/models");
7
- const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
8
- class DevicesRepository extends models_2.PostgresModel {
9
- constructor() {
10
- super("DevicesRepository", {
11
- pgTableName: models_1.DevicesModel.TABLE_NAME,
12
- pgSchema: _sch_1.EnergeticsSchema.pgSchema,
13
- outputSequelizeAttributes: models_1.DevicesModel.attributeModel,
14
- savingType: "insertOrUpdate",
15
- }, new golemio_validator_1.JSONSchemaValidator("DevicesRepositoryValidator", models_1.DevicesModel.arrayJsonSchema));
16
- }
17
- }
18
- exports.DevicesRepository = DevicesRepository;
19
- //# sourceMappingURL=DevicesRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevicesRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/oict-energetika/DevicesRepository.ts"],"names":[],"mappings":";;;AAAA,sDAAwC;AACxC,+DAA2C;AAC3C,yEAAqF;AACrF,mFAAkF;AAElF,MAAa,iBAAkB,SAAQ,sBAAa;IAChD;QACI,KAAK,CACD,mBAAmB,EACnB;YACI,WAAW,EAAE,qBAAY,CAAC,UAAU;YACpC,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,yBAAyB,EAAE,qBAAY,CAAC,cAAc;YACtD,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,4BAA4B,EAAE,qBAAY,CAAC,eAAe,CAAC,CACtF,CAAC;IACN,CAAC;CACJ;AAbD,8CAaC"}
@@ -1,9 +0,0 @@
1
- import { AbstractEmptyTask } from "@golemio/core/dist/integration-engine/workers";
2
- export declare class FetchBuildingsTask extends AbstractEmptyTask {
3
- readonly queueName = "fetchBuildings";
4
- readonly queueTtl: number;
5
- private readonly buildingsRepository;
6
- private readonly buildingsTransformation;
7
- constructor(queuePrefix: string);
8
- protected execute(): Promise<void>;
9
- }
@@ -1,44 +0,0 @@
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.FetchBuildingsTask = void 0;
13
- const helpers_1 = require("@golemio/core/dist/integration-engine/helpers");
14
- const workers_1 = require("@golemio/core/dist/integration-engine/workers");
15
- const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
16
- const BuildingsRepository_1 = require("../../repositories/oict-energetika/BuildingsRepository");
17
- const helpers_2 = require("../../datasources/oict-energetika/helpers");
18
- const BuildingsTransformation_1 = require("../../transformations/oict-energetika/BuildingsTransformation");
19
- const OictDataSourceFactory_1 = require("../../datasources/oict-energetika/OictDataSourceFactory");
20
- class FetchBuildingsTask extends workers_1.AbstractEmptyTask {
21
- constructor(queuePrefix) {
22
- super(queuePrefix);
23
- this.queueName = "fetchBuildings";
24
- this.queueTtl = 29 * 60 * 1000; // 29 minutes
25
- this.buildingsRepository = new BuildingsRepository_1.BuildingsRepository();
26
- this.buildingsTransformation = new BuildingsTransformation_1.BuildingsTransformation();
27
- }
28
- execute() {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- const datasource = OictDataSourceFactory_1.OictDataSourceFactory.getDataSource(helpers_2.OictResourceType.Buildings);
31
- try {
32
- const data = yield datasource.getAll();
33
- const transformedData = yield this.buildingsTransformation.transform(data);
34
- yield this.buildingsRepository.save(transformedData);
35
- }
36
- catch (err) {
37
- helpers_1.log.error(err);
38
- throw new golemio_errors_1.GeneralError("Failed to fetch buldings", this.constructor.name, err);
39
- }
40
- });
41
- }
42
- }
43
- exports.FetchBuildingsTask = FetchBuildingsTask;
44
- //# sourceMappingURL=FetchBuildingsTask.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FetchBuildingsTask.js","sourceRoot":"","sources":["../../../../src/integration-engine/tasks/oict-energetika/FetchBuildingsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAoE;AACpE,2EAAkF;AAClF,6EAAwE;AACxE,gGAA6F;AAC7F,uEAA6E;AAC7E,2GAAwG;AACxG,mGAA8F;AAE9F,MAAa,kBAAmB,SAAQ,2BAAiB;IAOrD,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAPP,cAAS,GAAG,gBAAgB,CAAC;QAC7B,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QAOpD,IAAI,CAAC,mBAAmB,GAAG,IAAI,yCAAmB,EAAE,CAAC;QACrD,IAAI,CAAC,uBAAuB,GAAG,IAAI,iDAAuB,EAAE,CAAC;IACjE,CAAC;IAEe,OAAO;;YACnB,MAAM,UAAU,GAAG,6CAAqB,CAAC,aAAa,CAAC,0BAAgB,CAAC,SAAS,CAAC,CAAC;YAEnF,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC;gBACvC,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;gBAC3E,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;aACxD;YAAC,OAAO,GAAG,EAAE;gBACV,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACf,MAAM,IAAI,6BAAY,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aAClF;QACL,CAAC;KAAA;CACJ;AAzBD,gDAyBC"}
@@ -1,9 +0,0 @@
1
- import { AbstractEmptyTask } from "@golemio/core/dist/integration-engine/workers";
2
- export declare class FetchDevicesTask extends AbstractEmptyTask {
3
- readonly queueName = "fetchDevices";
4
- readonly queueTtl: number;
5
- private readonly devicesRepository;
6
- private readonly devicesTransformation;
7
- constructor(queuePrefix: string);
8
- protected execute(): Promise<void>;
9
- }
@@ -1,44 +0,0 @@
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.FetchDevicesTask = void 0;
13
- const helpers_1 = require("../../datasources/oict-energetika/helpers");
14
- const OictDataSourceFactory_1 = require("../../datasources/oict-energetika/OictDataSourceFactory");
15
- const DevicesRepository_1 = require("../../repositories/oict-energetika/DevicesRepository");
16
- const DevicesTransformation_1 = require("../../transformations/oict-energetika/DevicesTransformation");
17
- const helpers_2 = require("@golemio/core/dist/integration-engine/helpers");
18
- const workers_1 = require("@golemio/core/dist/integration-engine/workers");
19
- const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
20
- class FetchDevicesTask extends workers_1.AbstractEmptyTask {
21
- constructor(queuePrefix) {
22
- super(queuePrefix);
23
- this.queueName = "fetchDevices";
24
- this.queueTtl = 29 * 60 * 1000; // 29 minutes
25
- this.devicesRepository = new DevicesRepository_1.DevicesRepository();
26
- this.devicesTransformation = new DevicesTransformation_1.DevicesTransformation();
27
- }
28
- execute() {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- const datasource = OictDataSourceFactory_1.OictDataSourceFactory.getDataSource(helpers_1.OictResourceType.Devices);
31
- try {
32
- const data = yield datasource.getAll();
33
- const transformedData = yield this.devicesTransformation.transform(data);
34
- yield this.devicesRepository.save(transformedData);
35
- }
36
- catch (err) {
37
- helpers_2.log.error(err);
38
- throw new golemio_errors_1.GeneralError("Failed to fetch devices", this.constructor.name, err);
39
- }
40
- });
41
- }
42
- }
43
- exports.FetchDevicesTask = FetchDevicesTask;
44
- //# sourceMappingURL=FetchDevicesTask.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FetchDevicesTask.js","sourceRoot":"","sources":["../../../../src/integration-engine/tasks/oict-energetika/FetchDevicesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA2E;AAC3E,mGAA8F;AAC9F,4FAAuF;AACvF,uGAAkG;AAClG,2EAAoE;AACpE,2EAAkF;AAClF,6EAAwE;AAExE,MAAa,gBAAiB,SAAQ,2BAAiB;IAOnD,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAPP,cAAS,GAAG,cAAc,CAAC;QAC3B,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QAOpD,IAAI,CAAC,iBAAiB,GAAG,IAAI,qCAAiB,EAAE,CAAC;QACjD,IAAI,CAAC,qBAAqB,GAAG,IAAI,6CAAqB,EAAE,CAAC;IAC7D,CAAC;IAEe,OAAO;;YACnB,MAAM,UAAU,GAAG,6CAAqB,CAAC,aAAa,CAAC,0BAAgB,CAAC,OAAO,CAAC,CAAC;YAEjF,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC;gBACvC,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;gBACzE,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;aACtD;YAAC,OAAO,GAAG,EAAE;gBACV,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACf,MAAM,IAAI,6BAAY,CAAC,yBAAyB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACjF;QACL,CAAC;KAAA;CACJ;AAzBD,4CAyBC"}
@@ -1,7 +0,0 @@
1
- import { IOictBuildingsInput } from "../../../schema-definitions/datasources/interfaces";
2
- import { IBuildingsModel } from "../../../schema-definitions/models/interfaces";
3
- import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
4
- export declare class BuildingsTransformation extends BaseTransformation implements ITransformation {
5
- name: string;
6
- protected transformElement: (element: IOictBuildingsInput) => Promise<IBuildingsModel>;
7
- }
@@ -1,166 +0,0 @@
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.BuildingsTransformation = void 0;
13
- const ParserHelpers_1 = require("../../helpers/ParserHelpers");
14
- const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
15
- class BuildingsTransformation extends transformations_1.BaseTransformation {
16
- constructor() {
17
- super(...arguments);
18
- this.name = "BuildingsTransformation";
19
- this.transformElement = (element) => __awaiter(this, void 0, void 0, function* () {
20
- return {
21
- // PK
22
- id: element.id,
23
- address_city: (0, ParserHelpers_1.toStringOrEmpty)(element.address.city),
24
- address_country: (0, ParserHelpers_1.toStringOrEmpty)(element.address.country),
25
- address_house_number: (0, ParserHelpers_1.toStringOrEmpty)(element.address.houseNumber),
26
- address_mail: (0, ParserHelpers_1.toStringOrEmpty)(element.address.mail),
27
- address_phone: (0, ParserHelpers_1.toStringOrEmpty)(element.address.phone),
28
- address_street: (0, ParserHelpers_1.toStringOrEmpty)(element.address.street),
29
- address_web_address: (0, ParserHelpers_1.toStringOrEmpty)(element.address.webAddress),
30
- allotment_number: (0, ParserHelpers_1.toStringOrEmpty)(element.allotmentNumber),
31
- beds_count: (0, ParserHelpers_1.toStringOrEmpty)(element.bedsCount),
32
- building_address_code: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingAddressCode),
33
- // Building envelope - Filling of hole ( ͡° ͜ʖ ͡°)
34
- building_envelope_filling_of_hole_area: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.fillingOfHole.area),
35
- building_envelope_filling_of_hole_construction: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.fillingOfHole.construction),
36
- building_envelope_filling_of_hole_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.fillingOfHole.technicalCondition),
37
- building_envelope_filling_of_hole_year_of_adjustment: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.fillingOfHole.yearOfAdjustment),
38
- building_envelope_floor_of_the_lowest_heated_floor_area:
39
- // Building envelope - Floor of the lowest heated floor
40
- (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.floorOfTheLowestHeatedFloor.area),
41
- building_envelope_floor_of_the_lowest_heated_floor_construction: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.floorOfTheLowestHeatedFloor.construction),
42
- building_envelope_floor_of_the_lowest_heated_floor_year_of_adjustment: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.floorOfTheLowestHeatedFloor.yearOfAdjustment),
43
- floor_of_the_lowest_heated_floor_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.floorOfTheLowestHeatedFloor.technicalCondition),
44
- floor_of_the_lowest_heated_floor_thermal_insulation: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.floorOfTheLowestHeatedFloor.thermalInsulation),
45
- // Building envelope - Roof
46
- building_envelope_roof_area: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.roof.area),
47
- building_envelope_roof_construction: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.roof.construction),
48
- building_envelope_roof_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.roof.technicalCondition),
49
- building_envelope_roof_thermal_insulation: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.roof.thermalInsulation),
50
- building_envelope_roof_year_of_adjustment: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.roof.yearOfAdjustment),
51
- // Building envelope - Side wall
52
- building_envelope_side_wall_area: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.sideWall.area),
53
- building_envelope_side_wall_heat_insulation: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.sideWall.heatInsulation),
54
- building_envelope_side_wall_prevailing_construction: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.sideWall.prevailingConstruction),
55
- building_envelope_side_wall_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.sideWall.technicalCondition),
56
- building_envelope_side_wall_year_of_adjustment: (0, ParserHelpers_1.toStringOrEmpty)(element.buildingEnvelope.sideWall.yearOfAdjustment),
57
- building_label: (0, ParserHelpers_1.toStringOrEmpty)(element.label),
58
- building_name: (0, ParserHelpers_1.toStringOrEmpty)(element.name),
59
- built_up_area: (0, ParserHelpers_1.toStringOrEmpty)(element.builtUpArea),
60
- classrooms_count: (0, ParserHelpers_1.toStringOrEmpty)(element.classroomsCount),
61
- csu_code: (0, ParserHelpers_1.toStringOrEmpty)(element.csuCode),
62
- current_note: (0, ParserHelpers_1.toStringOrEmpty)(element.currentNote),
63
- description: (0, ParserHelpers_1.toStringOrEmpty)(element.description),
64
- electricity_consumption_normatives: (0, ParserHelpers_1.toStringOrEmpty)(element.electricityConsumptionNormatives),
65
- electricity_consumption_normatives_per_person: (0, ParserHelpers_1.toStringOrEmpty)(element.electricityConsumptionNormativesPerPerson),
66
- employees_count: (0, ParserHelpers_1.toStringOrEmpty)(element.employeesCount),
67
- energetic_management: (0, ParserHelpers_1.toStringOrEmpty)(element.energeticManagement).toLowerCase(),
68
- // Energy Audits
69
- energy_audits_created_at: (0, ParserHelpers_1.toStringOrEmpty)(element.energyAudits.createdAt),
70
- energy_audits_earegistration_number: (0, ParserHelpers_1.toStringOrEmpty)(element.energyAudits.eaRegistrationNumber),
71
- energy_audits_energy_audit: (0, ParserHelpers_1.toStringOrEmpty)(element.energyAudits.energyAudit),
72
- eno_id: (0, ParserHelpers_1.toStringOrEmpty)(element.enoId),
73
- // Fuel and energy
74
- fuel_and_energy_coal: (0, ParserHelpers_1.toStringOrEmpty)(element.fuelAndEnergy.coal).toLowerCase(),
75
- fuel_and_energy_czt: (0, ParserHelpers_1.toStringOrEmpty)(element.fuelAndEnergy.czt).toLowerCase(),
76
- fuel_and_energy_electricity: (0, ParserHelpers_1.toStringOrEmpty)(element.fuelAndEnergy.electricity).toLowerCase(),
77
- fuel_and_energy_gas: (0, ParserHelpers_1.toStringOrEmpty)(element.fuelAndEnergy.gas).toLowerCase(),
78
- fuel_and_energy_other: (0, ParserHelpers_1.toStringOrEmpty)(element.fuelAndEnergy.other).toLowerCase(),
79
- fuel_and_energy_oze: (0, ParserHelpers_1.toStringOrEmpty)(element.fuelAndEnergy.oze).toLowerCase(),
80
- gas_consumption_normatives: (0, ParserHelpers_1.toStringOrEmpty)(element.gasConsumptionNormatives),
81
- heat_consumption_normatives: (0, ParserHelpers_1.toStringOrEmpty)(element.heatConsumptionNormatives),
82
- heated_bulding_volume: (0, ParserHelpers_1.toStringOrEmpty)(element.heatedBuldingVolume),
83
- ku_code: (0, ParserHelpers_1.toStringOrEmpty)(element.kuCode),
84
- latitude: (0, ParserHelpers_1.toStringOrEmpty)(element.latitude),
85
- link: (0, ParserHelpers_1.toStringOrEmpty)(element.link),
86
- longitude: (0, ParserHelpers_1.toStringOrEmpty)(element.longitude),
87
- main_use: (0, ParserHelpers_1.toStringOrEmpty)(element.mainUse),
88
- method_of_protection: (0, ParserHelpers_1.toStringOrEmpty)(element.methodOfProtection),
89
- opening_hours: (0, ParserHelpers_1.toStringOrEmpty)(element.openingHours),
90
- // Oze energy production
91
- oze_energy_production_heat_pump: (0, ParserHelpers_1.toStringOrEmpty)(element.ozeEnergyProduction.heatPump),
92
- oze_energy_production_integrated_turbines_wind_energy: (0, ParserHelpers_1.toStringOrEmpty)(element.ozeEnergyProduction.integratedTurbinesWindEnergy),
93
- oze_energy_production_solar_energy_photothermal: (0, ParserHelpers_1.toStringOrEmpty)(element.ozeEnergyProduction.solarEnergyPhotothermal),
94
- oze_energy_production_solar_energy_photovoltaic: (0, ParserHelpers_1.toStringOrEmpty)(element.ozeEnergyProduction.solarEnergyPhotovoltaic),
95
- // Penb
96
- penb_building_envelope: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.buildingEnvelope),
97
- penb_building_envelope_category: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.buildingEnvelopeCategory),
98
- penb_cooling: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.cooling),
99
- penb_cooling_category: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.coolingCategory),
100
- penb_heating: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.heating),
101
- penb_heating_category: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.heatingCategory),
102
- penb_humidity_adjustment: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.humidityAdjustment),
103
- penb_humidity_adjustment_category: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.humidityAdjustmentCategory),
104
- penb_issue_date: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.issueDate),
105
- penb_lighting: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.lighting),
106
- penb_lighting_category: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.lightingCategory),
107
- penb_penbnumber: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.penbNumber),
108
- penb_primary_non_renewable_energy: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.primaryNonRenewableEnergy),
109
- penb_primary_non_renewable_energy_category: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.primaryNonRenewableEnergyCategory),
110
- penb_total_building_envelope_area: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.totalBuildingEnvelopeArea),
111
- penb_total_energy_reference_area: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.totalEnergyReferenceArea),
112
- penb_total_provided_energy: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.totalProvidedEnergy),
113
- penb_total_provided_energy_category: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.totalProvidedEnergyCategory),
114
- penb_ventilation: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.ventilation),
115
- penb_ventilation_category: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.ventilationCategory),
116
- penb_volume_factor_of_avshape: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.volumeFactorOfAVShape),
117
- penb_warm_water: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.warmWater),
118
- penb_warm_water_category: (0, ParserHelpers_1.toStringOrEmpty)(element.penb.warmWaterCategory),
119
- registration_unit: (0, ParserHelpers_1.toStringOrEmpty)(element.registrationUnit),
120
- secondary_use: (0, ParserHelpers_1.toStringOrEmpty)(element.secondaryUse),
121
- students_count: (0, ParserHelpers_1.toStringOrEmpty)(element.studentsCount),
122
- // Technical equipment - Cooling
123
- technical_equipment_cooling_cooling_area_percentage: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.cooling.coolingAreaPercentage),
124
- technical_equipment_cooling_cooling_system: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.cooling.coolingSystem),
125
- technical_equipment_cooling_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.cooling.technicalCondition),
126
- technical_equipment_cooling_year: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.cooling.year),
127
- // Technical equipment - Heating
128
- technical_equipment_heating_heat_percentage: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.heating.heatPercentage),
129
- technical_equipment_heating_heating_system: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.heating.heatingSystem),
130
- technical_equipment_heating_main_source_of_heat: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.heating.mainSourceOfHeat),
131
- technical_equipment_heating_secondary_source_of_heat: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.heating.secondarySourceOfHeat),
132
- technical_equipment_heating_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.heating.technicalCondition),
133
- technical_equipment_heating_year: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.heating.year),
134
- // Technical equipment - Hot water
135
- technical_equipment_hot_water_hot_water_source: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.hotWater.hotWaterSource),
136
- technical_equipment_hot_water_predominant_way_of_heating_tv: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.hotWater.predominantWayOfHeatingTv),
137
- technical_equipment_hot_water_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.hotWater.technicalCondition),
138
- technical_equipment_hot_water_year: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.hotWater.year),
139
- // Technical equipment - Humidity
140
- technical_equipment_humidity_adjustment_humidity_adjustment: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.humidityAdjustment.humidityAdjustment),
141
- technical_equipment_humidity_adjustment_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.humidityAdjustment.technicalCondition),
142
- technical_equipment_humidity_adjustment_year: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.humidityAdjustment.year),
143
- // Technical equipment - Lightning
144
- technical_equipment_lighting_lighting: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.lighting.lighting),
145
- technical_equipment_lighting_measurement_method: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.lighting.measurementMethod),
146
- technical_equipment_lighting_other_technological_elements: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.lighting.otherTechnologicalElements),
147
- technical_equipment_lighting_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.lighting.technicalCondition),
148
- technical_equipment_lighting_year: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.lighting.year),
149
- // Technical equipment - Ventilation
150
- technical_equipment_ventilation_technical_condition: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.ventilation.technicalCondition),
151
- technical_equipment_ventilation_ventilation: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.ventilation.ventilation),
152
- technical_equipment_ventilation_year: (0, ParserHelpers_1.toStringOrEmpty)(element.technicalEquipment.ventilation.year),
153
- // Waste and emissions
154
- waste_and_emissions_operating_co_2emissions: (0, ParserHelpers_1.toStringOrEmpty)(element.wasteAndEmissions.operatingCo2Emissions),
155
- waste_and_emissions_solid_waste_production: (0, ParserHelpers_1.toStringOrEmpty)(element.wasteAndEmissions.solidWasteProduction),
156
- waste_and_emissions_sox_emissions: (0, ParserHelpers_1.toStringOrEmpty)(element.wasteAndEmissions.soxEmissions),
157
- waste_and_emissions_tied_co2_emissions: (0, ParserHelpers_1.toStringOrEmpty)(element.wasteAndEmissions.tiedCo2Emissions),
158
- water_consumption_normatives: (0, ParserHelpers_1.toStringOrEmpty)(element.waterConsumptionNormatives),
159
- weekend_opening_hours: (0, ParserHelpers_1.toStringOrEmpty)(element.weekendOpeningHours),
160
- year_of_construction: (0, ParserHelpers_1.toStringOrEmpty)(element.yearOfConstruction),
161
- };
162
- });
163
- }
164
- }
165
- exports.BuildingsTransformation = BuildingsTransformation;
166
- //# sourceMappingURL=BuildingsTransformation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BuildingsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/transformations/oict-energetika/BuildingsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA4D;AAG5D,2FAA4G;AAE5G,MAAa,uBAAwB,SAAQ,oCAAkB;IAA/D;;QACW,SAAI,GAAG,yBAAyB,CAAC;Q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B,CAAC;gBAC7G,0CAA0C,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC;gBAC3G,iCAAiC,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC;gBAC1F,sCAAsC,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC;gBAEnG,4BAA4B,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,0BAA0B,CAAC;gBACjF,qBAAqB,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,mBAAmB,CAAC;gBACnE,oBAAoB,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,kBAAkB,CAAC;aACpE,CAAC;QACN,CAAC,CAAA,CAAC;IACN,CAAC;CAAA;AAjND,0DAiNC"}
@@ -1,7 +0,0 @@
1
- import { IOictDevicesInput } from "../../../schema-definitions/datasources/interfaces";
2
- import { IDevicesModel } from "../../../schema-definitions/models/interfaces";
3
- import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
4
- export declare class DevicesTransformation extends BaseTransformation implements ITransformation {
5
- name: string;
6
- protected transformElement: (element: IOictDevicesInput) => Promise<IDevicesModel>;
7
- }
@@ -1,41 +0,0 @@
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.DevicesTransformation = void 0;
13
- const ParserHelpers_1 = require("../../helpers/ParserHelpers");
14
- const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
15
- class DevicesTransformation extends transformations_1.BaseTransformation {
16
- constructor() {
17
- super(...arguments);
18
- this.name = "DevicesTransformation";
19
- this.transformElement = (element) => __awaiter(this, void 0, void 0, function* () {
20
- return {
21
- // PK
22
- id: element.id,
23
- addr: (0, ParserHelpers_1.toStringOrEmpty)(element.addr),
24
- building_id: element.buildingId,
25
- category: (0, ParserHelpers_1.toStringOrEmpty)(element.category),
26
- deleted: (0, ParserHelpers_1.toStringOrEmpty)(element.deleted).toLowerCase(),
27
- description: (0, ParserHelpers_1.toStringOrEmpty)(element.description),
28
- include_in_evaluation: (0, ParserHelpers_1.toStringOrEmpty)(element.includeInEvaluation).toLowerCase(),
29
- location_description: (0, ParserHelpers_1.toStringOrEmpty)(element.locationDescription),
30
- location_number: (0, ParserHelpers_1.toStringOrEmpty)(element.locationNumber),
31
- meter_index: (0, ParserHelpers_1.toStringOrEmpty)(element.meterIndex),
32
- meter_number: (0, ParserHelpers_1.toStringOrEmpty)(element.meterNumber),
33
- meter_type: (0, ParserHelpers_1.toStringOrEmpty)(element.meterType),
34
- replaced_meter_id: (0, ParserHelpers_1.toStringOrEmpty)(element.replacedMeterId),
35
- unit: (0, ParserHelpers_1.toStringOrEmpty)(element.unit),
36
- };
37
- });
38
- }
39
- }
40
- exports.DevicesTransformation = DevicesTransformation;
41
- //# sourceMappingURL=DevicesTransformation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevicesTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/transformations/oict-energetika/DevicesTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA4D;AAG5D,2FAA4G;AAE5G,MAAa,qBAAsB,SAAQ,oCAAkB;IAA7D;;QACW,SAAI,GAAG,uBAAuB,CAAC;QAE5B,qBAAgB,GAAG,CAAO,OAA0B,EAA0B,EAAE;YACtF,OAAO;gBACH,KAAK;gBACL,EAAE,EAAE,OAAO,CAAC,EAAE;gBAEd,IAAI,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,IAAI,CAAC;gBACnC,WAAW,EAAE,OAAO,CAAC,UAAU;gBAC/B,QAAQ,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,QAAQ,CAAC;gBAC3C,OAAO,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE;gBACvD,WAAW,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,WAAW,CAAC;gBACjD,qBAAqB,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,WAAW,EAAE;gBACjF,oBAAoB,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,mBAAmB,CAAC;gBAClE,eAAe,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,cAAc,CAAC;gBACxD,WAAW,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,UAAU,CAAC;gBAChD,YAAY,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,WAAW,CAAC;gBAClD,UAAU,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,SAAS,CAAC;gBAC9C,iBAAiB,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,eAAe,CAAC;gBAC3D,IAAI,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,IAAI,CAAC;aACtC,CAAC;QACN,CAAC,CAAA,CAAC;IACN,CAAC;CAAA;AAvBD,sDAuBC"}