@golemio/energetics 1.4.9-dev.1632898261 → 1.4.9-rc.1648124816
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/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.js +22 -33
- 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/package.json +4 -4
|
@@ -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,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;YAErB,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;gBAC/B,EAAE,EAAE,sBAAsB,CAAC,YAAY,CAAC,UAAU;aACrD,CAAC,CAAC;YAEH,MAAM,WAAW,GAAG,GAAG,GAAG,IAAI,MAAM,EAAE,CAAC;YAEvC,IAAI;gBACA,MAAM,KAAK,CAAC,WAAW,EAAE;oBACrB,OAAO,EAAE;wBACL,MAAM,EAAE,UAAU;qBACrB;oBACD,MAAM,EAAE,KAAK;oBACb,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC;iBACrC,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,6CAA6C,EAAE,sBAAsB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aAC3G;QACL,CAAC,CAAC;IAvD4D,CAAC;IAyDvD,aAAa,CAAC,OAAgB;QAClC,oHAAoH;QACpH,6EAA6E;QAC7E,MAAM,YAAY,GAAI,OAAe,CAAC,YAAY,EAAc,CAAC;QAEjE,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;YAC3B,MAAM,IAAI,6BAAY,CAAC,yDAAyD,EAAE,sBAAsB,CAAC,IAAI,CAAC,CAAC;SAClH;QAED,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,MAAM,KAAK,YAAY;QAC1B,OAAO;YACH,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,qBAAqB,EAAE,GAAG;YAC1B,WAAW,EAAE,IAAI;YACjB,kBAAkB,EAAE,GAAG;YACvB,SAAS,EAAE,IAAI;YACf,sBAAsB,EAAE,IAAI;YAC5B,KAAK,EAAE,GAAG;YACV,SAAS,EAAE,GAAG;YACd,UAAU,EAAE,GAAG;SACT,CAAC;IACf,CAAC;IAED,uCAAuC;IAChC,MAAM,KAAK,WAAW;QACzB,OAAO;YACH,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"}
|
|
@@ -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.VpalaceUnitsRepository = void 0;
|
|
25
16
|
const _sch_1 = require("../../../schema-definitions");
|
|
@@ -36,13 +27,13 @@ let VpalaceUnitsRepository = exports.VpalaceUnitsRepository = class VpalaceUnits
|
|
|
36
27
|
savingType: "insertOrUpdate",
|
|
37
28
|
}, new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.units.name + "ModelValidator", _sch_1.EnergeticsSchema.vpalac.units.outputJsonSchema));
|
|
38
29
|
this.databaseConnector = databaseConnector;
|
|
39
|
-
this.saveBulk = (data, t) =>
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
this.saveBulk = async (data, t) => {
|
|
31
|
+
await this.validate(data);
|
|
32
|
+
await this.sequelizeModel.bulkCreate(data, {
|
|
42
33
|
updateOnDuplicate: Object.keys(data[0]).concat("updated_at"),
|
|
43
34
|
transaction: t,
|
|
44
35
|
});
|
|
45
|
-
}
|
|
36
|
+
};
|
|
46
37
|
}
|
|
47
38
|
};
|
|
48
39
|
exports.VpalaceUnitsRepository = VpalaceUnitsRepository = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalacUnitsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalacUnitsRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalacUnitsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalacUnitsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,wEAAqE;AACrE,8EAAsE;AAEtE,mFAAkF;AAElF,iEAAwE;AAGjE,IAAM,sBAAsB,oCAA5B,MAAM,sBAAuB,SAAQ,kCAAa;IACrD,YAAiD,iBAA6C;QAC1F,KAAK,CACD,uBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,EAC5C;YACI,yBAAyB,EAAE,uBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB;YAClF,WAAW,EAAE,uBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW;YACtD,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,gBAAgB,EACrD,uBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CACjD,CACJ,CAAC;QAbmD,sBAAiB,GAAjB,iBAAiB,CAAoB;QAgBvF,aAAQ,GAAG,KAAK,EAAE,IAAS,EAAE,CAAc,EAAE,EAAE;YAClD,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE;gBACvC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;gBAC5D,WAAW,EAAE,CAAC;aACjB,CAAC,CAAC;QACP,CAAC,CAAC;IARF,CAAC;CASJ,CAAA;iCAxBY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;;GADvC,sBAAsB,CAwBlC"}
|
|
@@ -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.VpalaceMeasurementRepository = void 0;
|
|
25
16
|
const _sch_1 = require("../../../schema-definitions");
|
|
@@ -36,13 +27,13 @@ let VpalaceMeasurementRepository = exports.VpalaceMeasurementRepository = class
|
|
|
36
27
|
savingType: "insertOrUpdate",
|
|
37
28
|
}, new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.measurement.name + "ModelValidator", _sch_1.EnergeticsSchema.vpalac.measurement.outputJsonSchema));
|
|
38
29
|
this.databaseConnector = databaseConnector;
|
|
39
|
-
this.saveBulk = (data, t) =>
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
this.saveBulk = async (data, t) => {
|
|
31
|
+
await this.validate(data);
|
|
32
|
+
await this.sequelizeModel.bulkCreate(data, {
|
|
42
33
|
updateOnDuplicate: Object.keys(data[0]).concat("updated_at"),
|
|
43
34
|
transaction: t,
|
|
44
35
|
});
|
|
45
|
-
}
|
|
36
|
+
};
|
|
46
37
|
}
|
|
47
38
|
};
|
|
48
39
|
exports.VpalaceMeasurementRepository = VpalaceMeasurementRepository = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalaceMeasurementRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalaceMeasurementRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalaceMeasurementRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalaceMeasurementRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,wEAAqE;AACrE,8EAAsE;AAEtE,mFAAkF;AAElF,iEAAwE;AAGjE,IAAM,4BAA4B,0CAAlC,MAAM,4BAA6B,SAAQ,kCAAa;IAC3D,YAAiD,iBAA6C;QAC1F,KAAK,CACD,uBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,GAAG,OAAO,EAClD;YACI,yBAAyB,EAAE,uBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,yBAAyB;YACxF,WAAW,EAAE,uBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW;YAC5D,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,GAAG,gBAAgB,EAC3D,uBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB,CACvD,CACJ,CAAC;QAbmD,sBAAiB,GAAjB,iBAAiB,CAAoB;QAgBvF,aAAQ,GAAG,KAAK,EAAE,IAAS,EAAE,CAAc,EAAE,EAAE;YAClD,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE;gBACvC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;gBAC5D,WAAW,EAAE,CAAC;aACjB,CAAC,CAAC;QACP,CAAC,CAAC;IARF,CAAC;CASJ,CAAA;uCAxBY,4BAA4B;IADxC,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;;GADvC,4BAA4B,CAwBxC"}
|
|
@@ -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.VpalaceMeasuringEquipmentRepository = void 0;
|
|
25
16
|
const _sch_1 = require("../../../schema-definitions");
|
|
@@ -36,13 +27,13 @@ let VpalaceMeasuringEquipmentRepository = exports.VpalaceMeasuringEquipmentRepos
|
|
|
36
27
|
savingType: "insertOrUpdate",
|
|
37
28
|
}, new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.measuringEquipment.name + "ModelValidator", _sch_1.EnergeticsSchema.vpalac.measuringEquipment.outputJsonSchema));
|
|
38
29
|
this.databaseConnector = databaseConnector;
|
|
39
|
-
this.saveBulk = (data, t) =>
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
this.saveBulk = async (data, t) => {
|
|
31
|
+
await this.validate(data);
|
|
32
|
+
await this.sequelizeModel.bulkCreate(data, {
|
|
42
33
|
updateOnDuplicate: Object.keys(data[0]).concat("updated_at"),
|
|
43
34
|
transaction: t,
|
|
44
35
|
});
|
|
45
|
-
}
|
|
36
|
+
};
|
|
46
37
|
}
|
|
47
38
|
};
|
|
48
39
|
exports.VpalaceMeasuringEquipmentRepository = VpalaceMeasuringEquipmentRepository = __decorate([
|
package/dist/integration-engine/repositories/vpalace/VpalaceMeasuringEquipmentRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalaceMeasuringEquipmentRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalaceMeasuringEquipmentRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalaceMeasuringEquipmentRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalaceMeasuringEquipmentRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,wEAAqE;AACrE,8EAAsE;AAEtE,mFAAkF;AAElF,iEAAwE;AAGjE,IAAM,mCAAmC,iDAAzC,MAAM,mCAAoC,SAAQ,kCAAa;IAClE,YAAiD,iBAA6C;QAC1F,KAAK,CACD,uBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,GAAG,OAAO,EACzD;YACI,yBAAyB,EAAE,uBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC,yBAAyB;YAC/F,WAAW,EAAE,uBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC,WAAW;YACnE,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,GAAG,gBAAgB,EAClE,uBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAC9D,CACJ,CAAC;QAbmD,sBAAiB,GAAjB,iBAAiB,CAAoB;QAgBvF,aAAQ,GAAG,KAAK,EAAE,IAAS,EAAE,CAAc,EAAE,EAAE;YAClD,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE;gBACvC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;gBAC5D,WAAW,EAAE,CAAC;aACjB,CAAC,CAAC;QACP,CAAC,CAAC;IARF,CAAC;CASJ,CAAA;8CAxBY,mCAAmC;IAD/C,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;;GADvC,mCAAmC,CAwB/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.VpalaceMeterTypeRepository = void 0;
|
|
25
16
|
const _sch_1 = require("../../../schema-definitions");
|
|
@@ -36,13 +27,13 @@ let VpalaceMeterTypeRepository = exports.VpalaceMeterTypeRepository = class Vpal
|
|
|
36
27
|
savingType: "insertOrUpdate",
|
|
37
28
|
}, new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.meterType.name + "ModelValidator", _sch_1.EnergeticsSchema.vpalac.meterType.outputJsonSchema));
|
|
38
29
|
this.databaseConnector = databaseConnector;
|
|
39
|
-
this.saveBulk = (data, t) =>
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
this.saveBulk = async (data, t) => {
|
|
31
|
+
await this.validate(data);
|
|
32
|
+
await this.sequelizeModel.bulkCreate(data, {
|
|
42
33
|
updateOnDuplicate: Object.keys(data[0]).concat("updated_at"),
|
|
43
34
|
transaction: t,
|
|
44
35
|
});
|
|
45
|
-
}
|
|
36
|
+
};
|
|
46
37
|
}
|
|
47
38
|
};
|
|
48
39
|
exports.VpalaceMeterTypeRepository = VpalaceMeterTypeRepository = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalaceMeterTypeRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalaceMeterTypeRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalaceMeterTypeRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalaceMeterTypeRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,wEAAqE;AACrE,8EAAsE;AAEtE,mFAAkF;AAElF,iEAAwE;AAGjE,IAAM,0BAA0B,wCAAhC,MAAM,0BAA2B,SAAQ,kCAAa;IACzD,YAAiD,iBAA6C;QAC1F,KAAK,CACD,uBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,OAAO,EAChD;YACI,yBAAyB,EAAE,uBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,yBAAyB;YACtF,WAAW,EAAE,uBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW;YAC1D,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,gBAAgB,EACzD,uBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,gBAAgB,CACrD,CACJ,CAAC;QAbmD,sBAAiB,GAAjB,iBAAiB,CAAoB;QAgBvF,aAAQ,GAAG,KAAK,EAAE,IAAS,EAAE,CAAc,EAAE,EAAE;YAClD,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE;gBACvC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;gBAC5D,WAAW,EAAE,CAAC;aACjB,CAAC,CAAC;QACP,CAAC,CAAC;IARF,CAAC;CASJ,CAAA;qCAxBY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;;GADvC,0BAA0B,CAwBtC"}
|
package/dist/integration-engine/repositories/vpalace/VpalaceTypeMeasuringEquipmentRepository.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.VpalaceTypeMeasuringEquipmentRepository = void 0;
|
|
25
16
|
const _sch_1 = require("../../../schema-definitions");
|
|
@@ -36,13 +27,13 @@ let VpalaceTypeMeasuringEquipmentRepository = exports.VpalaceTypeMeasuringEquipm
|
|
|
36
27
|
savingType: "insertOrUpdate",
|
|
37
28
|
}, new golemio_validator_1.JSONSchemaValidator(_sch_1.EnergeticsSchema.vpalac.typeMeasuringEquipment.name + "ModelValidator", _sch_1.EnergeticsSchema.vpalac.typeMeasuringEquipment.outputJsonSchema));
|
|
38
29
|
this.databaseConnector = databaseConnector;
|
|
39
|
-
this.saveBulk = (data, t) =>
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
this.saveBulk = async (data, t) => {
|
|
31
|
+
await this.validate(data);
|
|
32
|
+
await this.sequelizeModel.bulkCreate(data, {
|
|
42
33
|
updateOnDuplicate: Object.keys(data[0]).concat("updated_at"),
|
|
43
34
|
transaction: t,
|
|
44
35
|
});
|
|
45
|
-
}
|
|
36
|
+
};
|
|
46
37
|
}
|
|
47
38
|
};
|
|
48
39
|
exports.VpalaceTypeMeasuringEquipmentRepository = VpalaceTypeMeasuringEquipmentRepository = __decorate([
|
package/dist/integration-engine/repositories/vpalace/VpalaceTypeMeasuringEquipmentRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalaceTypeMeasuringEquipmentRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalaceTypeMeasuringEquipmentRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VpalaceTypeMeasuringEquipmentRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/repositories/vpalace/VpalaceTypeMeasuringEquipmentRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,wEAAqE;AACrE,8EAAsE;AAEtE,mFAAkF;AAElF,iEAAwE;AAGjE,IAAM,uCAAuC,qDAA7C,MAAM,uCAAwC,SAAQ,kCAAa;IACtE,YAAiD,iBAA6C;QAC1F,KAAK,CACD,uBAAgB,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,GAAG,OAAO,EAC7D;YACI,yBAAyB,EAAE,uBAAgB,CAAC,MAAM,CAAC,sBAAsB,CAAC,yBAAyB;YACnG,WAAW,EAAE,uBAAgB,CAAC,MAAM,CAAC,sBAAsB,CAAC,WAAW;YACvE,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CACnB,uBAAgB,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,GAAG,gBAAgB,EACtE,uBAAgB,CAAC,MAAM,CAAC,sBAAsB,CAAC,gBAAgB,CAClE,CACJ,CAAC;QAbmD,sBAAiB,GAAjB,iBAAiB,CAAoB;QAgBvF,aAAQ,GAAG,KAAK,EAAE,IAAS,EAAE,CAAc,EAAE,EAAE;YAClD,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE;gBACvC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;gBAC5D,WAAW,EAAE,CAAC;aACjB,CAAC,CAAC;QACP,CAAC,CAAC;IARF,CAAC;CASJ,CAAA;kDAxBY,uCAAuC;IADnD,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;;GADvC,uCAAuC,CAwBnD"}
|
|
@@ -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.FetchAccessConfigurationTask = void 0;
|
|
13
4
|
const Di_1 = require("../../commodity-providers/ioc/Di");
|
|
@@ -21,11 +12,9 @@ class FetchAccessConfigurationTask extends AbstractEmptyTask_1.AbstractEmptyTask
|
|
|
21
12
|
this.accessConfigurationDataSource = Di_1.CommodityContainer.resolve(WorkerContainerToken_1.WorkerContainerToken.AccessConfigurationDataSource);
|
|
22
13
|
this.accessRepository = Di_1.CommodityContainer.resolve(WorkerContainerToken_1.WorkerContainerToken.AccessLimitationRepository);
|
|
23
14
|
}
|
|
24
|
-
execute() {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
yield this.accessRepository.updateData(results);
|
|
28
|
-
});
|
|
15
|
+
async execute() {
|
|
16
|
+
const results = await this.accessConfigurationDataSource.getDataSource().getAll();
|
|
17
|
+
await this.accessRepository.updateData(results);
|
|
29
18
|
}
|
|
30
19
|
}
|
|
31
20
|
exports.FetchAccessConfigurationTask = FetchAccessConfigurationTask;
|