@nmshd/consumption 7.0.0-openid4vc.5 → 7.0.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 (302) hide show
  1. package/LICENSE +659 -3
  2. package/README.md +1 -1
  3. package/dist/buildInformation.js +5 -5
  4. package/dist/consumption/ConsumptionConfig.d.ts +1 -1
  5. package/dist/consumption/ConsumptionConfig.d.ts.map +1 -1
  6. package/dist/consumption/ConsumptionController.d.ts +1 -3
  7. package/dist/consumption/ConsumptionController.d.ts.map +1 -1
  8. package/dist/consumption/ConsumptionController.js +5 -9
  9. package/dist/consumption/ConsumptionController.js.map +1 -1
  10. package/dist/consumption/ConsumptionControllerName.d.ts +1 -2
  11. package/dist/consumption/ConsumptionControllerName.d.ts.map +1 -1
  12. package/dist/consumption/ConsumptionControllerName.js +0 -1
  13. package/dist/consumption/ConsumptionControllerName.js.map +1 -1
  14. package/dist/consumption/ConsumptionCoreErrors.d.ts +7 -37
  15. package/dist/consumption/ConsumptionCoreErrors.d.ts.map +1 -1
  16. package/dist/consumption/ConsumptionCoreErrors.js +18 -114
  17. package/dist/consumption/ConsumptionCoreErrors.js.map +1 -1
  18. package/dist/consumption/ConsumptionIds.d.ts +1 -0
  19. package/dist/consumption/ConsumptionIds.d.ts.map +1 -1
  20. package/dist/consumption/ConsumptionIds.js +1 -0
  21. package/dist/consumption/ConsumptionIds.js.map +1 -1
  22. package/dist/modules/attributes/AttributesController.d.ts +108 -69
  23. package/dist/modules/attributes/AttributesController.d.ts.map +1 -1
  24. package/dist/modules/attributes/AttributesController.js +664 -734
  25. package/dist/modules/attributes/AttributesController.js.map +1 -1
  26. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts +1 -1
  27. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts.map +1 -1
  28. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts +1 -1
  29. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts.map +1 -1
  30. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts +9 -0
  31. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts.map +1 -0
  32. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js +12 -0
  33. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js.map +1 -0
  34. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts +11 -0
  35. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts.map +1 -0
  36. package/dist/modules/attributes/events/AttributeSucceededEvent.js +12 -0
  37. package/dist/modules/attributes/events/AttributeSucceededEvent.js.map +1 -0
  38. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts +1 -1
  39. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts.map +1 -1
  40. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts +7 -0
  41. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts.map +1 -0
  42. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js +12 -0
  43. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js.map +1 -0
  44. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts +7 -0
  45. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts.map +1 -0
  46. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js +12 -0
  47. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js.map +1 -0
  48. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts +7 -0
  49. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts.map +1 -0
  50. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js +12 -0
  51. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js.map +1 -0
  52. package/dist/modules/attributes/events/index.d.ts +5 -9
  53. package/dist/modules/attributes/events/index.d.ts.map +1 -1
  54. package/dist/modules/attributes/events/index.js +5 -9
  55. package/dist/modules/attributes/events/index.js.map +1 -1
  56. package/dist/modules/attributes/index.d.ts +9 -7
  57. package/dist/modules/attributes/index.d.ts.map +1 -1
  58. package/dist/modules/attributes/index.js +9 -7
  59. package/dist/modules/attributes/index.js.map +1 -1
  60. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts +28 -0
  61. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts.map +1 -0
  62. package/dist/modules/attributes/local/AttributeForwardingDetails.js +62 -0
  63. package/dist/modules/attributes/local/AttributeForwardingDetails.js.map +1 -0
  64. package/dist/modules/attributes/local/QueryTranslator.d.ts.map +1 -1
  65. package/dist/modules/attributes/local/QueryTranslator.js +1 -1
  66. package/dist/modules/attributes/local/QueryTranslator.js.map +1 -1
  67. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts +29 -0
  68. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts.map +1 -0
  69. package/dist/modules/attributes/local/{AttributeSuccessorParams.js → attributeTypes/LocalAttribute.js} +34 -26
  70. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.js.map +1 -0
  71. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts +19 -0
  72. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts.map +1 -0
  73. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.js +40 -0
  74. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.js.map +1 -0
  75. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts +29 -0
  76. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts.map +1 -0
  77. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js +73 -0
  78. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js.map +1 -0
  79. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts +29 -0
  80. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts.map +1 -0
  81. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js +76 -0
  82. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js.map +1 -0
  83. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts +30 -0
  84. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts.map +1 -0
  85. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js +76 -0
  86. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js.map +1 -0
  87. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts +33 -0
  88. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts.map +1 -0
  89. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js +85 -0
  90. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js.map +1 -0
  91. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts +15 -0
  92. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts.map +1 -0
  93. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js +28 -0
  94. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js.map +1 -0
  95. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts +18 -0
  96. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts.map +1 -0
  97. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js +38 -0
  98. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js.map +1 -0
  99. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts +16 -0
  100. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts.map +1 -0
  101. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js +36 -0
  102. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js.map +1 -0
  103. package/dist/modules/attributes/local/deletionInfos/index.d.ts +4 -0
  104. package/dist/modules/attributes/local/deletionInfos/index.d.ts.map +1 -0
  105. package/dist/modules/attributes/local/deletionInfos/index.js +20 -0
  106. package/dist/modules/attributes/local/deletionInfos/index.js.map +1 -0
  107. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts +13 -0
  108. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts.map +1 -0
  109. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js +29 -0
  110. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js.map +1 -0
  111. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts +17 -0
  112. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  113. package/dist/modules/attributes/local/{CreateAttributeParams.js → successorParams/OwnRelationshipAttributeSuccessorParams.js} +10 -15
  114. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.js.map +1 -0
  115. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts +20 -0
  116. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts.map +1 -0
  117. package/dist/modules/attributes/local/{CreateRepositoryAttributeParams.js → successorParams/PeerIdentityAttributeSuccessorParams.js} +16 -13
  118. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.js.map +1 -0
  119. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts +20 -0
  120. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  121. package/dist/modules/attributes/local/{CreateSharedLocalAttributeCopyParams.js → successorParams/PeerRelationshipAttributeSuccessorParams.js} +15 -16
  122. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.js.map +1 -0
  123. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts +20 -0
  124. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  125. package/dist/modules/attributes/local/{CreateSharedLocalAttributeParams.js → successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js} +15 -22
  126. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js.map +1 -0
  127. package/dist/modules/attributes/local/successorParams/index.d.ts +6 -0
  128. package/dist/modules/attributes/local/successorParams/index.d.ts.map +1 -0
  129. package/dist/modules/{openid4vc → attributes/local/successorParams}/index.js +5 -7
  130. package/dist/modules/attributes/local/successorParams/index.js.map +1 -0
  131. package/dist/modules/index.d.ts +0 -1
  132. package/dist/modules/index.d.ts.map +1 -1
  133. package/dist/modules/index.js +0 -1
  134. package/dist/modules/index.js.map +1 -1
  135. package/dist/modules/notifications/index.d.ts +4 -4
  136. package/dist/modules/notifications/index.d.ts.map +1 -1
  137. package/dist/modules/notifications/index.js +4 -4
  138. package/dist/modules/notifications/index.js.map +1 -1
  139. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  140. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  141. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js +53 -0
  142. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  143. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts +14 -0
  144. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +1 -0
  145. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js +59 -0
  146. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js.map +1 -0
  147. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  148. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  149. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +63 -0
  150. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  151. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts +15 -0
  152. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts.map +1 -0
  153. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js +102 -0
  154. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js.map +1 -0
  155. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts +2 -2
  156. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts.map +1 -1
  157. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js +54 -20
  158. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js.map +1 -1
  159. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts +4 -2
  160. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts.map +1 -1
  161. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js +50 -43
  162. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js.map +1 -1
  163. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts +2 -2
  164. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts.map +1 -1
  165. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js +83 -97
  166. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js.map +1 -1
  167. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts +2 -2
  168. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts.map +1 -1
  169. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js +136 -133
  170. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js.map +1 -1
  171. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts +3 -5
  172. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts.map +1 -1
  173. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js +94 -90
  174. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js.map +1 -1
  175. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts +2 -2
  176. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts.map +1 -1
  177. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js +7 -11
  178. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js.map +1 -1
  179. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.d.ts.map +1 -1
  180. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js +31 -53
  181. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js.map +1 -1
  182. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js +2 -2
  183. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js.map +1 -1
  184. package/dist/modules/requests/local/LocalRequest.js +1 -1
  185. package/dist/modules/requests/local/LocalRequest.js.map +1 -1
  186. package/dist/modules/requests/local/LocalResponse.js +1 -1
  187. package/dist/modules/requests/local/LocalResponse.js.map +1 -1
  188. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts +1 -1
  189. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts.map +1 -1
  190. package/dist/modules/requests/outgoing/OutgoingRequestsController.js +17 -16
  191. package/dist/modules/requests/outgoing/OutgoingRequestsController.js.map +1 -1
  192. package/package.json +6 -14
  193. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts +0 -6
  194. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts.map +0 -1
  195. package/dist/modules/attributes/events/AttributeSucceededEventData.js +0 -3
  196. package/dist/modules/attributes/events/AttributeSucceededEventData.js.map +0 -1
  197. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts +0 -7
  198. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts.map +0 -1
  199. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js +0 -12
  200. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js.map +0 -1
  201. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts +0 -8
  202. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts.map +0 -1
  203. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js +0 -12
  204. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js.map +0 -1
  205. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts +0 -7
  206. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts.map +0 -1
  207. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js +0 -12
  208. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js.map +0 -1
  209. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts +0 -8
  210. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts.map +0 -1
  211. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js +0 -12
  212. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js.map +0 -1
  213. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts +0 -8
  214. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts.map +0 -1
  215. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js +0 -12
  216. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js.map +0 -1
  217. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts +0 -7
  218. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts.map +0 -1
  219. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js +0 -12
  220. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js.map +0 -1
  221. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts +0 -7
  222. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts.map +0 -1
  223. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js +0 -12
  224. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js.map +0 -1
  225. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts +0 -8
  226. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts.map +0 -1
  227. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js +0 -12
  228. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js.map +0 -1
  229. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts +0 -24
  230. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts.map +0 -1
  231. package/dist/modules/attributes/local/AttributeSuccessorParams.js.map +0 -1
  232. package/dist/modules/attributes/local/CreateAttributeParams.d.ts +0 -15
  233. package/dist/modules/attributes/local/CreateAttributeParams.d.ts.map +0 -1
  234. package/dist/modules/attributes/local/CreateAttributeParams.js.map +0 -1
  235. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts +0 -20
  236. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts.map +0 -1
  237. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.js.map +0 -1
  238. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts +0 -22
  239. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts.map +0 -1
  240. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.js.map +0 -1
  241. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts +0 -26
  242. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts.map +0 -1
  243. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.js.map +0 -1
  244. package/dist/modules/attributes/local/LocalAttribute.d.ts +0 -112
  245. package/dist/modules/attributes/local/LocalAttribute.d.ts.map +0 -1
  246. package/dist/modules/attributes/local/LocalAttribute.js +0 -186
  247. package/dist/modules/attributes/local/LocalAttribute.js.map +0 -1
  248. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts +0 -24
  249. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts.map +0 -1
  250. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js +0 -42
  251. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js.map +0 -1
  252. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts +0 -26
  253. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts.map +0 -1
  254. package/dist/modules/attributes/local/LocalAttributeShareInfo.js +0 -59
  255. package/dist/modules/attributes/local/LocalAttributeShareInfo.js.map +0 -1
  256. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts +0 -14
  257. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +0 -1
  258. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js +0 -56
  259. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js.map +0 -1
  260. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  261. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  262. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  263. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  264. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  265. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  266. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  267. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  268. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts +0 -15
  269. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts.map +0 -1
  270. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js +0 -74
  271. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js.map +0 -1
  272. package/dist/modules/openid4vc/OpenId4VcController.d.ts +0 -12
  273. package/dist/modules/openid4vc/OpenId4VcController.d.ts.map +0 -1
  274. package/dist/modules/openid4vc/OpenId4VcController.js +0 -82
  275. package/dist/modules/openid4vc/OpenId4VcController.js.map +0 -1
  276. package/dist/modules/openid4vc/index.d.ts +0 -8
  277. package/dist/modules/openid4vc/index.d.ts.map +0 -1
  278. package/dist/modules/openid4vc/index.js.map +0 -1
  279. package/dist/modules/openid4vc/local/BaseAgent.d.ts +0 -20
  280. package/dist/modules/openid4vc/local/BaseAgent.d.ts.map +0 -1
  281. package/dist/modules/openid4vc/local/BaseAgent.js +0 -69
  282. package/dist/modules/openid4vc/local/BaseAgent.js.map +0 -1
  283. package/dist/modules/openid4vc/local/EnmeshedHolderFileSystem.d.ts +0 -18
  284. package/dist/modules/openid4vc/local/EnmeshedHolderFileSystem.d.ts.map +0 -1
  285. package/dist/modules/openid4vc/local/EnmeshedHolderFileSystem.js +0 -94
  286. package/dist/modules/openid4vc/local/EnmeshedHolderFileSystem.js.map +0 -1
  287. package/dist/modules/openid4vc/local/EnmeshedHolderKeyManagmentService.d.ts +0 -34
  288. package/dist/modules/openid4vc/local/EnmeshedHolderKeyManagmentService.d.ts.map +0 -1
  289. package/dist/modules/openid4vc/local/EnmeshedHolderKeyManagmentService.js +0 -364
  290. package/dist/modules/openid4vc/local/EnmeshedHolderKeyManagmentService.js.map +0 -1
  291. package/dist/modules/openid4vc/local/EnmeshedStorageService.d.ts +0 -19
  292. package/dist/modules/openid4vc/local/EnmeshedStorageService.d.ts.map +0 -1
  293. package/dist/modules/openid4vc/local/EnmeshedStorageService.js +0 -218
  294. package/dist/modules/openid4vc/local/EnmeshedStorageService.js.map +0 -1
  295. package/dist/modules/openid4vc/local/Holder.d.ts +0 -34
  296. package/dist/modules/openid4vc/local/Holder.d.ts.map +0 -1
  297. package/dist/modules/openid4vc/local/Holder.js +0 -225
  298. package/dist/modules/openid4vc/local/Holder.js.map +0 -1
  299. package/dist/modules/openid4vc/local/LocalAgentDependencies.d.ts +0 -3
  300. package/dist/modules/openid4vc/local/LocalAgentDependencies.d.ts.map +0 -1
  301. package/dist/modules/openid4vc/local/LocalAgentDependencies.js +0 -18
  302. package/dist/modules/openid4vc/local/LocalAgentDependencies.js.map +0 -1
@@ -0,0 +1,15 @@
1
+ import { PeerAttributeSucceededNotificationItem } from "@nmshd/content";
2
+ import { ConsumptionController } from "../../../../consumption/ConsumptionController";
3
+ import { AttributeSucceededEvent } from "../../../attributes";
4
+ import { ValidationResult } from "../../../common";
5
+ import { LocalNotification } from "../../local/LocalNotification";
6
+ import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
7
+ export declare class PeerAttributeSucceededNotificationItemProcessor extends AbstractNotificationItemProcessor<PeerAttributeSucceededNotificationItem> {
8
+ private readonly _logger;
9
+ constructor(consumptionController: ConsumptionController);
10
+ checkPrerequisitesOfIncomingNotificationItem(notificationItem: PeerAttributeSucceededNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
11
+ process(notificationItem: PeerAttributeSucceededNotificationItem, notification: LocalNotification): Promise<AttributeSucceededEvent>;
12
+ rollback(notificationItem: PeerAttributeSucceededNotificationItem, notification: LocalNotification): Promise<void>;
13
+ private rollbackPartialWork;
14
+ }
15
+ //# sourceMappingURL=PeerAttributeSucceededNotificationItemProcessor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeerAttributeSucceededNotificationItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,sCAAsC,EAAyB,MAAM,gBAAgB,CAAC;AAElH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,uBAAuB,EAA0G,MAAM,qBAAqB,CAAC;AAEtK,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,+CAAgD,SAAQ,iCAAiC,CAAC,sCAAsC,CAAC;IAC1I,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,qBAAqB,EAAE,qBAAqB;IAKzC,4CAA4C,CAC9D,gBAAgB,EAAE,sCAAsC,EACxD,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAyCN,OAAO,CAAC,gBAAgB,EAAE,sCAAsC,EAAE,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA2CpI,QAAQ,CAAC,gBAAgB,EAAE,sCAAsC,EAAE,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;YAI1H,mBAAmB;CAgBpC"}
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PeerAttributeSucceededNotificationItemProcessor = void 0;
4
+ const content_1 = require("@nmshd/content");
5
+ const transport_1 = require("@nmshd/transport");
6
+ const ConsumptionCoreErrors_1 = require("../../../../consumption/ConsumptionCoreErrors");
7
+ const attributes_1 = require("../../../attributes");
8
+ const PeerRelationshipAttributeSuccessorParams_1 = require("../../../attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams");
9
+ const common_1 = require("../../../common");
10
+ const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
11
+ class PeerAttributeSucceededNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
12
+ constructor(consumptionController) {
13
+ super(consumptionController);
14
+ this._logger = transport_1.TransportLoggerFactory.getLogger(PeerAttributeSucceededNotificationItemProcessor);
15
+ }
16
+ async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
17
+ if (!notification.peer.equals(notificationItem.successorContent.owner)) {
18
+ return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.successionPeerIsNotOwner());
19
+ }
20
+ const predecessor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.predecessorId);
21
+ if (!predecessor)
22
+ return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.predecessorDoesNotExist());
23
+ if (!(predecessor instanceof attributes_1.PeerIdentityAttribute || predecessor instanceof attributes_1.PeerRelationshipAttribute)) {
24
+ return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.wrongTypeOfAttribute(`The Attribute ${notificationItem.predecessorId} is not a PeerIdentityAttribute or a PeerRelationshipAttribute.`));
25
+ }
26
+ if (predecessor instanceof attributes_1.PeerIdentityAttribute) {
27
+ if (!(notificationItem.successorContent instanceof content_1.IdentityAttribute)) {
28
+ return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.successionMustNotChangeContentType());
29
+ }
30
+ const successorParams = attributes_1.PeerIdentityAttributeSuccessorParams.from({
31
+ id: notificationItem.successorId,
32
+ content: notificationItem.successorContent,
33
+ sourceReference: notification.id
34
+ });
35
+ return await this.consumptionController.attributes.validatePeerIdentityAttributeSuccession(predecessor, successorParams);
36
+ }
37
+ if (!(notificationItem.successorContent instanceof content_1.RelationshipAttribute)) {
38
+ return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.successionMustNotChangeContentType());
39
+ }
40
+ const successorParams = PeerRelationshipAttributeSuccessorParams_1.PeerRelationshipAttributeSuccessorParams.from({
41
+ id: notificationItem.successorId,
42
+ content: notificationItem.successorContent,
43
+ sourceReference: notification.id
44
+ });
45
+ return await this.consumptionController.attributes.validatePeerRelationshipAttributeSuccession(predecessor, successorParams);
46
+ }
47
+ async process(notificationItem, notification) {
48
+ let updatedPredecessor;
49
+ let successor;
50
+ try {
51
+ const predecessor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.predecessorId);
52
+ if (!predecessor)
53
+ throw ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.predecessorDoesNotExist();
54
+ if (!(predecessor instanceof attributes_1.PeerIdentityAttribute || predecessor instanceof attributes_1.PeerRelationshipAttribute)) {
55
+ throw ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.wrongTypeOfAttribute(`The Attribute ${notificationItem.predecessorId} is not a PeerIdentityAttribute or a PeerRelationshipAttribute.`);
56
+ }
57
+ if (predecessor instanceof attributes_1.PeerIdentityAttribute) {
58
+ const successorParams = attributes_1.PeerIdentityAttributeSuccessorParams.from({
59
+ id: notificationItem.successorId,
60
+ content: notificationItem.successorContent,
61
+ sourceReference: notification.id
62
+ });
63
+ const attributesAfterSuccession = await this.consumptionController.attributes.succeedPeerIdentityAttribute(predecessor, successorParams, false);
64
+ ({ predecessor: updatedPredecessor, successor } = attributesAfterSuccession);
65
+ }
66
+ else {
67
+ const successorParams = PeerRelationshipAttributeSuccessorParams_1.PeerRelationshipAttributeSuccessorParams.from({
68
+ id: notificationItem.successorId,
69
+ content: notificationItem.successorContent,
70
+ sourceReference: notification.id
71
+ });
72
+ const attributesAfterSuccession = await this.consumptionController.attributes.succeedPeerRelationshipAttribute(predecessor, successorParams, false);
73
+ ({ predecessor: updatedPredecessor, successor } = attributesAfterSuccession);
74
+ }
75
+ }
76
+ catch (e) {
77
+ await this.rollbackPartialWork(notificationItem, notification).catch((e) => this._logger.error(`Rollback failed for notification item (notification id: ${notification.id}).`, e));
78
+ throw e;
79
+ }
80
+ return new attributes_1.AttributeSucceededEvent(this.currentIdentityAddress.toString(), updatedPredecessor, successor);
81
+ }
82
+ async rollback(notificationItem, notification) {
83
+ await this.rollbackPartialWork(notificationItem, notification);
84
+ }
85
+ async rollbackPartialWork(notificationItem, _notification) {
86
+ const successor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.successorId);
87
+ if (successor) {
88
+ await this.consumptionController.attributes
89
+ .deleteAttributeUnsafe(successor.id)
90
+ .catch((e) => this._logger.error(`Deletion failed for attribute (attribute id: ${successor.id}).`, e));
91
+ }
92
+ const predecessor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.predecessorId);
93
+ if (predecessor?.succeededBy) {
94
+ predecessor.succeededBy = undefined;
95
+ await this.consumptionController.attributes
96
+ .updateAttributeUnsafe(predecessor)
97
+ .catch((e) => this._logger.error(`Update failed for attribute (attribute id: ${notificationItem.predecessorId}).`, e));
98
+ }
99
+ }
100
+ }
101
+ exports.PeerAttributeSucceededNotificationItemProcessor = PeerAttributeSucceededNotificationItemProcessor;
102
+ //# sourceMappingURL=PeerAttributeSucceededNotificationItemProcessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeerAttributeSucceededNotificationItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.ts"],"names":[],"mappings":";;;AACA,4CAAkH;AAClH,gDAA0D;AAE1D,yFAAsF;AACtF,oDAAsK;AACtK,iJAA8I;AAC9I,4CAAmD;AAEnD,4FAAyF;AAEzF,MAAa,+CAAgD,SAAQ,qEAAyE;IAG1I,YAAmB,qBAA4C;QAC3D,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,kCAAsB,CAAC,SAAS,CAAC,+CAA+C,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AAE,YAAY,CAAC,CAAC;IACnE,CAAC;IAEO,KAAK,CAAC,mBAAmB,CAAC,gBAAwD,EAAE,aAAgC;QACxH,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC9G,IAAI,SAAS,EAAE,CAAC;YACZ,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU;iBACtC,qBAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;iBACnC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,gDAAgD,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/G,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAClH,IAAI,WAAW,EAAE,WAAW,EAAE,CAAC;YAC3B,WAAW,CAAC,WAAW,GAAG,SAAS,CAAC;YACpC,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU;iBACtC,qBAAqB,CAAC,WAAW,CAAC;iBAClC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,8CAA8C,gBAAgB,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/H,CAAC;IACL,CAAC;CACJ;AAnHD,0GAmHC"}
@@ -1,6 +1,6 @@
1
1
  import { AttributeAlreadySharedAcceptResponseItem, AttributeSuccessionAcceptResponseItem, CreateAttributeAcceptResponseItem, CreateAttributeRequestItem, RejectResponseItem, Request } from "@nmshd/content";
2
2
  import { CoreAddress } from "@nmshd/core-types";
3
- import { PeerSharedAttributeSucceededEvent } from "../../../attributes";
3
+ import { AttributeSucceededEvent } from "../../../attributes";
4
4
  import { ValidationResult } from "../../../common/ValidationResult";
5
5
  import { AcceptRequestItemParametersJSON } from "../../incoming/decide/AcceptRequestItemParameters";
6
6
  import { GenericRequestItemProcessor } from "../GenericRequestItemProcessor";
@@ -9,6 +9,6 @@ export declare class CreateAttributeRequestItemProcessor extends GenericRequestI
9
9
  canCreateOutgoingRequestItem(requestItem: CreateAttributeRequestItem, _request?: Request, recipient?: CoreAddress): Promise<ValidationResult>;
10
10
  canAccept(requestItem: CreateAttributeRequestItem, _params: AcceptRequestItemParametersJSON, requestInfo: LocalRequestInfo): Promise<ValidationResult>;
11
11
  accept(requestItem: CreateAttributeRequestItem, _params: AcceptRequestItemParametersJSON, requestInfo: LocalRequestInfo): Promise<CreateAttributeAcceptResponseItem | AttributeAlreadySharedAcceptResponseItem | AttributeSuccessionAcceptResponseItem>;
12
- applyIncomingResponseItem(responseItem: CreateAttributeAcceptResponseItem | AttributeSuccessionAcceptResponseItem | AttributeAlreadySharedAcceptResponseItem | RejectResponseItem, requestItem: CreateAttributeRequestItem, requestInfo: LocalRequestInfo): Promise<PeerSharedAttributeSucceededEvent | void>;
12
+ applyIncomingResponseItem(responseItem: CreateAttributeAcceptResponseItem | AttributeSuccessionAcceptResponseItem | AttributeAlreadySharedAcceptResponseItem | RejectResponseItem, requestItem: CreateAttributeRequestItem, requestInfo: LocalRequestInfo): Promise<AttributeSucceededEvent | void>;
13
13
  }
14
14
  //# sourceMappingURL=CreateAttributeRequestItemProcessor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateAttributeRequestItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,wCAAwC,EACxC,qCAAqC,EACrC,iCAAiC,EACjC,0BAA0B,EAE1B,kBAAkB,EAElB,OAAO,EAEV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAqD,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAC3H,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,qBAAa,mCAAoC,SAAQ,2BAA2B,CAAC,0BAA0B,CAAC;IACtF,4BAA4B,CAAC,WAAW,EAAE,0BAA0B,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA8D7I,SAAS,CAAC,WAAW,EAAE,0BAA0B,EAAE,OAAO,EAAE,+BAA+B,EAAE,WAAW,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAsCtJ,MAAM,CACxB,WAAW,EAAE,0BAA0B,EACvC,OAAO,EAAE,+BAA+B,EACxC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,iCAAiC,GAAG,wCAAwC,GAAG,qCAAqC,CAAC;IAqB1G,yBAAyB,CAC3C,YAAY,EAAE,iCAAiC,GAAG,qCAAqC,GAAG,wCAAwC,GAAG,kBAAkB,EACvJ,WAAW,EAAE,0BAA0B,EACvC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,iCAAiC,GAAG,IAAI,CAAC;CA6BvD"}
1
+ {"version":3,"file":"CreateAttributeRequestItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,wCAAwC,EACxC,qCAAqC,EACrC,iCAAiC,EACjC,0BAA0B,EAE1B,kBAAkB,EAElB,OAAO,EAEV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,uBAAuB,EAA+D,MAAM,qBAAqB,CAAC;AAC3H,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,qBAAa,mCAAoC,SAAQ,2BAA2B,CAAC,0BAA0B,CAAC;IACtF,4BAA4B,CAAC,WAAW,EAAE,0BAA0B,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA8D7I,SAAS,CAAC,WAAW,EAAE,0BAA0B,EAAE,OAAO,EAAE,+BAA+B,EAAE,WAAW,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAsCtJ,MAAM,CACxB,WAAW,EAAE,0BAA0B,EACvC,OAAO,EAAE,+BAA+B,EACxC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,iCAAiC,GAAG,wCAAwC,GAAG,qCAAqC,CAAC;IAkC1G,yBAAyB,CAC3C,YAAY,EAAE,iCAAiC,GAAG,qCAAqC,GAAG,wCAAwC,GAAG,kBAAkB,EACvJ,WAAW,EAAE,0BAA0B,EACvC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;CAqD7C"}
@@ -20,7 +20,7 @@ class CreateAttributeRequestItemProcessor extends GenericRequestItemProcessor_1.
20
20
  }
21
21
  if (requestItem.attribute instanceof content_1.IdentityAttribute) {
22
22
  if (senderIsAttributeOwner) {
23
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("Cannot create own IdentityAttributes with a CreateAttributeRequestItem. Use a ShareAttributeRequestItem instead."));
23
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("Cannot create OwnIdentityAttributes with a CreateAttributeRequestItem. Use a ShareAttributeRequestItem instead."));
24
24
  }
25
25
  if (!(recipientIsAttributeOwner || ownerIsEmptyString)) {
26
26
  return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The owner of the provided IdentityAttribute for the `attribute` property can only be the address of the recipient or an empty string. The latter will default to the address of the recipient."));
@@ -68,43 +68,77 @@ class CreateAttributeRequestItemProcessor extends GenericRequestItemProcessor_1.
68
68
  requestItem.attribute.owner = this.currentIdentityAddress;
69
69
  }
70
70
  if (requestItem.attribute instanceof content_1.RelationshipAttribute) {
71
- const sharedRelationshipAttribute = await this.consumptionController.attributes.createSharedLocalAttribute({
71
+ if (requestItem.attribute.owner.equals(this.currentIdentityAddress)) {
72
+ const ownRelationshipAttribute = await this.consumptionController.attributes.createOwnRelationshipAttribute({
73
+ content: requestItem.attribute,
74
+ peer: requestInfo.peer,
75
+ sourceReference: requestInfo.id
76
+ });
77
+ return content_1.CreateAttributeAcceptResponseItem.from({
78
+ result: content_1.ResponseItemResult.Accepted,
79
+ attributeId: ownRelationshipAttribute.id
80
+ });
81
+ }
82
+ const peerRelationshipAttribute = await this.consumptionController.attributes.createPeerRelationshipAttribute({
72
83
  content: requestItem.attribute,
73
84
  peer: requestInfo.peer,
74
- requestReference: requestInfo.id
85
+ sourceReference: requestInfo.id
75
86
  });
76
87
  return content_1.CreateAttributeAcceptResponseItem.from({
77
88
  result: content_1.ResponseItemResult.Accepted,
78
- attributeId: sharedRelationshipAttribute.id
89
+ attributeId: peerRelationshipAttribute.id
79
90
  });
80
91
  }
81
92
  return await (0, createAppropriateResponseItem_1.default)(requestItem.attribute, requestInfo, this.consumptionController.attributes, "Create");
82
93
  }
83
94
  async applyIncomingResponseItem(responseItem, requestItem, requestInfo) {
95
+ if (responseItem instanceof content_1.AttributeAlreadySharedAcceptResponseItem)
96
+ return;
97
+ if (requestItem.attribute.owner.toString() === "")
98
+ requestItem.attribute.owner = requestInfo.peer;
99
+ const isOwnAttribute = requestItem.attribute.owner.toString() === this.currentIdentityAddress.toString();
100
+ const isPeerAttribute = requestItem.attribute.owner.toString() === requestInfo.peer.toString();
84
101
  if (responseItem instanceof content_1.CreateAttributeAcceptResponseItem) {
85
- if (requestItem.attribute.owner.toString() === "") {
86
- requestItem.attribute.owner = requestInfo.peer;
102
+ if (requestItem.attribute instanceof content_1.IdentityAttribute && isPeerAttribute) {
103
+ await this.consumptionController.attributes.createPeerIdentityAttribute({
104
+ id: responseItem.attributeId,
105
+ content: requestItem.attribute,
106
+ peer: requestInfo.peer,
107
+ sourceReference: requestInfo.id
108
+ });
109
+ return;
110
+ }
111
+ if (requestItem.attribute instanceof content_1.RelationshipAttribute && isPeerAttribute) {
112
+ await this.consumptionController.attributes.createPeerRelationshipAttribute({
113
+ id: responseItem.attributeId,
114
+ content: requestItem.attribute,
115
+ peer: requestInfo.peer,
116
+ sourceReference: requestInfo.id
117
+ });
118
+ return;
119
+ }
120
+ if (requestItem.attribute instanceof content_1.RelationshipAttribute && isOwnAttribute) {
121
+ await this.consumptionController.attributes.createOwnRelationshipAttribute({
122
+ id: responseItem.attributeId,
123
+ content: requestItem.attribute,
124
+ peer: requestInfo.peer,
125
+ sourceReference: requestInfo.id
126
+ });
127
+ return;
87
128
  }
88
- await this.consumptionController.attributes.createSharedLocalAttribute({
89
- id: responseItem.attributeId,
90
- content: requestItem.attribute,
91
- peer: requestInfo.peer,
92
- requestReference: requestInfo.id
93
- });
94
129
  }
95
130
  if (responseItem instanceof content_1.AttributeSuccessionAcceptResponseItem && responseItem.successorContent instanceof content_1.IdentityAttribute) {
96
- const successorParams = attributes_1.AttributeSuccessorParams.from({
131
+ const predecessor = await this.consumptionController.attributes.getLocalAttribute(responseItem.predecessorId);
132
+ if (!predecessor || !(predecessor instanceof attributes_1.PeerIdentityAttribute))
133
+ return;
134
+ const successorParams = attributes_1.PeerIdentityAttributeSuccessorParams.from({
97
135
  id: responseItem.successorId,
98
136
  content: responseItem.successorContent,
99
- shareInfo: attributes_1.LocalAttributeShareInfo.from({
100
- peer: requestInfo.peer,
101
- requestReference: requestInfo.id
102
- })
137
+ sourceReference: requestInfo.id
103
138
  });
104
- const { predecessor, successor } = await this.consumptionController.attributes.succeedPeerSharedIdentityAttribute(responseItem.predecessorId, successorParams);
105
- return new attributes_1.PeerSharedAttributeSucceededEvent(this.currentIdentityAddress.toString(), predecessor, successor);
139
+ const { predecessor: updatedPredecessor, successor } = await this.consumptionController.attributes.succeedPeerIdentityAttribute(predecessor, successorParams);
140
+ return new attributes_1.AttributeSucceededEvent(this.currentIdentityAddress.toString(), updatedPredecessor, successor);
106
141
  }
107
- return;
108
142
  }
109
143
  }
110
144
  exports.CreateAttributeRequestItemProcessor = CreateAttributeRequestItemProcessor;
@@ -1 +1 @@
1
- {"version":3,"file":"CreateAttributeRequestItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.ts"],"names":[],"mappings":";;;;;;AAAA,4CAUwB;AAExB,yFAAsF;AACtF,oDAA2H;AAC3H,uEAAoE;AAEpE,gFAA6E;AAE7E,6GAAqF;AAErF,MAAa,mCAAoC,SAAQ,yDAAuD;IAC5F,KAAK,CAAC,4BAA4B,CAAC,WAAuC,EAAE,QAAkB,EAAE,SAAuB;QACnI,MAAM,yBAAyB,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAChF,MAAM,sBAAsB,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QAC/F,MAAM,kBAAkB,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC;QAEzE,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAA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tB,gBAAgB,EAAE,WAAW,CAAC,EAAE;iBACnC,CAAC;aACL,CAAC,CAAC;YACH,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,kCAAkC,CAAC,YAAY,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;YAC/J,OAAO,IAAI,8CAAiC,CAAC,IAAI,CAAC,sBAAsB,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QACjH,CAAC;QAED,OAAO;IACX,CAAC;CACJ;AA/JD,kFA+JC"}
1
+ {"version":3,"file":"CreateAttributeRequestItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.ts"],"names":[],"mappings":";;;;;;AAAA,4CAUwB;AAExB,yFAAsF;AACtF,oDAA2H;AAC3H,uEAAoE;AAEpE,gFAA6E;AAE7E,6GAAqF;AAErF,MAAa,mCAAoC,SAAQ,yDAAuD;IAC5F,KAAK,CAAC,4BAA4B,CAAC,WAAuC,EAAE,QAAkB,EAAE,SAAuB;QACnI,MAAM,yBAAyB,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAChF,MAAM,sBAAsB,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QAC/F,MAAM,kBAAkB,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC;QAEzE,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,2BAA2B,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5F,OAAO,mCAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,8CAA8C,CAAC,CAAC,CAAC;QACrI,CAAC;QA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C,CAAC,WAAW,YAAY,kCAAqB,CAAC;gBAAE,OAAO;YAE5E,MAAM,eAAe,GAAG,iDAAoC,CAAC,IAAI,CAAC;gBAC9D,EAAE,EAAE,YAAY,CAAC,WAAW;gBAC5B,OAAO,EAAE,YAAY,CAAC,gBAAgB;gBACtC,eAAe,EAAE,WAAW,CAAC,EAAE;aAClC,CAAC,CAAC;YACH,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,4BAA4B,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;YAC9J,OAAO,IAAI,oCAAuB,CAAC,IAAI,CAAC,sBAAsB,CAAC,QAAQ,EAAE,EAAE,kBAAkB,EAAE,SAAS,CAAC,CAAC;QAC9G,CAAC;IACL,CAAC;CACJ;AApMD,kFAoMC"}
@@ -6,8 +6,10 @@ import { LocalRequestInfo } from "../IRequestItemProcessor";
6
6
  import { AcceptDeleteAttributeRequestItemParametersJSON } from "./AcceptDeleteAttributeRequestItemParameters";
7
7
  export declare class DeleteAttributeRequestItemProcessor extends GenericRequestItemProcessor<DeleteAttributeRequestItem> {
8
8
  canCreateOutgoingRequestItem(requestItem: DeleteAttributeRequestItem, _request: Request, recipient?: CoreAddress): Promise<ValidationResult>;
9
- canAccept(requestItem: DeleteAttributeRequestItem, params: AcceptDeleteAttributeRequestItemParametersJSON, _requestInfo: LocalRequestInfo): Promise<ValidationResult>;
9
+ canAccept(requestItem: DeleteAttributeRequestItem, params: AcceptDeleteAttributeRequestItemParametersJSON, requestInfo: LocalRequestInfo): Promise<ValidationResult>;
10
10
  accept(requestItem: DeleteAttributeRequestItem, params: AcceptDeleteAttributeRequestItemParametersJSON, _requestInfo: LocalRequestInfo): Promise<DeleteAttributeAcceptResponseItem | AcceptResponseItem>;
11
- applyIncomingResponseItem(responseItem: DeleteAttributeAcceptResponseItem | AcceptResponseItem | RejectResponseItem, requestItem: DeleteAttributeRequestItem, _requestInfo: LocalRequestInfo): Promise<void>;
11
+ applyIncomingResponseItem(responseItem: DeleteAttributeAcceptResponseItem | AcceptResponseItem | RejectResponseItem, requestItem: DeleteAttributeRequestItem, requestInfo: LocalRequestInfo): Promise<void>;
12
+ private setDeletionInfoForAcceptedRequestItem;
13
+ private setDeletionInfoForRejectedRequestItem;
12
14
  }
13
15
  //# sourceMappingURL=DeleteAttributeRequestItemProcessor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteAttributeRequestItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,OAAO,EAAsB,MAAM,gBAAgB,CAAC;AACpK,OAAO,EAAE,WAAW,EAAY,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAA8C,8CAA8C,EAAE,MAAM,8CAA8C,CAAC;AAE1J,qBAAa,mCAAoC,SAAQ,2BAA2B,CAAC,0BAA0B,CAAC;IACtF,4BAA4B,CAAC,WAAW,EAAE,0BAA0B,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA+B5I,SAAS,CAC3B,WAAW,EAAE,0BAA0B,EACvC,MAAM,EAAE,8CAA8C,EACtD,YAAY,EAAE,gBAAgB,GAC/B,OAAO,CAAC,gBAAgB,CAAC;IAkBN,MAAM,CACxB,WAAW,EAAE,0BAA0B,EACvC,MAAM,EAAE,8CAA8C,EACtD,YAAY,EAAE,gBAAgB,GAC/B,OAAO,CAAC,iCAAiC,GAAG,kBAAkB,CAAC;IAsB5C,yBAAyB,CAC3C,YAAY,EAAE,iCAAiC,GAAG,kBAAkB,GAAG,kBAAkB,EACzF,WAAW,EAAE,0BAA0B,EACvC,YAAY,EAAE,gBAAgB,GAC/B,OAAO,CAAC,IAAI,CAAC;CA2CnB"}
1
+ {"version":3,"file":"DeleteAttributeRequestItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,OAAO,EAAsB,MAAM,gBAAgB,CAAC;AACpK,OAAO,EAAE,WAAW,EAAY,MAAM,mBAAmB,CAAC;AAa1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAA8C,8CAA8C,EAAE,MAAM,8CAA8C,CAAC;AAE1J,qBAAa,mCAAoC,SAAQ,2BAA2B,CAAC,0BAA0B,CAAC;IACtF,4BAA4B,CAAC,WAAW,EAAE,0BAA0B,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgD5I,SAAS,CAC3B,WAAW,EAAE,0BAA0B,EACvC,MAAM,EAAE,8CAA8C,EACtD,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IA6BN,MAAM,CACxB,WAAW,EAAE,0BAA0B,EACvC,MAAM,EAAE,8CAA8C,EACtD,YAAY,EAAE,gBAAgB,GAC/B,OAAO,CAAC,iCAAiC,GAAG,kBAAkB,CAAC;IAsB5C,yBAAyB,CAC3C,YAAY,EAAE,iCAAiC,GAAG,kBAAkB,GAAG,kBAAkB,EACzF,WAAW,EAAE,0BAA0B,EACvC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,IAAI,CAAC;YAkBF,qCAAqC;YAgBrC,qCAAqC;CAetD"}
@@ -14,25 +14,37 @@ class DeleteAttributeRequestItemProcessor extends GenericRequestItemProcessor_1.
14
14
  if (!attribute) {
15
15
  return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The Attribute '${requestItem.attributeId.toString()}' could not be found.`));
16
16
  }
17
- if (!attribute.isOwnSharedAttribute(this.accountController.identity.address)) {
18
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The Attribute '${requestItem.attributeId.toString()}' is not an own shared Attribute. You can only request the deletion of own shared Attributes.`));
17
+ if (!recipient) {
18
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The recipient must be specified when sending a DeleteAttributeRequestItem."));
19
19
  }
20
- if (attribute.deletionInfo?.deletionStatus === attributes_1.LocalAttributeDeletionStatus.DeletedByPeer) {
21
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The Attribute was already deleted by the peer."));
20
+ if (!(attribute instanceof attributes_1.OwnIdentityAttribute || attribute instanceof attributes_1.OwnRelationshipAttribute || attribute instanceof attributes_1.PeerRelationshipAttribute)) {
21
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The Attribute '${requestItem.attributeId.toString()}' is not an OwnIdentityAttribute, an OwnRelationshipAttribute or a PeerRelationshipAttribute. You can only request the deletion of such Attributes.`));
22
22
  }
23
- if (attribute.deletionInfo?.deletionStatus === attributes_1.LocalAttributeDeletionStatus.ToBeDeletedByPeer) {
24
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The peer already accepted the deletion of the Attribute."));
23
+ if ((attribute instanceof attributes_1.OwnIdentityAttribute && !(await this.consumptionController.attributes.isAttributeForwardedToPeer(attribute, recipient, true))) ||
24
+ (attribute instanceof attributes_1.OwnRelationshipAttribute &&
25
+ ((attribute.peer.equals(recipient) && attribute.isDeletedOrToBeDeletedByRecipient()) ||
26
+ (!attribute.peer.equals(recipient) && !(await this.consumptionController.attributes.isAttributeForwardedToPeer(attribute, recipient, true)))))) {
27
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The deletion of an own Attribute can only be requested from a peer it is shared with and who hasn't deleted it or agreed to its deletion already."));
25
28
  }
26
- if (!attribute.shareInfo.peer.equals(recipient)) {
27
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The deletion of a shared Attribute can only be requested from the peer the Attribute is shared with."));
29
+ if (attribute instanceof attributes_1.PeerRelationshipAttribute) {
30
+ if (attribute.peer.equals(recipient)) {
31
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The deletion of a PeerRelationshipAttribute cannot be requested for the owner."));
32
+ }
33
+ if (!(await this.consumptionController.attributes.isAttributeForwardedToPeer(attribute, recipient, true))) {
34
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The deletion of a PeerRelationshipAttribute can only be requested from a third party it is shared with and who hasn't deleted it or agreed to its deletion already."));
35
+ }
28
36
  }
29
37
  return ValidationResult_1.ValidationResult.success();
30
38
  }
31
- async canAccept(requestItem, params, _requestInfo) {
39
+ async canAccept(requestItem, params, requestInfo) {
32
40
  const parsedParams = AcceptDeleteAttributeRequestItemParameters_1.AcceptDeleteAttributeRequestItemParameters.from(params);
33
41
  const attribute = await this.consumptionController.attributes.getLocalAttribute(requestItem.attributeId);
34
42
  if (!attribute)
35
43
  return ValidationResult_1.ValidationResult.success();
44
+ if (!(attribute instanceof attributes_1.PeerIdentityAttribute || attribute instanceof attributes_1.PeerRelationshipAttribute || attribute instanceof attributes_1.ThirdPartyRelationshipAttribute) ||
45
+ !attribute.peer.equals(requestInfo.peer)) {
46
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The recipient isn't the peer of the Attribute and therefore isn't allowed to request the deletion of the Attribute."));
47
+ }
36
48
  const deletionDate = parsedParams.deletionDate;
37
49
  if (!deletionDate.dateTime.isValid) {
38
50
  return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidAcceptParameters("The deletionDate is invalid."));
@@ -43,59 +55,54 @@ class DeleteAttributeRequestItemProcessor extends GenericRequestItemProcessor_1.
43
55
  return ValidationResult_1.ValidationResult.success();
44
56
  }
45
57
  async accept(requestItem, params, _requestInfo) {
46
- const attribute = await this.consumptionController.attributes.getLocalAttribute(requestItem.attributeId);
58
+ const attribute = (await this.consumptionController.attributes.getLocalAttribute(requestItem.attributeId));
47
59
  if (!attribute)
48
60
  return content_1.AcceptResponseItem.from({ result: content_1.ResponseItemResult.Accepted });
49
61
  const deletionDate = core_types_1.CoreDate.from(params.deletionDate);
50
- const deletionInfo = attributes_1.LocalAttributeDeletionInfo.from({
51
- deletionStatus: attributes_1.LocalAttributeDeletionStatus.ToBeDeleted,
62
+ const deletionInfo = attributes_1.ReceivedAttributeDeletionInfo.from({
63
+ deletionStatus: attributes_1.ReceivedAttributeDeletionStatus.ToBeDeleted,
52
64
  deletionDate: deletionDate
53
65
  });
54
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
55
- for (const attr of [attribute, ...predecessors]) {
56
- attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
57
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
58
- }
66
+ await this.consumptionController.attributes.setPeerDeletionInfoOfReceivedAttributeAndPredecessors(attribute, deletionInfo);
59
67
  return content_1.DeleteAttributeAcceptResponseItem.from({
60
68
  deletionDate: deletionDate,
61
69
  result: content_1.ResponseItemResult.Accepted
62
70
  });
63
71
  }
64
- async applyIncomingResponseItem(responseItem, requestItem, _requestInfo) {
72
+ async applyIncomingResponseItem(responseItem, requestItem, requestInfo) {
65
73
  if (responseItem instanceof content_1.AcceptResponseItem && !(responseItem instanceof content_1.DeleteAttributeAcceptResponseItem)) {
66
74
  return;
67
75
  }
68
76
  const attribute = await this.consumptionController.attributes.getLocalAttribute(requestItem.attributeId);
69
77
  if (!attribute)
70
78
  return;
71
- if (attribute.deletionInfo?.deletionStatus === attributes_1.LocalAttributeDeletionStatus.DeletedByPeer)
79
+ if (!(attribute instanceof attributes_1.OwnIdentityAttribute || attribute instanceof attributes_1.OwnRelationshipAttribute || attribute instanceof attributes_1.PeerRelationshipAttribute))
72
80
  return;
73
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
74
81
  if (responseItem instanceof content_1.DeleteAttributeAcceptResponseItem) {
75
- const deletionInfo = attributes_1.LocalAttributeDeletionInfo.from({
76
- deletionStatus: attributes_1.LocalAttributeDeletionStatus.ToBeDeletedByPeer,
77
- deletionDate: responseItem.deletionDate
78
- });
79
- for (const attr of [attribute, ...predecessors]) {
80
- if (attr.deletionInfo?.deletionStatus !== attributes_1.LocalAttributeDeletionStatus.DeletedByPeer) {
81
- attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
82
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
83
- }
84
- }
85
- }
86
- if (responseItem instanceof content_1.RejectResponseItem) {
87
- const deletionInfo = attributes_1.LocalAttributeDeletionInfo.from({
88
- deletionStatus: attributes_1.LocalAttributeDeletionStatus.DeletionRequestRejected,
89
- deletionDate: core_types_1.CoreDate.utc()
90
- });
91
- for (const attr of [attribute, ...predecessors]) {
92
- if (attr.deletionInfo?.deletionStatus !== attributes_1.LocalAttributeDeletionStatus.ToBeDeletedByPeer &&
93
- attr.deletionInfo?.deletionStatus !== attributes_1.LocalAttributeDeletionStatus.DeletedByPeer) {
94
- attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
95
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
96
- }
97
- }
82
+ await this.setDeletionInfoForAcceptedRequestItem(attribute, responseItem.deletionDate, requestInfo.peer);
83
+ return;
98
84
  }
85
+ await this.setDeletionInfoForRejectedRequestItem(attribute, core_types_1.CoreDate.utc(), requestInfo.peer);
86
+ }
87
+ async setDeletionInfoForAcceptedRequestItem(attribute, deletionDate, peer) {
88
+ const deletionInfo = attributes_1.EmittedAttributeDeletionInfo.from({
89
+ deletionStatus: attributes_1.EmittedAttributeDeletionStatus.ToBeDeletedByRecipient,
90
+ deletionDate
91
+ });
92
+ const deletionWasRequestedFromInitialPeer = attribute instanceof attributes_1.OwnRelationshipAttribute && attribute.peer.equals(peer);
93
+ return deletionWasRequestedFromInitialPeer
94
+ ? await this.consumptionController.attributes.setPeerDeletionInfoOfOwnRelationshipAttributeAndPredecessors(attribute, deletionInfo)
95
+ : await this.consumptionController.attributes.setForwardedDeletionInfoOfAttributeAndPredecessors(attribute, deletionInfo, peer);
96
+ }
97
+ async setDeletionInfoForRejectedRequestItem(attribute, deletionDate, peer) {
98
+ const deletionInfo = attributes_1.EmittedAttributeDeletionInfo.from({
99
+ deletionStatus: attributes_1.EmittedAttributeDeletionStatus.DeletionRequestRejected,
100
+ deletionDate
101
+ });
102
+ const deletionWasRequestedFromInitialPeer = attribute instanceof attributes_1.OwnRelationshipAttribute && attribute.peer.equals(peer);
103
+ return deletionWasRequestedFromInitialPeer
104
+ ? await this.consumptionController.attributes.setPeerDeletionInfoOfOwnRelationshipAttributeAndPredecessors(attribute, deletionInfo)
105
+ : await this.consumptionController.attributes.setForwardedDeletionInfoOfAttributeAndPredecessors(attribute, deletionInfo, peer);
99
106
  }
100
107
  }
101
108
  exports.DeleteAttributeRequestItemProcessor = DeleteAttributeRequestItemProcessor;
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteAttributeRequestItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.ts"],"names":[],"mappings":";;;AAAA,4CAAoK;AACpK,kDAA0D;AAC1D,yFAAsF;AACtF,oDAA+F;AAC/F,uEAAoE;AACpE,gFAA6E;AAE7E,6GAA0J;AAE1J,MAAa,mCAAoC,SAAQ,yDAAuD;IAC5F,KAAK,CAAC,4BAA4B,CAAC,WAAuC,EAAE,QAAiB,EAAE,SAAuB;QAClI,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACzG,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,OAAO,mCAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,kBAAkB,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAClK,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3E,OAAO,mCAAgB,CAAC,KAAK,CACzB,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAC7C,kBAAkB,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,+FAA+F,CACtJ,CACJ,CAAC;QACN,CAAC;QAED,IAAI,SAAS,CAAC,YAAY,EAAE,cAAc,KAAK,yCAA4B,CAAC,aAAa,EAAE,CAAC;YACxF,OAAO,mCAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,gDAAgD,CAAC,CAAC,CAAC;QACvI,CAAC;QAED,IAAI,SAAS,CAAC,YAAY,EAAE,cAAc,KAAK,yCAA4B,CAAC,iBAAiB,EAAE,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IAAI,CAAC,YAAY,EAAE,cAAc,KAAK,yCAA4B,CAAC,aAAa,EAClF,CAAC;oBACC,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBAC5E,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;gBAC5E,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AA/HD,kFA+HC"}
1
+ {"version":3,"file":"DeleteAttributeRequestItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.ts"],"names":[],"mappings":";;;AAAA,4CAAoK;AACpK,kDAA0D;AAC1D,yFAAsF;AACtF,oDAU6B;AAC7B,uEAAoE;AACpE,gFAA6E;AAE7E,6GAA0J;AAE1J,MAAa,mCAAoC,SAAQ,yDAAuD;IAC5F,KAAK,CAAC,4BAA4B,CAAC,WAAuC,EAAE,QAAiB,EAAE,SAAuB;QAClI,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACzG,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,OAAO,mCAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,kBAAkB,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAClK,CAAC;QAED,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,OAAO,mCAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,4EAA4E,CAAC,CAAC,CAAC;QACnK,CAAC;QAED,IAAI,CAAC,CAAC,SAAS,YAAY,iCAAoB,IAAI,SAAS,YAAY,qCAAwB,IAAI,SAAS,YAAY,sCAAyB,CAA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AAC,SAAS,EAAE,YAAY,CAAC;YACnI,CAAC,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,kDAAkD,CAAC,SAAS,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;IACxI,CAAC;CACJ;AAjKD,kFAiKC"}
@@ -1,6 +1,6 @@
1
1
  import { AttributeAlreadySharedAcceptResponseItem, AttributeSuccessionAcceptResponseItem, ProposeAttributeAcceptResponseItem, ProposeAttributeRequestItem, RejectResponseItem, Request } from "@nmshd/content";
2
2
  import { CoreAddress } from "@nmshd/core-types";
3
- import { PeerSharedAttributeSucceededEvent } from "../../../attributes";
3
+ import { AttributeSucceededEvent } from "../../../attributes";
4
4
  import { ValidationResult } from "../../../common/ValidationResult";
5
5
  import { GenericRequestItemProcessor } from "../GenericRequestItemProcessor";
6
6
  import { LocalRequestInfo } from "../IRequestItemProcessor";
@@ -11,6 +11,6 @@ export declare class ProposeAttributeRequestItemProcessor extends GenericRequest
11
11
  private validateQuery;
12
12
  canAccept(requestItem: ProposeAttributeRequestItem, params: AcceptProposeAttributeRequestItemParametersJSON, requestInfo: LocalRequestInfo): Promise<ValidationResult>;
13
13
  accept(_requestItem: ProposeAttributeRequestItem, params: AcceptProposeAttributeRequestItemParametersJSON, requestInfo: LocalRequestInfo): Promise<ProposeAttributeAcceptResponseItem | AttributeSuccessionAcceptResponseItem | AttributeAlreadySharedAcceptResponseItem>;
14
- applyIncomingResponseItem(responseItem: ProposeAttributeAcceptResponseItem | AttributeSuccessionAcceptResponseItem | AttributeAlreadySharedAcceptResponseItem | RejectResponseItem, _requestItem: ProposeAttributeRequestItem, requestInfo: LocalRequestInfo): Promise<PeerSharedAttributeSucceededEvent | void>;
14
+ applyIncomingResponseItem(responseItem: ProposeAttributeAcceptResponseItem | AttributeSuccessionAcceptResponseItem | AttributeAlreadySharedAcceptResponseItem | RejectResponseItem, _requestItem: ProposeAttributeRequestItem, requestInfo: LocalRequestInfo): Promise<AttributeSucceededEvent | void>;
15
15
  }
16
16
  //# sourceMappingURL=ProposeAttributeRequestItemProcessor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProposeAttributeRequestItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,wCAAwC,EACxC,qCAAqC,EAIrC,kCAAkC,EAClC,2BAA2B,EAC3B,kBAAkB,EAGlB,OAAO,EAEV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAU,MAAM,mBAAmB,CAAC;AAIxD,OAAO,EAA8G,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAEpL,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,EAA+C,+CAA+C,EAAE,MAAM,+CAA+C,CAAC;AAE7J,qBAAa,oCAAqC,SAAQ,2BAA2B,CAAC,2BAA2B,EAAE,+CAA+C,CAAC;IACzI,4BAA4B,CAAC,WAAW,EAAE,2BAA2B,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;YAyCrJ,iBAAiB;YAoBjB,aAAa;IAsBL,SAAS,CAC3B,WAAW,EAAE,2BAA2B,EACxC,MAAM,EAAE,+CAA+C,EACvD,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IAsHN,MAAM,CACxB,YAAY,EAAE,2BAA2B,EACzC,MAAM,EAAE,+CAA+C,EACvD,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,kCAAkC,GAAG,qCAAqC,GAAG,wCAAwC,CAAC;IA+G3G,yBAAyB,CAC3C,YAAY,EAAE,kCAAkC,GAAG,qCAAqC,GAAG,wCAAwC,GAAG,kBAAkB,EACxJ,YAAY,EAAE,2BAA2B,EACzC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,iCAAiC,GAAG,IAAI,CAAC;CAwBvD"}
1
+ {"version":3,"file":"ProposeAttributeRequestItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,wCAAwC,EACxC,qCAAqC,EAErC,kCAAkC,EAClC,2BAA2B,EAC3B,kBAAkB,EAGlB,OAAO,EAEV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EACH,uBAAuB,EAO1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,EAA+C,+CAA+C,EAAE,MAAM,+CAA+C,CAAC;AAE7J,qBAAa,oCAAqC,SAAQ,2BAA2B,CAAC,2BAA2B,EAAE,+CAA+C,CAAC;IACzI,4BAA4B,CAAC,WAAW,EAAE,2BAA2B,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;YAyCrJ,iBAAiB;YAoBjB,aAAa;IAsBL,SAAS,CAC3B,WAAW,EAAE,2BAA2B,EACxC,MAAM,EAAE,+CAA+C,EACvD,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IAiGN,MAAM,CACxB,YAAY,EAAE,2BAA2B,EACzC,MAAM,EAAE,+CAA+C,EACvD,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,kCAAkC,GAAG,qCAAqC,GAAG,wCAAwC,CAAC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