@golemio/energetics 1.4.9-dev.1632309400 → 1.4.9-rc.1648069376
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.
- package/db/migrations/postgresql/20250120141804-ptas-selected-meters.js +53 -0
- package/db/migrations/postgresql/sqls/20250120141804-ptas-selected-meters-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20250120141804-ptas-selected-meters-up.sql +3 -0
- package/dist/input-gateway/pre/PreCsvInputController.js +4 -13
- package/dist/input-gateway/pre/PreCsvInputController.js.map +1 -1
- package/dist/input-gateway/pre/PreInputRouter.js +6 -15
- package/dist/input-gateway/pre/PreInputRouter.js.map +1 -1
- package/dist/input-gateway/pre/PreJsonInputController.js +4 -13
- package/dist/input-gateway/pre/PreJsonInputController.js.map +1 -1
- package/dist/input-gateway/ptas/PtasRouter.js +3 -12
- package/dist/input-gateway/ptas/PtasRouter.js.map +1 -1
- package/dist/input-gateway/ptas/PtasWebScrapingController.js +4 -13
- package/dist/input-gateway/ptas/PtasWebScrapingController.js.map +1 -1
- package/dist/integration-engine/commodity-providers/datasources/ppas-ave-api/helpers/PpasAveApiHelper.js +9 -18
- package/dist/integration-engine/commodity-providers/datasources/ppas-ave-api/helpers/PpasAveApiHelper.js.map +1 -1
- package/dist/integration-engine/commodity-providers/datasources/pre-elektro-api/helpers/PreElectroHelper.js +29 -40
- package/dist/integration-engine/commodity-providers/datasources/pre-elektro-api/helpers/PreElectroHelper.js.map +1 -1
- package/dist/integration-engine/commodity-providers/ioc/Di.js +1 -1
- package/dist/integration-engine/commodity-providers/ioc/Di.js.map +1 -1
- package/dist/integration-engine/commodity-providers/repositories/MeasurementRepository.js +15 -26
- package/dist/integration-engine/commodity-providers/repositories/MeasurementRepository.js.map +1 -1
- package/dist/integration-engine/commodity-providers/repositories/StaticMeterSettingsRepository.js +24 -38
- package/dist/integration-engine/commodity-providers/repositories/StaticMeterSettingsRepository.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/AbstractFetchMeasurementsTask.js +13 -24
- package/dist/integration-engine/commodity-providers/workers/tasks/AbstractFetchMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchMeasurementOptionsStaticDataTask.js +14 -25
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchMeasurementOptionsStaticDataTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchMeasurementsFromEEProvidersTask.js +18 -29
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchMeasurementsFromEEProvidersTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchMeasurementsFromProvidersTask.js +30 -41
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchMeasurementsFromProvidersTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasEEMeasurementsTask.js +33 -61
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasEEMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasMeasurementsTask.js +50 -92
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPreMeasurementDataTask.js +20 -31
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPreMeasurementDataTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPtasWebScrapedMeasurementsTask.d.ts +1 -3
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPtasWebScrapedMeasurementsTask.js +27 -38
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPtasWebScrapedMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.js +46 -87
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/ProcessPreEanMeasurementsTask.js +13 -24
- package/dist/integration-engine/commodity-providers/workers/tasks/ProcessPreEanMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/datasources/vpalace/BaseVpalaceFactory.js +8 -12
- package/dist/integration-engine/datasources/vpalace/BaseVpalaceFactory.js.map +1 -1
- package/dist/integration-engine/datasources/vpalace/VpalaceMeasurementDataSource.js +3 -14
- package/dist/integration-engine/datasources/vpalace/VpalaceMeasurementDataSource.js.map +1 -1
- package/dist/integration-engine/datasources/vpalace/VpalaceMeasuringEquipmentDataSource.js +3 -14
- package/dist/integration-engine/datasources/vpalace/VpalaceMeasuringEquipmentDataSource.js.map +1 -1
- package/dist/integration-engine/datasources/vpalace/VpalaceMeterTypeDataSource.js +3 -14
- package/dist/integration-engine/datasources/vpalace/VpalaceMeterTypeDataSource.js.map +1 -1
- package/dist/integration-engine/datasources/vpalace/VpalaceTypeMeasuringEquipmentDataSource.js +3 -14
- package/dist/integration-engine/datasources/vpalace/VpalaceTypeMeasuringEquipmentDataSource.js.map +1 -1
- package/dist/integration-engine/datasources/vpalace/VpalaceUnitsDataSource.js +3 -14
- package/dist/integration-engine/datasources/vpalace/VpalaceUnitsDataSource.js.map +1 -1
- package/dist/integration-engine/helpers/ParserHelpers.js +1 -1
- package/dist/integration-engine/helpers/ParserHelpers.js.map +1 -1
- package/dist/integration-engine/helpers/UnimonitorCemApiHelper.js +7 -17
- package/dist/integration-engine/helpers/UnimonitorCemApiHelper.js.map +1 -1
- package/dist/integration-engine/repositories/oict-energetika/AccessLimitationRepository.js +24 -36
- package/dist/integration-engine/repositories/oict-energetika/AccessLimitationRepository.js.map +1 -1
- package/dist/integration-engine/repositories/oict-energetika/ConsumptionRepository.js +3 -12
- package/dist/integration-engine/repositories/oict-energetika/ConsumptionRepository.js.map +1 -1
- package/dist/integration-engine/repositories/vpalace/VpalacUnitsRepository.js +4 -13
- package/dist/integration-engine/repositories/vpalace/VpalacUnitsRepository.js.map +1 -1
- package/dist/integration-engine/repositories/vpalace/VpalaceMeasurementRepository.js +4 -13
- package/dist/integration-engine/repositories/vpalace/VpalaceMeasurementRepository.js.map +1 -1
- package/dist/integration-engine/repositories/vpalace/VpalaceMeasuringEquipmentRepository.js +4 -13
- package/dist/integration-engine/repositories/vpalace/VpalaceMeasuringEquipmentRepository.js.map +1 -1
- package/dist/integration-engine/repositories/vpalace/VpalaceMeterTypeRepository.js +4 -13
- package/dist/integration-engine/repositories/vpalace/VpalaceMeterTypeRepository.js.map +1 -1
- package/dist/integration-engine/repositories/vpalace/VpalaceTypeMeasuringEquipmentRepository.js +4 -13
- package/dist/integration-engine/repositories/vpalace/VpalaceTypeMeasuringEquipmentRepository.js.map +1 -1
- package/dist/integration-engine/tasks/oict-energetika/FetchAccessConfigurationTask.js +3 -14
- package/dist/integration-engine/tasks/oict-energetika/FetchAccessConfigurationTask.js.map +1 -1
- package/dist/integration-engine/tasks/oict-energetika/FetchConsumptionTask.js +12 -23
- package/dist/integration-engine/tasks/oict-energetika/FetchConsumptionTask.js.map +1 -1
- package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js +4 -15
- package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js.map +1 -1
- package/dist/integration-engine/tasks/vpalace/FetchDateFactory.js +15 -26
- package/dist/integration-engine/tasks/vpalace/FetchDateFactory.js.map +1 -1
- package/dist/integration-engine/tasks/vpalace/FetchXDaysDataTask.js +18 -29
- package/dist/integration-engine/tasks/vpalace/FetchXDaysDataTask.js.map +1 -1
- package/dist/integration-engine/tasks/vpalace/FetchXHoursDataTask.js +15 -26
- package/dist/integration-engine/tasks/vpalace/FetchXHoursDataTask.js.map +1 -1
- package/dist/integration-engine/tasks/vpalace/MeasurementDataFetcher.js +5 -14
- package/dist/integration-engine/tasks/vpalace/MeasurementDataFetcher.js.map +1 -1
- package/dist/integration-engine/tasks/vpalace/MeasuringEquipmentFetcher.js +5 -14
- package/dist/integration-engine/tasks/vpalace/MeasuringEquipmentFetcher.js.map +1 -1
- package/dist/integration-engine/tasks/vpalace/MeterTypeFetcher.js +5 -14
- package/dist/integration-engine/tasks/vpalace/MeterTypeFetcher.js.map +1 -1
- package/dist/integration-engine/tasks/vpalace/TypeMeasuringEquipmentFetcher.js +5 -14
- package/dist/integration-engine/tasks/vpalace/TypeMeasuringEquipmentFetcher.js.map +1 -1
- package/dist/integration-engine/tasks/vpalace/UnitDataFetcher.js +5 -14
- package/dist/integration-engine/tasks/vpalace/UnitDataFetcher.js.map +1 -1
- package/dist/integration-engine/transformations/oict-energetika/ConsumptionTransformation.js +2 -11
- package/dist/integration-engine/transformations/oict-energetika/ConsumptionTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/vpalace/VpalacMeasuringEquipmentTransformation.js +2 -11
- package/dist/integration-engine/transformations/vpalace/VpalacMeasuringEquipmentTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/vpalace/VpalacMeterTypeTransformation.js +2 -11
- package/dist/integration-engine/transformations/vpalace/VpalacMeterTypeTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/vpalace/VpalacTypeMeasuringEquipmentTransformation.js +2 -11
- package/dist/integration-engine/transformations/vpalace/VpalacTypeMeasuringEquipmentTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/vpalace/VpalacUnitsTransformation.js +2 -11
- package/dist/integration-engine/transformations/vpalace/VpalacUnitsTransformation.js.map +1 -1
- package/dist/output-gateway/controllers/v2/AbstractController.js +6 -17
- package/dist/output-gateway/controllers/v2/AbstractController.js.map +1 -1
- package/dist/output-gateway/controllers/v2/BuildingsController.js +15 -24
- package/dist/output-gateway/controllers/v2/BuildingsController.js.map +1 -1
- package/dist/output-gateway/controllers/v2/V2DevicesController.js +8 -17
- package/dist/output-gateway/controllers/v2/V2DevicesController.js.map +1 -1
- package/dist/output-gateway/controllers/v2/V2MeasurementsController.js +18 -19
- package/dist/output-gateway/controllers/v2/V2MeasurementsController.js.map +1 -1
- package/dist/output-gateway/controllers/v2/V2OrganizationsController.js +9 -18
- package/dist/output-gateway/controllers/v2/V2OrganizationsController.js.map +1 -1
- package/dist/output-gateway/repositories/AccessLimitationRepository.js +13 -24
- package/dist/output-gateway/repositories/AccessLimitationRepository.js.map +1 -1
- package/dist/output-gateway/repositories/DevicesRepository.js +26 -39
- package/dist/output-gateway/repositories/DevicesRepository.js.map +1 -1
- package/dist/output-gateway/repositories/MeasurementRepository.js +49 -66
- package/dist/output-gateway/repositories/MeasurementRepository.js.map +1 -1
- package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js +4 -17
- package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js.map +1 -1
- package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js +4 -17
- package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js.map +1 -1
- package/dist/output-gateway/repositories/OrganizationsRepository.js +67 -82
- package/dist/output-gateway/repositories/OrganizationsRepository.js.map +1 -1
- package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js +37 -52
- package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js.map +1 -1
- package/dist/output-gateway/transformations/BuildingTransformationFull.js +114 -115
- package/dist/output-gateway/transformations/BuildingTransformationFull.js.map +1 -1
- package/dist/output-gateway/transformations/BuildingsTransformation.js +2 -3
- package/dist/output-gateway/transformations/BuildingsTransformation.js.map +1 -1
- package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js +1 -2
- package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js.map +1 -1
- package/dist/schema-definitions/datasources/interfaces/IStaticMeterSettings.d.ts +3 -0
- package/dist/schema-definitions/models/helpers/StaticDataResourceTypeEnum.d.ts +2 -1
- package/dist/schema-definitions/models/helpers/StaticDataResourceTypeEnum.js +1 -0
- package/dist/schema-definitions/models/helpers/StaticDataResourceTypeEnum.js.map +1 -1
- package/dist/schema-definitions/models/interfaces/IStaticDataOutputDto.d.ts +2 -1
- package/docs/implementation_documentation.md +1 -0
- package/package.json +4 -4
package/dist/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchVeoliaMeasurementsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FetchVeoliaMeasurementsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2FAAsG;AAKtG,yEAAwF;AACxF,oFAAmG;AACnG,oGAAmH;AACnH,qGAAoH;AACpH,8CAAiE;AAIjE,yHAAwF;AAIxF,wEAAqE;AACrE,6EAAwE;AACxE,2DAAqE;AACrE,iEAAwE;AAExE,iFAAwF;AACxF,mFAAgF;AAGzE,IAAM,2BAA2B,yCAAjC,MAAM,2BAA4B,SAAQ,6DAAwD;IAKrG,YACoC,MAA6B,EACnC,MAAuB,EAEjD,iBAA8D,EAE9D,yBAA+D,EACX,qBAAsD,EAC9C,uBAA8D;QAE1H,KAAK,EAAE,CAAC;QATgC,WAAM,GAAN,MAAM,CAAe;QAC3B,WAAM,GAAN,MAAM,CAAS;QAEzC,sBAAiB,GAAjB,iBAAiB,CAAqC;QAEtD,8BAAyB,GAAzB,yBAAyB,CAA8B;QACD,0BAAqB,GAArB,qBAAqB,CAAuB;QACtC,4BAAuB,GAAvB,uBAAuB,CAA+B;QAZ9G,cAAS,GAAG,yBAAyB,CAAC;QACtC,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAC1B,WAAM,GAAG,6DAAkC,CAAC;IAa5D,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAA+B;QAChD,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CACjE,IAAI,CAAC,YAAY,EACjB,mDAAsB,CAAC,kBAAkB,CAC5C,CAAC;QACF,IAAI,CAAC,kBAAkB,EAAE;YACrB,MAAM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&& this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.ProcessPreEanMeasurementsTask = void 0;
|
|
25
16
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
@@ -44,22 +35,20 @@ let ProcessPreEanMeasurementsTask = exports.ProcessPreEanMeasurementsTask = clas
|
|
|
44
35
|
this.queueName = "processPreEanMeasurements";
|
|
45
36
|
this.queueTtl = 60 * 60 * 1000;
|
|
46
37
|
}
|
|
47
|
-
execute(measurementInput) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
measurementInput: PreMeasurementFilter_1.PreMeasurementFilter.sumDuplicates(measurementInput),
|
|
60
|
-
});
|
|
61
|
-
yield this.measurementRepository.bulkSave(measurements);
|
|
38
|
+
async execute(measurementInput) {
|
|
39
|
+
const measurementOptions = await this.meterSettingsRepository.getData(CommodityProviderTypeEnum_1.CommodityProviderType.PreInputOptions, StaticDataResourceTypeEnum_1.StaticDataResourceType.MeasurementOptions);
|
|
40
|
+
if (!measurementOptions) {
|
|
41
|
+
throw new golemio_errors_1.GeneralError("Measurement options not found", this.constructor.name);
|
|
42
|
+
}
|
|
43
|
+
const option = measurementOptions.find((item) => item.Meter === measurementInput.ean);
|
|
44
|
+
if (!option) {
|
|
45
|
+
throw new golemio_errors_1.GeneralError("Measurement option not found for meter " + measurementInput.ean, this.constructor.name);
|
|
46
|
+
}
|
|
47
|
+
const measurements = this.transformation.transformElement({
|
|
48
|
+
option,
|
|
49
|
+
measurementInput: PreMeasurementFilter_1.PreMeasurementFilter.sumDuplicates(measurementInput),
|
|
62
50
|
});
|
|
51
|
+
await this.measurementRepository.bulkSave(measurements);
|
|
63
52
|
}
|
|
64
53
|
};
|
|
65
54
|
exports.ProcessPreEanMeasurementsTask = ProcessPreEanMeasurementsTask = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessPreEanMeasurementsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/commodity-providers/workers/tasks/ProcessPreEanMeasurementsTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProcessPreEanMeasurementsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/commodity-providers/workers/tasks/ProcessPreEanMeasurementsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iEAAwE;AACxE,yEAAwF;AAExF,qGAAoH;AACpH,oGAAmH;AACnH,oFAAmG;AAEnG,+EAAyG;AACzG,uHAAsF;AACtF,yHAAwF;AAExF,6EAAwE;AACxE,8EAAqE;AACrE,+CAAgE;AAChE,4EAA2F;AAGpF,IAAM,6BAA6B,2CAAnC,MAAM,6BAA8B,SAAQ,iCAAgC;IAK/E,YAEI,uBAA8D,EACV,qBAAsD,EAC/C,cAAsD;QAEjH,KAAK,CAAC,uBAAW,CAAC,CAAC;QAJX,4BAAuB,GAAvB,uBAAuB,CAA+B;QACA,0BAAqB,GAArB,qBAAqB,CAAuB;Q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AC,CAAA;qCAFzB,6DAA6B;QACuB,6CAAqB;QACrB,2DAA4B;GAT5G,6BAA6B,CAqCzC"}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.BaseVpalaceFactory = void 0;
|
|
13
4
|
const HTTPFetchProtocolStrategy_1 = require("@golemio/core/dist/integration-engine/datasources/protocol-strategy/HTTPFetchProtocolStrategy");
|
|
14
5
|
class BaseVpalaceFactory {
|
|
15
6
|
constructor(url) {
|
|
16
|
-
this.getConnectionSettings = (resourceType, dateFrom, dateTo, authCookie) =>
|
|
17
|
-
const params = new URLSearchParams(
|
|
7
|
+
this.getConnectionSettings = async (resourceType, dateFrom, dateTo, authCookie) => {
|
|
8
|
+
const params = new URLSearchParams({
|
|
9
|
+
...(resourceType === "11" && { cis: "135" }),
|
|
10
|
+
id: resourceType,
|
|
11
|
+
...(Number.isInteger(+dateFrom) ? { from_ms: dateFrom } : { from: dateFrom }),
|
|
12
|
+
...(Number.isInteger(+dateTo) ? { to_ms: dateTo } : { to: dateTo }),
|
|
13
|
+
});
|
|
18
14
|
return new HTTPFetchProtocolStrategy_1.HTTPFetchProtocolStrategy({
|
|
19
15
|
headers: {
|
|
20
16
|
Cookie: authCookie,
|
|
@@ -23,7 +19,7 @@ class BaseVpalaceFactory {
|
|
|
23
19
|
timeoutInSeconds: 20,
|
|
24
20
|
url: `${this.url}?${params}`,
|
|
25
21
|
});
|
|
26
|
-
}
|
|
22
|
+
};
|
|
27
23
|
this.url = url;
|
|
28
24
|
}
|
|
29
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseVpalaceFactory.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/BaseVpalaceFactory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseVpalaceFactory.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/BaseVpalaceFactory.ts"],"names":[],"mappings":";;;AAAA,6IAA0I;AAG1I,MAAsB,kBAAkB;IAEpC,YAAY,GAAW;QAGb,0BAAqB,GAAG,KAAK,EACnC,YAAoB,EACpB,QAAgB,EAChB,MAAc,EACd,UAAkB,EACO,EAAE;YAC3B,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;gBAC/B,GAAG,CAAC,YAAY,KAAK,IAAI,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;gBAC5C,EAAE,EAAE,YAAY;gBAChB,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;gBAC7E,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;aACtE,CAAC,CAAC;YAEH,OAAO,IAAI,qDAAyB,CAAC;gBACjC,OAAO,EAAE;oBACL,MAAM,EAAE,UAAU;iBACrB;gBACD,MAAM,EAAE,KAAK;gBACb,gBAAgB,EAAE,EAAE;gBACpB,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,MAAM,EAAE;aAC/B,CAAC,CAAC;QACP,CAAC,CAAC;QAvBE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;CAuBJ;AA3BD,gDA2BC"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.VpalaceMeasurementDataSource = void 0;
|
|
25
16
|
const helpers_1 = require("../../helpers");
|
|
@@ -35,11 +26,9 @@ let VpalaceMeasurementDataSource = exports.VpalaceMeasurementDataSource = class
|
|
|
35
26
|
this.config = config;
|
|
36
27
|
this.resourceType = helpers_1.UnimonitorCemApiHelper.resourceType.Measurement;
|
|
37
28
|
}
|
|
38
|
-
getDataSource(from, to, authCookie) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.measurement.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.measurement.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.measurement.datasourceJsonSchema));
|
|
42
|
-
});
|
|
29
|
+
async getDataSource(from, to, authCookie) {
|
|
30
|
+
const sourceHTTPProtocolStrategy = await this.getConnectionSettings(this.resourceType, from, to, authCookie);
|
|
31
|
+
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.measurement.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.measurement.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.measurement.datasourceJsonSchema));
|
|
43
32
|
}
|
|
44
33
|
};
|
|
45
34
|
exports.VpalaceMeasurementDataSource = VpalaceMeasurementDataSource = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalaceMeasurementDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceMeasurementDataSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalaceMeasurementDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceMeasurementDataSource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqD;AACrD,sDAAwC;AAExC,wEAAqE;AACrE,8EAAyF;AACzF,mFAAkF;AAClF,iEAAwE;AACxE,6DAA0D;AAGnD,IAAM,4BAA4B,0CAAlC,MAAM,4BAA6B,SAAQ,uCAAkB;IAChE,YAA4C,MAA6B;QACrE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAS,uCAAuC,CAAC,CAAC,CAAC;QADxB,WAAM,GAAN,MAAM,CAAe;QAGxD,iBAAY,GAAG,gCAAsB,CAAC,YAAY,CAAC,WAAW,CAAC;IADhF,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,EAAU,EAAE,UAAkB;QACnE,MAAM,0BAA0B,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAE7G,OAAO,IAAI,+BAAU,CACjB,uBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,GAAG,YAAY,EACvD,0BAA0B,EAC1B,IAAI,yCAAoB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,EAC7C,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,GAAG,YAAY,EACvD,uBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,oBAAoB,CAC3D,CACJ,CAAC;IACN,CAAC;CACJ,CAAA;uCAlBY,4BAA4B;IADxC,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;;GADlC,4BAA4B,CAkBxC"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.VpalaceMeasuringEquipmentDataSource = void 0;
|
|
25
16
|
const helpers_1 = require("../../helpers");
|
|
@@ -35,11 +26,9 @@ let VpalaceMeasuringEquipmentDataSource = exports.VpalaceMeasuringEquipmentDataS
|
|
|
35
26
|
this.config = config;
|
|
36
27
|
this.resourceType = helpers_1.UnimonitorCemApiHelper.resourceType.MeasuringEquipment;
|
|
37
28
|
}
|
|
38
|
-
getDataSource(from, to, authCookie) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.measuringEquipment.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.measuringEquipment.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.measuringEquipment.datasourceJsonSchema));
|
|
42
|
-
});
|
|
29
|
+
async getDataSource(from, to, authCookie) {
|
|
30
|
+
const sourceHTTPProtocolStrategy = await this.getConnectionSettings(this.resourceType, from, to, authCookie);
|
|
31
|
+
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.measuringEquipment.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.measuringEquipment.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.measuringEquipment.datasourceJsonSchema));
|
|
43
32
|
}
|
|
44
33
|
};
|
|
45
34
|
exports.VpalaceMeasuringEquipmentDataSource = VpalaceMeasuringEquipmentDataSource = __decorate([
|
package/dist/integration-engine/datasources/vpalace/VpalaceMeasuringEquipmentDataSource.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalaceMeasuringEquipmentDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceMeasuringEquipmentDataSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalaceMeasuringEquipmentDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceMeasuringEquipmentDataSource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqD;AACrD,sDAAwC;AAExC,wEAAqE;AACrE,8EAAyF;AACzF,mFAAkF;AAClF,iEAAwE;AACxE,6DAA0D;AAGnD,IAAM,mCAAmC,iDAAzC,MAAM,mCAAoC,SAAQ,uCAAkB;IAEvE,YAA4C,MAA6B;QACrE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAS,uCAAuC,CAAC,CAAC,CAAC;QADxB,WAAM,GAAN,MAAM,CAAe;QADxD,iBAAY,GAAG,gCAAsB,CAAC,YAAY,CAAC,kBAAkB,CAAC;IAGvF,CAAC;IACM,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,EAAU,EAAE,UAAkB;QACnE,MAAM,0BAA0B,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAE7G,OAAO,IAAI,+BAAU,CACjB,uBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,GAAG,YAAY,EAC9D,0BAA0B,EAC1B,IAAI,yCAAoB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,EAC7C,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,GAAG,YAAY,EAC9D,uBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC,oBAAoB,CAClE,CACJ,CAAC;IACN,CAAC;CACJ,CAAA;8CAlBY,mCAAmC;IAD/C,IAAA,qBAAU,GAAE;IAGI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;;GAFlC,mCAAmC,CAkB/C"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.VpalaceMeterTypeDataSource = void 0;
|
|
25
16
|
const helpers_1 = require("../../helpers");
|
|
@@ -35,11 +26,9 @@ let VpalaceMeterTypeDataSource = exports.VpalaceMeterTypeDataSource = class Vpal
|
|
|
35
26
|
this.config = config;
|
|
36
27
|
this.resourceType = helpers_1.UnimonitorCemApiHelper.resourceType.MeterType;
|
|
37
28
|
}
|
|
38
|
-
getDataSource(from, to, authCookie) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.meterType.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.meterType.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.meterType.datasourceJsonSchema));
|
|
42
|
-
});
|
|
29
|
+
async getDataSource(from, to, authCookie) {
|
|
30
|
+
const sourceHTTPProtocolStrategy = await this.getConnectionSettings(this.resourceType, from, to, authCookie);
|
|
31
|
+
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.meterType.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.meterType.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.meterType.datasourceJsonSchema));
|
|
43
32
|
}
|
|
44
33
|
};
|
|
45
34
|
exports.VpalaceMeterTypeDataSource = VpalaceMeterTypeDataSource = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalaceMeterTypeDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceMeterTypeDataSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalaceMeterTypeDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceMeterTypeDataSource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqD;AACrD,sDAAwC;AAExC,wEAAqE;AACrE,8EAAyF;AACzF,mFAAkF;AAClF,iEAAwE;AACxE,6DAA0D;AAGnD,IAAM,0BAA0B,wCAAhC,MAAM,0BAA2B,SAAQ,uCAAkB;IAE9D,YAA4C,MAA6B;QACrE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAS,uCAAuC,CAAC,CAAC,CAAC;QADxB,WAAM,GAAN,MAAM,CAAe;QADxD,iBAAY,GAAG,gCAAsB,CAAC,YAAY,CAAC,SAAS,CAAC;IAG9E,CAAC;IACM,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,EAAU,EAAE,UAAkB;QACnE,MAAM,0BAA0B,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAE7G,OAAO,IAAI,+BAAU,CACjB,uBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,YAAY,EACrD,0BAA0B,EAC1B,IAAI,yCAAoB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,EAC7C,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,YAAY,EACrD,uBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CACzD,CACJ,CAAC;IACN,CAAC;CACJ,CAAA;qCAlBY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAGI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;;GAFlC,0BAA0B,CAkBtC"}
|
package/dist/integration-engine/datasources/vpalace/VpalaceTypeMeasuringEquipmentDataSource.js
CHANGED
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.VpalaceTypeMeasuringEquipmentDataSource = void 0;
|
|
25
16
|
const helpers_1 = require("../../helpers");
|
|
@@ -35,11 +26,9 @@ let VpalaceTypeMeasuringEquipmentDataSource = exports.VpalaceTypeMeasuringEquipm
|
|
|
35
26
|
this.config = config;
|
|
36
27
|
this.resourceType = helpers_1.UnimonitorCemApiHelper.resourceType.TypeMeasuringEquipment;
|
|
37
28
|
}
|
|
38
|
-
getDataSource(from, to, authCookie) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.typeMeasuringEquipment.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.typeMeasuringEquipment.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.typeMeasuringEquipment.datasourceJsonSchema));
|
|
42
|
-
});
|
|
29
|
+
async getDataSource(from, to, authCookie) {
|
|
30
|
+
const sourceHTTPProtocolStrategy = await this.getConnectionSettings(this.resourceType, from, to, authCookie);
|
|
31
|
+
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.typeMeasuringEquipment.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.typeMeasuringEquipment.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.typeMeasuringEquipment.datasourceJsonSchema));
|
|
43
32
|
}
|
|
44
33
|
};
|
|
45
34
|
exports.VpalaceTypeMeasuringEquipmentDataSource = VpalaceTypeMeasuringEquipmentDataSource = __decorate([
|
package/dist/integration-engine/datasources/vpalace/VpalaceTypeMeasuringEquipmentDataSource.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalaceTypeMeasuringEquipmentDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceTypeMeasuringEquipmentDataSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalaceTypeMeasuringEquipmentDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceTypeMeasuringEquipmentDataSource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqD;AACrD,sDAAwC;AAExC,wEAAqE;AACrE,8EAAyF;AACzF,mFAAkF;AAClF,iEAAwE;AACxE,6DAA0D;AAGnD,IAAM,uCAAuC,qDAA7C,MAAM,uCAAwC,SAAQ,uCAAkB;IAE3E,YAA4C,MAA6B;QACrE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAS,uCAAuC,CAAC,CAAC,CAAC;QADxB,WAAM,GAAN,MAAM,CAAe;QADxD,iBAAY,GAAG,gCAAsB,CAAC,YAAY,CAAC,sBAAsB,CAAC;IAG3F,CAAC;IACM,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,EAAU,EAAE,UAAkB;QACnE,MAAM,0BAA0B,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAE7G,OAAO,IAAI,+BAAU,CACjB,uBAAgB,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,GAAG,YAAY,EAClE,0BAA0B,EAC1B,IAAI,yCAAoB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,EAC7C,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,GAAG,YAAY,EAClE,uBAAgB,CAAC,MAAM,CAAC,sBAAsB,CAAC,oBAAoB,CACtE,CACJ,CAAC;IACN,CAAC;CACJ,CAAA;kDAlBY,uCAAuC;IADnD,IAAA,qBAAU,GAAE;IAGI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;;GAFlC,uCAAuC,CAkBnD"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.VpalaceUnitsDataSource = void 0;
|
|
25
16
|
const helpers_1 = require("../../helpers");
|
|
@@ -35,11 +26,9 @@ let VpalaceUnitsDataSource = exports.VpalaceUnitsDataSource = class VpalaceUnits
|
|
|
35
26
|
this.config = config;
|
|
36
27
|
this.resourceType = helpers_1.UnimonitorCemApiHelper.resourceType.Units;
|
|
37
28
|
}
|
|
38
|
-
getDataSource(from, to, authCookie) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.units.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.units.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.units.datasourceJsonSchema));
|
|
42
|
-
});
|
|
29
|
+
async getDataSource(from, to, authCookie) {
|
|
30
|
+
const sourceHTTPProtocolStrategy = await this.getConnectionSettings(this.resourceType, from, to, authCookie);
|
|
31
|
+
return new integration_engine_1.DataSource(_sch_1.EnergeticsSchema.vpalac.units.name + "DataSource", sourceHTTPProtocolStrategy, new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.units.name + "DataSource", _sch_1.EnergeticsSchema.vpalac.units.datasourceJsonSchema));
|
|
43
32
|
}
|
|
44
33
|
};
|
|
45
34
|
exports.VpalaceUnitsDataSource = VpalaceUnitsDataSource = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalaceUnitsDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceUnitsDataSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalaceUnitsDataSource.js","sourceRoot":"","sources":["../../../../src/integration-engine/datasources/vpalace/VpalaceUnitsDataSource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqD;AACrD,sDAAwC;AAExC,wEAAqE;AACrE,8EAAyF;AACzF,mFAAkF;AAClF,iEAAwE;AACxE,6DAA0D;AAGnD,IAAM,sBAAsB,oCAA5B,MAAM,sBAAuB,SAAQ,uCAAkB;IAE1D,YAA4C,MAA6B;QACrE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAS,uCAAuC,CAAC,CAAC,CAAC;QADxB,WAAM,GAAN,MAAM,CAAe;QADxD,iBAAY,GAAG,gCAAsB,CAAC,YAAY,CAAC,KAAK,CAAC;IAG1E,CAAC;IACM,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,EAAU,EAAE,UAAkB;QACnE,MAAM,0BAA0B,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAE7G,OAAO,IAAI,+BAAU,CACjB,uBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,YAAY,EACjD,0BAA0B,EAC1B,IAAI,yCAAoB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,EAC7C,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,YAAY,EACjD,uBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,CACrD,CACJ,CAAC;IACN,CAAC;CACJ,CAAA;iCAlBY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAGI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;;GAFlC,sBAAsB,CAkBlC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getUniqueBy = exports.toStringOrEmpty = void 0;
|
|
4
4
|
function toStringOrEmpty(input) {
|
|
5
|
-
return (input
|
|
5
|
+
return (input ?? "").toString();
|
|
6
6
|
}
|
|
7
7
|
exports.toStringOrEmpty = toStringOrEmpty;
|
|
8
8
|
function getUniqueBy(arr, prop) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParserHelpers.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/ParserHelpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,KAAU;IACtC,OAAO,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"ParserHelpers.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/ParserHelpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,KAAU;IACtC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;AACpC,CAAC;AAFD,0CAEC;AAED,SAAgB,WAAW,CAAkC,GAAQ,EAAE,IAAY;IAC/E,MAAM,GAAG,GAAG,IAAI,GAAG,EAAO,CAAC;IAC3B,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;AAHD,kCAGC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.UnimonitorCemApiHelper = void 0;
|
|
13
4
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
@@ -21,7 +12,7 @@ class UnimonitorCemApiHelper {
|
|
|
21
12
|
/**
|
|
22
13
|
* Create API session and return authorization cookie
|
|
23
14
|
*/
|
|
24
|
-
this.createSession = () =>
|
|
15
|
+
this.createSession = async () => {
|
|
25
16
|
try {
|
|
26
17
|
const { authcookiename, user, pass } = this.config;
|
|
27
18
|
const params = new URLSearchParams({
|
|
@@ -30,7 +21,7 @@ class UnimonitorCemApiHelper {
|
|
|
30
21
|
user,
|
|
31
22
|
});
|
|
32
23
|
const absoluteUrl = `${this.url}?${params}`;
|
|
33
|
-
const result =
|
|
24
|
+
const result = await fetch(absoluteUrl, {
|
|
34
25
|
method: "get",
|
|
35
26
|
signal: AbortSignal.timeout(10000),
|
|
36
27
|
});
|
|
@@ -40,18 +31,18 @@ class UnimonitorCemApiHelper {
|
|
|
40
31
|
catch (err) {
|
|
41
32
|
throw new golemio_errors_1.GeneralError("Cannot retrieve Unimonitor CEM API authorization token " + err.message, UnimonitorCemApiHelper.name, err);
|
|
42
33
|
}
|
|
43
|
-
}
|
|
34
|
+
};
|
|
44
35
|
/**
|
|
45
36
|
* Terminate current session/invalidate auth cookie
|
|
46
37
|
*/
|
|
47
|
-
this.terminateSession = (authCookie) =>
|
|
38
|
+
this.terminateSession = async (authCookie) => {
|
|
48
39
|
const url = this.url;
|
|
49
40
|
const params = new URLSearchParams({
|
|
50
41
|
id: UnimonitorCemApiHelper.resourceType.UserLogout,
|
|
51
42
|
});
|
|
52
43
|
const absoluteUrl = `${url}?${params}`;
|
|
53
44
|
try {
|
|
54
|
-
|
|
45
|
+
await fetch(absoluteUrl, {
|
|
55
46
|
headers: {
|
|
56
47
|
Cookie: authCookie,
|
|
57
48
|
},
|
|
@@ -62,7 +53,7 @@ class UnimonitorCemApiHelper {
|
|
|
62
53
|
catch (err) {
|
|
63
54
|
throw new golemio_errors_1.GeneralError("Cannot terminate Unimonitor CEM API session", UnimonitorCemApiHelper.name, err);
|
|
64
55
|
}
|
|
65
|
-
}
|
|
56
|
+
};
|
|
66
57
|
}
|
|
67
58
|
getAuthCookie(headers) {
|
|
68
59
|
// method getSetCookie is missing in types see https://developer.mozilla.org/en-US/docs/Web/API/Headers/getSetCookie
|
|
@@ -106,8 +97,7 @@ UnimonitorCemApiHelper.COOKIE_KV_SEPARATOR = "=";
|
|
|
106
97
|
* Process and filter auth cookie from the original cookie header
|
|
107
98
|
*/
|
|
108
99
|
UnimonitorCemApiHelper.processAndFilterAuthCookie = (cookieHeader, authCookieName) => {
|
|
109
|
-
|
|
110
|
-
const rawCookies = (_a = cookieHeader === null || cookieHeader === void 0 ? void 0 : cookieHeader.split(";")) !== null && _a !== void 0 ? _a : [];
|
|
100
|
+
const rawCookies = cookieHeader?.split(";") ?? [];
|
|
111
101
|
for (const rawCookie of rawCookies) {
|
|
112
102
|
const rawCookieArray = rawCookie.split(UnimonitorCemApiHelper.COOKIE_KV_SEPARATOR).map((prop) => prop.trim());
|
|
113
103
|
const [cookieName, cookieValue] = rawCookieArray;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnimonitorCemApiHelper.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/UnimonitorCemApiHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UnimonitorCemApiHelper.js","sourceRoot":"","sources":["../../../src/integration-engine/helpers/UnimonitorCemApiHelper.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AAOxE;;GAEG;AACH,MAAM,sBAAsB;IAKxB,YAAoB,GAAW,EAAU,MAAkB;QAAvC,QAAG,GAAH,GAAG,CAAQ;QAAU,WAAM,GAAN,MAAM,CAAY;QAC3D;;WAEG;QACI,kBAAa,GAAG,KAAK,IAAqB,EAAE;YAC/C,IAAI;gBACA,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;gBACnD,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;oBAC/B,EAAE,EAAE,sBAAsB,CAAC,YAAY,CAAC,SAAS;oBACjD,IAAI;oBACJ,IAAI;iBACP,CAAC,CAAC;gBAEH,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,MAAM,EAAE,CAAC;gBAE5C,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,WAAW,EAAE;oBACpC,MAAM,EAAE,KAAK;oBACb,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC;iBACrC,CAAC,CAAC;gBAEH,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAExD,OAAO,sBAAsB,CAAC,0BAA0B,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;aAC1F;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAClB,yDAAyD,GAAG,GAAG,CAAC,OAAO,EACvE,sBAAsB,CAAC,IAAI,EAC3B,GAAG,CACN,CAAC;aACL;QACL,CAAC,CAAC;QAEF;;WAEG;QACI,qBAAgB,GAAG,KAAK,EAAE,UAAkB,EAAiB,EAAE;YAClE,MAAM,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,YAAY,EAAE,CAAC;YACf,WAAW,EAAE,CAAC;SACR,CAAC;IACf,CAAC;;AAsBI,wDAAsB;AAvHb,sCAAe,GAAG,YAAY,AAAf,CAAgB,CAAC,kEAAkE;AAClG,kCAAW,GAAG,eAAe,AAAlB,CAAmB;AAC7B,0CAAmB,GAAG,GAAG,AAAN,CAAO;AAiGzC;;GAEG;AACY,iDAA0B,GAAG,CAAC,YAAgC,EAAE,cAAsB,EAAU,EAAE;IAC7G,MAAM,UAAU,GAAG,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAElD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAChC,MAAM,cAAc,GAAG,SAAS,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAE9G,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,cAAc,CAAC;QAEjD,IAAI,UAAU,KAAK,cAAc,IAAI,CAAC,CAAC,WAAW,EAAE;YAChD,OAAO,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;SAC1E;KACJ;IAED,OAAO,EAAE,CAAC;AACd,CAAC,AAdwC,CAcvC"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.AccessLimitationRepository = void 0;
|
|
25
16
|
const _sch_1 = require("../../../schema-definitions");
|
|
@@ -40,34 +31,31 @@ let AccessLimitationRepository = exports.AccessLimitationRepository = class Acce
|
|
|
40
31
|
}, new golemio_validator_1.JSONSchemaValidator("AccessLimitationRepositoryValidator", AccessLimitationModel_1.AccessLimitationModel.jsonSchema));
|
|
41
32
|
this.logger = logger;
|
|
42
33
|
}
|
|
43
|
-
updateData(data) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
updated_at: {
|
|
58
|
-
[sequelize_1.Op.lte]: dateBeforeUpdated,
|
|
59
|
-
},
|
|
34
|
+
async updateData(data) {
|
|
35
|
+
const dateBeforeUpdated = new Date();
|
|
36
|
+
const model = this["sequelizeModel"];
|
|
37
|
+
const transaction = await model.sequelize?.transaction();
|
|
38
|
+
if (!transaction) {
|
|
39
|
+
throw new golemio_errors_1.GeneralError("Unable to get transaction for updating access limitations.", this.constructor.name);
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
await this.validate(data);
|
|
43
|
+
await this.bulkSave(data, undefined, undefined, undefined, transaction);
|
|
44
|
+
await model.destroy({
|
|
45
|
+
where: {
|
|
46
|
+
updated_at: {
|
|
47
|
+
[sequelize_1.Op.lte]: dateBeforeUpdated,
|
|
60
48
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
49
|
+
},
|
|
50
|
+
transaction: transaction,
|
|
51
|
+
});
|
|
52
|
+
await transaction.commit();
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
this.logger.error("Error while updating access limitations", error);
|
|
56
|
+
await transaction.rollback();
|
|
57
|
+
}
|
|
58
|
+
return;
|
|
71
59
|
}
|
|
72
60
|
};
|
|
73
61
|
exports.AccessLimitationRepository = AccessLimitationRepository = __decorate([
|
package/dist/integration-engine/repositories/oict-energetika/AccessLimitationRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessLimitationRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/oict-energetika/AccessLimitationRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AccessLimitationRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/oict-energetika/AccessLimitationRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,oGAA0E;AAE1E,wEAAqE;AAGrE,8FAA2F;AAC3F,6EAAwE;AACxE,mFAAkF;AAClF,mEAAyD;AACzD,iEAAwE;AAGjE,IAAM,0BAA0B,wCAAhC,MAAM,0BAA2B,SAAQ,6BAAa;IACzD,YAA8C,MAAe;QACzD,KAAK,CACD,4BAA4B,EAC5B;YACI,WAAW,EAAE,6CAAqB,CAAC,UAAU;YAC7C,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,yBAAyB,EAAE,6CAAqB,CAAC,cAAc;YAC/D,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,qCAAqC,EAAE,6CAAqB,CAAC,UAAU,CAAC,CACnG,CAAC;QAVwC,WAAM,GAAN,MAAM,CAAS;IAW7D,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,IAAyB;QAC7C,MAAM,iBAAiB,GAAG,IAAI,IAAI,EAAE,CAAC;QACrC,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACrC,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC;QAEzD,IAAI,CAAC,WAAW,EAAE;YACd,MAAM,IAAI,6BAAY,CAAC,4DAA4D,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC/G;QAED,IAAI;YACA,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,IAAI,CAAC,QAAQ,CAAoB,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;YAC3F,MAAM,KAAK,CAAC,OAAO,CAAC;gBAChB,KAAK,EAAE;oBACH,UAAU,EAAE;wBACR,CAAC,cAAE,CAAC,GAAG,CAAC,EAAE,iBAAiB;qBAC9B;iBACJ;gBACD,WAAW,EAAE,WAAW;aAC3B,CAAC,CAAC;YACH,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;SAC9B;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,EAAE,KAAK,CAAC,CAAC;YACpE,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;SAChC;QAED,OAAO;IACX,CAAC;CACJ,CAAA;qCA1CY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GAD5B,0BAA0B,CA0CtC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.ConsumptionRepository = void 0;
|
|
13
4
|
const _sch_1 = require("../../../schema-definitions");
|
|
@@ -23,14 +14,14 @@ class ConsumptionRepository extends models_1.PostgresModel {
|
|
|
23
14
|
outputSequelizeAttributes: ConsumptionModel_1.ConsumptionModel.attributeModel,
|
|
24
15
|
savingType: "insertOrUpdate",
|
|
25
16
|
}, new golemio_validator_1.JSONSchemaValidator("ConsumptionRepositoryValidator", ConsumptionModel_1.ConsumptionModel.arrayJsonSchema));
|
|
26
|
-
this.saveData = (data) =>
|
|
17
|
+
this.saveData = async (data) => {
|
|
27
18
|
try {
|
|
28
|
-
return
|
|
19
|
+
return await this.sequelizeModel.bulkCreate(data, { ignoreDuplicates: true });
|
|
29
20
|
}
|
|
30
21
|
catch (err) {
|
|
31
22
|
throw new golemio_errors_1.GeneralError(`[${this.constructor.name}] Could not save data: ${err.message}`, this.constructor.name, err);
|
|
32
23
|
}
|
|
33
|
-
}
|
|
24
|
+
};
|
|
34
25
|
}
|
|
35
26
|
}
|
|
36
27
|
exports.ConsumptionRepository = ConsumptionRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsumptionRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/oict-energetika/ConsumptionRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConsumptionRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/oict-energetika/ConsumptionRepository.ts"],"names":[],"mappings":";;;AAAA,sDAAwC;AACxC,0FAAgE;AAChE,yEAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAElF,MAAa,qBAAsB,SAAQ,sBAAa;IACpD;QACI,KAAK,CACD,uBAAuB,EACvB;YACI,WAAW,EAAE,mCAAgB,CAAC,UAAU;YACxC,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,yBAAyB,EAAE,mCAAgB,CAAC,cAAc;YAC1D,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,gCAAgC,EAAE,mCAAgB,CAAC,eAAe,CAAC,CAC9F,CAAC;QAGC,aAAQ,GAAG,KAAK,EAAE,IAAwB,EAA+B,EAAE;YAC9E,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,UAAU,CAAmB,IAAI,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;aACnG;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,0BAA0B,GAAG,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACxH;QACL,CAAC,CAAC;IARF,CAAC;CASJ;AArBD,sDAqBC"}
|