@golemio/energetics 1.5.3-dev.2180893364 → 1.6.0-rc.2190853441
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/integration-engine/commodity-providers/transformations/AveMeasurementTransformation.d.ts +2 -3
- package/dist/integration-engine/commodity-providers/transformations/AveMeasurementTransformation.js +1 -2
- package/dist/integration-engine/commodity-providers/transformations/AveMeasurementTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/transformations/CemMeasurementTransformation.d.ts +0 -2
- package/dist/integration-engine/commodity-providers/transformations/CemMeasurementTransformation.js +0 -1
- package/dist/integration-engine/commodity-providers/transformations/CemMeasurementTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/transformations/PreElectroTransformation.js +0 -1
- package/dist/integration-engine/commodity-providers/transformations/PreElectroTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/transformations/PreMeasurementTransformation.js +0 -1
- package/dist/integration-engine/commodity-providers/transformations/PreMeasurementTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/transformations/PtasWebMeasurementTransformation.js +0 -1
- package/dist/integration-engine/commodity-providers/transformations/PtasWebMeasurementTransformation.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasEEMeasurementsTask.js +1 -2
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasEEMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasMeasurementsTask.js +1 -2
- 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 +1 -3
- package/dist/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.js.map +1 -1
- package/dist/integration-engine/enapo/constants.d.ts +0 -1
- package/dist/integration-engine/enapo/constants.js +1 -2
- package/dist/integration-engine/enapo/constants.js.map +1 -1
- package/dist/integration-engine/enapo/datasources/eno/EnoDatasource.js +0 -10
- package/dist/integration-engine/enapo/datasources/eno/EnoDatasource.js.map +1 -1
- package/dist/integration-engine/enapo/datasources/eno/EnoDatasourceFactory.d.ts +1 -3
- package/dist/integration-engine/enapo/datasources/eno/EnoDatasourceFactory.js +0 -2
- package/dist/integration-engine/enapo/datasources/eno/EnoDatasourceFactory.js.map +1 -1
- package/dist/integration-engine/enapo/datasources/eno/EnoOperationEnum.d.ts +0 -6
- package/dist/integration-engine/enapo/datasources/eno/EnoOperationEnum.js +1 -8
- package/dist/integration-engine/enapo/datasources/eno/EnoOperationEnum.js.map +1 -1
- package/dist/integration-engine/enapo/ioc/Di.js +2 -11
- package/dist/integration-engine/enapo/ioc/Di.js.map +1 -1
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.d.ts +0 -4
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js +0 -4
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js.map +1 -1
- package/dist/integration-engine/enapo/workers/EnapoWorker.js +0 -2
- package/dist/integration-engine/enapo/workers/EnapoWorker.js.map +1 -1
- package/dist/integration-engine/enapo/workers/interfaces/IEnoBuildingTaskInput.d.ts +5 -0
- package/dist/integration-engine/enapo/{interfaces/eno/IEnoStructureInfo.js → workers/interfaces/IEnoBuildingTaskInput.js} +1 -1
- package/dist/integration-engine/enapo/workers/interfaces/IEnoBuildingTaskInput.js.map +1 -0
- package/dist/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.d.ts +6 -0
- package/dist/integration-engine/enapo/workers/schema/{EnoDataTaskInputSchema.js → EnoBuildingTaskInputSchema.js} +8 -9
- package/dist/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.js.map +1 -0
- package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.d.ts +7 -6
- package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.js +6 -11
- package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.js.map +1 -1
- package/dist/schema-definitions/datasources/StaticMeterSettingsJsonSchema.js +3 -4
- package/dist/schema-definitions/datasources/StaticMeterSettingsJsonSchema.js.map +1 -1
- package/dist/schema-definitions/datasources/interfaces/IStaticMeterSettings.d.ts +2 -3
- package/dist/schema-definitions/models/MeasurementsModel.d.ts +0 -1
- package/dist/schema-definitions/models/MeasurementsModel.js +1 -15
- package/dist/schema-definitions/models/MeasurementsModel.js.map +1 -1
- package/dist/schema-definitions/models/eno/EJLookupModel.js +1 -1
- package/dist/schema-definitions/models/eno/EJLookupModel.js.map +1 -1
- package/dist/schema-definitions/models/interfaces/IMeasurementDto.d.ts +0 -1
- package/docs/asyncapi.yaml +0 -54
- package/docs/implementation_documentation.md +0 -74
- package/package.json +4 -4
- package/db/migrations/postgresql/20250213141826-add-device-serial-id.js +0 -53
- package/db/migrations/postgresql/20251119123216-eno-stavby-geometrie.js +0 -53
- package/db/migrations/postgresql/20251126125250-eno-ej-lookup-type-fix.js +0 -53
- package/db/migrations/postgresql/sqls/20250213141826-add-device-serial-id-down.sql +0 -1
- package/db/migrations/postgresql/sqls/20250213141826-add-device-serial-id-up.sql +0 -1
- package/db/migrations/postgresql/sqls/20251119123216-eno-stavby-geometrie-down.sql +0 -2
- package/db/migrations/postgresql/sqls/20251119123216-eno-stavby-geometrie-up.sql +0 -37
- package/db/migrations/postgresql/sqls/20251126125250-eno-ej-lookup-type-fix-down.sql +0 -1
- package/db/migrations/postgresql/sqls/20251126125250-eno-ej-lookup-type-fix-up.sql +0 -1
- package/dist/integration-engine/enapo/helpers/Chunker.d.ts +0 -3
- package/dist/integration-engine/enapo/helpers/Chunker.js +0 -14
- package/dist/integration-engine/enapo/helpers/Chunker.js.map +0 -1
- package/dist/integration-engine/enapo/interfaces/eno/IEnoStructureInfo.d.ts +0 -10
- package/dist/integration-engine/enapo/interfaces/eno/IEnoStructureInfo.js.map +0 -1
- package/dist/integration-engine/enapo/interfaces/eno/IGeometryInputWithIndex.d.ts +0 -4
- package/dist/integration-engine/enapo/interfaces/eno/IGeometryInputWithIndex.js +0 -3
- package/dist/integration-engine/enapo/interfaces/eno/IGeometryInputWithIndex.js.map +0 -1
- package/dist/integration-engine/enapo/repositories/eno/EnoGeometryRepository.d.ts +0 -5
- package/dist/integration-engine/enapo/repositories/eno/EnoGeometryRepository.js +0 -32
- package/dist/integration-engine/enapo/repositories/eno/EnoGeometryRepository.js.map +0 -1
- package/dist/integration-engine/enapo/repositories/eno/EnoStructureRepository.d.ts +0 -5
- package/dist/integration-engine/enapo/repositories/eno/EnoStructureRepository.js +0 -32
- package/dist/integration-engine/enapo/repositories/eno/EnoStructureRepository.js.map +0 -1
- package/dist/integration-engine/enapo/transformations/eno/EnoGeometryTransformation.d.ts +0 -11
- package/dist/integration-engine/enapo/transformations/eno/EnoGeometryTransformation.js +0 -34
- package/dist/integration-engine/enapo/transformations/eno/EnoGeometryTransformation.js.map +0 -1
- package/dist/integration-engine/enapo/transformations/eno/EnoStructureTransformation.d.ts +0 -13
- package/dist/integration-engine/enapo/transformations/eno/EnoStructureTransformation.js +0 -92
- package/dist/integration-engine/enapo/transformations/eno/EnoStructureTransformation.js.map +0 -1
- package/dist/integration-engine/enapo/workers/interfaces/IEnoDataTaskInput.d.ts +0 -9
- package/dist/integration-engine/enapo/workers/interfaces/IEnoDataTaskInput.js +0 -9
- package/dist/integration-engine/enapo/workers/interfaces/IEnoDataTaskInput.js.map +0 -1
- package/dist/integration-engine/enapo/workers/interfaces/IEnoGeometryTaskInput.d.ts +0 -4
- package/dist/integration-engine/enapo/workers/interfaces/IEnoGeometryTaskInput.js +0 -3
- package/dist/integration-engine/enapo/workers/interfaces/IEnoGeometryTaskInput.js.map +0 -1
- package/dist/integration-engine/enapo/workers/schema/EnoDataTaskInputSchema.d.ts +0 -6
- package/dist/integration-engine/enapo/workers/schema/EnoDataTaskInputSchema.js.map +0 -1
- package/dist/integration-engine/enapo/workers/schema/EnoGeometryTaskInputSchema.d.ts +0 -5
- package/dist/integration-engine/enapo/workers/schema/EnoGeometryTaskInputSchema.js +0 -27
- package/dist/integration-engine/enapo/workers/schema/EnoGeometryTaskInputSchema.js.map +0 -1
- package/dist/integration-engine/enapo/workers/task/EnoGeometryTask.d.ts +0 -15
- package/dist/integration-engine/enapo/workers/task/EnoGeometryTask.js +0 -69
- package/dist/integration-engine/enapo/workers/task/EnoGeometryTask.js.map +0 -1
- package/dist/integration-engine/enapo/workers/task/EnoStructureTask.d.ts +0 -33
- package/dist/integration-engine/enapo/workers/task/EnoStructureTask.js +0 -150
- package/dist/integration-engine/enapo/workers/task/EnoStructureTask.js.map +0 -1
- package/dist/schema-definitions/datasources/eno/EnoGeometryJsonSchema.d.ts +0 -5
- package/dist/schema-definitions/datasources/eno/EnoGeometryJsonSchema.js +0 -24
- package/dist/schema-definitions/datasources/eno/EnoGeometryJsonSchema.js.map +0 -1
- package/dist/schema-definitions/datasources/eno/EnoStructureInfoJsonSchema.d.ts +0 -5
- package/dist/schema-definitions/datasources/eno/EnoStructureInfoJsonSchema.js +0 -102
- package/dist/schema-definitions/datasources/eno/EnoStructureInfoJsonSchema.js.map +0 -1
- package/dist/schema-definitions/datasources/eno/interfaces/IGeometryInput.d.ts +0 -7
- package/dist/schema-definitions/datasources/eno/interfaces/IGeometryInput.js +0 -3
- package/dist/schema-definitions/datasources/eno/interfaces/IGeometryInput.js.map +0 -1
- package/dist/schema-definitions/datasources/eno/interfaces/IStructureInfoInput.d.ts +0 -10
- package/dist/schema-definitions/datasources/eno/interfaces/IStructureInfoInput.js +0 -3
- package/dist/schema-definitions/datasources/eno/interfaces/IStructureInfoInput.js.map +0 -1
- package/dist/schema-definitions/datasources/eno/interfaces/IStructureInput.d.ts +0 -20
- package/dist/schema-definitions/datasources/eno/interfaces/IStructureInput.js +0 -3
- package/dist/schema-definitions/datasources/eno/interfaces/IStructureInput.js.map +0 -1
- package/dist/schema-definitions/models/eno/GeometryModel.d.ts +0 -15
- package/dist/schema-definitions/models/eno/GeometryModel.js +0 -43
- package/dist/schema-definitions/models/eno/GeometryModel.js.map +0 -1
- package/dist/schema-definitions/models/eno/StructureModel.d.ts +0 -27
- package/dist/schema-definitions/models/eno/StructureModel.js +0 -80
- package/dist/schema-definitions/models/eno/StructureModel.js.map +0 -1
- package/dist/schema-definitions/models/eno/interfaces/IGeometry.d.ts +0 -9
- package/dist/schema-definitions/models/eno/interfaces/IGeometry.js +0 -3
- package/dist/schema-definitions/models/eno/interfaces/IGeometry.js.map +0 -1
- package/dist/schema-definitions/models/eno/interfaces/IStructure.d.ts +0 -21
- package/dist/schema-definitions/models/eno/interfaces/IStructure.js +0 -3
- package/dist/schema-definitions/models/eno/interfaces/IStructure.js.map +0 -1
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
CREATE TABLE eno_stavba (
|
|
2
|
-
gid varchar NOT NULL,
|
|
3
|
-
zdroj varchar NULL,
|
|
4
|
-
id_czcc int4 NULL,
|
|
5
|
-
id_objekt int4 NULL,
|
|
6
|
-
material varchar NULL,
|
|
7
|
-
nazev varchar NULL,
|
|
8
|
-
kod_druh_stavba varchar NULL,
|
|
9
|
-
nazev_druh_stavba varchar NULL,
|
|
10
|
-
kod_ochrana_stavba varchar NULL,
|
|
11
|
-
nazev_ochrana_stavba varchar NULL,
|
|
12
|
-
platnost_do timestamptz NULL,
|
|
13
|
-
platnost_od timestamptz NULL,
|
|
14
|
-
profil varchar NULL,
|
|
15
|
-
den_vystavba int4 NULL,
|
|
16
|
-
mesic_vystavba int4 NULL,
|
|
17
|
-
rok_vystavba int4 NULL,
|
|
18
|
-
delka numeric NULL,
|
|
19
|
-
sirka numeric NULL,
|
|
20
|
-
vyska numeric NULL,
|
|
21
|
-
created_at timestamptz DEFAULT now() NULL,
|
|
22
|
-
updated_at timestamptz NULL,
|
|
23
|
-
CONSTRAINT eno_stavba_pk PRIMARY KEY (gid, zdroj)
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
CREATE TABLE eno_geometrie (
|
|
27
|
-
gid varchar NULL,
|
|
28
|
-
zdroj varchar NULL,
|
|
29
|
-
poradi int4 null,
|
|
30
|
-
id_organizace int4 NULL,
|
|
31
|
-
uzivatelsky_zakres bool NULL,
|
|
32
|
-
zakres text NULL,
|
|
33
|
-
epsg_code varchar NULL,
|
|
34
|
-
created_at timestamptz DEFAULT now() NULL,
|
|
35
|
-
updated_at timestamptz NULL,
|
|
36
|
-
CONSTRAINT eno_geometrie_pk PRIMARY KEY (gid, zdroj, poradi)
|
|
37
|
-
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ALTER TABLE eno_ciselnik_evidencni_jednotka ALTER COLUMN id TYPE varchar USING id::varchar;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ALTER TABLE eno_ciselnik_evidencni_jednotka ALTER COLUMN id TYPE int4 USING id::int4;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Slicer = void 0;
|
|
4
|
-
class Slicer {
|
|
5
|
-
static chunkArray(array, size) {
|
|
6
|
-
const chunks = [];
|
|
7
|
-
for (let i = 0; i < array.length; i += size) {
|
|
8
|
-
chunks.push(array.slice(i, i + size));
|
|
9
|
-
}
|
|
10
|
-
return chunks;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.Slicer = Slicer;
|
|
14
|
-
//# sourceMappingURL=Chunker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chunker.js","sourceRoot":"","sources":["../../../../src/integration-engine/enapo/helpers/Chunker.ts"],"names":[],"mappings":";;;AAAA,MAAa,MAAM;IACR,MAAM,CAAC,UAAU,CAAI,KAAU,EAAE,IAAY;QAChD,MAAM,MAAM,GAAU,EAAE,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,IAAI,EAAE;YACzC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;SACzC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AARD,wBAQC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IAddress } from "../../../../schema-definitions/models/eno/interfaces/IAddress";
|
|
2
|
-
import { ILocation } from "../../../../schema-definitions/models/eno/interfaces/ILocation";
|
|
3
|
-
import { IProperty } from "../../../../schema-definitions/models/eno/interfaces/IProperty";
|
|
4
|
-
import { IStructure } from "../../../../schema-definitions/models/eno/interfaces/IStructure";
|
|
5
|
-
export interface IEnoStructureInfo {
|
|
6
|
-
structure: IStructure;
|
|
7
|
-
property: IProperty;
|
|
8
|
-
address: IAddress[];
|
|
9
|
-
location: ILocation[];
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IEnoStructureInfo.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/interfaces/eno/IEnoStructureInfo.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IGeometryInputWithIndex.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/interfaces/eno/IGeometryInputWithIndex.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
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 EnoGeometryRepository extends PostgresModel implements IModel {
|
|
4
|
-
constructor();
|
|
5
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
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.EnoGeometryRepository = void 0;
|
|
13
|
-
const _sch_1 = require("../../../../schema-definitions");
|
|
14
|
-
const GeometryModel_1 = require("../../../../schema-definitions/models/eno/GeometryModel");
|
|
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 EnoGeometryRepository = exports.EnoGeometryRepository = class EnoGeometryRepository extends PostgresModel_1.PostgresModel {
|
|
19
|
-
constructor() {
|
|
20
|
-
super("EnoGeometryRepository", {
|
|
21
|
-
pgTableName: GeometryModel_1.GeometryModel.TABLE_NAME,
|
|
22
|
-
pgSchema: _sch_1.EnergeticsSchema.pgSchema,
|
|
23
|
-
outputSequelizeAttributes: GeometryModel_1.GeometryModel.attributeModel,
|
|
24
|
-
savingType: "insertOrUpdate",
|
|
25
|
-
}, new golemio_validator_1.JSONSchemaValidator("EnoGeometryRepositoryValidation", GeometryModel_1.GeometryModel.jsonSchema));
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
exports.EnoGeometryRepository = EnoGeometryRepository = __decorate([
|
|
29
|
-
(0, tsyringe_1.injectable)(),
|
|
30
|
-
__metadata("design:paramtypes", [])
|
|
31
|
-
], EnoGeometryRepository);
|
|
32
|
-
//# sourceMappingURL=EnoGeometryRepository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnoGeometryRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/repositories/eno/EnoGeometryRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAwC;AACxC,2FAA8D;AAE9D,8FAA2F;AAC3F,mFAAkF;AAClF,iEAAgE;AAGzD,IAAM,qBAAqB,mCAA3B,MAAM,qBAAsB,SAAQ,6BAAa;IACpD;QACI,KAAK,CACD,uBAAuB,EACvB;YACI,WAAW,EAAE,6BAAa,CAAC,UAAU;YACrC,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,yBAAyB,EAAE,6BAAa,CAAC,cAAc;YACvD,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,iCAAiC,EAAE,6BAAa,CAAC,UAAU,CAAC,CACvF,CAAC;IACN,CAAC;CACJ,CAAA;gCAbY,qBAAqB;IADjC,IAAA,qBAAU,GAAE;;GACA,qBAAqB,CAajC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
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 EnoStructureRepository extends PostgresModel implements IModel {
|
|
4
|
-
constructor();
|
|
5
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
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.EnoStructureRepository = void 0;
|
|
13
|
-
const _sch_1 = require("../../../../schema-definitions");
|
|
14
|
-
const StructureModel_1 = require("../../../../schema-definitions/models/eno/StructureModel");
|
|
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 EnoStructureRepository = exports.EnoStructureRepository = class EnoStructureRepository extends PostgresModel_1.PostgresModel {
|
|
19
|
-
constructor() {
|
|
20
|
-
super("EnoStructureRepository", {
|
|
21
|
-
pgTableName: StructureModel_1.StructureModel.TABLE_NAME,
|
|
22
|
-
pgSchema: _sch_1.EnergeticsSchema.pgSchema,
|
|
23
|
-
outputSequelizeAttributes: StructureModel_1.StructureModel.attributeModel,
|
|
24
|
-
savingType: "insertOrUpdate",
|
|
25
|
-
}, new golemio_validator_1.JSONSchemaValidator("EnoStructureRepositoryValidation", StructureModel_1.StructureModel.jsonSchema));
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
exports.EnoStructureRepository = EnoStructureRepository = __decorate([
|
|
29
|
-
(0, tsyringe_1.injectable)(),
|
|
30
|
-
__metadata("design:paramtypes", [])
|
|
31
|
-
], EnoStructureRepository);
|
|
32
|
-
//# sourceMappingURL=EnoStructureRepository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnoStructureRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/repositories/eno/EnoStructureRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAwC;AACxC,6FAAgE;AAEhE,8FAA2F;AAC3F,mFAAkF;AAClF,iEAAgE;AAGzD,IAAM,sBAAsB,oCAA5B,MAAM,sBAAuB,SAAQ,6BAAa;IACrD;QACI,KAAK,CACD,wBAAwB,EACxB;YACI,WAAW,EAAE,+BAAc,CAAC,UAAU;YACtC,QAAQ,EAAE,uBAAgB,CAAC,QAAQ;YACnC,yBAAyB,EAAE,+BAAc,CAAC,cAAc;YACxD,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,kCAAkC,EAAE,+BAAc,CAAC,UAAU,CAAC,CACzF,CAAC;IACN,CAAC;CACJ,CAAA;iCAbY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;;GACA,sBAAsB,CAalC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IGeometryInput } from "../../../../schema-definitions/datasources/eno/interfaces/IGeometryInput";
|
|
2
|
-
import { IGeometry } from "../../../../schema-definitions/models/eno/interfaces/IGeometry";
|
|
3
|
-
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
4
|
-
export declare class EnoGeometryTransformation extends AbstractTransformation<IGeometryInput, IGeometry> {
|
|
5
|
-
private source;
|
|
6
|
-
name: string;
|
|
7
|
-
private indexMemory;
|
|
8
|
-
constructor(source: string);
|
|
9
|
-
protected transformInternal: (element: IGeometryInput) => IGeometry;
|
|
10
|
-
private getIndex;
|
|
11
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnoGeometryTransformation = void 0;
|
|
4
|
-
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
5
|
-
class EnoGeometryTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
6
|
-
constructor(source) {
|
|
7
|
-
super();
|
|
8
|
-
this.source = source;
|
|
9
|
-
this.name = "EnoGeometryTransformation";
|
|
10
|
-
this.indexMemory = {};
|
|
11
|
-
this.transformInternal = (element) => {
|
|
12
|
-
return {
|
|
13
|
-
gid: element.gid,
|
|
14
|
-
zdroj: this.source,
|
|
15
|
-
poradi: this.getIndex(element.gid),
|
|
16
|
-
id_organizace: element.idOrganizace,
|
|
17
|
-
uzivatelsky_zakres: element.uzivatelskyZakres,
|
|
18
|
-
zakres: element.zakres,
|
|
19
|
-
epsg_code: element.epsgCode ?? null,
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
getIndex(gid) {
|
|
24
|
-
if (!this.indexMemory[gid]) {
|
|
25
|
-
this.indexMemory[gid] = 1;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
this.indexMemory[gid]++;
|
|
29
|
-
}
|
|
30
|
-
return this.indexMemory[gid];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.EnoGeometryTransformation = EnoGeometryTransformation;
|
|
34
|
-
//# sourceMappingURL=EnoGeometryTransformation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnoGeometryTransformation.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/transformations/eno/EnoGeometryTransformation.ts"],"names":[],"mappings":";;;AAEA,6GAA0G;AAE1G,MAAa,yBAA0B,SAAQ,+CAAiD;IAI5F,YAAoB,MAAc;QAC9B,KAAK,EAAE,CAAC;QADQ,WAAM,GAAN,MAAM,CAAQ;QAH3B,SAAI,GAAG,2BAA2B,CAAC;QAClC,gBAAW,GAA2B,EAAE,CAAC;QAMvC,sBAAiB,GAAG,CAAC,OAAuB,EAAa,EAAE;YACjE,OAAO;gBACH,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,KAAK,EAAE,IAAI,CAAC,MAAM;gBAClB,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC;gBAClC,aAAa,EAAE,OAAO,CAAC,YAAY;gBACnC,kBAAkB,EAAE,OAAO,CAAC,iBAAiB;gBAC7C,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,SAAS,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;aACtC,CAAC;QACN,CAAC,CAAC;IAZF,CAAC;IAcO,QAAQ,CAAC,GAAW;QACxB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE;YACxB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;SAC7B;aAAM;YACH,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;SAC3B;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;CACJ;AA7BD,8DA6BC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IEnoStructureInfo } from "../../interfaces/eno/IEnoStructureInfo";
|
|
2
|
-
import { IStructureInfoInput } from "../../../../schema-definitions/datasources/eno/interfaces/IStructureInfoInput";
|
|
3
|
-
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
4
|
-
export declare class EnoStructureTransformation extends AbstractTransformation<IStructureInfoInput, IEnoStructureInfo> {
|
|
5
|
-
private source;
|
|
6
|
-
name: string;
|
|
7
|
-
constructor(source: string);
|
|
8
|
-
protected transformInternal: (input: IStructureInfoInput) => IEnoStructureInfo;
|
|
9
|
-
private transformStructure;
|
|
10
|
-
private transformAddress;
|
|
11
|
-
private transformLocation;
|
|
12
|
-
private transformProperty;
|
|
13
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnoStructureTransformation = void 0;
|
|
4
|
-
const EnumGIDTypes_1 = require("../../../../schema-definitions/models/eno/helpers/EnumGIDTypes");
|
|
5
|
-
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
6
|
-
class EnoStructureTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
7
|
-
constructor(source) {
|
|
8
|
-
super();
|
|
9
|
-
this.source = source;
|
|
10
|
-
this.name = "EnoStructureTransformation";
|
|
11
|
-
this.transformInternal = (input) => {
|
|
12
|
-
return {
|
|
13
|
-
structure: this.transformStructure(input.stavba),
|
|
14
|
-
property: this.transformProperty(input.majetek, input.stavba.gid),
|
|
15
|
-
address: input.adresy
|
|
16
|
-
? input.adresy.map((element, index) => this.transformAddress(element, input.stavba.gid, index))
|
|
17
|
-
: [],
|
|
18
|
-
location: input.umisteni
|
|
19
|
-
? input.umisteni.map((element, index) => this.transformLocation(element, input.stavba.gid, index))
|
|
20
|
-
: [],
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
this.transformStructure = (element) => {
|
|
24
|
-
return {
|
|
25
|
-
gid: element.gid,
|
|
26
|
-
zdroj: this.source,
|
|
27
|
-
delka: element.delka,
|
|
28
|
-
den_vystavba: element.denVystavbaStavba,
|
|
29
|
-
id_czcc: element.idCZCC,
|
|
30
|
-
id_objekt: element.idObjekt,
|
|
31
|
-
kod_druh_stavba: element.kodDruhStavba,
|
|
32
|
-
kod_ochrana_stavba: element.kodOchranaStavba,
|
|
33
|
-
material: element.material,
|
|
34
|
-
mesic_vystavba: element.mesicVystavbaStavba,
|
|
35
|
-
nazev: element.nazev,
|
|
36
|
-
nazev_druh_stavba: element.nazevDruhStavba,
|
|
37
|
-
nazev_ochrana_stavba: element.nazevOchranaStavba,
|
|
38
|
-
platnost_do: element.platnostDo ? new Date(element.platnostDo) : null,
|
|
39
|
-
platnost_od: element.platnostOd ? new Date(element.platnostOd) : null,
|
|
40
|
-
profil: element.profil,
|
|
41
|
-
rok_vystavba: element.rokVystavbaStavba,
|
|
42
|
-
sirka: element.sirka,
|
|
43
|
-
vyska: element.vyska,
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
this.transformAddress = (element, gid, index) => {
|
|
47
|
-
return {
|
|
48
|
-
gid: gid,
|
|
49
|
-
gid_typ: EnumGIDTypes_1.EnumGidTypes.STRUCTURE,
|
|
50
|
-
poradi: index,
|
|
51
|
-
zdroj: this.source,
|
|
52
|
-
id: element.idAdresa,
|
|
53
|
-
popis: element.popisAdresa,
|
|
54
|
-
hlavni: element.hlavniAdresa,
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
this.transformLocation = (element, gid, index) => {
|
|
58
|
-
return {
|
|
59
|
-
gid: gid,
|
|
60
|
-
gid_typ: EnumGIDTypes_1.EnumGidTypes.STRUCTURE,
|
|
61
|
-
poradi: index,
|
|
62
|
-
zdroj: this.source,
|
|
63
|
-
id_parcela_orig: element.idPracelaOrig,
|
|
64
|
-
hlavni_parcela_umisteni: element.hlavniParcelaUmisteni,
|
|
65
|
-
popis_umisteni: element.popisUmisteni,
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
this.transformProperty = (element, gid) => {
|
|
69
|
-
return {
|
|
70
|
-
gid: gid,
|
|
71
|
-
gid_typ: EnumGIDTypes_1.EnumGidTypes.STRUCTURE,
|
|
72
|
-
zdroj: this.source,
|
|
73
|
-
id_maj_evidencni_jednotka: element.idMajEvidencniJednotka,
|
|
74
|
-
datum_nabyti: element.datumNabyti ? new Date(element.datumNabyti) : null,
|
|
75
|
-
datum_pozbyti: element.datumPozbyti ? new Date(element.datumPozbyti) : null,
|
|
76
|
-
id_maj_spravce_mandatni: element.idMajSpravceMandatni,
|
|
77
|
-
id_maj_spravce_ucet_jednotka: element.idMajSpravceUcetJednotka,
|
|
78
|
-
id_vlastnik: element.idVlastnik,
|
|
79
|
-
penb: element.penb,
|
|
80
|
-
penb_platnost_od: element.penbPlatnostOd ? new Date(element.penbPlatnostOd) : null,
|
|
81
|
-
penb_poznamka: element.penbPoznamka,
|
|
82
|
-
podil_majetek_citatel: element.podilMajetekCitatel,
|
|
83
|
-
podil_majetek_jmenovatel: element.podilMajetekJmenovatel,
|
|
84
|
-
v_majetku: element.VMajetku,
|
|
85
|
-
v_majetku_statu: element.VMajetkuStatu,
|
|
86
|
-
v_procesu_svereni: element.VProcesuSvereni,
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
exports.EnoStructureTransformation = EnoStructureTransformation;
|
|
92
|
-
//# sourceMappingURL=EnoStructureTransformation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnoStructureTransformation.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/transformations/eno/EnoStructureTransformation.ts"],"names":[],"mappings":";;;AAMA,iGAAoE;AAKpE,6GAA0G;AAE1G,MAAa,0BAA2B,SAAQ,+CAA8D;IAG1G,YAAoB,MAAc;QAC9B,KAAK,EAAE,CAAC;QADQ,WAAM,GAAN,MAAM,CAAQ;QAF3B,SAAI,GAAG,4BAA4B,CAAC;QAMjC,sBAAiB,GAAG,CAAC,KAA0B,EAAqB,EAAE;YAC5E,OAAO;gBACH,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC;gBAChD,QAAQ,EAAE,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;gBACjE,OAAO,EAAE,KAAK,CAAC,MAAM;oBACjB,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;oBAC/F,CAAC,CAAC,EAAE;gBACR,QAAQ,EAAE,KAAK,CAAC,QAAQ;oBACpB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,wBAAwB;gBAC9D,WAAW,EAAE,OAAO,CAAC,UAAU;gBAC/B,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,gBAAgB,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI;gBAClF,aAAa,EAAE,OAAO,CAAC,YAAY;gBACnC,qBAAqB,EAAE,OAAO,CAAC,mBAAmB;gBAClD,wBAAwB,EAAE,OAAO,CAAC,sBAAsB;gBACxD,SAAS,EAAE,OAAO,CAAC,QAAQ;gBAC3B,eAAe,EAAE,OAAO,CAAC,aAAa;gBACtC,iBAAiB,EAAE,OAAO,CAAC,eAAe;aAC7C,CAAC;QACN,CAAC,CAAC;IAnFF,CAAC;CAoFJ;AAzFD,gEAyFC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnumEnoDataType = void 0;
|
|
4
|
-
var EnumEnoDataType;
|
|
5
|
-
(function (EnumEnoDataType) {
|
|
6
|
-
EnumEnoDataType["CURRENT"] = "current";
|
|
7
|
-
EnumEnoDataType["REMOVED"] = "removed";
|
|
8
|
-
})(EnumEnoDataType || (exports.EnumEnoDataType = EnumEnoDataType = {}));
|
|
9
|
-
//# sourceMappingURL=IEnoDataTaskInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IEnoDataTaskInput.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/interfaces/IEnoDataTaskInput.ts"],"names":[],"mappings":";;;AAMA,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;AACvB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IEnoGeometryTaskInput.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/interfaces/IEnoGeometryTaskInput.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnoDataTaskInputSchema.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/schema/EnoDataTaskInputSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAAmG;AACnG,uEAAqF;AAErF,MAAa,sBAAsB;CAUlC;AAVD,wDAUC;AARG;IADC,IAAA,wBAAM,EAAC,mCAAe,CAAC;;oDACV;AAGd;IADC,IAAA,0BAAQ,GAAE;;sDACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;wDACO"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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.EnoGeometryTaskInputSchema = void 0;
|
|
13
|
-
const class_validator_1 = require("@golemio/core/dist/shared/class-validator");
|
|
14
|
-
class EnoGeometryTaskInputSchema {
|
|
15
|
-
}
|
|
16
|
-
exports.EnoGeometryTaskInputSchema = EnoGeometryTaskInputSchema;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsString)(),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], EnoGeometryTaskInputSchema.prototype, "source", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
-
(0, class_validator_1.IsArray)(),
|
|
24
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
25
|
-
__metadata("design:type", Array)
|
|
26
|
-
], EnoGeometryTaskInputSchema.prototype, "listGid", void 0);
|
|
27
|
-
//# sourceMappingURL=EnoGeometryTaskInputSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnoGeometryTaskInputSchema.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/schema/EnoGeometryTaskInputSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAA0F;AAG1F,MAAa,0BAA0B;CAQtC;AARD,gEAQC;AANG;IADC,IAAA,0BAAQ,GAAE;;0DACK;AAKhB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;2DACN"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EnoDatasourceFactory } from "../../datasources/eno/EnoDatasourceFactory";
|
|
2
|
-
import { EnoGeometryRepository } from "../../repositories/eno/EnoGeometryRepository";
|
|
3
|
-
import { AbstractTask } from "@golemio/core/dist/integration-engine/workers/AbstractTask";
|
|
4
|
-
import { IEnoGeometryTaskInput } from "../interfaces/IEnoGeometryTaskInput";
|
|
5
|
-
import { EnoGeometryTaskInputSchema } from "../schema/EnoGeometryTaskInputSchema";
|
|
6
|
-
export declare class EnoGeometryTask extends AbstractTask<IEnoGeometryTaskInput> {
|
|
7
|
-
private enoDatasourceFactory;
|
|
8
|
-
private enoGeometryRepository;
|
|
9
|
-
queueName: string;
|
|
10
|
-
queueTtl: number;
|
|
11
|
-
schema: typeof EnoGeometryTaskInputSchema;
|
|
12
|
-
private static readonly BATCH_SIZE;
|
|
13
|
-
constructor(enoDatasourceFactory: EnoDatasourceFactory, enoGeometryRepository: EnoGeometryRepository);
|
|
14
|
-
execute(data: IEnoGeometryTaskInput): Promise<void>;
|
|
15
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
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
|
-
var EnoGeometryTask_1;
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.EnoGeometryTask = void 0;
|
|
17
|
-
const constants_1 = require("../../constants");
|
|
18
|
-
const EnoDatasourceFactory_1 = require("../../datasources/eno/EnoDatasourceFactory");
|
|
19
|
-
const EnoOperationEnum_1 = require("../../datasources/eno/EnoOperationEnum");
|
|
20
|
-
const EnapoWorkerContainerToken_1 = require("../../ioc/EnapoWorkerContainerToken");
|
|
21
|
-
const EnoGeometryRepository_1 = require("../../repositories/eno/EnoGeometryRepository");
|
|
22
|
-
const EnoGeometryTransformation_1 = require("../../transformations/eno/EnoGeometryTransformation");
|
|
23
|
-
const AbstractTask_1 = require("@golemio/core/dist/integration-engine/workers/AbstractTask");
|
|
24
|
-
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
25
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
26
|
-
const EnoGeometryTaskInputSchema_1 = require("../schema/EnoGeometryTaskInputSchema");
|
|
27
|
-
const Chunker_1 = require("../../helpers/Chunker");
|
|
28
|
-
let EnoGeometryTask = exports.EnoGeometryTask = EnoGeometryTask_1 = class EnoGeometryTask extends AbstractTask_1.AbstractTask {
|
|
29
|
-
constructor(enoDatasourceFactory, enoGeometryRepository) {
|
|
30
|
-
super(constants_1.ENAPO_WORKER_NAME);
|
|
31
|
-
this.enoDatasourceFactory = enoDatasourceFactory;
|
|
32
|
-
this.enoGeometryRepository = enoGeometryRepository;
|
|
33
|
-
this.queueName = "processEnoGeometry";
|
|
34
|
-
this.queueTtl = 60 * 60 * 1000;
|
|
35
|
-
this.schema = EnoGeometryTaskInputSchema_1.EnoGeometryTaskInputSchema;
|
|
36
|
-
}
|
|
37
|
-
async execute(data) {
|
|
38
|
-
try {
|
|
39
|
-
const datasource = this.enoDatasourceFactory.getDatasource(EnoDatasourceFactory_1.ENO_ENDPOINT.GEOMETRY, data.source);
|
|
40
|
-
const transformation = new EnoGeometryTransformation_1.EnoGeometryTransformation(data.source);
|
|
41
|
-
const batches = Chunker_1.Slicer.chunkArray(data.listGid, EnoGeometryTask_1.BATCH_SIZE);
|
|
42
|
-
for (const batch of batches) {
|
|
43
|
-
const result = await datasource.getData(EnoOperationEnum_1.ENO_GEOMETRY_OPERATION, "", {
|
|
44
|
-
gidList: batch,
|
|
45
|
-
idOrganizace: constants_1.ENO_DEFAULT_ORGANIZATION_ID,
|
|
46
|
-
});
|
|
47
|
-
if (result) {
|
|
48
|
-
const transformedData = transformation.transformArray(result.return);
|
|
49
|
-
await this.enoGeometryRepository.bulkSave(transformedData);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
catch (err) {
|
|
54
|
-
if (err instanceof golemio_errors_1.AbstractGolemioError) {
|
|
55
|
-
throw err;
|
|
56
|
-
}
|
|
57
|
-
throw new golemio_errors_1.GeneralError("Failed to save ENO geometry data", this.constructor.name, err);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
EnoGeometryTask.BATCH_SIZE = 1000;
|
|
62
|
-
exports.EnoGeometryTask = EnoGeometryTask = EnoGeometryTask_1 = __decorate([
|
|
63
|
-
(0, tsyringe_1.injectable)(),
|
|
64
|
-
__param(0, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoDatasourceFactory)),
|
|
65
|
-
__param(1, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoGeometryRepository)),
|
|
66
|
-
__metadata("design:paramtypes", [EnoDatasourceFactory_1.EnoDatasourceFactory,
|
|
67
|
-
EnoGeometryRepository_1.EnoGeometryRepository])
|
|
68
|
-
], EnoGeometryTask);
|
|
69
|
-
//# sourceMappingURL=EnoGeometryTask.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnoGeometryTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/task/EnoGeometryTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAqF;AACrF,qFAAoG;AACpG,6EAAoF;AACpF,mFAAoF;AACpF,wFAAyF;AACzF,mGAAoG;AACpG,6FAA0F;AAC1F,6EAA8F;AAC9F,iEAAwE;AAExE,qFAAkF;AAClF,mDAAmD;AAG5C,IAAM,eAAe,iDAArB,MAAM,eAAgB,SAAQ,2BAAmC;IAMpE,YAC4D,oBAAkD,EACjD,qBAAoD;QAE7G,KAAK,CAAC,6BAAiB,CAAC,CAAC;QAHuC,yBAAoB,GAApB,oBAAoB,CAAsB;QACzC,0BAA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B,CAAC,oBAAoB,CAAC,CAAA;IACtD,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,qBAAqB,CAAC,CAAA;qCAD8B,2CAAoB;QAClB,6CAAqB;GARxG,eAAe,CAqC3B"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { EnoDatasourceFactory } from "../../datasources/eno/EnoDatasourceFactory";
|
|
2
|
-
import { EnoAddressRepository } from "../../repositories/eno/EnoAddressRepository";
|
|
3
|
-
import { EnoLocationRepository } from "../../repositories/eno/EnoLocationRepository";
|
|
4
|
-
import { EnoPropertyRepository } from "../../repositories/eno/EnoPropertyRepository";
|
|
5
|
-
import { EnoRemovedGIDRepository } from "../../repositories/eno/EnoRemovedGIDRepository";
|
|
6
|
-
import { EnoStructureRepository } from "../../repositories/eno/EnoStructureRepository";
|
|
7
|
-
import { ILogger } from "@golemio/core/dist/helpers";
|
|
8
|
-
import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
|
|
9
|
-
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
10
|
-
import { AbstractTask } from "@golemio/core/dist/integration-engine/workers/AbstractTask";
|
|
11
|
-
import { IEnoDataTaskInput } from "../interfaces/IEnoDataTaskInput";
|
|
12
|
-
import { EnoDataTaskInputSchema } from "../schema/EnoDataTaskInputSchema";
|
|
13
|
-
export declare class EnoStructureTask extends AbstractTask<IEnoDataTaskInput> {
|
|
14
|
-
private enoDatasourceFactory;
|
|
15
|
-
private enoStructureRepository;
|
|
16
|
-
private enoPropertyRepository;
|
|
17
|
-
private enoLocationRepository;
|
|
18
|
-
private enoAddressRepository;
|
|
19
|
-
private enoRemovedGIDRepository;
|
|
20
|
-
private logger;
|
|
21
|
-
protected dbConnector: IDatabaseConnector;
|
|
22
|
-
private simpleConfig;
|
|
23
|
-
protected schema: typeof EnoDataTaskInputSchema;
|
|
24
|
-
queueName: string;
|
|
25
|
-
queueTtl: number;
|
|
26
|
-
private removedBuldingsStartDate;
|
|
27
|
-
private static readonly BATCH_SIZE;
|
|
28
|
-
constructor(enoDatasourceFactory: EnoDatasourceFactory, enoStructureRepository: EnoStructureRepository, enoPropertyRepository: EnoPropertyRepository, enoLocationRepository: EnoLocationRepository, enoAddressRepository: EnoAddressRepository, enoRemovedGIDRepository: EnoRemovedGIDRepository, logger: ILogger, dbConnector: IDatabaseConnector, simpleConfig: ISimpleConfig);
|
|
29
|
-
execute(data: IEnoDataTaskInput): Promise<void>;
|
|
30
|
-
private saveData;
|
|
31
|
-
private getCurrentStructureList;
|
|
32
|
-
private getRemovedStructureList;
|
|
33
|
-
}
|