@golemio/energetics 1.8.3-dev.2498872172 → 1.8.3-dev.2501001499

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 (108) hide show
  1. package/db/migrations/postgresql/20260427093000-enapo-porsenna.js +53 -0
  2. package/db/migrations/postgresql/sqls/20260427093000-enapo-porsenna-down.sql +3 -0
  3. package/db/migrations/postgresql/sqls/20260427093000-enapo-porsenna-up.sql +85 -0
  4. package/dist/input-gateway/pre/PreCsvInputController.js +1 -1
  5. package/dist/input-gateway/pre/PreCsvInputController.js.map +1 -1
  6. package/dist/input-gateway/pre/PreJsonInputController.js +1 -1
  7. package/dist/input-gateway/pre/PreJsonInputController.js.map +1 -1
  8. package/dist/input-gateway/ptas/PtasWebScrapingController.js +1 -1
  9. package/dist/input-gateway/ptas/PtasWebScrapingController.js.map +1 -1
  10. package/dist/integration-engine/commodity-providers/constants.d.ts +1 -1
  11. package/dist/integration-engine/commodity-providers/constants.js +2 -1
  12. package/dist/integration-engine/commodity-providers/constants.js.map +1 -1
  13. package/dist/integration-engine/enapo/constants.d.ts +1 -1
  14. package/dist/integration-engine/enapo/constants.js +2 -1
  15. package/dist/integration-engine/enapo/constants.js.map +1 -1
  16. package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSource.d.ts +15 -0
  17. package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSource.js +67 -0
  18. package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSource.js.map +1 -0
  19. package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSourceProvider.d.ts +10 -0
  20. package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSourceProvider.js +52 -0
  21. package/dist/integration-engine/enapo/datasources/porsenna/PorsennaDataSourceProvider.js.map +1 -0
  22. package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IConsumptionApiEntry.d.ts +7 -0
  23. package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IConsumptionApiEntry.js +3 -0
  24. package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IConsumptionApiEntry.js.map +1 -0
  25. package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IGaugeApiDto.d.ts +5 -0
  26. package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IGaugeApiDto.js +3 -0
  27. package/dist/integration-engine/enapo/datasources/porsenna/interfaces/IGaugeApiDto.js.map +1 -0
  28. package/dist/integration-engine/enapo/helpers/IntervalGenerator.d.ts +1 -0
  29. package/dist/integration-engine/enapo/helpers/IntervalGenerator.js +6 -0
  30. package/dist/integration-engine/enapo/helpers/IntervalGenerator.js.map +1 -1
  31. package/dist/integration-engine/enapo/ioc/Di.js +24 -8
  32. package/dist/integration-engine/enapo/ioc/Di.js.map +1 -1
  33. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.d.ts +8 -0
  34. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js +8 -0
  35. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js.map +1 -1
  36. package/dist/integration-engine/enapo/repositories/porsenna/PorsennaBuildingsRepository.d.ts +5 -0
  37. package/dist/integration-engine/enapo/repositories/porsenna/PorsennaBuildingsRepository.js +32 -0
  38. package/dist/integration-engine/enapo/repositories/porsenna/PorsennaBuildingsRepository.js.map +1 -0
  39. package/dist/integration-engine/enapo/repositories/porsenna/PorsennaConsumptionRepository.d.ts +5 -0
  40. package/dist/integration-engine/enapo/repositories/porsenna/PorsennaConsumptionRepository.js +32 -0
  41. package/dist/integration-engine/enapo/repositories/porsenna/PorsennaConsumptionRepository.js.map +1 -0
  42. package/dist/integration-engine/enapo/repositories/porsenna/PorsennaDevicesRepository.d.ts +5 -0
  43. package/dist/integration-engine/enapo/repositories/porsenna/PorsennaDevicesRepository.js +32 -0
  44. package/dist/integration-engine/enapo/repositories/porsenna/PorsennaDevicesRepository.js.map +1 -0
  45. package/dist/integration-engine/enapo/transformations/porsenna/PorsennaConsumptionTransformation.d.ts +8 -0
  46. package/dist/integration-engine/enapo/transformations/porsenna/PorsennaConsumptionTransformation.js +47 -0
  47. package/dist/integration-engine/enapo/transformations/porsenna/PorsennaConsumptionTransformation.js.map +1 -0
  48. package/dist/integration-engine/enapo/transformations/porsenna/PorsennaGaugeTransformation.d.ts +15 -0
  49. package/dist/integration-engine/enapo/transformations/porsenna/PorsennaGaugeTransformation.js +62 -0
  50. package/dist/integration-engine/enapo/transformations/porsenna/PorsennaGaugeTransformation.js.map +1 -0
  51. package/dist/integration-engine/enapo/workers/EnapoWorker.js +1 -0
  52. package/dist/integration-engine/enapo/workers/EnapoWorker.js.map +1 -1
  53. package/dist/integration-engine/enapo/workers/interfaces/IEnapoPorsennaDistributionParams.d.ts +5 -0
  54. package/dist/integration-engine/enapo/workers/interfaces/IEnapoPorsennaDistributionParams.js +3 -0
  55. package/dist/integration-engine/enapo/workers/interfaces/IEnapoPorsennaDistributionParams.js.map +1 -0
  56. package/dist/integration-engine/enapo/workers/schema/EnapoPorsennaDistributionParamsSchema.d.ts +6 -0
  57. package/dist/integration-engine/enapo/workers/schema/EnapoPorsennaDistributionParamsSchema.js +34 -0
  58. package/dist/integration-engine/enapo/workers/schema/EnapoPorsennaDistributionParamsSchema.js.map +1 -0
  59. package/dist/integration-engine/enapo/workers/task/PorsennaDistributionTask.d.ts +27 -0
  60. package/dist/integration-engine/enapo/workers/task/PorsennaDistributionTask.js +125 -0
  61. package/dist/integration-engine/enapo/workers/task/PorsennaDistributionTask.js.map +1 -0
  62. package/dist/output-gateway/controllers/v2/AbstractController.js +4 -1
  63. package/dist/output-gateway/controllers/v2/AbstractController.js.map +1 -1
  64. package/dist/output-gateway/controllers/v2/BuildingsController.js +2 -1
  65. package/dist/output-gateway/controllers/v2/BuildingsController.js.map +1 -1
  66. package/dist/output-gateway/controllers/v2/V2DevicesController.js +1 -1
  67. package/dist/output-gateway/controllers/v2/V2DevicesController.js.map +1 -1
  68. package/dist/output-gateway/controllers/v2/V2OrganizationsController.js +1 -1
  69. package/dist/output-gateway/controllers/v2/V2OrganizationsController.js.map +1 -1
  70. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.d.ts +1 -1
  71. package/dist/output-gateway/models/interfaces/IBuildingsTransformationOutput.js +1 -0
  72. package/dist/output-gateway/transformations/BuildingsTransformation.d.ts +1 -0
  73. package/dist/output-gateway/transformations/BuildingsTransformation.js.map +1 -1
  74. package/dist/schema-definitions/constants.d.ts +2 -0
  75. package/dist/schema-definitions/constants.js +3 -1
  76. package/dist/schema-definitions/constants.js.map +1 -1
  77. package/dist/schema-definitions/datasources/enapo/porsenna/PorsennaJsonSchema.d.ts +5 -0
  78. package/dist/schema-definitions/datasources/enapo/porsenna/PorsennaJsonSchema.js +92 -0
  79. package/dist/schema-definitions/datasources/enapo/porsenna/PorsennaJsonSchema.js.map +1 -0
  80. package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IConsumptionApiEntry.d.ts +15 -0
  81. package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IConsumptionApiEntry.js +3 -0
  82. package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IConsumptionApiEntry.js.map +1 -0
  83. package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IGaugeApiDto.d.ts +41 -0
  84. package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IGaugeApiDto.js +3 -0
  85. package/dist/schema-definitions/datasources/enapo/porsenna/interfaces/IGaugeApiDto.js.map +1 -0
  86. package/dist/schema-definitions/models/porsenna/PorsennaBuildingsModel.d.ts +21 -0
  87. package/dist/schema-definitions/models/porsenna/PorsennaBuildingsModel.js +77 -0
  88. package/dist/schema-definitions/models/porsenna/PorsennaBuildingsModel.js.map +1 -0
  89. package/dist/schema-definitions/models/porsenna/PorsennaConsumptionModel.d.ts +20 -0
  90. package/dist/schema-definitions/models/porsenna/PorsennaConsumptionModel.js +72 -0
  91. package/dist/schema-definitions/models/porsenna/PorsennaConsumptionModel.js.map +1 -0
  92. package/dist/schema-definitions/models/porsenna/PorsennaDevicesModel.d.ts +27 -0
  93. package/dist/schema-definitions/models/porsenna/PorsennaDevicesModel.js +107 -0
  94. package/dist/schema-definitions/models/porsenna/PorsennaDevicesModel.js.map +1 -0
  95. package/dist/schema-definitions/models/porsenna/index.d.ts +3 -0
  96. package/dist/schema-definitions/models/porsenna/index.js +20 -0
  97. package/dist/schema-definitions/models/porsenna/index.js.map +1 -0
  98. package/dist/schema-definitions/models/porsenna/interfaces/IBuildings.d.ts +11 -0
  99. package/dist/schema-definitions/models/porsenna/interfaces/IBuildings.js +3 -0
  100. package/dist/schema-definitions/models/porsenna/interfaces/IBuildings.js.map +1 -0
  101. package/dist/schema-definitions/models/porsenna/interfaces/IConsumption.d.ts +10 -0
  102. package/dist/schema-definitions/models/porsenna/interfaces/IConsumption.js +3 -0
  103. package/dist/schema-definitions/models/porsenna/interfaces/IConsumption.js.map +1 -0
  104. package/dist/schema-definitions/models/porsenna/interfaces/IDevices.d.ts +17 -0
  105. package/dist/schema-definitions/models/porsenna/interfaces/IDevices.js +3 -0
  106. package/dist/schema-definitions/models/porsenna/interfaces/IDevices.js.map +1 -0
  107. package/docs/implementation_documentation.md +39 -0
  108. package/package.json +12 -7
@@ -1 +1 @@
1
- {"version":3,"file":"BuildingsController.js","sourceRoot":"","sources":["../../../../src/output-gateway/controllers/v2/BuildingsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yEAAoE;AACpE,8FAAyF;AACzF,8FAAyF;AACzF,iGAA4F;AAC5F,2FAAsF;AACtF,mEAAiF;AAEjF,6EAAwE;AACxE,iEAAwE;AACxE,6DAA0D;AAC1D,mFAA0E;AAGnE,IAAM,mBAAmB,iCAAzB,MAAM,mBAAoB,SAAQ,uCAAkB;IAIvD,YAC6D,0BAAsD,EACtD,sBAA0D;QAEnH,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAF+B,2BAAsB,GAAtB,sBAAsB,CAA4B;QAOhH,WAAM,GAAG,KAAK,EAAE,GAAY,E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AI,CAAC,GAAG,CAAC,CAAC;aACb;QACL,CAAC,CAAC;QAEM,gBAAW,GAAG,KAAK,EAAE,oBAAqC,EAAE,EAAE;YAClE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;YAC/E,MAAM,iBAAiB,GAAG,IAAI,CAAC,sBAAsB,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAC7E,OAAO,iBAAiB,CAAC;QAC7B,CAAC,CAAC;QAEM,mBAAc,GAAG,KAAK,EAAE,oBAAqC,EAAE,EAAE;YACrE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;YAC3E,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YACrE,OAAO,iBAAiB,CAAC;QAC7B,CAAC,CAAC;QA5CE,IAAI,CAAC,mBAAmB,GAAG,IAAI,uDAA0B,EAAE,CAAC;QAC5D,IAAI,CAAC,cAAc,GAAG,IAAI,iDAAuB,EAAE,CAAC;IACxD,CAAC;CA2CJ,CAAA;8BAtDY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAA;IACvD,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAA;qCAD6B,uDAA0B;QACtB,uDAA0B;GAN9G,mBAAmB,CAsD/B"}
1
+ {"version":3,"file":"BuildingsController.js","sourceRoot":"","sources":["../../../../src/output-gateway/controllers/v2/BuildingsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yEAAoE;AACpE,8FAAyF;AACzF,8FAAyF;AACzF,iGAA4F;AAC5F,2FAAsF;AACtF,mEAAiF;AAEjF,6EAAwE;AACxE,iEAAwE;AACxE,6DAA0D;AAC1D,mFAA0E;AAGnE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AA;IACvD,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAA;qCAD6B,uDAA0B;QACtB,uDAA0B;GAN9G,mBAAmB,CAuD/B"}
@@ -40,7 +40,7 @@ let V2DevicesController = exports.V2DevicesController = class V2DevicesControlle
40
40
  this.getOne = async (req, res, next) => {
41
41
  try {
42
42
  const allowedOrganizations = await this.getAllowedOrganizationIds(req);
43
- const id = req.params.id;
43
+ const id = Array.isArray(req.params.id) ? req.params.id[0] : req.params.id;
44
44
  const result = await this.devicesRepository.GetOne(id, allowedOrganizations);
45
45
  if (!result) {
46
46
  return next(new golemio_errors_1.GeneralError("not_found", this.constructor.name, `Device with id ${req.params.id} not found`, 404));
@@ -1 +1 @@
1
- {"version":3,"file":"V2DevicesController.js","sourceRoot":"","sources":["../../../../src/output-gateway/controllers/v2/V2DevicesController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4EAAsF;AAEtF,yEAAoE;AACpE,8FAAyF;AACzF,4EAAuE;AACvE,2FAAsF;AAEtF,6EAAwE;AACxE,iEAAwE;AACxE,6DAA0D;AAGnD,IAAM,mBAAmB,iCAAzB,MAAM,mBAAoB,SAAQ,uCAAkB;IACvD,YACoD,iBAA4C,EAE5F,cAA+C,EACU,0BAAsD;QAE/G,KAAK,CAAC,0BAA0B,CAAC,CAAC;QALsB,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpF,mBAAc,GAAd,cAAc,CAAyB;QAM5C,WAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACtE,IAAI;gBACA,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBACvE,MAAM,MAAM,GAAsB,IAAA,6CAAqB,EAAC,GAAG,CAAC,CAAC;gBAC7D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CA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QACsC,uDAA0B;GAL1G,mBAAmB,CAsC/B"}
1
+ {"version":3,"file":"V2DevicesController.js","sourceRoot":"","sources":["../../../../src/output-gateway/controllers/v2/V2DevicesController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4EAAsF;AAEtF,yEAAoE;AACpE,8FAAyF;AACzF,4EAAuE;AACvE,2FAAsF;AAEtF,6EAAwE;AACxE,iEAAwE;AACxE,6DAA0D;AAGnD,IAAM,mBAAmB,iCAAzB,MAAM,mBAAoB,SAAQ,uCAAkB;IACvD,YACoD,iBAA4C,EAE5F,cAA+C,EACU,0BAAsD;QAE/G,KAAK,CAAC,0BAA0B,CAAC,CAAC;QALsB,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpF,mBAAc,GAAd,cAAc,CAAyB;QAM5C,WAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACtE,IAAI;gBACA,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBACvE,MAAM,MAAM,GAAsB,IAAA,6CAAqB,EAAC,GAAG,CAAC,CAAC;gBAC7D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;gBACjF,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;aAC/D;YAAC,OAAO,GAAG,EAAE;gBACV,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;aACpB;QACL,CAAC,CAAC;QAEK,WAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACtE,IAAI;gBACA,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBACvE,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC3E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,EAAE,oBAAoB,CAAC,CAAC;gBAE7E,IAAI,CAAC,MAAM,EAAE;oBACT,OAAO,IAAI,CACP,IAAI,6BAAY,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,CACzG,CAAC;iBACL;gBAED,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;aACjE;YAAC,OAAO,GAAG,EAAE;gBACV,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;aACpB;QACL,CAAC,CAAC;IA7BF,CAAC;CA8BJ,CAAA;8BAtCY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,iBAAiB,CAAC,CAAA;IAC9C,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,uBAAuB,CAAC,CAAA;IAEpD,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAA;qCAHmB,qCAAiB;QAEpE,iDAAuB;QACsC,uDAA0B;GAL1G,mBAAmB,CAsC/B"}
@@ -52,7 +52,7 @@ let V2OrganizationsController = exports.V2OrganizationsController = class V2Orga
52
52
  this.getOne = async (req, res, next) => {
53
53
  try {
54
54
  const allowedOrganizations = await this.getAllowedOrganizationIds(req);
55
- const id = req.params.id;
55
+ const id = Array.isArray(req.params.id) ? req.params.id[0] : req.params.id;
56
56
  const result = await this.organizationsRepository.GetOne(id, allowedOrganizations);
57
57
  if (!result) {
58
58
  return next(new golemio_errors_1.GeneralError("not_found", this.constructor.name, `Organization with id ${req.params.id} not found`, 404));
@@ -1 +1 @@
1
- {"version":3,"file":"V2OrganizationsController.js","sourceRoot":"","sources":["../../../../src/output-gateway/controllers/v2/V2OrganizationsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4EAAsF;AAEtF,yEAAoE;AACpE,8FAAyF;AACzF,wFAAmF;AACnF,mHAA8G;AAC9G,uGAAkG;AAClG,mEAAiF;AAEjF,6EAAwE;AACxE,iEAAwE;AACxE,6DAA0D;AAC1D,mFAA0E;AAGnE,IAAM,yBAAyB,uCAA/B,MAAM,yBAA0B,SAAQ,uCAAkB;IAC7D,YAC0D,uBAAwD,EAClD,cAAqD,EAEjH,oBAAiE,EACR,0BAAsD;QAE/G,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAN4B,4BAAuB,GAAvB,uBAAuB,CAAyB;QAC1C,mBAAc,GAAd,cAAc,CAA+B;QAEzG,yBAAoB,GAApB,oBAAoB,CAAqC;QAM9D,WAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACtE,IAAI;gBACA,MAAM,SAAS,GAAG,IAAA,+BAAW,EAAC,GAAG,CAAC,CAAC;gBACnC,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBACvE,MAAM,MAAM,GAAsB,IAAA,6CAAqB,EAAC,GAAG,CAAC,CAAC;gBAC7D,MAAM,IAAI,GAAG,IAAA,8BAAsB,EAAC,SAAS,CAAC,IAAc,CAAC,IAAI,KAAK,CAAC;gBACvE,IAAI,MAAM,GAAG,EAAE,CAAC;gBAEhB,IAAI,CAAC,IAAI,EAAE;oBACP,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CACvC,MAAM,IAAI,CAAC,uBAAuB,CAAC,YAAY,CAAC,MAAM,EAAE,oBAAoB,CAAC,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6BAA6B,CAAC,CAAA;IAC1D,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,mCAAmC,CAAC,CAAA;IAEhE,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAA;qCAJ+B,iDAAuB;QAC1B,6DAA6B;QAEnF,yEAAmC;QACoB,uDAA0B;GAN1G,yBAAyB,CAoDrC"}
1
+ {"version":3,"file":"V2OrganizationsController.js","sourceRoot":"","sources":["../../../../src/output-gateway/controllers/v2/V2OrganizationsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4EAAsF;AAEtF,yEAAoE;AACpE,8FAAyF;AACzF,wFAAmF;AACnF,mHAA8G;AAC9G,uGAAkG;AAClG,mEAAiF;AAEjF,6EAAwE;AACxE,iEAAwE;AACxE,6DAA0D;AAC1D,mFAA0E;AAGnE,IAAM,yBAAyB,uCAA/B,MAAM,yBAA0B,SAAQ,uCAAkB;IAC7D,YAC0D,uBAAwD,EAClD,cAAqD,EAEjH,oBAAiE,EACR,0BAAsD;QAE/G,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAN4B,4BAAuB,GAAvB,uBAAuB,CAAyB;QAC1C,mBAAc,GAAd,cAAc,CAA+B;QAEzG,yBAAoB,GAApB,oBAAoB,CAAqC;QAM9D,WAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACtE,IAAI;gBACA,MAAM,SAAS,GAAG,IAAA,+BAAW,EAAC,GAAG,CAAC,CAAC;gBACnC,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBACvE,MAAM,MAAM,GAAsB,IAAA,6CAAqB,EAAC,GAAG,CAAC,CAAC;gBAC7D,MAAM,IAAI,GAAG,IAAA,8BAAsB,EAAC,SAAS,CAAC,IAAc,CAAC,IAAI,KAAK,CAAC;gBACvE,IAAI,MAAM,GAAG,EAAE,CAAC;gBAEhB,IAAI,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CAAC,CAAC;aACvE;YAAC,OAAO,GAAG,EAAE;gBACV,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;aACpB;QACL,CAAC,CAAC;IA1CF,CAAC;CA2CJ,CAAA;oCApDY,yBAAyB;IADrC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,uBAAuB,CAAC,CAAA;IACpD,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,6BAA6B,CAAC,CAAA;IAC1D,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,mCAAmC,CAAC,CAAA;IAEhE,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAA;qCAJ+B,iDAAuB;QAC1B,6DAA6B;QAEnF,yEAAmC;QACoB,uDAA0B;GAN1G,yBAAyB,CAoDrC"}
@@ -1,4 +1,4 @@
1
- interface IBuildingsTransformationOutput {
1
+ export interface IBuildingsTransformationOutput {
2
2
  id: number;
3
3
  name: string | null;
4
4
  buildingAddressCode: string | null;
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=IBuildingsTransformationOutput.js.map
@@ -1,3 +1,4 @@
1
+ import { IBuildingsTransformationOutput } from "../models/interfaces/IBuildingsTransformationOutput";
1
2
  import { IBuildingsPrimary } from "../../schema-definitions/models/interfaces/IPrimaryBuildings";
2
3
  import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
3
4
  export declare class BuildingsTransformation extends AbstractTransformation<IBuildingsPrimary, IBuildingsTransformationOutput> {
@@ -1 +1 @@
1
- {"version":3,"file":"BuildingsTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/BuildingsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAoD;AAEpD,kCAAmD;AACnD,sEAAoE;AAEpE,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,uBAAuB,qCAA7B,MAAM,uBAAwB,SAAQ,+CAAyE;IAIlH;QACI,KAAK,EAAE,CAAC;QAJL,SAAI,GAAW,yBAAyB,CAAC;QAQtC,sBAAiB,GAAG,CAAC,OAA0B,EAAkC,EAAE;YACzF,OAAO;gBACH,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,IAAI,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;gBACnC,mBAAmB,EAAE,OAAO,CAAC,qBAAqB,IAAI,IAAI;gBAC1D,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,qBAAa,EAAE,OAAO,CAAC,EAAE,CAAC;aACpE,CAAC;QACN,CAAC,CAAC;QAVE,IAAI,CAAC,gBAAgB,GAAG,0BAAqB,CAAC,OAAO,CAAC,2CAAoB,CAAC,gBAAgB,CAAC,CAAC;IACjG,CAAC;CAUJ,CAAA;kCAjBY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;;GACA,uBAAuB,CAiBnC"}
1
+ {"version":3,"file":"BuildingsTransformation.js","sourceRoot":"","sources":["../../../src/output-gateway/transformations/BuildingsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAoD;AAEpD,kCAAmD;AACnD,sEAAoE;AAGpE,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,uBAAuB,qCAA7B,MAAM,uBAAwB,SAAQ,+CAAyE;IAIlH;QACI,KAAK,EAAE,CAAC;QAJL,SAAI,GAAW,yBAAyB,CAAC;QAQtC,sBAAiB,GAAG,CAAC,OAA0B,EAAkC,EAAE;YACzF,OAAO;gBACH,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,IAAI,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;gBACnC,mBAAmB,EAAE,OAAO,CAAC,qBAAqB,IAAI,IAAI;gBAC1D,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,qBAAa,EAAE,OAAO,CAAC,EAAE,CAAC;aACpE,CAAC;QACN,CAAC,CAAC;QAVE,IAAI,CAAC,gBAAgB,GAAG,0BAAqB,CAAC,OAAO,CAAC,2CAAoB,CAAC,gBAAgB,CAAC,CAAC;IACjG,CAAC;CAUJ,CAAA;kCAjBY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;;GACA,uBAAuB,CAiBnC"}
@@ -1 +1,3 @@
1
1
  export declare const PG_SCHEMA = "energetics";
2
+ export declare const WORKER_NAME = "EnergeticsCommodity";
3
+ export declare const ENAPO_WORKER_NAME = "EnapoEnergetics";
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PG_SCHEMA = void 0;
3
+ exports.ENAPO_WORKER_NAME = exports.WORKER_NAME = exports.PG_SCHEMA = void 0;
4
4
  exports.PG_SCHEMA = "energetics";
5
+ exports.WORKER_NAME = "EnergeticsCommodity";
6
+ exports.ENAPO_WORKER_NAME = "EnapoEnergetics";
5
7
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/schema-definitions/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/schema-definitions/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,YAAY,CAAC;AACzB,QAAA,WAAW,GAAG,qBAAqB,CAAC;AACpC,QAAA,iBAAiB,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IConsumptionApiCollection } from "./interfaces/IConsumptionApiEntry";
3
+ import { IGaugeApiCollection } from "./interfaces/IGaugeApiDto";
4
+ export declare const porsennaGaugeCollectionJsonSchema: JSONSchemaType<IGaugeApiCollection>;
5
+ export declare const porsennaConsumptionCollectionJsonSchema: JSONSchemaType<IConsumptionApiCollection>;
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.porsennaConsumptionCollectionJsonSchema = exports.porsennaGaugeCollectionJsonSchema = void 0;
4
+ const viewSchema = {
5
+ type: "object",
6
+ properties: {
7
+ first: { type: "string", nullable: true },
8
+ next: { type: "string", nullable: true },
9
+ previous: { type: "string", nullable: true },
10
+ last: { type: "string", nullable: true },
11
+ },
12
+ required: [],
13
+ };
14
+ exports.porsennaGaugeCollectionJsonSchema = {
15
+ type: "object",
16
+ properties: {
17
+ totalItems: { type: "integer", nullable: true },
18
+ member: {
19
+ type: "array",
20
+ items: {
21
+ type: "object",
22
+ properties: {
23
+ id: { type: "string" },
24
+ building: {
25
+ type: "object",
26
+ properties: {
27
+ id: { type: "integer" },
28
+ name: { type: "string", nullable: true },
29
+ street: { type: "string", nullable: true },
30
+ houseNumber: { type: "string", nullable: true },
31
+ streetNumber: { type: "string", nullable: true },
32
+ city: { type: "string", nullable: true },
33
+ postcode: { type: "string", nullable: true },
34
+ gid: { type: "string", nullable: true },
35
+ },
36
+ required: ["id"],
37
+ },
38
+ identification: {
39
+ type: "object",
40
+ properties: {
41
+ id: { type: "integer", nullable: true },
42
+ identifier: { type: "string", nullable: true },
43
+ supplyPointNumber: { type: "string", nullable: true },
44
+ meterNumber: { type: "string", nullable: true },
45
+ gid: { type: "string", nullable: true },
46
+ },
47
+ required: [],
48
+ },
49
+ parent: { type: "string", nullable: true },
50
+ level: { type: "string", nullable: true },
51
+ type: { type: "string", nullable: true },
52
+ name: { type: "string", nullable: true },
53
+ measurementTarget: { type: "string", nullable: true },
54
+ disabledAt: { type: "string", nullable: true },
55
+ disableReason: { type: "string", nullable: true },
56
+ showInOutput: { type: "boolean", nullable: true },
57
+ },
58
+ required: ["id", "building", "identification"],
59
+ },
60
+ },
61
+ view: { ...viewSchema, nullable: true },
62
+ },
63
+ required: ["member"],
64
+ };
65
+ exports.porsennaConsumptionCollectionJsonSchema = {
66
+ type: "object",
67
+ properties: {
68
+ totalItems: { type: "integer", nullable: true },
69
+ member: {
70
+ type: "array",
71
+ items: {
72
+ type: "object",
73
+ properties: {
74
+ period: { type: "string" },
75
+ consumption: {
76
+ type: "object",
77
+ properties: {
78
+ value: { type: "number" },
79
+ unit: { type: "string" },
80
+ count: { type: "integer", nullable: true },
81
+ },
82
+ required: ["value", "unit"],
83
+ },
84
+ },
85
+ required: ["period", "consumption"],
86
+ },
87
+ },
88
+ view: { ...viewSchema, nullable: true },
89
+ },
90
+ required: ["member"],
91
+ };
92
+ //# sourceMappingURL=PorsennaJsonSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PorsennaJsonSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/datasources/enapo/porsenna/PorsennaJsonSchema.ts"],"names":[],"mappings":";;;AAIA,MAAM,UAAU,GAAsC;IAClD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC3C;IACD,QAAQ,EAAE,EAAE;CACf,CAAC;AAEW,QAAA,iCAAiC,GAAwC;IAClF,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/C,MAAM,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACtB,QAAQ,EAAE;wBACN,IAAI,EAAE,QAAQ;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AQ,EAAE,IAAI,EAAE;yBAC7C;wBACD,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;qBAC9B;iBACJ;gBACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;aACtC;SACJ;QACD,IAAI,EAAE,EAAE,GAAG,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC1C;IACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACvB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { IHydraPartialView } from "./IGaugeApiDto";
2
+ export interface IConsumptionValueApiDto {
3
+ value: number;
4
+ unit: string;
5
+ count?: number;
6
+ }
7
+ export interface IConsumptionApiEntry {
8
+ period: string;
9
+ consumption: IConsumptionValueApiDto;
10
+ }
11
+ export interface IConsumptionApiCollection {
12
+ totalItems?: number;
13
+ member: IConsumptionApiEntry[];
14
+ view?: IHydraPartialView;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IConsumptionApiEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IConsumptionApiEntry.js","sourceRoot":"","sources":["../../../../../../src/schema-definitions/datasources/enapo/porsenna/interfaces/IConsumptionApiEntry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,41 @@
1
+ export interface IGaugeApiBuildingDto {
2
+ id: number;
3
+ name?: string;
4
+ street?: string;
5
+ houseNumber?: string;
6
+ streetNumber?: string;
7
+ city?: string;
8
+ postcode?: string;
9
+ gid?: string;
10
+ }
11
+ export interface IGaugeApiIdentificationDto {
12
+ id?: number;
13
+ identifier?: string;
14
+ supplyPointNumber?: string;
15
+ meterNumber?: string;
16
+ gid?: string;
17
+ }
18
+ export interface IGaugeApiDto {
19
+ id: string;
20
+ building: IGaugeApiBuildingDto;
21
+ identification: IGaugeApiIdentificationDto;
22
+ parent?: string;
23
+ level?: string;
24
+ type?: string;
25
+ name?: string;
26
+ measurementTarget?: string;
27
+ disabledAt?: string;
28
+ disableReason?: string;
29
+ showInOutput?: boolean;
30
+ }
31
+ export interface IHydraPartialView {
32
+ first?: string;
33
+ next?: string;
34
+ previous?: string;
35
+ last?: string;
36
+ }
37
+ export interface IGaugeApiCollection {
38
+ totalItems?: number;
39
+ member: IGaugeApiDto[];
40
+ view?: IHydraPartialView;
41
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IGaugeApiDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGaugeApiDto.js","sourceRoot":"","sources":["../../../../../../src/schema-definitions/datasources/enapo/porsenna/interfaces/IGaugeApiDto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
2
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
3
+ import { IBuildings } from "./interfaces/IBuildings";
4
+ export declare class PorsennaBuildingsModel extends Model<PorsennaBuildingsModel> implements IBuildings {
5
+ static TABLE_NAME: string;
6
+ static REPOSITORY_NAME: string;
7
+ static JSON_SCHEMA_VALIDATOR_NAME: string;
8
+ source: string;
9
+ id: number;
10
+ name: string | null;
11
+ street: string | null;
12
+ house_number: string | null;
13
+ street_number: string | null;
14
+ city: string | null;
15
+ postcode: string | null;
16
+ gid: string | null;
17
+ created_at: Date;
18
+ updated_at: Date | null;
19
+ static attributeModel: ModelAttributes<PorsennaBuildingsModel>;
20
+ static jsonSchema: JSONSchemaType<IBuildings[]>;
21
+ }
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PorsennaBuildingsModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class PorsennaBuildingsModel extends sequelize_1.Model {
6
+ }
7
+ exports.PorsennaBuildingsModel = PorsennaBuildingsModel;
8
+ PorsennaBuildingsModel.TABLE_NAME = "enapo_porsenna_buildings";
9
+ PorsennaBuildingsModel.REPOSITORY_NAME = "PorsennaBuildingsRepository";
10
+ PorsennaBuildingsModel.JSON_SCHEMA_VALIDATOR_NAME = "PorsennaBuildingsModelRepositoryValidator";
11
+ PorsennaBuildingsModel.attributeModel = {
12
+ source: {
13
+ type: sequelize_1.DataTypes.STRING(50),
14
+ primaryKey: true,
15
+ },
16
+ id: {
17
+ type: sequelize_1.DataTypes.INTEGER,
18
+ primaryKey: true,
19
+ },
20
+ name: {
21
+ type: sequelize_1.DataTypes.STRING,
22
+ allowNull: true,
23
+ },
24
+ street: {
25
+ type: sequelize_1.DataTypes.STRING,
26
+ allowNull: true,
27
+ },
28
+ house_number: {
29
+ type: sequelize_1.DataTypes.STRING,
30
+ allowNull: true,
31
+ },
32
+ street_number: {
33
+ type: sequelize_1.DataTypes.STRING,
34
+ allowNull: true,
35
+ },
36
+ city: {
37
+ type: sequelize_1.DataTypes.STRING,
38
+ allowNull: true,
39
+ },
40
+ postcode: {
41
+ type: sequelize_1.DataTypes.STRING,
42
+ allowNull: true,
43
+ },
44
+ gid: {
45
+ type: sequelize_1.DataTypes.STRING,
46
+ allowNull: true,
47
+ },
48
+ created_at: {
49
+ type: sequelize_1.DataTypes.DATE,
50
+ defaultValue: sequelize_1.DataTypes.NOW,
51
+ allowNull: true,
52
+ },
53
+ updated_at: {
54
+ type: sequelize_1.DataTypes.DATE,
55
+ allowNull: true,
56
+ },
57
+ };
58
+ PorsennaBuildingsModel.jsonSchema = {
59
+ type: "array",
60
+ items: {
61
+ type: "object",
62
+ properties: {
63
+ source: { type: "string" },
64
+ id: { type: "integer" },
65
+ name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
66
+ street: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
67
+ house_number: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
68
+ street_number: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
69
+ city: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
70
+ postcode: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
71
+ gid: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
72
+ },
73
+ additionalProperties: false,
74
+ required: ["source", "id"],
75
+ },
76
+ };
77
+ //# sourceMappingURL=PorsennaBuildingsModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PorsennaBuildingsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/porsenna/PorsennaBuildingsModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAIxF,MAAa,sBAAuB,SAAQ,iBAA6B;;AAAzE,wDAoFC;AAnFiB,iCAAU,GAAG,0BAA0B,CAAC;AACxC,sCAAe,GAAG,6BAA6B,CAAC;AAChD,iDAA0B,GAAG,2CAA2C,CAAC;AAczE,qCAAc,GAA4C;IACpE,MAAM,EAAE;QACJ,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,UAAU,EAAE,IAAI;KACnB;IACD,EAAE,EAAE;QACA,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,UAAU,EAAE,IAAI;KACnB;IACD,IAAI,EAAE;QACF,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,YAAY,EAAE;QACV,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,aAAa,EAAE;QACX,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,IAAI,EAAE;QACF,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,QAAQ,EAAE;QACN,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;KAClB;IACD,GAAG,EAAE;QACD,IAAI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,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC3E,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;SACzE;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;KAC7B;CACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
2
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
3
+ import { IConsumption } from "./interfaces/IConsumption";
4
+ export declare class PorsennaConsumptionModel extends Model<PorsennaConsumptionModel> implements IConsumption {
5
+ static TABLE_NAME: string;
6
+ static REPOSITORY_NAME: string;
7
+ static JSON_SCHEMA_VALIDATOR_NAME: string;
8
+ source: string;
9
+ device_id: string;
10
+ var: string;
11
+ period: string;
12
+ value: number;
13
+ unit: string;
14
+ commodity: string | null;
15
+ count: number | null;
16
+ created_at: Date;
17
+ updated_at: Date | null;
18
+ static attributeModel: ModelAttributes<PorsennaConsumptionModel>;
19
+ static jsonSchema: JSONSchemaType<IConsumption[]>;
20
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PorsennaConsumptionModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class PorsennaConsumptionModel extends sequelize_1.Model {
6
+ }
7
+ exports.PorsennaConsumptionModel = PorsennaConsumptionModel;
8
+ PorsennaConsumptionModel.TABLE_NAME = "enapo_porsenna_consumption";
9
+ PorsennaConsumptionModel.REPOSITORY_NAME = "PorsennaConsumptionRepository";
10
+ PorsennaConsumptionModel.JSON_SCHEMA_VALIDATOR_NAME = "PorsennaConsumptionModelRepositoryValidator";
11
+ PorsennaConsumptionModel.attributeModel = {
12
+ source: {
13
+ type: sequelize_1.DataTypes.STRING(50),
14
+ primaryKey: true,
15
+ },
16
+ device_id: {
17
+ type: sequelize_1.DataTypes.UUID,
18
+ primaryKey: true,
19
+ },
20
+ var: {
21
+ type: sequelize_1.DataTypes.STRING(20),
22
+ primaryKey: true,
23
+ },
24
+ period: {
25
+ type: sequelize_1.DataTypes.STRING(20),
26
+ primaryKey: true,
27
+ },
28
+ value: {
29
+ type: sequelize_1.DataTypes.DECIMAL(30, 15),
30
+ allowNull: false,
31
+ },
32
+ unit: {
33
+ type: sequelize_1.DataTypes.STRING(20),
34
+ allowNull: false,
35
+ },
36
+ commodity: {
37
+ type: sequelize_1.DataTypes.STRING(20),
38
+ allowNull: true,
39
+ },
40
+ count: {
41
+ type: sequelize_1.DataTypes.INTEGER,
42
+ allowNull: true,
43
+ },
44
+ created_at: {
45
+ type: sequelize_1.DataTypes.DATE,
46
+ defaultValue: sequelize_1.DataTypes.NOW,
47
+ allowNull: true,
48
+ },
49
+ updated_at: {
50
+ type: sequelize_1.DataTypes.DATE,
51
+ allowNull: true,
52
+ },
53
+ };
54
+ PorsennaConsumptionModel.jsonSchema = {
55
+ type: "array",
56
+ items: {
57
+ type: "object",
58
+ properties: {
59
+ source: { type: "string" },
60
+ device_id: { type: "string" },
61
+ var: { type: "string" },
62
+ period: { type: "string" },
63
+ value: { type: "number" },
64
+ unit: { type: "string" },
65
+ commodity: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
66
+ count: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
67
+ },
68
+ additionalProperties: false,
69
+ required: ["source", "device_id", "var", "period", "value", "unit"],
70
+ },
71
+ };
72
+ //# sourceMappingURL=PorsennaConsumptionModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PorsennaConsumptionModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/porsenna/Pors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,CAAC;AAEY,mCAAU,GAAmC;IACvD,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC7B,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YAC5E,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;SAC5E;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC;KACtE;CACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
2
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
3
+ import { IDevices } from "./interfaces/IDevices";
4
+ export declare class PorsennaDevicesModel extends Model<PorsennaDevicesModel> implements IDevices {
5
+ static TABLE_NAME: string;
6
+ static REPOSITORY_NAME: string;
7
+ static JSON_SCHEMA_VALIDATOR_NAME: string;
8
+ source: string;
9
+ id: string;
10
+ building_id: number | null;
11
+ parent_device_id: string | null;
12
+ level: string | null;
13
+ type: string | null;
14
+ name: string | null;
15
+ measurement_target: string | null;
16
+ disabled_at: string | null;
17
+ disable_reason_id: number | null;
18
+ show_in_output: boolean | null;
19
+ identifier: string | null;
20
+ supply_point_number: string | null;
21
+ meter_number: string | null;
22
+ identification_gid: string | null;
23
+ created_at: Date;
24
+ updated_at: Date | null;
25
+ static attributeModel: ModelAttributes<PorsennaDevicesModel>;
26
+ static jsonSchema: JSONSchemaType<IDevices[]>;
27
+ }
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PorsennaDevicesModel = void 0;
4
+ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
5
+ class PorsennaDevicesModel extends sequelize_1.Model {
6
+ }
7
+ exports.PorsennaDevicesModel = PorsennaDevicesModel;
8
+ PorsennaDevicesModel.TABLE_NAME = "enapo_porsenna_devices";
9
+ PorsennaDevicesModel.REPOSITORY_NAME = "PorsennaDevicesRepository";
10
+ PorsennaDevicesModel.JSON_SCHEMA_VALIDATOR_NAME = "PorsennaDevicesModelRepositoryValidator";
11
+ PorsennaDevicesModel.attributeModel = {
12
+ source: {
13
+ type: sequelize_1.DataTypes.STRING(50),
14
+ primaryKey: true,
15
+ },
16
+ id: {
17
+ type: sequelize_1.DataTypes.UUID,
18
+ primaryKey: true,
19
+ },
20
+ building_id: {
21
+ type: sequelize_1.DataTypes.INTEGER,
22
+ allowNull: true,
23
+ },
24
+ parent_device_id: {
25
+ type: sequelize_1.DataTypes.UUID,
26
+ allowNull: true,
27
+ },
28
+ level: {
29
+ type: sequelize_1.DataTypes.STRING,
30
+ allowNull: true,
31
+ },
32
+ type: {
33
+ type: sequelize_1.DataTypes.STRING,
34
+ allowNull: true,
35
+ },
36
+ name: {
37
+ type: sequelize_1.DataTypes.STRING,
38
+ allowNull: true,
39
+ },
40
+ measurement_target: {
41
+ type: sequelize_1.DataTypes.STRING,
42
+ allowNull: true,
43
+ },
44
+ disabled_at: {
45
+ type: sequelize_1.DataTypes.DATE,
46
+ allowNull: true,
47
+ },
48
+ disable_reason_id: {
49
+ type: sequelize_1.DataTypes.INTEGER,
50
+ allowNull: true,
51
+ },
52
+ show_in_output: {
53
+ type: sequelize_1.DataTypes.BOOLEAN,
54
+ allowNull: true,
55
+ },
56
+ identifier: {
57
+ type: sequelize_1.DataTypes.STRING,
58
+ allowNull: true,
59
+ },
60
+ supply_point_number: {
61
+ type: sequelize_1.DataTypes.STRING,
62
+ allowNull: true,
63
+ },
64
+ meter_number: {
65
+ type: sequelize_1.DataTypes.STRING,
66
+ allowNull: true,
67
+ },
68
+ identification_gid: {
69
+ type: sequelize_1.DataTypes.STRING,
70
+ allowNull: true,
71
+ },
72
+ created_at: {
73
+ type: sequelize_1.DataTypes.DATE,
74
+ defaultValue: sequelize_1.DataTypes.NOW,
75
+ allowNull: true,
76
+ },
77
+ updated_at: {
78
+ type: sequelize_1.DataTypes.DATE,
79
+ allowNull: true,
80
+ },
81
+ };
82
+ PorsennaDevicesModel.jsonSchema = {
83
+ type: "array",
84
+ items: {
85
+ type: "object",
86
+ properties: {
87
+ source: { type: "string" },
88
+ id: { type: "string" },
89
+ building_id: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
90
+ parent_device_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
91
+ level: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
92
+ type: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
93
+ name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
94
+ measurement_target: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
95
+ disabled_at: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
96
+ disable_reason_id: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
97
+ show_in_output: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
98
+ identifier: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
99
+ supply_point_number: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
100
+ meter_number: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
101
+ identification_gid: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
102
+ },
103
+ additionalProperties: false,
104
+ required: ["source", "id"],
105
+ },
106
+ };
107
+ //# sourceMappingURL=PorsennaDevicesModel.js.map