@golemio/energetics 1.3.5 → 1.3.7-dev.1315648116
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 +6 -0
- package/db/example/01_buildings.sql +206 -0
- package/db/example/02_organizations.sql +24 -0
- package/db/example/03_devices.sql +24 -0
- package/db/migrations/postgresql/.config.json +1 -1
- package/db/migrations/postgresql/20240514074033-buildings.js +53 -0
- package/db/migrations/postgresql/20240514111900-organizations.js +53 -0
- package/db/migrations/postgresql/sqls/20240514074033-buildings-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20240514074033-buildings-up.sql +138 -0
- package/db/migrations/postgresql/sqls/20240514111900-organizations-down.sql +3 -0
- package/db/migrations/postgresql/sqls/20240514111900-organizations-up.sql +37 -0
- package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js +0 -2
- package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js.map +1 -1
- package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js +0 -4
- package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js.map +1 -1
- package/dist/output-gateway/constants/Links.d.ts +3 -0
- package/dist/output-gateway/constants/Links.js +7 -0
- package/dist/output-gateway/constants/Links.js.map +1 -0
- package/dist/output-gateway/constants/RouteVersion.d.ts +3 -0
- package/dist/output-gateway/constants/RouteVersion.js +8 -0
- package/dist/output-gateway/constants/RouteVersion.js.map +1 -0
- package/dist/output-gateway/controllers/v2/BuildingsController.d.ts +11 -0
- package/dist/output-gateway/controllers/v2/BuildingsController.js +74 -0
- package/dist/output-gateway/controllers/v2/BuildingsController.js.map +1 -0
- package/dist/output-gateway/controllers/v2/V2DevicesController.d.ts +11 -0
- package/dist/output-gateway/controllers/v2/V2DevicesController.js +67 -0
- package/dist/output-gateway/controllers/v2/V2DevicesController.js.map +1 -0
- package/dist/output-gateway/controllers/v2/V2OrganizationsController.d.ts +13 -0
- package/dist/output-gateway/controllers/v2/V2OrganizationsController.js +79 -0
- package/dist/output-gateway/controllers/v2/V2OrganizationsController.js.map +1 -0
- package/dist/output-gateway/helpers/CreateLinkHelper.d.ts +6 -0
- package/dist/output-gateway/helpers/CreateLinkHelper.js +32 -0
- package/dist/output-gateway/helpers/CreateLinkHelper.js.map +1 -0
- package/dist/output-gateway/index.d.ts +1 -0
- package/dist/output-gateway/index.js +10 -0
- package/dist/output-gateway/index.js.map +1 -0
- package/dist/output-gateway/ioc/Di.d.ts +3 -0
- package/dist/output-gateway/ioc/Di.js +51 -0
- package/dist/output-gateway/ioc/Di.js.map +1 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +22 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js +26 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -0
- package/dist/output-gateway/models/BuildingsPrimaryModel.d.ts +17 -0
- package/dist/output-gateway/models/BuildingsPrimaryModel.js +49 -0
- package/dist/output-gateway/models/BuildingsPrimaryModel.js.map +1 -0
- package/dist/output-gateway/models/BuildingsSecondaryModel.d.ts +124 -0
- package/dist/output-gateway/models/BuildingsSecondaryModel.js +338 -0
- package/dist/output-gateway/models/BuildingsSecondaryModel.js.map +1 -0
- package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.d.ts +6 -0
- package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.js +2 -0
- package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.js.map +1 -0
- package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.d.ts +156 -0
- package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.js +3 -0
- package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.js.map +1 -0
- package/dist/output-gateway/models/interfaces/IPrimaryBuildings.d.ts +10 -0
- package/dist/output-gateway/models/interfaces/IPrimaryBuildings.js +3 -0
- package/dist/output-gateway/models/interfaces/IPrimaryBuildings.js.map +1 -0
- package/dist/output-gateway/models/interfaces/ISecondaryBuildings.d.ts +114 -0
- package/dist/output-gateway/models/interfaces/ISecondaryBuildings.js +3 -0
- package/dist/output-gateway/models/interfaces/ISecondaryBuildings.js.map +1 -0
- package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.d.ts +117 -0
- package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.js +3 -0
- package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.js.map +1 -0
- package/dist/output-gateway/repositories/DevicesRepository.d.ts +8 -0
- package/dist/output-gateway/repositories/DevicesRepository.js +64 -0
- package/dist/output-gateway/repositories/DevicesRepository.js.map +1 -0
- package/dist/output-gateway/repositories/OrganizationBuildingsRepository.d.ts +6 -0
- package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js +47 -0
- package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js.map +1 -0
- package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.d.ts +6 -0
- package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js +47 -0
- package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js.map +1 -0
- package/dist/output-gateway/repositories/OrganizationsRepository.d.ts +17 -0
- package/dist/output-gateway/repositories/OrganizationsRepository.js +133 -0
- package/dist/output-gateway/repositories/OrganizationsRepository.js.map +1 -0
- package/dist/output-gateway/repositories/PrimaryBuildingsRepository.d.ts +15 -0
- package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js +86 -0
- package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js.map +1 -0
- package/dist/output-gateway/repositories/SecondaryBuildingsRepository.d.ts +6 -0
- package/dist/output-gateway/repositories/SecondaryBuildingsRepository.js +33 -0
- package/dist/output-gateway/repositories/SecondaryBuildingsRepository.js.map +1 -0
- package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.d.ts +9 -0
- package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.js +47 -0
- package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.js.map +1 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.d.ts +5 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.js +3 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.js.map +1 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.d.ts +18 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.js +3 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.js.map +1 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationDto.d.ts +4 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationDto.js +3 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationDto.js.map +1 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.d.ts +8 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.js +3 -0
- package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.js.map +1 -0
- package/dist/output-gateway/routers/helpers/parseParams.d.ts +4 -0
- package/dist/output-gateway/routers/helpers/parseParams.js +17 -0
- package/dist/output-gateway/routers/helpers/parseParams.js.map +1 -0
- package/dist/output-gateway/routers/interfaces/IDeviceResponse.d.ts +6 -0
- package/dist/output-gateway/routers/interfaces/IDeviceResponse.js +3 -0
- package/dist/output-gateway/routers/interfaces/IDeviceResponse.js.map +1 -0
- package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.d.ts +34 -0
- package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.js +3 -0
- package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.js.map +1 -0
- package/dist/output-gateway/routers/interfaces/IOrganizationResponse.d.ts +4 -0
- package/dist/output-gateway/routers/interfaces/IOrganizationResponse.js +3 -0
- package/dist/output-gateway/routers/interfaces/IOrganizationResponse.js.map +1 -0
- package/dist/output-gateway/routers/interfaces/IPaginationParams.d.ts +4 -0
- package/dist/output-gateway/routers/interfaces/IPaginationParams.js +3 -0
- package/dist/output-gateway/routers/interfaces/IPaginationParams.js.map +1 -0
- package/dist/output-gateway/routers/v2/BuildingsRouter.d.ts +10 -0
- package/dist/output-gateway/routers/v2/BuildingsRouter.js +28 -0
- package/dist/output-gateway/routers/v2/BuildingsRouter.js.map +1 -0
- package/dist/output-gateway/routers/v2/V2DevicesRouter.d.ts +7 -0
- package/dist/output-gateway/routers/v2/V2DevicesRouter.js +41 -0
- package/dist/output-gateway/routers/v2/V2DevicesRouter.js.map +1 -0
- package/dist/output-gateway/routers/v2/V2OrganizationsRouter.d.ts +7 -0
- package/dist/output-gateway/routers/v2/V2OrganizationsRouter.js +41 -0
- package/dist/output-gateway/routers/v2/V2OrganizationsRouter.js.map +1 -0
- package/dist/output-gateway/transformations/BuildingTransformationFull.d.ts +14 -0
- package/dist/output-gateway/transformations/BuildingTransformationFull.js +218 -0
- package/dist/output-gateway/transformations/BuildingTransformationFull.js.map +1 -0
- package/dist/output-gateway/transformations/BuildingsTransformation.d.ts +8 -0
- package/dist/output-gateway/transformations/BuildingsTransformation.js +38 -0
- package/dist/output-gateway/transformations/BuildingsTransformation.js.map +1 -0
- package/dist/output-gateway/transformations/DeviceDtoTransformation.d.ts +8 -0
- package/dist/output-gateway/transformations/DeviceDtoTransformation.js +43 -0
- package/dist/output-gateway/transformations/DeviceDtoTransformation.js.map +1 -0
- package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.d.ts +9 -0
- package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js +64 -0
- package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js.map +1 -0
- package/dist/output-gateway/transformations/OrganizationDtoTransformation.d.ts +9 -0
- package/dist/output-gateway/transformations/OrganizationDtoTransformation.js +36 -0
- package/dist/output-gateway/transformations/OrganizationDtoTransformation.js.map +1 -0
- package/dist/schema-definitions/models/OrganizationBuildingModel.d.ts +10 -0
- package/dist/schema-definitions/models/OrganizationBuildingModel.js +33 -0
- package/dist/schema-definitions/models/OrganizationBuildingModel.js.map +1 -0
- package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.d.ts +16 -0
- package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.js +44 -0
- package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.js.map +1 -0
- package/dist/schema-definitions/models/OrganizationsModel.d.ts +21 -0
- package/dist/schema-definitions/models/OrganizationsModel.js +59 -0
- package/dist/schema-definitions/models/OrganizationsModel.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.d.ts +4 -0
- package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.js +3 -0
- package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.d.ts +10 -0
- package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.js +3 -0
- package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.js.map +1 -0
- package/dist/schema-definitions/models/interfaces/IOrganizationsModel.d.ts +15 -0
- package/dist/schema-definitions/models/interfaces/IOrganizationsModel.js +3 -0
- package/dist/schema-definitions/models/interfaces/IOrganizationsModel.js.map +1 -0
- package/docs/implementation_documentation.md +41 -41
- package/docs/openapi-output.yaml +854 -0
- package/package.json +5 -3
- package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.d.ts +0 -4
- package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.js +0 -19
- package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.js.map +0 -1
- package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.d.ts +0 -4
- package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.js +0 -19
- package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.js.map +0 -1
- package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.d.ts +0 -9
- package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.js +0 -44
- package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.js.map +0 -1
- package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.d.ts +0 -9
- package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.js +0 -44
- package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.js.map +0 -1
- package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.d.ts +0 -7
- package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.js +0 -166
- package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.js.map +0 -1
- package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.d.ts +0 -7
- package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.js +0 -41
- package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.js.map +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrganizationResponsibleUsersModel = void 0;
|
|
4
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
+
class OrganizationResponsibleUsersModel extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.OrganizationResponsibleUsersModel = OrganizationResponsibleUsersModel;
|
|
8
|
+
OrganizationResponsibleUsersModel.TABLE_NAME = "organization_responsible_users";
|
|
9
|
+
OrganizationResponsibleUsersModel.attributeModel = {
|
|
10
|
+
id: {
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
13
|
+
allowNull: false,
|
|
14
|
+
},
|
|
15
|
+
first_name: { type: sequelize_1.DataTypes.STRING(100) },
|
|
16
|
+
last_name: { type: sequelize_1.DataTypes.STRING(100) },
|
|
17
|
+
position: { type: sequelize_1.DataTypes.STRING(100) },
|
|
18
|
+
phone: { type: sequelize_1.DataTypes.STRING(50) },
|
|
19
|
+
mail: { type: sequelize_1.DataTypes.STRING(50) },
|
|
20
|
+
company: { type: sequelize_1.DataTypes.STRING(100) },
|
|
21
|
+
organization_id: {
|
|
22
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
23
|
+
allowNull: false,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
OrganizationResponsibleUsersModel.arrayJsonSchema = {
|
|
27
|
+
type: "array",
|
|
28
|
+
items: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
id: { type: "number" },
|
|
32
|
+
first_name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
33
|
+
last_name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
34
|
+
position: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
35
|
+
phone: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
36
|
+
mail: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
37
|
+
company: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
38
|
+
organization_id: { type: "number" },
|
|
39
|
+
},
|
|
40
|
+
additionalProperties: false,
|
|
41
|
+
required: ["id", "organization_id"],
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=OrganizationResponsibleUsersModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationResponsibleUsersModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/OrganizationResponsibleUsersModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAIxF,MAAa,iCACT,SAAQ,iBAAwC;;AADpD,8EAmDC;AA/CiB,4CAAU,GAAG,gCAAgC,CAAC;AAW9C,gDAAc,GAAuD;IAC/E,EAAE,EAAE;QACA,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;IAC3C,SAAS,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MA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E,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YACvE,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC1E,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACtC;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,CAAC;KACtC;CACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
2
|
+
import { IOrganizationsModel } from "./interfaces/IOrganizationsModel";
|
|
3
|
+
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
4
|
+
export declare class OrganizationsModel extends Model<OrganizationsModel> implements IOrganizationsModel {
|
|
5
|
+
static TABLE_NAME: string;
|
|
6
|
+
id: number;
|
|
7
|
+
name: string | null;
|
|
8
|
+
label: string | null;
|
|
9
|
+
address_street: string | null;
|
|
10
|
+
address_house_number: string | null;
|
|
11
|
+
address_city: string | null;
|
|
12
|
+
address_country: string | null;
|
|
13
|
+
address_mail: string | null;
|
|
14
|
+
address_phone: string | null;
|
|
15
|
+
address_web_address: string | null;
|
|
16
|
+
category: string | null;
|
|
17
|
+
created_by_id: number | null;
|
|
18
|
+
grafana_url: string | null;
|
|
19
|
+
static attributeModel: ModelAttributes<OrganizationsModel>;
|
|
20
|
+
static arrayJsonSchema: JSONSchemaType<IOrganizationsModel[]>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrganizationsModel = void 0;
|
|
4
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
+
class OrganizationsModel extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.OrganizationsModel = OrganizationsModel;
|
|
8
|
+
OrganizationsModel.TABLE_NAME = "organizations";
|
|
9
|
+
OrganizationsModel.attributeModel = {
|
|
10
|
+
id: {
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
13
|
+
},
|
|
14
|
+
name: { type: sequelize_1.DataTypes.STRING(100) },
|
|
15
|
+
label: { type: sequelize_1.DataTypes.STRING(50) },
|
|
16
|
+
address_street: { type: sequelize_1.DataTypes.STRING(100) },
|
|
17
|
+
address_house_number: { type: sequelize_1.DataTypes.STRING(100) },
|
|
18
|
+
address_city: { type: sequelize_1.DataTypes.STRING(100) },
|
|
19
|
+
address_country: { type: sequelize_1.DataTypes.STRING(100) },
|
|
20
|
+
address_mail: { type: sequelize_1.DataTypes.STRING(100) },
|
|
21
|
+
address_phone: { type: sequelize_1.DataTypes.STRING(50) },
|
|
22
|
+
address_web_address: { type: sequelize_1.DataTypes.STRING(100) },
|
|
23
|
+
category: { type: sequelize_1.DataTypes.STRING(80) },
|
|
24
|
+
created_by_id: { type: sequelize_1.DataTypes.INTEGER },
|
|
25
|
+
grafana_url: { type: sequelize_1.DataTypes.STRING(255) },
|
|
26
|
+
};
|
|
27
|
+
OrganizationsModel.arrayJsonSchema = {
|
|
28
|
+
type: "array",
|
|
29
|
+
items: {
|
|
30
|
+
type: "object",
|
|
31
|
+
properties: {
|
|
32
|
+
id: { type: "number" },
|
|
33
|
+
name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
34
|
+
label: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
35
|
+
address_street: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
36
|
+
address_house_number: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
37
|
+
address_city: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
38
|
+
address_country: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
39
|
+
address_mail: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
40
|
+
address_phone: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
41
|
+
address_web_address: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
42
|
+
category: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
43
|
+
created_by_id: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
|
|
44
|
+
grafana_url: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
45
|
+
},
|
|
46
|
+
additionalProperties: false,
|
|
47
|
+
required: [
|
|
48
|
+
"id",
|
|
49
|
+
"address_street",
|
|
50
|
+
"address_house_number",
|
|
51
|
+
"address_city",
|
|
52
|
+
"address_country",
|
|
53
|
+
"address_mail",
|
|
54
|
+
"address_phone",
|
|
55
|
+
"address_web_address",
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=OrganizationsModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationsModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/OrganizationsModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAIxF,MAAa,kBAAmB,SAAQ,iBAAyB;;AAAjE,gDAoEC;AAnEiB,6BAAU,GAAG,eAAe,CAAC;AAgB7B,iCAAc,GAAwC;IAChE,EAAE,EAAE;QACA,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,OAAO;KAC1B;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;IACrC,KAAK,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;IACrC,cAAc,EAAE,EAAE,IAAI,EAAE,qBAAS,CAA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E,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YACjF,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;SACjF;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE;YACN,IAAI;YACJ,gBAAgB;YAChB,sBAAsB;YACtB,cAAc;YACd,iBAAiB;YACjB,cAAc;YACd,eAAe;YACf,qBAAqB;SACxB;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IOrganizationBuildingsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IOrganizationBuildingsModel.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IOrganizationResponsibleUsersModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IOrganizationsModel {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string | null;
|
|
4
|
+
label: string | null;
|
|
5
|
+
address_street: string | null;
|
|
6
|
+
address_house_number: string | null;
|
|
7
|
+
address_city: string | null;
|
|
8
|
+
address_country: string | null;
|
|
9
|
+
address_mail: string | null;
|
|
10
|
+
address_phone: string | null;
|
|
11
|
+
address_web_address: string | null;
|
|
12
|
+
category: string | null;
|
|
13
|
+
created_by_id: number | null;
|
|
14
|
+
grafana_url: string | null;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IOrganizationsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IOrganizationsModel.ts"],"names":[],"mappings":""}
|
|
@@ -36,7 +36,7 @@ Modul slouží k ukládání dat o spotřebě energií v budovách a jednotlivý
|
|
|
36
36
|
- protokol: http
|
|
37
37
|
- datový typ: json
|
|
38
38
|
- validační schéma: [datasources](../src/schema-definitions/datasources)
|
|
39
|
-
- příklad vstupnich dat: [fixtures](../test/integration-engine/
|
|
39
|
+
- příklad vstupnich dat: [fixtures](../test/integration-engine/oict-energetika/transformations/fixture)
|
|
40
40
|
- frekvence stahování
|
|
41
41
|
- cron definice:
|
|
42
42
|
- cron.dataplatform.energeticsoict.fetchData (data za posledních 14 dní s parametrem `{ "targetDays": 14 }`)
|
|
@@ -46,7 +46,6 @@ Modul slouží k ukládání dat o spotřebě energií v budovách a jednotlivý
|
|
|
46
46
|
- dataplatform.energeticsoict.fetchData
|
|
47
47
|
- dataplatform.energeticsoict.fetchBuildings
|
|
48
48
|
- dataplatform.energeticsoict.fetchConsumption
|
|
49
|
-
- dataplatform.energeticsoict.fetchDevices
|
|
50
49
|
|
|
51
50
|
#### _Unimonitor CEM API - Vrtbovský palác_
|
|
52
51
|
|
|
@@ -271,17 +270,16 @@ Worker se stará o stahování dat (spotřeba, seznamy budov a meřidel) z datov
|
|
|
271
270
|
|
|
272
271
|
#### _task: FetchDataTask_
|
|
273
272
|
|
|
274
|
-
Metoda pouze rozesílá zprávy do ostatních front (fetchBuildings, fetchConsumption
|
|
273
|
+
Metoda pouze rozesílá zprávy do ostatních front (fetchBuildings, fetchConsumption)
|
|
275
274
|
|
|
276
275
|
- vstupní rabbitmq fronta
|
|
277
276
|
- název: dataplatform.energeticsoict.fetchData
|
|
278
277
|
- TTL: 29 minut
|
|
279
278
|
- parametry: `{ targetDays }`
|
|
280
|
-
- validační schéma: [FetchDataSchema](../src/integration-engine/
|
|
279
|
+
- validační schéma: [FetchDataSchema](../src/integration-engine/schema/oict-energetika/FetchDataSchema.ts)
|
|
281
280
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
282
281
|
- dataplatform.energeticsoict.fetchBuildings
|
|
283
282
|
- dataplatform.energeticsoict.fetchConsumption
|
|
284
|
-
- dataplatform.energeticsoict.fetchDevices
|
|
285
283
|
- datové zdroje
|
|
286
284
|
- žádné
|
|
287
285
|
- transformace
|
|
@@ -289,40 +287,6 @@ Metoda pouze rozesílá zprávy do ostatních front (fetchBuildings, fetchConsum
|
|
|
289
287
|
- data modely
|
|
290
288
|
- žádné
|
|
291
289
|
|
|
292
|
-
#### _task: FetchBuildingsTask_
|
|
293
|
-
|
|
294
|
-
Metoda sbírá informace o budovách
|
|
295
|
-
|
|
296
|
-
- vstupní rabbitmq fronta
|
|
297
|
-
- název: dataplatform.energeticsoict.fetchBuildings
|
|
298
|
-
- TTL: 29 minut
|
|
299
|
-
- parametry: žádné
|
|
300
|
-
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
301
|
-
- žádné
|
|
302
|
-
- datové zdroje
|
|
303
|
-
- OICT Energetika (buildings/full)
|
|
304
|
-
- transformace
|
|
305
|
-
- [BuildingsTransformation](../src/integration-engine/workers/oict-energetika/transformations/BuildingsTransformation.ts)
|
|
306
|
-
- data modely
|
|
307
|
-
- BuildingsModel `consumption_energy_buildings`
|
|
308
|
-
|
|
309
|
-
#### _task: FetchDevicesTask_
|
|
310
|
-
|
|
311
|
-
Metoda sbírá informace o měřičích
|
|
312
|
-
|
|
313
|
-
- vstupní rabbitmq fronta
|
|
314
|
-
- název: dataplatform.energeticsoict.fetchDevices
|
|
315
|
-
- TTL: 29 minut
|
|
316
|
-
- parametry: žádné
|
|
317
|
-
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
318
|
-
- žádné
|
|
319
|
-
- datové zdroje
|
|
320
|
-
- OICT Energetika (devices/full)
|
|
321
|
-
- transformace
|
|
322
|
-
- [DevicesTransformation](../src/integration-engine/workers/oict-energetika/transformations/DevicesTransformation.ts)
|
|
323
|
-
- data modely
|
|
324
|
-
- DevicesModel `consumption_energy_devices`
|
|
325
|
-
|
|
326
290
|
#### _task: FetchConsumptionTask_
|
|
327
291
|
|
|
328
292
|
Metoda sbírá data o spotřebách od různých poskytovalů API (consumption) a ze systémů Dot Controls (visapp)
|
|
@@ -331,13 +295,13 @@ Metoda sbírá data o spotřebách od různých poskytovalů API (consumption) a
|
|
|
331
295
|
- název: dataplatform.energeticsoict.fetchConsumption
|
|
332
296
|
- TTL: 10 hodin
|
|
333
297
|
- parametry: `{ dateFrom, dateTo }`
|
|
334
|
-
- validační schéma: [FetchDataSchema](../src/integration-engine/
|
|
298
|
+
- validační schéma: [FetchDataSchema](../src/integration-engine/schema/oict-energetika/FetchDataSchema.ts)
|
|
335
299
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
336
300
|
- žádné
|
|
337
301
|
- datové zdroje
|
|
338
302
|
- OICT Energetika (data/consumption, data/visapp)
|
|
339
303
|
- transformace
|
|
340
|
-
- [ConsumptionTransformation](../src/integration-engine/
|
|
304
|
+
- [ConsumptionTransformation](../src/integration-engine/transformations/oict-energetika/ConsumptionTransformation.ts)
|
|
341
305
|
- data modely
|
|
342
306
|
- ConsumptionModel `consumption_energy_consumption`
|
|
343
307
|
|
|
@@ -400,3 +364,39 @@ Metoda sbírá historická data
|
|
|
400
364
|

|
|
401
365
|
- retence dat
|
|
402
366
|
- data si uchováváme
|
|
367
|
+
|
|
368
|
+
## Output API
|
|
369
|
+
|
|
370
|
+
### Obecné
|
|
371
|
+
|
|
372
|
+
- OpenAPI v2 dokumentace
|
|
373
|
+
- zdrojový soubor: [openapi-output.yaml](./openapi-output.yaml)
|
|
374
|
+
- rabin: https://rabin.golemio.cz/v2/docs/openapi/
|
|
375
|
+
- golem: https://api.golemio.cz/v2/docs/openapi/
|
|
376
|
+
|
|
377
|
+
### API
|
|
378
|
+
|
|
379
|
+
#### _/buildings_
|
|
380
|
+
|
|
381
|
+
- zdrojové tabulky
|
|
382
|
+
- `consumption_energy_buildings_primary`
|
|
383
|
+
- `consumption_energy_buildings_secondary`
|
|
384
|
+
|
|
385
|
+
#### _/v2/energetics/organizations_
|
|
386
|
+
|
|
387
|
+
#### _/v2/energetics/organizations/full_
|
|
388
|
+
|
|
389
|
+
#### _/v2/energetics/organizations/:id_
|
|
390
|
+
|
|
391
|
+
- zdrojové tabulky
|
|
392
|
+
- organizations
|
|
393
|
+
- organization_responsible_users
|
|
394
|
+
- organizations_buildings
|
|
395
|
+
- consumption_energy_buildings
|
|
396
|
+
|
|
397
|
+
#### _/v2/energetics/devices/full_
|
|
398
|
+
|
|
399
|
+
#### _/v2/energetics/devices/:id_
|
|
400
|
+
|
|
401
|
+
- zdrojové tabulky
|
|
402
|
+
- consumption_energy_devices
|