@nmshd/runtime 3.1.1 → 3.1.2

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.
@@ -7,10 +7,10 @@ const content_1 = require("@nmshd/content");
7
7
  const crypto_1 = require("@nmshd/crypto");
8
8
  const transport_1 = require("@nmshd/transport");
9
9
  exports.buildInformation = {
10
- version: "3.1.1",
11
- build: "181",
12
- date: "2023-12-12T15:04:45+00:00",
13
- commit: "3d55881cb1ce3f6ff4c3567acd54e19f54c2c992",
10
+ version: "3.1.2",
11
+ build: "182",
12
+ date: "2023-12-13T13:48:51+00:00",
13
+ commit: "79c30ff3fb510f80ccd31f559d1515fbcf02d20a",
14
14
  dependencies: {"@js-soft/docdb-querytranslator":"1.1.2","@js-soft/logging-abstractions":"1.0.1","@js-soft/ts-serval":"2.0.10","@js-soft/ts-utils":"^2.3.3","@nmshd/consumption":"3.7.4","@nmshd/content":"2.8.1","@nmshd/crypto":"2.0.5","@nmshd/transport":"2.1.4","ajv":"^8.12.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^3.4.4","qrcode":"1.5.3","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
15
15
  libraries: {
16
16
  serval: ts_serval_1.buildInformation,
@@ -35,8 +35,11 @@ let GetSharedVersionsOfIdentityAttributeUseCase = class GetSharedVersionsOfIdent
35
35
  }
36
36
  async executeInternal(request) {
37
37
  const attribute = await this.attributeController.getLocalAttribute(transport_1.CoreId.from(request.attributeId));
38
- if (!attribute || attribute.isRelationshipAttribute()) {
39
- throw common_1.RuntimeErrors.general.invalidPropertyValue("The given ID doesn't belong to a valid IdentityAttribute.");
38
+ if (typeof attribute === "undefined") {
39
+ throw common_1.RuntimeErrors.general.recordNotFound(consumption_1.LocalAttribute);
40
+ }
41
+ if (attribute.isRelationshipAttribute()) {
42
+ throw common_1.RuntimeErrors.general.invalidPropertyValue("Attribute '${request.attributeId}' is a RelationshipAttribute.");
40
43
  }
41
44
  const allVersions = await this.attributeController.getVersionsOfAttribute(transport_1.CoreId.from(request.attributeId));
42
45
  // queried ID doesn't belong to a repository attribute
@@ -1 +1 @@
1
- {"version":3,"file":"GetSharedVersionsOfIdentityAttribute.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/GetSharedVersionsOfIdentityAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0D;AAC1D,gDAA0C;AAC1C,mDAAwC;AAExC,yCAA4G;AAC5G,uDAAoD;AAMpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA4D;IAChF,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,6CAA6C,CAAC,CAAC,CAAC;IACrF,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,2CAA2C,GAAxD,MAAa,2CAA4C,SAAQ,gBAAyE;IACtI,YAC6B,mBAAyC,EAC1D,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,wBAAmB,GAAnB,mBAAmB,CAAsB;IAItE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAoD;QAChF,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QAErG,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,uBAAuB,EAAE,EAAE,CAAC;YACpD,MAAM,sBAAa,CAAC,OAAO,CAAC,oBAAoB,CAAC,2DAA2D,CAAC,CAAC;QAClH,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QAE5G,sDAAsD;QACtD,IAAI,SAAS,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YACpC,OAAO,iBAAM,CAAC,EAAE,CAAC,iCAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC;QACtE,CAAC;QAED,MAAM,KAAK,GAAG;YACV,2BAA2B,EAAE,EAAE,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE;SAChF,CAAC;QAEF,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAElF,OAAO,iBAAM,CAAC,EAAE,CAAC,iCAAe,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC3E,CAAC;CACJ,CAAA;AA9BY,kGAA2C;sDAA3C,2CAA2C;IAE/C,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADuC,kCAAoB;QAC/C,SAAS;GAHvB,2CAA2C,CA8BvD"}
1
+ {"version":3,"file":"GetSharedVersionsOfIdentityAttribute.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/GetSharedVersionsOfIdentityAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0E;AAC1E,gDAA0C;AAC1C,mDAAwC;AAExC,yCAA4G;AAC5G,uDAAoD;AAMpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA4D;IAChF,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,6CAA6C,CAAC,CAAC,CAAC;IACrF,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,2CAA2C,GAAxD,MAAa,2CA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AAC;IAC3E,CAAC;CACJ,CAAA;AAlCY,kGAA2C;sDAA3C,2CAA2C;IAE/C,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADuC,kCAAoB;QAC/C,SAAS;GAHvB,2CAA2C,CAkCvD"}
@@ -34,6 +34,10 @@ let GetVersionsOfAttributeUseCase = class GetVersionsOfAttributeUseCase extends
34
34
  this.attributeController = attributeController;
35
35
  }
36
36
  async executeInternal(request) {
37
+ const attribute = await this.attributeController.getLocalAttribute(transport_1.CoreId.from(request.attributeId));
38
+ if (typeof attribute === "undefined") {
39
+ throw common_1.RuntimeErrors.general.recordNotFound(consumption_1.LocalAttribute);
40
+ }
37
41
  const allVersions = await this.attributeController.getVersionsOfAttribute(transport_1.CoreId.from(request.attributeId));
38
42
  return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(allVersions));
39
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GetVersionsOfAttribute.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/GetVersionsOfAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0D;AAC1D,gDAA0C;AAC1C,mDAAwC;AAExC,yCAA6F;AAC7F,uDAAoD;AAMpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA8C;IAClE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC,CAAC;IACvE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,6BAA6B,GAA1C,MAAa,6BAA8B,SAAQ,gBAA2D;IAC1G,YAC6B,mBAAyC,EAC1D,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,wBAAmB,GAAnB,mBAAmB,CAAsB;IAItE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAsC;QAClE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QAE5G,OAAO,iBAAM,CAAC,EAAE,CAAC,iCAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC;IACtE,CAAC;CACJ,CAAA;AAbY,sEAA6B;wCAA7B,6BAA6B;IAEjC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADuC,kCAAoB;QAC/C,SAAS;GAHvB,6BAA6B,CAazC"}
1
+ {"version":3,"file":"GetVersionsOfAttribute.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/GetVersionsOfAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0E;AAC1E,gDAA0C;AAC1C,mDAAwC;AAExC,yCAA4G;AAC5G,uDAAoD;AAMpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA8C;IAClE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC,CAAC;IACvE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,6BAA6B,GAA1C,MAAa,6BAA8B,SAAQ,gBAA2D;IAC1G,YAC6B,mBAAyC,EAC1D,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,wBAAmB,GAAnB,mBAAmB,CAAsB;IAItE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAsC;QAClE,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QACrG,IAAI,OAAO,SAAS,KAAK,WAAW,EAAE,CAAC;YACnC,MAAM,sBAAa,CAAC,OAAO,CAAC,cAAc,CAAC,4BAAc,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QAE5G,OAAO,iBAAM,CAAC,EAAE,CAAC,iCAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC;IACtE,CAAC;CACJ,CAAA;AAlBY,sEAA6B;wCAA7B,6BAA6B;IAEjC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADuC,kCAAoB;QAC/C,SAAS;GAHvB,6BAA6B,CAkBzC"}
@@ -555,10 +555,10 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
555
555
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
556
556
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
557
557
  exports.buildInformation = {
558
- version: "3.1.1",
559
- build: "181",
560
- date: "2023-12-12T15:04:45+00:00",
561
- commit: "3d55881cb1ce3f6ff4c3567acd54e19f54c2c992",
558
+ version: "3.1.2",
559
+ build: "182",
560
+ date: "2023-12-13T13:48:51+00:00",
561
+ commit: "79c30ff3fb510f80ccd31f559d1515fbcf02d20a",
562
562
  dependencies: {"@js-soft/docdb-querytranslator":"1.1.2","@js-soft/logging-abstractions":"1.0.1","@js-soft/ts-serval":"2.0.10","@js-soft/ts-utils":"^2.3.3","@nmshd/consumption":"3.7.4","@nmshd/content":"2.8.1","@nmshd/crypto":"2.0.5","@nmshd/transport":"2.1.4","ajv":"^8.12.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^3.4.4","qrcode":"1.5.3","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
563
563
  libraries: {
564
564
  serval: ts_serval_1.buildInformation,
@@ -29272,8 +29272,11 @@ let GetSharedVersionsOfIdentityAttributeUseCase = class GetSharedVersionsOfIdent
29272
29272
  }
29273
29273
  async executeInternal(request) {
29274
29274
  const attribute = await this.attributeController.getLocalAttribute(transport_1.CoreId.from(request.attributeId));
29275
- if (!attribute || attribute.isRelationshipAttribute()) {
29276
- throw common_1.RuntimeErrors.general.invalidPropertyValue("The given ID doesn't belong to a valid IdentityAttribute.");
29275
+ if (typeof attribute === "undefined") {
29276
+ throw common_1.RuntimeErrors.general.recordNotFound(consumption_1.LocalAttribute);
29277
+ }
29278
+ if (attribute.isRelationshipAttribute()) {
29279
+ throw common_1.RuntimeErrors.general.invalidPropertyValue("Attribute '${request.attributeId}' is a RelationshipAttribute.");
29277
29280
  }
29278
29281
  const allVersions = await this.attributeController.getVersionsOfAttribute(transport_1.CoreId.from(request.attributeId));
29279
29282
  // queried ID doesn't belong to a repository attribute
@@ -29341,6 +29344,10 @@ let GetVersionsOfAttributeUseCase = class GetVersionsOfAttributeUseCase extends
29341
29344
  this.attributeController = attributeController;
29342
29345
  }
29343
29346
  async executeInternal(request) {
29347
+ const attribute = await this.attributeController.getLocalAttribute(transport_1.CoreId.from(request.attributeId));
29348
+ if (typeof attribute === "undefined") {
29349
+ throw common_1.RuntimeErrors.general.recordNotFound(consumption_1.LocalAttribute);
29350
+ }
29344
29351
  const allVersions = await this.attributeController.getVersionsOfAttribute(transport_1.CoreId.from(request.attributeId));
29345
29352
  return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(allVersions));
29346
29353
  }