@nmshd/runtime 3.1.0 → 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.
- package/dist/buildInformation.js +4 -4
- package/dist/useCases/consumption/attributes/GetSharedVersionsOfIdentityAttribute.js +5 -2
- package/dist/useCases/consumption/attributes/GetSharedVersionsOfIdentityAttribute.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetVersionsOfAttribute.js +4 -0
- package/dist/useCases/consumption/attributes/GetVersionsOfAttribute.js.map +1 -1
- package/dist/useCases/transport/relationships/GetAttributesForRelationship.js +2 -6
- package/dist/useCases/transport/relationships/GetAttributesForRelationship.js.map +1 -1
- package/lib-web/nmshd.runtime.js +15 -12
- package/lib-web/nmshd.runtime.js.map +1 -1
- package/lib-web/nmshd.runtime.min.js +1 -1
- package/lib-web/nmshd.runtime.min.js.map +1 -1
- package/package.json +1 -1
package/dist/buildInformation.js
CHANGED
|
@@ -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.
|
|
11
|
-
build: "
|
|
12
|
-
date: "2023-12-
|
|
13
|
-
commit: "
|
|
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 (
|
|
39
|
-
throw common_1.RuntimeErrors.general.
|
|
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,
|
|
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,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EF,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;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,
|
|
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"}
|
|
@@ -42,12 +42,8 @@ let GetAttributesForRelationshipUseCase = class GetAttributesForRelationshipUseC
|
|
|
42
42
|
}
|
|
43
43
|
const peerAddress = relationship.peer.address.toString();
|
|
44
44
|
const query = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`]: peerAddress },
|
|
48
|
-
// shareInfo.peer
|
|
49
|
-
{ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: peerAddress }
|
|
50
|
-
]
|
|
45
|
+
// shareInfo.peer
|
|
46
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: peerAddress
|
|
51
47
|
};
|
|
52
48
|
const attributes = await this.attributesController.getLocalAttributes(query, request.hideTechnical);
|
|
53
49
|
return ts_utils_1.Result.ok(consumption_2.AttributeMapper.toAttributeDTOList(attributes));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetAttributesForRelationship.js","sourceRoot":"","sources":["../../../../src/useCases/transport/relationships/GetAttributesForRelationship.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAmG;
|
|
1
|
+
{"version":3,"file":"GetAttributesForRelationship.js","sourceRoot":"","sources":["../../../../src/useCases/transport/relationships/GetAttributesForRelationship.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAmG;AACnG,gDAAiF;AACjF,uDAA0C;AAC1C,mDAAwC;AAExC,yCAA+G;AAC/G,mDAAoD;AASpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAoD;IACxE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAChE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,mCAAmC,GAAhD,MAAa,mCAAoC,SAAQ,gBAAkF;IACvI,YAC6B,uBAAgD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
@@ -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.
|
|
559
|
-
build: "
|
|
560
|
-
date: "2023-12-
|
|
561
|
-
commit: "
|
|
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 (
|
|
29276
|
-
throw common_1.RuntimeErrors.general.
|
|
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
|
}
|
|
@@ -36209,12 +36216,8 @@ let GetAttributesForRelationshipUseCase = class GetAttributesForRelationshipUseC
|
|
|
36209
36216
|
}
|
|
36210
36217
|
const peerAddress = relationship.peer.address.toString();
|
|
36211
36218
|
const query = {
|
|
36212
|
-
|
|
36213
|
-
|
|
36214
|
-
{ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`]: peerAddress },
|
|
36215
|
-
// shareInfo.peer
|
|
36216
|
-
{ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: peerAddress }
|
|
36217
|
-
]
|
|
36219
|
+
// shareInfo.peer
|
|
36220
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: peerAddress
|
|
36218
36221
|
};
|
|
36219
36222
|
const attributes = await this.attributesController.getLocalAttributes(query, request.hideTechnical);
|
|
36220
36223
|
return ts_utils_1.Result.ok(consumption_2.AttributeMapper.toAttributeDTOList(attributes));
|