@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
@@ -0,0 +1,218 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.BuildingTransformationFull = void 0;
13
+ const Links_1 = require("../constants/Links");
14
+ const Di_1 = require("../ioc/Di");
15
+ const ModuleContainerToken_1 = require("../ioc/ModuleContainerToken");
16
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
17
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
18
+ let BuildingTransformationFull = exports.BuildingTransformationFull = class BuildingTransformationFull extends AbstractTransformation_1.AbstractTransformation {
19
+ constructor() {
20
+ super();
21
+ this.name = "BuildingTransformationFull";
22
+ this.transformInternal = (element) => {
23
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176;
24
+ return {
25
+ id: element.id,
26
+ name: element.building_name,
27
+ main_use: element.main_use,
28
+ method_of_protection: (_b = (_a = element.secondary) === null || _a === void 0 ? void 0 : _a.method_of_protection) !== null && _b !== void 0 ? _b : null,
29
+ address: {
30
+ city: (_d = (_c = element.secondary) === null || _c === void 0 ? void 0 : _c.address_city) !== null && _d !== void 0 ? _d : null,
31
+ country: (_f = (_e = element.secondary) === null || _e === void 0 ? void 0 : _e.address_country) !== null && _f !== void 0 ? _f : null,
32
+ house_number: (_h = (_g = element.secondary) === null || _g === void 0 ? void 0 : _g.address_house_number) !== null && _h !== void 0 ? _h : null,
33
+ mail: (_k = (_j = element.secondary) === null || _j === void 0 ? void 0 : _j.address_mail) !== null && _k !== void 0 ? _k : null,
34
+ phone: (_m = (_l = element.secondary) === null || _l === void 0 ? void 0 : _l.address_phone) !== null && _m !== void 0 ? _m : null,
35
+ street: (_p = (_o = element.secondary) === null || _o === void 0 ? void 0 : _o.address_street) !== null && _p !== void 0 ? _p : null,
36
+ web_address: (_r = (_q = element.secondary) === null || _q === void 0 ? void 0 : _q.address_web_address) !== null && _r !== void 0 ? _r : null,
37
+ },
38
+ allotment_number: (_t = (_s = element.secondary) === null || _s === void 0 ? void 0 : _s.allotment_number) !== null && _t !== void 0 ? _t : null,
39
+ beds_count: ((_u = element.secondary) === null || _u === void 0 ? void 0 : _u.beds_count) ? parseFloat(element.secondary.beds_count) : null,
40
+ building_address_code: (_w = (_v = element.secondary) === null || _v === void 0 ? void 0 : _v.building_address_code) !== null && _w !== void 0 ? _w : null,
41
+ building_envelope: {
42
+ filling_of_hole: {
43
+ area: ((_x = element.secondary) === null || _x === void 0 ? void 0 : _x.building_envelope_filling_of_hole_area)
44
+ ? parseFloat(element.secondary.building_envelope_filling_of_hole_area)
45
+ : null,
46
+ construction: (_z = (_y = element.secondary) === null || _y === void 0 ? void 0 : _y.building_envelope_filling_of_hole_construction) !== null && _z !== void 0 ? _z : null,
47
+ technical_condition: (_1 = (_0 = element.secondary) === null || _0 === void 0 ? void 0 : _0.building_envelope_filling_of_hole_technical_condition) !== null && _1 !== void 0 ? _1 : null,
48
+ year_of_adjustment: (_3 = (_2 = element.secondary) === null || _2 === void 0 ? void 0 : _2.building_envelope_filling_of_hole_year_of_adjustment) !== null && _3 !== void 0 ? _3 : null,
49
+ },
50
+ floor_of_the_lowest_heated_floor: {
51
+ area: ((_4 = element.secondary) === null || _4 === void 0 ? void 0 : _4.building_envelope_floor_of_the_lowest_heated_floor_area)
52
+ ? parseFloat(element.secondary.building_envelope_floor_of_the_lowest_heated_floor_area)
53
+ : null,
54
+ construction: (_6 = (_5 = element.secondary) === null || _5 === void 0 ? void 0 : _5.building_envelope_floor_of_the_lowest_heated_floor_construction) !== null && _6 !== void 0 ? _6 : null,
55
+ year_of_adjustment: (_8 = (_7 = element.secondary) === null || _7 === void 0 ? void 0 : _7.building_envelope_floor_of_the_lowest_heated_floor_year_of_adju) !== null && _8 !== void 0 ? _8 : null,
56
+ technical_condition: (_10 = (_9 = element.secondary) === null || _9 === void 0 ? void 0 : _9.floor_of_the_lowest_heated_floor_technical_condition) !== null && _10 !== void 0 ? _10 : null,
57
+ thermal_insulation: (_12 = (_11 = element.secondary) === null || _11 === void 0 ? void 0 : _11.floor_of_the_lowest_heated_floor_thermal_insulation) !== null && _12 !== void 0 ? _12 : null,
58
+ },
59
+ roof: {
60
+ area: ((_13 = element.secondary) === null || _13 === void 0 ? void 0 : _13.building_envelope_roof_area)
61
+ ? parseFloat(element.secondary.building_envelope_roof_area)
62
+ : null,
63
+ construction: (_15 = (_14 = element.secondary) === null || _14 === void 0 ? void 0 : _14.building_envelope_roof_construction) !== null && _15 !== void 0 ? _15 : null,
64
+ technical_condition: (_17 = (_16 = element.secondary) === null || _16 === void 0 ? void 0 : _16.building_envelope_roof_technical_condition) !== null && _17 !== void 0 ? _17 : null,
65
+ thermal_insulation: (_19 = (_18 = element.secondary) === null || _18 === void 0 ? void 0 : _18.building_envelope_roof_thermal_insulation) !== null && _19 !== void 0 ? _19 : null,
66
+ year_of_adjustment: (_21 = (_20 = element.secondary) === null || _20 === void 0 ? void 0 : _20.building_envelope_roof_year_of_adjustment) !== null && _21 !== void 0 ? _21 : null,
67
+ },
68
+ side_wall: {
69
+ area: ((_22 = element.secondary) === null || _22 === void 0 ? void 0 : _22.building_envelope_side_wall_area)
70
+ ? parseFloat(element.secondary.building_envelope_side_wall_area)
71
+ : null,
72
+ heat_insulation: (_24 = (_23 = element.secondary) === null || _23 === void 0 ? void 0 : _23.building_envelope_side_wall_heat_insulation) !== null && _24 !== void 0 ? _24 : null,
73
+ prevailing_construction: (_26 = (_25 = element.secondary) === null || _25 === void 0 ? void 0 : _25.building_envelope_side_wall_prevailing_construction) !== null && _26 !== void 0 ? _26 : null,
74
+ technical_condition: (_28 = (_27 = element.secondary) === null || _27 === void 0 ? void 0 : _27.building_envelope_side_wall_technical_condition) !== null && _28 !== void 0 ? _28 : null,
75
+ year_of_adjustment: (_30 = (_29 = element.secondary) === null || _29 === void 0 ? void 0 : _29.building_envelope_side_wall_year_of_adjustment) !== null && _30 !== void 0 ? _30 : null,
76
+ },
77
+ },
78
+ label: (_32 = (_31 = element.secondary) === null || _31 === void 0 ? void 0 : _31.building_label) !== null && _32 !== void 0 ? _32 : null,
79
+ built_up_area: ((_33 = element.secondary) === null || _33 === void 0 ? void 0 : _33.built_up_area) ? parseFloat(element.secondary.built_up_area) : null,
80
+ classrooms_count: ((_34 = element.secondary) === null || _34 === void 0 ? void 0 : _34.classrooms_count) ? parseFloat(element.secondary.classrooms_count) : null,
81
+ csu_code: (_36 = (_35 = element.secondary) === null || _35 === void 0 ? void 0 : _35.csu_code) !== null && _36 !== void 0 ? _36 : null,
82
+ current_note: (_38 = (_37 = element.secondary) === null || _37 === void 0 ? void 0 : _37.current_note) !== null && _38 !== void 0 ? _38 : null,
83
+ description: (_39 = element.description) !== null && _39 !== void 0 ? _39 : null,
84
+ employees_count: ((_40 = element.secondary) === null || _40 === void 0 ? void 0 : _40.employees_count) ? parseFloat(element.secondary.employees_count) : null,
85
+ energetic_management: (_42 = (_41 = element.secondary) === null || _41 === void 0 ? void 0 : _41.energetic_management) !== null && _42 !== void 0 ? _42 : null,
86
+ energy_audits: {
87
+ created_at: (_44 = (_43 = element.secondary) === null || _43 === void 0 ? void 0 : _43.energy_audits_created_at) !== null && _44 !== void 0 ? _44 : null,
88
+ ea_registration_number: (_46 = (_45 = element.secondary) === null || _45 === void 0 ? void 0 : _45.energy_audits_earegistration_string) !== null && _46 !== void 0 ? _46 : null,
89
+ energy_audit: (_48 = (_47 = element.secondary) === null || _47 === void 0 ? void 0 : _47.energy_audits_energy_audit) !== null && _48 !== void 0 ? _48 : null,
90
+ },
91
+ eno_id: (_50 = (_49 = element.secondary) === null || _49 === void 0 ? void 0 : _49.eno_id) !== null && _50 !== void 0 ? _50 : null,
92
+ fuel_and_energy: {
93
+ coal: (_52 = (_51 = element.secondary) === null || _51 === void 0 ? void 0 : _51.fuel_and_energy_coal) !== null && _52 !== void 0 ? _52 : null,
94
+ czt: (_54 = (_53 = element.secondary) === null || _53 === void 0 ? void 0 : _53.fuel_and_energy_czt) !== null && _54 !== void 0 ? _54 : null,
95
+ electricity: (_56 = (_55 = element.secondary) === null || _55 === void 0 ? void 0 : _55.fuel_and_energy_electricity) !== null && _56 !== void 0 ? _56 : null,
96
+ gas: (_58 = (_57 = element.secondary) === null || _57 === void 0 ? void 0 : _57.fuel_and_energy_gas) !== null && _58 !== void 0 ? _58 : null,
97
+ other: (_60 = (_59 = element.secondary) === null || _59 === void 0 ? void 0 : _59.fuel_and_energy_other) !== null && _60 !== void 0 ? _60 : null,
98
+ oze: (_62 = (_61 = element.secondary) === null || _61 === void 0 ? void 0 : _61.fuel_and_energy_oze) !== null && _62 !== void 0 ? _62 : null,
99
+ },
100
+ heated_bulding_volume: ((_63 = element.secondary) === null || _63 === void 0 ? void 0 : _63.heated_bulding_volume)
101
+ ? parseFloat(element.secondary.heated_bulding_volume)
102
+ : null,
103
+ ku_code: (_65 = (_64 = element.secondary) === null || _64 === void 0 ? void 0 : _64.ku_code) !== null && _65 !== void 0 ? _65 : null,
104
+ location: ((_67 = (_66 = element.secondary) === null || _66 === void 0 ? void 0 : _66.location) === null || _67 === void 0 ? void 0 : _67.coordinates)
105
+ ? {
106
+ type: "Point",
107
+ coordinates: [...element.secondary.location.coordinates],
108
+ }
109
+ : null,
110
+ link: (_68 = this.createLinkHelper.getLinkUrl(Links_1.BUILDING_PATH, element.id)) !== null && _68 !== void 0 ? _68 : null,
111
+ oze_energy_production: {
112
+ heat_pump: (_70 = (_69 = element.secondary) === null || _69 === void 0 ? void 0 : _69.oze_energy_production_heat_pump) !== null && _70 !== void 0 ? _70 : null,
113
+ integrated_turbines_wind_energy: (_72 = (_71 = element.secondary) === null || _71 === void 0 ? void 0 : _71.oze_energy_production_integrated_turbines_wind_energy) !== null && _72 !== void 0 ? _72 : null,
114
+ solar_energy_photothermal: (_74 = (_73 = element.secondary) === null || _73 === void 0 ? void 0 : _73.oze_energy_production_solar_energy_photothermal) !== null && _74 !== void 0 ? _74 : null,
115
+ solar_energy_photovoltaic: (_76 = (_75 = element.secondary) === null || _75 === void 0 ? void 0 : _75.oze_energy_production_solar_energy_photovoltaic) !== null && _76 !== void 0 ? _76 : null,
116
+ },
117
+ penb: {
118
+ building_envelope: ((_77 = element.secondary) === null || _77 === void 0 ? void 0 : _77.penb_building_envelope)
119
+ ? parseFloat(element.secondary.penb_building_envelope)
120
+ : null,
121
+ building_envelope_category: (_79 = (_78 = element.secondary) === null || _78 === void 0 ? void 0 : _78.penb_building_envelope_category) !== null && _79 !== void 0 ? _79 : null,
122
+ cooling: ((_80 = element.secondary) === null || _80 === void 0 ? void 0 : _80.penb_cooling) ? parseFloat(element.secondary.penb_cooling) : null,
123
+ cooling_category: (_82 = (_81 = element.secondary) === null || _81 === void 0 ? void 0 : _81.penb_cooling_category) !== null && _82 !== void 0 ? _82 : null,
124
+ heating: ((_83 = element.secondary) === null || _83 === void 0 ? void 0 : _83.penb_heating) ? parseFloat(element.secondary.penb_heating) : null,
125
+ heating_category: (_85 = (_84 = element.secondary) === null || _84 === void 0 ? void 0 : _84.penb_heating_category) !== null && _85 !== void 0 ? _85 : null,
126
+ humidity_adjustment: ((_86 = element.secondary) === null || _86 === void 0 ? void 0 : _86.penb_humidity_adjustment)
127
+ ? parseFloat(element.secondary.penb_humidity_adjustment)
128
+ : null,
129
+ humidity_adjustment_category: (_88 = (_87 = element.secondary) === null || _87 === void 0 ? void 0 : _87.penb_humidity_adjustment_category) !== null && _88 !== void 0 ? _88 : null,
130
+ issue_date: (_90 = (_89 = element.secondary) === null || _89 === void 0 ? void 0 : _89.penb_issue_date) !== null && _90 !== void 0 ? _90 : null,
131
+ lighting: ((_91 = element.secondary) === null || _91 === void 0 ? void 0 : _91.penb_lighting) ? parseFloat(element.secondary.penb_lighting) : null,
132
+ lighting_category: (_93 = (_92 = element.secondary) === null || _92 === void 0 ? void 0 : _92.penb_lighting_category) !== null && _93 !== void 0 ? _93 : null,
133
+ penb_number: (_95 = (_94 = element.secondary) === null || _94 === void 0 ? void 0 : _94.penb_penbnumber) !== null && _95 !== void 0 ? _95 : null,
134
+ primary_non_renewable_energy: ((_96 = element.secondary) === null || _96 === void 0 ? void 0 : _96.penb_primary_non_renewable_energy)
135
+ ? parseFloat(element.secondary.penb_primary_non_renewable_energy)
136
+ : null,
137
+ primary_non_renewable_energy_category: (_98 = (_97 = element.secondary) === null || _97 === void 0 ? void 0 : _97.penb_primary_non_renewable_energy_category) !== null && _98 !== void 0 ? _98 : null,
138
+ total_building_envelope_area: ((_99 = element.secondary) === null || _99 === void 0 ? void 0 : _99.penb_total_building_envelope_area)
139
+ ? parseFloat(element.secondary.penb_total_building_envelope_area)
140
+ : null,
141
+ total_energy_reference_area: ((_100 = element.secondary) === null || _100 === void 0 ? void 0 : _100.penb_total_energy_reference_area)
142
+ ? parseFloat(element.secondary.penb_total_energy_reference_area)
143
+ : null,
144
+ total_provided_energy: ((_101 = element.secondary) === null || _101 === void 0 ? void 0 : _101.penb_total_provided_energy)
145
+ ? parseFloat(element.secondary.penb_total_provided_energy)
146
+ : null,
147
+ total_provided_energy_category: (_103 = (_102 = element.secondary) === null || _102 === void 0 ? void 0 : _102.penb_total_provided_energy_category) !== null && _103 !== void 0 ? _103 : null,
148
+ ventilation: ((_104 = element.secondary) === null || _104 === void 0 ? void 0 : _104.penb_ventilation) ? parseFloat(element.secondary.penb_ventilation) : null,
149
+ ventilation_category: (_106 = (_105 = element.secondary) === null || _105 === void 0 ? void 0 : _105.penb_ventilation_category) !== null && _106 !== void 0 ? _106 : null,
150
+ volume_factor_of_av_shape: (_108 = (_107 = element.secondary) === null || _107 === void 0 ? void 0 : _107.penb_volume_factor_of_avshape) !== null && _108 !== void 0 ? _108 : null,
151
+ warm_water: ((_109 = element.secondary) === null || _109 === void 0 ? void 0 : _109.penb_warm_water) ? parseFloat(element.secondary.penb_warm_water) : null,
152
+ warm_water_category: (_111 = (_110 = element.secondary) === null || _110 === void 0 ? void 0 : _110.penb_warm_water_category) !== null && _111 !== void 0 ? _111 : null,
153
+ },
154
+ registration_unit: (_113 = (_112 = element.secondary) === null || _112 === void 0 ? void 0 : _112.registration_unit) !== null && _113 !== void 0 ? _113 : null,
155
+ secondary_use: (_114 = element.secondary_use) !== null && _114 !== void 0 ? _114 : null,
156
+ students_count: ((_115 = element.secondary) === null || _115 === void 0 ? void 0 : _115.students_count) ? parseFloat(element.secondary.students_count) : null,
157
+ technical_equipment: {
158
+ cooling: {
159
+ cooling_area_percentage: ((_116 = element.secondary) === null || _116 === void 0 ? void 0 : _116.technical_equipment_cooling_cooling_area_percentage)
160
+ ? parseFloat(element.secondary.technical_equipment_cooling_cooling_area_percentage)
161
+ : null,
162
+ cooling_system: (_118 = (_117 = element.secondary) === null || _117 === void 0 ? void 0 : _117.technical_equipment_cooling_cooling_system) !== null && _118 !== void 0 ? _118 : null,
163
+ technical_condition: (_120 = (_119 = element.secondary) === null || _119 === void 0 ? void 0 : _119.technical_equipment_cooling_technical_condition) !== null && _120 !== void 0 ? _120 : null,
164
+ year: (_122 = (_121 = element.secondary) === null || _121 === void 0 ? void 0 : _121.technical_equipment_cooling_year) !== null && _122 !== void 0 ? _122 : null,
165
+ },
166
+ heating: {
167
+ heat_percentage: ((_123 = element.secondary) === null || _123 === void 0 ? void 0 : _123.technical_equipment_heating_heat_percentage)
168
+ ? parseFloat(element.secondary.technical_equipment_heating_heat_percentage)
169
+ : null,
170
+ heating_system: (_125 = (_124 = element.secondary) === null || _124 === void 0 ? void 0 : _124.technical_equipment_heating_heating_system) !== null && _125 !== void 0 ? _125 : null,
171
+ main_source_of_heat: (_127 = (_126 = element.secondary) === null || _126 === void 0 ? void 0 : _126.technical_equipment_heating_main_source_of_heat) !== null && _127 !== void 0 ? _127 : null,
172
+ secondary_source_of_heat: (_129 = (_128 = element.secondary) === null || _128 === void 0 ? void 0 : _128.technical_equipment_heating_secondary_source_of_heat) !== null && _129 !== void 0 ? _129 : null,
173
+ technical_condition: (_131 = (_130 = element.secondary) === null || _130 === void 0 ? void 0 : _130.technical_equipment_heating_technical_condition) !== null && _131 !== void 0 ? _131 : null,
174
+ year: (_133 = (_132 = element.secondary) === null || _132 === void 0 ? void 0 : _132.technical_equipment_heating_year) !== null && _133 !== void 0 ? _133 : null,
175
+ },
176
+ hot_water: {
177
+ hot_water_source: (_135 = (_134 = element.secondary) === null || _134 === void 0 ? void 0 : _134.technical_equipment_hot_water_hot_water_source) !== null && _135 !== void 0 ? _135 : null,
178
+ predominant_way_of_heating_tv: (_137 = (_136 = element.secondary) === null || _136 === void 0 ? void 0 : _136.technical_equipment_hot_water_predominant_way_of_heating_tv) !== null && _137 !== void 0 ? _137 : null,
179
+ technical_condition: (_139 = (_138 = element.secondary) === null || _138 === void 0 ? void 0 : _138.technical_equipment_hot_water_technical_condition) !== null && _139 !== void 0 ? _139 : null,
180
+ year: (_141 = (_140 = element.secondary) === null || _140 === void 0 ? void 0 : _140.technical_equipment_hot_water_year) !== null && _141 !== void 0 ? _141 : null,
181
+ },
182
+ humidity_adjustment: {
183
+ humidity_adjustment: (_143 = (_142 = element.secondary) === null || _142 === void 0 ? void 0 : _142.technical_equipment_humidity_adjustment_humidity_adjustment) !== null && _143 !== void 0 ? _143 : null,
184
+ technical_condition: (_145 = (_144 = element.secondary) === null || _144 === void 0 ? void 0 : _144.technical_equipment_humidity_adjustment_technical_condition) !== null && _145 !== void 0 ? _145 : null,
185
+ year: (_147 = (_146 = element.secondary) === null || _146 === void 0 ? void 0 : _146.technical_equipment_humidity_adjustment_year) !== null && _147 !== void 0 ? _147 : null,
186
+ },
187
+ lighting: {
188
+ lighting: (_149 = (_148 = element.secondary) === null || _148 === void 0 ? void 0 : _148.technical_equipment_lighting_lighting) !== null && _149 !== void 0 ? _149 : null,
189
+ measurement_method: (_151 = (_150 = element.secondary) === null || _150 === void 0 ? void 0 : _150.technical_equipment_lighting_measurement_method) !== null && _151 !== void 0 ? _151 : null,
190
+ other_technological_elements: (_153 = (_152 = element.secondary) === null || _152 === void 0 ? void 0 : _152.technical_equipment_lighting_other_technological_elements) !== null && _153 !== void 0 ? _153 : null,
191
+ technical_condition: (_155 = (_154 = element.secondary) === null || _154 === void 0 ? void 0 : _154.technical_equipment_lighting_technical_condition) !== null && _155 !== void 0 ? _155 : null,
192
+ year: (_157 = (_156 = element.secondary) === null || _156 === void 0 ? void 0 : _156.technical_equipment_lighting_year) !== null && _157 !== void 0 ? _157 : null,
193
+ },
194
+ ventilation: {
195
+ technical_condition: (_159 = (_158 = element.secondary) === null || _158 === void 0 ? void 0 : _158.technical_equipment_ventilation_technical_condition) !== null && _159 !== void 0 ? _159 : null,
196
+ ventilation: (_161 = (_160 = element.secondary) === null || _160 === void 0 ? void 0 : _160.technical_equipment_ventilation_ventilation) !== null && _161 !== void 0 ? _161 : null,
197
+ year: (_163 = (_162 = element.secondary) === null || _162 === void 0 ? void 0 : _162.technical_equipment_ventilation_year) !== null && _163 !== void 0 ? _163 : null,
198
+ },
199
+ },
200
+ waste_and_emissions: {
201
+ operating_co2_emissions: (_165 = (_164 = element.secondary) === null || _164 === void 0 ? void 0 : _164.waste_and_emissions_operating_co_2emissions) !== null && _165 !== void 0 ? _165 : null,
202
+ solid_waste_production: (_167 = (_166 = element.secondary) === null || _166 === void 0 ? void 0 : _166.waste_and_emissions_solid_waste_production) !== null && _167 !== void 0 ? _167 : null,
203
+ sox_emissions: (_169 = (_168 = element.secondary) === null || _168 === void 0 ? void 0 : _168.waste_and_emissions_sox_emissions) !== null && _169 !== void 0 ? _169 : null,
204
+ tied_co2_emissions: (_171 = (_170 = element.secondary) === null || _170 === void 0 ? void 0 : _170.waste_and_emissions_tied_co2_emissions) !== null && _171 !== void 0 ? _171 : null,
205
+ },
206
+ weekend_opening_hours: (_173 = (_172 = element.secondary) === null || _172 === void 0 ? void 0 : _172.weekend_opening_hours) !== null && _173 !== void 0 ? _173 : null,
207
+ opening_hours: (_175 = (_174 = element.secondary) === null || _174 === void 0 ? void 0 : _174.opening_hours) !== null && _175 !== void 0 ? _175 : null,
208
+ year_of_construction: (_176 = element === null || element === void 0 ? void 0 : element.year_of_construction) !== null && _176 !== void 0 ? _176 : null,
209
+ };
210
+ };
211
+ this.createLinkHelper = Di_1.OGEnergeticsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.CreateLinkHelper);
212
+ }
213
+ };
214
+ exports.BuildingTransformationFull = BuildingTransformationFull = __decorate([
215
+ (0, tsyringe_1.injectable)(),
216
+ __metadata("design:paramtypes", [])
217
+ ], BuildingTransformationFull);
218
+ //# sourceMappingURL=BuildingTransformationFull.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildingTransformationFull.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/BuildingTransformationFull.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAoD;AAEpD,kCAAmD;AACnD,sEAAoE;AAIpE,6GAA0G;AAE1G,iEAAgE;AAGzD,IAAM,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2CAA2C,uCAAI,IAAI;wBACnF,IAAI,EAAE,QAAA,QAAA,OAAO,CAAC,SAAS,8CAAE,oCAAoC,uCAAI,IAAI;qBACxE;iBACJ;gBACD,mBAAmB,EAAE;oBACjB,uBAAuB,EAAE,QAAA,QAAA,OAAO,CAAC,SAAS,8CAAE,2CAA2C,uCAAI,IAAI;oBAC/F,sBAAsB,EAAE,QAAA,QAAA,OAAO,CAAC,SAAS,8CAAE,0CAA0C,uCAAI,IAAI;oBAC7F,aAAa,EAAE,QAAA,QAAA,OAAO,CAAC,SAAS,8CAAE,iCAAiC,uCAAI,IAAI;oBAC3E,kBAAkB,EAAE,QAAA,QAAA,OAAO,CAAC,SAAS,8CAAE,sCAAsC,uCAAI,IAAI;iBACxF;gBACD,qBAAqB,EAAE,QAAA,QAAA,OAAO,CAAC,SAAS,8CAAE,qBAAqB,uCAAI,IAAI;gBACvE,aAAa,EAAE,QAAA,QAAA,OAAO,CAAC,SAAS,8CAAE,aAAa,uCAAI,IAAI;gBACvD,oBAAoB,EAAE,QAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,uCAAI,IAAI;aAC9D,CAAC;QACN,CAAC,CAAC;QApME,IAAI,CAAC,gBAAgB,GAAG,0BAAqB,CAAC,OAAO,CAAC,2CAAoB,CAAC,gBAAgB,CAAC,CAAC;IACjG,CAAC;CAoMJ,CAAA;qCA9MY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;;GACA,0BAA0B,CA8MtC"}
@@ -0,0 +1,8 @@
1
+ import { IBuildingsPrimary } from "../models/interfaces/IPrimaryBuildings";
2
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
3
+ export declare class BuildingsTransformation extends AbstractTransformation<IBuildingsPrimary, IBuildingsTransformationOutput> {
4
+ name: string;
5
+ private createLinkHelper;
6
+ constructor();
7
+ protected transformInternal: (element: IBuildingsPrimary) => IBuildingsTransformationOutput;
8
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.BuildingsTransformation = void 0;
13
+ const Links_1 = require("../constants/Links");
14
+ const Di_1 = require("../ioc/Di");
15
+ const ModuleContainerToken_1 = require("../ioc/ModuleContainerToken");
16
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
17
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
18
+ let BuildingsTransformation = exports.BuildingsTransformation = class BuildingsTransformation extends AbstractTransformation_1.AbstractTransformation {
19
+ constructor() {
20
+ super();
21
+ this.name = "BuildingsTransformation";
22
+ this.transformInternal = (element) => {
23
+ var _a, _b;
24
+ return {
25
+ id: element.id,
26
+ name: (_a = element.building_name) !== null && _a !== void 0 ? _a : null,
27
+ buildingAddressCode: (_b = element.building_address_code) !== null && _b !== void 0 ? _b : null,
28
+ link: this.createLinkHelper.getLinkUrl(Links_1.BUILDING_PATH, element.id),
29
+ };
30
+ };
31
+ this.createLinkHelper = Di_1.OGEnergeticsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.CreateLinkHelper);
32
+ }
33
+ };
34
+ exports.BuildingsTransformation = BuildingsTransformation = __decorate([
35
+ (0, tsyringe_1.injectable)(),
36
+ __metadata("design:paramtypes", [])
37
+ ], BuildingsTransformation);
38
+ //# sourceMappingURL=BuildingsTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildingsTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/BuildingsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAoD;AAEpD,kCAAmD;AACnD,sEAAoE;AAEpE,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,uBAAuB,qCAA7B,MAAM,uBAAwB,SAAQ,+CAAyE;IAIlH;QACI,KAAK,EAAE,CAAC;QAJL,SAAI,GAAW,yBAAyB,CAAC;QAQtC,sBAAiB,GAAG,CAAC,OAA0B,EAAkC,EAAE;;YACzF,OAAO;gBACH,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,IAAI,EAAE,MAAA,OAAO,CAAC,aAAa,mCAAI,IAAI;gBACnC,mBAAmB,EAAE,MAAA,OAAO,CAAC,qBAAqB,mCAAI,IAAI;gBAC1D,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,qBAAa,EAAE,OAAO,CAAC,EAAE,CAAC;aACpE,CAAC;QACN,CAAC,CAAC;QAVE,IAAI,CAAC,gBAAgB,GAAG,0BAAqB,CAAC,OAAO,CAAC,2CAAoB,CAAC,gBAAgB,CAAC,CAAC;IACjG,CAAC;CAUJ,CAAA;kCAjBY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;;GACA,uBAAuB,CAiBnC"}
@@ -0,0 +1,8 @@
1
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
2
+ import { IDeviceResponse } from "../routers/interfaces/IDeviceResponse";
3
+ import { IDevicesModel } from "../../schema-definitions/models/interfaces";
4
+ export declare class DeviceDtoTransformation extends AbstractTransformation<IDevicesModel, IDeviceResponse> {
5
+ name: string;
6
+ constructor();
7
+ protected transformInternal: (element: IDevicesModel) => IDeviceResponse;
8
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DeviceDtoTransformation = void 0;
13
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
14
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
15
+ let DeviceDtoTransformation = exports.DeviceDtoTransformation = class DeviceDtoTransformation extends AbstractTransformation_1.AbstractTransformation {
16
+ constructor() {
17
+ super();
18
+ this.name = "DeviceDtoTransformation";
19
+ this.transformInternal = (element) => {
20
+ return {
21
+ id: element.id,
22
+ addr: element.addr,
23
+ description: element.description,
24
+ meter_number: element.meter_number,
25
+ meter_index: !isNaN(parseInt(element.meter_index)) ? parseInt(element.meter_index) : null,
26
+ location_number: element.location_number ? element.location_number : null,
27
+ location_description: element.location_description,
28
+ include_in_evaluation: element.include_in_evaluation,
29
+ meter_type: element.meter_type,
30
+ category: element.category,
31
+ unit: element.unit,
32
+ replaced_meter_id: element.replaced_meter_id ? element.replaced_meter_id : null,
33
+ deleted: element.deleted,
34
+ building_id: element.building_id,
35
+ };
36
+ };
37
+ }
38
+ };
39
+ exports.DeviceDtoTransformation = DeviceDtoTransformation = __decorate([
40
+ (0, tsyringe_1.injectable)(),
41
+ __metadata("design:paramtypes", [])
42
+ ], DeviceDtoTransformation);
43
+ //# sourceMappingURL=DeviceDtoTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceDtoTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/DeviceDtoTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6GAA0G;AAC1G,iEAAgE;AAKzD,IAAM,uBAAuB,qCAA7B,MAAM,uBAAwB,SAAQ,+CAAsD;IAG/F;QACI,KAAK,EAAE,CAAC;QAHL,SAAI,GAAW,yBAAyB,CAAC;QAMtC,sBAAiB,GAAG,CAAC,OAAsB,EAAmB,EAAE;YACtE,OAAO;gBACH,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,WAAW,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;gBACzF,eAAe,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI;gBACzE,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;gBAClD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;gBACpD,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI;gBAC/E,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,WAAW,EAAE,OAAO,CAAC,WAAW;aACnC,CAAC;QACN,CAAC,CAAC;IAnBF,CAAC;CAoBJ,CAAA;kCAzBY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;;GACA,uBAAuB,CAyBnC"}
@@ -0,0 +1,9 @@
1
+ import { IOrganizationDetailDto } from "../repositories/interfaces/IOrganizationDetailDto";
2
+ import { IOrganizationDetailResponse } from "../routers/interfaces/IOrganizationDetailResponse";
3
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
4
+ export declare class OrganizationDetailDtoTransformation extends AbstractTransformation<IOrganizationDetailDto, IOrganizationDetailResponse> {
5
+ name: string;
6
+ private createLinkHelper;
7
+ constructor();
8
+ protected transformInternal: (element: IOrganizationDetailDto) => IOrganizationDetailResponse;
9
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OrganizationDetailDtoTransformation = void 0;
13
+ const Links_1 = require("../constants/Links");
14
+ const Di_1 = require("../ioc/Di");
15
+ const ModuleContainerToken_1 = require("../ioc/ModuleContainerToken");
16
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
17
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
18
+ let OrganizationDetailDtoTransformation = exports.OrganizationDetailDtoTransformation = class OrganizationDetailDtoTransformation extends AbstractTransformation_1.AbstractTransformation {
19
+ constructor() {
20
+ super();
21
+ this.name = "OrganizationDetailDtoTransformation";
22
+ this.transformInternal = (element) => {
23
+ var _a, _b;
24
+ return {
25
+ id: element.id,
26
+ name: element.name,
27
+ label: element.label,
28
+ category: element.category,
29
+ created_by_id: (_b = (_a = element.created_by_id) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : null,
30
+ grafana_url: element.grafana_url,
31
+ address: {
32
+ street: element.address_street,
33
+ house_number: element.address_house_number,
34
+ city: element.address_city,
35
+ country: element.address_country,
36
+ mail: element.address_mail,
37
+ phone: element.address_phone,
38
+ web_address: element.address_web_address,
39
+ },
40
+ responsible_user: element.responsible_user.map((user) => ({
41
+ name: user.first_name,
42
+ last_name: user.last_name,
43
+ position: user.position,
44
+ phone: user.phone,
45
+ mail: user.mail,
46
+ company: user.company,
47
+ })),
48
+ buildings: element.buildings.map((building) => ({
49
+ id: building.id,
50
+ name: building.building_name,
51
+ building_address_code: building.building_address_code,
52
+ link: this.createLinkHelper.getLinkUrl(Links_1.BUILDING_PATH, building.id),
53
+ })),
54
+ link: this.createLinkHelper.getLinkUrl(Links_1.ORGANIZATION_PATH, element.id),
55
+ };
56
+ };
57
+ this.createLinkHelper = Di_1.OGEnergeticsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.CreateLinkHelper);
58
+ }
59
+ };
60
+ exports.OrganizationDetailDtoTransformation = OrganizationDetailDtoTransformation = __decorate([
61
+ (0, tsyringe_1.injectable)(),
62
+ __metadata("design:paramtypes", [])
63
+ ], OrganizationDetailDtoTransformation);
64
+ //# sourceMappingURL=OrganizationDetailDtoTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrganizationDetailDtoTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/OrganizationDetailDtoTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAuE;AAEvE,kCAAmD;AACnD,sEAAoE;AAGpE,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,mCAAmC,iDAAzC,MAAM,mCAAoC,SAAQ,+CAGxD;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AAC,qBAAqB;oBACrD,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,qBAAa,EAAE,QAAQ,CAAC,EAAE,CAAC;iBACrE,CAAC,CAAC;gBACH,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,yBAAiB,EAAE,OAAO,CAAC,EAAE,CAAC;aACxE,CAAC;QACN,CAAC,CAAC;QApCE,IAAI,CAAC,gBAAgB,GAAG,0BAAqB,CAAC,OAAO,CAAC,2CAAoB,CAAC,gBAAgB,CAAC,CAAC;IACjG,CAAC;CAoCJ,CAAA;8CA9CY,mCAAmC;IAD/C,IAAA,qBAAU,GAAE;;GACA,mCAAmC,CA8C/C"}
@@ -0,0 +1,9 @@
1
+ import { IOrganizationDto } from "../repositories/interfaces/IOrganizationDto";
2
+ import { IOrganizationResponse } from "../routers/interfaces/IOrganizationResponse";
3
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
4
+ export declare class OrganizationDtoTransformation extends AbstractTransformation<IOrganizationDto, IOrganizationResponse> {
5
+ name: string;
6
+ private createLinkHelper;
7
+ constructor();
8
+ protected transformInternal: (element: IOrganizationDto) => IOrganizationResponse;
9
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OrganizationDtoTransformation = void 0;
13
+ const Links_1 = require("../constants/Links");
14
+ const Di_1 = require("../ioc/Di");
15
+ const ModuleContainerToken_1 = require("../ioc/ModuleContainerToken");
16
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
17
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
18
+ let OrganizationDtoTransformation = exports.OrganizationDtoTransformation = class OrganizationDtoTransformation extends AbstractTransformation_1.AbstractTransformation {
19
+ constructor() {
20
+ super();
21
+ this.name = "OrganizationDtoTransformation";
22
+ this.transformInternal = (element) => {
23
+ return {
24
+ id: element.id,
25
+ name: element.name,
26
+ link: this.createLinkHelper.getLinkUrl(Links_1.ORGANIZATION_PATH, element.id),
27
+ };
28
+ };
29
+ this.createLinkHelper = Di_1.OGEnergeticsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.CreateLinkHelper);
30
+ }
31
+ };
32
+ exports.OrganizationDtoTransformation = OrganizationDtoTransformation = __decorate([
33
+ (0, tsyringe_1.injectable)(),
34
+ __metadata("design:paramtypes", [])
35
+ ], OrganizationDtoTransformation);
36
+ //# sourceMappingURL=OrganizationDtoTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrganizationDtoTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/OrganizationDtoTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAwD;AAExD,kCAAmD;AACnD,sEAAoE;AAGpE,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,6BAA6B,2CAAnC,MAAM,6BAA8B,SAAQ,+CAA+D;IAI9G;QACI,KAAK,EAAE,CAAC;QAJL,SAAI,GAAW,+BAA+B,CAAC;QAQ5C,sBAAiB,GAAG,CAAC,OAAyB,EAAyB,EAAE;YAC/E,OAAO;gBACH,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,yBAAiB,EAAE,OAAO,CAAC,EAAE,CAAC;aACxE,CAAC;QACN,CAAC,CAAC;QATE,IAAI,CAAC,gBAAgB,GAAG,0BAAqB,CAAC,OAAO,CAAC,2CAAoB,CAAC,gBAAgB,CAAC,CAAC;IACjG,CAAC;CASJ,CAAA;wCAhBY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;;GACA,6BAA6B,CAgBzC"}
@@ -0,0 +1,10 @@
1
+ import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
2
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
3
+ import { IOrganizationBuildingsModel } from "./interfaces/IOrganizationBuildingsModel";
4
+ export declare class OrganizationBuildingModel extends Model<OrganizationBuildingModel> implements IOrganizationBuildingsModel {
5
+ static TABLE_NAME: string;
6
+ organization_id: number;
7
+ building_id: number;
8
+ static attributeModel: ModelAttributes<OrganizationBuildingModel>;
9
+ static arrayJsonSchema: JSONSchemaType<IOrganizationBuildingsModel[]>;
10
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrganizationBuildingModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class OrganizationBuildingModel extends sequelize_1.Model {
6
+ }
7
+ exports.OrganizationBuildingModel = OrganizationBuildingModel;
8
+ OrganizationBuildingModel.TABLE_NAME = "organizations_buildings";
9
+ OrganizationBuildingModel.attributeModel = {
10
+ organization_id: {
11
+ primaryKey: true,
12
+ type: sequelize_1.DataTypes.INTEGER,
13
+ allowNull: false,
14
+ },
15
+ building_id: {
16
+ primaryKey: true,
17
+ type: sequelize_1.DataTypes.INTEGER,
18
+ allowNull: false,
19
+ },
20
+ };
21
+ OrganizationBuildingModel.arrayJsonSchema = {
22
+ type: "array",
23
+ items: {
24
+ type: "object",
25
+ properties: {
26
+ organization_id: { type: "number" },
27
+ building_id: { type: "number" },
28
+ },
29
+ additionalProperties: false,
30
+ required: ["organization_id", "building_id"],
31
+ },
32
+ };
33
+ //# sourceMappingURL=OrganizationBuildingModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrganizationBuildingModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/OrganizationBuildingModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAIxF,MAAa,yBAA0B,SAAQ,iBAAgC;;AAA/E,8DA+BC;AA9BiB,oCAAU,GAAG,yBAAyB,CAAC;AAKvC,wCAAc,GAA+C;IACvE,eAAe,EAAE;QACb,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,KAAK;KACnB;IACD,WAAW,EAAE;QACT,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,KAAK;KACnB;CACJ,CAAC;AAEY,yCAAe,GAAkD;IAC3E,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACnC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAClC;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,iBAAiB,EAAE,aAAa,CAAC;KAC/C;CACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
2
+ import { IOrganizationResponsibleUsersModel } from "./interfaces/IOrganizationResponsibleUsersModel";
3
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
4
+ export declare class OrganizationResponsibleUsersModel extends Model<OrganizationResponsibleUsersModel> implements IOrganizationResponsibleUsersModel {
5
+ static TABLE_NAME: string;
6
+ id: number;
7
+ first_name: string | null;
8
+ last_name: string | null;
9
+ position: string | null;
10
+ phone: string | null;
11
+ mail: string | null;
12
+ company: string | null;
13
+ organization_id: number;
14
+ static attributeModel: ModelAttributes<OrganizationResponsibleUsersModel>;
15
+ static arrayJsonSchema: JSONSchemaType<IOrganizationResponsibleUsersModel[]>;
16
+ }