@golemio/energetics 1.8.3 → 1.9.0-dev.2544690351
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db/migrations/postgresql/20250213141826-add-device-serial-id.js +53 -0
- package/db/migrations/postgresql/20260427093000-enapo-porsenna.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/20260427093000-enapo-porsenna-down.sql +3 -0
- package/db/migrations/postgresql/sqls/20260427093000-enapo-porsenna-up.sql +85 -0
- 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/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/datasources/porsenna/PorsennaDataSource.d.ts +15 -0
- package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSource.js +67 -0
- package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSource.js.map +1 -0
- package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSourceProvider.d.ts +10 -0
- package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSourceProvider.js +52 -0
- package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSourceProvider.js.map +1 -0
- package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IConsumptionApiEntry.d.ts +7 -0
- package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IConsumptionApiEntry.js +3 -0
- package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IConsumptionApiEntry.js.map +1 -0
- package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IGaugeApiDto.d.ts +5 -0
- package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IGaugeApiDto.js +3 -0
- package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IGaugeApiDto.js.map +1 -0
- package/dist/integration-engine/enapo/helpers/IntervalGenerator.d.ts +1 -0
- package/dist/integration-engine/enapo/helpers/IntervalGenerator.js +6 -0
- package/dist/integration-engine/enapo/helpers/IntervalGenerator.js.map +1 -1
- package/dist/integration-engine/enapo/ioc/Di.js +24 -8
- package/dist/integration-engine/enapo/ioc/Di.js.map +1 -1
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.d.ts +8 -0
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js +8 -0
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js.map +1 -1
- package/dist/integration-engine/enapo/repositories/porsenna/PorsennaBuildingsRepository.d.ts +5 -0
- package/dist/integration-engine/enapo/repositories/porsenna/PorsennaBuildingsRepository.js +32 -0
- package/dist/integration-engine/enapo/repositories/porsenna/PorsennaBuildingsRepository.js.map +1 -0
- package/dist/integration-engine/enapo/repositories/porsenna/PorsennaConsumptionRepository.d.ts +5 -0
- package/dist/integration-engine/enapo/repositories/porsenna/PorsennaConsumptionRepository.js +32 -0
- package/dist/integration-engine/enapo/repositories/porsenna/PorsennaConsumptionRepository.js.map +1 -0
- package/dist/integration-engine/enapo/repositories/porsenna/PorsennaDevicesRepository.d.ts +5 -0
- package/dist/integration-engine/enapo/repositories/porsenna/PorsennaDevicesRepository.js +32 -0
- package/dist/integration-engine/enapo/repositories/porsenna/PorsennaDevicesRepository.js.map +1 -0
- package/dist/integration-engine/enapo/transformations/porsenna/PorsennaConsumptionTransformation.d.ts +8 -0
- package/dist/integration-engine/enapo/transformations/porsenna/PorsennaConsumptionTransformation.js +47 -0
- package/dist/integration-engine/enapo/transformations/porsenna/PorsennaConsumptionTransformation.js.map +1 -0
- package/dist/integration-engine/enapo/transformations/porsenna/PorsennaGaugeTransformation.d.ts +15 -0
- package/dist/integration-engine/enapo/transformations/porsenna/PorsennaGaugeTransformation.js +62 -0
- package/dist/integration-engine/enapo/transformations/porsenna/PorsennaGaugeTransformation.js.map +1 -0
- package/dist/integration-engine/enapo/workers/EnapoWorker.js +1 -0
- package/dist/integration-engine/enapo/workers/EnapoWorker.js.map +1 -1
- package/dist/integration-engine/enapo/workers/interfaces/IEnapoPorsennaDistributionParams.d.ts +5 -0
- package/dist/integration-engine/enapo/workers/interfaces/IEnapoPorsennaDistributionParams.js +3 -0
- package/dist/integration-engine/enapo/workers/interfaces/IEnapoPorsennaDistributionParams.js.map +1 -0
- package/dist/integration-engine/enapo/workers/schema/EnapoPorsennaDistributionParamsSchema.d.ts +6 -0
- package/dist/integration-engine/enapo/workers/schema/EnapoPorsennaDistributionParamsSchema.js +34 -0
- package/dist/integration-engine/enapo/workers/schema/EnapoPorsennaDistributionParamsSchema.js.map +1 -0
- package/dist/integration-engine/enapo/workers/task/PorsennaDistributionTask.d.ts +27 -0
- package/dist/integration-engine/enapo/workers/task/PorsennaDistributionTask.js +125 -0
- package/dist/integration-engine/enapo/workers/task/PorsennaDistributionTask.js.map +1 -0
- package/dist/output-gateway/controllers/v2/AbstractController.js +4 -1
- package/dist/output-gateway/controllers/v2/AbstractController.js.map +1 -1
- package/dist/output-gateway/controllers/v2/BuildingsController.js +2 -1
- package/dist/output-gateway/controllers/v2/BuildingsController.js.map +1 -1
- package/dist/output-gateway/controllers/v2/V2DevicesController.js +1 -1
- package/dist/output-gateway/controllers/v2/V2DevicesController.js.map +1 -1
- package/dist/output-gateway/controllers/v2/V2OrganizationsController.js +1 -1
- package/dist/output-gateway/controllers/v2/V2OrganizationsController.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/enapo/porsenna/PorsennaJsonSchema.d.ts +5 -0
- package/dist/schema-definitions/datasources/enapo/porsenna/PorsennaJsonSchema.js +92 -0
- package/dist/schema-definitions/datasources/enapo/porsenna/PorsennaJsonSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IConsumptionApiEntry.d.ts +15 -0
- package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IConsumptionApiEntry.js +3 -0
- package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IConsumptionApiEntry.js.map +1 -0
- package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IGaugeApiDto.d.ts +41 -0
- package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IGaugeApiDto.js +3 -0
- package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IGaugeApiDto.js.map +1 -0
- package/dist/schema-definitions/datasources/interfaces/IStaticMeterSettings.d.ts +3 -2
- 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/IMeasurementDto.d.ts +1 -0
- package/dist/schema-definitions/models/porsenna/PorsennaBuildingsModel.d.ts +21 -0
- package/dist/schema-definitions/models/porsenna/PorsennaBuildingsModel.js +77 -0
- package/dist/schema-definitions/models/porsenna/PorsennaBuildingsModel.js.map +1 -0
- package/dist/schema-definitions/models/porsenna/PorsennaConsumptionModel.d.ts +20 -0
- package/dist/schema-definitions/models/porsenna/PorsennaConsumptionModel.js +72 -0
- package/dist/schema-definitions/models/porsenna/PorsennaConsumptionModel.js.map +1 -0
- package/dist/schema-definitions/models/porsenna/PorsennaDevicesModel.d.ts +27 -0
- package/dist/schema-definitions/models/porsenna/PorsennaDevicesModel.js +107 -0
- package/dist/schema-definitions/models/porsenna/PorsennaDevicesModel.js.map +1 -0
- package/dist/schema-definitions/models/porsenna/index.d.ts +3 -0
- package/dist/schema-definitions/models/porsenna/index.js +20 -0
- package/dist/schema-definitions/models/porsenna/index.js.map +1 -0
- package/dist/schema-definitions/models/porsenna/interfaces/IBuildings.d.ts +11 -0
- package/dist/schema-definitions/models/porsenna/interfaces/IBuildings.js +3 -0
- package/dist/schema-definitions/models/porsenna/interfaces/IBuildings.js.map +1 -0
- package/dist/schema-definitions/models/porsenna/interfaces/IConsumption.d.ts +10 -0
- package/dist/schema-definitions/models/porsenna/interfaces/IConsumption.js +3 -0
- package/dist/schema-definitions/models/porsenna/interfaces/IConsumption.js.map +1 -0
- package/dist/schema-definitions/models/porsenna/interfaces/IDevices.d.ts +17 -0
- package/dist/schema-definitions/models/porsenna/interfaces/IDevices.js +3 -0
- package/dist/schema-definitions/models/porsenna/interfaces/IDevices.js.map +1 -0
- package/docs/implementation_documentation.md +39 -0
- package/package.json +12 -8
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
2
|
+
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
3
|
+
import { IBuildings } from "./interfaces/IBuildings";
|
|
4
|
+
export declare class PorsennaBuildingsModel extends Model<PorsennaBuildingsModel> implements IBuildings {
|
|
5
|
+
static TABLE_NAME: string;
|
|
6
|
+
static REPOSITORY_NAME: string;
|
|
7
|
+
static JSON_SCHEMA_VALIDATOR_NAME: string;
|
|
8
|
+
source: string;
|
|
9
|
+
id: number;
|
|
10
|
+
name: string | null;
|
|
11
|
+
street: string | null;
|
|
12
|
+
house_number: string | null;
|
|
13
|
+
street_number: string | null;
|
|
14
|
+
city: string | null;
|
|
15
|
+
postcode: string | null;
|
|
16
|
+
gid: string | null;
|
|
17
|
+
created_at: Date;
|
|
18
|
+
updated_at: Date | null;
|
|
19
|
+
static attributeModel: ModelAttributes<PorsennaBuildingsModel>;
|
|
20
|
+
static jsonSchema: JSONSchemaType<IBuildings[]>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PorsennaBuildingsModel = void 0;
|
|
4
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
+
class PorsennaBuildingsModel extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.PorsennaBuildingsModel = PorsennaBuildingsModel;
|
|
8
|
+
PorsennaBuildingsModel.TABLE_NAME = "enapo_porsenna_buildings";
|
|
9
|
+
PorsennaBuildingsModel.REPOSITORY_NAME = "PorsennaBuildingsRepository";
|
|
10
|
+
PorsennaBuildingsModel.JSON_SCHEMA_VALIDATOR_NAME = "PorsennaBuildingsModelRepositoryValidator";
|
|
11
|
+
PorsennaBuildingsModel.attributeModel = {
|
|
12
|
+
source: {
|
|
13
|
+
type: sequelize_1.DataTypes.STRING(50),
|
|
14
|
+
primaryKey: true,
|
|
15
|
+
},
|
|
16
|
+
id: {
|
|
17
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
18
|
+
primaryKey: true,
|
|
19
|
+
},
|
|
20
|
+
name: {
|
|
21
|
+
type: sequelize_1.DataTypes.STRING,
|
|
22
|
+
allowNull: true,
|
|
23
|
+
},
|
|
24
|
+
street: {
|
|
25
|
+
type: sequelize_1.DataTypes.STRING,
|
|
26
|
+
allowNull: true,
|
|
27
|
+
},
|
|
28
|
+
house_number: {
|
|
29
|
+
type: sequelize_1.DataTypes.STRING,
|
|
30
|
+
allowNull: true,
|
|
31
|
+
},
|
|
32
|
+
street_number: {
|
|
33
|
+
type: sequelize_1.DataTypes.STRING,
|
|
34
|
+
allowNull: true,
|
|
35
|
+
},
|
|
36
|
+
city: {
|
|
37
|
+
type: sequelize_1.DataTypes.STRING,
|
|
38
|
+
allowNull: true,
|
|
39
|
+
},
|
|
40
|
+
postcode: {
|
|
41
|
+
type: sequelize_1.DataTypes.STRING,
|
|
42
|
+
allowNull: true,
|
|
43
|
+
},
|
|
44
|
+
gid: {
|
|
45
|
+
type: sequelize_1.DataTypes.STRING,
|
|
46
|
+
allowNull: true,
|
|
47
|
+
},
|
|
48
|
+
created_at: {
|
|
49
|
+
type: sequelize_1.DataTypes.DATE,
|
|
50
|
+
defaultValue: sequelize_1.DataTypes.NOW,
|
|
51
|
+
allowNull: true,
|
|
52
|
+
},
|
|
53
|
+
updated_at: {
|
|
54
|
+
type: sequelize_1.DataTypes.DATE,
|
|
55
|
+
allowNull: true,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
PorsennaBuildingsModel.jsonSchema = {
|
|
59
|
+
type: "array",
|
|
60
|
+
items: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
source: { type: "string" },
|
|
64
|
+
id: { type: "integer" },
|
|
65
|
+
name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
66
|
+
street: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
67
|
+
house_number: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
68
|
+
street_number: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
69
|
+
city: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
70
|
+
postcode: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
71
|
+
gid: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
72
|
+
},
|
|
73
|
+
additionalProperties: false,
|
|
74
|
+
required: ["source", "id"],
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=PorsennaBuildingsModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PorsennaBuildingsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/porsenna/PorsennaBuildingsModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAIxF,MAAa,sBAAuB,SAAQ,iBAA6B;;AAAzE,wDAoFC;AAnFiB,iCAAU,GAAG,0BAA0B,CAAC;AACxC,sCAAe,GAAG,6BAA6B,CAAC;AAChD,iDAA0B,GAAG,2CAA2C,CAAC;AAczE,qCAAc,GAA4C;IACpE,MAAM,EAAE;QACJ,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,UAAU,EAAE,IAAI;KACnB;IACD,EAAE,EAAE;QACA,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,UAAU,EAAE,IAAI;KACnB;IACD,IAAI,EAAE;QACF,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,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AAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC/E,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAChF,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YACvE,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC3E,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;SACzE;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;KAC7B;CACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
2
|
+
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
3
|
+
import { IConsumption } from "./interfaces/IConsumption";
|
|
4
|
+
export declare class PorsennaConsumptionModel extends Model<PorsennaConsumptionModel> implements IConsumption {
|
|
5
|
+
static TABLE_NAME: string;
|
|
6
|
+
static REPOSITORY_NAME: string;
|
|
7
|
+
static JSON_SCHEMA_VALIDATOR_NAME: string;
|
|
8
|
+
source: string;
|
|
9
|
+
device_id: string;
|
|
10
|
+
var: string;
|
|
11
|
+
period: string;
|
|
12
|
+
value: number;
|
|
13
|
+
unit: string;
|
|
14
|
+
commodity: string | null;
|
|
15
|
+
count: number | null;
|
|
16
|
+
created_at: Date;
|
|
17
|
+
updated_at: Date | null;
|
|
18
|
+
static attributeModel: ModelAttributes<PorsennaConsumptionModel>;
|
|
19
|
+
static jsonSchema: JSONSchemaType<IConsumption[]>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PorsennaConsumptionModel = void 0;
|
|
4
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
+
class PorsennaConsumptionModel extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.PorsennaConsumptionModel = PorsennaConsumptionModel;
|
|
8
|
+
PorsennaConsumptionModel.TABLE_NAME = "enapo_porsenna_consumption";
|
|
9
|
+
PorsennaConsumptionModel.REPOSITORY_NAME = "PorsennaConsumptionRepository";
|
|
10
|
+
PorsennaConsumptionModel.JSON_SCHEMA_VALIDATOR_NAME = "PorsennaConsumptionModelRepositoryValidator";
|
|
11
|
+
PorsennaConsumptionModel.attributeModel = {
|
|
12
|
+
source: {
|
|
13
|
+
type: sequelize_1.DataTypes.STRING(50),
|
|
14
|
+
primaryKey: true,
|
|
15
|
+
},
|
|
16
|
+
device_id: {
|
|
17
|
+
type: sequelize_1.DataTypes.UUID,
|
|
18
|
+
primaryKey: true,
|
|
19
|
+
},
|
|
20
|
+
var: {
|
|
21
|
+
type: sequelize_1.DataTypes.STRING(20),
|
|
22
|
+
primaryKey: true,
|
|
23
|
+
},
|
|
24
|
+
period: {
|
|
25
|
+
type: sequelize_1.DataTypes.STRING(20),
|
|
26
|
+
primaryKey: true,
|
|
27
|
+
},
|
|
28
|
+
value: {
|
|
29
|
+
type: sequelize_1.DataTypes.DECIMAL(30, 15),
|
|
30
|
+
allowNull: false,
|
|
31
|
+
},
|
|
32
|
+
unit: {
|
|
33
|
+
type: sequelize_1.DataTypes.STRING(20),
|
|
34
|
+
allowNull: false,
|
|
35
|
+
},
|
|
36
|
+
commodity: {
|
|
37
|
+
type: sequelize_1.DataTypes.STRING(20),
|
|
38
|
+
allowNull: true,
|
|
39
|
+
},
|
|
40
|
+
count: {
|
|
41
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
42
|
+
allowNull: true,
|
|
43
|
+
},
|
|
44
|
+
created_at: {
|
|
45
|
+
type: sequelize_1.DataTypes.DATE,
|
|
46
|
+
defaultValue: sequelize_1.DataTypes.NOW,
|
|
47
|
+
allowNull: true,
|
|
48
|
+
},
|
|
49
|
+
updated_at: {
|
|
50
|
+
type: sequelize_1.DataTypes.DATE,
|
|
51
|
+
allowNull: true,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
PorsennaConsumptionModel.jsonSchema = {
|
|
55
|
+
type: "array",
|
|
56
|
+
items: {
|
|
57
|
+
type: "object",
|
|
58
|
+
properties: {
|
|
59
|
+
source: { type: "string" },
|
|
60
|
+
device_id: { type: "string" },
|
|
61
|
+
var: { type: "string" },
|
|
62
|
+
period: { type: "string" },
|
|
63
|
+
value: { type: "number" },
|
|
64
|
+
unit: { type: "string" },
|
|
65
|
+
commodity: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
66
|
+
count: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
|
|
67
|
+
},
|
|
68
|
+
additionalProperties: false,
|
|
69
|
+
required: ["source", "device_id", "var", "period", "value", "unit"],
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=PorsennaConsumptionModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PorsennaConsumptionModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/porsenna/PorsennaConsumptionModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAIxF,MAAa,wBAAyB,SAAQ,iBAA+B;;AAA7E,4DA8EC;AA7EiB,mCAAU,GAAG,4BAA4B,CAAC;AAC1C,wCAAe,GAAG,+BAA+B,CAAC;AAClD,mDAA0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IAAI,EAAE,QAAQ,EAAE;YAC7B,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC5E,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;SAC5E;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC;KACtE;CACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
2
|
+
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
3
|
+
import { IDevices } from "./interfaces/IDevices";
|
|
4
|
+
export declare class PorsennaDevicesModel extends Model<PorsennaDevicesModel> implements IDevices {
|
|
5
|
+
static TABLE_NAME: string;
|
|
6
|
+
static REPOSITORY_NAME: string;
|
|
7
|
+
static JSON_SCHEMA_VALIDATOR_NAME: string;
|
|
8
|
+
source: string;
|
|
9
|
+
id: string;
|
|
10
|
+
building_id: number | null;
|
|
11
|
+
parent_device_id: string | null;
|
|
12
|
+
level: string | null;
|
|
13
|
+
type: string | null;
|
|
14
|
+
name: string | null;
|
|
15
|
+
measurement_target: string | null;
|
|
16
|
+
disabled_at: string | null;
|
|
17
|
+
disable_reason_id: number | null;
|
|
18
|
+
show_in_output: boolean | null;
|
|
19
|
+
identifier: string | null;
|
|
20
|
+
supply_point_number: string | null;
|
|
21
|
+
meter_number: string | null;
|
|
22
|
+
identification_gid: string | null;
|
|
23
|
+
created_at: Date;
|
|
24
|
+
updated_at: Date | null;
|
|
25
|
+
static attributeModel: ModelAttributes<PorsennaDevicesModel>;
|
|
26
|
+
static jsonSchema: JSONSchemaType<IDevices[]>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PorsennaDevicesModel = void 0;
|
|
4
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
+
class PorsennaDevicesModel extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.PorsennaDevicesModel = PorsennaDevicesModel;
|
|
8
|
+
PorsennaDevicesModel.TABLE_NAME = "enapo_porsenna_devices";
|
|
9
|
+
PorsennaDevicesModel.REPOSITORY_NAME = "PorsennaDevicesRepository";
|
|
10
|
+
PorsennaDevicesModel.JSON_SCHEMA_VALIDATOR_NAME = "PorsennaDevicesModelRepositoryValidator";
|
|
11
|
+
PorsennaDevicesModel.attributeModel = {
|
|
12
|
+
source: {
|
|
13
|
+
type: sequelize_1.DataTypes.STRING(50),
|
|
14
|
+
primaryKey: true,
|
|
15
|
+
},
|
|
16
|
+
id: {
|
|
17
|
+
type: sequelize_1.DataTypes.UUID,
|
|
18
|
+
primaryKey: true,
|
|
19
|
+
},
|
|
20
|
+
building_id: {
|
|
21
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
22
|
+
allowNull: true,
|
|
23
|
+
},
|
|
24
|
+
parent_device_id: {
|
|
25
|
+
type: sequelize_1.DataTypes.UUID,
|
|
26
|
+
allowNull: true,
|
|
27
|
+
},
|
|
28
|
+
level: {
|
|
29
|
+
type: sequelize_1.DataTypes.STRING,
|
|
30
|
+
allowNull: true,
|
|
31
|
+
},
|
|
32
|
+
type: {
|
|
33
|
+
type: sequelize_1.DataTypes.STRING,
|
|
34
|
+
allowNull: true,
|
|
35
|
+
},
|
|
36
|
+
name: {
|
|
37
|
+
type: sequelize_1.DataTypes.STRING,
|
|
38
|
+
allowNull: true,
|
|
39
|
+
},
|
|
40
|
+
measurement_target: {
|
|
41
|
+
type: sequelize_1.DataTypes.STRING,
|
|
42
|
+
allowNull: true,
|
|
43
|
+
},
|
|
44
|
+
disabled_at: {
|
|
45
|
+
type: sequelize_1.DataTypes.DATE,
|
|
46
|
+
allowNull: true,
|
|
47
|
+
},
|
|
48
|
+
disable_reason_id: {
|
|
49
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
50
|
+
allowNull: true,
|
|
51
|
+
},
|
|
52
|
+
show_in_output: {
|
|
53
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
54
|
+
allowNull: true,
|
|
55
|
+
},
|
|
56
|
+
identifier: {
|
|
57
|
+
type: sequelize_1.DataTypes.STRING,
|
|
58
|
+
allowNull: true,
|
|
59
|
+
},
|
|
60
|
+
supply_point_number: {
|
|
61
|
+
type: sequelize_1.DataTypes.STRING,
|
|
62
|
+
allowNull: true,
|
|
63
|
+
},
|
|
64
|
+
meter_number: {
|
|
65
|
+
type: sequelize_1.DataTypes.STRING,
|
|
66
|
+
allowNull: true,
|
|
67
|
+
},
|
|
68
|
+
identification_gid: {
|
|
69
|
+
type: sequelize_1.DataTypes.STRING,
|
|
70
|
+
allowNull: true,
|
|
71
|
+
},
|
|
72
|
+
created_at: {
|
|
73
|
+
type: sequelize_1.DataTypes.DATE,
|
|
74
|
+
defaultValue: sequelize_1.DataTypes.NOW,
|
|
75
|
+
allowNull: true,
|
|
76
|
+
},
|
|
77
|
+
updated_at: {
|
|
78
|
+
type: sequelize_1.DataTypes.DATE,
|
|
79
|
+
allowNull: true,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
PorsennaDevicesModel.jsonSchema = {
|
|
83
|
+
type: "array",
|
|
84
|
+
items: {
|
|
85
|
+
type: "object",
|
|
86
|
+
properties: {
|
|
87
|
+
source: { type: "string" },
|
|
88
|
+
id: { type: "string" },
|
|
89
|
+
building_id: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
|
|
90
|
+
parent_device_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
91
|
+
level: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
92
|
+
type: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
93
|
+
name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
94
|
+
measurement_target: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
95
|
+
disabled_at: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
96
|
+
disable_reason_id: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
|
|
97
|
+
show_in_output: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
|
|
98
|
+
identifier: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
99
|
+
supply_point_number: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
100
|
+
meter_number: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
101
|
+
identification_gid: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
102
|
+
},
|
|
103
|
+
additionalProperties: false,
|
|
104
|
+
required: ["source", "id"],
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=PorsennaDevicesModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PorsennaDevicesModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/porsenna/PorsennaDevicesModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAIxF,MAAa,oBAAqB,SAAQ,iBAA2B;;AAArE,oDAwHC;AAvHiB,+BAAU,GAAG,wBAAwB,CAAC;AACtC,oCAAe,GAAG,2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ACxF;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;KAC7B;CACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./PorsennaBuildingsModel"), exports);
|
|
18
|
+
__exportStar(require("./PorsennaDevicesModel"), exports);
|
|
19
|
+
__exportStar(require("./PorsennaConsumptionModel"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/porsenna/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,yDAAuC;AACvC,6DAA2C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IBuildings.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/models/porsenna/interfaces/IBuildings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConsumption.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/models/porsenna/interfaces/IConsumption.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IDevices {
|
|
2
|
+
source: string;
|
|
3
|
+
id: string;
|
|
4
|
+
building_id: number | null;
|
|
5
|
+
parent_device_id: string | null;
|
|
6
|
+
level: string | null;
|
|
7
|
+
type: string | null;
|
|
8
|
+
name: string | null;
|
|
9
|
+
measurement_target: string | null;
|
|
10
|
+
disabled_at: string | null;
|
|
11
|
+
disable_reason_id: number | null;
|
|
12
|
+
show_in_output: boolean | null;
|
|
13
|
+
identifier: string | null;
|
|
14
|
+
supply_point_number: string | null;
|
|
15
|
+
meter_number: string | null;
|
|
16
|
+
identification_gid: string | null;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDevices.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/models/porsenna/interfaces/IDevices.ts"],"names":[],"mappings":""}
|
|
@@ -46,6 +46,8 @@ https://gitlab.com/operator-ict/golemio/projekty/energetika/p0262.prevzeti-energ
|
|
|
46
46
|
- Jedná se o odběratele různých kategorií odběru („A“ „C“ „MO“), konkrétně: účet Hl. m. Praha = „C“; Hlavní m. Praha = „MO“ a HlavníměstoPraha64581_1 = „A“
|
|
47
47
|
- Azure Blob Storage
|
|
48
48
|
- Mapovací JSON pro měření přímo od poskytovatelů komodit
|
|
49
|
+
- Porsenna e-Manazer API
|
|
50
|
+
- Měřidla a roční spotřeby pro P7
|
|
49
51
|
|
|
50
52
|
#### _OICT Energetika_
|
|
51
53
|
|
|
@@ -209,6 +211,21 @@ https://gitlab.com/operator-ict/golemio/projekty/energetika/p0262.prevzeti-energ
|
|
|
209
211
|
- Geometrie:
|
|
210
212
|
- `getGeometrie` - získání geometrie (polygonů) pro seznam GID budov/staveb
|
|
211
213
|
|
|
214
|
+
#### _Porsenna (e-Manazer) REST API_
|
|
215
|
+
|
|
216
|
+
- zdroj dat
|
|
217
|
+
- url: https://api.e-manazer.cz/gauges (module.energetics.enapo.porsenna.url)
|
|
218
|
+
- autentizace: Bearer token (module.energetics.enapo.porsenna.token)
|
|
219
|
+
- source identifikátor: `porsenna_p7`
|
|
220
|
+
- formát dat
|
|
221
|
+
- protokol: http (REST)
|
|
222
|
+
- datový typ: json (Hydra kolekce se stránkováním)
|
|
223
|
+
- validační schémata: [PorsennaJsonSchema](../src/schema-definitions/datasources/enapo/porsenna/PorsennaJsonSchema.ts)
|
|
224
|
+
- datasource
|
|
225
|
+
- [PorsennaDataSource](../src/integration-engine/enapo/datasources/porsenna/PorsennaDataSource.ts)
|
|
226
|
+
- `generateAsyncPages()` - stránkované získání všech měřidel
|
|
227
|
+
- `getGaugeConsumption(id, from, to)` - roční spotřeba pro jedno měřidlo
|
|
228
|
+
|
|
212
229
|
## Zpracování dat / transformace
|
|
213
230
|
|
|
214
231
|
Všechny tabulky se nachází ve schématu `energetics`
|
|
@@ -689,6 +706,28 @@ Task stahuje fakturační data distribuce od PPAS včetně informací o fakturá
|
|
|
689
706
|
- [PpasDistributionInvoiceDeviceModel](../src/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceDeviceModel.ts) tabulka `ppas_distribution_invoice_device` - zařízení a odečty
|
|
690
707
|
- [PpasDistributionInvoicePriceModel](../src/schema-definitions/models/enapo/ppas/PpasDistributionInvoicePriceModel.ts) tabulka `ppas_distribution_invoice_price` - cenové položky
|
|
691
708
|
|
|
709
|
+
#### _task: PorsennaDistributionTask_
|
|
710
|
+
|
|
711
|
+
Task stahuje data o měřidlech a spotřebách z Porsenna API (e-Manazer).
|
|
712
|
+
|
|
713
|
+
- vstupní rabbitmq fronta
|
|
714
|
+
- název: dataplatform.enapoenergetics.fetchPorsennaDistribution
|
|
715
|
+
- TTL: 1 hodina
|
|
716
|
+
- parametry: `{ yearFrom, yearTo }`
|
|
717
|
+
- validační schéma: [EnapoPorsennaDistributionParamsSchema](../src/integration-engine/enapo/workers/schema/EnapoPorsennaDistributionParamsSchema.ts)
|
|
718
|
+
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
719
|
+
- žádné
|
|
720
|
+
- datové zdroje
|
|
721
|
+
- Porsenna e-Manazer API
|
|
722
|
+
- [PorsennaDataSource](../src/integration-engine/enapo/datasources/porsenna/PorsennaDataSource.ts)
|
|
723
|
+
- transformace
|
|
724
|
+
- [PorsennaGaugeTransformation](../src/integration-engine/enapo/transformations/porsenna/PorsennaGaugeTransformation.ts) - transformace měřidel na budovy a zařízení
|
|
725
|
+
- [PorsennaConsumptionTransformation](../src/integration-engine/enapo/transformations/porsenna/PorsennaConsumptionTransformation.ts) - transformace spotřeb
|
|
726
|
+
- data modely
|
|
727
|
+
- [PorsennaBuildingsModel](../src/schema-definitions/models/porsenna/PorsennaBuildingsModel.ts) tabulka `enapo_porsenna_buildings`
|
|
728
|
+
- [PorsennaDevicesModel](../src/schema-definitions/models/porsenna/PorsennaDevicesModel.ts) tabulka `enapo_porsenna_devices`
|
|
729
|
+
- [PorsennaConsumptionModel](../src/schema-definitions/models/porsenna/PorsennaConsumptionModel.ts) tabulka `enapo_porsenna_consumption`
|
|
730
|
+
|
|
692
731
|
## Uložení dat
|
|
693
732
|
|
|
694
733
|
- typ databáze
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/energetics",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0-dev.2544690351",
|
|
4
4
|
"description": "Golemio Energetics Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
"url": "https://gitlab.com/operator-ict/golemio/code/modules/energetics"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
35
|
-
"npm": ">=
|
|
34
|
+
"node": ">=24.0.0",
|
|
35
|
+
"npm": ">=11.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@apideck/portman": "^1.26.5",
|
|
39
39
|
"@commitlint/cli": "^11.0.0",
|
|
40
40
|
"@commitlint/config-conventional": "^11.0.0",
|
|
41
41
|
"@golemio/cli": "1.11.2",
|
|
42
|
-
"@golemio/core": "3.
|
|
42
|
+
"@golemio/core": "^3.0.7-dev.2498788773",
|
|
43
43
|
"@golemio/db-common": "1.2.2",
|
|
44
44
|
"@golemio/eslint-config": "1.1.3",
|
|
45
45
|
"@types/adm-zip": "^0.5.8",
|
|
46
46
|
"@types/chai": "^5.2.3",
|
|
47
47
|
"@types/chai-as-promised": "^8.0.2",
|
|
48
48
|
"@types/mocha": "^10.0.10",
|
|
49
|
-
"@types/node": "^
|
|
49
|
+
"@types/node": "^24.12.4",
|
|
50
50
|
"@types/papaparse": "^5.3.14",
|
|
51
51
|
"@types/sinon": "^21.0.0",
|
|
52
52
|
"@types/supertest": "^6.0.3",
|
|
@@ -80,9 +80,13 @@
|
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"adm-zip": "^0.5.16",
|
|
83
|
-
"basic-ftp": "^
|
|
83
|
+
"basic-ftp": "^6.0.1",
|
|
84
84
|
"JSONStream": "^1.3.5",
|
|
85
|
-
"soap": "^1.
|
|
85
|
+
"soap": "^1.9.1"
|
|
86
86
|
},
|
|
87
|
-
"overrides": {
|
|
87
|
+
"overrides": {
|
|
88
|
+
"soap": {
|
|
89
|
+
"@xmldom/xmldom": "0.9.10"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
88
92
|
}
|