@nmshd/consumption 7.0.0-alpha.70 → 7.0.0-alpha.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/dist/buildInformation.js +4 -4
  2. package/dist/consumption/ConsumptionConfig.d.ts +1 -1
  3. package/dist/consumption/ConsumptionConfig.d.ts.map +1 -1
  4. package/dist/consumption/ConsumptionController.d.ts.map +1 -1
  5. package/dist/consumption/ConsumptionController.js +5 -5
  6. package/dist/consumption/ConsumptionController.js.map +1 -1
  7. package/dist/consumption/ConsumptionCoreErrors.d.ts +7 -37
  8. package/dist/consumption/ConsumptionCoreErrors.d.ts.map +1 -1
  9. package/dist/consumption/ConsumptionCoreErrors.js +18 -114
  10. package/dist/consumption/ConsumptionCoreErrors.js.map +1 -1
  11. package/dist/consumption/ConsumptionIds.d.ts +1 -0
  12. package/dist/consumption/ConsumptionIds.d.ts.map +1 -1
  13. package/dist/consumption/ConsumptionIds.js +1 -0
  14. package/dist/consumption/ConsumptionIds.js.map +1 -1
  15. package/dist/modules/attributes/AttributesController.d.ts +106 -69
  16. package/dist/modules/attributes/AttributesController.d.ts.map +1 -1
  17. package/dist/modules/attributes/AttributesController.js +640 -732
  18. package/dist/modules/attributes/AttributesController.js.map +1 -1
  19. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts +1 -1
  20. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts.map +1 -1
  21. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts +1 -1
  22. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts.map +1 -1
  23. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts +9 -0
  24. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts.map +1 -0
  25. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js +12 -0
  26. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js.map +1 -0
  27. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts +11 -0
  28. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts.map +1 -0
  29. package/dist/modules/attributes/events/AttributeSucceededEvent.js +12 -0
  30. package/dist/modules/attributes/events/AttributeSucceededEvent.js.map +1 -0
  31. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts +1 -1
  32. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts.map +1 -1
  33. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts +7 -0
  34. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts.map +1 -0
  35. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js +12 -0
  36. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js.map +1 -0
  37. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts +7 -0
  38. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts.map +1 -0
  39. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js +12 -0
  40. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js.map +1 -0
  41. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts +7 -0
  42. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts.map +1 -0
  43. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js +12 -0
  44. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js.map +1 -0
  45. package/dist/modules/attributes/events/index.d.ts +5 -9
  46. package/dist/modules/attributes/events/index.d.ts.map +1 -1
  47. package/dist/modules/attributes/events/index.js +5 -9
  48. package/dist/modules/attributes/events/index.js.map +1 -1
  49. package/dist/modules/attributes/index.d.ts +9 -7
  50. package/dist/modules/attributes/index.d.ts.map +1 -1
  51. package/dist/modules/attributes/index.js +9 -7
  52. package/dist/modules/attributes/index.js.map +1 -1
  53. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts +28 -0
  54. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts.map +1 -0
  55. package/dist/modules/attributes/local/AttributeForwardingDetails.js +62 -0
  56. package/dist/modules/attributes/local/AttributeForwardingDetails.js.map +1 -0
  57. package/dist/modules/attributes/local/QueryTranslator.d.ts.map +1 -1
  58. package/dist/modules/attributes/local/QueryTranslator.js +1 -1
  59. package/dist/modules/attributes/local/QueryTranslator.js.map +1 -1
  60. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts +29 -0
  61. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts.map +1 -0
  62. package/dist/modules/attributes/local/{AttributeSuccessorParams.js → attributeTypes/LocalAttribute.js} +34 -26
  63. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.js.map +1 -0
  64. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts +19 -0
  65. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts.map +1 -0
  66. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.js +40 -0
  67. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.js.map +1 -0
  68. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts +29 -0
  69. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts.map +1 -0
  70. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js +73 -0
  71. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js.map +1 -0
  72. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts +29 -0
  73. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts.map +1 -0
  74. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js +76 -0
  75. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js.map +1 -0
  76. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts +30 -0
  77. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts.map +1 -0
  78. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js +76 -0
  79. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js.map +1 -0
  80. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts +33 -0
  81. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts.map +1 -0
  82. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js +85 -0
  83. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js.map +1 -0
  84. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts +15 -0
  85. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts.map +1 -0
  86. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js +28 -0
  87. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js.map +1 -0
  88. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts +18 -0
  89. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts.map +1 -0
  90. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js +38 -0
  91. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js.map +1 -0
  92. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts +16 -0
  93. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts.map +1 -0
  94. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js +36 -0
  95. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js.map +1 -0
  96. package/dist/modules/attributes/local/deletionInfos/index.d.ts +4 -0
  97. package/dist/modules/attributes/local/deletionInfos/index.d.ts.map +1 -0
  98. package/dist/modules/attributes/local/deletionInfos/index.js +20 -0
  99. package/dist/modules/attributes/local/deletionInfos/index.js.map +1 -0
  100. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts +13 -0
  101. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts.map +1 -0
  102. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js +29 -0
  103. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js.map +1 -0
  104. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts +17 -0
  105. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  106. package/dist/modules/attributes/local/{CreateAttributeParams.js → successorParams/OwnRelationshipAttributeSuccessorParams.js} +10 -15
  107. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.js.map +1 -0
  108. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts +20 -0
  109. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts.map +1 -0
  110. package/dist/modules/attributes/local/{CreateRepositoryAttributeParams.js → successorParams/PeerIdentityAttributeSuccessorParams.js} +16 -13
  111. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.js.map +1 -0
  112. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts +20 -0
  113. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  114. package/dist/modules/attributes/local/{CreateSharedLocalAttributeCopyParams.js → successorParams/PeerRelationshipAttributeSuccessorParams.js} +15 -16
  115. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.js.map +1 -0
  116. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts +20 -0
  117. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  118. package/dist/modules/attributes/local/{CreateSharedLocalAttributeParams.js → successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js} +15 -22
  119. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js.map +1 -0
  120. package/dist/modules/attributes/local/successorParams/index.d.ts +6 -0
  121. package/dist/modules/attributes/local/successorParams/index.d.ts.map +1 -0
  122. package/dist/modules/attributes/local/successorParams/index.js +22 -0
  123. package/dist/modules/attributes/local/successorParams/index.js.map +1 -0
  124. package/dist/modules/notifications/index.d.ts +4 -4
  125. package/dist/modules/notifications/index.d.ts.map +1 -1
  126. package/dist/modules/notifications/index.js +4 -4
  127. package/dist/modules/notifications/index.js.map +1 -1
  128. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  129. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  130. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js +53 -0
  131. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  132. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts +14 -0
  133. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +1 -0
  134. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js +59 -0
  135. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js.map +1 -0
  136. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  137. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  138. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +63 -0
  139. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  140. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts +15 -0
  141. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts.map +1 -0
  142. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js +102 -0
  143. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js.map +1 -0
  144. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts +2 -2
  145. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts.map +1 -1
  146. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js +54 -20
  147. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js.map +1 -1
  148. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts +4 -2
  149. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts.map +1 -1
  150. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js +50 -43
  151. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js.map +1 -1
  152. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts +2 -2
  153. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts.map +1 -1
  154. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js +83 -97
  155. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js.map +1 -1
  156. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts +2 -2
  157. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts.map +1 -1
  158. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js +136 -133
  159. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js.map +1 -1
  160. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts +3 -5
  161. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts.map +1 -1
  162. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js +94 -90
  163. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js.map +1 -1
  164. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts +2 -2
  165. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts.map +1 -1
  166. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js +7 -11
  167. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js.map +1 -1
  168. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.d.ts.map +1 -1
  169. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js +31 -53
  170. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js.map +1 -1
  171. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js +2 -2
  172. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js.map +1 -1
  173. package/dist/modules/requests/local/LocalRequest.js +1 -1
  174. package/dist/modules/requests/local/LocalRequest.js.map +1 -1
  175. package/dist/modules/requests/local/LocalResponse.js +1 -1
  176. package/dist/modules/requests/local/LocalResponse.js.map +1 -1
  177. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts +1 -1
  178. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts.map +1 -1
  179. package/dist/modules/requests/outgoing/OutgoingRequestsController.js +17 -16
  180. package/dist/modules/requests/outgoing/OutgoingRequestsController.js.map +1 -1
  181. package/package.json +4 -4
  182. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts +0 -6
  183. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts.map +0 -1
  184. package/dist/modules/attributes/events/AttributeSucceededEventData.js +0 -3
  185. package/dist/modules/attributes/events/AttributeSucceededEventData.js.map +0 -1
  186. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts +0 -7
  187. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts.map +0 -1
  188. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js +0 -12
  189. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js.map +0 -1
  190. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts +0 -8
  191. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts.map +0 -1
  192. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js +0 -12
  193. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js.map +0 -1
  194. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts +0 -7
  195. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts.map +0 -1
  196. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js +0 -12
  197. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js.map +0 -1
  198. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts +0 -8
  199. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts.map +0 -1
  200. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js +0 -12
  201. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js.map +0 -1
  202. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts +0 -8
  203. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts.map +0 -1
  204. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js +0 -12
  205. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js.map +0 -1
  206. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts +0 -7
  207. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts.map +0 -1
  208. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js +0 -12
  209. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js.map +0 -1
  210. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts +0 -7
  211. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts.map +0 -1
  212. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js +0 -12
  213. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js.map +0 -1
  214. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts +0 -8
  215. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts.map +0 -1
  216. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js +0 -12
  217. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js.map +0 -1
  218. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts +0 -24
  219. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts.map +0 -1
  220. package/dist/modules/attributes/local/AttributeSuccessorParams.js.map +0 -1
  221. package/dist/modules/attributes/local/CreateAttributeParams.d.ts +0 -15
  222. package/dist/modules/attributes/local/CreateAttributeParams.d.ts.map +0 -1
  223. package/dist/modules/attributes/local/CreateAttributeParams.js.map +0 -1
  224. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts +0 -20
  225. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts.map +0 -1
  226. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.js.map +0 -1
  227. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts +0 -22
  228. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts.map +0 -1
  229. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.js.map +0 -1
  230. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts +0 -26
  231. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts.map +0 -1
  232. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.js.map +0 -1
  233. package/dist/modules/attributes/local/LocalAttribute.d.ts +0 -112
  234. package/dist/modules/attributes/local/LocalAttribute.d.ts.map +0 -1
  235. package/dist/modules/attributes/local/LocalAttribute.js +0 -186
  236. package/dist/modules/attributes/local/LocalAttribute.js.map +0 -1
  237. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts +0 -24
  238. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts.map +0 -1
  239. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js +0 -42
  240. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js.map +0 -1
  241. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts +0 -26
  242. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts.map +0 -1
  243. package/dist/modules/attributes/local/LocalAttributeShareInfo.js +0 -59
  244. package/dist/modules/attributes/local/LocalAttributeShareInfo.js.map +0 -1
  245. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts +0 -14
  246. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +0 -1
  247. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js +0 -56
  248. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js.map +0 -1
  249. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  250. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  251. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  252. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  253. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  254. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  255. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  256. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  257. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts +0 -15
  258. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts.map +0 -1
  259. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js +0 -74
  260. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js.map +0 -1
@@ -13,97 +13,65 @@ const ValidationResult_1 = require("../../../common/ValidationResult");
13
13
  const GenericRequestItemProcessor_1 = require("../GenericRequestItemProcessor");
14
14
  class ShareAttributeRequestItemProcessor extends GenericRequestItemProcessor_1.GenericRequestItemProcessor {
15
15
  async canCreateOutgoingRequestItem(requestItem, _request, recipient) {
16
- const foundAttribute = await this.consumptionController.attributes.getLocalAttribute(requestItem.sourceAttributeId);
16
+ const foundAttribute = await this.consumptionController.attributes.getLocalAttribute(requestItem.attributeId);
17
17
  if (!foundAttribute) {
18
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The Attribute with the given sourceAttributeId '${requestItem.sourceAttributeId.toString()}' could not be found.`));
18
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The Attribute with the given attributeId '${requestItem.attributeId.toString()}' could not be found.`));
19
+ }
20
+ if (!(foundAttribute instanceof attributes_1.OwnIdentityAttribute || foundAttribute instanceof attributes_1.OwnRelationshipAttribute || foundAttribute instanceof attributes_1.PeerRelationshipAttribute)) {
21
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The Attribute with the given attributeId '${requestItem.attributeId.toString()}' is not an OwnIdentityAttribute, an OwnRelationshipAttribute or a PeerRelationshipAttribute.`));
19
22
  }
20
23
  const requestItemAttributeJSON = requestItem.attribute.toJSON();
21
24
  if (!lodash_1.default.isEqual(foundAttribute.content.toJSON(), requestItemAttributeJSON)) {
22
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The Attribute with the given sourceAttributeId '${requestItem.sourceAttributeId.toString()}' does not match the given Attribute.`));
25
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The Attribute with the given attributeId '${requestItem.attributeId.toString()}' does not match the given Attribute.`));
23
26
  }
24
- if (requestItem.attribute instanceof content_1.IdentityAttribute && this.accountController.identity.isMe(requestItem.attribute.owner)) {
25
- if (foundAttribute.isShared()) {
26
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The provided IdentityAttribute is a shared copy of a RepositoryAttribute. You can only share RepositoryAttributes."));
27
+ if (recipient) {
28
+ if (await this.consumptionController.attributes.isAttributeForwardedToPeer(foundAttribute, recipient, true)) {
29
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The Attribute with the given attributeId '${requestItem.attributeId.toString()}' is already shared with the peer.`));
27
30
  }
28
- if (recipient) {
29
- const query = {
30
- "shareInfo.sourceAttribute": requestItem.sourceAttributeId.toString(),
31
- "shareInfo.peer": recipient.toString(),
32
- "deletionInfo.deletionStatus": { $nin: [attributes_1.LocalAttributeDeletionStatus.DeletedByPeer, attributes_1.LocalAttributeDeletionStatus.ToBeDeletedByPeer] }
33
- };
34
- if ((await this.consumptionController.attributes.getLocalAttributes(query)).length > 0) {
35
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The IdentityAttribute with the given sourceAttributeId '${requestItem.sourceAttributeId.toString()}' is already shared with the peer.`));
36
- }
37
- const ownSharedIdentityAttributeSuccessors = await this.consumptionController.attributes.getSharedSuccessorsOfAttribute(foundAttribute, {
38
- "shareInfo.peer": recipient.toString(),
39
- "deletionInfo.deletionStatus": { $nin: [attributes_1.LocalAttributeDeletionStatus.DeletedByPeer, attributes_1.LocalAttributeDeletionStatus.ToBeDeletedByPeer] }
40
- });
41
- if (ownSharedIdentityAttributeSuccessors.length > 0) {
42
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The provided IdentityAttribute is outdated. Its successor '${ownSharedIdentityAttributeSuccessors[0].shareInfo?.sourceAttribute}' is already shared with the peer.`));
43
- }
44
- const ownSharedIdentityAttributePredecessors = await this.consumptionController.attributes.getSharedPredecessorsOfAttribute(foundAttribute, {
45
- "shareInfo.peer": recipient.toString(),
46
- "deletionInfo.deletionStatus": { $nin: [attributes_1.LocalAttributeDeletionStatus.DeletedByPeer, attributes_1.LocalAttributeDeletionStatus.ToBeDeletedByPeer] }
47
- });
48
- if (ownSharedIdentityAttributePredecessors.length > 0) {
49
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The predecessor '${ownSharedIdentityAttributePredecessors[0].shareInfo?.sourceAttribute}' of the IdentityAttribute is already shared with the peer. Instead of sharing it, you should notify the peer about the Attribute succession.`));
50
- }
31
+ const sharedSuccessors = await this.consumptionController.attributes.getSuccessorsOfAttributeSharedWithPeer(foundAttribute, recipient);
32
+ if (sharedSuccessors.length > 0) {
33
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The provided Attribute is outdated. Its successor '${sharedSuccessors[0].id}' is already shared with the peer.`));
51
34
  }
52
- if (requestItem.thirdPartyAddress) {
53
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("When sharing a RepositoryAttribute, no thirdPartyAddress may be specified."));
35
+ const sharedPredecessors = await this.consumptionController.attributes.getPredecessorsOfAttributeSharedWithPeer(foundAttribute, recipient);
36
+ if (sharedPredecessors.length > 0) {
37
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(`The predecessor '${sharedPredecessors[0].id}' of the Attribute is already shared with the peer. Instead of sharing it, you should notify the peer about the Attribute succession.`));
54
38
  }
55
39
  }
56
- if (requestItem.attribute instanceof content_1.RelationshipAttribute) {
57
- if (!foundAttribute.isShared()) {
58
- throw new Error("The LocalAttribute found is faulty because its shareInfo is undefined, although its content is given by a RelationshipAttribute. Since RelationshipAttributes only make sense in the context of Relationships, they must always be shared.");
59
- }
60
- if (foundAttribute.shareInfo.sourceAttribute) {
61
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("You can only share RelationshipAttributes that are not a copy of a sourceAttribute."));
62
- }
63
- if (recipient) {
64
- const query = {
65
- "shareInfo.sourceAttribute": requestItem.sourceAttributeId.toString(),
66
- "shareInfo.peer": recipient.toString(),
67
- "deletionInfo.deletionStatus": { $nin: [attributes_1.LocalAttributeDeletionStatus.DeletedByPeer, attributes_1.LocalAttributeDeletionStatus.ToBeDeletedByPeer] }
68
- };
69
- const thirdPartyRelationshipAttribute = await this.consumptionController.attributes.getLocalAttributes(query);
70
- if (foundAttribute.shareInfo.peer.equals(recipient) || thirdPartyRelationshipAttribute.length > 0) {
71
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The provided RelationshipAttribute already exists in the context of the Relationship with the peer."));
72
- }
40
+ if (requestItem.attribute instanceof content_1.IdentityAttribute) {
41
+ if (!(foundAttribute instanceof attributes_1.OwnIdentityAttribute)) {
42
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The provided IdentityAttribute belongs to someone else. You can only share OwnIdentityAttributes."));
73
43
  }
74
- const queryForNonPendingRelationships = {
75
- "peer.address": foundAttribute.shareInfo.peer.address,
76
- status: { $in: [transport_1.RelationshipStatus.Active, transport_1.RelationshipStatus.Terminated, transport_1.RelationshipStatus.DeletionProposed] }
77
- };
78
- const nonPendingRelationshipsToPeer = await this.accountController.relationships.getRelationships(queryForNonPendingRelationships);
79
- if (nonPendingRelationshipsToPeer.length === 0) {
80
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.cannotShareRelationshipAttributeOfPendingRelationship());
44
+ if (requestItem.thirdPartyAddress) {
45
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("When sharing an OwnIdentityAttribute, no thirdPartyAddress may be specified."));
81
46
  }
82
- if (!requestItem.thirdPartyAddress?.equals(foundAttribute.shareInfo.peer)) {
83
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("When sharing a RelationshipAttribute with another Identity, the address of the peer of the Relationship in which the RelationshipAttribute exists must be specified as thirdPartyAddress."));
47
+ const tagValidationResult = await this.consumptionController.attributes.validateTagsOfAttribute(requestItem.attribute);
48
+ if (tagValidationResult.isError()) {
49
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(tagValidationResult.error.message));
84
50
  }
51
+ return ValidationResult_1.ValidationResult.success();
85
52
  }
86
- if (requestItem.attribute instanceof content_1.IdentityAttribute) {
87
- return await this.canCreateWithIdentityAttribute(requestItem);
53
+ if (!(foundAttribute instanceof attributes_1.OwnRelationshipAttribute || foundAttribute instanceof attributes_1.PeerRelationshipAttribute)) {
54
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("You cannot share ThirdPartyRelationshipAttributes."));
88
55
  }
89
- return ShareAttributeRequestItemProcessor.canCreateWithRelationshipAttribute(requestItem.attribute, recipient);
90
- }
91
- async canCreateWithIdentityAttribute(requestItem) {
92
- const ownerIsCurrentIdentity = requestItem.attribute.owner.equals(this.currentIdentityAddress);
93
- if (!ownerIsCurrentIdentity) {
94
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The provided IdentityAttribute belongs to someone else. You can only share own IdentityAttributes."));
56
+ if (recipient && foundAttribute.peer.equals(recipient)) {
57
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The provided RelationshipAttribute already exists in the context of the Relationship with the peer."));
95
58
  }
96
- const tagValidationResult = await this.consumptionController.attributes.validateTagsOfAttribute(requestItem.attribute);
97
- if (tagValidationResult.isError()) {
98
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(tagValidationResult.error.message));
59
+ const initialPeer = foundAttribute.peer;
60
+ const queryForNonPendingRelationships = {
61
+ "peer.address": initialPeer.toString(),
62
+ status: { $in: [transport_1.RelationshipStatus.Active, transport_1.RelationshipStatus.Terminated, transport_1.RelationshipStatus.DeletionProposed] }
63
+ };
64
+ const nonPendingRelationshipsToPeer = await this.accountController.relationships.getRelationships(queryForNonPendingRelationships);
65
+ if (nonPendingRelationshipsToPeer.length === 0) {
66
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.cannotShareRelationshipAttributeOfPendingRelationship());
99
67
  }
100
- return ValidationResult_1.ValidationResult.success();
101
- }
102
- static canCreateWithRelationshipAttribute(attribute, recipient) {
103
- if (attribute.owner.equals(recipient)) {
68
+ if (!requestItem.thirdPartyAddress?.equals(initialPeer)) {
69
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("When sharing a RelationshipAttribute with another Identity, the address of the peer of the Relationship in which the RelationshipAttribute exists must be specified as thirdPartyAddress."));
70
+ }
71
+ if (requestItem.attribute.owner.equals(recipient)) {
104
72
  return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("It doesn't make sense to share a RelationshipAttribute with its owner."));
105
73
  }
106
- if (attribute.confidentiality === content_1.RelationshipAttributeConfidentiality.Private) {
74
+ if (requestItem.attribute.confidentiality === content_1.RelationshipAttributeConfidentiality.Private) {
107
75
  return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The confidentiality of the given `attribute` is private. Therefore you are not allowed to share it."));
108
76
  }
109
77
  return ValidationResult_1.ValidationResult.success();
@@ -113,37 +81,73 @@ class ShareAttributeRequestItemProcessor extends GenericRequestItemProcessor_1.G
113
81
  if (tagValidationResult.isError()) {
114
82
  return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem(tagValidationResult.error.message));
115
83
  }
84
+ if (requestItem.thirdPartyAddress && requestItem.attribute instanceof content_1.IdentityAttribute) {
85
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The RequestItem is invalid, since it must contain a RelationshipAttribute if thirdPartyAddress is defined."));
86
+ }
87
+ if (!requestItem.thirdPartyAddress && requestItem.attribute instanceof content_1.RelationshipAttribute) {
88
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.invalidRequestItem("The RequestItem is invalid, since it must contain an IdentityAttribute if thirdPartyAddress is undefined."));
89
+ }
116
90
  return ValidationResult_1.ValidationResult.success();
117
91
  }
118
92
  async accept(requestItem, _params, requestInfo) {
119
- const existingPeerSharedIdentityAttribute = await this.consumptionController.attributes.getPeerSharedIdentityAttributeWithSameValue(requestItem.attribute.value.toJSON(), requestInfo.peer.toString());
120
- if (existingPeerSharedIdentityAttribute && !existingPeerSharedIdentityAttribute.deletionInfo) {
93
+ const isThirdPartyRelationshipAttribute = !!requestItem.thirdPartyAddress;
94
+ if (isThirdPartyRelationshipAttribute) {
95
+ const attribute = requestItem.attribute;
96
+ const existingThirdPartyRelationshipAttribute = await this.consumptionController.attributes.getThirdPartyRelationshipAttributeWithSameValue(attribute.value.toJSON(), requestInfo.peer.toString(), attribute.owner.toString(), attribute.key);
97
+ if (existingThirdPartyRelationshipAttribute) {
98
+ if (existingThirdPartyRelationshipAttribute.deletionInfo?.deletionStatus === attributes_1.ReceivedAttributeDeletionStatus.ToBeDeleted) {
99
+ await this.consumptionController.attributes.setPeerDeletionInfoOfReceivedAttribute(existingThirdPartyRelationshipAttribute, undefined, true);
100
+ }
101
+ return content_1.AttributeAlreadySharedAcceptResponseItem.from({
102
+ result: content_1.ResponseItemResult.Accepted,
103
+ attributeId: existingThirdPartyRelationshipAttribute.id
104
+ });
105
+ }
106
+ await this.consumptionController.attributes.createThirdPartyRelationshipAttribute({
107
+ id: requestItem.attributeId,
108
+ content: requestItem.attribute,
109
+ peer: requestInfo.peer,
110
+ sourceReference: requestInfo.id,
111
+ initialAttributePeer: requestItem.thirdPartyAddress
112
+ });
113
+ return content_1.AcceptResponseItem.from({ result: content_1.ResponseItemResult.Accepted });
114
+ }
115
+ const existingPeerIdentityAttribute = await this.consumptionController.attributes.getPeerIdentityAttributeWithSameValue(requestItem.attribute.value.toJSON(), requestInfo.peer.toString());
116
+ if (existingPeerIdentityAttribute) {
117
+ if (existingPeerIdentityAttribute.deletionInfo?.deletionStatus === attributes_1.ReceivedAttributeDeletionStatus.ToBeDeleted) {
118
+ await this.consumptionController.attributes.setPeerDeletionInfoOfReceivedAttribute(existingPeerIdentityAttribute, undefined, true);
119
+ }
121
120
  return content_1.AttributeAlreadySharedAcceptResponseItem.from({
122
121
  result: content_1.ResponseItemResult.Accepted,
123
- attributeId: existingPeerSharedIdentityAttribute.id
122
+ attributeId: existingPeerIdentityAttribute.id
124
123
  });
125
124
  }
126
- const localAttribute = await this.consumptionController.attributes.createSharedLocalAttribute({
125
+ await this.consumptionController.attributes.createPeerIdentityAttribute({
127
126
  content: requestItem.attribute,
128
127
  peer: requestInfo.peer,
129
- requestReference: requestInfo.id,
130
- thirdPartyAddress: requestItem.thirdPartyAddress
131
- });
132
- return content_1.ShareAttributeAcceptResponseItem.from({
133
- attributeId: localAttribute.id,
134
- result: content_1.ResponseItemResult.Accepted
128
+ sourceReference: requestInfo.id,
129
+ id: requestItem.attributeId
135
130
  });
131
+ return content_1.AcceptResponseItem.from({ result: content_1.ResponseItemResult.Accepted });
136
132
  }
137
133
  async applyIncomingResponseItem(responseItem, requestItem, requestInfo) {
138
- if (!(responseItem instanceof content_1.ShareAttributeAcceptResponseItem)) {
134
+ if (responseItem instanceof content_1.RejectResponseItem)
135
+ return;
136
+ const sharedAttribute = await this.consumptionController.attributes.getLocalAttribute(requestItem.attributeId);
137
+ if (!sharedAttribute ||
138
+ !(sharedAttribute instanceof attributes_1.OwnIdentityAttribute || sharedAttribute instanceof attributes_1.OwnRelationshipAttribute || sharedAttribute instanceof attributes_1.PeerRelationshipAttribute)) {
139
139
  return;
140
140
  }
141
- await this.consumptionController.attributes.createSharedLocalAttributeCopy({
142
- attributeId: responseItem.attributeId,
143
- sourceAttributeId: requestItem.sourceAttributeId,
144
- peer: requestInfo.peer,
145
- requestReference: requestInfo.id
146
- });
141
+ if (!(responseItem instanceof content_1.AttributeAlreadySharedAcceptResponseItem)) {
142
+ await this.consumptionController.attributes.addForwardingDetailsToAttribute(sharedAttribute, requestInfo.peer, requestInfo.id);
143
+ return;
144
+ }
145
+ const forwardingDetails = await this.consumptionController.attributes.getForwardingDetailsForPeer(sharedAttribute, requestInfo.peer, true);
146
+ if (forwardingDetails) {
147
+ await this.consumptionController.attributes.setForwardedDeletionInfoOfAttribute(sharedAttribute, undefined, requestInfo.peer, true);
148
+ return;
149
+ }
150
+ await this.consumptionController.attributes.addForwardingDetailsToAttribute(sharedAttribute, requestInfo.peer, requestInfo.id);
147
151
  }
148
152
  }
149
153
  exports.ShareAttributeRequestItemProcessor = ShareAttributeRequestItemProcessor;
@@ -1 +1 @@
1
- {"version":3,"file":"ShareAttributeRequestItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.ts"],"names":[],"mappings":";;;;;;AAAA,4CAUwB;AAExB,gDAAsD;AACtD,oDAAuB;AACvB,yFAAsF;AACtF,oDAAmE;AACnE,uEAAoE;AAEpE,gFAA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YAAY,YAAY,0CAAgC,CAAC,EAAE,CAAC;YAC9D,OAAO;QACX,CAAC;QAED,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,8BAA8B,CAAC;YACvE,WAAW,EAAE,YAAY,CAAC,WAAW;YACrC,iBAAiB,EAAE,WAAW,CAAC,iBAAiB;YAChD,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,gBAAgB,EAAE,WAAW,CAAC,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ;AA1ND,gFA0NC"}
1
+ {"version":3,"file":"ShareAttributeRequestItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.ts"],"names":[],"mappings":";;;;;;AAAA,4CAUwB;AAExB,gDAAsD;AACtD,oDAAuB;AACvB,yFAAsF;AACtF,oDAAiJ;AACjJ,uEAAoE;AAEpE,gFAA6E;AAG7E,MAAa,kCAAmC,SAAQ,yDAAsD;IAC1F,KAAK,CAAC,4BAA4B,CAAC,WAAsC,EAAE,QAAiB,EAAE,SAAuB;QACjI,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAE9G,IAAI,CAAC,cAAc,EAAE,CAAC;YAClB,OAAO,mCAAgB,CAAC,KAAK,CACzB,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,6CAA6C,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAC5J,CAAC;QACN,CAAC;QAED,IAAI,CAAC,CAAC,cAAc,YAAY,iCAAoB,IAAI,cAAc,YAAY,qCAAwB,IAAI,cAAc,YAAY,sCAAyB,CAAC,EAAE,CAAC;YACjK,OAAO,mCAAgB,CAAC,KAAK,CACzB,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAC7C,6CAA6C,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,+F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AC,UAAU,CAAC,2BAA2B,CAAC,eAAe,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC3I,IAAI,iBAAiB,EAAE,CAAC;YACpB,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,mCAAmC,CAAC,eAAe,EAAE,SAAS,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACpI,OAAO;QACX,CAAC;QAED,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,+BAA+B,CAAC,eAAe,EAAE,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC;IACnI,CAAC;CACJ;AApOD,gFAoOC"}
@@ -1,4 +1,4 @@
1
- import { AcceptResponseItem, RejectResponseItem, Request, TransferFileOwnershipAcceptResponseItem, TransferFileOwnershipRequestItem } from "@nmshd/content";
1
+ import { RejectResponseItem, Request, TransferFileOwnershipAcceptResponseItem, TransferFileOwnershipRequestItem } from "@nmshd/content";
2
2
  import { CoreAddress } from "@nmshd/core-types";
3
3
  import { ValidationResult } from "../../../common/ValidationResult";
4
4
  import { AcceptRequestItemParametersJSON } from "../../incoming/decide/AcceptRequestItemParameters";
@@ -8,6 +8,6 @@ export declare class TransferFileOwnershipRequestItemProcessor extends GenericRe
8
8
  canCreateOutgoingRequestItem(requestItem: TransferFileOwnershipRequestItem, _request: Request, _recipient?: CoreAddress): Promise<ValidationResult>;
9
9
  canAccept(requestItem: TransferFileOwnershipRequestItem, _params: AcceptRequestItemParametersJSON, requestInfo: LocalRequestInfo): Promise<ValidationResult>;
10
10
  accept(requestItem: TransferFileOwnershipRequestItem, _params: AcceptRequestItemParametersJSON, requestInfo: LocalRequestInfo): Promise<TransferFileOwnershipAcceptResponseItem>;
11
- applyIncomingResponseItem(responseItem: TransferFileOwnershipAcceptResponseItem | AcceptResponseItem | RejectResponseItem, _requestItem: TransferFileOwnershipRequestItem, requestInfo: LocalRequestInfo): Promise<void>;
11
+ applyIncomingResponseItem(responseItem: TransferFileOwnershipAcceptResponseItem | RejectResponseItem, _requestItem: TransferFileOwnershipRequestItem, requestInfo: LocalRequestInfo): Promise<void>;
12
12
  }
13
13
  //# sourceMappingURL=TransferFileOwnershipRequestItemProcessor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransferFileOwnershipRequestItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAGlB,kBAAkB,EAClB,OAAO,EAEP,uCAAuC,EACvC,gCAAgC,EACnC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAU,MAAM,mBAAmB,CAAC;AAGxD,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;AAE5D,qBAAa,yCAA0C,SAAQ,2BAA2B,CAAC,gCAAgC,CAAC;IAClG,4BAA4B,CAAC,WAAW,EAAE,gCAAgC,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA8CnJ,SAAS,CAC3B,WAAW,EAAE,gCAAgC,EAC7C,OAAO,EAAE,+BAA+B,EACxC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IA2DN,MAAM,CACxB,WAAW,EAAE,gCAAgC,EAC7C,OAAO,EAAE,+BAA+B,EACxC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,uCAAuC,CAAC;IA4B7B,yBAAyB,CAC3C,YAAY,EAAE,uCAAuC,GAAG,kBAAkB,GAAG,kBAAkB,EAC/F,YAAY,EAAE,gCAAgC,EAC9C,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,IAAI,CAAC;CAYnB"}
1
+ {"version":3,"file":"TransferFileOwnershipRequestItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,kBAAkB,EAClB,OAAO,EAEP,uCAAuC,EACvC,gCAAgC,EACnC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAU,MAAM,mBAAmB,CAAC;AAGxD,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;AAE5D,qBAAa,yCAA0C,SAAQ,2BAA2B,CAAC,gCAAgC,CAAC;IAClG,4BAA4B,CAAC,WAAW,EAAE,gCAAgC,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA8CnJ,SAAS,CAC3B,WAAW,EAAE,gCAAgC,EAC7C,OAAO,EAAE,+BAA+B,EACxC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IA2DN,MAAM,CACxB,WAAW,EAAE,gCAAgC,EAC7C,OAAO,EAAE,+BAA+B,EACxC,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,uCAAuC,CAAC;IAwB7B,yBAAyB,CAC3C,YAAY,EAAE,uCAAuC,GAAG,kBAAkB,EAC1E,YAAY,EAAE,gCAAgC,EAC9C,WAAW,EAAE,gBAAgB,GAC9B,OAAO,CAAC,IAAI,CAAC;CAYnB"}
@@ -62,7 +62,7 @@ class TransferFileOwnershipRequestItemProcessor extends GenericRequestItemProces
62
62
  async accept(requestItem, _params, requestInfo) {
63
63
  const peerFile = await this.accountController.files.getOrLoadFileByReference(requestItem.fileReference);
64
64
  const ownFile = await this.accountController.files.claimFileOwnership(peerFile.id, requestItem.ownershipToken);
65
- const repositoryAttribute = await this.consumptionController.attributes.createRepositoryAttribute({
65
+ const ownIdentityAttribute = await this.consumptionController.attributes.createOwnIdentityAttribute({
66
66
  content: content_1.IdentityAttribute.from({
67
67
  value: content_1.IdentityFileReference.from({
68
68
  value: ownFile.toFileReference(this.accountController.config.baseUrl).truncate()
@@ -71,26 +71,22 @@ class TransferFileOwnershipRequestItemProcessor extends GenericRequestItemProces
71
71
  tags: ownFile.tags
72
72
  })
73
73
  });
74
- const ownSharedIdentityAttribute = await this.consumptionController.attributes.createSharedLocalAttributeCopy({
75
- sourceAttributeId: repositoryAttribute.id,
76
- peer: requestInfo.peer,
77
- requestReference: requestInfo.id
78
- });
74
+ const updatedAttribute = await this.consumptionController.attributes.addForwardingDetailsToAttribute(ownIdentityAttribute, requestInfo.peer, requestInfo.id);
79
75
  return content_1.TransferFileOwnershipAcceptResponseItem.from({
80
76
  result: content_1.ResponseItemResult.Accepted,
81
- attributeId: ownSharedIdentityAttribute.id,
82
- attribute: ownSharedIdentityAttribute.content
77
+ attributeId: updatedAttribute.id,
78
+ attribute: updatedAttribute.content
83
79
  });
84
80
  }
85
81
  async applyIncomingResponseItem(responseItem, _requestItem, requestInfo) {
86
82
  if (!(responseItem instanceof content_1.TransferFileOwnershipAcceptResponseItem)) {
87
83
  return;
88
84
  }
89
- await this.consumptionController.attributes.createSharedLocalAttribute({
85
+ await this.consumptionController.attributes.createPeerIdentityAttribute({
90
86
  id: responseItem.attributeId,
91
87
  content: responseItem.attribute,
92
- requestReference: requestInfo.id,
93
- peer: requestInfo.peer
88
+ peer: requestInfo.peer,
89
+ sourceReference: requestInfo.id
94
90
  });
95
91
  }
96
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TransferFileOwnershipRequestItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.ts"],"names":[],"mappings":";;;AAAA,4CASwB;AACxB,kDAAwD;AAExD,yFAAsF;AACtF,uEAAoE;AAEpE,gFAA6E;AAG7E,MAAa,yCAA0C,SAAQ,yDAA6D;IACxG,KAAK,CAAC,4BAA4B,CAAC,WAA6C,EAAE,QAAiB,EAAE,UAAwB;QACzI,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAM,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC;QAExG,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,OAAO,mCAAgB,CAAC,KAAK,CACzB,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,+BAA+B,WAAW,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CACnJ,CAAC;QACN,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;YACnB,OAAO,mCAAgB,CAAC,KAAK,CACzB,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAC7C,qEAAqE,WAAW,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,iCAAiC,CAChJ,CACJ,CAAC;QACN,CAAC;QAED,IAAI,SAAS,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,CAAC;YAClC,OAAO,mCAAgB,CAAC,KAAK,CACzB,6CAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAC7C,qEAAqE,WAAW,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,gCAAgC,CAC/I,CACJ,CAAC;QACN,CAAC;QAED,IAAI,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9C,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAA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AC,8BAA8B,CAAC;YAC1G,iBAAiB,EAAE,mBAAmB,CAAC,EAAE;YACzC,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,gBAAgB,EAAE,WAAW,CAAC,EAAE;SACnC,CAAC,CAAC;QAEH,OAAO,iDAAuC,CAAC,IAAI,CAAC;YAChD,MAAM,EAAE,4BAAkB,CAAC,QAAQ;YACnC,WAAW,EAAE,0BAA0B,CAAC,EAAE;YAC1C,SAAS,EAAE,0BAA0B,CAAC,OAA4B;SACrE,CAAC,CAAC;IACP,CAAC;IAEe,KAAK,CAAC,yBAAyB,CAC3C,YAA+F,EAC/F,YAA8C,EAC9C,WAA6B;QAE7B,IAAI,CAAC,CAAC,YAAY,YAAY,iDAAuC,CAAC,EAAE,CAAC;YACrE,OAAO;QACX,CAAC;QAED,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,0BAA0B,CAAC;YACnE,EAAE,EAAE,YAAY,CAAC,WAAW;YAC5B,OAAO,EAAE,YAAY,CAAC,SAAS;YAC/B,gBAAgB,EAAE,WAAW,CAAC,EAAE;YAChC,IAAI,EAAE,WAAW,CAAC,IAAI;SACzB,CAAC,CAAC;IACP,CAAC;CACJ;AA9JD,8FA8JC"}
1
+ {"version":3,"file":"TransferFileOwnershipRequestItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.ts"],"names":[],"mappings":";;;AAAA,4CAQwB;AACxB,kDAAwD;AAExD,yFAAsF;AACtF,uEAAoE;AAEpE,gFAA6E;AAG7E,MAAa,yCAA0C,SAAQ,yDAA6D;IACxG,KAAK,CAAC,4BAA4B,CAAC,WAA6C,EAAE,QAAiB,EAAE,UAAwB;QACzI,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAM,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC;Q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QAED,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,2BAA2B,CAAC;YACpE,EAAE,EAAE,YAAY,CAAC,WAAW;YAC5B,OAAO,EAAE,YAAY,CAAC,SAAS;YAC/B,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,eAAe,EAAE,WAAW,CAAC,EAAE;SAClC,CAAC,CAAC;IACP,CAAC;CACJ;AA1JD,8FA0JC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createAppropriateResponseItem.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/utility/createAppropriateResponseItem.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,wCAAwC,EACxC,qCAAqC,EACrC,iCAAiC,EACjC,iBAAiB,EACjB,kCAAkC,EAClC,+BAA+B,EAElC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAyE,MAAM,qBAAqB,CAAC;AAClI,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,wBAA8B,6BAA6B,CACvD,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,gBAAgB,EAC7B,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,QAAQ,GACnB,OAAO,CAAC,iCAAiC,GAAG,wCAAwC,GAAG,qCAAqC,CAAC,CAAC;AACjI,wBAA8B,6BAA6B,CACvD,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,gBAAgB,EAC7B,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,MAAM,GACjB,OAAO,CAAC,+BAA+B,GAAG,wCAAwC,GAAG,qCAAqC,CAAC,CAAC;AAC/H,wBAA8B,6BAA6B,CACvD,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,gBAAgB,EAC7B,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,SAAS,GACpB,OAAO,CAAC,kCAAkC,GAAG,wCAAwC,GAAG,qCAAqC,CAAC,CAAC"}
1
+ {"version":3,"file":"createAppropriateResponseItem.d.ts","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/utility/createAppropriateResponseItem.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,wCAAwC,EACxC,qCAAqC,EACrC,iCAAiC,EACjC,iBAAiB,EACjB,kCAAkC,EAClC,+BAA+B,EAElC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAwB,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,wBAA8B,6BAA6B,CACvD,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,gBAAgB,EAC7B,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,QAAQ,GACnB,OAAO,CAAC,iCAAiC,GAAG,wCAAwC,GAAG,qCAAqC,CAAC,CAAC;AACjI,wBAA8B,6BAA6B,CACvD,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,gBAAgB,EAC7B,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,MAAM,GACjB,OAAO,CAAC,+BAA+B,GAAG,wCAAwC,GAAG,qCAAqC,CAAC,CAAC;AAC/H,wBAA8B,6BAA6B,CACvD,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,gBAAgB,EAC7B,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,SAAS,GACpB,OAAO,CAAC,kCAAkC,GAAG,wCAAwC,GAAG,qCAAqC,CAAC,CAAC"}
@@ -2,92 +2,70 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = createAppropriateResponseItem;
4
4
  const content_1 = require("@nmshd/content");
5
- const attributes_1 = require("../../../attributes");
6
5
  async function createAppropriateResponseItem(identityAttribute, requestInfo, attributesController, itemType) {
7
- const repositoryAttribute = await getSourceRepositoryAttribute(identityAttribute, attributesController);
8
- const query = {
9
- "deletionInfo.deletionStatus": {
10
- $nin: [
11
- attributes_1.LocalAttributeDeletionStatus.DeletedByPeer,
12
- attributes_1.LocalAttributeDeletionStatus.DeletedByOwner,
13
- attributes_1.LocalAttributeDeletionStatus.ToBeDeletedByPeer,
14
- attributes_1.LocalAttributeDeletionStatus.ToBeDeleted
15
- ]
16
- }
17
- };
18
- const latestSharedVersions = await attributesController.getSharedVersionsOfAttribute(repositoryAttribute.id, [requestInfo.peer], true, query);
6
+ const ownIdentityAttribute = await getOwnIdentityAttribute(identityAttribute, attributesController);
7
+ const latestSharedVersions = await attributesController.getVersionsOfAttributeSharedWithPeer(ownIdentityAttribute, requestInfo.peer);
19
8
  const latestSharedVersion = latestSharedVersions.length > 0 ? latestSharedVersions[0] : undefined;
20
9
  if (!latestSharedVersion) {
21
- const newOwnSharedIdentityAttribute = await attributesController.createSharedLocalAttributeCopy({
22
- peer: requestInfo.peer,
23
- requestReference: requestInfo.id,
24
- sourceAttributeId: repositoryAttribute.id
25
- });
10
+ const updatedAttribute = await attributesController.addForwardingDetailsToAttribute(ownIdentityAttribute, requestInfo.peer, requestInfo.id);
26
11
  switch (itemType) {
27
12
  case "Create":
28
13
  return content_1.CreateAttributeAcceptResponseItem.from({
29
14
  result: content_1.ResponseItemResult.Accepted,
30
- attributeId: newOwnSharedIdentityAttribute.id
15
+ attributeId: updatedAttribute.id
31
16
  });
32
17
  case "Read":
33
18
  return content_1.ReadAttributeAcceptResponseItem.from({
34
19
  result: content_1.ResponseItemResult.Accepted,
35
- attributeId: newOwnSharedIdentityAttribute.id,
36
- attribute: newOwnSharedIdentityAttribute.content
20
+ attributeId: ownIdentityAttribute.id,
21
+ attribute: updatedAttribute.content
37
22
  });
38
23
  case "Propose":
39
24
  return content_1.ProposeAttributeAcceptResponseItem.from({
40
25
  result: content_1.ResponseItemResult.Accepted,
41
- attributeId: newOwnSharedIdentityAttribute.id,
42
- attribute: newOwnSharedIdentityAttribute.content
26
+ attributeId: ownIdentityAttribute.id,
27
+ attribute: updatedAttribute.content
43
28
  });
44
29
  }
45
30
  }
46
- if (latestSharedVersion.shareInfo.sourceAttribute.equals(repositoryAttribute.id)) {
31
+ if (latestSharedVersion.id.equals(ownIdentityAttribute.id)) {
32
+ const forwardingDetails = await attributesController.getForwardingDetailsForPeer(latestSharedVersion, requestInfo.peer, true);
33
+ if (forwardingDetails) {
34
+ await attributesController.setForwardedDeletionInfoOfAttribute(latestSharedVersion, undefined, requestInfo.peer, true);
35
+ }
47
36
  return content_1.AttributeAlreadySharedAcceptResponseItem.from({
48
37
  result: content_1.ResponseItemResult.Accepted,
49
38
  attributeId: latestSharedVersion.id
50
39
  });
51
40
  }
52
- const ownSharedIdentityAttributeSuccessorParams = {
53
- content: repositoryAttribute.content,
54
- shareInfo: attributes_1.LocalAttributeShareInfo.from({
55
- peer: requestInfo.peer,
56
- requestReference: requestInfo.id,
57
- sourceAttribute: repositoryAttribute.id
58
- })
59
- };
60
- const ownSharedIdentityAttributesAfterSuccession = await attributesController.succeedOwnSharedIdentityAttribute(latestSharedVersion.id, ownSharedIdentityAttributeSuccessorParams);
61
- const succeededOwnSharedIdentityAttribute = ownSharedIdentityAttributesAfterSuccession.successor;
41
+ const updatedAttribute = await attributesController.addForwardingDetailsToAttribute(ownIdentityAttribute, requestInfo.peer, requestInfo.id);
62
42
  return content_1.AttributeSuccessionAcceptResponseItem.from({
63
43
  result: content_1.ResponseItemResult.Accepted,
64
- successorId: succeededOwnSharedIdentityAttribute.id,
65
- successorContent: succeededOwnSharedIdentityAttribute.content,
44
+ successorId: updatedAttribute.id,
45
+ successorContent: updatedAttribute.content,
66
46
  predecessorId: latestSharedVersion.id
67
47
  });
68
48
  }
69
- async function getSourceRepositoryAttribute(attribute, attributesController) {
70
- const existingRepositoryAttribute = await attributesController.getRepositoryAttributeWithSameValue(attribute.value.toJSON());
71
- if (!existingRepositoryAttribute) {
72
- return await attributesController.createRepositoryAttribute({
73
- content: attribute
74
- });
49
+ async function getOwnIdentityAttribute(attribute, attributesController) {
50
+ const existingOwnIdentityAttribute = await attributesController.getOwnIdentityAttributeWithSameValue(attribute.value.toJSON());
51
+ if (!existingOwnIdentityAttribute) {
52
+ return await attributesController.createOwnIdentityAttribute({ content: attribute });
75
53
  }
76
- const newTags = attribute.tags?.filter((tag) => !existingRepositoryAttribute.content.tags?.includes(tag));
54
+ const newTags = attribute.tags?.filter((tag) => !existingOwnIdentityAttribute.content.tags?.includes(tag));
77
55
  if (!newTags || newTags.length === 0)
78
- return existingRepositoryAttribute;
79
- const succeededRepositoryAttribute = await mergeTagsOfRepositoryAttribute(existingRepositoryAttribute, newTags, attributesController);
80
- return succeededRepositoryAttribute;
56
+ return existingOwnIdentityAttribute;
57
+ const succeededOwnIdentityAttribute = await mergeTagsOfOwnIdentityAttribute(existingOwnIdentityAttribute, newTags, attributesController);
58
+ return succeededOwnIdentityAttribute;
81
59
  }
82
- async function mergeTagsOfRepositoryAttribute(existingRepositoryAttribute, newTags, attributesController) {
83
- const repositoryAttributeSuccessorParams = {
60
+ async function mergeTagsOfOwnIdentityAttribute(ownIdentityAttribute, newTags, attributesController) {
61
+ const ownIdentityAttributeSuccessorParams = {
84
62
  content: {
85
- ...existingRepositoryAttribute.content.toJSON(),
86
- tags: [...(existingRepositoryAttribute.content.tags ?? []), ...newTags]
63
+ ...ownIdentityAttribute.content.toJSON(),
64
+ tags: [...(ownIdentityAttribute.content.tags ?? []), ...newTags]
87
65
  },
88
- succeeds: existingRepositoryAttribute.id.toString()
66
+ succeeds: ownIdentityAttribute.id.toString()
89
67
  };
90
- const repositoryAttributesAfterSuccession = await attributesController.succeedRepositoryAttribute(existingRepositoryAttribute.id, repositoryAttributeSuccessorParams);
91
- return repositoryAttributesAfterSuccession.successor;
68
+ const ownIdentityAttributesAfterSuccession = await attributesController.succeedOwnIdentityAttribute(ownIdentityAttribute, ownIdentityAttributeSuccessorParams);
69
+ return ownIdentityAttributesAfterSuccession.successor;
92
70
  }
93
71
  //# sourceMappingURL=createAppropriateResponseItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAppropriateResponseItem.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/utility/createAppropriateResponseItem.ts"],"names":[],"mappings":";;AA8BA,gDAkFC;AAhHD,4CAQwB;AACxB,oDAAkI;AAqBnH,KAAK,UAAU,6BAA6B,CACvD,iBAAoC,EACpC,WAA6B,EAC7B,oBAA0C,EAC1C,QAAuC;IAQvC,MAAM,mBAAmB,GAAG,MAAM,4BAA4B,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC;IAExG,MAAM,KAAK,GAAG;QACV,6BAA6B,EAAE;YAC3B,IAAI,EAAE;gBACF,yCAA4B,CAAC,aAAa;gBAC1C,yCAA4B,CAAC,cAAc;gBAC3C,yCAA4B,CAAC,iBAAiB;gBAC9C,yCAA4B,CAAC,WAAW;aAC3C;SACJ;KACJ,CAAC;IACF,MAAM,oBAAoB,GAAG,MAAM,oBAAoB,CAAC,4BAA4B,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC9I,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAElG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACvB,MAAM,6BAA6B,GAAG,MAAM,oBAAoB,CAAC,8BAA8B,CAAC;YAC5F,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,gBAAgB,EAAE,WAAW,CAAC,EAAE;YAChC,iBAAiB,EAAE,mBAAmB,CAAC,EAAE;SAC5C,CAAC,CAAC;QAEH,QAAQ,QAAQ,EAAE,CAAC;YACf,KAAK,QAAQ;gBACT,OAAO,2CAAiC,CAAC,IAAI,CAAC;oBAC1C,MAAM,EAAE,4BAAkB,CAAC,QAAQ;oBACnC,WAAW,EAAE,6BAA6B,CAAC,EAAE;iBAChD,CAAC,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K,OAAO,mCAAmC,CAAC,SAAS,CAAC;AACzD,CAAC"}
1
+ {"version":3,"file":"createAppropriateResponseItem.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/utility/createAppropriateResponseItem.ts"],"names":[],"mappings":";;AA8BA,gDA6DC;AA3FD,4CAQwB;AAsBT,KAAK,UAAU,6BAA6B,CACvD,iBAAoC,EACpC,WAA6B,EAC7B,oBAA0C,EAC1C,QAAuC;IAQvC,MAAM,oBAAoB,GAAG,MAAM,uBAAuB,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC;IAEpG,MAAM,oBAAoB,GAAG,MAAM,oBAAoB,CAAC,oCAAoC,CAAC,oBAAoB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IACrI,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAElG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACvB,MAAM,gBAAgB,GAAG,MAAM,oBAAoB,CAAC,+BAA+B,CAAC,oBAAoB,EAAE,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC;QAE5I,QAAQ,QAAQ,EAAE,CAAC;YACf,KAAK,QAAQ;gBACT,OAAO,2CAAiC,CAAC,IAAI,CAAC;oBAC1C,MAAM,EAAE,4BAAkB,CAAC,QAAQ;oBACnC,WAAW,EAAE,gBAAgB,CAAC,EAAE;iBACnC,CAAC,CAAC;YACP,KAAK,MAAM;gBACP,OAAO,yCAA+B,CAAC,IAAI,CAAC;oBACxC,MAAM,EAAE,4BAAkB,CAAC,QAAQ;oBACnC,WAAW,EAAE,oBAAoB,CAAC,EAAE;oBACpC,SAAS,EAAE,gBAAgB,CAAC,OAAO;iBACtC,CAAC,CAAC;YACP,KAAK,SAAS;gBACV,OAAO,4CAAkC,CAAC,IAAI,CAAC;oBAC3C,MAAM,EAAE,4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,CAAC,0BAA0B,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IACzF,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,4BAA4B,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3G,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,4BAA4B,CAAC;IAE1E,MAAM,6BAA6B,GAAG,MAAM,+BAA+B,CAAC,4BAA4B,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAC;IACzI,OAAO,6BAA6B,CAAC;AACzC,CAAC;AAED,KAAK,UAAU,+BAA+B,CAC1C,oBAA0C,EAC1C,OAAiB,EACjB,oBAA0C;IAE1C,MAAM,mCAAmC,GAAG;QACxC,OAAO,EAAE;YACL,GAAG,oBAAoB,CAAC,OAAO,CAAC,MAAM,EAAE;YACxC,IAAI,EAAE,CAAC,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC;SACnE;QACD,QAAQ,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE;KAC/C,CAAC;IAEF,MAAM,oCAAoC,GAAG,MAAM,oBAAoB,CAAC,2BAA2B,CAAC,oBAAoB,EAAE,mCAAmC,CAAC,CAAC;IAC/J,OAAO,oCAAoC,CAAC,SAAS,CAAC;AAC1D,CAAC"}
@@ -36,7 +36,7 @@ function validateAttributeMatchesWithIdentityAttributeQuery(query, attribute, re
36
36
  }
37
37
  const recipientIsAttributeOwner = recipient.equals(attribute.owner);
38
38
  if (!recipientIsAttributeOwner) {
39
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.attributeQueryMismatch("The provided IdentityAttribute belongs to someone else. You can only share own IdentityAttributes."));
39
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.attributeQueryMismatch("The provided IdentityAttribute belongs to someone else. You can only share OwnIdentityAttributes."));
40
40
  }
41
41
  if (query.valueType !== attribute.value.constructor.name) {
42
42
  return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.attributeQueryMismatch("The provided IdentityAttribute is not of the queried IdentityAttribute value type."));
@@ -54,7 +54,7 @@ function validateAttributeMatchesWithIQLQuery(_, attribute, recipient) {
54
54
  }
55
55
  const recipientIsAttributeOwner = recipient.equals(attribute.owner);
56
56
  if (!recipientIsAttributeOwner) {
57
- return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.attributeQueryMismatch("The provided IdentityAttribute belongs to someone else. You can only share own IdentityAttributes."));
57
+ return ValidationResult_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.requests.attributeQueryMismatch("The provided IdentityAttribute belongs to someone else. You can only share OwnIdentityAttributes."));
58
58
  }
59
59
  return ValidationResult_1.ValidationResult.success();
60
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validateAttributeMatchesWithQuery.js","sourceRoot":"","sources":["../../../../../src/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.ts"],"names":[],"mappings":";;AAaA,oDA2BC;AAxCD,4CAQwB;AAExB,yFAAsF;AACtF,uEAAoE;AAEpE,SAAwB,iCAAiC,CACrD,KAA4G,EAC5G,SAAoD,EACpD,SAAsB,EACtB,MAAmB;IAEnB,IAAI,KAAK,YAAY,gCAAsB,EAAE,CAAC;QAC1C,MAAM,MAAM,GAAG,kDAAkD,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QAC/F,IAAI,MAAM,CAAC,OAAO,EAAE;YAAE,OAAO,MAAM,CAAC;IACxC,CAAC;SAAM,IAAI,KAAK,YAAY,kBAAQ,EAAE,CAAC;QACnC,MAAM,MAAM,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