@golemio/energetics 1.15.0 → 1.16.0-dev.2846140746

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 (81) hide show
  1. package/db/example/00_clear_test_data.sql +1 -0
  2. package/db/example/06_eno.sql +2 -2
  3. package/db/example/08_ded_search.sql +2 -2
  4. package/db/example/10_enapo_budova_spotrebic.sql +14 -0
  5. package/db/migrations/postgresql/20260901090000-enapo-budova-spotrebic.js +53 -0
  6. package/db/migrations/postgresql/20260909152615-eno-organization-id.js +53 -0
  7. package/db/migrations/postgresql/sqls/20260901090000-enapo-budova-spotrebic-down.sql +1 -0
  8. package/db/migrations/postgresql/sqls/20260901090000-enapo-budova-spotrebic-up.sql +20 -0
  9. package/db/migrations/postgresql/sqls/20260909152615-eno-organization-id-down.sql +7 -0
  10. package/db/migrations/postgresql/sqls/20260909152615-eno-organization-id-up.sql +16 -0
  11. package/dist/integration-engine/enapo/constants.d.ts +1 -1
  12. package/dist/integration-engine/enapo/constants.js +2 -2
  13. package/dist/integration-engine/enapo/constants.js.map +1 -1
  14. package/dist/integration-engine/enapo/ioc/Di.js +2 -0
  15. package/dist/integration-engine/enapo/ioc/Di.js.map +1 -1
  16. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.d.ts +1 -0
  17. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js +1 -0
  18. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js.map +1 -1
  19. package/dist/integration-engine/enapo/transformations/eno/EnoBuildingTransformation.d.ts +2 -1
  20. package/dist/integration-engine/enapo/transformations/eno/EnoBuildingTransformation.js +3 -1
  21. package/dist/integration-engine/enapo/transformations/eno/EnoBuildingTransformation.js.map +1 -1
  22. package/dist/integration-engine/enapo/transformations/eno/EnoStructureTransformation.d.ts +2 -1
  23. package/dist/integration-engine/enapo/transformations/eno/EnoStructureTransformation.js +3 -1
  24. package/dist/integration-engine/enapo/transformations/eno/EnoStructureTransformation.js.map +1 -1
  25. package/dist/integration-engine/enapo/workers/EnapoWorker.js +1 -0
  26. package/dist/integration-engine/enapo/workers/EnapoWorker.js.map +1 -1
  27. package/dist/integration-engine/enapo/workers/interfaces/IEnoDataTaskInput.d.ts +1 -0
  28. package/dist/integration-engine/enapo/workers/interfaces/IEnoDataTaskInput.js.map +1 -1
  29. package/dist/integration-engine/enapo/workers/interfaces/IEnoGeometryTaskInput.d.ts +1 -0
  30. package/dist/integration-engine/enapo/workers/interfaces/IEnoOrganizationSyncTaskInput.d.ts +5 -0
  31. package/dist/integration-engine/enapo/workers/interfaces/IEnoOrganizationSyncTaskInput.js +3 -0
  32. package/dist/integration-engine/enapo/workers/interfaces/IEnoOrganizationSyncTaskInput.js.map +1 -0
  33. package/dist/integration-engine/enapo/workers/schema/EnoDataTaskInputSchema.d.ts +1 -0
  34. package/dist/integration-engine/enapo/workers/schema/EnoDataTaskInputSchema.js +4 -0
  35. package/dist/integration-engine/enapo/workers/schema/EnoDataTaskInputSchema.js.map +1 -1
  36. package/dist/integration-engine/enapo/workers/schema/EnoGeometryTaskInputSchema.d.ts +1 -0
  37. package/dist/integration-engine/enapo/workers/schema/EnoGeometryTaskInputSchema.js +4 -0
  38. package/dist/integration-engine/enapo/workers/schema/EnoGeometryTaskInputSchema.js.map +1 -1
  39. package/dist/integration-engine/enapo/workers/schema/EnoOrganizationSyncTaskInputSchema.d.ts +6 -0
  40. package/dist/integration-engine/enapo/workers/schema/EnoOrganizationSyncTaskInputSchema.js +33 -0
  41. package/dist/integration-engine/enapo/workers/schema/EnoOrganizationSyncTaskInputSchema.js.map +1 -0
  42. package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.js +12 -9
  43. package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.js.map +1 -1
  44. package/dist/integration-engine/enapo/workers/task/EnoGeometryTask.js +2 -1
  45. package/dist/integration-engine/enapo/workers/task/EnoGeometryTask.js.map +1 -1
  46. package/dist/integration-engine/enapo/workers/task/EnoOrganizationSyncTask.d.ts +12 -0
  47. package/dist/integration-engine/enapo/workers/task/EnoOrganizationSyncTask.js +57 -0
  48. package/dist/integration-engine/enapo/workers/task/EnoOrganizationSyncTask.js.map +1 -0
  49. package/dist/integration-engine/enapo/workers/task/EnoStructureTask.js +12 -9
  50. package/dist/integration-engine/enapo/workers/task/EnoStructureTask.js.map +1 -1
  51. package/dist/output-gateway/repositories/EnoBuildingDetailRepository.d.ts +1 -0
  52. package/dist/output-gateway/repositories/EnoBuildingDetailRepository.js +10 -2
  53. package/dist/output-gateway/repositories/EnoBuildingDetailRepository.js.map +1 -1
  54. package/dist/output-gateway/repositories/EnoBuildingHeatSourcesRepository.d.ts +8 -0
  55. package/dist/output-gateway/repositories/EnoBuildingHeatSourcesRepository.js +51 -0
  56. package/dist/output-gateway/repositories/EnoBuildingHeatSourcesRepository.js.map +1 -0
  57. package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.d.ts +2 -0
  58. package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.d.ts +15 -0
  59. package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.js +1 -1
  60. package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.js.map +1 -1
  61. package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.d.ts +1 -0
  62. package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.js +17 -0
  63. package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.js.map +1 -1
  64. package/dist/schema-definitions/models/enapo/EnapoBudovaSpotrebicModel.d.ts +22 -0
  65. package/dist/schema-definitions/models/enapo/EnapoBudovaSpotrebicModel.js +58 -0
  66. package/dist/schema-definitions/models/enapo/EnapoBudovaSpotrebicModel.js.map +1 -0
  67. package/dist/schema-definitions/models/enapo/interfaces/IEnapoBudovaSpotrebic.d.ts +15 -0
  68. package/dist/schema-definitions/models/enapo/interfaces/IEnapoBudovaSpotrebic.js +3 -0
  69. package/dist/schema-definitions/models/enapo/interfaces/IEnapoBudovaSpotrebic.js.map +1 -0
  70. package/dist/schema-definitions/models/eno/PropertyModel.d.ts +1 -0
  71. package/dist/schema-definitions/models/eno/PropertyModel.js +6 -1
  72. package/dist/schema-definitions/models/eno/PropertyModel.js.map +1 -1
  73. package/dist/schema-definitions/models/eno/RemovedGIDModel.d.ts +1 -0
  74. package/dist/schema-definitions/models/eno/RemovedGIDModel.js +6 -1
  75. package/dist/schema-definitions/models/eno/RemovedGIDModel.js.map +1 -1
  76. package/dist/schema-definitions/models/eno/interfaces/IProperty.d.ts +1 -0
  77. package/dist/schema-definitions/models/eno/interfaces/IRemovedGID.d.ts +1 -0
  78. package/docs/asyncapi.yaml +57 -0
  79. package/docs/implementation_documentation.md +40 -5
  80. package/docs/openapi-output.yaml +69 -37
  81. package/package.json +2 -2
@@ -0,0 +1,22 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
3
+ import { IEnapoBudovaSpotrebic } from "./interfaces/IEnapoBudovaSpotrebic";
4
+ export declare class EnapoBudovaSpotrebicModel extends Model<IEnapoBudovaSpotrebic> implements IEnapoBudovaSpotrebic {
5
+ static TABLE_NAME: string;
6
+ static REPOSITORY_NAME: string;
7
+ id_bud_spotrebic: number;
8
+ gid: string;
9
+ kod_eno: string;
10
+ id_budova: number | null;
11
+ id_typ_bud_spotrebic: number | null;
12
+ nazev_typ_bud_spotrebic: string | null;
13
+ nazev_spotrebic: string | null;
14
+ poznamka: string | null;
15
+ palivo: number | null;
16
+ vykon_kw: number | null;
17
+ monitoring: boolean | null;
18
+ provoz_od: string | null;
19
+ adresa: string | null;
20
+ static attributeModel: ModelAttributes<EnapoBudovaSpotrebicModel, IEnapoBudovaSpotrebic>;
21
+ static jsonSchema: JSONSchemaType<IEnapoBudovaSpotrebic[]>;
22
+ }
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnapoBudovaSpotrebicModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class EnapoBudovaSpotrebicModel extends sequelize_1.Model {
6
+ }
7
+ exports.EnapoBudovaSpotrebicModel = EnapoBudovaSpotrebicModel;
8
+ EnapoBudovaSpotrebicModel.TABLE_NAME = "enapo_budova_spotrebic";
9
+ EnapoBudovaSpotrebicModel.REPOSITORY_NAME = "EnapoBudovaSpotrebicRepository";
10
+ EnapoBudovaSpotrebicModel.attributeModel = {
11
+ id_bud_spotrebic: {
12
+ type: sequelize_1.DataTypes.INTEGER,
13
+ allowNull: false,
14
+ primaryKey: true,
15
+ },
16
+ gid: {
17
+ type: sequelize_1.DataTypes.STRING,
18
+ allowNull: false,
19
+ primaryKey: true,
20
+ },
21
+ kod_eno: {
22
+ type: sequelize_1.DataTypes.STRING(50),
23
+ allowNull: false,
24
+ },
25
+ id_budova: sequelize_1.DataTypes.INTEGER,
26
+ id_typ_bud_spotrebic: sequelize_1.DataTypes.INTEGER,
27
+ nazev_typ_bud_spotrebic: sequelize_1.DataTypes.STRING(50),
28
+ nazev_spotrebic: sequelize_1.DataTypes.STRING(255),
29
+ poznamka: sequelize_1.DataTypes.STRING(500),
30
+ palivo: sequelize_1.DataTypes.INTEGER,
31
+ vykon_kw: sequelize_1.DataTypes.DECIMAL(12, 2),
32
+ monitoring: sequelize_1.DataTypes.BOOLEAN,
33
+ provoz_od: sequelize_1.DataTypes.DATEONLY,
34
+ adresa: sequelize_1.DataTypes.STRING(255),
35
+ };
36
+ EnapoBudovaSpotrebicModel.jsonSchema = {
37
+ type: "array",
38
+ items: {
39
+ type: "object",
40
+ properties: {
41
+ id_bud_spotrebic: { type: "integer" },
42
+ gid: { type: "string" },
43
+ kod_eno: { type: "string" },
44
+ id_budova: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
45
+ id_typ_bud_spotrebic: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
46
+ nazev_typ_bud_spotrebic: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
47
+ nazev_spotrebic: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
48
+ poznamka: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
49
+ palivo: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
50
+ vykon_kw: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
51
+ monitoring: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
52
+ provoz_od: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
53
+ adresa: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
54
+ },
55
+ required: ["id_bud_spotrebic", "gid", "kod_eno"],
56
+ },
57
+ };
58
+ //# sourceMappingURL=EnapoBudovaSpotrebicModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnapoBudovaSpotrebicModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/enapo/EnapoBudovaSpotrebicModel.ts"],"names":[],"mappings":";;;AACA,mEAAwF;AAGxF,MAAa,yBAA0B,SAAQ,iBAA4B;;AAA3E,8DAmEC;AAlEiB,oCAAU,GAAG,wBAAwB,CAAC;AACtC,yCAAe,GAAG,gCAAgC,CAAC;AAgBnD,wCAAc,GAAsE;IAC9F,gBAAgB,EAAE;QACd,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACnB;IACD,GAAG,EAAE;QACD,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,IAAI;KACnB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,SAAS,EAAE,KAAK;KACnB;IACD,SAAS,EAAE,qBAAS,CAAC,OAAO;IAC5B,oBAAoB,EAAE,qBAAS,CAAC,OAAO;IACvC,uBAAuB,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,C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,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC3E,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC1E,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC3E,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC9E,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC5E,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;SAC5E;QACD,QAAQ,EAAE,CAAC,kBAAkB,EAAE,KAAK,EAAE,SAAS,CAAC;KACnD;CACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ export interface IEnapoBudovaSpotrebic {
2
+ id_bud_spotrebic: number;
3
+ gid: string;
4
+ kod_eno: string;
5
+ id_budova: number | null;
6
+ id_typ_bud_spotrebic: number | null;
7
+ nazev_typ_bud_spotrebic: string | null;
8
+ nazev_spotrebic: string | null;
9
+ poznamka: string | null;
10
+ palivo: number | null;
11
+ vykon_kw: number | null;
12
+ monitoring: boolean | null;
13
+ provoz_od: string | null;
14
+ adresa: string | null;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IEnapoBudovaSpotrebic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEnapoBudovaSpotrebic.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/models/enapo/interfaces/IEnapoBudovaSpotrebic.ts"],"names":[],"mappings":""}
@@ -6,6 +6,7 @@ export declare class PropertyModel extends Model<IProperty> implements IProperty
6
6
  gid: string;
7
7
  gid_typ: "budova" | "stavba";
8
8
  zdroj: string;
9
+ id_organizace: number;
9
10
  id_maj_evidencni_jednotka: number;
10
11
  datum_nabyti: Date | null;
11
12
  datum_pozbyti: Date | null;
@@ -19,6 +19,10 @@ PropertyModel.attributeModel = {
19
19
  primaryKey: true,
20
20
  type: sequelize_1.DataTypes.TEXT,
21
21
  },
22
+ id_organizace: {
23
+ primaryKey: true,
24
+ type: sequelize_1.DataTypes.NUMBER,
25
+ },
22
26
  id_maj_evidencni_jednotka: sequelize_1.DataTypes.NUMBER,
23
27
  datum_nabyti: sequelize_1.DataTypes.DATE,
24
28
  datum_pozbyti: sequelize_1.DataTypes.DATE,
@@ -42,6 +46,7 @@ PropertyModel.jsonSchema = {
42
46
  gid: { type: "string" },
43
47
  gid_typ: { type: "string" },
44
48
  zdroj: { type: "string" },
49
+ id_organizace: { type: "number" },
45
50
  id_maj_evidencni_jednotka: { type: "number" },
46
51
  datum_nabyti: {
47
52
  oneOf: [
@@ -81,7 +86,7 @@ PropertyModel.jsonSchema = {
81
86
  v_majetku_statu: { type: "boolean" },
82
87
  v_procesu_svereni: { type: "boolean" },
83
88
  },
84
- required: ["gid", "gid_typ", "zdroj"],
89
+ required: ["gid", "gid_typ", "zdroj", "id_organizace"],
85
90
  },
86
91
  };
87
92
  //# sourceMappingURL=PropertyModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyModel.js","sourceRoot":"","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,EAAE,IAAI,EAAE,SAAS,EAAE;SACzC;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,CAAC;KACzD;CACJ,CAAC"}
@@ -6,6 +6,7 @@ export declare class RemovedGIDModel extends Model<IRemovedGID> implements IRemo
6
6
  gid: string;
7
7
  gid_typ: "budova" | "stavba";
8
8
  zdroj: string;
9
+ id_organizace: number;
9
10
  static attributeModel: ModelAttributes<RemovedGIDModel, IRemovedGID>;
10
11
  static jsonSchema: JSONSchemaType<IRemovedGID[]>;
11
12
  }
@@ -19,6 +19,10 @@ RemovedGIDModel.attributeModel = {
19
19
  primaryKey: true,
20
20
  type: sequelize_1.DataTypes.TEXT,
21
21
  },
22
+ id_organizace: {
23
+ primaryKey: true,
24
+ type: sequelize_1.DataTypes.NUMBER,
25
+ },
22
26
  };
23
27
  RemovedGIDModel.jsonSchema = {
24
28
  type: "array",
@@ -28,8 +32,9 @@ RemovedGIDModel.jsonSchema = {
28
32
  gid: { type: "string" },
29
33
  gid_typ: { type: "string" },
30
34
  zdroj: { type: "string" },
35
+ id_organizace: { type: "number" },
31
36
  },
32
- required: ["gid", "gid_typ", "zdroj"],
37
+ required: ["gid", "gid_typ", "zdroj", "id_organizace"],
33
38
  },
34
39
  };
35
40
  //# sourceMappingURL=RemovedGIDModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RemovedGIDModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/eno/RemovedGIDModel.ts"],"names":[],"mappings":";;;AACA,mEAAwF;AAGxF,MAAa,eAAgB,SAAQ,iBAAkB;;AAAvD,0CAkCC;AAjC0B,0BAAU,GAAG,cAAc,CAAC;AAMrC,8BAAc,GAAkD;IAC1E,GAAG,EAAE;QACD,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,OAAO,EAAE;QACL,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,KAAK,EAAE;QACH,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;CACJ,CAAC;AAEY,0BAAU,GAAkC;IACtD,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC;KACxC;CACJ,CAAC"}
1
+ {"version":3,"file":"RemovedGIDModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/eno/RemovedGIDModel.ts"],"names":[],"mappings":";;;AACA,mEAAwF;AAGxF,MAAa,eAAgB,SAAQ,iBAAkB;;AAAvD,0CAwCC;AAvC0B,0BAAU,GAAG,cAAc,CAAC;AAOrC,8BAAc,GAAkD;IAC1E,GAAG,EAAE;QACD,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,OAAO,EAAE;QACL,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,KAAK,EAAE;QACH,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,aAAa,EAAE;QACX,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;CACJ,CAAC;AAEY,0BAAU,GAAkC;IACtD,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACpC;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,CAAC;KACzD;CACJ,CAAC"}
@@ -2,6 +2,7 @@ export interface IProperty {
2
2
  gid: string;
3
3
  gid_typ: "budova" | "stavba";
4
4
  zdroj: string;
5
+ id_organizace: number;
5
6
  id_maj_evidencni_jednotka: number;
6
7
  datum_nabyti: Date | null;
7
8
  datum_pozbyti: Date | null;
@@ -2,4 +2,5 @@ export interface IRemovedGID {
2
2
  gid: string;
3
3
  gid_typ: string;
4
4
  zdroj: string;
5
+ id_organizace: number;
5
6
  }
@@ -202,6 +202,17 @@ channels:
202
202
  messages:
203
203
  enoGeometryMessage:
204
204
  $ref: "#/components/messages/energetics.EnoGeometryMessage"
205
+ energetics.processEnoOrganizationSync:
206
+ address: dataplatform.enapoenergetics.processEnoOrganizationSync
207
+ description: fans out a buildings + structures sync across every organizationId configured for every ENO source (stat, mhmp, mc), so one trigger message covers MHMP, stát and all 57 městská část organizations instead of one message per organization
208
+ bindings:
209
+ amqp:
210
+ is: queue
211
+ queue:
212
+ durable: true
213
+ messages:
214
+ enoOrganizationSyncMessage:
215
+ $ref: "#/components/messages/energetics.EnoOrganizationSyncMessage"
205
216
  operations:
206
217
  energetics.fetchAccessConfiguration:
207
218
  action: "send"
@@ -275,6 +286,10 @@ operations:
275
286
  action: "send"
276
287
  channel:
277
288
  $ref: "#/channels/energetics.processEnoGeometry"
289
+ energetics.processEnoOrganizationSync:
290
+ action: "send"
291
+ channel:
292
+ $ref: "#/channels/energetics.processEnoOrganizationSync"
278
293
  components:
279
294
  messages:
280
295
  emptyMessage:
@@ -329,6 +344,11 @@ components:
329
344
  type: object
330
345
  $ref: "#/components/schemas/energetics.IEnoGeometryTaskInput"
331
346
  additionalProperties: false
347
+ energetics.EnoOrganizationSyncMessage:
348
+ payload:
349
+ type: object
350
+ $ref: "#/components/schemas/energetics.IEnoOrganizationSyncTaskInput"
351
+ additionalProperties: false
332
352
  schemas:
333
353
  energetics.IFetchConsumptionInput:
334
354
  type: object
@@ -457,6 +477,7 @@ components:
457
477
  required:
458
478
  - type
459
479
  - source
480
+ - organizationId
460
481
  properties:
461
482
  type:
462
483
  type: string
@@ -472,6 +493,12 @@ components:
472
493
  description: Data source identifier (e.g., "mhmp" for Hlavní město Praha)
473
494
  examples:
474
495
  - "mhmp"
496
+ organizationId:
497
+ type: number
498
+ description: ENO organizace id (idOrganizace) the sync is scoped to
499
+ examples:
500
+ - 1
501
+ - 51
475
502
  daysBack:
476
503
  type: number
477
504
  description: Optional parameter for incremental synchronization - number of days to look back. If not provided, performs full synchronization.
@@ -486,6 +513,7 @@ components:
486
513
  required:
487
514
  - source
488
515
  - listGid
516
+ - organizationId
489
517
  properties:
490
518
  source:
491
519
  type: string
@@ -499,5 +527,34 @@ components:
499
527
  description: List of GID identifiers for which to fetch geometry data
500
528
  examples:
501
529
  - ["GID312203", "GID311624"]
530
+ organizationId:
531
+ type: number
532
+ description: ENO organizace id (idOrganizace) the geometry belongs to
533
+ examples:
534
+ - 1
535
+ - 51
536
+ additionalProperties: false
537
+ energetics.IEnoOrganizationSyncTaskInput:
538
+ type: object
539
+ required:
540
+ - type
541
+ properties:
542
+ type:
543
+ type: string
544
+ description: Type of synchronization (current buildings/structures or removed buildings/structures)
545
+ enum:
546
+ - "current"
547
+ - "removed"
548
+ examples:
549
+ - "current"
550
+ - "removed"
551
+ daysBack:
552
+ type: number
553
+ description: Optional parameter for incremental synchronization - number of days to look back. If not provided, performs full synchronization.
554
+ minimum: 1
555
+ examples:
556
+ - 7
557
+ - 30
558
+ - 90
502
559
  additionalProperties: false
503
560
 
@@ -180,6 +180,8 @@ https://gitlab.com/operator-ict/golemio/projekty/energetika/p0262.prevzeti-energ
180
180
  - autentizace: konfigurovatelná přes `module.energetics.eno.{source}.type` (`basic` | `token`)
181
181
  - `basic` — HTTP Basic Auth: `module.energetics.eno.{source}.user`, `module.energetics.eno.{source}.password`
182
182
  - `token` — IBM API Gateway token v hlavičce `X-IBM-Client-Id`: `module.energetics.eno.{source}.clientId`
183
+ - organizace (`idOrganizace`): operace Budovy/Stavby/Geometrie berou `idOrganizace` jako request parametr (číselníky ne - vrací celý číselník bez filtrace). Task parametr `organizationId` se posílá do všech volání dané synchronizace.
184
+ - `module.energetics.eno.{source}.organizationIds` — pole `idOrganizace` (číselné ID organizace) patřících pod daný zdroj/přihlašovací údaje (`{source}` = `stat` | `mhmp` | `mc`, viz [ENO_ORGANIZATION_SOURCES](../src/integration-engine/enapo/constants.ts)); čte [EnoOrganizationSyncTask](#task-enoorganizationsynctask), který spouští synchronizaci napříč všemi zdroji
183
185
  - API dokumentace: WSDL schéma
184
186
  - formát dat
185
187
  - protokol: SOAP/XML
@@ -554,13 +556,14 @@ Task stahuje data o budovách ze systému ENO včetně detailních informací o
554
556
  - vstupní rabbitmq fronta
555
557
  - název: dataplatform.enapoenergetics.processEnoBuildings
556
558
  - TTL: 1 hodina
557
- - parametry: `{ type, source, daysBack? }`
559
+ - parametry: `{ type, source, organizationId, daysBack? }`
558
560
  - `type` - typ synchronizace (`current` | `removed`)
559
561
  - `source` - zdroj dat (např. `mhmp`)
562
+ - `organizationId` - ID organizace pro zdroj dat (např. `1`)
560
563
  - `daysBack` - volitelný parametr pro inkrementální synchronizaci (počet dní zpětně)
561
564
  - validační schéma: [EnoBuildingTaskInputSchema](../src/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.ts)
562
565
  - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
563
- - žádné
566
+ - dataplatform.enapoenergetics.processEnoGeometry - po úspěšném stažení budov (`organizationId` se přeposílá dál)
564
567
  - datové zdroje
565
568
  - ENO SOAP/WSDL API (Buildings endpoint)
566
569
  - [EnoDatasource](../src/integration-engine/enapo/datasources/eno/EnoDatasource.ts)
@@ -590,13 +593,14 @@ Task stahuje data o stavbách ze systému ENO včetně detailních informací o
590
593
  - vstupní rabbitmq fronta
591
594
  - název: dataplatform.enapoenergetics.processEnoStructures
592
595
  - TTL: 1 hodina
593
- - parametry: `{ type, source, daysBack? }`
596
+ - parametry: `{ type, source, organizationId, daysBack? }`
594
597
  - `type` - typ synchronizace (`current` | `removed`)
595
598
  - `source` - zdroj dat (např. `mhmp`)
599
+ - `organizationId` - ID organizace pro zdroj dat (např. `1`)
596
600
  - `daysBack` - volitelný parametr pro inkrementální synchronizaci (počet dní zpětně)
597
601
  - validační schéma: [EnoBuildingTaskInputSchema](../src/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.ts)
598
602
  - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
599
- - dataplatform.enapoenergetics.processEnoGeometry - po úspěšném stažení staveb
603
+ - dataplatform.enapoenergetics.processEnoGeometry - po úspěšném stažení staveb (`organizationId` se přeposílá dál)
600
604
  - datové zdroje
601
605
  - ENO SOAP/WSDL API (Structure endpoint)
602
606
  - [EnoDatasource](../src/integration-engine/enapo/datasources/eno/EnoDatasource.ts)
@@ -627,9 +631,10 @@ Task stahuje geometrie (polygony) pro budovy a stavby ze systému ENO. Je automa
627
631
  - vstupní rabbitmq fronta
628
632
  - název: dataplatform.enapoenergetics.processEnoGeometry
629
633
  - TTL: 1 hodina
630
- - parametry: `{ source, listGid }`
634
+ - parametry: `{ source, listGid, organizationId }`
631
635
  - `source` - zdroj dat (např. `mhmp`)
632
636
  - `listGid` - seznam GID pro které se má stáhnout geometrie
637
+ - `organizationId` - ID organizace pro zdroj dat (např. `1`), přeposíláno z [EnoBuildingTask](#task-enobuildingtask)/[EnoStructureTask](#task-enostructuretask)
633
638
  - validační schéma: [EnoGeometryTaskInputSchema](../src/integration-engine/enapo/workers/schema/EnoGeometryTaskInputSchema.ts)
634
639
  - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
635
640
  - žádné
@@ -651,6 +656,29 @@ Task stahuje geometrie (polygony) pro budovy a stavby ze systému ENO. Je automa
651
656
  - unit testy
652
657
  - [EnoGeometryTask.test.ts](../test/integration-engine/enapo/task/EnoGeometryTask.test.ts)
653
658
 
659
+ #### _task: EnoOrganizationSyncTask_
660
+
661
+ Task spouští synchronizaci budov a staveb pro všechny nakonfigurované ENO organizace, napříč všemi třemi zdroji (`stat`, `mhmp`, `mc`) — pro každý zdroj přečte jeho `organizationIds` a pro každé `organizationId` odešle jednu zprávu do `processEnoBuildings` a jednu do `processEnoStructures`, s tímto konkrétním `source`/`organizationId` párem. Umožňuje spouštět celou synchronizaci (MHMP, stát i všechny MČ) jedním externím triggerem místo jedné zprávy na organizaci.
662
+
663
+ - vstupní rabbitmq fronta
664
+ - název: dataplatform.enapoenergetics.processEnoOrganizationSync
665
+ - TTL: 1 hodina
666
+ - parametry: `{ type, daysBack? }` (bez `source`/`organizationId` — ten task doplní za volajícího, jednou pro každou nakonfigurovanou organizaci každého zdroje)
667
+ - validační schéma: [EnoOrganizationSyncTaskInputSchema](../src/integration-engine/enapo/workers/schema/EnoOrganizationSyncTaskInputSchema.ts)
668
+ - závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
669
+ - dataplatform.enapoenergetics.processEnoBuildings - jednou pro každý pár (`source`, `organizationId`)
670
+ - dataplatform.enapoenergetics.processEnoStructures - jednou pro každý pár (`source`, `organizationId`)
671
+ - datové zdroje
672
+ - žádné (pouze moduleConfig)
673
+ - konfigurace
674
+ - `module.energetics.eno.stat.organizationIds`, `module.energetics.eno.mhmp.organizationIds`, `module.energetics.eno.mc.organizationIds` - pole `idOrganizace` pro organizace patřící pod daný zdroj/přihlašovací údaje; zdroje samotné vyjmenovává [ENO_ORGANIZATION_SOURCES](../src/integration-engine/enapo/constants.ts)
675
+ - transformace
676
+ - žádné
677
+ - data modely
678
+ - žádné
679
+ - unit testy
680
+ - [EnoOrganizationSyncTask.test.ts](../test/integration-engine/enapo/task/EnoOrganizationSyncTask.test.ts)
681
+
654
682
  #### _task: DedSearchIndexRefreshTask_
655
683
 
656
684
  Task přegeneruje materializovaný pohled `mv_ded_building_search`, nad kterým běží vyhledávací endpoint `/v2/energetics/ded/buildings`.
@@ -1022,16 +1050,23 @@ Přehled endpointů a parametru `accessLimit`:
1022
1050
  - `UNION ALL` větev pro OM známá pouze z Porsenny (e-manažer): hlavní měřidla (`level = main`) z `enapo_porsenna_devices`, jejichž `identifier` není namapován na daný GID v `enapo_gid_mapping`; `commodity` z typu měřidla (v reálných datech existují pouze `electricity_meter` / `gasometer` / `heat_meter` / `water_meter`), `id_type` odvozen přímo z komodity (elektřina → ean, plyn → eic, teplo a voda → `om` — standardní identifikátor nemají), `link_source = 'porsenna'`, `is_active` z `disabled_at`
1023
1051
  - `v_enapo_building_porsenna_devices` — měřidla Porsenny s budovou (`enapo_porsenna_devices` × `enapo_porsenna_buildings` přes `(source, building_id)`); slouží pro obohacení OM o blok `porsenna` (měřidlo + podružná měřidla) a pro blok `energy_management` na úrovni budovy; spotřeby Porsenny blok nenese — jdou přes `mv_enapo_om_consumption` do `consumption_history` daného OM, kde mají navíc pokrytí a počty přispěvatelů
1024
1052
  - `enapo_ppas_distribution_invoice_device` / `_price`, `enapo_ppas_commercial_invoice_device` / `_price` — dotahované podle id faktury a filtrované podle `place_id` instalace (jedna faktura může účtovat více OM, bez filtru by se řádky mísily)
1053
+ - `enapo_budova_spotrebic` — kotelny (zdroje vytápění) budovy; jednorázový snapshot, dotahovaný přes `GetByGid` podle normalizovaného GIDu
1025
1054
  - mapovací tabulka `enapo_gid_mapping`
1026
1055
  - vlastní kontrakt modulu; plněná denně synchronizačním taskem [EnapoGidMappingSyncTask](#task-enapogidmappingsynctask) z CSV exportu (synchronizované řádky mají `link_source = 'manual_entry'`)
1027
1056
  - PK je (`place_id`, `gid`); mock data (`link_source = 'mock'`) z ruční přípravy zůstávají, dokud je sync nepřepíše — synchronizovaný řádek pro stejné (`place_id`, `gid`) mock řádek přepíše
1028
1057
  - sloupec `is_active` v pohledu je odvozený z `valid_to` (NULL nebo v budoucnu = aktivní); expirovaná mapování se vracejí s příznakem
1058
+ - tabulka kotelen `enapo_budova_spotrebic`
1059
+ - jednorázový snapshot od energetického specialisty (`Zdroje_vytápění.xlsx`, list `odbmisto_budova_spotrebic`) — **bez cronu, bez živé integrace**; obsah se mění jen zopakováním importu podle [kotelny_priprava_dat.md](./eno/kotelny_priprava_dat.md)
1060
+ - PK je (`id_bud_spotrebic`, `gid`)
1061
+ - vazba na `eno_budova` je soft (bez FK) — snapshot není vázaný na životní cyklus ENO ingestu a GID chybějící v ENO nesmí import zablokovat; takové kotelny se v API prostě neprojeví
1029
1062
  - struktura odpovědi
1030
1063
  - komoditně specifická data jsou vnořená pod klíči `electricity` / `gas` u každého OM; v odpovědi je pouze klíč odpovídající poli `commodity`, ostatní jsou zcela vynechány
1031
1064
  - detail existuje, pokud pro GID máme jakákoli data — zná ho alespoň jeden zdroj (`eno_budova`, `eno_adresa`, `enapo_gid_mapping`, nebo Porsenna): pokud GID není v `eno_budova`, ale má adresy, namapovaná OM či měřidla, vrací se 200 s `building: null` a chybějící části jako `null` / prázdná pole (cca 29 % GIDů z mapování nemá záznam v ENO); 404 pouze pokud GID nezná žádný zdroj
1032
1065
  - OM známé z obou zdrojů (mapování i Porsenna) je v odpovědi jednou — data Porsenny jsou vnořená jako blok `porsenna` v příslušném komoditním klíči; duplicitní záznamy nevznikají
1033
1066
  - `monthly` řada zdroje, který reportuje jen roční agregáty (Porsenna), je prázdné pole, ne 36 `null` položek — spina samých `null` by tvrdila, že zdroj měsíce zná a nemá je, což pro zdroj bez měsíční granularity neplatí; roční data jsou v `yearly`
1034
1067
  - budoucí komodity (teplo, voda) se přidají jako nové klíče bez breaking change
1068
+ - `heat_sources` — kotelny budovy: `count`, `total_rated_output_kw` a pole `sources` řazené podle výkonu (nejsilnější první). API pole jsou anglicky (`appliance_name`, `note`, `rated_output_kw`, `fuel_code`, `is_monitored`, `appliance_type`, `operating_since`) a mapují se z českých sloupců snapshotu (`nazev_spotrebic`, `poznamka`, `vykon_kw`, `palivo`, `monitoring`, `nazev_typ_bud_spotrebic`, `provoz_od`) v `EnoBuildingDetailTransformation`. Budova bez kotelen vrací `count: 0` a prázdné `sources`, ne chybějící klíč
1069
+ - `total_rated_output_kw` sčítá jen kotelny s uvedeným výkonem
1035
1070
  - `name` / `address` na nejvyšší úrovni: `building` je pro cca 29 % GIDů `null`, ale kartu je pořád potřeba nadepsat — název se proto řeší stejným fallbackem jako ve vyhledávání (`eno_budova.nazev` → název budovy z Porsenny → `null`), adresa jako první popsaná `eno_adresa` (řazené hlavní adresou napřed) → adresa z Porsenny → `null`. Kdyby to zůstalo na klientech, každý si řetězec poskládá jinak.
1036
1071
  - provenience agregátů (aby klient nemusel sečtené číslo vydávat za přesné)
1037
1072
  - `points_total` / `points_with_data` u každého období: kolik OM do něj přispělo a kolik z nich mělo hodnotu. Rozdíl proti `points` celé řady je to, co odliší „budova spotřebovala míň“ od „chybí jedno OM“; u prázdného období spiny jsou obě nuly, nikdy `null`
@@ -151,40 +151,7 @@ paths:
151
151
  summary: ENO building detail with consumption points (OM) and technical parameters
152
152
  description: >-
153
153
  Returns the ENO building (eno_budova) identified by GID together with its addresses and all
154
- consumption points mapped to it. Commodity-specific data is nested under the
155
- `electricity`/`gas`/`heat`/`water` keys of each consumption point; only the key matching the
156
- `commodity` field is present, the others are omitted entirely.
157
-
158
- Consumption points come from two independent sources: the energobroker mapping (EAN/EIC,
159
- enriched with PRE metadata and PPAS invoices) and Porsenna e-manazer devices
160
- (`link_source: porsenna`) — heat and water meters, plus any EAN/EIC the mapping lacks.
161
- An OM known to both sources is returned once, with the Porsenna data nested as a `porsenna`
162
- sub-block (device, sub-meters, yearly consumption) inside its commodity block. Buildings
163
- tracked in Porsenna also carry an `energy_management` summary.
164
-
165
- The endpoint returns whatever data exists for the GID: if there is any building record,
166
- address, or consumption point, the response is 200 with the missing parts as `null` or
167
- empty arrays (e.g. `building: null` when only consumption points or addresses are known).
168
- 404 is returned only when no source holds any data for the GID.
169
-
170
- `consumption_history` carries monthly and yearly consumption per commodity, at building
171
- level and again per consumption point. Sources are returned **in parallel** rather than
172
- merged into one canonical series: metered readings and invoiced amounts legitimately
173
- disagree, and which one a client wants depends on what it shows. `is_metered`
174
- distinguishes them.
175
-
176
- Coverage differs sharply by commodity and is a property of the data, not of the endpoint.
177
- Gas has roughly three years of invoice history for about three quarters of its points.
178
- Electricity is metered-only and starts in 2025, covering under a tenth of its points, so
179
- most months come back `null`. Heat and water exist only as Porsenna yearly figures.
180
- `measurement_data_from` and the per-series `data_from` say when data actually begins, so a
181
- run of leading `null`s is explicable rather than looking like a fault.
182
-
183
- Every aggregate carries its own provenance, so a client never has to present a summed
184
- figure as if it were exact: `points_total`/`points_with_data` say how many consumption
185
- points stand behind a period, `invoice_ids` names the billing documents an allocated
186
- period came from, `coverage_count`/`expected_count` mark a partial period, and a point's
187
- `shared_with` names the other buildings its meters also serve.
154
+ consumption points mapped to it.
188
155
  parameters:
189
156
  - in: path
190
157
  name: gid
@@ -1001,6 +968,73 @@ components:
1001
968
  type: array
1002
969
  items:
1003
970
  $ref: "#/components/schemas/EnergeticsEnoConsumptionPoint"
971
+ heat_sources:
972
+ $ref: "#/components/schemas/EnergeticsEnoHeatSources"
973
+ EnergeticsEnoHeatSources:
974
+ type: object
975
+ description: >-
976
+ Heat sources (boiler rooms) recorded for the building.
977
+ properties:
978
+ count:
979
+ type: integer
980
+ description: Number of heat sources recorded for this building.
981
+ example: 3
982
+ total_rated_output_kw:
983
+ type: number
984
+ nullable: true
985
+ description: >-
986
+ Sum of `rated_output_kw` over the building's heat sources
987
+ example: 650.5
988
+ sources:
989
+ type: array
990
+ description: >-
991
+ The individual appliances, strongest rated output first. .
992
+ items:
993
+ type: object
994
+ properties:
995
+ appliance_name:
996
+ type: string
997
+ nullable: true
998
+ description: >-
999
+ Free-text appliance name from the snapshot.
1000
+ example: 2x gas boiler Viessmann Vitocrossal 200
1001
+ note:
1002
+ type: string
1003
+ nullable: true
1004
+ description: Note from the snapshot, e.g. where the figure came from.
1005
+ example: boiler nameplates
1006
+ rated_output_kw:
1007
+ type: number
1008
+ nullable: true
1009
+ description: >-
1010
+ Rated output in kW. `0` means the snapshot states no output
1011
+ example: 530
1012
+ fuel_code:
1013
+ type: integer
1014
+ nullable: true
1015
+ description: >-
1016
+ Fuel/energy-source code
1017
+ example: 2
1018
+ is_monitored:
1019
+ type: boolean
1020
+ nullable: true
1021
+ description: >-
1022
+ Monitoring flag from the source system. Its exact meaning in the source
1023
+ is not documented in the snapshot.
1024
+ example: false
1025
+ appliance_type:
1026
+ type: string
1027
+ nullable: true
1028
+ description: >-
1029
+ Appliance type from the source system. Every row of the current snapshot
1030
+ is `boiler`.
1031
+ example: boiler
1032
+ operating_since:
1033
+ type: string
1034
+ format: date
1035
+ nullable: true
1036
+ description: Date the appliance has been in operation since.
1037
+ example: 2025-01-01
1004
1038
  EnergeticsEnoConsumptionEntry:
1005
1039
  type: object
1006
1040
  description: >-
@@ -1019,9 +1053,7 @@ components:
1019
1053
  nullable: true
1020
1054
  description: >-
1021
1055
  Comparable energy. For gas this is derived (normometers_nm3 * combustion_heat) and is
1022
- null whenever the conversion inputs are missing; `value` + `unit` stay authoritative.
1023
- A yearly entry withholds it unless every contributing month has one, so it can never
1024
- imply a conversion rate that did not exist.
1056
+ null whenever the conversion inputs are missing;
1025
1057
  coverage_count:
1026
1058
  type: number
1027
1059
  description: Days of the period carrying data.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/energetics",
3
- "version": "1.15.0",
3
+ "version": "1.16.0-dev.2846140746",
4
4
  "description": "Golemio Energetics Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "overrides": {
89
89
  "soap": {
90
- "@xmldom/xmldom": "0.9.10"
90
+ "@xmldom/xmldom": "0.9.12"
91
91
  },
92
92
  "openapi-format": "1.29.0"
93
93
  }