@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 @@
|
|
|
1
|
+
{"version":3,"file":"IFullTransformationSchemaItem.js","sourceRoot":"","sources":["../../../../src/output-gateway/models/interfaces/IFullTransformationSchemaItem.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface IBuildingsPrimary {
|
|
2
|
+
id: number;
|
|
3
|
+
building_name: string | null;
|
|
4
|
+
description: string | null;
|
|
5
|
+
building_address_code: string | null;
|
|
6
|
+
building_label: string | null;
|
|
7
|
+
main_use: string | null;
|
|
8
|
+
secondary_use: string | null;
|
|
9
|
+
year_of_construction: number | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPrimaryBuildings.js","sourceRoot":"","sources":["../../../../src/output-gateway/models/interfaces/IPrimaryBuildings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Geometry } from "@golemio/core/dist/shared/geojson";
|
|
2
|
+
export interface ISecondaryBuildings {
|
|
3
|
+
id: number;
|
|
4
|
+
building_address_code: string | null;
|
|
5
|
+
building_label: string | null;
|
|
6
|
+
current_note: string | null;
|
|
7
|
+
method_of_protection: string | null;
|
|
8
|
+
built_up_area: number | null;
|
|
9
|
+
heated_bulding_volume: number | null;
|
|
10
|
+
students_count: number | null;
|
|
11
|
+
employees_count: number | null;
|
|
12
|
+
classrooms_count: number | null;
|
|
13
|
+
beds_count: number | null;
|
|
14
|
+
eno_id: string | null;
|
|
15
|
+
csu_code: string | null;
|
|
16
|
+
ku_code: string | null;
|
|
17
|
+
allotment_number: string | null;
|
|
18
|
+
registration_unit: string | null;
|
|
19
|
+
energetic_management: string | null;
|
|
20
|
+
opening_hours: string | null;
|
|
21
|
+
weekend_opening_hours: string | null;
|
|
22
|
+
location: Geometry;
|
|
23
|
+
address_street: string | null;
|
|
24
|
+
address_house_number: string | null;
|
|
25
|
+
address_city: string | null;
|
|
26
|
+
address_country: string | null;
|
|
27
|
+
address_mail: string | null;
|
|
28
|
+
address_phone: string | null;
|
|
29
|
+
address_web_address: string | null;
|
|
30
|
+
penb_penbnumber: number | null;
|
|
31
|
+
penb_issue_date: string | null;
|
|
32
|
+
penb_total_building_envelope_area: number | null;
|
|
33
|
+
penb_volume_factor_of_avshape: string | null;
|
|
34
|
+
penb_total_energy_reference_area: number | null;
|
|
35
|
+
penb_total_provided_energy: number | null;
|
|
36
|
+
penb_total_provided_energy_category: string | null;
|
|
37
|
+
penb_primary_non_renewable_energy: number | null;
|
|
38
|
+
penb_primary_non_renewable_energy_category: string | null;
|
|
39
|
+
penb_building_envelope: number | null;
|
|
40
|
+
penb_building_envelope_category: string | null;
|
|
41
|
+
penb_heating: number | null;
|
|
42
|
+
penb_heating_category: string | null;
|
|
43
|
+
penb_cooling: number | null;
|
|
44
|
+
penb_cooling_category: string | null;
|
|
45
|
+
penb_ventilation: number | null;
|
|
46
|
+
penb_ventilation_category: string | null;
|
|
47
|
+
penb_humidity_adjustment: number | null;
|
|
48
|
+
penb_humidity_adjustment_category: string | null;
|
|
49
|
+
penb_warm_water: number | null;
|
|
50
|
+
penb_warm_water_category: string | null;
|
|
51
|
+
penb_lighting: number | null;
|
|
52
|
+
penb_lighting_category: string | null;
|
|
53
|
+
energy_audits_energy_audit: string | null;
|
|
54
|
+
energy_audits_earegistration_number: string | null;
|
|
55
|
+
energy_audits_created_at: string | null;
|
|
56
|
+
building_envelope_side_wall_prevailing_construction: string | null;
|
|
57
|
+
building_envelope_side_wall_area: number | null;
|
|
58
|
+
building_envelope_side_wall_heat_insulation: string | null;
|
|
59
|
+
building_envelope_side_wall_year_of_adjustment: string | null;
|
|
60
|
+
building_envelope_side_wall_technical_condition: string | null;
|
|
61
|
+
building_envelope_filling_of_hole_construction: string | null;
|
|
62
|
+
building_envelope_filling_of_hole_area: number | null;
|
|
63
|
+
building_envelope_filling_of_hole_year_of_adjustment: string | null;
|
|
64
|
+
building_envelope_filling_of_hole_technical_condition: string | null;
|
|
65
|
+
building_envelope_roof_construction: string | null;
|
|
66
|
+
building_envelope_roof_area: number | null;
|
|
67
|
+
building_envelope_roof_thermal_insulation: string | null;
|
|
68
|
+
building_envelope_roof_year_of_adjustment: string | null;
|
|
69
|
+
building_envelope_roof_technical_condition: string | null;
|
|
70
|
+
building_envelope_floor_of_the_lowest_heated_floor_construction: string | null;
|
|
71
|
+
building_envelope_floor_of_the_lowest_heated_floor_area: number | null;
|
|
72
|
+
floor_of_the_lowest_heated_floor_thermal_insulation: string | null;
|
|
73
|
+
building_envelope_floor_of_the_lowest_heated_floor_year_of_adju: string | null;
|
|
74
|
+
floor_of_the_lowest_heated_floor_technical_condition: string | null;
|
|
75
|
+
fuel_and_energy_coal: boolean | null;
|
|
76
|
+
fuel_and_energy_gas: boolean | null;
|
|
77
|
+
fuel_and_energy_electricity: boolean | null;
|
|
78
|
+
fuel_and_energy_czt: boolean | null;
|
|
79
|
+
fuel_and_energy_oze: boolean | null;
|
|
80
|
+
fuel_and_energy_other: boolean | null;
|
|
81
|
+
technical_equipment_heating_main_source_of_heat: string | null;
|
|
82
|
+
technical_equipment_heating_heat_percentage: number | null;
|
|
83
|
+
technical_equipment_heating_secondary_source_of_heat: string | null;
|
|
84
|
+
technical_equipment_heating_heating_system: string | null;
|
|
85
|
+
technical_equipment_heating_year: string | null;
|
|
86
|
+
technical_equipment_heating_technical_condition: string | null;
|
|
87
|
+
technical_equipment_cooling_cooling_system: string | null;
|
|
88
|
+
technical_equipment_cooling_cooling_area_percentage: number | null;
|
|
89
|
+
technical_equipment_cooling_year: string | null;
|
|
90
|
+
technical_equipment_cooling_technical_condition: string | null;
|
|
91
|
+
technical_equipment_ventilation_ventilation: string | null;
|
|
92
|
+
technical_equipment_ventilation_year: string | null;
|
|
93
|
+
technical_equipment_ventilation_technical_condition: string | null;
|
|
94
|
+
technical_equipment_humidity_adjustment_humidity_adjustment: string | null;
|
|
95
|
+
technical_equipment_humidity_adjustment_year: string | null;
|
|
96
|
+
technical_equipment_humidity_adjustment_technical_condition: string | null;
|
|
97
|
+
technical_equipment_hot_water_predominant_way_of_heating_tv: string | null;
|
|
98
|
+
technical_equipment_hot_water_hot_water_source: string | null;
|
|
99
|
+
technical_equipment_hot_water_year: string | null;
|
|
100
|
+
technical_equipment_hot_water_technical_condition: string | null;
|
|
101
|
+
technical_equipment_lighting_lighting: string | null;
|
|
102
|
+
technical_equipment_lighting_year: string | null;
|
|
103
|
+
technical_equipment_lighting_technical_condition: string | null;
|
|
104
|
+
technical_equipment_lighting_other_technological_elements: string | null;
|
|
105
|
+
technical_equipment_lighting_measurement_method: string | null;
|
|
106
|
+
oze_energy_production_solar_energy_photovoltaic: string | null;
|
|
107
|
+
oze_energy_production_solar_energy_photothermal: string | null;
|
|
108
|
+
oze_energy_production_integrated_turbines_wind_energy: string | null;
|
|
109
|
+
oze_energy_production_heat_pump: string | null;
|
|
110
|
+
waste_and_emissions_solid_waste_production: string | null;
|
|
111
|
+
waste_and_emissions_tied_co2_emissions: string | null;
|
|
112
|
+
waste_and_emissions_sox_emissions: string | null;
|
|
113
|
+
waste_and_emissions_operating_co_2emissions: string | null;
|
|
114
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISecondaryBuildings.js","sourceRoot":"","sources":["../../../../src/output-gateway/models/interfaces/ISecondaryBuildings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { IGeoCoordinatesPoint } from "@golemio/core/dist/output-gateway/Geo";
|
|
2
|
+
export interface ISecondaryBuildingsOutput {
|
|
3
|
+
address_house_number: string | null;
|
|
4
|
+
allotment_number: string | null;
|
|
5
|
+
penb_penbnumber: number | null;
|
|
6
|
+
id: number;
|
|
7
|
+
building_address_code: string | null;
|
|
8
|
+
building_label: string | null;
|
|
9
|
+
current_note: string | null;
|
|
10
|
+
method_of_protection: string | null;
|
|
11
|
+
built_up_area: string | null;
|
|
12
|
+
heated_bulding_volume: string | null;
|
|
13
|
+
students_count: string | null;
|
|
14
|
+
employees_count: string | null;
|
|
15
|
+
classrooms_count: string | null;
|
|
16
|
+
beds_count: string | null;
|
|
17
|
+
eno_id: string | null;
|
|
18
|
+
csu_code: string | null;
|
|
19
|
+
ku_code: string | null;
|
|
20
|
+
allotment_string: string | null;
|
|
21
|
+
registration_unit: string | null;
|
|
22
|
+
energetic_management: string | null;
|
|
23
|
+
opening_hours: string | null;
|
|
24
|
+
weekend_opening_hours: string | null;
|
|
25
|
+
location: IGeoCoordinatesPoint | null;
|
|
26
|
+
address_street: string | null;
|
|
27
|
+
address_house_string: string | null;
|
|
28
|
+
address_city: string | null;
|
|
29
|
+
address_country: string | null;
|
|
30
|
+
address_mail: string | null;
|
|
31
|
+
address_phone: string | null;
|
|
32
|
+
address_web_address: string | null;
|
|
33
|
+
penb_penbstring: string | null;
|
|
34
|
+
penb_issue_date: string | null;
|
|
35
|
+
penb_total_building_envelope_area: string | null;
|
|
36
|
+
penb_volume_factor_of_avshape: string | null;
|
|
37
|
+
penb_total_energy_reference_area: string | null;
|
|
38
|
+
penb_total_provided_energy: string | null;
|
|
39
|
+
penb_total_provided_energy_category: string | null;
|
|
40
|
+
penb_primary_non_renewable_energy: string | null;
|
|
41
|
+
penb_primary_non_renewable_energy_category: string | null;
|
|
42
|
+
penb_building_envelope: string | null;
|
|
43
|
+
penb_building_envelope_category: string | null;
|
|
44
|
+
penb_heating: string | null;
|
|
45
|
+
penb_heating_category: string | null;
|
|
46
|
+
penb_cooling: string | null;
|
|
47
|
+
penb_cooling_category: string | null;
|
|
48
|
+
penb_ventilation: string | null;
|
|
49
|
+
penb_ventilation_category: string | null;
|
|
50
|
+
penb_humidity_adjustment: string | null;
|
|
51
|
+
penb_humidity_adjustment_category: string | null;
|
|
52
|
+
penb_warm_water: string | null;
|
|
53
|
+
penb_warm_water_category: string | null;
|
|
54
|
+
penb_lighting: string | null;
|
|
55
|
+
penb_lighting_category: string | null;
|
|
56
|
+
energy_audits_energy_audit: string | null;
|
|
57
|
+
energy_audits_earegistration_string: string | null;
|
|
58
|
+
energy_audits_created_at: string | null;
|
|
59
|
+
building_envelope_side_wall_prevailing_construction: string | null;
|
|
60
|
+
building_envelope_side_wall_area: string | null;
|
|
61
|
+
building_envelope_side_wall_heat_insulation: string | null;
|
|
62
|
+
building_envelope_side_wall_year_of_adjustment: string | null;
|
|
63
|
+
building_envelope_side_wall_technical_condition: string | null;
|
|
64
|
+
building_envelope_filling_of_hole_construction: string | null;
|
|
65
|
+
building_envelope_filling_of_hole_area: string | null;
|
|
66
|
+
building_envelope_filling_of_hole_year_of_adjustment: string | null;
|
|
67
|
+
building_envelope_filling_of_hole_technical_condition: string | null;
|
|
68
|
+
building_envelope_roof_construction: string | null;
|
|
69
|
+
building_envelope_roof_area: string | null;
|
|
70
|
+
building_envelope_roof_thermal_insulation: string | null;
|
|
71
|
+
building_envelope_roof_year_of_adjustment: string | null;
|
|
72
|
+
building_envelope_roof_technical_condition: string | null;
|
|
73
|
+
building_envelope_floor_of_the_lowest_heated_floor_construction: string | null;
|
|
74
|
+
building_envelope_floor_of_the_lowest_heated_floor_area: string | null;
|
|
75
|
+
floor_of_the_lowest_heated_floor_thermal_insulation: string | null;
|
|
76
|
+
building_envelope_floor_of_the_lowest_heated_floor_year_of_adju: string | null;
|
|
77
|
+
floor_of_the_lowest_heated_floor_technical_condition: string | null;
|
|
78
|
+
fuel_and_energy_coal: boolean | null;
|
|
79
|
+
fuel_and_energy_gas: boolean | null;
|
|
80
|
+
fuel_and_energy_electricity: boolean | null;
|
|
81
|
+
fuel_and_energy_czt: boolean | null;
|
|
82
|
+
fuel_and_energy_oze: boolean | null;
|
|
83
|
+
fuel_and_energy_other: boolean | null;
|
|
84
|
+
technical_equipment_heating_main_source_of_heat: string | null;
|
|
85
|
+
technical_equipment_heating_heat_percentage: string | null;
|
|
86
|
+
technical_equipment_heating_secondary_source_of_heat: string | null;
|
|
87
|
+
technical_equipment_heating_heating_system: string | null;
|
|
88
|
+
technical_equipment_heating_year: string | null;
|
|
89
|
+
technical_equipment_heating_technical_condition: string | null;
|
|
90
|
+
technical_equipment_cooling_cooling_system: string | null;
|
|
91
|
+
technical_equipment_cooling_cooling_area_percentage: string | null;
|
|
92
|
+
technical_equipment_cooling_year: string | null;
|
|
93
|
+
technical_equipment_cooling_technical_condition: string | null;
|
|
94
|
+
technical_equipment_ventilation_ventilation: string | null;
|
|
95
|
+
technical_equipment_ventilation_year: string | null;
|
|
96
|
+
technical_equipment_ventilation_technical_condition: string | null;
|
|
97
|
+
technical_equipment_humidity_adjustment_humidity_adjustment: string | null;
|
|
98
|
+
technical_equipment_humidity_adjustment_year: string | null;
|
|
99
|
+
technical_equipment_humidity_adjustment_technical_condition: string | null;
|
|
100
|
+
technical_equipment_hot_water_predominant_way_of_heating_tv: string | null;
|
|
101
|
+
technical_equipment_hot_water_hot_water_source: string | null;
|
|
102
|
+
technical_equipment_hot_water_year: string | null;
|
|
103
|
+
technical_equipment_hot_water_technical_condition: string | null;
|
|
104
|
+
technical_equipment_lighting_lighting: string | null;
|
|
105
|
+
technical_equipment_lighting_year: string | null;
|
|
106
|
+
technical_equipment_lighting_technical_condition: string | null;
|
|
107
|
+
technical_equipment_lighting_other_technological_elements: string | null;
|
|
108
|
+
technical_equipment_lighting_measurement_method: string | null;
|
|
109
|
+
oze_energy_production_solar_energy_photovoltaic: string | null;
|
|
110
|
+
oze_energy_production_solar_energy_photothermal: string | null;
|
|
111
|
+
oze_energy_production_integrated_turbines_wind_energy: string | null;
|
|
112
|
+
oze_energy_production_heat_pump: string | null;
|
|
113
|
+
waste_and_emissions_solid_waste_production: string | null;
|
|
114
|
+
waste_and_emissions_tied_co2_emissions: string | null;
|
|
115
|
+
waste_and_emissions_sox_emissions: string | null;
|
|
116
|
+
waste_and_emissions_operating_co_2emissions: string | null;
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISecondaryBuildingsOutput.js","sourceRoot":"","sources":["../../../../src/output-gateway/models/interfaces/ISecondaryBuildingsOutput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SequelizeModel } from "@golemio/core/dist/output-gateway";
|
|
2
|
+
import { IPaginationParams } from "../routers/interfaces/IPaginationParams";
|
|
3
|
+
import { IDevicesModel } from "../../schema-definitions/models/interfaces";
|
|
4
|
+
export declare class DevicesRepository extends SequelizeModel {
|
|
5
|
+
constructor();
|
|
6
|
+
GetAll(params: IPaginationParams): Promise<IDevicesModel[]>;
|
|
7
|
+
GetOne(id: string): Promise<IDevicesModel | null>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.DevicesRepository = void 0;
|
|
22
|
+
const _sch_1 = require("../../schema-definitions");
|
|
23
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
24
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
25
|
+
const models_1 = require("../../schema-definitions/models");
|
|
26
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
27
|
+
let DevicesRepository = exports.DevicesRepository = class DevicesRepository extends output_gateway_1.SequelizeModel {
|
|
28
|
+
constructor() {
|
|
29
|
+
super("DevicesRepository", models_1.DevicesModel.TABLE_NAME, models_1.DevicesModel.attributeModel, {
|
|
30
|
+
schema: _sch_1.EnergeticsSchema.pgSchema,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
GetAll(params) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
try {
|
|
36
|
+
return yield this.sequelizeModel.findAll({
|
|
37
|
+
order: [["id", "ASC"]],
|
|
38
|
+
limit: params.limit,
|
|
39
|
+
offset: params.offset,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
throw new golemio_errors_1.GeneralError("Database error - GetAll", this.name, err, 500);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
GetOne(id) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
try {
|
|
50
|
+
return yield this.sequelizeModel.findOne({
|
|
51
|
+
where: { id },
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
throw new golemio_errors_1.GeneralError("Database error - GetOne", this.name, err, 500);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.DevicesRepository = DevicesRepository = __decorate([
|
|
61
|
+
(0, tsyringe_1.injectable)(),
|
|
62
|
+
__metadata("design:paramtypes", [])
|
|
63
|
+
], DevicesRepository);
|
|
64
|
+
//# sourceMappingURL=DevicesRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevicesRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/DevicesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,mDAAwC;AACxC,sEAAmE;AACnE,iEAAgE;AAChE,4DAA2C;AAE3C,6EAAwE;AAIjE,IAAM,iBAAiB,+BAAvB,MAAM,iBAAkB,SAAQ,+BAAc;IACjD;QACI,KAAK,CAAC,mBAAmB,EAAE,qBAAY,CAAC,UAAU,EAAE,qBAAY,CAAC,cAAc,EAAE;YAC7E,MAAM,EAAE,uBAAgB,CAAC,QAAQ;SACpC,CAAC,CAAC;IACP,CAAC;IAEY,MAAM,CAAC,MAAyB;;YACzC,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBACrC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;oBACtB,KAAK,EAAE,MAAM,CAAC,KAAK;oBACnB,MAAM,EAAE,MAAM,CAAC,MAAM;iBACxB,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,yBAAyB,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aAC1E;QACL,CAAC;KAAA;IAEY,MAAM,CAAC,EAAU;;YAC1B,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBACrC,KAAK,EAAE,EAAE,EAAE,EAAE;iBAChB,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,yBAAyB,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aAC1E;QACL,CAAC;KAAA;CACJ,CAAA;4BA5BY,iBAAiB;IAD7B,IAAA,qBAAU,GAAE;;GACA,iBAAiB,CA4B7B"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.OrganizationBuildingsRepository = void 0;
|
|
22
|
+
const _sch_1 = require("../../schema-definitions");
|
|
23
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
24
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
25
|
+
const OrganizationBuildingModel_1 = require("../../schema-definitions/models/OrganizationBuildingModel");
|
|
26
|
+
let OrganizationBuildingsRepository = exports.OrganizationBuildingsRepository = class OrganizationBuildingsRepository extends output_gateway_1.SequelizeModel {
|
|
27
|
+
constructor() {
|
|
28
|
+
super("OrganizationBuildingsRepository", OrganizationBuildingModel_1.OrganizationBuildingModel.TABLE_NAME, OrganizationBuildingModel_1.OrganizationBuildingModel.attributeModel, {
|
|
29
|
+
schema: _sch_1.EnergeticsSchema.pgSchema,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
GetAll() {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
throw new Error("OrganizationBuildingsRepository - GetAll not implemented");
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
GetOne() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
throw new Error("OrganizationBuildingsRepository - GetOne not implemented");
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.OrganizationBuildingsRepository = OrganizationBuildingsRepository = __decorate([
|
|
44
|
+
(0, tsyringe_1.injectable)(),
|
|
45
|
+
__metadata("design:paramtypes", [])
|
|
46
|
+
], OrganizationBuildingsRepository);
|
|
47
|
+
//# sourceMappingURL=OrganizationBuildingsRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationBuildingsRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/OrganizationBuildingsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,mDAAwC;AACxC,sEAAmE;AACnE,iEAAgE;AAChE,yGAAkF;AAG3E,IAAM,+BAA+B,6CAArC,MAAM,+BAAgC,SAAQ,+BAAc;IAC/D;QACI,KAAK,CAAC,iCAAiC,EAAE,qDAAyB,CAAC,UAAU,EAAE,qDAAyB,CAAC,cAAc,EAAE;YACrH,MAAM,EAAE,uBAAgB,CAAC,QAAQ;SACpC,CAAC,CAAC;IACP,CAAC;IAEY,MAAM;;YACf,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAChF,CAAC;KAAA;IAEY,MAAM;;YACf,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAChF,CAAC;KAAA;CACJ,CAAA;0CAdY,+BAA+B;IAD3C,IAAA,qBAAU,GAAE;;GACA,+BAA+B,CAc3C"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.OrganizationResponsibleUsersRepository = void 0;
|
|
22
|
+
const _sch_1 = require("../../schema-definitions");
|
|
23
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
24
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
25
|
+
const OrganizationResponsibleUsersModel_1 = require("../../schema-definitions/models/OrganizationResponsibleUsersModel");
|
|
26
|
+
let OrganizationResponsibleUsersRepository = exports.OrganizationResponsibleUsersRepository = class OrganizationResponsibleUsersRepository extends output_gateway_1.SequelizeModel {
|
|
27
|
+
constructor() {
|
|
28
|
+
super("OrganizationResponsibleUsersRepository", OrganizationResponsibleUsersModel_1.OrganizationResponsibleUsersModel.TABLE_NAME, OrganizationResponsibleUsersModel_1.OrganizationResponsibleUsersModel.attributeModel, {
|
|
29
|
+
schema: _sch_1.EnergeticsSchema.pgSchema,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
GetAll() {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
throw new Error("OrganizationResponsibleUsersRepository - GetAll not implemented");
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
GetOne() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
throw new Error("OrganizationResponsibleUsersRepository - GetOne not implemented");
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.OrganizationResponsibleUsersRepository = OrganizationResponsibleUsersRepository = __decorate([
|
|
44
|
+
(0, tsyringe_1.injectable)(),
|
|
45
|
+
__metadata("design:paramtypes", [])
|
|
46
|
+
], OrganizationResponsibleUsersRepository);
|
|
47
|
+
//# sourceMappingURL=OrganizationResponsibleUsersRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationResponsibleUsersRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/OrganizationResponsibleUsersRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,mDAAwC;AACxC,sEAAmE;AACnE,iEAAgE;AAChE,yHAAkG;AAG3F,IAAM,sCAAsC,oDAA5C,MAAM,sCAAuC,SAAQ,+BAAc;IACtE;QACI,KAAK,CACD,wCAAwC,EACxC,qEAAiC,CAAC,UAAU,EAC5C,qEAAiC,CAAC,cAAc,EAChD;YACI,MAAM,EAAE,uBAAgB,CAAC,QAAQ;SACpC,CACJ,CAAC;IACN,CAAC;IAEY,MAAM;;YACf,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;QACvF,CAAC;KAAA;IAEY,MAAM;;YACf,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;QACvF,CAAC;KAAA;CACJ,CAAA;iDAnBY,sCAAsC;IADlD,IAAA,qBAAU,GAAE;;GACA,sCAAsC,CAmBlD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SequelizeModel } from "@golemio/core/dist/output-gateway";
|
|
2
|
+
import { IPaginationParams } from "../routers/interfaces/IPaginationParams";
|
|
3
|
+
import { OrganizationResponsibleUsersRepository } from "./OrganizationResponsibleUsersRepository";
|
|
4
|
+
import { IOrganizationDto } from "./interfaces/IOrganizationDto";
|
|
5
|
+
import { IOrganizationDetailDto } from "./interfaces/IOrganizationDetailDto";
|
|
6
|
+
import { PrimaryBuildingsRepository } from "./PrimaryBuildingsRepository";
|
|
7
|
+
import { OrganizationBuildingsRepository } from "./OrganizationBuildingsRepository";
|
|
8
|
+
export declare class OrganizationsRepository extends SequelizeModel {
|
|
9
|
+
private userRepository;
|
|
10
|
+
private organizationBuildingsRepository;
|
|
11
|
+
private buildingsRepository;
|
|
12
|
+
constructor(userRepository: OrganizationResponsibleUsersRepository, organizationBuildingsRepository: OrganizationBuildingsRepository, buildingsRepository: PrimaryBuildingsRepository);
|
|
13
|
+
associate(): void;
|
|
14
|
+
GetAllPublic(params: IPaginationParams): Promise<IOrganizationDto[]>;
|
|
15
|
+
GetAll(params: IPaginationParams): Promise<IOrganizationDetailDto[]>;
|
|
16
|
+
GetOne(id: string): Promise<IOrganizationDetailDto | null>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.OrganizationsRepository = void 0;
|
|
25
|
+
const ModuleContainerToken_1 = require("../ioc/ModuleContainerToken");
|
|
26
|
+
const _sch_1 = require("../../schema-definitions");
|
|
27
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
28
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
29
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
30
|
+
const OrganizationsModel_1 = require("../../schema-definitions/models/OrganizationsModel");
|
|
31
|
+
const OrganizationResponsibleUsersRepository_1 = require("./OrganizationResponsibleUsersRepository");
|
|
32
|
+
const PrimaryBuildingsRepository_1 = require("./PrimaryBuildingsRepository");
|
|
33
|
+
const OrganizationsAssociations_1 = require("./helpers/OrganizationsAssociations");
|
|
34
|
+
const OrganizationBuildingsRepository_1 = require("./OrganizationBuildingsRepository");
|
|
35
|
+
let OrganizationsRepository = exports.OrganizationsRepository = class OrganizationsRepository extends output_gateway_1.SequelizeModel {
|
|
36
|
+
constructor(userRepository, organizationBuildingsRepository, buildingsRepository) {
|
|
37
|
+
super("OrganizationsRepository", OrganizationsModel_1.OrganizationsModel.TABLE_NAME, OrganizationsModel_1.OrganizationsModel.attributeModel, {
|
|
38
|
+
schema: _sch_1.EnergeticsSchema.pgSchema,
|
|
39
|
+
});
|
|
40
|
+
this.userRepository = userRepository;
|
|
41
|
+
this.organizationBuildingsRepository = organizationBuildingsRepository;
|
|
42
|
+
this.buildingsRepository = buildingsRepository;
|
|
43
|
+
this.associate();
|
|
44
|
+
}
|
|
45
|
+
associate() {
|
|
46
|
+
OrganizationsAssociations_1.OrganizationsAssociations.associateResponsibleUsers(this.sequelizeModel, this.userRepository.sequelizeModel);
|
|
47
|
+
OrganizationsAssociations_1.OrganizationsAssociations.associateBuildings(this.sequelizeModel, this.buildingsRepository.sequelizeModel, this.organizationBuildingsRepository.sequelizeModel);
|
|
48
|
+
}
|
|
49
|
+
GetAllPublic(params) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
try {
|
|
52
|
+
return yield this.sequelizeModel.findAll({
|
|
53
|
+
attributes: ["id", "name"],
|
|
54
|
+
order: [["id", "ASC"]],
|
|
55
|
+
limit: params.limit,
|
|
56
|
+
offset: params.offset,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
throw new golemio_errors_1.GeneralError("Database error - GetAll", this.name, err, 500);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
GetAll(params) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
try {
|
|
67
|
+
return yield this.sequelizeModel.findAll({
|
|
68
|
+
include: [
|
|
69
|
+
{
|
|
70
|
+
model: this.userRepository.sequelizeModel,
|
|
71
|
+
as: "responsible_user",
|
|
72
|
+
attributes: { exclude: ["id", "organization_id"] },
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
model: this.buildingsRepository.sequelizeModel,
|
|
76
|
+
as: "buildings",
|
|
77
|
+
attributes: ["id", "building_name", "building_address_code"],
|
|
78
|
+
through: { attributes: [] },
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
order: [
|
|
82
|
+
["id", "ASC"],
|
|
83
|
+
[{ model: this.userRepository.sequelizeModel, as: "responsible_user" }, "id", "ASC"],
|
|
84
|
+
[{ model: this.buildingsRepository.sequelizeModel, as: "buildings" }, "id", "ASC"],
|
|
85
|
+
],
|
|
86
|
+
limit: params.limit,
|
|
87
|
+
offset: params.offset,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
throw new golemio_errors_1.GeneralError("Database error - GetAllDetail", this.name, err, 500);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
GetOne(id) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
try {
|
|
98
|
+
return yield this.sequelizeModel.findOne({
|
|
99
|
+
include: [
|
|
100
|
+
{
|
|
101
|
+
model: this.userRepository.sequelizeModel,
|
|
102
|
+
as: "responsible_user",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
model: this.buildingsRepository.sequelizeModel,
|
|
106
|
+
as: "buildings",
|
|
107
|
+
attributes: ["id", "building_name", "building_address_code"],
|
|
108
|
+
through: { attributes: [] },
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
where: { id },
|
|
112
|
+
order: [
|
|
113
|
+
[{ model: this.userRepository.sequelizeModel, as: "responsible_user" }, "id", "ASC"],
|
|
114
|
+
[{ model: this.buildingsRepository.sequelizeModel, as: "buildings" }, "id", "ASC"],
|
|
115
|
+
],
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
throw new golemio_errors_1.GeneralError("Database error - GetOne", this.name, err, 500);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
exports.OrganizationsRepository = OrganizationsRepository = __decorate([
|
|
125
|
+
(0, tsyringe_1.injectable)(),
|
|
126
|
+
__param(0, (0, tsyringe_1.inject)(ModuleContainerToken_1.ModuleContainerToken.OrganizationResponsibleUsersRepository)),
|
|
127
|
+
__param(1, (0, tsyringe_1.inject)(ModuleContainerToken_1.ModuleContainerToken.OrganizationBuildingsRepository)),
|
|
128
|
+
__param(2, (0, tsyringe_1.inject)(ModuleContainerToken_1.ModuleContainerToken.PrimaryBuildingsRepository)),
|
|
129
|
+
__metadata("design:paramtypes", [OrganizationResponsibleUsersRepository_1.OrganizationResponsibleUsersRepository,
|
|
130
|
+
OrganizationBuildingsRepository_1.OrganizationBuildingsRepository,
|
|
131
|
+
PrimaryBuildingsRepository_1.PrimaryBuildingsRepository])
|
|
132
|
+
], OrganizationsRepository);
|
|
133
|
+
//# sourceMappingURL=OrganizationsRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationsRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/OrganizationsRepository.ts"],"names":[],"mappings":"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"}
|