@golemio/energetics 1.4.12 → 1.4.13-dev.1899264140
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/example/00_clear_test_data.sql +2 -1
- package/db/migrations/postgresql/20250213141826-add-device-serial-id.js +53 -0
- package/db/migrations/postgresql/20250626130910-enapo-measurements.js +53 -0
- package/db/migrations/postgresql/sqls/20250213141826-add-device-serial-id-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20250213141826-add-device-serial-id-up.sql +1 -0
- package/db/migrations/postgresql/sqls/20250626130910-enapo-measurements-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20250626130910-enapo-measurements-up.sql +12 -0
- package/dist/integration-engine/commodity-providers/datasources/ppas-ave-api/PpasAveApiDataSourceProvider.d.ts +1 -0
- package/dist/integration-engine/commodity-providers/datasources/ppas-ave-api/PpasAveApiDataSourceProvider.js +2 -0
- package/dist/integration-engine/commodity-providers/datasources/ppas-ave-api/PpasAveApiDataSourceProvider.js.map +1 -1
- package/dist/integration-engine/commodity-providers/datasources/ppas-ave-api/helpers/PpasAveApiHelper.d.ts +1 -0
- package/dist/integration-engine/commodity-providers/datasources/ppas-ave-api/helpers/PpasAveApiHelper.js.map +1 -1
- package/dist/integration-engine/commodity-providers/helper/MeasurementsDataNormalizer.d.ts +2 -1
- package/dist/integration-engine/commodity-providers/helper/MeasurementsDataNormalizer.js.map +1 -1
- package/dist/integration-engine/commodity-providers/ioc/WorkerContainerToken.js.map +1 -1
- package/dist/integration-engine/commodity-providers/transformations/AveMeasurementTransformation.d.ts +3 -2
- package/dist/integration-engine/commodity-providers/transformations/AveMeasurementTransformation.js +2 -1
- package/dist/integration-engine/commodity-providers/transformations/AveMeasurementTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/transformations/CemMeasurementTransformation.d.ts +2 -0
- package/dist/integration-engine/commodity-providers/transformations/CemMeasurementTransformation.js +1 -0
- package/dist/integration-engine/commodity-providers/transformations/CemMeasurementTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/transformations/PreElectroTransformation.js +1 -0
- package/dist/integration-engine/commodity-providers/transformations/PreElectroTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/transformations/PreMeasurementTransformation.js +1 -0
- package/dist/integration-engine/commodity-providers/transformations/PreMeasurementTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/transformations/PtasWebMeasurementTransformation.js +1 -0
- package/dist/integration-engine/commodity-providers/transformations/PtasWebMeasurementTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/AbstractFetchMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasEEMeasurementsTask.js +2 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasEEMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasMeasurementsTask.js +2 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPreMeasurementDataTask.js +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPreMeasurementDataTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.js +3 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/enapo/constants.d.ts +1 -0
- package/dist/integration-engine/enapo/constants.js +5 -0
- package/dist/integration-engine/enapo/constants.js.map +1 -0
- package/dist/integration-engine/enapo/helpers/IntervalGenerator.d.ts +6 -0
- package/dist/integration-engine/enapo/helpers/IntervalGenerator.js +20 -0
- package/dist/integration-engine/enapo/helpers/IntervalGenerator.js.map +1 -0
- package/dist/integration-engine/enapo/interfaces/IPPasMeasurementData.d.ts +28 -0
- package/dist/integration-engine/enapo/interfaces/IPPasMeasurementData.js +3 -0
- package/dist/integration-engine/enapo/interfaces/IPPasMeasurementData.js.map +1 -0
- package/dist/integration-engine/enapo/interfaces/IPPasPlaces.d.ts +48 -0
- package/dist/integration-engine/enapo/interfaces/IPPasPlaces.js +3 -0
- package/dist/integration-engine/enapo/interfaces/IPPasPlaces.js.map +1 -0
- package/dist/integration-engine/enapo/ioc/Di.d.ts +3 -0
- package/dist/integration-engine/enapo/ioc/Di.js +30 -0
- package/dist/integration-engine/enapo/ioc/Di.js.map +1 -0
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.d.ts +7 -0
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js +19 -0
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js.map +1 -0
- package/dist/integration-engine/enapo/repositories/EnapoMeasurementsRepository.d.ts +5 -0
- package/dist/integration-engine/enapo/repositories/EnapoMeasurementsRepository.js +32 -0
- package/dist/integration-engine/enapo/repositories/EnapoMeasurementsRepository.js.map +1 -0
- package/dist/integration-engine/enapo/transformations/PPasMeasurementTransformation.d.ts +14 -0
- package/dist/integration-engine/enapo/transformations/PPasMeasurementTransformation.js +48 -0
- package/dist/integration-engine/enapo/transformations/PPasMeasurementTransformation.js.map +1 -0
- package/dist/integration-engine/enapo/workers/EnapoWorker.d.ts +7 -0
- package/dist/integration-engine/enapo/workers/EnapoWorker.js +21 -0
- package/dist/integration-engine/enapo/workers/EnapoWorker.js.map +1 -0
- package/dist/integration-engine/enapo/workers/interfaces/IEnapoPpasTaskMeasurementParams.d.ts +7 -0
- package/dist/integration-engine/enapo/workers/interfaces/IEnapoPpasTaskMeasurementParams.js +3 -0
- package/dist/integration-engine/enapo/workers/interfaces/IEnapoPpasTaskMeasurementParams.js.map +1 -0
- package/dist/integration-engine/enapo/workers/schema/EnapoPpasMeasurementsParamsValidationSchema.d.ts +8 -0
- package/dist/integration-engine/enapo/workers/schema/EnapoPpasMeasurementsParamsValidationSchema.js +43 -0
- package/dist/integration-engine/enapo/workers/schema/EnapoPpasMeasurementsParamsValidationSchema.js.map +1 -0
- package/dist/integration-engine/enapo/workers/task/AbstractEnapoFetchMeasurementsTask.d.ts +8 -0
- package/dist/integration-engine/enapo/workers/task/AbstractEnapoFetchMeasurementsTask.js +33 -0
- package/dist/integration-engine/enapo/workers/task/AbstractEnapoFetchMeasurementsTask.js.map +1 -0
- package/dist/integration-engine/enapo/workers/task/EnapoPpasTask.d.ts +29 -0
- package/dist/integration-engine/enapo/workers/task/EnapoPpasTask.js +116 -0
- package/dist/integration-engine/enapo/workers/task/EnapoPpasTask.js.map +1 -0
- package/dist/integration-engine/index.js +7 -1
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/schema-definitions/datasources/StaticMeterSettingsJsonSchema.js +4 -3
- package/dist/schema-definitions/datasources/StaticMeterSettingsJsonSchema.js.map +1 -1
- package/dist/schema-definitions/datasources/interfaces/IStaticMeterSettings.d.ts +3 -2
- package/dist/schema-definitions/models/EnapoMeasurementsModel.d.ts +17 -0
- package/dist/schema-definitions/models/EnapoMeasurementsModel.js +61 -0
- package/dist/schema-definitions/models/EnapoMeasurementsModel.js.map +1 -0
- package/dist/schema-definitions/models/MeasurementsModel.d.ts +1 -0
- package/dist/schema-definitions/models/MeasurementsModel.js +15 -1
- package/dist/schema-definitions/models/MeasurementsModel.js.map +1 -1
- package/dist/schema-definitions/models/interfaces/IEnapoMeasurmentsDto.d.ts +9 -0
- package/dist/schema-definitions/models/interfaces/IEnapoMeasurmentsDto.js +3 -0
- package/dist/schema-definitions/models/interfaces/IEnapoMeasurmentsDto.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IMeasurementDto.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface IPPasPlaces {
|
|
2
|
+
Id: number;
|
|
3
|
+
Eic: string;
|
|
4
|
+
CustomerName: string;
|
|
5
|
+
PlaceName: string;
|
|
6
|
+
PayerName: string;
|
|
7
|
+
PayerId: string;
|
|
8
|
+
CustomerId: string;
|
|
9
|
+
PlaceId: string;
|
|
10
|
+
DeviceLocation: string;
|
|
11
|
+
Terminated: boolean;
|
|
12
|
+
Region: string;
|
|
13
|
+
RegionId: number;
|
|
14
|
+
ConnectionMethod: string;
|
|
15
|
+
PurchaseCategory: string;
|
|
16
|
+
ConvertCoefficient: number;
|
|
17
|
+
DeviceType: string;
|
|
18
|
+
IdentificationNumber: string;
|
|
19
|
+
LastData: string;
|
|
20
|
+
DeviceSerialNumber: string;
|
|
21
|
+
PlaceStreet: string;
|
|
22
|
+
PayerStreet: string;
|
|
23
|
+
PlaceCity: string;
|
|
24
|
+
PayerCity: string;
|
|
25
|
+
PlaceZipCode: string;
|
|
26
|
+
PayerZipCode: string;
|
|
27
|
+
Dealer: string;
|
|
28
|
+
ReadingCategory: string;
|
|
29
|
+
ValidatedBy: string;
|
|
30
|
+
ValidatedTill: string;
|
|
31
|
+
IsDataValidated: boolean;
|
|
32
|
+
ValidationNote: string;
|
|
33
|
+
Gps: string;
|
|
34
|
+
Device: number;
|
|
35
|
+
ReadRequestStatus: number;
|
|
36
|
+
ReadDescription: string;
|
|
37
|
+
Note: string;
|
|
38
|
+
Group: string;
|
|
39
|
+
Workplace: string;
|
|
40
|
+
HasTimeWindows: boolean;
|
|
41
|
+
HasBattery: boolean;
|
|
42
|
+
HasGasComposition: boolean;
|
|
43
|
+
BatteryCapacity: number;
|
|
44
|
+
BatteryVoltage: number;
|
|
45
|
+
DailyData: boolean;
|
|
46
|
+
ScadaId: string;
|
|
47
|
+
ParentDevice: string;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPPasPlaces.js","sourceRoot":"","sources":["../../../../src/integration-engine/enapo/interfaces/IPPasPlaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnapoContainer = void 0;
|
|
4
|
+
const Di_1 = require("@golemio/core/dist/integration-engine/ioc/Di");
|
|
5
|
+
const EnapoMeasurementsRepository_1 = require("../repositories/EnapoMeasurementsRepository");
|
|
6
|
+
const PPasMeasurementTransformation_1 = require("../transformations/PPasMeasurementTransformation");
|
|
7
|
+
const EnapoPpasTask_1 = require("../workers/task/EnapoPpasTask");
|
|
8
|
+
const EnapoWorkerContainerToken_1 = require("./EnapoWorkerContainerToken");
|
|
9
|
+
const CommodityProviderDataSourceFactory_1 = require("../../commodity-providers/datasources/CommodityProviderDataSourceFactory");
|
|
10
|
+
const PpasAveApiDataSourceProvider_1 = require("../../commodity-providers/datasources/ppas-ave-api/PpasAveApiDataSourceProvider");
|
|
11
|
+
const CemApiDataSourceProvider_1 = require("../../commodity-providers/datasources/cem-api/CemApiDataSourceProvider");
|
|
12
|
+
const WorkerContainerToken_1 = require("../../commodity-providers/ioc/WorkerContainerToken");
|
|
13
|
+
//#region Initialization
|
|
14
|
+
const EnapoContainer = Di_1.IntegrationEngineContainer.createChildContainer();
|
|
15
|
+
exports.EnapoContainer = EnapoContainer;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region Datasource
|
|
18
|
+
EnapoContainer.register(WorkerContainerToken_1.WorkerContainerToken.CemApiDataSourceProvider, CemApiDataSourceProvider_1.CemApiDataSourceProvider);
|
|
19
|
+
EnapoContainer.register(WorkerContainerToken_1.WorkerContainerToken.PpasAveApiDataSourceProvider, PpasAveApiDataSourceProvider_1.PpasAveApiDataSourceProvider);
|
|
20
|
+
EnapoContainer.register(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.CommodityProviderDataSourceFactory, CommodityProviderDataSourceFactory_1.CommodityProviderDataSourceFactory);
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region Repositories
|
|
23
|
+
EnapoContainer.register(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnapoMeasurementsRepository, EnapoMeasurementsRepository_1.EnapoMeasurementsRepository);
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region Transformation
|
|
26
|
+
EnapoContainer.registerSingleton(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.PPasMeasurementTransformation, PPasMeasurementTransformation_1.PPasMeasurementTransformation);
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region Tasks
|
|
29
|
+
EnapoContainer.register(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnapoPpasTask, EnapoPpasTask_1.EnapoPpasTask);
|
|
30
|
+
//# sourceMappingURL=Di.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/enapo/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qEAA0F;AAE1F,6FAA0F;AAC1F,oGAAiG;AACjG,iEAA8D;AAC9D,2EAAwE;AACxE,iIAA4H;AAC5H,kIAA6H;AAC7H,qHAAgH;AAChH,6FAAwF;AAExF,wBAAwB;AACxB,MAAM,cAAc,GAAwB,+BAA0B,CAAC,oBAAoB,EAAE,CAAC;AAuBrF,wCAAc;AAtBvB,YAAY;AAEZ,oBAAoB;AACpB,cAAc,CAAC,QAAQ,CAAC,2CAAoB,CAAC,wBAAwB,EAAE,mDAAwB,CAAC,CAAC;AACjG,cAAc,CAAC,QAAQ,CAAC,2CAAoB,CAAC,4BAA4B,EAAE,2DAA4B,CAAC,CAAC;AACzG,cAAc,CAAC,QAAQ,CAAC,qDAAyB,CAAC,kCAAkC,EAAE,uEAAkC,CAAC,CAAC;AAC1H,YAAY;AAEZ,sBAAsB;AACtB,cAAc,CAAC,QAAQ,CAAC,qDAAyB,CAAC,2BAA2B,EAAE,yDAA2B,CAAC,CAAC;AAC5G,YAAY;AAEZ,wBAAwB;AACxB,cAAc,CAAC,iBAAiB,CAAC,qDAAyB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC,CAAC;AACzH,YAAY;AAEZ,eAAe;AACf,cAAc,CAAC,QAAQ,CAAC,qDAAyB,CAAC,aAAa,EAAE,6BAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnapoWorkerContainerToken = void 0;
|
|
4
|
+
const EnapoWorkerContainerToken = {
|
|
5
|
+
//#region Datasource
|
|
6
|
+
CommodityProviderDataSourceFactory: Symbol(),
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region Repositories
|
|
9
|
+
EnapoMeasurementsRepository: Symbol(),
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region Transformations
|
|
12
|
+
PPasMeasurementTransformation: Symbol(),
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region Tasks
|
|
15
|
+
EnapoPpasTask: Symbol(),
|
|
16
|
+
//#endregion
|
|
17
|
+
};
|
|
18
|
+
exports.EnapoWorkerContainerToken = EnapoWorkerContainerToken;
|
|
19
|
+
//# sourceMappingURL=EnapoWorkerContainerToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnapoWorkerContainerToken.js","sourceRoot":"","sources":["../../../../src/integration-engine/enapo/ioc/EnapoWorkerContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,yBAAyB,GAAG;IAC9B,oBAAoB;IACpB,kCAAkC,EAAE,MAAM,EAAE;IAC5C,YAAY;IAEZ,sBAAsB;IACtB,2BAA2B,EAAE,MAAM,EAAE;IACrC,YAAY;IACZ,yBAAyB;IACzB,6BAA6B,EAAE,MAAM,EAAE;IACvC,YAAY;IACZ,eAAe;IACf,aAAa,EAAE,MAAM,EAAE;IACvB,YAAY;CACf,CAAC;AAEO,8DAAyB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IModel } from "@golemio/core/dist/integration-engine/models/IModel";
|
|
2
|
+
import { PostgresModel } from "@golemio/core/dist/integration-engine/models/PostgresModel";
|
|
3
|
+
export declare class EnapoMeasurementsRepository extends PostgresModel implements IModel {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EnapoMeasurementsRepository = void 0;
|
|
13
|
+
const _sch_1 = require("../../../schema-definitions");
|
|
14
|
+
const EnapoMeasurementsModel_1 = require("../../../schema-definitions/models/EnapoMeasurementsModel");
|
|
15
|
+
const PostgresModel_1 = require("@golemio/core/dist/integration-engine/models/PostgresModel");
|
|
16
|
+
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
17
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
18
|
+
let EnapoMeasurementsRepository = exports.EnapoMeasurementsRepository = class EnapoMeasurementsRepository extends PostgresModel_1.PostgresModel {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(EnapoMeasurementsModel_1.EnapoMeasurementsModel.REPOSITORY_NAME, {
|
|
21
|
+
pgTableName: EnapoMeasurementsModel_1.EnapoMeasurementsModel.TABLE_NAME,
|
|
22
|
+
pgSchema: _sch_1.EnergeticsSchema.pgSchema,
|
|
23
|
+
outputSequelizeAttributes: EnapoMeasurementsModel_1.EnapoMeasurementsModel.attributeModel,
|
|
24
|
+
savingType: "insertOrUpdate",
|
|
25
|
+
}, new golemio_validator_1.JSONSchemaValidator(EnapoMeasurementsModel_1.EnapoMeasurementsModel.JSON_SCHEMA_VALIDATOR_NAME, EnapoMeasurementsModel_1.EnapoMeasurementsModel.jsonSchema));
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.EnapoMeasurementsRepository = EnapoMeasurementsRepository = __decorate([
|
|
29
|
+
(0, tsyringe_1.injectable)(),
|
|
30
|
+
__metadata("design:paramtypes", [])
|
|
31
|
+
], EnapoMeasurementsRepository);
|
|
32
|
+
//# sourceMappingURL=EnapoMeasurementsRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnapoMeasurementsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/enapo/repositories/EnapoMeasurementsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAwC;AACxC,sGAA4E;AAE5E,8FAA2F;AAC3F,mFAAkF;AAClF,iEAAgE;AAGzD,IAAM,2BAA2B,yCAAjC,MAAM,2BAA4B,SAAQ,6BAAa;IAC1D;QACI,KAAK,CACD,+CAAsB,CAAC,eAAe,EACtC;YACI,WAAW,EAAE,+CAAsB,CAAC,UAAU;YAC9C,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,yBAAyB,EAAE,+CAAsB,CAAC,cAAc;YAChE,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,+CAAsB,CAAC,0BAA0B,EAAE,+CAAsB,CAAC,UAAU,CAAC,CAChH,CAAC;IACN,CAAC;CACJ,CAAA;sCAbY,2BAA2B;IADvC,IAAA,qBAAU,GAAE;;GACA,2BAA2B,CAavC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IAveApiDeviceDataDto } from "../../../schema-definitions/datasources/commodity-providers/interfaces/IAveApiDeviceDataDto";
|
|
2
|
+
import { IEnapoMeasurementsDto } from "../../../schema-definitions/models/interfaces/IEnapoMeasurmentsDto";
|
|
3
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
4
|
+
import { IPPasPlaces } from "../interfaces/IPPasPlaces";
|
|
5
|
+
export declare class PPasMeasurementTransformation extends AbstractTransformation<IAveApiDeviceDataDto & IPPasPlaces, {
|
|
6
|
+
operatingAmount: IEnapoMeasurementsDto;
|
|
7
|
+
convertDifference: IEnapoMeasurementsDto;
|
|
8
|
+
}> {
|
|
9
|
+
name: string;
|
|
10
|
+
protected transformInternal: (data: IAveApiDeviceDataDto & IPPasPlaces) => {
|
|
11
|
+
operatingAmount: IEnapoMeasurementsDto;
|
|
12
|
+
convertDifference: IEnapoMeasurementsDto;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PPasMeasurementTransformation = void 0;
|
|
10
|
+
const CommodityProviderEnum_1 = require("../../commodity-providers/datasources/helpers/CommodityProviderEnum");
|
|
11
|
+
const PpasAveApiHelper_1 = require("../../commodity-providers/datasources/ppas-ave-api/helpers/PpasAveApiHelper");
|
|
12
|
+
const MeasurementVariableEnum_1 = require("../../../schema-definitions/datasources/helpers/MeasurementVariableEnum");
|
|
13
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
14
|
+
const luxon_1 = require("@golemio/core/dist/shared/luxon");
|
|
15
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
16
|
+
let PPasMeasurementTransformation = exports.PPasMeasurementTransformation = class PPasMeasurementTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.name = "PPasMeasurementTransformation";
|
|
20
|
+
this.transformInternal = (data) => {
|
|
21
|
+
const baseData = {
|
|
22
|
+
eic: data.Eic,
|
|
23
|
+
timestamp: luxon_1.DateTime.fromISO(data.StandardTime, {
|
|
24
|
+
zone: PpasAveApiHelper_1.PpasAveApiHelper.API_DATE_TZ,
|
|
25
|
+
}).toJSDate(),
|
|
26
|
+
source: CommodityProviderEnum_1.CommodityProvider.PpasInternetAveApi,
|
|
27
|
+
place_id: data.PlaceId,
|
|
28
|
+
device_serial_number: data.DeviceSerialNumber,
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
operatingAmount: {
|
|
32
|
+
value: data.OperatingAmount,
|
|
33
|
+
var: MeasurementVariableEnum_1.MeasurementVariable.Core,
|
|
34
|
+
...baseData,
|
|
35
|
+
},
|
|
36
|
+
convertDifference: {
|
|
37
|
+
value: data.ConvertDifference,
|
|
38
|
+
var: MeasurementVariableEnum_1.MeasurementVariable.Core2,
|
|
39
|
+
...baseData,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.PPasMeasurementTransformation = PPasMeasurementTransformation = __decorate([
|
|
46
|
+
(0, tsyringe_1.injectable)()
|
|
47
|
+
], PPasMeasurementTransformation);
|
|
48
|
+
//# sourceMappingURL=PPasMeasurementTransformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PPasMeasurementTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/enapo/transformations/PPasMeasurementTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+GAAsG;AACtG,kHAA6G;AAE7G,qHAAuF;AAEvF,6GAA0G;AAC1G,2DAA2D;AAC3D,iEAAgE;AAIzD,IAAM,6BAA6B,2CAAnC,MAAM,6BAA8B,SAAQ,+CAGlD;IAHM;;QAII,SAAI,GAAG,+BAA+B,CAAC;QAEpC,sBAAiB,GAAG,CAC1B,IAAwC,EAC4C,EAAE;YACtF,MAAM,QAAQ,GAAG;gBACb,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,SAAS,EAAE,gBAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE;oBAC3C,IAAI,EAAE,mCAAgB,CAAC,WAAW;iBACrC,CAAC,CAAC,QAAQ,EAAE;gBACb,MAAM,EAAE,yCAAiB,CAAC,kBAAkB;gBAC5C,QAAQ,EAAE,IAAI,CAAC,OAAO;gBACtB,oBAAoB,EAAE,IAAI,CAAC,kBAAkB;aAChD,CAAC;YAEF,OAAO;gBACH,eAAe,EAAE;oBACb,KAAK,EAAE,IAAI,CAAC,eAAe;oBAC3B,GAAG,EAAE,6CAAmB,CAAC,IAAI;oBAC7B,GAAG,QAAQ;iBACd;gBACD,iBAAiB,EAAE;oBACf,KAAK,EAAE,IAAI,CAAC,iBAAiB;oBAC7B,GAAG,EAAE,6CAAmB,CAAC,KAAK;oBAC9B,GAAG,QAAQ;iBACd;aACJ,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;wCAhCY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;GACA,6BAA6B,CAgCzC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AbstractWorker } from "@golemio/core/dist/integration-engine";
|
|
2
|
+
import { ITask } from "@golemio/core/dist/integration-engine/workers/interfaces/ITask";
|
|
3
|
+
export declare class EnapoWorker extends AbstractWorker {
|
|
4
|
+
protected name: string;
|
|
5
|
+
constructor();
|
|
6
|
+
registerTask: (task: ITask) => void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnapoWorker = void 0;
|
|
4
|
+
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const Di_1 = require("../ioc/Di");
|
|
7
|
+
const EnapoWorkerContainerToken_1 = require("../ioc/EnapoWorkerContainerToken");
|
|
8
|
+
class EnapoWorker extends integration_engine_1.AbstractWorker {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.name = constants_1.ENAPO_WORKER_NAME;
|
|
12
|
+
this.registerTask = (task) => {
|
|
13
|
+
super.registerTask(task);
|
|
14
|
+
task.queuePrefix = this.getQueuePrefix();
|
|
15
|
+
};
|
|
16
|
+
// Register tasks
|
|
17
|
+
this.registerTask(Di_1.EnapoContainer.resolve(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnapoPpasTask));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.EnapoWorker = EnapoWorker;
|
|
21
|
+
//# sourceMappingURL=EnapoWorker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnapoWorker.js","sourceRoot":"","sources":["../../../../src/integration-engine/enapo/workers/EnapoWorker.ts"],"names":[],"mappings":";;;AAAA,8EAAuE;AAEvE,4CAAiD;AACjD,kCAA2C;AAC3C,gFAA6E;AAE7E,MAAa,WAAY,SAAQ,mCAAc;IAG3C;QACI,KAAK,EAAE,CAAC;QAHF,SAAI,GAAG,6BAAiB,CAAC;QAS5B,iBAAY,GAAG,CAAC,IAAW,EAAQ,EAAE;YACxC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC7C,CAAC,CAAC;QAPE,iBAAiB;QACjB,IAAI,CAAC,YAAY,CAAC,mBAAc,CAAC,OAAO,CAAQ,qDAAyB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9F,CAAC;CAMJ;AAdD,kCAcC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommodityProviderType } from "../../../../schema-definitions/models/helpers/CommodityProviderTypeEnum";
|
|
2
|
+
export interface IEnapoPpasTaskMeasurementParams {
|
|
3
|
+
providerType: CommodityProviderType.PpasAveV | CommodityProviderType.PpasAveM | CommodityProviderType.PpasAveA | CommodityProviderType.PpasAveC | CommodityProviderType.PpasAveMO;
|
|
4
|
+
targetDays?: number;
|
|
5
|
+
dateFrom?: string;
|
|
6
|
+
dateTo?: string;
|
|
7
|
+
}
|
package/dist/integration-engine/enapo/workers/interfaces/IEnapoPpasTaskMeasurementParams.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEnapoPpasTaskMeasurementParams.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/interfaces/IEnapoPpasTaskMeasurementParams.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CommodityProviderType } from "../../../../schema-definitions/models/helpers/CommodityProviderTypeEnum";
|
|
2
|
+
import { IEnapoPpasTaskMeasurementParams } from "../interfaces/IEnapoPpasTaskMeasurementParams";
|
|
3
|
+
export declare class EnapoPpasMeasurementsParamsValidationSchema implements IEnapoPpasTaskMeasurementParams {
|
|
4
|
+
dateFrom?: string;
|
|
5
|
+
dateTo?: string;
|
|
6
|
+
targetDays?: number;
|
|
7
|
+
providerType: CommodityProviderType.PpasAveV | CommodityProviderType.PpasAveM | CommodityProviderType.PpasAveA | CommodityProviderType.PpasAveC | CommodityProviderType.PpasAveMO;
|
|
8
|
+
}
|
package/dist/integration-engine/enapo/workers/schema/EnapoPpasMeasurementsParamsValidationSchema.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EnapoPpasMeasurementsParamsValidationSchema = void 0;
|
|
13
|
+
const CommodityProviderTypeEnum_1 = require("../../../../schema-definitions/models/helpers/CommodityProviderTypeEnum");
|
|
14
|
+
const class_validator_1 = require("@golemio/core/dist/shared/class-validator");
|
|
15
|
+
class EnapoPpasMeasurementsParamsValidationSchema {
|
|
16
|
+
}
|
|
17
|
+
exports.EnapoPpasMeasurementsParamsValidationSchema = EnapoPpasMeasurementsParamsValidationSchema;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsISO8601)(),
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], EnapoPpasMeasurementsParamsValidationSchema.prototype, "dateFrom", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsISO8601)(),
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], EnapoPpasMeasurementsParamsValidationSchema.prototype, "dateTo", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsNumber)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], EnapoPpasMeasurementsParamsValidationSchema.prototype, "targetDays", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsEnum)([
|
|
35
|
+
CommodityProviderTypeEnum_1.CommodityProviderType.PpasAveV,
|
|
36
|
+
CommodityProviderTypeEnum_1.CommodityProviderType.PpasAveM,
|
|
37
|
+
CommodityProviderTypeEnum_1.CommodityProviderType.PpasAveA,
|
|
38
|
+
CommodityProviderTypeEnum_1.CommodityProviderType.PpasAveC,
|
|
39
|
+
CommodityProviderTypeEnum_1.CommodityProviderType.PpasAveMO,
|
|
40
|
+
]),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], EnapoPpasMeasurementsParamsValidationSchema.prototype, "providerType", void 0);
|
|
43
|
+
//# sourceMappingURL=EnapoPpasMeasurementsParamsValidationSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnapoPpasMeasurementsParamsValidationSchema.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/schema/EnapoPpasMeasurementsParamsValidationSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uHAAsF;AACtF,+EAAoG;AAGpG,MAAa,2CAA2C;CA0BvD;AA1BD,kGA0BC;AAvBG;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;6EACK;AAIlB;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;2EACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+EACO;AASpB;IAPC,IAAA,wBAAM,EAAC;QACJ,iDAAqB,CAAC,QAAQ;QAC9B,iDAAqB,CAAC,QAAQ;QAC9B,iDAAqB,CAAC,QAAQ;QAC9B,iDAAqB,CAAC,QAAQ;QAC9B,iDAAqB,CAAC,SAAS;KAClC,CAAC;;iFAMoC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EnapoMeasurementsRepository } from "../../repositories/EnapoMeasurementsRepository";
|
|
2
|
+
import { IEnapoMeasurementsDto } from "../../../../schema-definitions/models/interfaces/IEnapoMeasurmentsDto";
|
|
3
|
+
import { AbstractTask } from "@golemio/core/dist/integration-engine";
|
|
4
|
+
export declare abstract class AbstractEnapoFetchMeasurementsTask<T extends object> extends AbstractTask<T> {
|
|
5
|
+
protected abstract measurementsRepository: EnapoMeasurementsRepository;
|
|
6
|
+
constructor();
|
|
7
|
+
protected saveConsumptionData(data: IEnapoMeasurementsDto[], skipFilter?: boolean): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbstractEnapoFetchMeasurementsTask = void 0;
|
|
4
|
+
const MeasurementsDataNormalizer_1 = require("../../../commodity-providers/helper/MeasurementsDataNormalizer");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
7
|
+
const MEASUREMENTS_BATCH_SIZE = 5000;
|
|
8
|
+
class AbstractEnapoFetchMeasurementsTask extends integration_engine_1.AbstractTask {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(constants_1.ENAPO_WORKER_NAME);
|
|
11
|
+
}
|
|
12
|
+
async saveConsumptionData(data, skipFilter = false) {
|
|
13
|
+
for (let i = 0; i < data.length; i += MEASUREMENTS_BATCH_SIZE) {
|
|
14
|
+
let batch = data.slice(i, i + MEASUREMENTS_BATCH_SIZE);
|
|
15
|
+
if (!skipFilter) {
|
|
16
|
+
batch = MeasurementsDataNormalizer_1.MeasurementsDataNormalizer.filter(batch);
|
|
17
|
+
}
|
|
18
|
+
const uniqueValues = new Set();
|
|
19
|
+
batch = batch.filter((item) => {
|
|
20
|
+
const key = `${item.timestamp.getTime()}_${item.var}_${item.place_id}`;
|
|
21
|
+
if (uniqueValues.has(key))
|
|
22
|
+
return false;
|
|
23
|
+
uniqueValues.add(key);
|
|
24
|
+
return true;
|
|
25
|
+
});
|
|
26
|
+
if (batch.length) {
|
|
27
|
+
await this.measurementsRepository.bulkSave(batch);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.AbstractEnapoFetchMeasurementsTask = AbstractEnapoFetchMeasurementsTask;
|
|
33
|
+
//# sourceMappingURL=AbstractEnapoFetchMeasurementsTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractEnapoFetchMeasurementsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/task/AbstractEnapoFetchMeasurementsTask.ts"],"names":[],"mappings":";;;AAAA,+GAAuG;AACvG,+CAAwD;AAGxD,8EAAqE;AAErE,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAErC,MAAsB,kCAAqD,SAAQ,iCAAe;IAG9F;QACI,KAAK,CAAC,6BAAiB,CAAC,CAAC;IAC7B,CAAC;IAES,KAAK,CAAC,mBAAmB,CAAC,IAA6B,EAAE,aAAsB,KAAK;QAC1F,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,uBAAuB,EAAE;YAC3D,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,uBAAuB,CAAC,CAAC;YAEvD,IAAI,CAAC,UAAU,EAAE;gBACb,KAAK,GAAG,uDAA0B,CAAC,MAAM,CAAC,KAAK,CAA4B,CAAC;aAC/E;YAED,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAC;YACvC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC1B,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACvE,IAAI,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC;oBAAE,OAAO,KAAK,CAAC;gBACxC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC;YAChB,CAAC,CAAC,CAAC;YAEH,IAAI,KAAK,CAAC,MAAM,EAAE;gBACd,MAAM,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;aACrD;SACJ;IACL,CAAC;CACJ;AA5BD,gFA4BC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AveApiDtoUnion, ICommodityProviderDataSourceFactory } from "../../../commodity-providers/datasources/interfaces/ICommodityProviderDataSourceFactory";
|
|
2
|
+
import { IAveConfig, PpasAveApiHelper } from "../../../commodity-providers/datasources/ppas-ave-api/helpers/PpasAveApiHelper";
|
|
3
|
+
import { IAveApiDeviceDataParams } from "../../../commodity-providers/datasources/ppas-ave-api/interfaces/IAveApiDeviceDataParams";
|
|
4
|
+
import { IPpasMeasurementsParams } from "../../../commodity-providers/workers/interfaces/IPpasMeasurementsParams";
|
|
5
|
+
import { EnapoMeasurementsRepository } from "../../repositories/EnapoMeasurementsRepository";
|
|
6
|
+
import { PPasMeasurementTransformation } from "../../transformations/PPasMeasurementTransformation";
|
|
7
|
+
import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
|
|
8
|
+
import { ILogger } from "@golemio/core/dist/helpers/logger/LoggerProvider";
|
|
9
|
+
import { IEnapoPpasTaskMeasurementParams } from "../interfaces/IEnapoPpasTaskMeasurementParams";
|
|
10
|
+
import { EnapoPpasMeasurementsParamsValidationSchema } from "../schema/EnapoPpasMeasurementsParamsValidationSchema";
|
|
11
|
+
import { AbstractEnapoFetchMeasurementsTask } from "./AbstractEnapoFetchMeasurementsTask";
|
|
12
|
+
export declare class EnapoPpasTask extends AbstractEnapoFetchMeasurementsTask<IEnapoPpasTaskMeasurementParams> {
|
|
13
|
+
protected config: ISimpleConfig;
|
|
14
|
+
protected measurementsRepository: EnapoMeasurementsRepository;
|
|
15
|
+
protected transformation: PPasMeasurementTransformation;
|
|
16
|
+
protected logger: ILogger;
|
|
17
|
+
protected dataSourceFactory: ICommodityProviderDataSourceFactory;
|
|
18
|
+
queueName: string;
|
|
19
|
+
queueTtl: number;
|
|
20
|
+
schema: typeof EnapoPpasMeasurementsParamsValidationSchema;
|
|
21
|
+
constructor(config: ISimpleConfig, measurementsRepository: EnapoMeasurementsRepository, transformation: PPasMeasurementTransformation, logger: ILogger, dataSourceFactory: ICommodityProviderDataSourceFactory);
|
|
22
|
+
execute(params: IPpasMeasurementsParams): Promise<void>;
|
|
23
|
+
private fetchAndSave;
|
|
24
|
+
protected getProviderConfig(data: IPpasMeasurementsParams): {
|
|
25
|
+
baseUrl: string;
|
|
26
|
+
config: IAveConfig;
|
|
27
|
+
};
|
|
28
|
+
protected getDataFromDataSource<T extends AveApiDtoUnion>(resourceTypeKey: keyof typeof PpasAveApiHelper.resourceType, sessionId: string, params?: IAveApiDeviceDataParams): Promise<T[]>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.EnapoPpasTask = void 0;
|
|
16
|
+
const CommodityProviderEnum_1 = require("../../../commodity-providers/datasources/helpers/CommodityProviderEnum");
|
|
17
|
+
const AveDataTypeEnum_1 = require("../../../commodity-providers/datasources/ppas-ave-api/AveDataTypeEnum");
|
|
18
|
+
const PpasAveApiHelper_1 = require("../../../commodity-providers/datasources/ppas-ave-api/helpers/PpasAveApiHelper");
|
|
19
|
+
const IntervalGenerator_1 = require("../../helpers/IntervalGenerator");
|
|
20
|
+
const EnapoWorkerContainerToken_1 = require("../../ioc/EnapoWorkerContainerToken");
|
|
21
|
+
const EnapoMeasurementsRepository_1 = require("../../repositories/EnapoMeasurementsRepository");
|
|
22
|
+
const PPasMeasurementTransformation_1 = require("../../transformations/PPasMeasurementTransformation");
|
|
23
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
24
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
25
|
+
const luxon_1 = require("@golemio/core/dist/shared/luxon");
|
|
26
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
27
|
+
const EnapoPpasMeasurementsParamsValidationSchema_1 = require("../schema/EnapoPpasMeasurementsParamsValidationSchema");
|
|
28
|
+
const AbstractEnapoFetchMeasurementsTask_1 = require("./AbstractEnapoFetchMeasurementsTask");
|
|
29
|
+
let EnapoPpasTask = exports.EnapoPpasTask = class EnapoPpasTask extends AbstractEnapoFetchMeasurementsTask_1.AbstractEnapoFetchMeasurementsTask {
|
|
30
|
+
constructor(config, measurementsRepository, transformation, logger, dataSourceFactory) {
|
|
31
|
+
super();
|
|
32
|
+
this.config = config;
|
|
33
|
+
this.measurementsRepository = measurementsRepository;
|
|
34
|
+
this.transformation = transformation;
|
|
35
|
+
this.logger = logger;
|
|
36
|
+
this.dataSourceFactory = dataSourceFactory;
|
|
37
|
+
this.queueName = "fetchPpasMeasurements";
|
|
38
|
+
this.queueTtl = 60 * 60 * 1000;
|
|
39
|
+
this.schema = EnapoPpasMeasurementsParamsValidationSchema_1.EnapoPpasMeasurementsParamsValidationSchema;
|
|
40
|
+
}
|
|
41
|
+
async execute(params) {
|
|
42
|
+
const { baseUrl, config } = this.getProviderConfig(params);
|
|
43
|
+
const aveApiHelper = new PpasAveApiHelper_1.PpasAveApiHelper(baseUrl, config);
|
|
44
|
+
const sessionId = await aveApiHelper.createSession();
|
|
45
|
+
try {
|
|
46
|
+
const places = await this.getDataFromDataSource("Places", sessionId);
|
|
47
|
+
for (const place of places) {
|
|
48
|
+
if (config.excludelist && config.excludelist.includes(place.Eic)) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
this.logger.info(`Fetching data for device ${place.DeviceSerialNumber}`);
|
|
52
|
+
await this.fetchAndSave(place, sessionId, params);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
await aveApiHelper.terminateSession(sessionId);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async fetchAndSave(place, sessionId, params) {
|
|
60
|
+
try {
|
|
61
|
+
if (!params?.targetDays && (!params?.dateFrom || !params?.dateTo)) {
|
|
62
|
+
throw new golemio_errors_1.GeneralError("Both dateFrom and dateTo must be provided when targetDays is not specified", this.constructor.name);
|
|
63
|
+
}
|
|
64
|
+
const intervals = params.targetDays
|
|
65
|
+
? IntervalGenerator_1.IntervalGenerator.generateIntervalsFromTargetDays({ targetDays: params.targetDays }, 5)
|
|
66
|
+
: IntervalGenerator_1.IntervalGenerator.getIntervals(luxon_1.DateTime.fromISO(params.dateFrom), luxon_1.DateTime.fromISO(params.dateTo), 5);
|
|
67
|
+
for (const interval of intervals) {
|
|
68
|
+
const start = interval.start.startOf("day");
|
|
69
|
+
const end = interval.end.startOf("day");
|
|
70
|
+
const measurementRawData = await this.getDataFromDataSource("DeviceData", sessionId, {
|
|
71
|
+
placeId: place.Id,
|
|
72
|
+
dateFrom: start.toISODate(),
|
|
73
|
+
dateTo: end.toISODate(),
|
|
74
|
+
isoDate: "1",
|
|
75
|
+
// fill all measurement values (we need the OperatingAmount and ConvertDifference values)
|
|
76
|
+
dataType: AveDataTypeEnum_1.AveDataType.RawData.toString(),
|
|
77
|
+
});
|
|
78
|
+
const measurementRawDataWithPlace = measurementRawData.map((item) => ({
|
|
79
|
+
...place,
|
|
80
|
+
...item,
|
|
81
|
+
}));
|
|
82
|
+
const transFormedData = this.transformation.transformArray(measurementRawDataWithPlace);
|
|
83
|
+
await this.saveConsumptionData(transFormedData.flatMap((item) => Object.values(item)));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
if (err instanceof golemio_errors_1.AbstractGolemioError) {
|
|
88
|
+
throw err;
|
|
89
|
+
}
|
|
90
|
+
throw new golemio_errors_1.GeneralError(`Unable to download data for place id: ${place.Id} eic: ${place.Eic}`, this.constructor.name, err);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
getProviderConfig(data) {
|
|
94
|
+
const rawConfig = this.config.getValue(`module.energetics.commodityProviders.${data.providerType}`);
|
|
95
|
+
rawConfig.excludelist = rawConfig.excludelist ? Object.values(rawConfig.excludelist) : null;
|
|
96
|
+
return {
|
|
97
|
+
baseUrl: this.config.getValue("module.energetics.commodityProviders.ppas_ave_api.baseUrl"),
|
|
98
|
+
config: this.config.getValue(`module.energetics.commodityProviders.${data.providerType}`),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
getDataFromDataSource(resourceTypeKey, sessionId, params) {
|
|
102
|
+
const dataSource = this.dataSourceFactory.getDataSource(CommodityProviderEnum_1.CommodityProvider.PpasInternetAveApi, PpasAveApiHelper_1.PpasAveApiHelper.resourceType[resourceTypeKey], sessionId, params);
|
|
103
|
+
return dataSource.getAll();
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
exports.EnapoPpasTask = EnapoPpasTask = __decorate([
|
|
107
|
+
(0, tsyringe_1.injectable)(),
|
|
108
|
+
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
|
|
109
|
+
__param(1, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnapoMeasurementsRepository)),
|
|
110
|
+
__param(2, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.PPasMeasurementTransformation)),
|
|
111
|
+
__param(3, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
112
|
+
__param(4, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.CommodityProviderDataSourceFactory)),
|
|
113
|
+
__metadata("design:paramtypes", [Object, EnapoMeasurementsRepository_1.EnapoMeasurementsRepository,
|
|
114
|
+
PPasMeasurementTransformation_1.PPasMeasurementTransformation, Object, Object])
|
|
115
|
+
], EnapoPpasTask);
|
|
116
|
+
//# sourceMappingURL=EnapoPpasTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnapoPpasTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/task/EnapoPpasTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kHAAsG;AAKtG,2GAA+F;AAC/F,qHAAyH;AAGzH,uEAAwE;AAExE,mFAAoF;AACpF,gGAAiG;AACjG,uGAAwG;AAIxG,wEAAqE;AAErE,6EAA8F;AAC9F,2DAA2D;AAC3D,iEAAwE;AAExE,uHAAoH;AACpH,6FAA0F;AAGnF,IAAM,aAAa,2BAAnB,MAAM,aAAc,SAAQ,uEAAmE;IAKlG,YACoC,MAA+B,EAE/D,sBAA6D,EAE7D,cAAuD,EAC7B,MAAyB,EAEnD,iBAAgE;QAEhE,KAAK,EAAE,CAAC;QATkC,WAAM,GAAN,MAAM,CAAe;QAErD,2BAAsB,GAAtB,sBAAsB,CAA6B;QAEnD,mBAAc,GAAd,cAAc,CAA+B;QACnB,WAAM,GAAN,MAAM,CAAS;QAEzC,sBAAiB,GAAjB,iBAAiB,CAAqC;QAZ7D,cAAS,GAAG,uBAAuB,CAAC;QACpC,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAC1B,WAAM,GAAG,yFAA2C,CAAC;IAa5D,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,MAA+B;QAChD,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAC3D,MAAM,YAAY,GAAG,IAAI,mCAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,aAAa,EAAE,CAAC;QAErD,IAAI;YACA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAkB,QAAQ,EAAE,SAAS,CAAC,CAAC;YAEtF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;gBACxB,IAAI,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;oBAC9D,SAAS;iBACZ;gBAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,KAAK,CAAC,kBAAkB,EAAE,CAAC,CAAC;gBACzE,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;aACrD;SACJ;gBAAS;YACN,MAAM,YAAY,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;SAClD;IACL,CAAC;IAEO,KAAK,CAAC,YAAY,CACtB,KAAsB,EACtB,SAAiB,EACjB,MAAuC;QAEvC,IAAI;YACA,IAAI,CAAC,MAAM,EAAE,UAAU,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;gBAC/D,MAAM,IAAI,6BAAY,CAClB,4EAA4E,EAC5E,IAAI,CAAC,WAAW,CAAC,IAAI,CACxB,CAAC;aACL;YAED,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU;gBAC/B,CAAC,CAAC,qCAAiB,CAAC,+BAA+B,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;gBACzF,CAAC,CAAC,qCAAiB,CAAC,YAAY,CAAC,gBAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,QAAS,CAAC,EAAE,gBAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAO,CAAC,EAAE,CAAC,CAAC,CAAC;YAE9G,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;gBAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAC5C,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAExC,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAuB,YAAY,EAAE,SAAS,EAAE;oBACvG,OAAO,EAAE,KAAK,CAAC,EAAE;oBACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE;oBAC3B,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE;oBACvB,OAAO,EAAE,GAAG;oBACZ,yFAAyF;oBACzF,QAAQ,EAAE,6BAAW,CAAC,OAAO,CAAC,QAAQ,EAAE;iBAC3C,CAAC,CAAC;gBAEH,MAAM,2BAA2B,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;oBAClE,GAAG,KAAK;oBACR,GAAG,IAAI;iBACV,CAAC,CAA8C,CAAC;gBAEjD,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,2BAA2B,CAAC,CAAC;gBAExF,MAAM,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aAC1F;SACJ;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;gBACrC,MAAM,GAAG,CAAC;aACb;YAED,MAAM,IAAI,6BAAY,CAClB,yCAAyC,KAAK,CAAC,EAAE,SAAS,KAAK,CAAC,GAAG,EAAE,EACrE,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;SACL;IACL,CAAC;IAES,iBAAiB,CAAC,IAA6B;QACrD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,wCAAwC,IAAI,CAAC,YAAY,EAAE,CAAe,CAAC;QAClH,SAAS,CAAC,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAE5F,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,2DAA2D,CAAW;YACpG,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,wCAAwC,IAAI,CAAC,YAAY,EAAE,CAAe;SAC1G,CAAC;IACN,CAAC;IAES,qBAAqB,CAC3B,eAA2D,EAC3D,SAAiB,EACjB,MAAgC;QAEhC,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,aAAa,CACnD,yCAAiB,CAAC,kBAAkB,EACpC,mCAAgB,CAAC,YAAY,CAAC,eAAe,CAAC,EAC9C,SAAS,EACT,MAAM,CACT,CAAC;QAEF,OAAO,UAAU,CAAC,MAAM,EAAkB,CAAC;IAC/C,CAAC;CACJ,CAAA;wBAnHY,aAAa;IADzB,IAAA,qBAAU,GAAE;IAOJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;IAC9B,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,2BAA2B,CAAC,CAAA;IAE7D,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,6BAA6B,CAAC,CAAA;IAE/D,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;IACxB,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,kCAAkC,CAAC,CAAA;6CAJnC,yDAA2B;QAEnC,6DAA6B;GAVlD,aAAa,CAmHzB"}
|
|
@@ -4,5 +4,11 @@ exports.workers = void 0;
|
|
|
4
4
|
const OictEnergetikaWorker_1 = require("./workers/oict-energetika/OictEnergetikaWorker");
|
|
5
5
|
const CommodityWorker_1 = require("./commodity-providers/workers/CommodityWorker");
|
|
6
6
|
const EnergeticsNewVpalaceWorker_1 = require("./workers/vpalace/EnergeticsNewVpalaceWorker");
|
|
7
|
-
|
|
7
|
+
const EnapoWorker_1 = require("./enapo/workers/EnapoWorker");
|
|
8
|
+
exports.workers = [
|
|
9
|
+
OictEnergetikaWorker_1.OictEnergetikaWorker,
|
|
10
|
+
EnergeticsNewVpalaceWorker_1.EnergeticsNewVpalaceWorker,
|
|
11
|
+
CommodityWorker_1.CommodityWorker,
|
|
12
|
+
EnapoWorker_1.EnapoWorker,
|
|
13
|
+
];
|
|
8
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integration-engine/index.ts"],"names":[],"mappings":";;;AAAA,yFAAwF;AAExF,mFAAgF;AAChF,6FAA0F;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integration-engine/index.ts"],"names":[],"mappings":";;;AAAA,yFAAwF;AAExF,mFAAgF;AAChF,6FAA0F;AAC1F,6DAA0D;AAE7C,QAAA,OAAO,GAAoC;IACpD,2CAAoB;IACpB,uDAA0B;IAC1B,iCAAe;IACf,yBAAW;CACd,CAAC"}
|
|
@@ -11,14 +11,15 @@ exports.staticMeterSettingsJsonSchema = {
|
|
|
11
11
|
items: {
|
|
12
12
|
type: "object",
|
|
13
13
|
properties: {
|
|
14
|
-
MeterSerialNumber: { type: "string" },
|
|
15
14
|
Name: { type: "string" },
|
|
16
15
|
Addr: { type: "string" },
|
|
17
|
-
Meter: { type: "string" },
|
|
16
|
+
Meter: { type: "string", nullable: true },
|
|
18
17
|
Type: { type: "string" },
|
|
19
18
|
Var: { type: "string" },
|
|
19
|
+
MeId: { type: "number", nullable: true },
|
|
20
|
+
EIC: { type: "string", nullable: true },
|
|
20
21
|
},
|
|
21
|
-
required: ["Name", "Addr", "
|
|
22
|
+
required: ["Name", "Addr", "Type", "Var"],
|
|
22
23
|
},
|
|
23
24
|
},
|
|
24
25
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticMeterSettingsJsonSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/StaticMeterSettingsJsonSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,6BAA6B,GAAyC;IAC/E,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE;QAClB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,kBAAkB,EAAE;gBAChB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,
|
|
1
|
+
{"version":3,"file":"StaticMeterSettingsJsonSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/StaticMeterSettingsJsonSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,6BAA6B,GAAyC;IAC/E,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE;QAClB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,kBAAkB,EAAE;gBAChB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;wBACzC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACvB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;wBACxC,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;qBAC1C;oBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;iBAC5C;aACJ;SACJ;QACD,QAAQ,EAAE,CAAC,oBAAoB,CAAC;KACnC;IACD,QAAQ,EAAE,EAAE;CACf,CAAC"}
|