@nmshd/consumption 7.0.0-alpha.7 → 7.0.0-alpha.71

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 (331) hide show
  1. package/dist/buildInformation.js +5 -5
  2. package/dist/consumption/ConsumptionBaseController.d.ts.map +1 -1
  3. package/dist/consumption/ConsumptionBaseController.js +6 -1
  4. package/dist/consumption/ConsumptionBaseController.js.map +1 -1
  5. package/dist/consumption/ConsumptionConfig.d.ts +1 -1
  6. package/dist/consumption/ConsumptionConfig.d.ts.map +1 -1
  7. package/dist/consumption/ConsumptionController.d.ts +1 -3
  8. package/dist/consumption/ConsumptionController.d.ts.map +1 -1
  9. package/dist/consumption/ConsumptionController.js +6 -12
  10. package/dist/consumption/ConsumptionController.js.map +1 -1
  11. package/dist/consumption/ConsumptionControllerName.d.ts +0 -1
  12. package/dist/consumption/ConsumptionControllerName.d.ts.map +1 -1
  13. package/dist/consumption/ConsumptionControllerName.js +0 -1
  14. package/dist/consumption/ConsumptionControllerName.js.map +1 -1
  15. package/dist/consumption/ConsumptionCoreErrors.d.ts +10 -37
  16. package/dist/consumption/ConsumptionCoreErrors.d.ts.map +1 -1
  17. package/dist/consumption/ConsumptionCoreErrors.js +26 -113
  18. package/dist/consumption/ConsumptionCoreErrors.js.map +1 -1
  19. package/dist/consumption/ConsumptionIds.d.ts +1 -1
  20. package/dist/consumption/ConsumptionIds.d.ts.map +1 -1
  21. package/dist/consumption/ConsumptionIds.js +1 -1
  22. package/dist/consumption/ConsumptionIds.js.map +1 -1
  23. package/dist/modules/attributes/AttributesController.d.ts +124 -68
  24. package/dist/modules/attributes/AttributesController.d.ts.map +1 -1
  25. package/dist/modules/attributes/AttributesController.js +761 -709
  26. package/dist/modules/attributes/AttributesController.js.map +1 -1
  27. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts +1 -1
  28. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts.map +1 -1
  29. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts +1 -1
  30. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts.map +1 -1
  31. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts +9 -0
  32. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts.map +1 -0
  33. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js +12 -0
  34. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js.map +1 -0
  35. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts +11 -0
  36. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts.map +1 -0
  37. package/dist/modules/attributes/events/AttributeSucceededEvent.js +12 -0
  38. package/dist/modules/attributes/events/AttributeSucceededEvent.js.map +1 -0
  39. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts +7 -0
  40. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts.map +1 -0
  41. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.js +12 -0
  42. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.js.map +1 -0
  43. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts +7 -0
  44. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts.map +1 -0
  45. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js +12 -0
  46. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js.map +1 -0
  47. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts +7 -0
  48. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts.map +1 -0
  49. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js +12 -0
  50. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js.map +1 -0
  51. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts +7 -0
  52. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts.map +1 -0
  53. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js +12 -0
  54. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js.map +1 -0
  55. package/dist/modules/attributes/events/index.d.ts +6 -9
  56. package/dist/modules/attributes/events/index.d.ts.map +1 -1
  57. package/dist/modules/attributes/events/index.js +6 -9
  58. package/dist/modules/attributes/events/index.js.map +1 -1
  59. package/dist/modules/attributes/index.d.ts +9 -7
  60. package/dist/modules/attributes/index.d.ts.map +1 -1
  61. package/dist/modules/attributes/index.js +9 -7
  62. package/dist/modules/attributes/index.js.map +1 -1
  63. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts +28 -0
  64. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts.map +1 -0
  65. package/dist/modules/attributes/local/AttributeForwardingDetails.js +62 -0
  66. package/dist/modules/attributes/local/AttributeForwardingDetails.js.map +1 -0
  67. package/dist/modules/attributes/local/QueryTranslator.d.ts.map +1 -1
  68. package/dist/modules/attributes/local/QueryTranslator.js +1 -1
  69. package/dist/modules/attributes/local/QueryTranslator.js.map +1 -1
  70. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts +29 -0
  71. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts.map +1 -0
  72. package/dist/modules/attributes/local/{AttributeSuccessorParams.js → attributeTypes/LocalAttribute.js} +34 -26
  73. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.js.map +1 -0
  74. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts +19 -0
  75. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts.map +1 -0
  76. package/dist/modules/{attributeListeners/local/LocalAttributeListener.js → attributes/local/attributeTypes/OwnIdentityAttribute.js} +16 -20
  77. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.js.map +1 -0
  78. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts +29 -0
  79. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts.map +1 -0
  80. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js +73 -0
  81. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js.map +1 -0
  82. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts +29 -0
  83. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts.map +1 -0
  84. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js +76 -0
  85. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js.map +1 -0
  86. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts +30 -0
  87. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts.map +1 -0
  88. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js +76 -0
  89. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js.map +1 -0
  90. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts +33 -0
  91. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts.map +1 -0
  92. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js +85 -0
  93. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js.map +1 -0
  94. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts +15 -0
  95. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts.map +1 -0
  96. package/dist/modules/{requests/itemProcessors/freeText/AcceptFreeTextRequestItemParameters.js → attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js} +12 -12
  97. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js.map +1 -0
  98. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts +18 -0
  99. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts.map +1 -0
  100. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js +38 -0
  101. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js.map +1 -0
  102. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts +16 -0
  103. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts.map +1 -0
  104. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js +36 -0
  105. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js.map +1 -0
  106. package/dist/modules/attributes/local/deletionInfos/index.d.ts +4 -0
  107. package/dist/modules/attributes/local/deletionInfos/index.d.ts.map +1 -0
  108. package/dist/modules/{attributeListeners/events → attributes/local/deletionInfos}/index.js +3 -1
  109. package/dist/modules/attributes/local/deletionInfos/index.js.map +1 -0
  110. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts +13 -0
  111. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts.map +1 -0
  112. package/dist/modules/{attributeListeners/local/CreateLocalAttributeListenerParams.js → attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js} +9 -15
  113. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js.map +1 -0
  114. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts +17 -0
  115. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  116. package/dist/modules/attributes/local/{CreateAttributeParams.js → successorParams/OwnRelationshipAttributeSuccessorParams.js} +10 -15
  117. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.js.map +1 -0
  118. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts +20 -0
  119. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts.map +1 -0
  120. package/dist/modules/attributes/local/{CreateRepositoryAttributeParams.js → successorParams/PeerIdentityAttributeSuccessorParams.js} +16 -13
  121. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.js.map +1 -0
  122. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts +20 -0
  123. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  124. package/dist/modules/attributes/local/{CreateSharedLocalAttributeCopyParams.js → successorParams/PeerRelationshipAttributeSuccessorParams.js} +15 -16
  125. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.js.map +1 -0
  126. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts +20 -0
  127. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  128. package/dist/modules/attributes/local/{CreateSharedLocalAttributeParams.js → successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js} +15 -22
  129. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js.map +1 -0
  130. package/dist/modules/attributes/local/successorParams/index.d.ts +6 -0
  131. package/dist/modules/attributes/local/successorParams/index.d.ts.map +1 -0
  132. package/dist/modules/{attributeListeners → attributes/local/successorParams}/index.js +5 -4
  133. package/dist/modules/attributes/local/successorParams/index.js.map +1 -0
  134. package/dist/modules/index.d.ts +0 -1
  135. package/dist/modules/index.d.ts.map +1 -1
  136. package/dist/modules/index.js +0 -1
  137. package/dist/modules/index.js.map +1 -1
  138. package/dist/modules/notifications/NotificationsController.js +6 -6
  139. package/dist/modules/notifications/NotificationsController.js.map +1 -1
  140. package/dist/modules/notifications/index.d.ts +4 -4
  141. package/dist/modules/notifications/index.d.ts.map +1 -1
  142. package/dist/modules/notifications/index.js +4 -4
  143. package/dist/modules/notifications/index.js.map +1 -1
  144. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  145. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  146. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js +53 -0
  147. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  148. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts +14 -0
  149. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +1 -0
  150. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js +59 -0
  151. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js.map +1 -0
  152. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  153. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  154. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +63 -0
  155. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  156. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts +15 -0
  157. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts.map +1 -0
  158. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js +102 -0
  159. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js.map +1 -0
  160. package/dist/modules/requests/incoming/IncomingRequestsController.d.ts +1 -0
  161. package/dist/modules/requests/incoming/IncomingRequestsController.d.ts.map +1 -1
  162. package/dist/modules/requests/incoming/IncomingRequestsController.js +21 -8
  163. package/dist/modules/requests/incoming/IncomingRequestsController.js.map +1 -1
  164. package/dist/modules/requests/incoming/decide/DecideRequestParameters.d.ts +1 -0
  165. package/dist/modules/requests/incoming/decide/DecideRequestParameters.d.ts.map +1 -1
  166. package/dist/modules/requests/incoming/decide/InternalDecideRequestParameters.d.ts +2 -0
  167. package/dist/modules/requests/incoming/decide/InternalDecideRequestParameters.d.ts.map +1 -1
  168. package/dist/modules/requests/incoming/decide/InternalDecideRequestParameters.js +5 -0
  169. package/dist/modules/requests/incoming/decide/InternalDecideRequestParameters.js.map +1 -1
  170. package/dist/modules/requests/index.d.ts +2 -3
  171. package/dist/modules/requests/index.d.ts.map +1 -1
  172. package/dist/modules/requests/index.js +2 -3
  173. package/dist/modules/requests/index.js.map +1 -1
  174. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts +2 -2
  175. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts.map +1 -1
  176. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js +62 -22
  177. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js.map +1 -1
  178. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts +4 -2
  179. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts.map +1 -1
  180. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js +50 -43
  181. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js.map +1 -1
  182. package/dist/modules/requests/itemProcessors/formField/AcceptFormFieldRequestItemParameters.d.ts +10 -0
  183. package/dist/modules/requests/itemProcessors/formField/AcceptFormFieldRequestItemParameters.d.ts.map +1 -0
  184. package/dist/modules/requests/itemProcessors/formField/AcceptFormFieldRequestItemParameters.js +31 -0
  185. package/dist/modules/requests/itemProcessors/formField/AcceptFormFieldRequestItemParameters.js.map +1 -0
  186. package/dist/modules/requests/itemProcessors/formField/FormFieldRequestItemProcessor.d.ts +10 -0
  187. package/dist/modules/requests/itemProcessors/formField/FormFieldRequestItemProcessor.d.ts.map +1 -0
  188. package/dist/modules/requests/itemProcessors/formField/FormFieldRequestItemProcessor.js +34 -0
  189. package/dist/modules/requests/itemProcessors/formField/FormFieldRequestItemProcessor.js.map +1 -0
  190. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts +2 -2
  191. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts.map +1 -1
  192. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js +93 -101
  193. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js.map +1 -1
  194. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts +2 -2
  195. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts.map +1 -1
  196. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js +142 -136
  197. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js.map +1 -1
  198. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts +3 -5
  199. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts.map +1 -1
  200. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js +96 -92
  201. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js.map +1 -1
  202. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts +2 -2
  203. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts.map +1 -1
  204. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js +40 -33
  205. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js.map +1 -1
  206. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.d.ts.map +1 -1
  207. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js +31 -53
  208. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js.map +1 -1
  209. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js +3 -3
  210. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js.map +1 -1
  211. package/dist/modules/requests/local/LocalRequest.d.ts +2 -0
  212. package/dist/modules/requests/local/LocalRequest.d.ts.map +1 -1
  213. package/dist/modules/requests/local/LocalRequest.js +8 -2
  214. package/dist/modules/requests/local/LocalRequest.js.map +1 -1
  215. package/dist/modules/requests/local/LocalResponse.js +1 -1
  216. package/dist/modules/requests/local/LocalResponse.js.map +1 -1
  217. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts +1 -1
  218. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts.map +1 -1
  219. package/dist/modules/requests/outgoing/OutgoingRequestsController.js +29 -25
  220. package/dist/modules/requests/outgoing/OutgoingRequestsController.js.map +1 -1
  221. package/package.json +14 -14
  222. package/dist/modules/attributeListeners/AttributeListenersController.d.ts +0 -20
  223. package/dist/modules/attributeListeners/AttributeListenersController.d.ts.map +0 -1
  224. package/dist/modules/attributeListeners/AttributeListenersController.js +0 -51
  225. package/dist/modules/attributeListeners/AttributeListenersController.js.map +0 -1
  226. package/dist/modules/attributeListeners/events/AttributeListenerCreatedEvent.d.ts +0 -7
  227. package/dist/modules/attributeListeners/events/AttributeListenerCreatedEvent.d.ts.map +0 -1
  228. package/dist/modules/attributeListeners/events/AttributeListenerCreatedEvent.js +0 -12
  229. package/dist/modules/attributeListeners/events/AttributeListenerCreatedEvent.js.map +0 -1
  230. package/dist/modules/attributeListeners/events/index.d.ts +0 -2
  231. package/dist/modules/attributeListeners/events/index.d.ts.map +0 -1
  232. package/dist/modules/attributeListeners/events/index.js.map +0 -1
  233. package/dist/modules/attributeListeners/index.d.ts +0 -5
  234. package/dist/modules/attributeListeners/index.d.ts.map +0 -1
  235. package/dist/modules/attributeListeners/index.js.map +0 -1
  236. package/dist/modules/attributeListeners/local/CreateLocalAttributeListenerParams.d.ts +0 -13
  237. package/dist/modules/attributeListeners/local/CreateLocalAttributeListenerParams.d.ts.map +0 -1
  238. package/dist/modules/attributeListeners/local/CreateLocalAttributeListenerParams.js.map +0 -1
  239. package/dist/modules/attributeListeners/local/LocalAttributeListener.d.ts +0 -21
  240. package/dist/modules/attributeListeners/local/LocalAttributeListener.d.ts.map +0 -1
  241. package/dist/modules/attributeListeners/local/LocalAttributeListener.js.map +0 -1
  242. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts +0 -6
  243. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts.map +0 -1
  244. package/dist/modules/attributes/events/AttributeSucceededEventData.js +0 -3
  245. package/dist/modules/attributes/events/AttributeSucceededEventData.js.map +0 -1
  246. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts +0 -7
  247. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts.map +0 -1
  248. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js +0 -12
  249. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js.map +0 -1
  250. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts +0 -8
  251. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts.map +0 -1
  252. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js +0 -12
  253. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js.map +0 -1
  254. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts +0 -7
  255. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts.map +0 -1
  256. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js +0 -12
  257. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js.map +0 -1
  258. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts +0 -8
  259. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts.map +0 -1
  260. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js +0 -12
  261. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js.map +0 -1
  262. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts +0 -8
  263. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts.map +0 -1
  264. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js +0 -12
  265. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js.map +0 -1
  266. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts +0 -7
  267. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts.map +0 -1
  268. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js +0 -12
  269. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js.map +0 -1
  270. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts +0 -7
  271. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts.map +0 -1
  272. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js +0 -12
  273. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js.map +0 -1
  274. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts +0 -8
  275. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts.map +0 -1
  276. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js +0 -12
  277. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js.map +0 -1
  278. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts +0 -24
  279. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts.map +0 -1
  280. package/dist/modules/attributes/local/AttributeSuccessorParams.js.map +0 -1
  281. package/dist/modules/attributes/local/CreateAttributeParams.d.ts +0 -15
  282. package/dist/modules/attributes/local/CreateAttributeParams.d.ts.map +0 -1
  283. package/dist/modules/attributes/local/CreateAttributeParams.js.map +0 -1
  284. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts +0 -20
  285. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts.map +0 -1
  286. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.js.map +0 -1
  287. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts +0 -22
  288. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts.map +0 -1
  289. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.js.map +0 -1
  290. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts +0 -26
  291. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts.map +0 -1
  292. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.js.map +0 -1
  293. package/dist/modules/attributes/local/LocalAttribute.d.ts +0 -109
  294. package/dist/modules/attributes/local/LocalAttribute.d.ts.map +0 -1
  295. package/dist/modules/attributes/local/LocalAttribute.js +0 -180
  296. package/dist/modules/attributes/local/LocalAttribute.js.map +0 -1
  297. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts +0 -24
  298. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts.map +0 -1
  299. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js +0 -42
  300. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js.map +0 -1
  301. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts +0 -26
  302. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts.map +0 -1
  303. package/dist/modules/attributes/local/LocalAttributeShareInfo.js +0 -59
  304. package/dist/modules/attributes/local/LocalAttributeShareInfo.js.map +0 -1
  305. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts +0 -14
  306. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +0 -1
  307. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js +0 -56
  308. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js.map +0 -1
  309. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  310. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  311. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  312. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  313. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  314. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  315. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  316. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  317. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts +0 -15
  318. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts.map +0 -1
  319. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js +0 -74
  320. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js.map +0 -1
  321. package/dist/modules/requests/itemProcessors/freeText/AcceptFreeTextRequestItemParameters.d.ts +0 -10
  322. package/dist/modules/requests/itemProcessors/freeText/AcceptFreeTextRequestItemParameters.d.ts.map +0 -1
  323. package/dist/modules/requests/itemProcessors/freeText/AcceptFreeTextRequestItemParameters.js.map +0 -1
  324. package/dist/modules/requests/itemProcessors/freeText/FreeTextRequestItemProcessor.d.ts +0 -9
  325. package/dist/modules/requests/itemProcessors/freeText/FreeTextRequestItemProcessor.d.ts.map +0 -1
  326. package/dist/modules/requests/itemProcessors/freeText/FreeTextRequestItemProcessor.js +0 -31
  327. package/dist/modules/requests/itemProcessors/freeText/FreeTextRequestItemProcessor.js.map +0 -1
  328. package/dist/modules/requests/itemProcessors/registerAttributeListener/RegisterAttributeListenerRequestItemProcessor.d.ts +0 -8
  329. package/dist/modules/requests/itemProcessors/registerAttributeListener/RegisterAttributeListenerRequestItemProcessor.d.ts.map +0 -1
  330. package/dist/modules/requests/itemProcessors/registerAttributeListener/RegisterAttributeListenerRequestItemProcessor.js +0 -19
  331. package/dist/modules/requests/itemProcessors/registerAttributeListener/RegisterAttributeListenerRequestItemProcessor.js.map +0 -1
@@ -1,180 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.LocalAttribute = void 0;
13
- const ts_serval_1 = require("@js-soft/ts-serval");
14
- const content_1 = require("@nmshd/content");
15
- const core_types_1 = require("@nmshd/core-types");
16
- const transport_1 = require("@nmshd/transport");
17
- const ts_simple_nameof_1 = require("ts-simple-nameof");
18
- const ConsumptionCoreErrors_1 = require("../../../consumption/ConsumptionCoreErrors");
19
- const ConsumptionIds_1 = require("../../../consumption/ConsumptionIds");
20
- const LocalAttributeDeletionInfo_1 = require("./LocalAttributeDeletionInfo");
21
- const LocalAttributeShareInfo_1 = require("./LocalAttributeShareInfo");
22
- let LocalAttribute = class LocalAttribute extends transport_1.CoreSynchronizable {
23
- constructor() {
24
- super(...arguments);
25
- this.technicalProperties = [
26
- "@type",
27
- "@context",
28
- (0, ts_simple_nameof_1.nameof)((r) => r.createdAt),
29
- (0, ts_simple_nameof_1.nameof)((r) => r.succeeds),
30
- (0, ts_simple_nameof_1.nameof)((r) => r.succeededBy),
31
- (0, ts_simple_nameof_1.nameof)((r) => r.shareInfo),
32
- (0, ts_simple_nameof_1.nameof)((r) => r.deletionInfo),
33
- (0, ts_simple_nameof_1.nameof)((r) => r.parentId),
34
- (0, ts_simple_nameof_1.nameof)((r) => r.isDefault)
35
- ];
36
- this.userdataProperties = [(0, ts_simple_nameof_1.nameof)((r) => r.content)];
37
- }
38
- isOwnSharedIdentityAttribute(ownAddress, peerAddress) {
39
- return this.isIdentityAttribute() && this.isOwnSharedAttribute(ownAddress, peerAddress);
40
- }
41
- isOwnSharedRelationshipAttribute(ownAddress, peerAddress) {
42
- return this.isRelationshipAttribute() && this.isOwnSharedAttribute(ownAddress, peerAddress);
43
- }
44
- isPeerSharedIdentityAttribute(peerAddress) {
45
- return this.isIdentityAttribute() && this.isPeerSharedAttribute(peerAddress);
46
- }
47
- isPeerSharedRelationshipAttribute(peerAddress) {
48
- return this.isRelationshipAttribute() && this.isPeerSharedAttribute(peerAddress);
49
- }
50
- isThirdPartyRelationshipAttribute() {
51
- return this.isRelationshipAttribute() && !!this.shareInfo.thirdPartyAddress;
52
- }
53
- isRepositoryAttribute(ownAddress) {
54
- return this.isIdentityAttribute() && !this.isShared() && this.isOwnedBy(ownAddress);
55
- }
56
- isOwnSharedAttribute(ownAddress, peerAddress) {
57
- let isOwnSharedAttribute = this.isShared() && this.isOwnedBy(ownAddress);
58
- isOwnSharedAttribute &&= !this.parentId;
59
- isOwnSharedAttribute &&= !this.isDefault;
60
- if (peerAddress)
61
- isOwnSharedAttribute &&= this.shareInfo.peer.equals(peerAddress);
62
- return isOwnSharedAttribute;
63
- }
64
- isPeerSharedAttribute(peerAddress) {
65
- let isPeerSharedAttribute = this.isShared() && this.isOwnedBy(this.shareInfo.peer);
66
- isPeerSharedAttribute &&= !this.shareInfo.sourceAttribute;
67
- isPeerSharedAttribute &&= !this.parentId;
68
- isPeerSharedAttribute &&= !this.isDefault;
69
- if (peerAddress)
70
- isPeerSharedAttribute &&= this.isOwnedBy(peerAddress);
71
- return isPeerSharedAttribute;
72
- }
73
- isIdentityAttribute() {
74
- return this.content instanceof content_1.IdentityAttribute;
75
- }
76
- isRelationshipAttribute() {
77
- let isRelationshipAttribute = this.content instanceof content_1.RelationshipAttribute && this.isShared();
78
- isRelationshipAttribute &&= !this.parentId;
79
- isRelationshipAttribute &&= !this.isDefault;
80
- return isRelationshipAttribute;
81
- }
82
- isComplexAttribute() {
83
- return this.content.value instanceof content_1.AbstractComplexValue;
84
- }
85
- isOwnedBy(identity) {
86
- return this.content.owner.equals(identity);
87
- }
88
- isShared() {
89
- return !!this.shareInfo;
90
- }
91
- setDeletionInfo(deletionInfo, ownAddress) {
92
- if (this.isRepositoryAttribute(ownAddress)) {
93
- throw ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.cannotSetDeletionInfoOfRepositoryAttributes();
94
- }
95
- if (this.isOwnSharedAttribute(ownAddress) && !this.isOwnSharedAttributeDeletionInfo(deletionInfo)) {
96
- throw ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.invalidDeletionInfoOfOwnSharedAttribute();
97
- }
98
- if (this.isPeerSharedAttribute() && !this.isPeerSharedAttributeDeletionInfo(deletionInfo)) {
99
- throw ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.invalidDeletionInfoOfPeerSharedAttribute();
100
- }
101
- if (this.isThirdPartyRelationshipAttribute() && !this.isThirdPartyRelationshipAttributeDeletionInfo(deletionInfo)) {
102
- throw ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.invalidDeletionInfoOfThirdPartyRelationshipAttribute();
103
- }
104
- this.deletionInfo = deletionInfo;
105
- return this;
106
- }
107
- isPeerSharedAttributeDeletionInfo(deletionInfo) {
108
- return deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.DeletedByOwner || deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.ToBeDeleted;
109
- }
110
- isOwnSharedAttributeDeletionInfo(deletionInfo) {
111
- return (deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.DeletedByPeer ||
112
- deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.ToBeDeletedByPeer ||
113
- deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.DeletionRequestSent ||
114
- deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.DeletionRequestRejected);
115
- }
116
- isThirdPartyRelationshipAttributeDeletionInfo(deletionInfo) {
117
- return deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.DeletedByPeer;
118
- }
119
- hasDeletionInfo() {
120
- return !!this.deletionInfo;
121
- }
122
- static from(value) {
123
- return this.fromAny(value);
124
- }
125
- static async fromAttribute(content, succeeds, shareInfo, id, parentId) {
126
- return this.from({
127
- id: id ?? (await ConsumptionIds_1.ConsumptionIds.attribute.generate()),
128
- createdAt: core_types_1.CoreDate.utc(),
129
- content,
130
- succeeds,
131
- shareInfo,
132
- parentId
133
- });
134
- }
135
- };
136
- exports.LocalAttribute = LocalAttribute;
137
- __decorate([
138
- (0, ts_serval_1.validate)(),
139
- (0, ts_serval_1.serialize)({ unionTypes: [content_1.IdentityAttribute, content_1.RelationshipAttribute] }),
140
- __metadata("design:type", Object)
141
- ], LocalAttribute.prototype, "content", void 0);
142
- __decorate([
143
- (0, ts_serval_1.validate)(),
144
- (0, ts_serval_1.serialize)(),
145
- __metadata("design:type", core_types_1.CoreDate)
146
- ], LocalAttribute.prototype, "createdAt", void 0);
147
- __decorate([
148
- (0, ts_serval_1.validate)({ nullable: true }),
149
- (0, ts_serval_1.serialize)(),
150
- __metadata("design:type", core_types_1.CoreId)
151
- ], LocalAttribute.prototype, "succeeds", void 0);
152
- __decorate([
153
- (0, ts_serval_1.validate)({ nullable: true }),
154
- (0, ts_serval_1.serialize)(),
155
- __metadata("design:type", core_types_1.CoreId)
156
- ], LocalAttribute.prototype, "succeededBy", void 0);
157
- __decorate([
158
- (0, ts_serval_1.validate)({ nullable: true }),
159
- (0, ts_serval_1.serialize)(),
160
- __metadata("design:type", LocalAttributeShareInfo_1.LocalAttributeShareInfo)
161
- ], LocalAttribute.prototype, "shareInfo", void 0);
162
- __decorate([
163
- (0, ts_serval_1.validate)({ nullable: true }),
164
- (0, ts_serval_1.serialize)(),
165
- __metadata("design:type", LocalAttributeDeletionInfo_1.LocalAttributeDeletionInfo)
166
- ], LocalAttribute.prototype, "deletionInfo", void 0);
167
- __decorate([
168
- (0, ts_serval_1.validate)({ nullable: true }),
169
- (0, ts_serval_1.serialize)(),
170
- __metadata("design:type", core_types_1.CoreId)
171
- ], LocalAttribute.prototype, "parentId", void 0);
172
- __decorate([
173
- (0, ts_serval_1.validate)({ nullable: true }),
174
- (0, ts_serval_1.serialize)(),
175
- __metadata("design:type", Boolean)
176
- ], LocalAttribute.prototype, "isDefault", void 0);
177
- exports.LocalAttribute = LocalAttribute = __decorate([
178
- (0, ts_serval_1.type)("LocalAttribute")
179
- ], LocalAttribute);
180
- //# sourceMappingURL=LocalAttribute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalAttribute.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA+D;AAC/D,4CAQwB;AACxB,kDAAsF;AACtF,gDAA2E;AAC3E,uDAA0C;AAC1C,sFAAmF;AACnF,wEAAqE;AACrE,6EAAqK;AACrK,uEAA2H;AAqEpH,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,8BAAkB;IAA/C;;QACsB,wBAAmB,GAAG;YAC3C,OAAO;YACP,UAAU;YACV,IAAA,yBAAM,EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1C,IAAA,yBAAM,EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YACzC,IAAA,yBAAM,EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YAC5C,IAAA,yBAAM,EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1C,IAAA,yBAAM,EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;YAC7C,IAAA,yB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AAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACO,iDAAuB;iDAAC;AAIpC;IAFN,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACU,uDAA0B;oDAAC;AAI1C;IAFN,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACM,mBAAM;gDAAC;AAIlB;IAFN,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;;iDACY;yBA7Cf,cAAc;IAD1B,IAAA,gBAAI,EAAC,gBAAgB,CAAC;GACV,cAAc,CAoL1B"}
@@ -1,24 +0,0 @@
1
- import { ISerializable, Serializable } from "@js-soft/ts-serval";
2
- import { CoreDate, ICoreDate } from "@nmshd/core-types";
3
- export declare enum LocalAttributeDeletionStatus {
4
- DeletionRequestSent = "DeletionRequestSent",
5
- DeletionRequestRejected = "DeletionRequestRejected",
6
- ToBeDeleted = "ToBeDeleted",
7
- ToBeDeletedByPeer = "ToBeDeletedByPeer",
8
- DeletedByPeer = "DeletedByPeer",
9
- DeletedByOwner = "DeletedByOwner"
10
- }
11
- export interface LocalAttributeDeletionInfoJSON {
12
- deletionStatus: LocalAttributeDeletionStatus;
13
- deletionDate: string;
14
- }
15
- export interface ILocalAttributeDeletionInfo extends ISerializable {
16
- deletionStatus: LocalAttributeDeletionStatus;
17
- deletionDate: ICoreDate;
18
- }
19
- export declare class LocalAttributeDeletionInfo extends Serializable implements ILocalAttributeDeletionInfo {
20
- deletionStatus: LocalAttributeDeletionStatus;
21
- deletionDate: CoreDate;
22
- static from(value: ILocalAttributeDeletionInfo | LocalAttributeDeletionInfoJSON): LocalAttributeDeletionInfo;
23
- }
24
- //# sourceMappingURL=LocalAttributeDeletionInfo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalAttributeDeletionInfo.d.ts","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttributeDeletionInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAuB,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAExD,oBAAY,4BAA4B;IACpC,mBAAmB,wBAAwB;IAC3C,uBAAuB,4BAA4B;IACnD,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;CACpC;AAED,MAAM,WAAW,8BAA8B;IAC3C,cAAc,EAAE,4BAA4B,CAAC;IAC7C,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,2BAA4B,SAAQ,aAAa;IAC9D,cAAc,EAAE,4BAA4B,CAAC;IAC7C,YAAY,EAAE,SAAS,CAAC;CAC3B;AAED,qBAAa,0BAA2B,SAAQ,YAAa,YAAW,2BAA2B;IAMxF,cAAc,EAAE,4BAA4B,CAAC;IAI7C,YAAY,EAAE,QAAQ,CAAC;WAEhB,IAAI,CAAC,KAAK,EAAE,2BAA2B,GAAG,8BAA8B,GAAG,0BAA0B;CAGtH"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.LocalAttributeDeletionInfo = exports.LocalAttributeDeletionStatus = void 0;
13
- const ts_serval_1 = require("@js-soft/ts-serval");
14
- const core_types_1 = require("@nmshd/core-types");
15
- var LocalAttributeDeletionStatus;
16
- (function (LocalAttributeDeletionStatus) {
17
- LocalAttributeDeletionStatus["DeletionRequestSent"] = "DeletionRequestSent";
18
- LocalAttributeDeletionStatus["DeletionRequestRejected"] = "DeletionRequestRejected";
19
- LocalAttributeDeletionStatus["ToBeDeleted"] = "ToBeDeleted";
20
- LocalAttributeDeletionStatus["ToBeDeletedByPeer"] = "ToBeDeletedByPeer";
21
- LocalAttributeDeletionStatus["DeletedByPeer"] = "DeletedByPeer";
22
- LocalAttributeDeletionStatus["DeletedByOwner"] = "DeletedByOwner";
23
- })(LocalAttributeDeletionStatus || (exports.LocalAttributeDeletionStatus = LocalAttributeDeletionStatus = {}));
24
- class LocalAttributeDeletionInfo extends ts_serval_1.Serializable {
25
- static from(value) {
26
- return this.fromAny(value);
27
- }
28
- }
29
- exports.LocalAttributeDeletionInfo = LocalAttributeDeletionInfo;
30
- __decorate([
31
- (0, ts_serval_1.serialize)(),
32
- (0, ts_serval_1.validate)({
33
- customValidator: (v) => !Object.values(LocalAttributeDeletionStatus).includes(v) ? `must be one of: ${Object.values(LocalAttributeDeletionStatus).map((o) => `"${o}"`)}` : undefined
34
- }),
35
- __metadata("design:type", String)
36
- ], LocalAttributeDeletionInfo.prototype, "deletionStatus", void 0);
37
- __decorate([
38
- (0, ts_serval_1.serialize)(),
39
- (0, ts_serval_1.validate)(),
40
- __metadata("design:type", core_types_1.CoreDate)
41
- ], LocalAttributeDeletionInfo.prototype, "deletionDate", void 0);
42
- //# sourceMappingURL=LocalAttributeDeletionInfo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalAttributeDeletionInfo.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttributeDeletionInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAsF;AACtF,kDAAwD;AAExD,IAAY,4BAOX;AAPD,WAAY,4BAA4B;IACpC,2EAA2C,CAAA;IAC3C,mFAAmD,CAAA;IACnD,2DAA2B,CAAA;IAC3B,uEAAuC,CAAA;IACvC,+DAA+B,CAAA;IAC/B,iEAAiC,CAAA;AACrC,CAAC,EAPW,4BAA4B,4CAA5B,4BAA4B,QAOvC;AAYD,MAAa,0BAA2B,SAAQ,wBAAY;IAYjD,MAAM,CAAC,IAAI,CAAC,KAAmE;QAClF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;CACJ;AAfD,gEAeC;AATU;IALN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CACnB,CAAC,MAAM,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,MAAM,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;KACnK,CAAC;;kEACkD;AAI7C;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACU,qBAAQ;gEAAC"}
@@ -1,26 +0,0 @@
1
- import { ISerializable, Serializable } from "@js-soft/ts-serval";
2
- import { CoreAddress, CoreId, ICoreAddress, ICoreId } from "@nmshd/core-types";
3
- export interface LocalAttributeShareInfoJSON {
4
- requestReference?: string;
5
- notificationReference?: string;
6
- peer: string;
7
- sourceAttribute?: string;
8
- thirdPartyAddress?: string;
9
- }
10
- export interface ILocalAttributeShareInfo extends ISerializable {
11
- requestReference?: ICoreId;
12
- notificationReference?: ICoreId;
13
- peer: ICoreAddress;
14
- sourceAttribute?: ICoreId;
15
- thirdPartyAddress?: ICoreAddress;
16
- }
17
- export declare class LocalAttributeShareInfo extends Serializable implements ILocalAttributeShareInfo {
18
- requestReference?: CoreId;
19
- notificationReference?: CoreId;
20
- peer: CoreAddress;
21
- sourceAttribute?: CoreId;
22
- thirdPartyAddress?: CoreAddress;
23
- static from(value: ILocalAttributeShareInfo | LocalAttributeShareInfoJSON): LocalAttributeShareInfo;
24
- protected static postFrom<T extends Serializable>(value: T): T;
25
- }
26
- //# sourceMappingURL=LocalAttributeShareInfo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalAttributeShareInfo.d.ts","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttributeShareInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAwC,MAAM,oBAAoB,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAK/E,MAAM,WAAW,2BAA2B;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAGD,MAAM,WAAW,wBAAyB,SAAQ,aAAa;IAC3D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,IAAI,EAAE,YAAY,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,YAAY,CAAC;CACpC;AAED,qBAAa,uBAAwB,SAAQ,YAAa,YAAW,wBAAwB;IAGlF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAI1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAI/B,IAAI,EAAE,WAAW,CAAC;IAIlB,eAAe,CAAC,EAAE,MAAM,CAAC;IAIzB,iBAAiB,CAAC,EAAE,WAAW,CAAC;WAEzB,IAAI,CAAC,KAAK,EAAE,wBAAwB,GAAG,2BAA2B,GAAG,uBAAuB;qBAIhF,QAAQ,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC;CAqB1E"}
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.LocalAttributeShareInfo = void 0;
13
- const ts_serval_1 = require("@js-soft/ts-serval");
14
- const core_types_1 = require("@nmshd/core-types");
15
- const ts_simple_nameof_1 = require("ts-simple-nameof");
16
- const ConsumptionError_1 = require("../../../consumption/ConsumptionError");
17
- class LocalAttributeShareInfo extends ts_serval_1.Serializable {
18
- static from(value) {
19
- return super.fromAny(value);
20
- }
21
- static postFrom(value) {
22
- if (!(value instanceof LocalAttributeShareInfo))
23
- throw new ConsumptionError_1.ConsumptionError("this should never happen");
24
- if (!value.requestReference && !value.notificationReference) {
25
- throw new ts_serval_1.ValidationError(LocalAttributeShareInfo.name, (0, ts_simple_nameof_1.nameof)((x) => x.requestReference), `One of ${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)} or ${(0, ts_simple_nameof_1.nameof)((x) => x.notificationReference)} must be set.`);
26
- }
27
- if (value.requestReference && value.notificationReference) {
28
- throw new ts_serval_1.ValidationError(LocalAttributeShareInfo.name, (0, ts_simple_nameof_1.nameof)((x) => x.requestReference), `Both of ${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)} or ${(0, ts_simple_nameof_1.nameof)((x) => x.notificationReference)} must not be set.`);
29
- }
30
- return value;
31
- }
32
- }
33
- exports.LocalAttributeShareInfo = LocalAttributeShareInfo;
34
- __decorate([
35
- (0, ts_serval_1.serialize)(),
36
- (0, ts_serval_1.validate)({ nullable: true }),
37
- __metadata("design:type", core_types_1.CoreId)
38
- ], LocalAttributeShareInfo.prototype, "requestReference", void 0);
39
- __decorate([
40
- (0, ts_serval_1.serialize)(),
41
- (0, ts_serval_1.validate)({ nullable: true }),
42
- __metadata("design:type", core_types_1.CoreId)
43
- ], LocalAttributeShareInfo.prototype, "notificationReference", void 0);
44
- __decorate([
45
- (0, ts_serval_1.validate)(),
46
- (0, ts_serval_1.serialize)(),
47
- __metadata("design:type", core_types_1.CoreAddress)
48
- ], LocalAttributeShareInfo.prototype, "peer", void 0);
49
- __decorate([
50
- (0, ts_serval_1.serialize)(),
51
- (0, ts_serval_1.validate)({ nullable: true }),
52
- __metadata("design:type", core_types_1.CoreId)
53
- ], LocalAttributeShareInfo.prototype, "sourceAttribute", void 0);
54
- __decorate([
55
- (0, ts_serval_1.serialize)(),
56
- (0, ts_serval_1.validate)({ nullable: true }),
57
- __metadata("design:type", core_types_1.CoreAddress)
58
- ], LocalAttributeShareInfo.prototype, "thirdPartyAddress", void 0);
59
- //# sourceMappingURL=LocalAttributeShareInfo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalAttributeShareInfo.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttributeShareInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAuG;AACvG,kDAA+E;AAC/E,uDAA0C;AAC1C,4EAAyE;AAoBzE,MAAa,uBAAwB,SAAQ,wBAAY;IAqB9C,MAAM,CAAC,IAAI,CAAC,KAA6D;QAC5E,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BAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACE,mBAAM;sEAAC;AAI/B;IAFN,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACC,wBAAW;qDAAC;AAIlB;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACJ,mBAAM;gEAAC;AAIzB;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACF,wBAAW;kEAAC"}
@@ -1,14 +0,0 @@
1
- import { OwnSharedAttributeDeletedByOwnerNotificationItem } from "@nmshd/content";
2
- import { ConsumptionController } from "../../../../consumption/ConsumptionController";
3
- import { OwnSharedAttributeDeletedByOwnerEvent } from "../../../attributes";
4
- import { ValidationResult } from "../../../common";
5
- import { LocalNotification } from "../../local/LocalNotification";
6
- import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
7
- export declare class OwnSharedAttributeDeletedByOwnerNotificationItemProcessor extends AbstractNotificationItemProcessor<OwnSharedAttributeDeletedByOwnerNotificationItem> {
8
- private readonly _logger;
9
- constructor(consumptionController: ConsumptionController);
10
- checkPrerequisitesOfIncomingNotificationItem(notificationItem: OwnSharedAttributeDeletedByOwnerNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
11
- process(notificationItem: OwnSharedAttributeDeletedByOwnerNotificationItem, _notification: LocalNotification): Promise<OwnSharedAttributeDeletedByOwnerEvent | void>;
12
- rollback(notificationItem: OwnSharedAttributeDeletedByOwnerNotificationItem, _notification: LocalNotification): Promise<void>;
13
- }
14
- //# sourceMappingURL=OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gDAAgD,EAAE,MAAM,gBAAgB,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAA4D,qCAAqC,EAAE,MAAM,qBAAqB,CAAC;AACtI,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAEzF,qBAAa,yDAA0D,SAAQ,iCAAiC,CAAC,gDAAgD,CAAC;IAC9J,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,qBAAqB,EAAE,qBAAqB;IAKzC,4CAA4C,CAC9D,gBAAgB,EAAE,gDAAgD,EAClE,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAgBN,OAAO,CACzB,gBAAgB,EAAE,gDAAgD,EAClE,aAAa,EAAE,iBAAiB,GACjC,OAAO,CAAC,qCAAqC,GAAG,IAAI,CAAC;IAqBlC,QAAQ,CAAC,gBAAgB,EAAE,gDAAgD,EAAE,aAAa,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAUtJ"}
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OwnSharedAttributeDeletedByOwnerNotificationItemProcessor = void 0;
4
- const core_types_1 = require("@nmshd/core-types");
5
- const transport_1 = require("@nmshd/transport");
6
- const ConsumptionCoreErrors_1 = require("../../../../consumption/ConsumptionCoreErrors");
7
- const attributes_1 = require("../../../attributes");
8
- const common_1 = require("../../../common");
9
- const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
10
- class OwnSharedAttributeDeletedByOwnerNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
11
- constructor(consumptionController) {
12
- super(consumptionController);
13
- this._logger = transport_1.TransportLoggerFactory.getLogger(OwnSharedAttributeDeletedByOwnerNotificationItemProcessor);
14
- }
15
- async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
16
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
17
- if (!attribute)
18
- return common_1.ValidationResult.success();
19
- if (!attribute.isPeerSharedAttribute()) {
20
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.isNotPeerSharedAttribute(notificationItem.attributeId));
21
- }
22
- if (!notification.peer.equals(attribute.shareInfo.peer)) {
23
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.senderIsNotPeerOfSharedAttribute(notification.peer, notificationItem.attributeId));
24
- }
25
- return common_1.ValidationResult.success();
26
- }
27
- async process(notificationItem, _notification) {
28
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
29
- if (!attribute)
30
- return;
31
- const deletionInfo = attributes_1.LocalAttributeDeletionInfo.from({
32
- deletionStatus: attributes_1.LocalAttributeDeletionStatus.DeletedByOwner,
33
- deletionDate: core_types_1.CoreDate.utc()
34
- });
35
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
36
- for (const attr of [attribute, ...predecessors]) {
37
- if (!attr.deletionInfo) {
38
- attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
39
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
40
- }
41
- }
42
- return new attributes_1.OwnSharedAttributeDeletedByOwnerEvent(this.currentIdentityAddress.toString(), attribute);
43
- }
44
- async rollback(notificationItem, _notification) {
45
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
46
- if (!attribute)
47
- return;
48
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
49
- for (const attr of [attribute, ...predecessors]) {
50
- attr.deletionInfo = undefined;
51
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
52
- }
53
- }
54
- }
55
- exports.OwnSharedAttributeDeletedByOwnerNotificationItemProcessor = OwnSharedAttributeDeletedByOwnerNotificationItemProcessor;
56
- //# sourceMappingURL=OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.ts"],"names":[],"mappings":";;;AAEA,kDAA6C;AAC7C,gDAA0D;AAE1D,yFAAsF;AACtF,oDAAsI;AACtI,4CAAmD;AAEnD,4FAAyF;AAEzF,MAAa,yDAA0D,SAAQ,qEAAmF;IAG9J,YAAmB,qBAA4C;QAC3D,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,kCAAsB,CAAC,SAAS,CAAC,yDAAyD,CAAC,CAAC;IAC/G,CAAC;IAEe,KAAK,CAAC,4CAA4C,CAC9D,gBAAkE,EAClE,YAA+B;QAE/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAE9G,IAAI,CAAC,SAAS;YAAE,OAAO,yBAAgB,CAAC,OAAO,EAAE,CAAC;QAElD,IAAI,CAAC,SAAS,CAAC,qBAAqB,EAAE,EAAE,CAAC;YACrC,OAAO,yBAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,UAAU,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;QAC3H,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YACtD,OAAO,yBAAgB,CAAC,K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B,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC9G,IAAI,CAAC,SAAS;YAAE,OAAO;QAEvB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAC1G,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,GAAG,YAAY,CAAC,EAAE,CAAC;YAC9C,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC;IACL,CAAC;CACJ;AA7DD,8HA6DC"}
@@ -1,14 +0,0 @@
1
- import { PeerSharedAttributeDeletedByPeerNotificationItem } from "@nmshd/content";
2
- import { ConsumptionController } from "../../../../consumption/ConsumptionController";
3
- import { PeerSharedAttributeDeletedByPeerEvent } from "../../../attributes";
4
- import { ValidationResult } from "../../../common";
5
- import { LocalNotification } from "../../local/LocalNotification";
6
- import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
7
- export declare class PeerSharedAttributeDeletedByPeerNotificationItemProcessor extends AbstractNotificationItemProcessor<PeerSharedAttributeDeletedByPeerNotificationItem> {
8
- private readonly _logger;
9
- constructor(consumptionController: ConsumptionController);
10
- checkPrerequisitesOfIncomingNotificationItem(notificationItem: PeerSharedAttributeDeletedByPeerNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
11
- process(notificationItem: PeerSharedAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<PeerSharedAttributeDeletedByPeerEvent | void>;
12
- rollback(notificationItem: PeerSharedAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<void>;
13
- }
14
- //# sourceMappingURL=PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gDAAgD,EAAE,MAAM,gBAAgB,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,qCAAqC,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAEzF,qBAAa,yDAA0D,SAAQ,iCAAiC,CAAC,gDAAgD,CAAC;IAC9J,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,qBAAqB,EAAE,qBAAqB;IAKzC,4CAA4C,CAC9D,gBAAgB,EAAE,gDAAgD,EAClE,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAgBN,OAAO,CACzB,gBAAgB,EAAE,gDAAgD,EAClE,aAAa,EAAE,iBAAiB,GACjC,OAAO,CAAC,qCAAqC,GAAG,IAAI,CAAC;IAoBlC,QAAQ,CAAC,gBAAgB,EAAE,gDAAgD,EAAE,aAAa,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAYtJ"}
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PeerSharedAttributeDeletedByPeerNotificationItemProcessor = void 0;
4
- const core_types_1 = require("@nmshd/core-types");
5
- const transport_1 = require("@nmshd/transport");
6
- const ConsumptionCoreErrors_1 = require("../../../../consumption/ConsumptionCoreErrors");
7
- const attributes_1 = require("../../../attributes");
8
- const LocalAttributeDeletionInfo_1 = require("../../../attributes/local/LocalAttributeDeletionInfo");
9
- const common_1 = require("../../../common");
10
- const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
11
- class PeerSharedAttributeDeletedByPeerNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
12
- constructor(consumptionController) {
13
- super(consumptionController);
14
- this._logger = transport_1.TransportLoggerFactory.getLogger(PeerSharedAttributeDeletedByPeerNotificationItemProcessor);
15
- }
16
- async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
17
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
18
- if (!attribute)
19
- return common_1.ValidationResult.success();
20
- if (!attribute.isOwnSharedAttribute(this.currentIdentityAddress)) {
21
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.isNotOwnSharedAttribute(notificationItem.attributeId));
22
- }
23
- if (!notification.peer.equals(attribute.shareInfo.peer)) {
24
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.senderIsNotPeerOfSharedAttribute(notification.peer, notificationItem.attributeId));
25
- }
26
- return common_1.ValidationResult.success();
27
- }
28
- async process(notificationItem, _notification) {
29
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
30
- if (!attribute)
31
- return;
32
- const deletionDate = core_types_1.CoreDate.utc();
33
- const deletionInfo = LocalAttributeDeletionInfo_1.LocalAttributeDeletionInfo.from({
34
- deletionStatus: LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.DeletedByPeer,
35
- deletionDate: deletionDate
36
- });
37
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
38
- for (const attr of [attribute, ...predecessors]) {
39
- attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
40
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
41
- }
42
- return new attributes_1.PeerSharedAttributeDeletedByPeerEvent(this.currentIdentityAddress.toString(), attribute);
43
- }
44
- async rollback(notificationItem, _notification) {
45
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
46
- if (!attribute)
47
- return;
48
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
49
- for (const attr of [attribute, ...predecessors]) {
50
- // the previous deletionState cannot be unambiguously known, either it was undefined or 'toBeDeletedByPeer'
51
- attr.deletionInfo = undefined;
52
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
53
- }
54
- }
55
- }
56
- exports.PeerSharedAttributeDeletedByPeerNotificationItemProcessor = PeerSharedAttributeDeletedByPeerNotificationItemProcessor;
57
- //# sourceMappingURL=PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.ts"],"names":[],"mappings":";;;AAEA,kDAA6C;AAC7C,gDAA0D;AAE1D,yFAAsF;AACtF,oDAA4E;AAC5E,qGAAgI;AAChI,4CAAmD;AAEnD,4FAAyF;AAEzF,MAAa,yDAA0D,SAAQ,qEAAmF;IAG9J,YAAmB,qBAA4C;QAC3D,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,kCAAsB,CAAC,SAAS,CAAC,yDAAyD,CAAC,CAAC;IAC/G,CAAC;IAEe,KAAK,CAAC,4CAA4C,CAC9D,gBAAkE,EAClE,YAA+B;QAE/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAE9G,IAAI,CAAC,SAAS;YAAE,OAAO,yBAAgB,CAAC,OAAO,EAAE,CAAC;QAElD,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,sBAAsB,CAAC,EAAE,CAAC;YAC/D,OAAO,yBAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,UAA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QAAQ,EAAE,EAAE,SAAS,CAAC,CAAC;IACxG,CAAC;IAEe,KAAK,CAAC,QAAQ,CAAC,gBAAkE,EAAE,aAAgC;QAC/H,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC9G,IAAI,CAAC,SAAS;YAAE,OAAO;QAEvB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAE1G,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,GAAG,YAAY,CAAC,EAAE,CAAC;YAC9C,2GAA2G;YAC3G,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC;IACL,CAAC;CACJ;AA9DD,8HA8DC"}
@@ -1,14 +0,0 @@
1
- import { ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem } from "@nmshd/content";
2
- import { ConsumptionController } from "../../../../consumption/ConsumptionController";
3
- import { ThirdPartyRelationshipAttributeDeletedByPeerEvent } from "../../../attributes";
4
- import { ValidationResult } from "../../../common";
5
- import { LocalNotification } from "../../local/LocalNotification";
6
- import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
7
- export declare class ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor extends AbstractNotificationItemProcessor<ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem> {
8
- private readonly _logger;
9
- constructor(consumptionController: ConsumptionController);
10
- checkPrerequisitesOfIncomingNotificationItem(notificationItem: ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
11
- process(notificationItem: ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<ThirdPartyRelationshipAttributeDeletedByPeerEvent | void>;
12
- rollback(notificationItem: ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<void>;
13
- }
14
- //# sourceMappingURL=ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4DAA4D,EAAE,MAAM,gBAAgB,CAAC;AAG9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,iDAAiD,EAAE,MAAM,qBAAqB,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAEzF,qBAAa,qEAAsE,SAAQ,iCAAiC,CAAC,4DAA4D,CAAC;IACtL,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,qBAAqB,EAAE,qBAAqB;IAKzC,4CAA4C,CAC9D,gBAAgB,EAAE,4DAA4D,EAC9E,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAgBN,OAAO,CACzB,gBAAgB,EAAE,4DAA4D,EAC9E,aAAa,EAAE,iBAAiB,GACjC,OAAO,CAAC,iDAAiD,GAAG,IAAI,CAAC;IAoB9C,QAAQ,CAAC,gBAAgB,EAAE,4DAA4D,EAAE,aAAa,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAYlK"}
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor = void 0;
4
- const core_types_1 = require("@nmshd/core-types");
5
- const transport_1 = require("@nmshd/transport");
6
- const ConsumptionCoreErrors_1 = require("../../../../consumption/ConsumptionCoreErrors");
7
- const attributes_1 = require("../../../attributes");
8
- const LocalAttributeDeletionInfo_1 = require("../../../attributes/local/LocalAttributeDeletionInfo");
9
- const common_1 = require("../../../common");
10
- const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
11
- class ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
12
- constructor(consumptionController) {
13
- super(consumptionController);
14
- this._logger = transport_1.TransportLoggerFactory.getLogger(ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor);
15
- }
16
- async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
17
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
18
- if (!attribute)
19
- return common_1.ValidationResult.success();
20
- if (!attribute.isThirdPartyRelationshipAttribute()) {
21
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.isNotThirdPartyRelationshipAttribute(notificationItem.attributeId));
22
- }
23
- if (!notification.peer.equals(attribute.shareInfo.peer)) {
24
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.senderIsNotPeerOfSharedAttribute(notification.peer, notificationItem.attributeId));
25
- }
26
- return common_1.ValidationResult.success();
27
- }
28
- async process(notificationItem, _notification) {
29
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
30
- if (!attribute)
31
- return;
32
- const deletionDate = core_types_1.CoreDate.utc();
33
- const deletionInfo = LocalAttributeDeletionInfo_1.LocalAttributeDeletionInfo.from({
34
- deletionStatus: LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.DeletedByPeer,
35
- deletionDate: deletionDate
36
- });
37
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
38
- for (const attr of [attribute, ...predecessors]) {
39
- attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
40
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
41
- }
42
- return new attributes_1.ThirdPartyRelationshipAttributeDeletedByPeerEvent(this.currentIdentityAddress.toString(), attribute);
43
- }
44
- async rollback(notificationItem, _notification) {
45
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
46
- if (!attribute)
47
- return;
48
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
49
- for (const attr of [attribute, ...predecessors]) {
50
- // the previous deletionState cannot be unambiguously known, either it was undefined or 'toBeDeletedByPeer'
51
- attr.deletionInfo = undefined;
52
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
53
- }
54
- }
55
- }
56
- exports.ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor = ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor;
57
- //# sourceMappingURL=ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map