@nmshd/runtime 7.0.0-alpha.70 → 7.0.0-alpha.72
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/dataViews/DataViewExpander.d.ts +5 -3
- package/dist/dataViews/DataViewExpander.d.ts.map +1 -1
- package/dist/dataViews/DataViewExpander.js +163 -174
- package/dist/dataViews/DataViewExpander.js.map +1 -1
- package/dist/dataViews/consumption/LocalAttributeDVO.d.ts +37 -46
- package/dist/dataViews/consumption/LocalAttributeDVO.d.ts.map +1 -1
- package/dist/dataViews/content/RequestItemDVOs.d.ts +1 -2
- package/dist/dataViews/content/RequestItemDVOs.d.ts.map +1 -1
- package/dist/dataViews/content/ResponseItemDVOs.d.ts +4 -10
- package/dist/dataViews/content/ResponseItemDVOs.d.ts.map +1 -1
- package/dist/events/EventProxy.d.ts.map +1 -1
- package/dist/events/EventProxy.js +10 -29
- package/dist/events/EventProxy.js.map +1 -1
- package/dist/events/consumption/AttributeForwardingDetailsChangedEvent.d.ts +7 -0
- package/dist/events/consumption/AttributeForwardingDetailsChangedEvent.d.ts.map +1 -0
- package/dist/events/consumption/AttributeForwardingDetailsChangedEvent.js +12 -0
- package/dist/events/consumption/AttributeForwardingDetailsChangedEvent.js.map +1 -0
- package/dist/events/consumption/AttributeSucceededEvent.d.ts +11 -0
- package/dist/events/consumption/AttributeSucceededEvent.d.ts.map +1 -0
- package/dist/events/consumption/AttributeSucceededEvent.js +12 -0
- package/dist/events/consumption/AttributeSucceededEvent.js.map +1 -0
- package/dist/events/consumption/ForwardedAttributeDeletedByPeerEvent.d.ts +7 -0
- package/dist/events/consumption/ForwardedAttributeDeletedByPeerEvent.d.ts.map +1 -0
- package/dist/events/consumption/ForwardedAttributeDeletedByPeerEvent.js +12 -0
- package/dist/events/consumption/ForwardedAttributeDeletedByPeerEvent.js.map +1 -0
- package/dist/events/consumption/OwnAttributeDeletedByOwnerEvent.d.ts +7 -0
- package/dist/events/consumption/OwnAttributeDeletedByOwnerEvent.d.ts.map +1 -0
- package/dist/events/consumption/OwnAttributeDeletedByOwnerEvent.js +12 -0
- package/dist/events/consumption/OwnAttributeDeletedByOwnerEvent.js.map +1 -0
- package/dist/events/consumption/PeerRelationshipAttributeDeletedByPeerEvent.d.ts +7 -0
- package/dist/events/consumption/PeerRelationshipAttributeDeletedByPeerEvent.d.ts.map +1 -0
- package/dist/events/consumption/PeerRelationshipAttributeDeletedByPeerEvent.js +12 -0
- package/dist/events/consumption/PeerRelationshipAttributeDeletedByPeerEvent.js.map +1 -0
- package/dist/events/consumption/index.d.ts +5 -9
- package/dist/events/consumption/index.d.ts.map +1 -1
- package/dist/events/consumption/index.js +5 -9
- package/dist/events/consumption/index.js.map +1 -1
- package/dist/extensibility/facades/consumption/AttributesFacade.d.ts +27 -31
- package/dist/extensibility/facades/consumption/AttributesFacade.d.ts.map +1 -1
- package/dist/extensibility/facades/consumption/AttributesFacade.js +51 -63
- package/dist/extensibility/facades/consumption/AttributesFacade.js.map +1 -1
- package/dist/useCases/common/RuntimeErrors.d.ts +8 -11
- package/dist/useCases/common/RuntimeErrors.d.ts.map +1 -1
- package/dist/useCases/common/RuntimeErrors.js +16 -25
- package/dist/useCases/common/RuntimeErrors.js.map +1 -1
- package/dist/useCases/common/Schemas.d.ts +13 -31
- package/dist/useCases/common/Schemas.d.ts.map +1 -1
- package/dist/useCases/common/Schemas.js +9891 -13286
- package/dist/useCases/common/Schemas.js.map +1 -1
- package/dist/useCases/consumption/attributes/AttributeMapper.d.ts +3 -2
- package/dist/useCases/consumption/attributes/AttributeMapper.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/AttributeMapper.js +27 -5
- package/dist/useCases/consumption/attributes/AttributeMapper.js.map +1 -1
- package/dist/useCases/consumption/attributes/CanCreateOwnIdentityAttribute.d.ts +37 -0
- package/dist/useCases/consumption/attributes/CanCreateOwnIdentityAttribute.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/{CanCreateRepositoryAttribute.js → CanCreateOwnIdentityAttribute.js} +20 -10
- package/dist/useCases/consumption/attributes/CanCreateOwnIdentityAttribute.js.map +1 -0
- package/dist/useCases/consumption/attributes/{ChangeDefaultRepositoryAttribute.d.ts → ChangeDefaultOwnIdentityAttribute.d.ts} +5 -5
- package/dist/useCases/consumption/attributes/ChangeDefaultOwnIdentityAttribute.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/{ChangeDefaultRepositoryAttribute.js → ChangeDefaultOwnIdentityAttribute.js} +13 -13
- package/dist/useCases/consumption/attributes/ChangeDefaultOwnIdentityAttribute.js.map +1 -0
- package/dist/useCases/consumption/attributes/CreateOwnIdentityAttribute.d.ts +30 -0
- package/dist/useCases/consumption/attributes/CreateOwnIdentityAttribute.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/{CreateRepositoryAttribute.js → CreateOwnIdentityAttribute.js} +15 -16
- package/dist/useCases/consumption/attributes/CreateOwnIdentityAttribute.js.map +1 -0
- package/dist/useCases/consumption/attributes/DeleteAttributeAndNotify.d.ts +33 -0
- package/dist/useCases/consumption/attributes/DeleteAttributeAndNotify.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/DeleteAttributeAndNotify.js +198 -0
- package/dist/useCases/consumption/attributes/DeleteAttributeAndNotify.js.map +1 -0
- package/dist/useCases/consumption/attributes/DeleteSharedAttributesForRejectedOrRevokedRelationship.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/DeleteSharedAttributesForRejectedOrRevokedRelationship.js +8 -2
- package/dist/useCases/consumption/attributes/DeleteSharedAttributesForRejectedOrRevokedRelationship.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetAttributes.d.ts +5 -8
- package/dist/useCases/consumption/attributes/GetAttributes.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/GetAttributes.js +9 -18
- package/dist/useCases/consumption/attributes/GetAttributes.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetForwardingDetailsForAttribute.d.ts +28 -0
- package/dist/useCases/consumption/attributes/GetForwardingDetailsForAttribute.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/GetForwardingDetailsForAttribute.js +77 -0
- package/dist/useCases/consumption/attributes/GetForwardingDetailsForAttribute.js.map +1 -0
- package/dist/useCases/consumption/attributes/{GetPeerSharedAttributes.d.ts → GetOwnAttributesSharedWithPeer.d.ts} +10 -11
- package/dist/useCases/consumption/attributes/GetOwnAttributesSharedWithPeer.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/{GetOwnSharedAttributes.js → GetOwnAttributesSharedWithPeer.js} +12 -17
- package/dist/useCases/consumption/attributes/GetOwnAttributesSharedWithPeer.js.map +1 -0
- package/dist/useCases/consumption/attributes/{GetRepositoryAttributes.d.ts → GetOwnIdentityAttributes.d.ts} +9 -9
- package/dist/useCases/consumption/attributes/GetOwnIdentityAttributes.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/{GetRepositoryAttributes.js → GetOwnIdentityAttributes.js} +8 -8
- package/dist/useCases/consumption/attributes/GetOwnIdentityAttributes.js.map +1 -0
- package/dist/useCases/consumption/attributes/GetPeerAttributes.d.ts +39 -0
- package/dist/useCases/consumption/attributes/GetPeerAttributes.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/{GetPeerSharedAttributes.js → GetPeerAttributes.js} +10 -10
- package/dist/useCases/consumption/attributes/GetPeerAttributes.js.map +1 -0
- package/dist/useCases/consumption/attributes/GetVersionsOfAttribute.js +1 -1
- package/dist/useCases/consumption/attributes/GetVersionsOfAttribute.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetVersionsOfAttributeSharedWithPeer.d.ts +22 -0
- package/dist/useCases/consumption/attributes/GetVersionsOfAttributeSharedWithPeer.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/{GetSharedVersionsOfAttribute.js → GetVersionsOfAttributeSharedWithPeer.js} +14 -20
- package/dist/useCases/consumption/attributes/GetVersionsOfAttributeSharedWithPeer.js.map +1 -0
- package/dist/useCases/consumption/attributes/{NotifyPeerAboutRepositoryAttributeSuccession.d.ts → NotifyPeerAboutOwnIdentityAttributeSuccession.d.ts} +9 -9
- package/dist/useCases/consumption/attributes/NotifyPeerAboutOwnIdentityAttributeSuccession.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/NotifyPeerAboutOwnIdentityAttributeSuccession.js +95 -0
- package/dist/useCases/consumption/attributes/NotifyPeerAboutOwnIdentityAttributeSuccession.js.map +1 -0
- package/dist/useCases/consumption/attributes/{ShareRepositoryAttribute.d.ts → ShareOwnIdentityAttribute.d.ts} +5 -5
- package/dist/useCases/consumption/attributes/ShareOwnIdentityAttribute.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/{ShareRepositoryAttribute.js → ShareOwnIdentityAttribute.js} +14 -15
- package/dist/useCases/consumption/attributes/ShareOwnIdentityAttribute.js.map +1 -0
- package/dist/useCases/consumption/attributes/{SucceedRepositoryAttribute.d.ts → SucceedOwnIdentityAttribute.d.ts} +6 -6
- package/dist/useCases/consumption/attributes/SucceedOwnIdentityAttribute.d.ts.map +1 -0
- package/dist/useCases/consumption/attributes/{SucceedRepositoryAttribute.js → SucceedOwnIdentityAttribute.js} +13 -14
- package/dist/useCases/consumption/attributes/SucceedOwnIdentityAttribute.js.map +1 -0
- package/dist/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.js +13 -16
- package/dist/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.js.map +1 -1
- package/dist/useCases/consumption/attributes/index.d.ts +12 -14
- package/dist/useCases/consumption/attributes/index.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/index.js +12 -14
- package/dist/useCases/consumption/attributes/index.js.map +1 -1
- package/dist/useCases/transport/relationships/GetAttributesForRelationship.d.ts.map +1 -1
- package/dist/useCases/transport/relationships/GetAttributesForRelationship.js +3 -7
- package/dist/useCases/transport/relationships/GetAttributesForRelationship.js.map +1 -1
- package/package.json +6 -6
- package/dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.d.ts +0 -7
- package/dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.d.ts.map +0 -1
- package/dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.js +0 -12
- package/dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.js.map +0 -1
- package/dist/events/consumption/OwnSharedAttributeSucceededEvent.d.ts +0 -7
- package/dist/events/consumption/OwnSharedAttributeSucceededEvent.d.ts.map +0 -1
- package/dist/events/consumption/OwnSharedAttributeSucceededEvent.js +0 -12
- package/dist/events/consumption/OwnSharedAttributeSucceededEvent.js.map +0 -1
- package/dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.d.ts +0 -7
- package/dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.d.ts.map +0 -1
- package/dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.js +0 -12
- package/dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.js.map +0 -1
- package/dist/events/consumption/PeerSharedAttributeSucceededEvent.d.ts +0 -7
- package/dist/events/consumption/PeerSharedAttributeSucceededEvent.d.ts.map +0 -1
- package/dist/events/consumption/PeerSharedAttributeSucceededEvent.js +0 -12
- package/dist/events/consumption/PeerSharedAttributeSucceededEvent.js.map +0 -1
- package/dist/events/consumption/RepositoryAttributeSucceededEvent.d.ts +0 -7
- package/dist/events/consumption/RepositoryAttributeSucceededEvent.d.ts.map +0 -1
- package/dist/events/consumption/RepositoryAttributeSucceededEvent.js +0 -12
- package/dist/events/consumption/RepositoryAttributeSucceededEvent.js.map +0 -1
- package/dist/events/consumption/SuccessionEventData.d.ts +0 -6
- package/dist/events/consumption/SuccessionEventData.d.ts.map +0 -1
- package/dist/events/consumption/SuccessionEventData.js +0 -3
- package/dist/events/consumption/SuccessionEventData.js.map +0 -1
- package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeSucceededEvent.d.ts +0 -7
- package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeSucceededEvent.d.ts.map +0 -1
- package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeSucceededEvent.js +0 -12
- package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeSucceededEvent.js.map +0 -1
- package/dist/events/consumption/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts +0 -7
- package/dist/events/consumption/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts.map +0 -1
- package/dist/events/consumption/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js +0 -12
- package/dist/events/consumption/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js.map +0 -1
- package/dist/events/consumption/ThirdPartyRelationshipAttributeSucceededEvent.d.ts +0 -7
- package/dist/events/consumption/ThirdPartyRelationshipAttributeSucceededEvent.d.ts.map +0 -1
- package/dist/events/consumption/ThirdPartyRelationshipAttributeSucceededEvent.js +0 -12
- package/dist/events/consumption/ThirdPartyRelationshipAttributeSucceededEvent.js.map +0 -1
- package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.d.ts +0 -37
- package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.js.map +0 -1
- package/dist/useCases/consumption/attributes/ChangeDefaultRepositoryAttribute.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/ChangeDefaultRepositoryAttribute.js.map +0 -1
- package/dist/useCases/consumption/attributes/CreateRepositoryAttribute.d.ts +0 -30
- package/dist/useCases/consumption/attributes/CreateRepositoryAttribute.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/CreateRepositoryAttribute.js.map +0 -1
- package/dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.d.ts +0 -23
- package/dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.js +0 -89
- package/dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.js.map +0 -1
- package/dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.d.ts +0 -23
- package/dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.js +0 -90
- package/dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.js.map +0 -1
- package/dist/useCases/consumption/attributes/DeleteRepositoryAttribute.d.ts +0 -18
- package/dist/useCases/consumption/attributes/DeleteRepositoryAttribute.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/DeleteRepositoryAttribute.js +0 -65
- package/dist/useCases/consumption/attributes/DeleteRepositoryAttribute.js.map +0 -1
- package/dist/useCases/consumption/attributes/DeleteThirdPartyRelationshipAttributeAndNotifyPeer.d.ts +0 -23
- package/dist/useCases/consumption/attributes/DeleteThirdPartyRelationshipAttributeAndNotifyPeer.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/DeleteThirdPartyRelationshipAttributeAndNotifyPeer.js +0 -88
- package/dist/useCases/consumption/attributes/DeleteThirdPartyRelationshipAttributeAndNotifyPeer.js.map +0 -1
- package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.d.ts +0 -43
- package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.js.map +0 -1
- package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.js.map +0 -1
- package/dist/useCases/consumption/attributes/GetRepositoryAttributes.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/GetRepositoryAttributes.js.map +0 -1
- package/dist/useCases/consumption/attributes/GetSharedVersionsOfAttribute.d.ts +0 -24
- package/dist/useCases/consumption/attributes/GetSharedVersionsOfAttribute.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/GetSharedVersionsOfAttribute.js.map +0 -1
- package/dist/useCases/consumption/attributes/NotifyPeerAboutRepositoryAttributeSuccession.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/NotifyPeerAboutRepositoryAttributeSuccession.js +0 -105
- package/dist/useCases/consumption/attributes/NotifyPeerAboutRepositoryAttributeSuccession.js.map +0 -1
- package/dist/useCases/consumption/attributes/ShareRepositoryAttribute.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/ShareRepositoryAttribute.js.map +0 -1
- package/dist/useCases/consumption/attributes/SucceedRepositoryAttribute.d.ts.map +0 -1
- package/dist/useCases/consumption/attributes/SucceedRepositoryAttribute.js.map +0 -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: "7.0.0-alpha.
|
|
11
|
-
build: "
|
|
12
|
-
date: "2025-10-
|
|
13
|
-
commit: "
|
|
10
|
+
version: "7.0.0-alpha.72",
|
|
11
|
+
build: "358",
|
|
12
|
+
date: "2025-10-23T12:37:31+00:00",
|
|
13
|
+
commit: "a71b0e38027e4b30695dea73de48043f854fe0e0",
|
|
14
14
|
dependencies: {"@js-soft/docdb-querytranslator":"^1.1.6","@js-soft/logging-abstractions":"^1.0.2","@js-soft/ts-serval":"2.0.14","@js-soft/ts-utils":"^2.3.5","@nmshd/consumption":"*","@nmshd/content":"*","@nmshd/core-types":"*","@nmshd/crypto":"2.1.3","@nmshd/iql":"^1.0.4","@nmshd/runtime-types":"*","@nmshd/transport":"*","@nmshd/typescript-ioc":"3.2.5","ajv":"^8.17.1","ajv-errors":"^3.0.0","ajv-formats":"^3.0.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^3.7.2","reflect-metadata":"^0.2.2","ts-simple-nameof":"^1.3.3"},
|
|
15
15
|
libraries: {
|
|
16
16
|
serval: ts_serval_1.buildInformation,
|
|
@@ -4,7 +4,7 @@ import { FileDTO, IdentityDTO, LocalAttributeDTO, LocalRequestDTO, LocalResponse
|
|
|
4
4
|
import { IdentityController } from "@nmshd/transport";
|
|
5
5
|
import { ConsumptionServices, TransportServices } from "../extensibility";
|
|
6
6
|
import { DataViewObject } from "./DataViewObject";
|
|
7
|
-
import { LocalRequestDVO, LocalResponseDVO, OwnRelationshipAttributeDVO,
|
|
7
|
+
import { LocalRequestDVO, LocalResponseDVO, OwnIdentityAttributeDVO, OwnRelationshipAttributeDVO, PeerIdentityAttributeDVO, PeerRelationshipAttributeDVO, PeerRelationshipTemplateDVO, ProcessedAttributeQueryDVO, ProcessedIQLQueryDVO, ProcessedIdentityAttributeQueryDVO, ProcessedRelationshipAttributeQueryDVO, ProcessedThirdPartyRelationshipAttributeQueryDVO, ThirdPartyRelationshipAttributeDVO } from "./consumption";
|
|
8
8
|
import { AttributeQueryDVO, DraftIdentityAttributeDVO, DraftRelationshipAttributeDVO, IQLQueryDVO, IdentityAttributeQueryDVO, MailDVO, RelationshipAttributeQueryDVO, RequestDVO, RequestItemDVO, RequestItemGroupDVO, RequestMessageDVO, RequestMessageErrorDVO, ResponseDVO, ResponseItemDVO, ResponseItemGroupDVO, ThirdPartyRelationshipAttributeQueryDVO } from "./content";
|
|
9
9
|
import { FileDVO, IdentityDVO, MessageDVO, RecipientDVO, RelationshipTemplateDVO } from "./transport";
|
|
10
10
|
export declare class DataViewExpander {
|
|
@@ -29,8 +29,10 @@ export declare class DataViewExpander {
|
|
|
29
29
|
expandLocalRequestDTOs(localRequests: LocalRequestDTO[]): Promise<LocalRequestDVO[]>;
|
|
30
30
|
expandResponse(response: ResponseJSON, request: LocalRequestDTO): Promise<ResponseDVO>;
|
|
31
31
|
expandLocalResponseDTO(response: LocalResponseDTO, request: LocalRequestDTO): Promise<LocalResponseDVO>;
|
|
32
|
-
expandLocalAttributeDTO(attribute: LocalAttributeDTO): Promise<
|
|
33
|
-
expandLocalAttributeDTOs(attributes: LocalAttributeDTO[]): Promise<(
|
|
32
|
+
expandLocalAttributeDTO(attribute: LocalAttributeDTO): Promise<OwnIdentityAttributeDVO | PeerIdentityAttributeDVO | OwnRelationshipAttributeDVO | PeerRelationshipAttributeDVO | ThirdPartyRelationshipAttributeDVO>;
|
|
33
|
+
expandLocalAttributeDTOs(attributes: LocalAttributeDTO[]): Promise<(OwnIdentityAttributeDVO | PeerIdentityAttributeDVO | OwnRelationshipAttributeDVO | PeerRelationshipAttributeDVO | ThirdPartyRelationshipAttributeDVO)[]>;
|
|
34
|
+
private expandForwardingPeers;
|
|
35
|
+
private expandForwardingDetails;
|
|
34
36
|
expandAttributeQuery(query: IdentityAttributeQueryJSON | RelationshipAttributeQueryJSON | ThirdPartyRelationshipAttributeQueryJSON | IQLQueryJSON): Promise<AttributeQueryDVO>;
|
|
35
37
|
expandIdentityAttributeQuery(query: IdentityAttributeQueryJSON): IdentityAttributeQueryDVO;
|
|
36
38
|
expandRelationshipAttributeQuery(query: RelationshipAttributeQueryJSON): Promise<RelationshipAttributeQueryDVO>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewExpander.d.ts","sourceRoot":"","sources":["../../src/dataViews/DataViewExpander.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataViewExpander.d.ts","sourceRoot":"","sources":["../../src/dataViews/DataViewExpander.ts"],"names":[],"mappings":"AACA,OAAO,EACH,qBAAqB,EAOxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAcH,YAAY,EAEZ,qBAAqB,EACrB,0BAA0B,EAQ1B,yBAAyB,EACzB,8BAA8B,EAM9B,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAEhB,YAAY,EAIZ,wCAAwC,EAM3C,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,OAAO,EACP,WAAW,EACX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eAAe,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAKhF,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAS1C,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;YAK/C,mBAAmB;IAcpB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAiB9C,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAIpE"}
|
|
@@ -401,12 +401,8 @@ let DataViewExpander = class DataViewExpander {
|
|
|
401
401
|
case "ShareAttributeRequestItem":
|
|
402
402
|
const shareAttributeRequestItem = requestItem;
|
|
403
403
|
const attributeDVO = await this.expandAttribute(shareAttributeRequestItem.attribute);
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
const shareAttributeResponseItem = responseItemDVO;
|
|
407
|
-
if (shareAttributeResponseItem)
|
|
408
|
-
attributeDVO.id = shareAttributeResponseItem.attributeId;
|
|
409
|
-
}
|
|
404
|
+
// We have to manually copy the attribute id here, otherwise we could not link to the local attribute
|
|
405
|
+
attributeDVO.id = shareAttributeRequestItem.attributeId;
|
|
410
406
|
return {
|
|
411
407
|
...shareAttributeRequestItem,
|
|
412
408
|
type: "ShareAttributeRequestItemDVO",
|
|
@@ -575,26 +571,6 @@ let DataViewExpander = class DataViewExpander {
|
|
|
575
571
|
name: name,
|
|
576
572
|
attribute: localAttributeDVOForPropose
|
|
577
573
|
};
|
|
578
|
-
case "ShareAttributeAcceptResponseItem":
|
|
579
|
-
const shareAttributeResponseItem = responseItem;
|
|
580
|
-
const localAttributeResultForShare = await this.consumption.attributes.getAttribute({ id: shareAttributeResponseItem.attributeId });
|
|
581
|
-
if (localAttributeResultForShare.isError) {
|
|
582
|
-
if (!localAttributeResultForShare.error.equals(useCases_1.RuntimeErrors.general.recordNotFound()))
|
|
583
|
-
throw localAttributeResultForShare.error;
|
|
584
|
-
return {
|
|
585
|
-
type: "AttributeAlreadyDeletedAcceptResponseItemDVO",
|
|
586
|
-
id: shareAttributeResponseItem.attributeId,
|
|
587
|
-
name: name
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
const localAttributeDVOForShare = await this.expandLocalAttributeDTO(localAttributeResultForShare.value);
|
|
591
|
-
return {
|
|
592
|
-
...shareAttributeResponseItem,
|
|
593
|
-
type: "ShareAttributeAcceptResponseItemDVO",
|
|
594
|
-
id: shareAttributeResponseItem.attributeId,
|
|
595
|
-
name: name,
|
|
596
|
-
attribute: localAttributeDVOForShare
|
|
597
|
-
};
|
|
598
574
|
case "FormFieldAcceptResponseItem":
|
|
599
575
|
const formFieldResponseItem = responseItem;
|
|
600
576
|
return {
|
|
@@ -605,38 +581,24 @@ let DataViewExpander = class DataViewExpander {
|
|
|
605
581
|
};
|
|
606
582
|
case "TransferFileOwnershipAcceptResponseItem":
|
|
607
583
|
const transferFileOwnershipResponseItem = responseItem;
|
|
608
|
-
const
|
|
609
|
-
if (
|
|
610
|
-
if (!
|
|
611
|
-
throw
|
|
584
|
+
const attributeResultForTransfer = await this.consumption.attributes.getAttribute({ id: transferFileOwnershipResponseItem.attributeId });
|
|
585
|
+
if (attributeResultForTransfer.isError) {
|
|
586
|
+
if (!attributeResultForTransfer.error.equals(useCases_1.RuntimeErrors.general.recordNotFound()))
|
|
587
|
+
throw attributeResultForTransfer.error;
|
|
612
588
|
return {
|
|
613
589
|
type: "AttributeAlreadyDeletedAcceptResponseItemDVO",
|
|
614
590
|
id: transferFileOwnershipResponseItem.attributeId,
|
|
615
591
|
name: name
|
|
616
592
|
};
|
|
617
593
|
}
|
|
618
|
-
const
|
|
619
|
-
let repositoryAttributeDVOForTransfer;
|
|
620
|
-
const repositoryAttributeIdForTransferExists = !!sharedAttributeDVOForTransfer.sourceAttribute;
|
|
621
|
-
if (repositoryAttributeIdForTransferExists) {
|
|
622
|
-
const repositoryAttributeResultForTransfer = await this.consumption.attributes.getAttribute({
|
|
623
|
-
id: sharedAttributeDVOForTransfer.sourceAttribute
|
|
624
|
-
});
|
|
625
|
-
if (repositoryAttributeResultForTransfer.isError && !repositoryAttributeResultForTransfer.error.equals(useCases_1.RuntimeErrors.general.recordNotFound())) {
|
|
626
|
-
throw repositoryAttributeResultForTransfer.error;
|
|
627
|
-
}
|
|
628
|
-
if (repositoryAttributeResultForTransfer.isSuccess) {
|
|
629
|
-
repositoryAttributeDVOForTransfer = await this.expandLocalAttributeDTO(repositoryAttributeResultForTransfer.value);
|
|
630
|
-
}
|
|
631
|
-
}
|
|
594
|
+
const attributeDVOForTransfer = (await this.expandLocalAttributeDTO(attributeResultForTransfer.value));
|
|
632
595
|
return {
|
|
633
596
|
...transferFileOwnershipResponseItem,
|
|
634
597
|
type: "TransferFileOwnershipAcceptResponseItemDVO",
|
|
635
|
-
id:
|
|
598
|
+
id: transferFileOwnershipResponseItem.attributeId,
|
|
636
599
|
name: name,
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
sharedAttribute: sharedAttributeDVOForTransfer
|
|
600
|
+
attributeId: transferFileOwnershipResponseItem.attributeId,
|
|
601
|
+
attribute: attributeDVOForTransfer
|
|
640
602
|
};
|
|
641
603
|
case "AttributeSuccessionAcceptResponseItem":
|
|
642
604
|
const attributeSuccessionResponseItem = responseItem;
|
|
@@ -790,163 +752,190 @@ let DataViewExpander = class DataViewExpander {
|
|
|
790
752
|
const localAttribute = await this.consumptionController.attributes.getLocalAttribute(core_types_1.CoreId.from(attribute.id));
|
|
791
753
|
if (!localAttribute)
|
|
792
754
|
throw new Error("Attribute not found");
|
|
755
|
+
if (!(localAttribute instanceof consumption_1.OwnIdentityAttribute ||
|
|
756
|
+
localAttribute instanceof consumption_1.PeerIdentityAttribute ||
|
|
757
|
+
localAttribute instanceof consumption_1.OwnRelationshipAttribute ||
|
|
758
|
+
localAttribute instanceof consumption_1.PeerRelationshipAttribute ||
|
|
759
|
+
localAttribute instanceof consumption_1.ThirdPartyRelationshipAttribute)) {
|
|
760
|
+
throw new Error("Attribute has unknown type");
|
|
761
|
+
}
|
|
793
762
|
const owner = attribute.content.owner;
|
|
794
|
-
|
|
795
|
-
|
|
763
|
+
const name = `i18n://dvo.attribute.name.${valueType}`;
|
|
764
|
+
const description = `i18n://dvo.attribute.description.${valueType}`;
|
|
796
765
|
const renderHints = localAttribute.content.value.renderHints.toJSON();
|
|
797
766
|
const valueHints = localAttribute.content.value.valueHints.toJSON();
|
|
798
|
-
if (localAttribute.
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
const relationshipAttribute = localAttribute.content;
|
|
802
|
-
const value = relationshipAttribute.value;
|
|
803
|
-
if ("title" in value) {
|
|
804
|
-
name = value.title;
|
|
805
|
-
}
|
|
806
|
-
if ("description" in value && !!value.description) {
|
|
807
|
-
description = value.description;
|
|
808
|
-
}
|
|
809
|
-
// Peer shared RelationshipAttribute
|
|
810
|
-
if (relationshipAttribute.owner.toString() === peer) {
|
|
811
|
-
return {
|
|
812
|
-
type: "PeerRelationshipAttributeDVO",
|
|
813
|
-
id: attribute.id,
|
|
814
|
-
name,
|
|
815
|
-
key: relationshipAttribute.key,
|
|
816
|
-
confidentiality: relationshipAttribute.confidentiality,
|
|
817
|
-
description,
|
|
818
|
-
content: attribute.content,
|
|
819
|
-
value: attribute.content.value,
|
|
820
|
-
date: attribute.createdAt,
|
|
821
|
-
owner,
|
|
822
|
-
renderHints,
|
|
823
|
-
valueHints,
|
|
824
|
-
createdAt: attribute.createdAt,
|
|
825
|
-
isOwn: false,
|
|
826
|
-
peer: peer,
|
|
827
|
-
isDraft: false,
|
|
828
|
-
requestReference: localAttribute.shareInfo.requestReference?.toString(),
|
|
829
|
-
notificationReference: localAttribute.shareInfo.notificationReference?.toString(),
|
|
830
|
-
sourceAttribute: localAttribute.shareInfo.sourceAttribute?.toString(),
|
|
831
|
-
thirdPartyAddress: localAttribute.shareInfo.thirdPartyAddress?.toString(),
|
|
832
|
-
valueType,
|
|
833
|
-
isTechnical: relationshipAttribute.isTechnical,
|
|
834
|
-
deletionStatus: localAttribute.deletionInfo?.deletionStatus,
|
|
835
|
-
deletionDate: localAttribute.deletionInfo?.deletionDate.toString(),
|
|
836
|
-
wasViewedAt: attribute.wasViewedAt
|
|
837
|
-
};
|
|
838
|
-
}
|
|
839
|
-
// Own shared RelationshipAttribute
|
|
840
|
-
return {
|
|
841
|
-
type: "OwnRelationshipAttributeDVO",
|
|
842
|
-
id: attribute.id,
|
|
843
|
-
name,
|
|
844
|
-
key: relationshipAttribute.key,
|
|
845
|
-
confidentiality: relationshipAttribute.confidentiality,
|
|
846
|
-
description,
|
|
847
|
-
content: attribute.content,
|
|
848
|
-
value: attribute.content.value,
|
|
849
|
-
date: attribute.createdAt,
|
|
850
|
-
owner,
|
|
851
|
-
renderHints,
|
|
852
|
-
valueHints,
|
|
853
|
-
createdAt: attribute.createdAt,
|
|
854
|
-
isOwn: true,
|
|
855
|
-
peer: peer,
|
|
856
|
-
isDraft: false,
|
|
857
|
-
requestReference: localAttribute.shareInfo.requestReference?.toString(),
|
|
858
|
-
notificationReference: localAttribute.shareInfo.notificationReference?.toString(),
|
|
859
|
-
sourceAttribute: localAttribute.shareInfo.sourceAttribute?.toString(),
|
|
860
|
-
thirdPartyAddress: localAttribute.shareInfo.thirdPartyAddress?.toString(),
|
|
861
|
-
valueType,
|
|
862
|
-
isTechnical: relationshipAttribute.isTechnical,
|
|
863
|
-
deletionStatus: localAttribute.deletionInfo?.deletionStatus,
|
|
864
|
-
deletionDate: localAttribute.deletionInfo?.deletionDate.toString(),
|
|
865
|
-
wasViewedAt: attribute.wasViewedAt
|
|
866
|
-
};
|
|
867
|
-
}
|
|
868
|
-
const identityAttribute = localAttribute.content;
|
|
869
|
-
if (identityAttribute.owner.toString() === peer) {
|
|
870
|
-
// Peer shared IdentityAttribute
|
|
871
|
-
return {
|
|
872
|
-
type: "PeerAttributeDVO",
|
|
873
|
-
id: attribute.id,
|
|
874
|
-
name,
|
|
875
|
-
description,
|
|
876
|
-
content: attribute.content,
|
|
877
|
-
value: attribute.content.value,
|
|
878
|
-
date: attribute.createdAt,
|
|
879
|
-
owner: owner,
|
|
880
|
-
renderHints,
|
|
881
|
-
valueHints,
|
|
882
|
-
createdAt: attribute.createdAt,
|
|
883
|
-
isOwn: false,
|
|
884
|
-
peer: peer,
|
|
885
|
-
isDraft: false,
|
|
886
|
-
requestReference: localAttribute.shareInfo.requestReference?.toString(),
|
|
887
|
-
notificationReference: localAttribute.shareInfo.notificationReference?.toString(),
|
|
888
|
-
tags: identityAttribute.tags,
|
|
889
|
-
valueType,
|
|
890
|
-
deletionStatus: localAttribute.deletionInfo?.deletionStatus,
|
|
891
|
-
deletionDate: localAttribute.deletionInfo?.deletionDate.toString(),
|
|
892
|
-
wasViewedAt: attribute.wasViewedAt
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
// Own Shared IdentityAttribute
|
|
767
|
+
if (localAttribute instanceof consumption_1.OwnIdentityAttribute) {
|
|
768
|
+
const forwardingDetailsResult = await this.consumption.attributes.getForwardingDetailsForAttribute({ attributeId: localAttribute.id.toString() });
|
|
769
|
+
const forwardingDetails = forwardingDetailsResult.value;
|
|
896
770
|
return {
|
|
897
|
-
type: "
|
|
771
|
+
type: "OwnIdentityAttributeDVO",
|
|
898
772
|
id: attribute.id,
|
|
899
773
|
name,
|
|
900
774
|
description,
|
|
775
|
+
date: attribute.createdAt,
|
|
901
776
|
content: attribute.content,
|
|
777
|
+
owner: owner,
|
|
902
778
|
value: attribute.content.value,
|
|
779
|
+
valueType,
|
|
780
|
+
renderHints,
|
|
781
|
+
valueHints,
|
|
782
|
+
isDraft: false,
|
|
783
|
+
isOwn: true,
|
|
784
|
+
createdAt: attribute.createdAt,
|
|
785
|
+
wasViewedAt: attribute.wasViewedAt,
|
|
786
|
+
succeeds: attribute.succeeds,
|
|
787
|
+
succeededBy: attribute.succeededBy,
|
|
788
|
+
tags: localAttribute.content.tags,
|
|
789
|
+
isDefault: attribute.isDefault,
|
|
790
|
+
forwardingPeers: await this.expandForwardingPeers(forwardingDetails),
|
|
791
|
+
forwardingDetails: this.expandForwardingDetails(forwardingDetails)
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
if (localAttribute instanceof consumption_1.PeerIdentityAttribute) {
|
|
795
|
+
return {
|
|
796
|
+
type: "PeerIdentityAttributeDVO",
|
|
797
|
+
id: attribute.id,
|
|
798
|
+
name,
|
|
799
|
+
description,
|
|
903
800
|
date: attribute.createdAt,
|
|
801
|
+
content: attribute.content,
|
|
904
802
|
owner: owner,
|
|
803
|
+
value: attribute.content.value,
|
|
804
|
+
valueType,
|
|
905
805
|
renderHints,
|
|
906
806
|
valueHints,
|
|
807
|
+
isDraft: false,
|
|
808
|
+
isOwn: false,
|
|
907
809
|
createdAt: attribute.createdAt,
|
|
908
|
-
|
|
909
|
-
|
|
810
|
+
wasViewedAt: attribute.wasViewedAt,
|
|
811
|
+
succeeds: attribute.succeeds,
|
|
812
|
+
succeededBy: attribute.succeededBy,
|
|
813
|
+
tags: localAttribute.content.tags,
|
|
814
|
+
peer: localAttribute.peer.toString(),
|
|
815
|
+
sourceReference: localAttribute.sourceReference.toString(),
|
|
816
|
+
deletionDate: localAttribute.deletionInfo?.deletionDate.toString(),
|
|
817
|
+
deletionStatus: localAttribute.deletionInfo?.deletionStatus
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
if (localAttribute instanceof consumption_1.OwnRelationshipAttribute) {
|
|
821
|
+
const forwardingDetailsResult = await this.consumption.attributes.getForwardingDetailsForAttribute({ attributeId: localAttribute.id.toString() });
|
|
822
|
+
const forwardingDetails = forwardingDetailsResult.value;
|
|
823
|
+
return {
|
|
824
|
+
type: "OwnRelationshipAttributeDVO",
|
|
825
|
+
id: attribute.id,
|
|
826
|
+
name: "title" in attribute.content.value ? attribute.content.value.title : name,
|
|
827
|
+
description: "description" in attribute.content.value ? attribute.content.value.description : description,
|
|
828
|
+
date: attribute.createdAt,
|
|
829
|
+
content: attribute.content,
|
|
830
|
+
owner,
|
|
831
|
+
value: attribute.content.value,
|
|
832
|
+
valueType,
|
|
833
|
+
renderHints,
|
|
834
|
+
valueHints,
|
|
910
835
|
isDraft: false,
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
836
|
+
isOwn: true,
|
|
837
|
+
createdAt: attribute.createdAt,
|
|
838
|
+
wasViewedAt: attribute.wasViewedAt,
|
|
839
|
+
succeeds: attribute.succeeds,
|
|
840
|
+
succeededBy: attribute.succeededBy,
|
|
841
|
+
key: localAttribute.content.key,
|
|
842
|
+
confidentiality: localAttribute.content.confidentiality,
|
|
843
|
+
isTechnical: localAttribute.content.isTechnical,
|
|
844
|
+
peer: localAttribute.peer.toString(),
|
|
845
|
+
sourceReference: localAttribute.sourceReference.toString(),
|
|
846
|
+
deletionStatus: localAttribute.deletionInfo?.deletionStatus,
|
|
847
|
+
deletionDate: localAttribute.deletionInfo?.deletionDate.toString(),
|
|
848
|
+
forwardingPeers: await this.expandForwardingPeers(forwardingDetails),
|
|
849
|
+
forwardingDetails: this.expandForwardingDetails(forwardingDetails)
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
if (localAttribute instanceof consumption_1.PeerRelationshipAttribute) {
|
|
853
|
+
const forwardingDetailsResult = await this.consumption.attributes.getForwardingDetailsForAttribute({ attributeId: localAttribute.id.toString() });
|
|
854
|
+
const forwardingDetails = forwardingDetailsResult.value;
|
|
855
|
+
return {
|
|
856
|
+
type: "PeerRelationshipAttributeDVO",
|
|
857
|
+
id: attribute.id,
|
|
858
|
+
name: "title" in attribute.content.value ? attribute.content.value.title : name,
|
|
859
|
+
description: "description" in attribute.content.value ? attribute.content.value.description : description,
|
|
860
|
+
date: attribute.createdAt,
|
|
861
|
+
content: attribute.content,
|
|
862
|
+
owner,
|
|
863
|
+
value: attribute.content.value,
|
|
915
864
|
valueType,
|
|
865
|
+
renderHints,
|
|
866
|
+
valueHints,
|
|
867
|
+
isDraft: false,
|
|
868
|
+
isOwn: false,
|
|
869
|
+
createdAt: attribute.createdAt,
|
|
870
|
+
wasViewedAt: attribute.wasViewedAt,
|
|
871
|
+
succeeds: attribute.succeeds,
|
|
872
|
+
succeededBy: attribute.succeededBy,
|
|
873
|
+
key: localAttribute.content.key,
|
|
874
|
+
confidentiality: localAttribute.content.confidentiality,
|
|
875
|
+
isTechnical: localAttribute.content.isTechnical,
|
|
876
|
+
peer: localAttribute.peer.toString(),
|
|
877
|
+
sourceReference: localAttribute.sourceReference.toString(),
|
|
916
878
|
deletionStatus: localAttribute.deletionInfo?.deletionStatus,
|
|
917
879
|
deletionDate: localAttribute.deletionInfo?.deletionDate.toString(),
|
|
918
|
-
|
|
880
|
+
forwardingPeers: await this.expandForwardingPeers(forwardingDetails),
|
|
881
|
+
forwardingDetails: this.expandForwardingDetails(forwardingDetails)
|
|
919
882
|
};
|
|
920
883
|
}
|
|
921
|
-
const identityAttribute = localAttribute.content;
|
|
922
|
-
const sharedToPeerAttributes = await this.consumption.attributes.getAttributes({ query: { "shareInfo.sourceAttribute": attribute.id } });
|
|
923
|
-
const sharedToPeerDVOs = await this.expandLocalAttributeDTOs(sharedToPeerAttributes.value);
|
|
924
|
-
// RepositoryAttribute
|
|
925
884
|
return {
|
|
926
|
-
type: "
|
|
885
|
+
type: "ThirdPartyRelationshipAttributeDVO",
|
|
927
886
|
id: attribute.id,
|
|
928
|
-
name,
|
|
929
|
-
description,
|
|
887
|
+
name: "title" in attribute.content.value ? attribute.content.value.title : name,
|
|
888
|
+
description: "description" in attribute.content.value ? attribute.content.value.description : description,
|
|
889
|
+
date: attribute.createdAt,
|
|
930
890
|
content: attribute.content,
|
|
891
|
+
owner,
|
|
931
892
|
value: attribute.content.value,
|
|
932
|
-
|
|
933
|
-
owner: owner,
|
|
893
|
+
valueType,
|
|
934
894
|
renderHints,
|
|
935
895
|
valueHints,
|
|
936
|
-
createdAt: attribute.createdAt,
|
|
937
|
-
isOwn: true,
|
|
938
896
|
isDraft: false,
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
897
|
+
isOwn: false,
|
|
898
|
+
createdAt: attribute.createdAt,
|
|
899
|
+
wasViewedAt: attribute.wasViewedAt,
|
|
900
|
+
succeeds: attribute.succeeds,
|
|
901
|
+
succeededBy: attribute.succeededBy,
|
|
902
|
+
key: localAttribute.content.key,
|
|
903
|
+
confidentiality: localAttribute.content.confidentiality,
|
|
904
|
+
isTechnical: localAttribute.content.isTechnical,
|
|
905
|
+
peer: localAttribute.peer.toString(),
|
|
906
|
+
initialAttributePeer: localAttribute.initialAttributePeer.toString(),
|
|
907
|
+
sourceReference: localAttribute.sourceReference.toString(),
|
|
908
|
+
deletionStatus: localAttribute.deletionInfo?.deletionStatus,
|
|
909
|
+
deletionDate: localAttribute.deletionInfo?.deletionDate.toString()
|
|
944
910
|
};
|
|
945
911
|
}
|
|
946
912
|
async expandLocalAttributeDTOs(attributes) {
|
|
947
913
|
const attributesPromise = attributes.map((attribute) => this.expandLocalAttributeDTO(attribute));
|
|
948
914
|
return await Promise.all(attributesPromise);
|
|
949
915
|
}
|
|
916
|
+
async expandForwardingPeers(forwardingDetails) {
|
|
917
|
+
if (forwardingDetails.length === 0)
|
|
918
|
+
return;
|
|
919
|
+
const addresses = [...new Set(forwardingDetails.map((detail) => detail.peer.toString()))];
|
|
920
|
+
const promises = addresses.map((address) => this.expandAddress(address));
|
|
921
|
+
return await Promise.all(promises);
|
|
922
|
+
}
|
|
923
|
+
expandForwardingDetails(forwardingDetails) {
|
|
924
|
+
if (forwardingDetails.length === 0)
|
|
925
|
+
return;
|
|
926
|
+
return forwardingDetails.map((details) => {
|
|
927
|
+
const result = {
|
|
928
|
+
peer: details.peer.toString(),
|
|
929
|
+
sourceReference: details.sourceReference.toString(),
|
|
930
|
+
sharedAt: details.sharedAt.toString()
|
|
931
|
+
};
|
|
932
|
+
if (details.deletionInfo) {
|
|
933
|
+
result.deletionDate = details.deletionInfo.deletionDate.toString();
|
|
934
|
+
result.deletionStatus = details.deletionInfo.deletionStatus;
|
|
935
|
+
}
|
|
936
|
+
return result;
|
|
937
|
+
});
|
|
938
|
+
}
|
|
950
939
|
async expandAttributeQuery(query) {
|
|
951
940
|
switch (query["@type"]) {
|
|
952
941
|
case "IdentityAttributeQuery":
|
|
@@ -1354,7 +1343,7 @@ let DataViewExpander = class DataViewExpander {
|
|
|
1354
1343
|
async createRelationshipDVO(relationship) {
|
|
1355
1344
|
const relationshipSetting = await this.getRelationshipSettingDVO(relationship);
|
|
1356
1345
|
const stringByType = {};
|
|
1357
|
-
const relationshipAttributesResult = await this.consumption.attributes.
|
|
1346
|
+
const relationshipAttributesResult = await this.consumption.attributes.getPeerAttributes({ peer: relationship.peer });
|
|
1358
1347
|
const expandedAttributes = await this.expandLocalAttributeDTOs(relationshipAttributesResult.value);
|
|
1359
1348
|
const attributesByType = {};
|
|
1360
1349
|
for (const attribute of expandedAttributes) {
|
|
@@ -1377,7 +1366,7 @@ let DataViewExpander = class DataViewExpander {
|
|
|
1377
1366
|
}
|
|
1378
1367
|
}
|
|
1379
1368
|
}
|
|
1380
|
-
const sendMailDisabledResult = await this.consumption.attributes.
|
|
1369
|
+
const sendMailDisabledResult = await this.consumption.attributes.getPeerAttributes({
|
|
1381
1370
|
peer: relationship.peer,
|
|
1382
1371
|
query: { "content.value.@type": "Consent", "content.key": "__App_Contact_sendMailDisabled" }
|
|
1383
1372
|
});
|