@nmshd/runtime 4.5.0 → 4.6.0

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 (88) hide show
  1. package/dist/buildInformation.js +5 -5
  2. package/dist/dataViews/DataViewExpander.d.ts.map +1 -1
  3. package/dist/dataViews/DataViewExpander.js +44 -4
  4. package/dist/dataViews/DataViewExpander.js.map +1 -1
  5. package/dist/dataViews/consumption/DecidableRequestItemDVOs.d.ts +7 -1
  6. package/dist/dataViews/consumption/DecidableRequestItemDVOs.d.ts.map +1 -1
  7. package/dist/dataViews/consumption/LocalAttributeDVO.d.ts +8 -0
  8. package/dist/dataViews/consumption/LocalAttributeDVO.d.ts.map +1 -1
  9. package/dist/dataViews/content/RequestItemDVOs.d.ts +6 -0
  10. package/dist/dataViews/content/RequestItemDVOs.d.ts.map +1 -1
  11. package/dist/dataViews/content/ResponseItemDVOs.d.ts +5 -1
  12. package/dist/dataViews/content/ResponseItemDVOs.d.ts.map +1 -1
  13. package/dist/events/EventProxy.d.ts.map +1 -1
  14. package/dist/events/EventProxy.js +9 -0
  15. package/dist/events/EventProxy.js.map +1 -1
  16. package/dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.d.ts +7 -0
  17. package/dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.d.ts.map +1 -0
  18. package/dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.js +12 -0
  19. package/dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.js.map +1 -0
  20. package/dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.d.ts +7 -0
  21. package/dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.d.ts.map +1 -0
  22. package/dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.js +12 -0
  23. package/dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.js.map +1 -0
  24. package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.d.ts +7 -0
  25. package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.d.ts.map +1 -0
  26. package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js +12 -0
  27. package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js.map +1 -0
  28. package/dist/events/consumption/index.d.ts +3 -0
  29. package/dist/events/consumption/index.d.ts.map +1 -1
  30. package/dist/events/consumption/index.js +3 -0
  31. package/dist/events/consumption/index.js.map +1 -1
  32. package/dist/extensibility/facades/consumption/AttributesFacade.d.ts +10 -2
  33. package/dist/extensibility/facades/consumption/AttributesFacade.d.ts.map +1 -1
  34. package/dist/extensibility/facades/consumption/AttributesFacade.js +26 -2
  35. package/dist/extensibility/facades/consumption/AttributesFacade.js.map +1 -1
  36. package/dist/types/consumption/LocalAttributeDTO.d.ts +2 -1
  37. package/dist/types/consumption/LocalAttributeDTO.d.ts.map +1 -1
  38. package/dist/useCases/common/RuntimeErrors.d.ts +4 -1
  39. package/dist/useCases/common/RuntimeErrors.d.ts.map +1 -1
  40. package/dist/useCases/common/RuntimeErrors.js +11 -2
  41. package/dist/useCases/common/RuntimeErrors.js.map +1 -1
  42. package/dist/useCases/common/Schemas.d.ts +4 -0
  43. package/dist/useCases/common/Schemas.d.ts.map +1 -1
  44. package/dist/useCases/common/Schemas.js +247 -3
  45. package/dist/useCases/common/Schemas.js.map +1 -1
  46. package/dist/useCases/consumption/attributes/AttributeMapper.d.ts.map +1 -1
  47. package/dist/useCases/consumption/attributes/AttributeMapper.js +2 -1
  48. package/dist/useCases/consumption/attributes/AttributeMapper.js.map +1 -1
  49. package/dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.d.ts +22 -0
  50. package/dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.d.ts.map +1 -0
  51. package/dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.js +78 -0
  52. package/dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.js.map +1 -0
  53. package/dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.d.ts +22 -0
  54. package/dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.d.ts.map +1 -0
  55. package/dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.js +78 -0
  56. package/dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.js.map +1 -0
  57. package/dist/useCases/consumption/attributes/DeleteRepositoryAttribute.d.ts +18 -0
  58. package/dist/useCases/consumption/attributes/DeleteRepositoryAttribute.d.ts.map +1 -0
  59. package/dist/useCases/consumption/attributes/DeleteRepositoryAttribute.js +62 -0
  60. package/dist/useCases/consumption/attributes/DeleteRepositoryAttribute.js.map +1 -0
  61. package/dist/useCases/consumption/attributes/DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer.d.ts +22 -0
  62. package/dist/useCases/consumption/attributes/DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer.d.ts.map +1 -0
  63. package/dist/useCases/consumption/attributes/DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer.js +78 -0
  64. package/dist/useCases/consumption/attributes/DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer.js.map +1 -0
  65. package/dist/useCases/consumption/attributes/GetAttributes.d.ts +3 -0
  66. package/dist/useCases/consumption/attributes/GetAttributes.d.ts.map +1 -1
  67. package/dist/useCases/consumption/attributes/GetAttributes.js +11 -3
  68. package/dist/useCases/consumption/attributes/GetAttributes.js.map +1 -1
  69. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.d.ts +3 -0
  70. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.d.ts.map +1 -1
  71. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.js.map +1 -1
  72. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.d.ts +3 -0
  73. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.d.ts.map +1 -1
  74. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.js.map +1 -1
  75. package/dist/useCases/consumption/attributes/GetRepositoryAttributes.d.ts +3 -0
  76. package/dist/useCases/consumption/attributes/GetRepositoryAttributes.d.ts.map +1 -1
  77. package/dist/useCases/consumption/attributes/GetRepositoryAttributes.js.map +1 -1
  78. package/dist/useCases/consumption/attributes/NotifyPeerAboutRepositoryAttributeSuccession.js +1 -1
  79. package/dist/useCases/consumption/attributes/NotifyPeerAboutRepositoryAttributeSuccession.js.map +1 -1
  80. package/dist/useCases/consumption/attributes/index.d.ts +4 -0
  81. package/dist/useCases/consumption/attributes/index.d.ts.map +1 -1
  82. package/dist/useCases/consumption/attributes/index.js +4 -0
  83. package/dist/useCases/consumption/attributes/index.js.map +1 -1
  84. package/lib-web/nmshd.runtime.js +769 -25
  85. package/lib-web/nmshd.runtime.js.map +1 -1
  86. package/lib-web/nmshd.runtime.min.js +1 -1
  87. package/lib-web/nmshd.runtime.min.js.map +1 -1
  88. package/package.json +3 -3
@@ -45753,11 +45753,11 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
45753
45753
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
45754
45754
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
45755
45755
  exports.buildInformation = {
45756
- version: "4.5.0",
45757
- build: "71",
45758
- date: "2024-04-16T13:34:46+00:00",
45759
- commit: "56b83f1c831cf6621bddff38ce131bb500b78e7e",
45760
- dependencies: {"@js-soft/docdb-querytranslator":"^1.1.4","@js-soft/logging-abstractions":"^1.0.1","@js-soft/ts-serval":"2.0.10","@js-soft/ts-utils":"^2.3.3","@nmshd/consumption":"3.9.7","@nmshd/content":"2.8.11","@nmshd/crypto":"2.0.6","@nmshd/transport":"2.5.0","ajv":"^8.12.0","ajv-errors":"^3.0.0","ajv-formats":"^3.0.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^3.4.4","qrcode":"1.5.3","reflect-metadata":"^0.2.2","ts-simple-nameof":"^1.3.1","typescript-ioc":"3.2.2"},
45756
+ version: "4.6.0",
45757
+ build: "73",
45758
+ date: "2024-04-22T15:09:51+00:00",
45759
+ commit: "af98434e2550967725b8ccbe38a854e88140cb7f",
45760
+ dependencies: {"@js-soft/docdb-querytranslator":"^1.1.4","@js-soft/logging-abstractions":"^1.0.1","@js-soft/ts-serval":"2.0.10","@js-soft/ts-utils":"^2.3.3","@nmshd/consumption":"3.10.0","@nmshd/content":"2.9.0","@nmshd/crypto":"2.0.6","@nmshd/transport":"2.5.0","ajv":"^8.12.0","ajv-errors":"^3.0.0","ajv-formats":"^3.0.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^3.4.4","qrcode":"1.5.3","reflect-metadata":"^0.2.2","ts-simple-nameof":"^1.3.1","typescript-ioc":"3.2.2"},
45761
45761
  libraries: {
45762
45762
  serval: ts_serval_1.buildInformation,
45763
45763
  consumption: consumption_1.buildInformation,
@@ -46183,6 +46183,30 @@ let DataViewExpander = class DataViewExpander {
46183
46183
  isDecidable,
46184
46184
  response: responseItemDVO
46185
46185
  };
46186
+ case "DeleteAttributeRequestItem":
46187
+ const deleteAttributeRequestItem = requestItem;
46188
+ const localAttributeResultForDelete = await this.consumption.attributes.getAttribute({ id: deleteAttributeRequestItem.attributeId });
46189
+ const localAttributeDVOForDelete = await this.expandLocalAttributeDTO(localAttributeResultForDelete.value);
46190
+ if (isDecidable) {
46191
+ return {
46192
+ ...deleteAttributeRequestItem,
46193
+ type: "DecidableDeleteAttributeRequestItemDVO",
46194
+ id: "",
46195
+ name: requestItem.title ? requestItem.title : "i18n://dvo.requestItem.DecidableDeleteAttributeRequestItem.name",
46196
+ isDecidable,
46197
+ response: responseItemDVO,
46198
+ attribute: localAttributeDVOForDelete
46199
+ };
46200
+ }
46201
+ return {
46202
+ ...deleteAttributeRequestItem,
46203
+ type: "DeleteAttributeRequestItemDVO",
46204
+ id: "",
46205
+ name: requestItem.title ? requestItem.title : "i18n://dvo.requestItem.DeleteAttributeRequestItem.name",
46206
+ isDecidable,
46207
+ response: responseItemDVO,
46208
+ attribute: localAttributeDVOForDelete
46209
+ };
46186
46210
  case "ProposeAttributeRequestItem":
46187
46211
  const proposeAttributeRequestItem = requestItem;
46188
46212
  if (localRequestDTO) {
@@ -46392,6 +46416,14 @@ let DataViewExpander = class DataViewExpander {
46392
46416
  name: name,
46393
46417
  attribute: localAttributeDVOForCreate
46394
46418
  };
46419
+ case "DeleteAttributeAcceptResponseItem":
46420
+ const deleteAttributeResponseItem = responseItem;
46421
+ return {
46422
+ ...deleteAttributeResponseItem,
46423
+ type: "DeleteAttributeAcceptResponseItemDVO",
46424
+ id: "",
46425
+ name: name
46426
+ };
46395
46427
  case "ProposeAttributeAcceptResponseItem":
46396
46428
  const proposeAttributeResponseItem = responseItem;
46397
46429
  const localAttributeResultForPropose = await this.consumption.attributes.getAttribute({ id: proposeAttributeResponseItem.attributeId });
@@ -46584,7 +46616,9 @@ let DataViewExpander = class DataViewExpander {
46584
46616
  requestReference: localAttribute.shareInfo.requestReference?.toString(),
46585
46617
  notificationReference: localAttribute.shareInfo.notificationReference?.toString(),
46586
46618
  valueType,
46587
- isTechnical: relationshipAttribute.isTechnical
46619
+ isTechnical: relationshipAttribute.isTechnical,
46620
+ deletionStatus: localAttribute.deletionInfo?.deletionStatus,
46621
+ deletionDate: localAttribute.deletionInfo?.deletionDate.toString()
46588
46622
  };
46589
46623
  }
46590
46624
  // Own Relationship Attribute
@@ -46609,7 +46643,9 @@ let DataViewExpander = class DataViewExpander {
46609
46643
  requestReference: localAttribute.shareInfo.requestReference?.toString(),
46610
46644
  notificationReference: localAttribute.shareInfo.notificationReference?.toString(),
46611
46645
  valueType,
46612
- isTechnical: relationshipAttribute.isTechnical
46646
+ isTechnical: relationshipAttribute.isTechnical,
46647
+ deletionStatus: localAttribute.deletionInfo?.deletionStatus,
46648
+ deletionDate: localAttribute.deletionInfo?.deletionDate.toString()
46613
46649
  };
46614
46650
  }
46615
46651
  const identityAttribute = localAttribute.content;
@@ -46635,7 +46671,9 @@ let DataViewExpander = class DataViewExpander {
46635
46671
  notificationReference: localAttribute.shareInfo.notificationReference?.toString(),
46636
46672
  sourceAttribute: localAttribute.shareInfo.sourceAttribute.toString(),
46637
46673
  tags: identityAttribute.tags ? identityAttribute.tags : [],
46638
- valueType
46674
+ valueType,
46675
+ deletionStatus: localAttribute.deletionInfo?.deletionStatus,
46676
+ deletionDate: localAttribute.deletionInfo?.deletionDate.toString()
46639
46677
  };
46640
46678
  }
46641
46679
  // Peer Attribute
@@ -46658,7 +46696,9 @@ let DataViewExpander = class DataViewExpander {
46658
46696
  requestReference: localAttribute.shareInfo.requestReference?.toString(),
46659
46697
  notificationReference: localAttribute.shareInfo.notificationReference?.toString(),
46660
46698
  tags: identityAttribute.tags ? identityAttribute.tags : [],
46661
- valueType
46699
+ valueType,
46700
+ deletionStatus: localAttribute.deletionInfo?.deletionStatus,
46701
+ deletionDate: localAttribute.deletionInfo?.deletionDate.toString()
46662
46702
  };
46663
46703
  }
46664
46704
  const identityAttribute = localAttribute.content;
@@ -47861,6 +47901,15 @@ class EventProxy {
47861
47901
  this.subscribeToSourceEvent(consumption.AttributeDeletedEvent, (event) => {
47862
47902
  this.targetEventBus.publish(new consumption_1.AttributeDeletedEvent(event.eventTargetAddress, useCases_1.AttributeMapper.toAttributeDTO(event.data)));
47863
47903
  });
47904
+ this.subscribeToSourceEvent(consumption.OwnSharedAttributeDeletedByOwnerEvent, (event) => {
47905
+ this.targetEventBus.publish(new consumption_1.OwnSharedAttributeDeletedByOwnerEvent(event.eventTargetAddress, useCases_1.AttributeMapper.toAttributeDTO(event.data)));
47906
+ });
47907
+ this.subscribeToSourceEvent(consumption.PeerSharedAttributeDeletedByPeerEvent, (event) => {
47908
+ this.targetEventBus.publish(new consumption_1.PeerSharedAttributeDeletedByPeerEvent(event.eventTargetAddress, useCases_1.AttributeMapper.toAttributeDTO(event.data)));
47909
+ });
47910
+ this.subscribeToSourceEvent(consumption.ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent, (event) => {
47911
+ this.targetEventBus.publish(new consumption_1.ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent(event.eventTargetAddress, useCases_1.AttributeMapper.toAttributeDTO(event.data)));
47912
+ });
47864
47913
  this.subscribeToSourceEvent(consumption.OwnSharedAttributeSucceededEvent, (event) => {
47865
47914
  this.targetEventBus.publish(new consumption_1.OwnSharedAttributeSucceededEvent(event.eventTargetAddress, {
47866
47915
  predecessor: useCases_1.AttributeMapper.toAttributeDTO(event.data.predecessor),
@@ -48206,6 +48255,28 @@ exports.OutgoingRequestStatusChangedEvent = OutgoingRequestStatusChangedEvent;
48206
48255
 
48207
48256
  /***/ }),
48208
48257
 
48258
+ /***/ "./dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.js":
48259
+ /*!**************************************************************************!*\
48260
+ !*** ./dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.js ***!
48261
+ \**************************************************************************/
48262
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
48263
+
48264
+ "use strict";
48265
+
48266
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
48267
+ exports.OwnSharedAttributeDeletedByOwnerEvent = void 0;
48268
+ const DataEvent_1 = __webpack_require__(/*! ../DataEvent */ "./dist/events/DataEvent.js");
48269
+ class OwnSharedAttributeDeletedByOwnerEvent extends DataEvent_1.DataEvent {
48270
+ static { this.namespace = "consumption.ownSharedAttributeDeletedByOwner"; }
48271
+ constructor(eventTargetAddress, data) {
48272
+ super(OwnSharedAttributeDeletedByOwnerEvent.namespace, eventTargetAddress, data);
48273
+ }
48274
+ }
48275
+ exports.OwnSharedAttributeDeletedByOwnerEvent = OwnSharedAttributeDeletedByOwnerEvent;
48276
+ //# sourceMappingURL=OwnSharedAttributeDeletedByOwnerEvent.js.map
48277
+
48278
+ /***/ }),
48279
+
48209
48280
  /***/ "./dist/events/consumption/OwnSharedAttributeSucceededEvent.js":
48210
48281
  /*!*********************************************************************!*\
48211
48282
  !*** ./dist/events/consumption/OwnSharedAttributeSucceededEvent.js ***!
@@ -48228,6 +48299,28 @@ exports.OwnSharedAttributeSucceededEvent = OwnSharedAttributeSucceededEvent;
48228
48299
 
48229
48300
  /***/ }),
48230
48301
 
48302
+ /***/ "./dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.js":
48303
+ /*!**************************************************************************!*\
48304
+ !*** ./dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.js ***!
48305
+ \**************************************************************************/
48306
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
48307
+
48308
+ "use strict";
48309
+
48310
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
48311
+ exports.PeerSharedAttributeDeletedByPeerEvent = void 0;
48312
+ const DataEvent_1 = __webpack_require__(/*! ../DataEvent */ "./dist/events/DataEvent.js");
48313
+ class PeerSharedAttributeDeletedByPeerEvent extends DataEvent_1.DataEvent {
48314
+ static { this.namespace = "consumption.peerSharedAttributeDeletedByPeer"; }
48315
+ constructor(eventTargetAddress, data) {
48316
+ super(PeerSharedAttributeDeletedByPeerEvent.namespace, eventTargetAddress, data);
48317
+ }
48318
+ }
48319
+ exports.PeerSharedAttributeDeletedByPeerEvent = PeerSharedAttributeDeletedByPeerEvent;
48320
+ //# sourceMappingURL=PeerSharedAttributeDeletedByPeerEvent.js.map
48321
+
48322
+ /***/ }),
48323
+
48231
48324
  /***/ "./dist/events/consumption/PeerSharedAttributeSucceededEvent.js":
48232
48325
  /*!**********************************************************************!*\
48233
48326
  !*** ./dist/events/consumption/PeerSharedAttributeSucceededEvent.js ***!
@@ -48340,6 +48433,28 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
48340
48433
 
48341
48434
  /***/ }),
48342
48435
 
48436
+ /***/ "./dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js":
48437
+ /*!*******************************************************************************************!*\
48438
+ !*** ./dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js ***!
48439
+ \*******************************************************************************************/
48440
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
48441
+
48442
+ "use strict";
48443
+
48444
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
48445
+ exports.ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent = void 0;
48446
+ const DataEvent_1 = __webpack_require__(/*! ../DataEvent */ "./dist/events/DataEvent.js");
48447
+ class ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent extends DataEvent_1.DataEvent {
48448
+ static { this.namespace = "consumption.thirdPartyOwnedRelationshipAttributeDeletedByPeer"; }
48449
+ constructor(eventTargetAddress, data) {
48450
+ super(ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.namespace, eventTargetAddress, data);
48451
+ }
48452
+ }
48453
+ exports.ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent = ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent;
48454
+ //# sourceMappingURL=ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js.map
48455
+
48456
+ /***/ }),
48457
+
48343
48458
  /***/ "./dist/events/consumption/index.js":
48344
48459
  /*!******************************************!*\
48345
48460
  !*** ./dist/events/consumption/index.js ***!
@@ -48375,12 +48490,15 @@ __exportStar(__webpack_require__(/*! ./OutgoingRequestCreatedAndCompletedEvent *
48375
48490
  __exportStar(__webpack_require__(/*! ./OutgoingRequestCreatedEvent */ "./dist/events/consumption/OutgoingRequestCreatedEvent.js"), exports);
48376
48491
  __exportStar(__webpack_require__(/*! ./OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent */ "./dist/events/consumption/OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent.js"), exports);
48377
48492
  __exportStar(__webpack_require__(/*! ./OutgoingRequestStatusChangedEvent */ "./dist/events/consumption/OutgoingRequestStatusChangedEvent.js"), exports);
48493
+ __exportStar(__webpack_require__(/*! ./OwnSharedAttributeDeletedByOwnerEvent */ "./dist/events/consumption/OwnSharedAttributeDeletedByOwnerEvent.js"), exports);
48378
48494
  __exportStar(__webpack_require__(/*! ./OwnSharedAttributeSucceededEvent */ "./dist/events/consumption/OwnSharedAttributeSucceededEvent.js"), exports);
48495
+ __exportStar(__webpack_require__(/*! ./PeerSharedAttributeDeletedByPeerEvent */ "./dist/events/consumption/PeerSharedAttributeDeletedByPeerEvent.js"), exports);
48379
48496
  __exportStar(__webpack_require__(/*! ./PeerSharedAttributeSucceededEvent */ "./dist/events/consumption/PeerSharedAttributeSucceededEvent.js"), exports);
48380
48497
  __exportStar(__webpack_require__(/*! ./RelationshipEvent */ "./dist/events/consumption/RelationshipEvent.js"), exports);
48381
48498
  __exportStar(__webpack_require__(/*! ./RelationshipTemplateProcessedEvent */ "./dist/events/consumption/RelationshipTemplateProcessedEvent.js"), exports);
48382
48499
  __exportStar(__webpack_require__(/*! ./RepositoryAttributeSucceededEvent */ "./dist/events/consumption/RepositoryAttributeSucceededEvent.js"), exports);
48383
48500
  __exportStar(__webpack_require__(/*! ./SuccessionEventData */ "./dist/events/consumption/SuccessionEventData.js"), exports);
48501
+ __exportStar(__webpack_require__(/*! ./ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent */ "./dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js"), exports);
48384
48502
  //# sourceMappingURL=index.js.map
48385
48503
 
48386
48504
  /***/ }),
@@ -49024,7 +49142,7 @@ exports.AttributesFacade = void 0;
49024
49142
  const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "../../node_modules/typescript-ioc/dist/typescript-ioc.js");
49025
49143
  const useCases_1 = __webpack_require__(/*! ../../../useCases */ "./dist/useCases/index.js");
49026
49144
  let AttributesFacade = class AttributesFacade {
49027
- constructor(createRepositoryAttributeUseCase, shareRepositoryAttributeUseCase, getPeerSharedAttributesUseCase, getOwnSharedAttributesUseCase, getRepositoryAttributesUseCase, getAttributeUseCase, getAttributesUseCase, getVersionsOfAttributeUseCase, getSharedVersionsOfRepositoryAttributeUseCase, succeedRepositoryAttributeUseCase, executeIdentityAttributeQueryUseCase, executeRelationshipAttributeQueryUseCase, succeedRelationshipAttributeAndNotifyPeerUseCase, executeThirdPartyRelationshipAttributeQueryUseCase, executeIQLQueryUseCase, validateIQLQueryUseCase, createAndShareRelationshipAttributeUseCase, notifyPeerAboutRepositoryAttributeSuccessionUseCase) {
49145
+ constructor(createRepositoryAttributeUseCase, shareRepositoryAttributeUseCase, getPeerSharedAttributesUseCase, getOwnSharedAttributesUseCase, getRepositoryAttributesUseCase, getAttributeUseCase, getAttributesUseCase, getVersionsOfAttributeUseCase, getSharedVersionsOfRepositoryAttributeUseCase, succeedRepositoryAttributeUseCase, executeIdentityAttributeQueryUseCase, executeRelationshipAttributeQueryUseCase, succeedRelationshipAttributeAndNotifyPeerUseCase, executeThirdPartyRelationshipAttributeQueryUseCase, executeIQLQueryUseCase, validateIQLQueryUseCase, createAndShareRelationshipAttributeUseCase, notifyPeerAboutRepositoryAttributeSuccessionUseCase, deleteOwnSharedAttributeAndNotifyPeerUseCase, deletePeerSharedAttributeAndNotifyOwnerUseCase, deleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase, deleteRepositoryAttributeUseCase) {
49028
49146
  this.createRepositoryAttributeUseCase = createRepositoryAttributeUseCase;
49029
49147
  this.shareRepositoryAttributeUseCase = shareRepositoryAttributeUseCase;
49030
49148
  this.getPeerSharedAttributesUseCase = getPeerSharedAttributesUseCase;
@@ -49043,6 +49161,10 @@ let AttributesFacade = class AttributesFacade {
49043
49161
  this.validateIQLQueryUseCase = validateIQLQueryUseCase;
49044
49162
  this.createAndShareRelationshipAttributeUseCase = createAndShareRelationshipAttributeUseCase;
49045
49163
  this.notifyPeerAboutRepositoryAttributeSuccessionUseCase = notifyPeerAboutRepositoryAttributeSuccessionUseCase;
49164
+ this.deleteOwnSharedAttributeAndNotifyPeerUseCase = deleteOwnSharedAttributeAndNotifyPeerUseCase;
49165
+ this.deletePeerSharedAttributeAndNotifyOwnerUseCase = deletePeerSharedAttributeAndNotifyOwnerUseCase;
49166
+ this.deleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase = deleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase;
49167
+ this.deleteRepositoryAttributeUseCase = deleteRepositoryAttributeUseCase;
49046
49168
  }
49047
49169
  async createRepositoryAttribute(request) {
49048
49170
  return await this.createRepositoryAttributeUseCase.execute(request);
@@ -49098,6 +49220,18 @@ let AttributesFacade = class AttributesFacade {
49098
49220
  async notifyPeerAboutRepositoryAttributeSuccession(request) {
49099
49221
  return await this.notifyPeerAboutRepositoryAttributeSuccessionUseCase.execute(request);
49100
49222
  }
49223
+ async deleteOwnSharedAttributeAndNotifyPeer(request) {
49224
+ return await this.deleteOwnSharedAttributeAndNotifyPeerUseCase.execute(request);
49225
+ }
49226
+ async deletePeerSharedAttributeAndNotifyOwner(request) {
49227
+ return await this.deletePeerSharedAttributeAndNotifyOwnerUseCase.execute(request);
49228
+ }
49229
+ async deleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer(request) {
49230
+ return await this.deleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase.execute(request);
49231
+ }
49232
+ async deleteRepositoryAttribute(request) {
49233
+ return await this.deleteRepositoryAttributeUseCase.execute(request);
49234
+ }
49101
49235
  };
49102
49236
  exports.AttributesFacade = AttributesFacade;
49103
49237
  exports.AttributesFacade = AttributesFacade = __decorate([
@@ -49119,6 +49253,10 @@ exports.AttributesFacade = AttributesFacade = __decorate([
49119
49253
  __param(15, typescript_ioc_1.Inject),
49120
49254
  __param(16, typescript_ioc_1.Inject),
49121
49255
  __param(17, typescript_ioc_1.Inject),
49256
+ __param(18, typescript_ioc_1.Inject),
49257
+ __param(19, typescript_ioc_1.Inject),
49258
+ __param(20, typescript_ioc_1.Inject),
49259
+ __param(21, typescript_ioc_1.Inject),
49122
49260
  __metadata("design:paramtypes", [useCases_1.CreateRepositoryAttributeUseCase,
49123
49261
  useCases_1.ShareRepositoryAttributeUseCase,
49124
49262
  useCases_1.GetPeerSharedAttributesUseCase,
@@ -49136,7 +49274,11 @@ exports.AttributesFacade = AttributesFacade = __decorate([
49136
49274
  useCases_1.ExecuteIQLQueryUseCase,
49137
49275
  useCases_1.ValidateIQLQueryUseCase,
49138
49276
  useCases_1.CreateAndShareRelationshipAttributeUseCase,
49139
- useCases_1.NotifyPeerAboutRepositoryAttributeSuccessionUseCase])
49277
+ useCases_1.NotifyPeerAboutRepositoryAttributeSuccessionUseCase,
49278
+ useCases_1.DeleteOwnSharedAttributeAndNotifyPeerUseCase,
49279
+ useCases_1.DeletePeerSharedAttributeAndNotifyOwnerUseCase,
49280
+ useCases_1.DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase,
49281
+ useCases_1.DeleteRepositoryAttributeUseCase])
49140
49282
  ], AttributesFacade);
49141
49283
  //# sourceMappingURL=AttributesFacade.js.map
49142
49284
 
@@ -51788,8 +51930,17 @@ class Attributes {
51788
51930
  anotherVersionOfRepositoryAttributeHasAlreadyBeenSharedWithPeer(repositoryAttributeId, peer, ownSharedIdentityAttributeId) {
51789
51931
  return new ts_utils_1.ApplicationError("error.runtime.attributes.anotherVersionOfRepositoryAttributeHasAlreadyBeenSharedWithPeer", `Another version of repository attribute '${repositoryAttributeId.toString()}' has already been shared with peer '${peer.toString()}'. ID of previous own shared identity attribute: ${ownSharedIdentityAttributeId.toString()}.`);
51790
51932
  }
51791
- noOtherVersionOfRepositoryAttributeHasBeenSharedWithPeerBefore(repositoryAttributeId, peer) {
51792
- return new ts_utils_1.ApplicationError("error.runtime.attributes.noOtherVersionOfRepositoryAttributeHasBeenSharedWithPeerBefore", `No other version of repository attribute '${repositoryAttributeId.toString()}' has been shared with peer '${peer.toString()}' before. If you wish to execute an initial sharing of this attribute, use 'ShareRepositoryAttribute'.`);
51933
+ noPreviousVersionOfRepositoryAttributeHasBeenSharedWithPeerBefore(repositoryAttributeId, peer) {
51934
+ return new ts_utils_1.ApplicationError("error.runtime.attributes.noPreviousVersionOfRepositoryAttributeHasBeenSharedWithPeerBefore", `No previous version of repository attribute '${repositoryAttributeId.toString()}' has been shared with peer '${peer.toString()}' before. If you wish to execute an initial sharing of this attribute, use 'ShareRepositoryAttribute'.`);
51935
+ }
51936
+ isNotOwnSharedAttribute(attributeId) {
51937
+ return new ts_utils_1.ApplicationError("error.runtime.attributes.isNotOwnSharedAttribute", `Attribute '${attributeId.toString()}' is not an own shared attribute.`);
51938
+ }
51939
+ isNotPeerSharedAttribute(attributeId) {
51940
+ return new ts_utils_1.ApplicationError("error.runtime.attributes.isNotPeerSharedAttribute", `Attribute '${attributeId.toString()}' is not a peer shared attribute.`);
51941
+ }
51942
+ isNotThirdPartyOwnedRelationshipAttribute(attributeId) {
51943
+ return new ts_utils_1.ApplicationError("error.runtime.attributes.isNotThirdPartyOwnedRelationshipAttribute", `Attribute '${attributeId.toString()}' is not a third party owned relationship attribute.`);
51793
51944
  }
51794
51945
  }
51795
51946
  class RuntimeErrors {
@@ -51896,9 +52047,9 @@ exports.JsonSchema = JsonSchema;
51896
52047
  "use strict";
51897
52048
 
51898
52049
  Object.defineProperty(exports, "__esModule", ({ value: true }));
51899
- exports.GetSettingRequest = exports.DeleteSettingRequest = exports.CreateSettingRequest = exports.SentNotificationRequest = exports.ReceivedNotificationRequest = exports.ProcessNotificationByIdRequest = exports.GetNotificationsRequest = exports.GetNotificationRequest = exports.UpdateDraftRequest = exports.GetDraftsRequest = exports.GetDraftRequest = exports.DeleteDraftRequest = exports.CreateDraftRequest = exports.ValidateIQLQueryRequest = exports.SucceedRepositoryAttributeRequest = exports.SucceedRelationshipAttributeAndNotifyPeerRequest = exports.ShareRepositoryAttributeRequest = exports.NotifyPeerAboutRepositoryAttributeSuccessionRequest = exports.GetVersionsOfAttributeRequest = exports.GetSharedVersionsOfRepositoryAttributeRequest = exports.GetRepositoryAttributesRequest = exports.GetPeerSharedAttributesRequest = exports.GetOwnSharedAttributesRequest = exports.GetAttributesRequest = exports.GetAttributeRequest = exports.ExecuteThirdPartyRelationshipAttributeQueryRequest = exports.ExecuteRelationshipAttributeQueryRequest = exports.ExecuteIQLQueryRequest = exports.ExecuteIdentityAttributeQueryRequest = exports.CreateRepositoryAttributeRequest = exports.CreateAndShareRelationshipAttributeRequest = exports.SentOutgoingRequestRequest = exports.RequireManualDecisionOfIncomingRequestRequest = exports.ReceivedIncomingRequestRequest = exports.GetOutgoingRequestsRequest = exports.GetOutgoingRequestRequest = exports.GetIncomingRequestsRequest = exports.GetIncomingRequestRequest = exports.DiscardOutgoingRequestRequest = exports.CreateOutgoingRequestRequest = exports.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest = exports.CompleteOutgoingRequestRequest = exports.CompleteIncomingRequestRequest = exports.CheckPrerequisitesOfIncomingRequestRequest = exports.RejectIncomingRequestRequest = exports.CanCreateOutgoingRequestRequest = exports.AcceptIncomingRequestRequest = exports.GetAttributeListenerRequest = exports.LoadPeerTokenAnonymousByTruncatedReferenceRequest = exports.LoadPeerTokenAnonymousByIdAndKeyRequest = void 0;
51900
- exports.CreateQRCodeForOwnTemplateRequest = exports.CreateOwnRelationshipTemplateRequest = exports.RevokeRelationshipChangeRequest = exports.RejectRelationshipChangeRequest = exports.GetRelationshipsRequest = exports.GetRelationshipByAddressRequest = exports.GetRelationshipRequest = exports.GetAttributesForRelationshipRequest = exports.CreateRelationshipRequest = exports.AcceptRelationshipChangeRequest = exports.SendMessageRequest = exports.MarkMessageAsUnreadRequest = exports.MarkMessageAsReadRequest = exports.GetMessagesRequest = exports.GetMessageRequest = exports.GetAttachmentMetadataRequest = exports.CheckIdentityRequest = exports.UploadOwnFileValidatableRequest = exports.UploadOwnFileRequest = exports.GetOrLoadFileRequest = exports.GetOrLoadFileViaReferenceRequest = exports.GetOrLoadFileViaSecretRequest = exports.GetFilesRequest = exports.GetFileRequest = exports.CreateTokenQRCodeForFileRequest = exports.CreateTokenForFileRequest = exports.CreateQRCodeForFileRequest = exports.UpdateDeviceRequest = exports.GetDeviceOnboardingInfoRequest = exports.GetDeviceRequest = exports.DeleteDeviceRequest = exports.CreateDeviceOnboardingTokenRequest = exports.CreateDeviceRequest = exports.ValidateChallengeRequest = exports.CreateChallengeRequest = exports.isCreateDeviceChallengeRequest = exports.CreateDeviceChallengeRequest = exports.isCreateIdentityChallengeRequest = exports.CreateIdentityChallengeRequest = exports.isCreateRelationshipChallengeRequest = exports.CreateRelationshipChallengeRequest = exports.SyncEverythingRequest = exports.DownloadAttachmentRequest = exports.SyncDatawalletRequest = exports.RegisterPushNotificationTokenRequest = exports.LoadItemFromTruncatedReferenceRequest = exports.DownloadFileRequest = exports.UpdateSettingRequest = exports.GetSettingsRequest = exports.GetSettingByKeyRequest = void 0;
51901
- exports.LoadPeerTokenRequest = exports.LoadPeerTokenViaSecretRequest = exports.LoadPeerTokenViaReferenceRequest = exports.GetTokensRequest = exports.GetTokenRequest = exports.GetQRCodeForTokenRequest = exports.CreateOwnTokenRequest = exports.LoadPeerRelationshipTemplateRequest = exports.LoadPeerRelationshipTemplateViaReferenceRequest = exports.LoadPeerRelationshipTemplateViaSecretRequest = exports.GetRelationshipTemplatesRequest = exports.GetRelationshipTemplateRequest = exports.CreateTokenQRCodeForOwnTemplateRequest = exports.CreateTokenForOwnTemplateRequest = void 0;
52050
+ exports.ReceivedNotificationRequest = exports.ProcessNotificationByIdRequest = exports.GetNotificationsRequest = exports.GetNotificationRequest = exports.UpdateDraftRequest = exports.GetDraftsRequest = exports.GetDraftRequest = exports.DeleteDraftRequest = exports.CreateDraftRequest = exports.ValidateIQLQueryRequest = exports.SucceedRepositoryAttributeRequest = exports.SucceedRelationshipAttributeAndNotifyPeerRequest = exports.ShareRepositoryAttributeRequest = exports.NotifyPeerAboutRepositoryAttributeSuccessionRequest = exports.GetVersionsOfAttributeRequest = exports.GetSharedVersionsOfRepositoryAttributeRequest = exports.GetRepositoryAttributesRequest = exports.GetPeerSharedAttributesRequest = exports.GetOwnSharedAttributesRequest = exports.GetAttributesRequest = exports.GetAttributeRequest = exports.ExecuteThirdPartyRelationshipAttributeQueryRequest = exports.ExecuteRelationshipAttributeQueryRequest = exports.ExecuteIQLQueryRequest = exports.ExecuteIdentityAttributeQueryRequest = exports.DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerRequest = exports.DeleteRepositoryAttributeRequest = exports.DeletePeerSharedAttributeAndNotifyOwnerRequest = exports.DeleteOwnSharedAttributeAndNotifyPeerRequest = exports.CreateRepositoryAttributeRequest = exports.CreateAndShareRelationshipAttributeRequest = exports.SentOutgoingRequestRequest = exports.RequireManualDecisionOfIncomingRequestRequest = exports.ReceivedIncomingRequestRequest = exports.GetOutgoingRequestsRequest = exports.GetOutgoingRequestRequest = exports.GetIncomingRequestsRequest = exports.GetIncomingRequestRequest = exports.DiscardOutgoingRequestRequest = exports.CreateOutgoingRequestRequest = exports.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest = exports.CompleteOutgoingRequestRequest = exports.CompleteIncomingRequestRequest = exports.CheckPrerequisitesOfIncomingRequestRequest = exports.RejectIncomingRequestRequest = exports.CanCreateOutgoingRequestRequest = exports.AcceptIncomingRequestRequest = exports.GetAttributeListenerRequest = exports.LoadPeerTokenAnonymousByTruncatedReferenceRequest = exports.LoadPeerTokenAnonymousByIdAndKeyRequest = void 0;
52051
+ exports.GetRelationshipsRequest = exports.GetRelationshipByAddressRequest = exports.GetRelationshipRequest = exports.GetAttributesForRelationshipRequest = exports.CreateRelationshipRequest = exports.AcceptRelationshipChangeRequest = exports.SendMessageRequest = exports.MarkMessageAsUnreadRequest = exports.MarkMessageAsReadRequest = exports.GetMessagesRequest = exports.GetMessageRequest = exports.GetAttachmentMetadataRequest = exports.CheckIdentityRequest = exports.UploadOwnFileValidatableRequest = exports.UploadOwnFileRequest = exports.GetOrLoadFileRequest = exports.GetOrLoadFileViaReferenceRequest = exports.GetOrLoadFileViaSecretRequest = exports.GetFilesRequest = exports.GetFileRequest = exports.CreateTokenQRCodeForFileRequest = exports.CreateTokenForFileRequest = exports.CreateQRCodeForFileRequest = exports.UpdateDeviceRequest = exports.GetDeviceOnboardingInfoRequest = exports.GetDeviceRequest = exports.DeleteDeviceRequest = exports.CreateDeviceOnboardingTokenRequest = exports.CreateDeviceRequest = exports.ValidateChallengeRequest = exports.CreateChallengeRequest = exports.isCreateDeviceChallengeRequest = exports.CreateDeviceChallengeRequest = exports.isCreateIdentityChallengeRequest = exports.CreateIdentityChallengeRequest = exports.isCreateRelationshipChallengeRequest = exports.CreateRelationshipChallengeRequest = exports.SyncEverythingRequest = exports.DownloadAttachmentRequest = exports.SyncDatawalletRequest = exports.RegisterPushNotificationTokenRequest = exports.LoadItemFromTruncatedReferenceRequest = exports.DownloadFileRequest = exports.UpdateSettingRequest = exports.GetSettingsRequest = exports.GetSettingByKeyRequest = exports.GetSettingRequest = exports.DeleteSettingRequest = exports.CreateSettingRequest = exports.SentNotificationRequest = void 0;
52052
+ exports.LoadPeerTokenRequest = exports.LoadPeerTokenViaSecretRequest = exports.LoadPeerTokenViaReferenceRequest = exports.GetTokensRequest = exports.GetTokenRequest = exports.GetQRCodeForTokenRequest = exports.CreateOwnTokenRequest = exports.LoadPeerRelationshipTemplateRequest = exports.LoadPeerRelationshipTemplateViaReferenceRequest = exports.LoadPeerRelationshipTemplateViaSecretRequest = exports.GetRelationshipTemplatesRequest = exports.GetRelationshipTemplateRequest = exports.CreateTokenQRCodeForOwnTemplateRequest = exports.CreateTokenForOwnTemplateRequest = exports.CreateQRCodeForOwnTemplateRequest = exports.CreateOwnRelationshipTemplateRequest = exports.RevokeRelationshipChangeRequest = exports.RejectRelationshipChangeRequest = void 0;
51902
52053
  exports.LoadPeerTokenAnonymousByIdAndKeyRequest = {
51903
52054
  "$schema": "http://json-schema.org/draft-07/schema#",
51904
52055
  "$ref": "#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",
@@ -67690,6 +67841,94 @@ exports.CreateRepositoryAttributeRequest = {
67690
67841
  }
67691
67842
  }
67692
67843
  };
67844
+ exports.DeleteOwnSharedAttributeAndNotifyPeerRequest = {
67845
+ "$schema": "http://json-schema.org/draft-07/schema#",
67846
+ "$ref": "#/definitions/DeleteOwnSharedAttributeAndNotifyPeerRequest",
67847
+ "definitions": {
67848
+ "DeleteOwnSharedAttributeAndNotifyPeerRequest": {
67849
+ "type": "object",
67850
+ "properties": {
67851
+ "attributeId": {
67852
+ "$ref": "#/definitions/AttributeIdString"
67853
+ }
67854
+ },
67855
+ "required": [
67856
+ "attributeId"
67857
+ ],
67858
+ "additionalProperties": false
67859
+ },
67860
+ "AttributeIdString": {
67861
+ "type": "string",
67862
+ "pattern": "ATT[A-Za-z0-9]{17}"
67863
+ }
67864
+ }
67865
+ };
67866
+ exports.DeletePeerSharedAttributeAndNotifyOwnerRequest = {
67867
+ "$schema": "http://json-schema.org/draft-07/schema#",
67868
+ "$ref": "#/definitions/DeletePeerSharedAttributeAndNotifyOwnerRequest",
67869
+ "definitions": {
67870
+ "DeletePeerSharedAttributeAndNotifyOwnerRequest": {
67871
+ "type": "object",
67872
+ "properties": {
67873
+ "attributeId": {
67874
+ "$ref": "#/definitions/AttributeIdString"
67875
+ }
67876
+ },
67877
+ "required": [
67878
+ "attributeId"
67879
+ ],
67880
+ "additionalProperties": false
67881
+ },
67882
+ "AttributeIdString": {
67883
+ "type": "string",
67884
+ "pattern": "ATT[A-Za-z0-9]{17}"
67885
+ }
67886
+ }
67887
+ };
67888
+ exports.DeleteRepositoryAttributeRequest = {
67889
+ "$schema": "http://json-schema.org/draft-07/schema#",
67890
+ "$ref": "#/definitions/DeleteRepositoryAttributeRequest",
67891
+ "definitions": {
67892
+ "DeleteRepositoryAttributeRequest": {
67893
+ "type": "object",
67894
+ "properties": {
67895
+ "attributeId": {
67896
+ "$ref": "#/definitions/AttributeIdString"
67897
+ }
67898
+ },
67899
+ "required": [
67900
+ "attributeId"
67901
+ ],
67902
+ "additionalProperties": false
67903
+ },
67904
+ "AttributeIdString": {
67905
+ "type": "string",
67906
+ "pattern": "ATT[A-Za-z0-9]{17}"
67907
+ }
67908
+ }
67909
+ };
67910
+ exports.DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerRequest = {
67911
+ "$schema": "http://json-schema.org/draft-07/schema#",
67912
+ "$ref": "#/definitions/DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerRequest",
67913
+ "definitions": {
67914
+ "DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerRequest": {
67915
+ "type": "object",
67916
+ "properties": {
67917
+ "attributeId": {
67918
+ "$ref": "#/definitions/AttributeIdString"
67919
+ }
67920
+ },
67921
+ "required": [
67922
+ "attributeId"
67923
+ ],
67924
+ "additionalProperties": false
67925
+ },
67926
+ "AttributeIdString": {
67927
+ "type": "string",
67928
+ "pattern": "ATT[A-Za-z0-9]{17}"
67929
+ }
67930
+ }
67931
+ };
67693
67932
  exports.ExecuteIdentityAttributeQueryRequest = {
67694
67933
  "$schema": "http://json-schema.org/draft-07/schema#",
67695
67934
  "$ref": "#/definitions/ExecuteIdentityAttributeQueryRequest",
@@ -68418,6 +68657,45 @@ exports.GetAttributesRequest = {
68418
68657
  }
68419
68658
  }
68420
68659
  ]
68660
+ },
68661
+ "deletionInfo": {
68662
+ "anyOf": [
68663
+ {
68664
+ "type": "string"
68665
+ },
68666
+ {
68667
+ "type": "array",
68668
+ "items": {
68669
+ "type": "string"
68670
+ }
68671
+ }
68672
+ ]
68673
+ },
68674
+ "deletionInfo.deletionStatus": {
68675
+ "anyOf": [
68676
+ {
68677
+ "type": "string"
68678
+ },
68679
+ {
68680
+ "type": "array",
68681
+ "items": {
68682
+ "type": "string"
68683
+ }
68684
+ }
68685
+ ]
68686
+ },
68687
+ "deletionInfo.deletionDate": {
68688
+ "anyOf": [
68689
+ {
68690
+ "type": "string"
68691
+ },
68692
+ {
68693
+ "type": "array",
68694
+ "items": {
68695
+ "type": "string"
68696
+ }
68697
+ }
68698
+ ]
68421
68699
  }
68422
68700
  },
68423
68701
  "additionalProperties": false
@@ -68618,6 +68896,45 @@ exports.GetOwnSharedAttributesRequest = {
68618
68896
  }
68619
68897
  }
68620
68898
  ]
68899
+ },
68900
+ "deletionInfo": {
68901
+ "anyOf": [
68902
+ {
68903
+ "type": "string"
68904
+ },
68905
+ {
68906
+ "type": "array",
68907
+ "items": {
68908
+ "type": "string"
68909
+ }
68910
+ }
68911
+ ]
68912
+ },
68913
+ "deletionInfo.deletionStatus": {
68914
+ "anyOf": [
68915
+ {
68916
+ "type": "string"
68917
+ },
68918
+ {
68919
+ "type": "array",
68920
+ "items": {
68921
+ "type": "string"
68922
+ }
68923
+ }
68924
+ ]
68925
+ },
68926
+ "deletionInfo.deletionDate": {
68927
+ "anyOf": [
68928
+ {
68929
+ "type": "string"
68930
+ },
68931
+ {
68932
+ "type": "array",
68933
+ "items": {
68934
+ "type": "string"
68935
+ }
68936
+ }
68937
+ ]
68621
68938
  }
68622
68939
  },
68623
68940
  "additionalProperties": false
@@ -68805,6 +69122,45 @@ exports.GetPeerSharedAttributesRequest = {
68805
69122
  }
68806
69123
  }
68807
69124
  ]
69125
+ },
69126
+ "deletionInfo": {
69127
+ "anyOf": [
69128
+ {
69129
+ "type": "string"
69130
+ },
69131
+ {
69132
+ "type": "array",
69133
+ "items": {
69134
+ "type": "string"
69135
+ }
69136
+ }
69137
+ ]
69138
+ },
69139
+ "deletionInfo.deletionStatus": {
69140
+ "anyOf": [
69141
+ {
69142
+ "type": "string"
69143
+ },
69144
+ {
69145
+ "type": "array",
69146
+ "items": {
69147
+ "type": "string"
69148
+ }
69149
+ }
69150
+ ]
69151
+ },
69152
+ "deletionInfo.deletionDate": {
69153
+ "anyOf": [
69154
+ {
69155
+ "type": "string"
69156
+ },
69157
+ {
69158
+ "type": "array",
69159
+ "items": {
69160
+ "type": "string"
69161
+ }
69162
+ }
69163
+ ]
68808
69164
  }
68809
69165
  },
68810
69166
  "additionalProperties": false
@@ -68885,10 +69241,49 @@ exports.GetRepositoryAttributesRequest = {
68885
69241
  }
68886
69242
  }
68887
69243
  ]
68888
- }
68889
- },
68890
- "additionalProperties": false
68891
- }
69244
+ },
69245
+ "deletionInfo": {
69246
+ "anyOf": [
69247
+ {
69248
+ "type": "string"
69249
+ },
69250
+ {
69251
+ "type": "array",
69252
+ "items": {
69253
+ "type": "string"
69254
+ }
69255
+ }
69256
+ ]
69257
+ },
69258
+ "deletionInfo.deletionStatus": {
69259
+ "anyOf": [
69260
+ {
69261
+ "type": "string"
69262
+ },
69263
+ {
69264
+ "type": "array",
69265
+ "items": {
69266
+ "type": "string"
69267
+ }
69268
+ }
69269
+ ]
69270
+ },
69271
+ "deletionInfo.deletionDate": {
69272
+ "anyOf": [
69273
+ {
69274
+ "type": "string"
69275
+ },
69276
+ {
69277
+ "type": "array",
69278
+ "items": {
69279
+ "type": "string"
69280
+ }
69281
+ }
69282
+ ]
69283
+ }
69284
+ },
69285
+ "additionalProperties": false
69286
+ }
68892
69287
  }
68893
69288
  };
68894
69289
  exports.GetSharedVersionsOfRepositoryAttributeRequest = {
@@ -74300,7 +74695,8 @@ class AttributeMapper {
74300
74695
  createdAt: attribute.createdAt.toString(),
74301
74696
  succeeds: attribute.succeeds?.toString(),
74302
74697
  succeededBy: attribute.succeededBy?.toString(),
74303
- shareInfo: attribute.shareInfo?.toJSON()
74698
+ shareInfo: attribute.shareInfo?.toJSON(),
74699
+ deletionInfo: attribute.deletionInfo?.toJSON()
74304
74700
  };
74305
74701
  }
74306
74702
  static toAttributeDTOList(attributes) {
@@ -74468,6 +74864,342 @@ exports.CreateRepositoryAttributeUseCase = CreateRepositoryAttributeUseCase = __
74468
74864
 
74469
74865
  /***/ }),
74470
74866
 
74867
+ /***/ "./dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.js":
74868
+ /*!***************************************************************************************!*\
74869
+ !*** ./dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.js ***!
74870
+ \***************************************************************************************/
74871
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
74872
+
74873
+ "use strict";
74874
+
74875
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
74876
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
74877
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
74878
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
74879
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
74880
+ };
74881
+ var __metadata = (this && this.__metadata) || function (k, v) {
74882
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
74883
+ };
74884
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
74885
+ return function (target, key) { decorator(target, key, paramIndex); }
74886
+ };
74887
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
74888
+ exports.DeleteOwnSharedAttributeAndNotifyPeerUseCase = void 0;
74889
+ const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "../../node_modules/@js-soft/ts-utils/dist/index.js");
74890
+ const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
74891
+ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
74892
+ const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
74893
+ const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "../../node_modules/typescript-ioc/dist/typescript-ioc.js");
74894
+ const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
74895
+ let Validator = class Validator extends common_1.SchemaValidator {
74896
+ constructor(schemaRepository) {
74897
+ super(schemaRepository.getSchema("DeleteOwnSharedAttributeAndNotifyPeerRequest"));
74898
+ }
74899
+ };
74900
+ Validator = __decorate([
74901
+ __param(0, typescript_ioc_1.Inject),
74902
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
74903
+ ], Validator);
74904
+ let DeleteOwnSharedAttributeAndNotifyPeerUseCase = class DeleteOwnSharedAttributeAndNotifyPeerUseCase extends common_1.UseCase {
74905
+ constructor(attributesController, accountController, messageController, validator) {
74906
+ super(validator);
74907
+ this.attributesController = attributesController;
74908
+ this.accountController = accountController;
74909
+ this.messageController = messageController;
74910
+ }
74911
+ async executeInternal(request) {
74912
+ const ownSharedAttributeId = transport_1.CoreId.from(request.attributeId);
74913
+ const ownSharedAttribute = await this.attributesController.getLocalAttribute(ownSharedAttributeId);
74914
+ if (typeof ownSharedAttribute === "undefined") {
74915
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(consumption_1.LocalAttribute));
74916
+ }
74917
+ if (!ownSharedAttribute.isOwnSharedAttribute(this.accountController.identity.address)) {
74918
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.attributes.isNotOwnSharedAttribute(ownSharedAttributeId));
74919
+ }
74920
+ const validationResult = await this.attributesController.validateFullAttributeDeletionProcess(ownSharedAttribute);
74921
+ if (validationResult.isError()) {
74922
+ return ts_utils_1.Result.fail(validationResult.error);
74923
+ }
74924
+ await this.attributesController.executeFullAttributeDeletionProcess(ownSharedAttribute);
74925
+ const notificationId = await consumption_1.ConsumptionIds.notification.generate();
74926
+ const notificationItem = content_1.OwnSharedAttributeDeletedByOwnerNotificationItem.from({ attributeId: ownSharedAttributeId });
74927
+ const notification = content_1.Notification.from({
74928
+ id: notificationId,
74929
+ items: [notificationItem]
74930
+ });
74931
+ await this.messageController.sendMessage({
74932
+ recipients: [ownSharedAttribute.shareInfo.peer],
74933
+ content: notification
74934
+ });
74935
+ await this.accountController.syncDatawallet();
74936
+ const result = { notificationId: notificationId.toString() };
74937
+ return ts_utils_1.Result.ok(result);
74938
+ }
74939
+ };
74940
+ exports.DeleteOwnSharedAttributeAndNotifyPeerUseCase = DeleteOwnSharedAttributeAndNotifyPeerUseCase;
74941
+ exports.DeleteOwnSharedAttributeAndNotifyPeerUseCase = DeleteOwnSharedAttributeAndNotifyPeerUseCase = __decorate([
74942
+ __param(0, typescript_ioc_1.Inject),
74943
+ __param(1, typescript_ioc_1.Inject),
74944
+ __param(2, typescript_ioc_1.Inject),
74945
+ __param(3, typescript_ioc_1.Inject),
74946
+ __metadata("design:paramtypes", [consumption_1.AttributesController,
74947
+ transport_1.AccountController,
74948
+ transport_1.MessageController,
74949
+ Validator])
74950
+ ], DeleteOwnSharedAttributeAndNotifyPeerUseCase);
74951
+ //# sourceMappingURL=DeleteOwnSharedAttributeAndNotifyPeer.js.map
74952
+
74953
+ /***/ }),
74954
+
74955
+ /***/ "./dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.js":
74956
+ /*!*****************************************************************************************!*\
74957
+ !*** ./dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.js ***!
74958
+ \*****************************************************************************************/
74959
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
74960
+
74961
+ "use strict";
74962
+
74963
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
74964
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
74965
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
74966
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
74967
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
74968
+ };
74969
+ var __metadata = (this && this.__metadata) || function (k, v) {
74970
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
74971
+ };
74972
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
74973
+ return function (target, key) { decorator(target, key, paramIndex); }
74974
+ };
74975
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
74976
+ exports.DeletePeerSharedAttributeAndNotifyOwnerUseCase = void 0;
74977
+ const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "../../node_modules/@js-soft/ts-utils/dist/index.js");
74978
+ const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
74979
+ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
74980
+ const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
74981
+ const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "../../node_modules/typescript-ioc/dist/typescript-ioc.js");
74982
+ const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
74983
+ let Validator = class Validator extends common_1.SchemaValidator {
74984
+ constructor(schemaRepository) {
74985
+ super(schemaRepository.getSchema("DeletePeerSharedAttributeAndNotifyOwnerRequest"));
74986
+ }
74987
+ };
74988
+ Validator = __decorate([
74989
+ __param(0, typescript_ioc_1.Inject),
74990
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
74991
+ ], Validator);
74992
+ let DeletePeerSharedAttributeAndNotifyOwnerUseCase = class DeletePeerSharedAttributeAndNotifyOwnerUseCase extends common_1.UseCase {
74993
+ constructor(attributesController, accountController, messageController, validator) {
74994
+ super(validator);
74995
+ this.attributesController = attributesController;
74996
+ this.accountController = accountController;
74997
+ this.messageController = messageController;
74998
+ }
74999
+ async executeInternal(request) {
75000
+ const peerSharedAttributeId = transport_1.CoreId.from(request.attributeId);
75001
+ const peerSharedAttribute = await this.attributesController.getLocalAttribute(peerSharedAttributeId);
75002
+ if (typeof peerSharedAttribute === "undefined") {
75003
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(consumption_1.LocalAttribute));
75004
+ }
75005
+ if (!peerSharedAttribute.isPeerSharedAttribute(peerSharedAttribute.shareInfo?.peer)) {
75006
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.attributes.isNotPeerSharedAttribute(peerSharedAttributeId));
75007
+ }
75008
+ const validationResult = await this.attributesController.validateFullAttributeDeletionProcess(peerSharedAttribute);
75009
+ if (validationResult.isError()) {
75010
+ return ts_utils_1.Result.fail(validationResult.error);
75011
+ }
75012
+ await this.attributesController.executeFullAttributeDeletionProcess(peerSharedAttribute);
75013
+ const notificationId = await consumption_1.ConsumptionIds.notification.generate();
75014
+ const notificationItem = content_1.PeerSharedAttributeDeletedByPeerNotificationItem.from({ attributeId: peerSharedAttributeId });
75015
+ const notification = content_1.Notification.from({
75016
+ id: notificationId,
75017
+ items: [notificationItem]
75018
+ });
75019
+ await this.messageController.sendMessage({
75020
+ recipients: [peerSharedAttribute.shareInfo.peer],
75021
+ content: notification
75022
+ });
75023
+ await this.accountController.syncDatawallet();
75024
+ const result = { notificationId: notificationId.toString() };
75025
+ return ts_utils_1.Result.ok(result);
75026
+ }
75027
+ };
75028
+ exports.DeletePeerSharedAttributeAndNotifyOwnerUseCase = DeletePeerSharedAttributeAndNotifyOwnerUseCase;
75029
+ exports.DeletePeerSharedAttributeAndNotifyOwnerUseCase = DeletePeerSharedAttributeAndNotifyOwnerUseCase = __decorate([
75030
+ __param(0, typescript_ioc_1.Inject),
75031
+ __param(1, typescript_ioc_1.Inject),
75032
+ __param(2, typescript_ioc_1.Inject),
75033
+ __param(3, typescript_ioc_1.Inject),
75034
+ __metadata("design:paramtypes", [consumption_1.AttributesController,
75035
+ transport_1.AccountController,
75036
+ transport_1.MessageController,
75037
+ Validator])
75038
+ ], DeletePeerSharedAttributeAndNotifyOwnerUseCase);
75039
+ //# sourceMappingURL=DeletePeerSharedAttributeAndNotifyOwner.js.map
75040
+
75041
+ /***/ }),
75042
+
75043
+ /***/ "./dist/useCases/consumption/attributes/DeleteRepositoryAttribute.js":
75044
+ /*!***************************************************************************!*\
75045
+ !*** ./dist/useCases/consumption/attributes/DeleteRepositoryAttribute.js ***!
75046
+ \***************************************************************************/
75047
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
75048
+
75049
+ "use strict";
75050
+
75051
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
75052
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
75053
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
75054
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
75055
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
75056
+ };
75057
+ var __metadata = (this && this.__metadata) || function (k, v) {
75058
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
75059
+ };
75060
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
75061
+ return function (target, key) { decorator(target, key, paramIndex); }
75062
+ };
75063
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
75064
+ exports.DeleteRepositoryAttributeUseCase = void 0;
75065
+ const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "../../node_modules/@js-soft/ts-utils/dist/index.js");
75066
+ const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
75067
+ const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
75068
+ const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "../../node_modules/typescript-ioc/dist/typescript-ioc.js");
75069
+ const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
75070
+ let Validator = class Validator extends common_1.SchemaValidator {
75071
+ constructor(schemaRepository) {
75072
+ super(schemaRepository.getSchema("DeleteRepositoryAttributeRequest"));
75073
+ }
75074
+ };
75075
+ Validator = __decorate([
75076
+ __param(0, typescript_ioc_1.Inject),
75077
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
75078
+ ], Validator);
75079
+ let DeleteRepositoryAttributeUseCase = class DeleteRepositoryAttributeUseCase extends common_1.UseCase {
75080
+ constructor(attributesController, accountController, validator) {
75081
+ super(validator);
75082
+ this.attributesController = attributesController;
75083
+ this.accountController = accountController;
75084
+ }
75085
+ async executeInternal(request) {
75086
+ const repositoryAttribute = await this.attributesController.getLocalAttribute(transport_1.CoreId.from(request.attributeId));
75087
+ if (typeof repositoryAttribute === "undefined") {
75088
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(consumption_1.LocalAttribute));
75089
+ }
75090
+ if (!repositoryAttribute.isRepositoryAttribute(this.accountController.identity.address)) {
75091
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.attributes.isNotRepositoryAttribute(transport_1.CoreId.from(request.attributeId)));
75092
+ }
75093
+ const validationResult = await this.attributesController.validateFullAttributeDeletionProcess(repositoryAttribute);
75094
+ if (validationResult.isError()) {
75095
+ return ts_utils_1.Result.fail(validationResult.error);
75096
+ }
75097
+ await this.attributesController.executeFullAttributeDeletionProcess(repositoryAttribute);
75098
+ await this.accountController.syncDatawallet();
75099
+ return ts_utils_1.Result.ok(undefined);
75100
+ }
75101
+ };
75102
+ exports.DeleteRepositoryAttributeUseCase = DeleteRepositoryAttributeUseCase;
75103
+ exports.DeleteRepositoryAttributeUseCase = DeleteRepositoryAttributeUseCase = __decorate([
75104
+ __param(0, typescript_ioc_1.Inject),
75105
+ __param(1, typescript_ioc_1.Inject),
75106
+ __param(2, typescript_ioc_1.Inject),
75107
+ __metadata("design:paramtypes", [consumption_1.AttributesController,
75108
+ transport_1.AccountController,
75109
+ Validator])
75110
+ ], DeleteRepositoryAttributeUseCase);
75111
+ //# sourceMappingURL=DeleteRepositoryAttribute.js.map
75112
+
75113
+ /***/ }),
75114
+
75115
+ /***/ "./dist/useCases/consumption/attributes/DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer.js":
75116
+ /*!*********************************************************************************************************!*\
75117
+ !*** ./dist/useCases/consumption/attributes/DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer.js ***!
75118
+ \*********************************************************************************************************/
75119
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
75120
+
75121
+ "use strict";
75122
+
75123
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
75124
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
75125
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
75126
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
75127
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
75128
+ };
75129
+ var __metadata = (this && this.__metadata) || function (k, v) {
75130
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
75131
+ };
75132
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
75133
+ return function (target, key) { decorator(target, key, paramIndex); }
75134
+ };
75135
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
75136
+ exports.DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase = void 0;
75137
+ const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "../../node_modules/@js-soft/ts-utils/dist/index.js");
75138
+ const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
75139
+ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
75140
+ const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
75141
+ const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "../../node_modules/typescript-ioc/dist/typescript-ioc.js");
75142
+ const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
75143
+ let Validator = class Validator extends common_1.SchemaValidator {
75144
+ constructor(schemaRepository) {
75145
+ super(schemaRepository.getSchema("DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerRequest"));
75146
+ }
75147
+ };
75148
+ Validator = __decorate([
75149
+ __param(0, typescript_ioc_1.Inject),
75150
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
75151
+ ], Validator);
75152
+ let DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase = class DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase extends common_1.UseCase {
75153
+ constructor(attributesController, accountController, messageController, validator) {
75154
+ super(validator);
75155
+ this.attributesController = attributesController;
75156
+ this.accountController = accountController;
75157
+ this.messageController = messageController;
75158
+ }
75159
+ async executeInternal(request) {
75160
+ const thirdPartyOwnedRelationshipAttributeId = transport_1.CoreId.from(request.attributeId);
75161
+ const thirdPartyOwnedRelationshipAttribute = await this.attributesController.getLocalAttribute(thirdPartyOwnedRelationshipAttributeId);
75162
+ if (typeof thirdPartyOwnedRelationshipAttribute === "undefined") {
75163
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(consumption_1.LocalAttribute));
75164
+ }
75165
+ if (!thirdPartyOwnedRelationshipAttribute.isThirdPartyOwnedAttribute(this.accountController.identity.address)) {
75166
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.attributes.isNotThirdPartyOwnedRelationshipAttribute(thirdPartyOwnedRelationshipAttributeId));
75167
+ }
75168
+ const validationResult = await this.attributesController.validateFullAttributeDeletionProcess(thirdPartyOwnedRelationshipAttribute);
75169
+ if (validationResult.isError()) {
75170
+ return ts_utils_1.Result.fail(validationResult.error);
75171
+ }
75172
+ await this.attributesController.executeFullAttributeDeletionProcess(thirdPartyOwnedRelationshipAttribute);
75173
+ const notificationId = await consumption_1.ConsumptionIds.notification.generate();
75174
+ const notificationItem = content_1.ThirdPartyOwnedRelationshipAttributeDeletedByPeerNotificationItem.from({ attributeId: thirdPartyOwnedRelationshipAttributeId });
75175
+ const notification = content_1.Notification.from({
75176
+ id: notificationId,
75177
+ items: [notificationItem]
75178
+ });
75179
+ await this.messageController.sendMessage({
75180
+ recipients: [thirdPartyOwnedRelationshipAttribute.shareInfo.peer],
75181
+ content: notification
75182
+ });
75183
+ await this.accountController.syncDatawallet();
75184
+ const result = { notificationId: notificationId.toString() };
75185
+ return ts_utils_1.Result.ok(result);
75186
+ }
75187
+ };
75188
+ exports.DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase = DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase;
75189
+ exports.DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase = DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase = __decorate([
75190
+ __param(0, typescript_ioc_1.Inject),
75191
+ __param(1, typescript_ioc_1.Inject),
75192
+ __param(2, typescript_ioc_1.Inject),
75193
+ __param(3, typescript_ioc_1.Inject),
75194
+ __metadata("design:paramtypes", [consumption_1.AttributesController,
75195
+ transport_1.AccountController,
75196
+ transport_1.MessageController,
75197
+ Validator])
75198
+ ], DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerUseCase);
75199
+ //# sourceMappingURL=DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer.js.map
75200
+
75201
+ /***/ }),
75202
+
74471
75203
  /***/ "./dist/useCases/consumption/attributes/ExecuteIQLQuery.js":
74472
75204
  /*!*****************************************************************!*\
74473
75205
  !*** ./dist/useCases/consumption/attributes/ExecuteIQLQuery.js ***!
@@ -74790,7 +75522,11 @@ let GetAttributesUseCase = class GetAttributesUseCase extends common_1.UseCase {
74790
75522
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: true,
74791
75523
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`]: true,
74792
75524
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.notificationReference)}`]: true,
74793
- [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: true
75525
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: true,
75526
+ // deletionInfo
75527
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.deletionInfo)}`]: true,
75528
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.deletionInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.deletionStatus)}`]: true,
75529
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.deletionInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.deletionDate)}`]: true
74794
75530
  },
74795
75531
  alias: {
74796
75532
  [(0, ts_simple_nameof_1.nameof)((x) => x.createdAt)]: (0, ts_simple_nameof_1.nameof)((x) => x.createdAt),
@@ -74809,12 +75545,16 @@ let GetAttributesUseCase = class GetAttributesUseCase extends common_1.UseCase {
74809
75545
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`,
74810
75546
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`,
74811
75547
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`,
74812
- // content.shareInfo
75548
+ // shareInfo
74813
75549
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}`,
74814
75550
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`,
74815
75551
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`,
74816
75552
  [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.notificationReference)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.notificationReference)}`,
74817
- [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`
75553
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`,
75554
+ // deletionInfo
75555
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.deletionInfo)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.deletionInfo)}`,
75556
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.deletionInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.deletionStatus)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.deletionInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.deletionStatus)}`,
75557
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.deletionInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.deletionDate)}`]: `${(0, ts_simple_nameof_1.nameof)((x) => x.deletionInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.deletionDate)}`
74818
75558
  },
74819
75559
  custom: {
74820
75560
  // content.validFrom
@@ -75265,7 +76005,7 @@ let NotifyPeerAboutRepositoryAttributeSuccessionUseCase = class NotifyPeerAboutR
75265
76005
  }
75266
76006
  const candidatePredecessors = await this.attributeController.getSharedVersionsOfRepositoryAttribute(repositoryAttributeSuccessorId, [transport_1.CoreAddress.from(request.peer)]);
75267
76007
  if (candidatePredecessors.length === 0) {
75268
- return ts_utils_1.Result.fail(common_1.RuntimeErrors.attributes.noOtherVersionOfRepositoryAttributeHasBeenSharedWithPeerBefore(repositoryAttributeSuccessorId, request.peer));
76008
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.attributes.noPreviousVersionOfRepositoryAttributeHasBeenSharedWithPeerBefore(repositoryAttributeSuccessorId, request.peer));
75269
76009
  }
75270
76010
  if (candidatePredecessors[0].shareInfo?.sourceAttribute?.toString() === request.attributeId) {
75271
76011
  return ts_utils_1.Result.fail(common_1.RuntimeErrors.attributes.repositoryAttributeHasAlreadyBeenSharedWithPeer(request.attributeId, request.peer, candidatePredecessors[0].id));
@@ -75701,6 +76441,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
75701
76441
  __exportStar(__webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consumption/attributes/AttributeMapper.js"), exports);
75702
76442
  __exportStar(__webpack_require__(/*! ./CreateAndShareRelationshipAttribute */ "./dist/useCases/consumption/attributes/CreateAndShareRelationshipAttribute.js"), exports);
75703
76443
  __exportStar(__webpack_require__(/*! ./CreateRepositoryAttribute */ "./dist/useCases/consumption/attributes/CreateRepositoryAttribute.js"), exports);
76444
+ __exportStar(__webpack_require__(/*! ./DeleteOwnSharedAttributeAndNotifyPeer */ "./dist/useCases/consumption/attributes/DeleteOwnSharedAttributeAndNotifyPeer.js"), exports);
76445
+ __exportStar(__webpack_require__(/*! ./DeletePeerSharedAttributeAndNotifyOwner */ "./dist/useCases/consumption/attributes/DeletePeerSharedAttributeAndNotifyOwner.js"), exports);
76446
+ __exportStar(__webpack_require__(/*! ./DeleteRepositoryAttribute */ "./dist/useCases/consumption/attributes/DeleteRepositoryAttribute.js"), exports);
76447
+ __exportStar(__webpack_require__(/*! ./DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer */ "./dist/useCases/consumption/attributes/DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer.js"), exports);
75704
76448
  __exportStar(__webpack_require__(/*! ./ExecuteIdentityAttributeQuery */ "./dist/useCases/consumption/attributes/ExecuteIdentityAttributeQuery.js"), exports);
75705
76449
  __exportStar(__webpack_require__(/*! ./ExecuteIQLQuery */ "./dist/useCases/consumption/attributes/ExecuteIQLQuery.js"), exports);
75706
76450
  __exportStar(__webpack_require__(/*! ./ExecuteRelationshipAttributeQuery */ "./dist/useCases/consumption/attributes/ExecuteRelationshipAttributeQuery.js"), exports);