@golemio/energetics 1.0.13 → 1.0.14-dev.740182146

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 (142) hide show
  1. package/dist/integration-engine/helpers/index.d.ts +0 -1
  2. package/dist/integration-engine/helpers/index.js +0 -1
  3. package/dist/integration-engine/helpers/index.js.map +1 -1
  4. package/dist/integration-engine/index.d.ts +3 -2
  5. package/dist/integration-engine/index.js +4 -2
  6. package/dist/integration-engine/index.js.map +1 -1
  7. package/dist/integration-engine/queueDefinitions.d.ts +3 -0
  8. package/dist/integration-engine/queueDefinitions.js +4 -11
  9. package/dist/integration-engine/queueDefinitions.js.map +1 -1
  10. package/dist/integration-engine/transformations/index.d.ts +0 -3
  11. package/dist/integration-engine/transformations/index.js +0 -3
  12. package/dist/integration-engine/transformations/index.js.map +1 -1
  13. package/dist/integration-engine/workers/index.d.ts +0 -1
  14. package/dist/integration-engine/workers/index.js +0 -1
  15. package/dist/integration-engine/workers/index.js.map +1 -1
  16. package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.d.ts +5 -0
  17. package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js +21 -0
  18. package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js.map +1 -0
  19. package/dist/integration-engine/workers/oict-energetika/data-access/BuildingsRepository.d.ts +4 -0
  20. package/dist/integration-engine/workers/oict-energetika/data-access/BuildingsRepository.js +19 -0
  21. package/dist/integration-engine/workers/oict-energetika/data-access/BuildingsRepository.js.map +1 -0
  22. package/dist/integration-engine/workers/oict-energetika/data-access/ConsumptionRepository.d.ts +6 -0
  23. package/dist/integration-engine/workers/oict-energetika/data-access/ConsumptionRepository.js +37 -0
  24. package/dist/integration-engine/workers/oict-energetika/data-access/ConsumptionRepository.js.map +1 -0
  25. package/dist/integration-engine/workers/oict-energetika/data-access/DevicesRepository.d.ts +4 -0
  26. package/dist/integration-engine/workers/oict-energetika/data-access/DevicesRepository.js +19 -0
  27. package/dist/integration-engine/workers/oict-energetika/data-access/DevicesRepository.js.map +1 -0
  28. package/dist/integration-engine/workers/oict-energetika/datasources/OictDataSourceFactory.d.ts +10 -0
  29. package/dist/integration-engine/workers/oict-energetika/datasources/OictDataSourceFactory.js +23 -0
  30. package/dist/integration-engine/workers/oict-energetika/datasources/OictDataSourceFactory.js.map +1 -0
  31. package/dist/integration-engine/workers/oict-energetika/datasources/helpers/OictApiHelper.d.ts +12 -0
  32. package/dist/integration-engine/workers/oict-energetika/datasources/helpers/OictApiHelper.js +48 -0
  33. package/dist/integration-engine/workers/oict-energetika/datasources/helpers/OictApiHelper.js.map +1 -0
  34. package/dist/integration-engine/workers/oict-energetika/datasources/helpers/index.d.ts +1 -0
  35. package/dist/integration-engine/workers/oict-energetika/datasources/helpers/index.js +18 -0
  36. package/dist/integration-engine/workers/oict-energetika/datasources/helpers/index.js.map +1 -0
  37. package/dist/integration-engine/workers/oict-energetika/interfaces/IFetchDataInput.d.ts +3 -0
  38. package/dist/integration-engine/workers/oict-energetika/interfaces/IFetchDataInput.js +3 -0
  39. package/dist/integration-engine/workers/oict-energetika/interfaces/IFetchDataInput.js.map +1 -0
  40. package/dist/integration-engine/workers/oict-energetika/schema/FetchDataSchema.d.ts +4 -0
  41. package/dist/integration-engine/workers/oict-energetika/schema/FetchDataSchema.js +22 -0
  42. package/dist/integration-engine/workers/oict-energetika/schema/FetchDataSchema.js.map +1 -0
  43. package/dist/integration-engine/workers/oict-energetika/tasks/FetchBuildingsTask.d.ts +9 -0
  44. package/dist/integration-engine/workers/oict-energetika/tasks/FetchBuildingsTask.js +44 -0
  45. package/dist/integration-engine/workers/oict-energetika/tasks/FetchBuildingsTask.js.map +1 -0
  46. package/dist/integration-engine/workers/oict-energetika/tasks/FetchConsumptionTask.d.ts +13 -0
  47. package/dist/integration-engine/workers/oict-energetika/tasks/FetchConsumptionTask.js +66 -0
  48. package/dist/integration-engine/workers/oict-energetika/tasks/FetchConsumptionTask.js.map +1 -0
  49. package/dist/integration-engine/workers/oict-energetika/tasks/FetchDataTask.d.ts +10 -0
  50. package/dist/integration-engine/workers/oict-energetika/tasks/FetchDataTask.js +32 -0
  51. package/dist/integration-engine/workers/oict-energetika/tasks/FetchDataTask.js.map +1 -0
  52. package/dist/integration-engine/workers/oict-energetika/tasks/FetchDevicesTask.d.ts +9 -0
  53. package/dist/integration-engine/workers/oict-energetika/tasks/FetchDevicesTask.js +44 -0
  54. package/dist/integration-engine/workers/oict-energetika/tasks/FetchDevicesTask.js.map +1 -0
  55. package/dist/integration-engine/workers/oict-energetika/transformations/BuildingsTransformation.d.ts +7 -0
  56. package/dist/integration-engine/{transformations/EnesaEnergyBuildingsTransformation.js → workers/oict-energetika/transformations/BuildingsTransformation.js} +131 -133
  57. package/dist/integration-engine/workers/oict-energetika/transformations/BuildingsTransformation.js.map +1 -0
  58. package/dist/integration-engine/workers/oict-energetika/transformations/ConsumptionTransformation.d.ts +7 -0
  59. package/dist/integration-engine/{transformations/EnesaEnergyConsumptionTransformation.js → workers/oict-energetika/transformations/ConsumptionTransformation.js} +12 -16
  60. package/dist/integration-engine/workers/oict-energetika/transformations/ConsumptionTransformation.js.map +1 -0
  61. package/dist/integration-engine/workers/oict-energetika/transformations/DevicesTransformation.d.ts +7 -0
  62. package/dist/integration-engine/{transformations/EnesaEnergyDevicesTransformation.js → workers/oict-energetika/transformations/DevicesTransformation.js} +10 -12
  63. package/dist/integration-engine/workers/oict-energetika/transformations/DevicesTransformation.js.map +1 -0
  64. package/dist/schema-definitions/datasources/OictBuildingsJsonSchema.d.ts +3 -0
  65. package/dist/schema-definitions/datasources/OictBuildingsJsonSchema.js +356 -0
  66. package/dist/schema-definitions/datasources/OictBuildingsJsonSchema.js.map +1 -0
  67. package/dist/schema-definitions/datasources/OictConsumptionJsonSchema.d.ts +3 -0
  68. package/dist/schema-definitions/datasources/OictConsumptionJsonSchema.js +19 -0
  69. package/dist/schema-definitions/datasources/OictConsumptionJsonSchema.js.map +1 -0
  70. package/dist/schema-definitions/datasources/OictDevicesJsonSchema.d.ts +3 -0
  71. package/dist/schema-definitions/datasources/OictDevicesJsonSchema.js +42 -0
  72. package/dist/schema-definitions/datasources/OictDevicesJsonSchema.js.map +1 -0
  73. package/dist/schema-definitions/datasources/index.d.ts +3 -0
  74. package/dist/schema-definitions/datasources/index.js +20 -0
  75. package/dist/schema-definitions/datasources/index.js.map +1 -0
  76. package/dist/schema-definitions/datasources/interfaces/IOictBuildingsInput.d.ts +170 -0
  77. package/dist/schema-definitions/datasources/interfaces/IOictBuildingsInput.js +3 -0
  78. package/dist/schema-definitions/datasources/interfaces/IOictBuildingsInput.js.map +1 -0
  79. package/dist/schema-definitions/datasources/interfaces/IOictConsumptionInput.d.ts +8 -0
  80. package/dist/schema-definitions/datasources/interfaces/IOictConsumptionInput.js +3 -0
  81. package/dist/schema-definitions/datasources/interfaces/IOictConsumptionInput.js.map +1 -0
  82. package/dist/schema-definitions/datasources/interfaces/IOictDevicesInput.d.ts +16 -0
  83. package/dist/schema-definitions/datasources/interfaces/IOictDevicesInput.js +3 -0
  84. package/dist/schema-definitions/datasources/interfaces/IOictDevicesInput.js.map +1 -0
  85. package/dist/schema-definitions/datasources/interfaces/index.d.ts +3 -0
  86. package/dist/schema-definitions/datasources/interfaces/index.js +20 -0
  87. package/dist/schema-definitions/datasources/interfaces/index.js.map +1 -0
  88. package/dist/schema-definitions/index.d.ts +2 -6
  89. package/dist/schema-definitions/index.js +1 -6
  90. package/dist/schema-definitions/index.js.map +1 -1
  91. package/dist/schema-definitions/models/BuildingsModel.d.ts +131 -0
  92. package/dist/schema-definitions/models/BuildingsModel.js +393 -0
  93. package/dist/schema-definitions/models/BuildingsModel.js.map +1 -0
  94. package/dist/schema-definitions/models/ConsumptionModel.d.ts +14 -0
  95. package/dist/schema-definitions/models/ConsumptionModel.js +50 -0
  96. package/dist/schema-definitions/models/ConsumptionModel.js.map +1 -0
  97. package/dist/schema-definitions/models/DevicesModel.d.ts +22 -0
  98. package/dist/schema-definitions/models/DevicesModel.js +66 -0
  99. package/dist/schema-definitions/models/DevicesModel.js.map +1 -0
  100. package/dist/schema-definitions/models/index.d.ts +3 -0
  101. package/dist/schema-definitions/models/index.js +20 -0
  102. package/dist/schema-definitions/models/index.js.map +1 -0
  103. package/dist/schema-definitions/models/interfaces/IBuildingsModel.d.ts +125 -0
  104. package/dist/schema-definitions/models/interfaces/IBuildingsModel.js +3 -0
  105. package/dist/schema-definitions/models/interfaces/IBuildingsModel.js.map +1 -0
  106. package/dist/schema-definitions/models/interfaces/IConsumptionModel.d.ts +8 -0
  107. package/dist/schema-definitions/models/interfaces/IConsumptionModel.js +3 -0
  108. package/dist/schema-definitions/models/interfaces/IConsumptionModel.js.map +1 -0
  109. package/dist/schema-definitions/models/interfaces/IDevicesModel.d.ts +16 -0
  110. package/dist/schema-definitions/models/interfaces/IDevicesModel.js +3 -0
  111. package/dist/schema-definitions/models/interfaces/IDevicesModel.js.map +1 -0
  112. package/dist/schema-definitions/models/interfaces/index.d.ts +3 -0
  113. package/dist/schema-definitions/models/interfaces/index.js +20 -0
  114. package/dist/schema-definitions/models/interfaces/index.js.map +1 -0
  115. package/dist/schema-definitions/providers/index.d.ts +0 -1
  116. package/dist/schema-definitions/providers/index.js +0 -1
  117. package/dist/schema-definitions/providers/index.js.map +1 -1
  118. package/package.json +6 -6
  119. package/dist/integration-engine/helpers/EnesaApiHelper.d.ts +0 -17
  120. package/dist/integration-engine/helpers/EnesaApiHelper.js +0 -23
  121. package/dist/integration-engine/helpers/EnesaApiHelper.js.map +0 -1
  122. package/dist/integration-engine/transformations/EnesaEnergyBuildingsTransformation.d.ts +0 -8
  123. package/dist/integration-engine/transformations/EnesaEnergyBuildingsTransformation.js.map +0 -1
  124. package/dist/integration-engine/transformations/EnesaEnergyConsumptionTransformation.d.ts +0 -8
  125. package/dist/integration-engine/transformations/EnesaEnergyConsumptionTransformation.js.map +0 -1
  126. package/dist/integration-engine/transformations/EnesaEnergyDevicesTransformation.d.ts +0 -8
  127. package/dist/integration-engine/transformations/EnesaEnergyDevicesTransformation.js.map +0 -1
  128. package/dist/integration-engine/workers/EnergeticsEnesaWorker.d.ts +0 -27
  129. package/dist/integration-engine/workers/EnergeticsEnesaWorker.js +0 -142
  130. package/dist/integration-engine/workers/EnergeticsEnesaWorker.js.map +0 -1
  131. package/dist/schema-definitions/providers/EnergeticsEnesa.d.ts +0 -1087
  132. package/dist/schema-definitions/providers/EnergeticsEnesa.js +0 -35
  133. package/dist/schema-definitions/providers/EnergeticsEnesa.js.map +0 -1
  134. package/dist/schema-definitions/providers/EnergeticsEnesaDatasourceSchemas.d.ts +0 -592
  135. package/dist/schema-definitions/providers/EnergeticsEnesaDatasourceSchemas.js +0 -685
  136. package/dist/schema-definitions/providers/EnergeticsEnesaDatasourceSchemas.js.map +0 -1
  137. package/dist/schema-definitions/providers/EnergeticsEnesaOutputSchemas.d.ts +0 -463
  138. package/dist/schema-definitions/providers/EnergeticsEnesaOutputSchemas.js +0 -608
  139. package/dist/schema-definitions/providers/EnergeticsEnesaOutputSchemas.js.map +0 -1
  140. package/dist/schema-definitions/providers/EnergeticsEnesaSDMA.d.ts +0 -5
  141. package/dist/schema-definitions/providers/EnergeticsEnesaSDMA.js +0 -202
  142. package/dist/schema-definitions/providers/EnergeticsEnesaSDMA.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchConsumptionTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/workers/oict-energetika/tasks/FetchConsumptionTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2EAAoE;AACpE,2EAA6E;AAC7E,6EAAuE;AACvE,2DAAqE;AACrE,gFAA6E;AAC7E,oDAA0D;AAC1D,gFAA6E;AAE7E,+DAAsE;AACtE,4FAAyF;AAEzF,MAAa,oBAAqB,SAAQ,sBAA6B;IAQnE,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QARP,cAAS,GAAG,kBAAkB,CAAC;QAC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AE;YAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5C,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAExC,MAAM,6CAAqB,CAAC,aAAa,CAAC,0BAAgB,CAAC,WAAW,EAAE;gBACpE,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE;gBAC3B,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE;aAC1B,CAAC,CAAC;YAEH,MAAM,6CAAqB,CAAC,aAAa,CAAC,0BAAgB,CAAC,iBAAiB,EAAE;gBAC1E,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE;gBAC3B,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE;aAC1B,CAAC,CAAC;SACN;IACL,CAAC;CACJ;AAjDD,oDAiDC"}
@@ -0,0 +1,10 @@
1
+ import { AbstractTask } from "@golemio/core/dist/integration-engine/workers";
2
+ import { IFetchDataInput } from "../interfaces/IFetchDataInput";
3
+ import { FetchDataValidationSchema } from "../schema/FetchDataSchema";
4
+ export declare class FetchDataTask extends AbstractTask<IFetchDataInput> {
5
+ readonly queueName = "fetchData";
6
+ readonly queueTtl: number;
7
+ readonly schema: typeof FetchDataValidationSchema;
8
+ constructor(queuePrefix: string);
9
+ protected execute({ targetDays }: IFetchDataInput): Promise<void>;
10
+ }
@@ -0,0 +1,32 @@
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.FetchDataTask = void 0;
13
+ const queueprocessors_1 = require("@golemio/core/dist/integration-engine/queueprocessors");
14
+ const workers_1 = require("@golemio/core/dist/integration-engine/workers");
15
+ const FetchDataSchema_1 = require("../schema/FetchDataSchema");
16
+ class FetchDataTask extends workers_1.AbstractTask {
17
+ constructor(queuePrefix) {
18
+ super(queuePrefix);
19
+ this.queueName = "fetchData";
20
+ this.queueTtl = 29 * 60 * 1000; // 29 minutes
21
+ this.schema = FetchDataSchema_1.FetchDataValidationSchema;
22
+ }
23
+ execute({ targetDays }) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ yield queueprocessors_1.QueueManager.sendMessageToExchange(this.queuePrefix, "fetchBuildings", {});
26
+ yield queueprocessors_1.QueueManager.sendMessageToExchange(this.queuePrefix, "fetchDevices", {});
27
+ yield queueprocessors_1.QueueManager.sendMessageToExchange(this.queuePrefix, "fetchConsumption", { targetDays });
28
+ });
29
+ }
30
+ }
31
+ exports.FetchDataTask = FetchDataTask;
32
+ //# sourceMappingURL=FetchDataTask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchDataTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/workers/oict-energetika/tasks/FetchDataTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2FAAqF;AACrF,2EAA6E;AAE7E,+DAAsE;AAEtE,MAAa,aAAc,SAAQ,sBAA6B;IAK5D,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QALP,cAAS,GAAG,WAAW,CAAC;QACxB,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QACxC,WAAM,GAAG,2CAAyB,CAAC;IAInD,CAAC;IAEe,OAAO,CAAC,EAAE,UAAU,EAAmB;;YACnD,MAAM,8BAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC;YACjF,MAAM,8BAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;YAC/E,MAAM,8BAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QACnG,CAAC;KAAA;CACJ;AAdD,sCAcC"}
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,44 @@
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("@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 DevicesRepository_1 = require("../data-access/DevicesRepository");
17
+ const helpers_2 = require("../datasources/helpers");
18
+ const OictDataSourceFactory_1 = require("../datasources/OictDataSourceFactory");
19
+ const DevicesTransformation_1 = require("../transformations/DevicesTransformation");
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_2.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_1.log.error(err);
38
+ throw new golemio_errors_1.CustomError("Failed to fetch devices", true, this.constructor.name, undefined, err);
39
+ }
40
+ });
41
+ }
42
+ }
43
+ exports.FetchDevicesTask = FetchDevicesTask;
44
+ //# sourceMappingURL=FetchDevicesTask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchDevicesTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/workers/oict-energetika/tasks/FetchDevicesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAoE;AACpE,2EAAkF;AAClF,6EAAuE;AACvE,wEAAqE;AACrE,oDAA0D;AAC1D,gFAA6E;AAC7E,oFAAiF;AAEjF,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,4BAAW,CAAC,yBAAyB,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;aACjG;QACL,CAAC;KAAA;CACJ;AAzBD,4CAyBC"}
@@ -0,0 +1,7 @@
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
+ }
@@ -9,160 +9,158 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.EnesaEnergyBuildingsTransformation = void 0;
13
- const _sch_1 = require("../../schema-definitions");
12
+ exports.BuildingsTransformation = void 0;
13
+ const ParserHelpers_1 = require("../../../helpers/ParserHelpers");
14
14
  const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
15
- const ParserHelpers_1 = require("../helpers/ParserHelpers");
16
- class EnesaEnergyBuildingsTransformation extends transformations_1.BaseTransformation {
15
+ class BuildingsTransformation extends transformations_1.BaseTransformation {
17
16
  constructor() {
18
- super();
17
+ super(...arguments);
18
+ this.name = "BuildingsTransformation";
19
19
  this.transformElement = (element) => __awaiter(this, void 0, void 0, function* () {
20
- const res = {
20
+ return {
21
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),
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
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),
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
38
  building_envelope_floor_of_the_lowest_heated_floor_area:
39
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),
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
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),
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
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),
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
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),
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
73
  // Fuel and energy
74
- fuel_and_energy_coal: (0, ParserHelpers_1.toStringOrEmpty)(element.FuelAndEnergy.coal),
75
- fuel_and_energy_czt: (0, ParserHelpers_1.toStringOrEmpty)(element.FuelAndEnergy.czt),
76
- fuel_and_energy_electricity: (0, ParserHelpers_1.toStringOrEmpty)(element.FuelAndEnergy.electricity),
77
- fuel_and_energy_gas: (0, ParserHelpers_1.toStringOrEmpty)(element.FuelAndEnergy.gas),
78
- fuel_and_energy_other: (0, ParserHelpers_1.toStringOrEmpty)(element.FuelAndEnergy.other),
79
- fuel_and_energy_oze: (0, ParserHelpers_1.toStringOrEmpty)(element.FuelAndEnergy.oze),
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),
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
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),
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
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),
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
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),
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
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),
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
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),
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
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),
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
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),
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
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),
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
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),
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
161
  };
162
- return res;
163
162
  });
164
- this.name = _sch_1.EnergeticsSchema.enesa.buildings.name;
165
163
  }
166
164
  }
167
- exports.EnesaEnergyBuildingsTransformation = EnesaEnergyBuildingsTransformation;
168
- //# sourceMappingURL=EnesaEnergyBuildingsTransformation.js.map
165
+ exports.BuildingsTransformation = BuildingsTransformation;
166
+ //# sourceMappingURL=BuildingsTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildingsTransformation.js","sourceRoot":"","sources":["../../../../../src/integration-engine/workers/oict-energetika/transformations/BuildingsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAA4D;AAG5D,2FAA4G;AAE5G,MAAa,uBAAwB,SAAQ,oCAAkB;IAA/D;;QACW,SAAI,GAAG,yBAAyB,CAAC;QAE9B,qBAAgB,GAAG,CAAO,OAA4B,EAA4B,EAAE;YAC1F,OAAO;gBACH,KAAK;gBACL,EAAE,EAAE,OAAO,CAAC,EAAE;gBAEd,YAAY,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;gBACnD,eAAe,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;gBACzD,oBAAoB,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;gBAClE,YAAY,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;gBACnD,aAAa,EAAE,IAAA,+BAAe,EAAC,OAAO,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AAC;aACpE,CAAC;QACN,CAAC,CAAA,CAAC;IACN,CAAC;CAAA;AAjND,0DAiNC"}
@@ -0,0 +1,7 @@
1
+ import { IOictConsumptionInput } from "../../../../schema-definitions/datasources/interfaces";
2
+ import { IConsumptionModel } from "../../../../schema-definitions/models/interfaces";
3
+ import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
4
+ export declare class ConsumptionTransformation extends BaseTransformation implements ITransformation {
5
+ name: string;
6
+ protected transformElement: (element: IOictConsumptionInput) => Promise<IConsumptionModel>;
7
+ }
@@ -9,29 +9,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.EnesaEnergyConsumptionTransformation = void 0;
13
- const _sch_1 = require("../../schema-definitions");
12
+ exports.ConsumptionTransformation = void 0;
13
+ const ParserHelpers_1 = require("../../../helpers/ParserHelpers");
14
14
  const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
15
- const ParserHelpers_1 = require("../helpers/ParserHelpers");
16
- class EnesaEnergyConsumptionTransformation extends transformations_1.BaseTransformation {
15
+ class ConsumptionTransformation extends transformations_1.BaseTransformation {
17
16
  constructor() {
18
- super();
17
+ super(...arguments);
18
+ this.name = "ConsumptionTransformation";
19
19
  this.transformElement = (element) => __awaiter(this, void 0, void 0, function* () {
20
- const res = {
20
+ return {
21
21
  // PK
22
- addr: element.addr,
22
+ addr: (0, ParserHelpers_1.toStringOrEmpty)(element.addr),
23
23
  meter: (0, ParserHelpers_1.toStringOrEmpty)(element.meter),
24
- time_utc: element.timeUtc,
25
- var: (0, ParserHelpers_1.toStringOrEmpty)(element.var),
26
- commodity: element.commodity,
27
- type: element.type,
28
- unit: element.unit,
24
+ time_utc: element.time,
25
+ variable: (0, ParserHelpers_1.toStringOrEmpty)(element.var),
26
+ type: (0, ParserHelpers_1.toStringOrEmpty)(element.type),
29
27
  value: Number(element.value),
30
28
  };
31
- return res;
32
29
  });
33
- this.name = _sch_1.EnergeticsSchema.enesa.consumption.name;
34
30
  }
35
31
  }
36
- exports.EnesaEnergyConsumptionTransformation = EnesaEnergyConsumptionTransformation;
37
- //# sourceMappingURL=EnesaEnergyConsumptionTransformation.js.map
32
+ exports.ConsumptionTransformation = ConsumptionTransformation;
33
+ //# sourceMappingURL=ConsumptionTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConsumptionTransformation.js","sourceRoot":"","sources":["../../../../../src/integration-engine/workers/oict-energetika/transformations/ConsumptionTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAA4D;AAG5D,2FAA4G;AAE5G,MAAa,yBAA0B,SAAQ,oCAAkB;IAAjE;;QACW,SAAI,GAAG,2BAA2B,CAAC;QAEhC,qBAAgB,GAAG,CAAO,OAA8B,EAA8B,EAAE;YAC9F,OAAO;gBACH,KAAK;gBACL,IAAI,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,IAAI,CAAC;gBACnC,KAAK,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,KAAK,CAAC;gBACrC,QAAQ,EAAE,OAAO,CAAC,IAAI;gBACtB,QAAQ,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,GAAG,CAAC;gBAEtC,IAAI,EAAE,IAAA,+BAAe,EAAC,OAAO,CAAC,IAAI,CAAC;gBACnC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aAC/B,CAAC;QACN,CAAC,CAAA,CAAC;IACN,CAAC;CAAA;AAfD,8DAeC"}
@@ -0,0 +1,7 @@
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
+ }
@@ -9,23 +9,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.EnesaEnergyDevicesTransformation = void 0;
13
- const ParserHelpers_1 = require("../helpers/ParserHelpers");
14
- const _sch_1 = require("../../schema-definitions");
12
+ exports.DevicesTransformation = void 0;
13
+ const ParserHelpers_1 = require("../../../helpers/ParserHelpers");
15
14
  const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
16
- class EnesaEnergyDevicesTransformation extends transformations_1.BaseTransformation {
15
+ class DevicesTransformation extends transformations_1.BaseTransformation {
17
16
  constructor() {
18
- super();
17
+ super(...arguments);
18
+ this.name = "DevicesTransformation";
19
19
  this.transformElement = (element) => __awaiter(this, void 0, void 0, function* () {
20
- const res = {
20
+ return {
21
21
  // PK
22
22
  id: element.id,
23
23
  addr: (0, ParserHelpers_1.toStringOrEmpty)(element.addr),
24
24
  building_id: element.buildingId,
25
25
  category: (0, ParserHelpers_1.toStringOrEmpty)(element.category),
26
- deleted: (0, ParserHelpers_1.toStringOrEmpty)(element.deleted),
26
+ deleted: (0, ParserHelpers_1.toStringOrEmpty)(element.deleted).toLowerCase(),
27
27
  description: (0, ParserHelpers_1.toStringOrEmpty)(element.description),
28
- include_in_evaluation: (0, ParserHelpers_1.toStringOrEmpty)(element.includeInEvaluation),
28
+ include_in_evaluation: (0, ParserHelpers_1.toStringOrEmpty)(element.includeInEvaluation).toLowerCase(),
29
29
  location_description: (0, ParserHelpers_1.toStringOrEmpty)(element.locationDescription),
30
30
  location_number: (0, ParserHelpers_1.toStringOrEmpty)(element.locationNumber),
31
31
  meter_index: (0, ParserHelpers_1.toStringOrEmpty)(element.meterIndex),
@@ -34,10 +34,8 @@ class EnesaEnergyDevicesTransformation extends transformations_1.BaseTransformat
34
34
  replaced_meter_id: (0, ParserHelpers_1.toStringOrEmpty)(element.replacedMeterId),
35
35
  unit: (0, ParserHelpers_1.toStringOrEmpty)(element.unit),
36
36
  };
37
- return res;
38
37
  });
39
- this.name = _sch_1.EnergeticsSchema.enesa.devices.name;
40
38
  }
41
39
  }
42
- exports.EnesaEnergyDevicesTransformation = EnesaEnergyDevicesTransformation;
43
- //# sourceMappingURL=EnesaEnergyDevicesTransformation.js.map
40
+ exports.DevicesTransformation = DevicesTransformation;
41
+ //# sourceMappingURL=DevicesTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevicesTransformation.js","sourceRoot":"","sources":["../../../../../src/integration-engine/workers/oict-energetika/transformations/DevicesTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAA4D;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"}
@@ -0,0 +1,3 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IOictBuildingsInput } from "./interfaces";
3
+ export declare const oictBuildingsJsonSchema: JSONSchemaType<IOictBuildingsInput[]>;