@golemio/energetics 1.3.5-dev.1298662589 → 1.3.5-dev.1300843460

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.
Files changed (174) hide show
  1. package/db/example/00_clear_test_data.sql +6 -0
  2. package/db/example/01_buildings.sql +206 -0
  3. package/db/example/02_organizations.sql +24 -0
  4. package/db/example/03_devices.sql +24 -0
  5. package/db/migrations/postgresql/.config.json +1 -1
  6. package/db/migrations/postgresql/20240514074033-buildings.js +53 -0
  7. package/db/migrations/postgresql/20240514111900-organizations.js +53 -0
  8. package/db/migrations/postgresql/sqls/20240514074033-buildings-down.sql +2 -0
  9. package/db/migrations/postgresql/sqls/20240514074033-buildings-up.sql +138 -0
  10. package/db/migrations/postgresql/sqls/20240514111900-organizations-down.sql +3 -0
  11. package/db/migrations/postgresql/sqls/20240514111900-organizations-up.sql +37 -0
  12. package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js +0 -2
  13. package/dist/integration-engine/tasks/oict-energetika/FetchDataTask.js.map +1 -1
  14. package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js +0 -4
  15. package/dist/integration-engine/workers/oict-energetika/OictEnergetikaWorker.js.map +1 -1
  16. package/dist/output-gateway/constants/Links.d.ts +3 -0
  17. package/dist/output-gateway/constants/Links.js +7 -0
  18. package/dist/output-gateway/constants/Links.js.map +1 -0
  19. package/dist/output-gateway/constants/RouteVersion.d.ts +3 -0
  20. package/dist/output-gateway/constants/RouteVersion.js +8 -0
  21. package/dist/output-gateway/constants/RouteVersion.js.map +1 -0
  22. package/dist/output-gateway/controllers/v2/BuildingsController.d.ts +11 -0
  23. package/dist/output-gateway/controllers/v2/BuildingsController.js +74 -0
  24. package/dist/output-gateway/controllers/v2/BuildingsController.js.map +1 -0
  25. package/dist/output-gateway/controllers/v2/V2DevicesController.d.ts +11 -0
  26. package/dist/output-gateway/controllers/v2/V2DevicesController.js +67 -0
  27. package/dist/output-gateway/controllers/v2/V2DevicesController.js.map +1 -0
  28. package/dist/output-gateway/controllers/v2/V2OrganizationsController.d.ts +13 -0
  29. package/dist/output-gateway/controllers/v2/V2OrganizationsController.js +79 -0
  30. package/dist/output-gateway/controllers/v2/V2OrganizationsController.js.map +1 -0
  31. package/dist/output-gateway/helpers/CreateLinkHelper.d.ts +6 -0
  32. package/dist/output-gateway/helpers/CreateLinkHelper.js +32 -0
  33. package/dist/output-gateway/helpers/CreateLinkHelper.js.map +1 -0
  34. package/dist/output-gateway/index.d.ts +1 -0
  35. package/dist/output-gateway/index.js +10 -0
  36. package/dist/output-gateway/index.js.map +1 -0
  37. package/dist/output-gateway/ioc/Di.d.ts +3 -0
  38. package/dist/output-gateway/ioc/Di.js +51 -0
  39. package/dist/output-gateway/ioc/Di.js.map +1 -0
  40. package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +22 -0
  41. package/dist/output-gateway/ioc/ModuleContainerToken.js +26 -0
  42. package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -0
  43. package/dist/output-gateway/models/BuildingsPrimaryModel.d.ts +17 -0
  44. package/dist/output-gateway/models/BuildingsPrimaryModel.js +49 -0
  45. package/dist/output-gateway/models/BuildingsPrimaryModel.js.map +1 -0
  46. package/dist/output-gateway/models/BuildingsSecondaryModel.d.ts +124 -0
  47. package/dist/output-gateway/models/BuildingsSecondaryModel.js +338 -0
  48. package/dist/output-gateway/models/BuildingsSecondaryModel.js.map +1 -0
  49. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.d.ts +6 -0
  50. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.js +2 -0
  51. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.js.map +1 -0
  52. package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.d.ts +156 -0
  53. package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.js +3 -0
  54. package/dist/output-gateway/models/interfaces/IFullTransformationSchemaItem.js.map +1 -0
  55. package/dist/output-gateway/models/interfaces/IPrimaryBuildings.d.ts +10 -0
  56. package/dist/output-gateway/models/interfaces/IPrimaryBuildings.js +3 -0
  57. package/dist/output-gateway/models/interfaces/IPrimaryBuildings.js.map +1 -0
  58. package/dist/output-gateway/models/interfaces/ISecondaryBuildings.d.ts +114 -0
  59. package/dist/output-gateway/models/interfaces/ISecondaryBuildings.js +3 -0
  60. package/dist/output-gateway/models/interfaces/ISecondaryBuildings.js.map +1 -0
  61. package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.d.ts +117 -0
  62. package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.js +3 -0
  63. package/dist/output-gateway/models/interfaces/ISecondaryBuildingsOutput.js.map +1 -0
  64. package/dist/output-gateway/repositories/DevicesRepository.d.ts +8 -0
  65. package/dist/output-gateway/repositories/DevicesRepository.js +64 -0
  66. package/dist/output-gateway/repositories/DevicesRepository.js.map +1 -0
  67. package/dist/output-gateway/repositories/OrganizationBuildingsRepository.d.ts +6 -0
  68. package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js +47 -0
  69. package/dist/output-gateway/repositories/OrganizationBuildingsRepository.js.map +1 -0
  70. package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.d.ts +6 -0
  71. package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js +47 -0
  72. package/dist/output-gateway/repositories/OrganizationResponsibleUsersRepository.js.map +1 -0
  73. package/dist/output-gateway/repositories/OrganizationsRepository.d.ts +17 -0
  74. package/dist/output-gateway/repositories/OrganizationsRepository.js +133 -0
  75. package/dist/output-gateway/repositories/OrganizationsRepository.js.map +1 -0
  76. package/dist/output-gateway/repositories/PrimaryBuildingsRepository.d.ts +15 -0
  77. package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js +86 -0
  78. package/dist/output-gateway/repositories/PrimaryBuildingsRepository.js.map +1 -0
  79. package/dist/output-gateway/repositories/SecondaryBuildingsRepository.d.ts +6 -0
  80. package/dist/output-gateway/repositories/SecondaryBuildingsRepository.js +33 -0
  81. package/dist/output-gateway/repositories/SecondaryBuildingsRepository.js.map +1 -0
  82. package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.d.ts +9 -0
  83. package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.js +47 -0
  84. package/dist/output-gateway/repositories/helpers/OrganizationsAssociations.js.map +1 -0
  85. package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.d.ts +5 -0
  86. package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.js +3 -0
  87. package/dist/output-gateway/repositories/interfaces/IOrganizationBuildingDto.js.map +1 -0
  88. package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.d.ts +18 -0
  89. package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.js +3 -0
  90. package/dist/output-gateway/repositories/interfaces/IOrganizationDetailDto.js.map +1 -0
  91. package/dist/output-gateway/repositories/interfaces/IOrganizationDto.d.ts +4 -0
  92. package/dist/output-gateway/repositories/interfaces/IOrganizationDto.js +3 -0
  93. package/dist/output-gateway/repositories/interfaces/IOrganizationDto.js.map +1 -0
  94. package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.d.ts +8 -0
  95. package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.js +3 -0
  96. package/dist/output-gateway/repositories/interfaces/IOrganizationResponsibleUserDto.js.map +1 -0
  97. package/dist/output-gateway/routers/helpers/parseParams.d.ts +4 -0
  98. package/dist/output-gateway/routers/helpers/parseParams.js +17 -0
  99. package/dist/output-gateway/routers/helpers/parseParams.js.map +1 -0
  100. package/dist/output-gateway/routers/interfaces/IDeviceResponse.d.ts +6 -0
  101. package/dist/output-gateway/routers/interfaces/IDeviceResponse.js +3 -0
  102. package/dist/output-gateway/routers/interfaces/IDeviceResponse.js.map +1 -0
  103. package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.d.ts +34 -0
  104. package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.js +3 -0
  105. package/dist/output-gateway/routers/interfaces/IOrganizationDetailResponse.js.map +1 -0
  106. package/dist/output-gateway/routers/interfaces/IOrganizationResponse.d.ts +4 -0
  107. package/dist/output-gateway/routers/interfaces/IOrganizationResponse.js +3 -0
  108. package/dist/output-gateway/routers/interfaces/IOrganizationResponse.js.map +1 -0
  109. package/dist/output-gateway/routers/interfaces/IPaginationParams.d.ts +4 -0
  110. package/dist/output-gateway/routers/interfaces/IPaginationParams.js +3 -0
  111. package/dist/output-gateway/routers/interfaces/IPaginationParams.js.map +1 -0
  112. package/dist/output-gateway/routers/v2/BuildingsRouter.d.ts +10 -0
  113. package/dist/output-gateway/routers/v2/BuildingsRouter.js +26 -0
  114. package/dist/output-gateway/routers/v2/BuildingsRouter.js.map +1 -0
  115. package/dist/output-gateway/routers/v2/V2DevicesRouter.d.ts +7 -0
  116. package/dist/output-gateway/routers/v2/V2DevicesRouter.js +41 -0
  117. package/dist/output-gateway/routers/v2/V2DevicesRouter.js.map +1 -0
  118. package/dist/output-gateway/routers/v2/V2OrganizationsRouter.d.ts +7 -0
  119. package/dist/output-gateway/routers/v2/V2OrganizationsRouter.js +41 -0
  120. package/dist/output-gateway/routers/v2/V2OrganizationsRouter.js.map +1 -0
  121. package/dist/output-gateway/transformations/BuildingTransformationFull.d.ts +14 -0
  122. package/dist/output-gateway/transformations/BuildingTransformationFull.js +215 -0
  123. package/dist/output-gateway/transformations/BuildingTransformationFull.js.map +1 -0
  124. package/dist/output-gateway/transformations/BuildingsTransformation.d.ts +8 -0
  125. package/dist/output-gateway/transformations/BuildingsTransformation.js +38 -0
  126. package/dist/output-gateway/transformations/BuildingsTransformation.js.map +1 -0
  127. package/dist/output-gateway/transformations/DeviceDtoTransformation.d.ts +8 -0
  128. package/dist/output-gateway/transformations/DeviceDtoTransformation.js +43 -0
  129. package/dist/output-gateway/transformations/DeviceDtoTransformation.js.map +1 -0
  130. package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.d.ts +9 -0
  131. package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js +64 -0
  132. package/dist/output-gateway/transformations/OrganizationDetailDtoTransformation.js.map +1 -0
  133. package/dist/output-gateway/transformations/OrganizationDtoTransformation.d.ts +9 -0
  134. package/dist/output-gateway/transformations/OrganizationDtoTransformation.js +36 -0
  135. package/dist/output-gateway/transformations/OrganizationDtoTransformation.js.map +1 -0
  136. package/dist/schema-definitions/models/OrganizationBuildingModel.d.ts +10 -0
  137. package/dist/schema-definitions/models/OrganizationBuildingModel.js +33 -0
  138. package/dist/schema-definitions/models/OrganizationBuildingModel.js.map +1 -0
  139. package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.d.ts +16 -0
  140. package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.js +44 -0
  141. package/dist/schema-definitions/models/OrganizationResponsibleUsersModel.js.map +1 -0
  142. package/dist/schema-definitions/models/OrganizationsModel.d.ts +21 -0
  143. package/dist/schema-definitions/models/OrganizationsModel.js +59 -0
  144. package/dist/schema-definitions/models/OrganizationsModel.js.map +1 -0
  145. package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.d.ts +4 -0
  146. package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.js +3 -0
  147. package/dist/schema-definitions/models/interfaces/IOrganizationBuildingsModel.js.map +1 -0
  148. package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.d.ts +10 -0
  149. package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.js +3 -0
  150. package/dist/schema-definitions/models/interfaces/IOrganizationResponsibleUsersModel.js.map +1 -0
  151. package/dist/schema-definitions/models/interfaces/IOrganizationsModel.d.ts +15 -0
  152. package/dist/schema-definitions/models/interfaces/IOrganizationsModel.js +3 -0
  153. package/dist/schema-definitions/models/interfaces/IOrganizationsModel.js.map +1 -0
  154. package/docs/implementation_documentation.md +41 -41
  155. package/docs/openapi-output.yaml +834 -0
  156. package/package.json +5 -3
  157. package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.d.ts +0 -4
  158. package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.js +0 -19
  159. package/dist/integration-engine/repositories/oict-energetika/BuildingsRepository.js.map +0 -1
  160. package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.d.ts +0 -4
  161. package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.js +0 -19
  162. package/dist/integration-engine/repositories/oict-energetika/DevicesRepository.js.map +0 -1
  163. package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.d.ts +0 -9
  164. package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.js +0 -44
  165. package/dist/integration-engine/tasks/oict-energetika/FetchBuildingsTask.js.map +0 -1
  166. package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.d.ts +0 -9
  167. package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.js +0 -44
  168. package/dist/integration-engine/tasks/oict-energetika/FetchDevicesTask.js.map +0 -1
  169. package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.d.ts +0 -7
  170. package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.js +0 -166
  171. package/dist/integration-engine/transformations/oict-energetika/BuildingsTransformation.js.map +0 -1
  172. package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.d.ts +0 -7
  173. package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.js +0 -41
  174. package/dist/integration-engine/transformations/oict-energetika/DevicesTransformation.js.map +0 -1
@@ -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,E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AE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YACxE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,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,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;IAC/C,oBAAoB,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;IACrD,YAAY,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;IAC7C,eAAe,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;IAChD,YAAY,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;IAC7C,aAAa,EAAE,EAAE,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;IAC7C,mBAAmB,EAAE,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id: number;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IOrganizationBuildingsModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IOrganizationBuildingsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/interfaces/IOrganizationBuildingsModel.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface IOrganizationResponsibleUsersModel {
2
+ id: number;
3
+ first_name: string | null;
4
+ last_name: string | null;
5
+ position: string | null;
6
+ phone: string | null;
7
+ mail: string | null;
8
+ company: string | null;
9
+ organization_id: number;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IOrganizationResponsibleUsersModel.js.map
@@ -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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IOrganizationsModel.js.map
@@ -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/workers/oict-energetika/transformations/fixture)
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, fetchDevices)
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/workers/oict-energetika/schema/FetchDataSchema.ts)
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/workers/oict-energetika/schema/FetchDataSchema.ts)
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/workers/oict-energetika/transformations/ConsumptionTransformation.ts)
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
  ![commodity diagram](./assets/commodity_erd.jpg)
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