@nmshd/consumption 7.0.0-openid4vc.6 → 7.1.0-openid4vc.1

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 (268) hide show
  1. package/LICENSE +659 -3
  2. package/README.md +1 -1
  3. package/dist/buildInformation.js +4 -4
  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.map +1 -1
  7. package/dist/consumption/ConsumptionController.js +5 -5
  8. package/dist/consumption/ConsumptionController.js.map +1 -1
  9. package/dist/consumption/ConsumptionCoreErrors.d.ts +7 -37
  10. package/dist/consumption/ConsumptionCoreErrors.d.ts.map +1 -1
  11. package/dist/consumption/ConsumptionCoreErrors.js +18 -114
  12. package/dist/consumption/ConsumptionCoreErrors.js.map +1 -1
  13. package/dist/consumption/ConsumptionIds.d.ts +1 -0
  14. package/dist/consumption/ConsumptionIds.d.ts.map +1 -1
  15. package/dist/consumption/ConsumptionIds.js +1 -0
  16. package/dist/consumption/ConsumptionIds.js.map +1 -1
  17. package/dist/modules/attributes/AttributesController.d.ts +108 -69
  18. package/dist/modules/attributes/AttributesController.d.ts.map +1 -1
  19. package/dist/modules/attributes/AttributesController.js +664 -734
  20. package/dist/modules/attributes/AttributesController.js.map +1 -1
  21. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts +1 -1
  22. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts.map +1 -1
  23. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts +1 -1
  24. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts.map +1 -1
  25. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts +9 -0
  26. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts.map +1 -0
  27. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js +12 -0
  28. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js.map +1 -0
  29. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts +11 -0
  30. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts.map +1 -0
  31. package/dist/modules/attributes/events/AttributeSucceededEvent.js +12 -0
  32. package/dist/modules/attributes/events/AttributeSucceededEvent.js.map +1 -0
  33. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts +1 -1
  34. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts.map +1 -1
  35. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts +7 -0
  36. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts.map +1 -0
  37. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js +12 -0
  38. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js.map +1 -0
  39. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts +7 -0
  40. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts.map +1 -0
  41. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js +12 -0
  42. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js.map +1 -0
  43. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts +7 -0
  44. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts.map +1 -0
  45. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js +12 -0
  46. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js.map +1 -0
  47. package/dist/modules/attributes/events/index.d.ts +5 -9
  48. package/dist/modules/attributes/events/index.d.ts.map +1 -1
  49. package/dist/modules/attributes/events/index.js +5 -9
  50. package/dist/modules/attributes/events/index.js.map +1 -1
  51. package/dist/modules/attributes/index.d.ts +9 -7
  52. package/dist/modules/attributes/index.d.ts.map +1 -1
  53. package/dist/modules/attributes/index.js +9 -7
  54. package/dist/modules/attributes/index.js.map +1 -1
  55. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts +28 -0
  56. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts.map +1 -0
  57. package/dist/modules/attributes/local/AttributeForwardingDetails.js +62 -0
  58. package/dist/modules/attributes/local/AttributeForwardingDetails.js.map +1 -0
  59. package/dist/modules/attributes/local/QueryTranslator.d.ts.map +1 -1
  60. package/dist/modules/attributes/local/QueryTranslator.js +1 -1
  61. package/dist/modules/attributes/local/QueryTranslator.js.map +1 -1
  62. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts +29 -0
  63. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts.map +1 -0
  64. package/dist/modules/attributes/local/{AttributeSuccessorParams.js → attributeTypes/LocalAttribute.js} +34 -26
  65. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.js.map +1 -0
  66. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts +19 -0
  67. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts.map +1 -0
  68. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.js +40 -0
  69. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.js.map +1 -0
  70. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts +29 -0
  71. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts.map +1 -0
  72. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js +73 -0
  73. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js.map +1 -0
  74. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts +29 -0
  75. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts.map +1 -0
  76. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js +76 -0
  77. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js.map +1 -0
  78. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts +30 -0
  79. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts.map +1 -0
  80. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js +76 -0
  81. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js.map +1 -0
  82. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts +33 -0
  83. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts.map +1 -0
  84. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js +85 -0
  85. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js.map +1 -0
  86. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts +15 -0
  87. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts.map +1 -0
  88. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js +28 -0
  89. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js.map +1 -0
  90. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts +18 -0
  91. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts.map +1 -0
  92. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js +38 -0
  93. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js.map +1 -0
  94. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts +16 -0
  95. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts.map +1 -0
  96. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js +36 -0
  97. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js.map +1 -0
  98. package/dist/modules/attributes/local/deletionInfos/index.d.ts +4 -0
  99. package/dist/modules/attributes/local/deletionInfos/index.d.ts.map +1 -0
  100. package/dist/modules/attributes/local/deletionInfos/index.js +20 -0
  101. package/dist/modules/attributes/local/deletionInfos/index.js.map +1 -0
  102. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts +13 -0
  103. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts.map +1 -0
  104. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js +29 -0
  105. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js.map +1 -0
  106. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts +17 -0
  107. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  108. package/dist/modules/attributes/local/{CreateAttributeParams.js → successorParams/OwnRelationshipAttributeSuccessorParams.js} +10 -15
  109. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.js.map +1 -0
  110. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts +20 -0
  111. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts.map +1 -0
  112. package/dist/modules/attributes/local/{CreateRepositoryAttributeParams.js → successorParams/PeerIdentityAttributeSuccessorParams.js} +16 -13
  113. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.js.map +1 -0
  114. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts +20 -0
  115. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  116. package/dist/modules/attributes/local/{CreateSharedLocalAttributeCopyParams.js → successorParams/PeerRelationshipAttributeSuccessorParams.js} +15 -16
  117. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.js.map +1 -0
  118. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts +20 -0
  119. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  120. package/dist/modules/attributes/local/{CreateSharedLocalAttributeParams.js → successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js} +15 -22
  121. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js.map +1 -0
  122. package/dist/modules/attributes/local/successorParams/index.d.ts +6 -0
  123. package/dist/modules/attributes/local/successorParams/index.d.ts.map +1 -0
  124. package/dist/modules/attributes/local/successorParams/index.js +22 -0
  125. package/dist/modules/attributes/local/successorParams/index.js.map +1 -0
  126. package/dist/modules/notifications/index.d.ts +4 -4
  127. package/dist/modules/notifications/index.d.ts.map +1 -1
  128. package/dist/modules/notifications/index.js +4 -4
  129. package/dist/modules/notifications/index.js.map +1 -1
  130. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  131. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  132. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js +53 -0
  133. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  134. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts +14 -0
  135. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +1 -0
  136. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js +59 -0
  137. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js.map +1 -0
  138. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  139. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  140. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +63 -0
  141. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  142. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts +15 -0
  143. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts.map +1 -0
  144. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js +102 -0
  145. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js.map +1 -0
  146. package/dist/modules/openid4vc/local/EnmeshedStorageService.d.ts +2 -2
  147. package/dist/modules/openid4vc/local/EnmeshedStorageService.d.ts.map +1 -1
  148. package/dist/modules/openid4vc/local/EnmeshedStorageService.js +7 -7
  149. package/dist/modules/openid4vc/local/EnmeshedStorageService.js.map +1 -1
  150. package/dist/modules/openid4vc/local/Holder.d.ts +2 -2
  151. package/dist/modules/openid4vc/local/Holder.d.ts.map +1 -1
  152. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts +2 -2
  153. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts.map +1 -1
  154. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js +54 -20
  155. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js.map +1 -1
  156. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts +4 -2
  157. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts.map +1 -1
  158. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js +50 -43
  159. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js.map +1 -1
  160. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts +2 -2
  161. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts.map +1 -1
  162. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js +83 -97
  163. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js.map +1 -1
  164. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts +2 -2
  165. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts.map +1 -1
  166. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js +136 -133
  167. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js.map +1 -1
  168. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts +3 -5
  169. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts.map +1 -1
  170. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js +94 -90
  171. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js.map +1 -1
  172. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts +2 -2
  173. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts.map +1 -1
  174. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js +7 -11
  175. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js.map +1 -1
  176. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.d.ts.map +1 -1
  177. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js +31 -53
  178. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js.map +1 -1
  179. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js +2 -2
  180. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js.map +1 -1
  181. package/dist/modules/requests/local/LocalRequest.js +1 -1
  182. package/dist/modules/requests/local/LocalRequest.js.map +1 -1
  183. package/dist/modules/requests/local/LocalResponse.js +1 -1
  184. package/dist/modules/requests/local/LocalResponse.js.map +1 -1
  185. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts +1 -1
  186. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts.map +1 -1
  187. package/dist/modules/requests/outgoing/OutgoingRequestsController.js +17 -16
  188. package/dist/modules/requests/outgoing/OutgoingRequestsController.js.map +1 -1
  189. package/package.json +5 -5
  190. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts +0 -6
  191. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts.map +0 -1
  192. package/dist/modules/attributes/events/AttributeSucceededEventData.js +0 -3
  193. package/dist/modules/attributes/events/AttributeSucceededEventData.js.map +0 -1
  194. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts +0 -7
  195. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts.map +0 -1
  196. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js +0 -12
  197. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js.map +0 -1
  198. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts +0 -8
  199. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts.map +0 -1
  200. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js +0 -12
  201. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js.map +0 -1
  202. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts +0 -7
  203. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts.map +0 -1
  204. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js +0 -12
  205. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js.map +0 -1
  206. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts +0 -8
  207. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts.map +0 -1
  208. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js +0 -12
  209. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js.map +0 -1
  210. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts +0 -8
  211. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts.map +0 -1
  212. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js +0 -12
  213. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js.map +0 -1
  214. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts +0 -7
  215. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts.map +0 -1
  216. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js +0 -12
  217. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js.map +0 -1
  218. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts +0 -7
  219. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts.map +0 -1
  220. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js +0 -12
  221. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js.map +0 -1
  222. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts +0 -8
  223. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts.map +0 -1
  224. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js +0 -12
  225. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js.map +0 -1
  226. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts +0 -24
  227. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts.map +0 -1
  228. package/dist/modules/attributes/local/AttributeSuccessorParams.js.map +0 -1
  229. package/dist/modules/attributes/local/CreateAttributeParams.d.ts +0 -15
  230. package/dist/modules/attributes/local/CreateAttributeParams.d.ts.map +0 -1
  231. package/dist/modules/attributes/local/CreateAttributeParams.js.map +0 -1
  232. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts +0 -20
  233. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts.map +0 -1
  234. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.js.map +0 -1
  235. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts +0 -22
  236. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts.map +0 -1
  237. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.js.map +0 -1
  238. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts +0 -26
  239. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts.map +0 -1
  240. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.js.map +0 -1
  241. package/dist/modules/attributes/local/LocalAttribute.d.ts +0 -112
  242. package/dist/modules/attributes/local/LocalAttribute.d.ts.map +0 -1
  243. package/dist/modules/attributes/local/LocalAttribute.js +0 -186
  244. package/dist/modules/attributes/local/LocalAttribute.js.map +0 -1
  245. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts +0 -24
  246. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts.map +0 -1
  247. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js +0 -42
  248. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js.map +0 -1
  249. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts +0 -26
  250. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts.map +0 -1
  251. package/dist/modules/attributes/local/LocalAttributeShareInfo.js +0 -59
  252. package/dist/modules/attributes/local/LocalAttributeShareInfo.js.map +0 -1
  253. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts +0 -14
  254. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +0 -1
  255. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js +0 -56
  256. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js.map +0 -1
  257. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  258. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  259. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  260. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  261. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  262. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  263. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  264. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  265. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts +0 -15
  266. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts.map +0 -1
  267. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js +0 -74
  268. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js.map +0 -1
@@ -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,CAAC,CAAC;IACrG,CAAC;IAEe,KAAK,CAAC,4CAA4C,CAC9D,gBAAwD,EACxD,YAA+B;QAE/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;YACrE,OAAO,yBAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAC,CAAC;QAC/F,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAClH,IAAI,CAAC,WAAW;YAAE,OAAO,yBAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,CAAC;QAE5G,IAAI,CAAC,CAAC,WAAW,YAAY,kCAAqB,IAAI,WAAW,YAAY,sCAAyB,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,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,14 +1,14 @@
1
1
  import { AgentContext, BaseRecord, BaseRecordConstructor, Query, QueryOptions, StorageService } from "@credo-ts/core";
2
2
  import { AccountController } from "@nmshd/transport";
3
+ import { OwnIdentityAttribute } from "../../attributes";
3
4
  import { AttributesController } from "../../attributes/AttributesController";
4
- import { LocalAttribute } from "../../attributes/local/LocalAttribute";
5
5
  export declare class EnmeshedStorageService<T extends BaseRecord> implements StorageService<T> {
6
6
  accountController: AccountController;
7
7
  attributeController: AttributesController;
8
8
  storrage: Map<string, T>;
9
9
  constructor(accountController: AccountController, attributeController: AttributesController);
10
10
  save(agentContext: AgentContext, record: T): Promise<void>;
11
- saveWithDisplay(agentContext: AgentContext, value: string, type: string, displayInformation: string, title: string): Promise<LocalAttribute>;
11
+ saveWithDisplay(agentContext: AgentContext, value: string, type: string, displayInformation: string, title: string): Promise<OwnIdentityAttribute>;
12
12
  update(agentContext: AgentContext, record: T): Promise<void>;
13
13
  delete(agentContext: AgentContext, record: T): Promise<void>;
14
14
  deleteById(agentContext: AgentContext, recordClass: BaseRecordConstructor<T>, id: string): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"EnmeshedStorageService.d.ts","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/EnmeshedStorageService.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,UAAU,EACV,qBAAqB,EAMrB,KAAK,E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B,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAmBlJ,MAAM,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB5D,MAAM,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5D,UAAU,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASxG,OAAO,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAiBlG,MAAM,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IA0CvF,kBAAkB,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAMrG,WAAW,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;CAkC1J"}
@@ -46,7 +46,7 @@ let EnmeshedStorageService = class EnmeshedStorageService {
46
46
  },
47
47
  owner: owner
48
48
  });
49
- const result = await this.attributeController.createRepositoryAttribute({
49
+ const result = await this.attributeController.createOwnIdentityAttribute({
50
50
  content: identityAttribute
51
51
  });
52
52
  agentContext.config.logger.debug(`Saved record: ${JSON.stringify(result)}`);
@@ -64,7 +64,7 @@ let EnmeshedStorageService = class EnmeshedStorageService {
64
64
  },
65
65
  owner: owner
66
66
  });
67
- const result = await this.attributeController.createRepositoryAttribute({
67
+ const result = await this.attributeController.createOwnIdentityAttribute({
68
68
  content: identityAttribute
69
69
  });
70
70
  agentContext.config.logger.debug(`Saved record: ${JSON.stringify(result)}`);
@@ -86,9 +86,9 @@ let EnmeshedStorageService = class EnmeshedStorageService {
86
86
  },
87
87
  owner: owner
88
88
  });
89
- await this.attributeController.createRepositoryAttribute({
90
- content: identityAttribute,
91
- id: core_types_1.CoreId.from(record.id)
89
+ await this.attributeController.createOwnIdentityAttribute({
90
+ content: identityAttribute
91
+ // id: CoreId.from(record.id)
92
92
  });
93
93
  return await Promise.resolve();
94
94
  }
@@ -98,7 +98,7 @@ let EnmeshedStorageService = class EnmeshedStorageService {
98
98
  if (attribute === undefined) {
99
99
  throw new Error(`Attribute with id ${record.id} not found`);
100
100
  }
101
- await this.attributeController.deleteAttribute(attribute);
101
+ await this.attributeController.deleteAttribute(attribute.id);
102
102
  }
103
103
  async deleteById(agentContext, recordClass, id) {
104
104
  agentContext.config.logger.debug(`Deleting record with id ${id} - with record class ${recordClass.name}`);
@@ -106,7 +106,7 @@ let EnmeshedStorageService = class EnmeshedStorageService {
106
106
  if (attribute === undefined) {
107
107
  throw new Error(`Attribute with id ${id} not found`);
108
108
  }
109
- await this.attributeController.deleteAttribute(attribute);
109
+ await this.attributeController.deleteAttribute(attribute.id);
110
110
  }
111
111
  async getById(agentContext, recordClass, id) {
112
112
  if (this.storrage.has(id)) {
@@ -1 +1 @@
1
- {"version":3,"file":"EnmeshedStorageService.js","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/EnmeshedStorageService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAgBwB;AACxB,4CAAmD;AACnD,kDAA2C;AAC3C,gDAAqD;AACrD,gFAA6E;AAItE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG/B,YACW,iBAAoC,EACpC,mBAAyC;QADzC,sBAAiB,GAAjB,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AC,IAAI,CAAC,MAAM,CAAC,CAAC;YACzB,CAAC;QACL,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,qDAAqD;YACrD,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;gBAC1C,IAAI,KAAK,GAAG,IAAI,CAAC;gBACjB,iEAAiE;gBACjE,kDAAkD;gBAClD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC/C,IAAK,MAAc,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC;wBACjC,KAAK,GAAG,KAAK,CAAC;wBACd,MAAM;oBACV,CAAC;gBACL,CAAC;gBACD,IAAI,KAAK,EAAE,CAAC;oBACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACzB,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ,CAAA;AA1MY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,iBAAU,GAAE;qCAKqB,6BAAiB;QACf,2CAAoB;GAL3C,sBAAsB,CA0MlC"}
1
+ {"version":3,"file":"EnmeshedStorageService.js","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/EnmeshedStorageService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAgBwB;AACxB,4CAAmD;AACnD,kDAA2C;AAC3C,gDAAqD;AAErD,gFAA6E;AAGtE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG/B,YACW,iBAAoC,EACpC,mBAAyC;QADzC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,wBAAmB,GAAnB,mBAAmB,CAAsB;QAJ7C,aAAQ,GAAmB,IAAI,GAAG,EAAa,CAAC;IAKpD,CAAC;IAEG,KAAK,CAAC,IAAI,CAAC,YAA0B,EAAE,MAAS;Q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,CAAC;gBAC1C,IAAI,KAAK,GAAG,IAAI,CAAC;gBACjB,iEAAiE;gBACjE,kDAAkD;gBAClD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC/C,IAAK,MAAc,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC;wBACjC,KAAK,GAAG,KAAK,CAAC;wBACd,MAAM;oBACV,CAAC;gBACL,CAAC;gBACD,IAAI,KAAK,EAAE,CAAC;oBACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACzB,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ,CAAA;AA1MY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,iBAAU,GAAE;qCAKqB,6BAAiB;QACf,2CAAoB;GAL3C,sBAAsB,CA0MlC"}
@@ -1,7 +1,7 @@
1
1
  import { X509Module } from "@credo-ts/core";
2
2
  import { OpenId4VcModule, type OpenId4VciMetadata, type OpenId4VciResolvedCredentialOffer, type OpenId4VpResolvedAuthorizationRequest } from "@credo-ts/openid4vc";
3
3
  import { AccountController } from "@nmshd/transport";
4
- import { AttributesController, LocalAttribute } from "../../attributes";
4
+ import { AttributesController, OwnIdentityAttribute } from "../../attributes";
5
5
  import { BaseAgent } from "./BaseAgent";
6
6
  declare function getOpenIdHolderModules(): {
7
7
  readonly openid4vc: OpenId4VcModule<null, null>;
@@ -24,7 +24,7 @@ export declare class Holder extends BaseAgent<ReturnType<typeof getOpenIdHolderM
24
24
  code?: string;
25
25
  redirectUri?: string;
26
26
  txCode?: string;
27
- }): Promise<LocalAttribute[]>;
27
+ }): Promise<OwnIdentityAttribute[]>;
28
28
  resolveProofRequest(proofRequest: string): Promise<any>;
29
29
  acceptPresentationRequest(resolvedPresentationRequest: OpenId4VpResolvedAuthorizationRequest): Promise<any>;
30
30
  exit(): Promise<any>;
@@ -1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AC,GAAG,CAAC;IAiC/H,0BAA0B,CACnC,uBAAuB,EAAE,iCAAiC,EAC1D,OAAO,EAAE;QACL,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,oBAAoB,EAAE,MAAM,EAAE,CAAC;QAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,GACF,OAAO,CAAC,oBAAoB,EAAE,CAAC;IA2HrB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAMvD,yBAAyB,CAAC,2BAA2B,EAAE,qCAAqC,GAAG,OAAO,CAAC,GAAG,CAAC;IAuD3G,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAKpB,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC;CAGvC"}
@@ -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,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;QAED,IAAI,WAAW,CAAC,SAAS,YAAY,2BAAiB,EAAE,CAAC;YACrD,IAAI,sBAAsB,EAAE,CAAC;gBACzB,OAAO,mCAAgB,CAAC,KAAK,CACzB,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAC7C,kHAAkH,CACrH,CACJ,C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"}
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;QAED,IAAI,WAAW,CAAC,SAAS,YAAY,2BAAiB,EAAE,CAAC;YACrD,IAAI,sBAAsB,EAAE,CAAC;gBACzB,OAAO,mCAAgB,CAAC,KAAK,CACzB,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAC7C,iHAAiH,CACpH,CACJ,CAAC;YACN,CAAC;YAED,IAAI,CAAC,CAAC,yBAAyB,IAAI,kBAAkB,CAAC,EAAE,CAAC;gBACrD,OAAO,mCAAgB,CAAC,KAAK,CACzB,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAC7C,gMAAgM,CACnM,CACJ,CAAC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,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;