@nmshd/consumption 3.5.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,10 +6,10 @@ const content_1 = require("@nmshd/content");
6
6
  const crypto_1 = require("@nmshd/crypto");
7
7
  const transport_1 = require("@nmshd/transport");
8
8
  exports.buildInformation = {
9
- version: "3.5.1",
10
- build: "113",
11
- date: "2023-10-31T14:01:53+00:00",
12
- commit: "b4bf86f640160bfe11c2e1fec16d54ddd43371a1",
9
+ version: "3.6.0",
10
+ build: "114",
11
+ date: "2023-11-07T08:28:32+00:00",
12
+ commit: "c08ff9c7bd340b25e5289f39c7d4c5bd0d59aef9",
13
13
  dependencies: {"@js-soft/docdb-querytranslator":"^1.1.1","@nmshd/iql":"^0.0.4","ts-simple-nameof":"^1.3.1"},
14
14
  libraries: {
15
15
  transport: transport_1.buildInformation,
@@ -61,7 +61,7 @@ class ConsumptionController {
61
61
  }
62
62
  getDefaultNotificationItemProcessors() {
63
63
  return new Map([
64
- [content_1.AttributeSucceededNotificationItem, modules_1.AttributeSucceededNotificationItemProcessor]
64
+ [content_1.PeerSharedAttributeSucceededNotificationItem, modules_1.PeerSharedAttributeSucceededNotificationItemProcessor]
65
65
  ]);
66
66
  }
67
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ConsumptionController.js","sourceRoot":"","sources":["../../src/consumption/ConsumptionController.ts"],"names":[],"mappings":";;;AAAA,4CAUuB;AAEvB,wCAsBmB;AAEnB,MAAa,qBAAqB;IAC9B,YACoB,SAAoB,EACpB,iBAAoC;QADpC,cAAS,GAAT,SAAS,CAAW;QACpB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACrD,CAAC;IAGJ,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,WAAW,CAAA;IAC3B,CAAC;IAGD,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAA;IACvB,CAAC;IAGD,IAAW,gBAAgB;QACvB,OAA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,4BAAkB,EAAE,qCAA2B,CAAC;YACjD,CAAC,mCAAyB,EAAE,qCAA2B,CAAC;YACxD,CAAC,8CAAoC,EAAE,uDAA6C,CAAC;YACrF,CAAC,6BAAmB,EAAE,sCAA4B,CAAC;SACtD,CAAC,CAAA;IACN,CAAC;IAEO,oCAAoC;QACxC,OAAO,IAAI,GAAG,CAAoE;YAC9E,CAAC,4CAAkC,EAAE,qDAA2C,CAAC;SACpF,CAAC,CAAA;IACN,CAAC;CACJ;AA5HD,sDA4HC"}
1
+ {"version":3,"file":"ConsumptionController.js","sourceRoot":"","sources":["../../src/consumption/ConsumptionController.ts"],"names":[],"mappings":";;;AAAA,4CAUuB;AAEvB,wCAsBmB;AAEnB,MAAa,qBAAqB;IAC9B,YACoB,SAAoB,EACpB,iBAAoC;QADpC,cAAS,GAAT,SAAS,CAAW;QACpB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACrD,CAAC;IAGJ,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,WAAW,CAAA;IAC3B,CAAC;IAGD,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAA;IACvB,CAAC;IAGD,IAAW,gBAAgB;QACvB,OAAO,IAAI,CAAC,iBAAiB,CAAA;IACjC,CAAC;IAGD,IAAW,gBAAgB;QACvB,OAAO,IAAI,CAAC,iBAAiB,CAAA;IACjC,CAAC;IAGD,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAA;IACzB,CAAC;IAGD,IAAW,kBAAkB;QACzB,OAAO,IAAI,CAAC,mBAAmB,CAAA;IACnC,CAAC;IAGD,IAAW,aAAa;QACpB,OAAO,IAAI,CAAC,cAAc,CAAA;IAC9B,CAAC;IAEM,KAAK,CAAC,IAAI,CACb,gCAAgC,IAAI,GAAG,EAA2D,EAClG,qCAAqC,IAAI,GAAG,EAGzC;QAEH,IAAI,CAAC,WAAW,GAAG,MAAM,IAAI,8BAAoB,CAC7C,IAAI,EACJ,IAAI,CAAC,SAAS,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AM,IAAI,iCAAuB,CACnD,MAAM,IAAI,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,eAAe,CAAC,EACvE,iCAAiC,EACjC,IAAI,EACJ,IAAI,CAAC,SAAS,CAAC,QAAQ,EACvB,IAAI,CAAC,iBAAiB,CAAC,YAAY,CACtC,CAAC,IAAI,EAAE,CAAA;QAER,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,4BAAkB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;QAC1D,IAAI,CAAC,mBAAmB,GAAG,MAAM,IAAI,sCAA4B,CAC7D,IAAI,EACJ,IAAI,CAAC,SAAS,CAAC,QAAQ,EACvB,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAClC,CAAC,IAAI,EAAE,CAAA;QACR,OAAO,IAAI,CAAA;IACf,CAAC;IAEO,+BAA+B;QACnC,OAAO,IAAI,GAAG,CAA0D;YACpE,CAAC,mCAAyB,EAAE,4CAAkC,CAAC;YAC/D,CAAC,oCAA0B,EAAE,6CAAmC,CAAC;YACjE,CAAC,kCAAwB,EAAE,2CAAiC,CAAC;YAC7D,CAAC,qCAA2B,EAAE,8CAAoC,CAAC;YACnE,CAAC,4BAAkB,EAAE,qCAA2B,CAAC;YACjD,CAAC,mCAAyB,EAAE,qCAA2B,CAAC;YACxD,CAAC,8CAAoC,EAAE,uDAA6C,CAAC;YACrF,CAAC,6BAAmB,EAAE,sCAA4B,CAAC;SACtD,CAAC,CAAA;IACN,CAAC;IAEO,oCAAoC;QACxC,OAAO,IAAI,GAAG,CAAoE;YAC9E,CAAC,sDAA4C,EAAE,+DAAqD,CAAC;SACxG,CAAC,CAAA;IACN,CAAC;CACJ;AA5HD,sDA4HC"}
@@ -3,6 +3,6 @@ export * from "./itemProcessors/AbstractNotificationItemProcessor";
3
3
  export * from "./itemProcessors/NotificationItemConstructor";
4
4
  export * from "./itemProcessors/NotificationItemProcessorConstructor";
5
5
  export * from "./itemProcessors/NotificationItemProcessorRegistry";
6
- export * from "./itemProcessors/attributeSucceeded/AttributeSucceededNotificationItemProcessor";
6
+ export * from "./itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor";
7
7
  export * from "./local/LocalNotification";
8
8
  export * from "./local/LocalNotificationSource";
@@ -19,7 +19,7 @@ __exportStar(require("./itemProcessors/AbstractNotificationItemProcessor"), expo
19
19
  __exportStar(require("./itemProcessors/NotificationItemConstructor"), exports);
20
20
  __exportStar(require("./itemProcessors/NotificationItemProcessorConstructor"), exports);
21
21
  __exportStar(require("./itemProcessors/NotificationItemProcessorRegistry"), exports);
22
- __exportStar(require("./itemProcessors/attributeSucceeded/AttributeSucceededNotificationItemProcessor"), exports);
22
+ __exportStar(require("./itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor"), exports);
23
23
  __exportStar(require("./local/LocalNotification"), exports);
24
24
  __exportStar(require("./local/LocalNotificationSource"), exports);
25
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/notifications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAAyC;AACzC,qFAAkE;AAClE,+EAA4D;AAC5D,wFAAqE;AACrE,qFAAkE;AAClE,kHAA+F;AAC/F,4DAAyC;AACzC,kEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/notifications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAAyC;AACzC,qFAAkE;AAClE,+EAA4D;AAC5D,wFAAqE;AACrE,qFAAkE;AAClE,4HAAyG;AACzG,4DAAyC;AACzC,kEAA+C"}
@@ -0,0 +1,14 @@
1
+ import { PeerSharedAttributeSucceededNotificationItem } from "@nmshd/content";
2
+ import { ConsumptionController } from "../../../../consumption/ConsumptionController";
3
+ import { PeerSharedAttributeSucceededEvent } from "../../../attributes";
4
+ import { ValidationResult } from "../../../common";
5
+ import { LocalNotification } from "../../local/LocalNotification";
6
+ import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
7
+ export declare class PeerSharedAttributeSucceededNotificationItemProcessor extends AbstractNotificationItemProcessor<PeerSharedAttributeSucceededNotificationItem> {
8
+ private readonly _logger;
9
+ constructor(consumptionController: ConsumptionController);
10
+ checkPrerequisitesOfIncomingNotificationItem(notificationItem: PeerSharedAttributeSucceededNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
11
+ process(notificationItem: PeerSharedAttributeSucceededNotificationItem, notification: LocalNotification): Promise<PeerSharedAttributeSucceededEvent>;
12
+ rollback(notificationItem: PeerSharedAttributeSucceededNotificationItem, notification: LocalNotification): Promise<void>;
13
+ private rollbackPartialWork;
14
+ }
@@ -1,51 +1,51 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AttributeSucceededNotificationItemProcessor = void 0;
3
+ exports.PeerSharedAttributeSucceededNotificationItemProcessor = void 0;
4
4
  const content_1 = require("@nmshd/content");
5
5
  const transport_1 = require("@nmshd/transport");
6
6
  const CoreErrors_1 = require("../../../../consumption/CoreErrors");
7
7
  const attributes_1 = require("../../../attributes");
8
8
  const common_1 = require("../../../common");
9
9
  const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
10
- class AttributeSucceededNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
10
+ class PeerSharedAttributeSucceededNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
11
11
  constructor(consumptionController) {
12
12
  super(consumptionController);
13
- this._logger = transport_1.TransportLoggerFactory.getLogger(AttributeSucceededNotificationItemProcessor);
13
+ this._logger = transport_1.TransportLoggerFactory.getLogger(PeerSharedAttributeSucceededNotificationItemProcessor);
14
14
  }
15
15
  async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
16
- if (!notification.peer.equals(notificationItem.attribute.owner)) {
16
+ if (!notification.peer.equals(notificationItem.successorContent.owner)) {
17
17
  return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.successionPeerIsNotOwner());
18
18
  }
19
19
  const successorParams = {
20
- id: notificationItem.newAttributeId,
21
- content: notificationItem.attribute,
20
+ id: notificationItem.successorId,
21
+ content: notificationItem.successorContent,
22
22
  shareInfo: { requestReference: notification.id, peer: notification.peer }
23
23
  };
24
- if (notificationItem.attribute instanceof content_1.IdentityAttribute) {
25
- const validationResult = await this.consumptionController.attributes.validatePeerSharedIdentityAttributeSuccession(notificationItem.succeededAttributeId, successorParams);
24
+ if (notificationItem.successorContent instanceof content_1.IdentityAttribute) {
25
+ const validationResult = await this.consumptionController.attributes.validatePeerSharedIdentityAttributeSuccession(notificationItem.predecessorId, successorParams);
26
26
  return validationResult;
27
27
  }
28
- const validationResult = await this.consumptionController.attributes.validatePeerSharedRelationshipAttributeSuccession(notificationItem.succeededAttributeId, successorParams);
28
+ const validationResult = await this.consumptionController.attributes.validatePeerSharedRelationshipAttributeSuccession(notificationItem.predecessorId, successorParams);
29
29
  return validationResult;
30
30
  }
31
31
  async process(notificationItem, notification) {
32
32
  const successorParams = {
33
- id: notificationItem.newAttributeId,
34
- content: notificationItem.attribute,
33
+ id: notificationItem.successorId,
34
+ content: notificationItem.successorContent,
35
35
  shareInfo: { requestReference: notification.id, peer: notification.peer }
36
36
  };
37
37
  let predecessor;
38
38
  let successor;
39
39
  try {
40
- if (notificationItem.attribute instanceof content_1.IdentityAttribute) {
40
+ if (notificationItem.successorContent instanceof content_1.IdentityAttribute) {
41
41
  ;
42
42
  ({ predecessor, successor } =
43
- await this.consumptionController.attributes.succeedPeerSharedIdentityAttribute(notificationItem.succeededAttributeId, successorParams, false));
43
+ await this.consumptionController.attributes.succeedPeerSharedIdentityAttribute(notificationItem.predecessorId, successorParams, false));
44
44
  }
45
45
  else {
46
46
  ;
47
47
  ({ predecessor, successor } =
48
- await this.consumptionController.attributes.succeedPeerSharedRelationshipAttribute(notificationItem.succeededAttributeId, successorParams, false));
48
+ await this.consumptionController.attributes.succeedPeerSharedRelationshipAttribute(notificationItem.predecessorId, successorParams, false));
49
49
  }
50
50
  }
51
51
  catch (e) {
@@ -59,20 +59,20 @@ class AttributeSucceededNotificationItemProcessor extends AbstractNotificationIt
59
59
  await this.rollbackPartialWork(notificationItem, notification);
60
60
  }
61
61
  async rollbackPartialWork(notificationItem, _notification) {
62
- const successor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.newAttributeId);
62
+ const successor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.successorId);
63
63
  if (typeof successor !== "undefined") {
64
64
  await this.consumptionController.attributes
65
65
  .deleteAttributeUnsafe(successor.id)
66
66
  .catch((e) => this._logger.error(`Deletion failed for attribute (attribute id: ${successor.id}).`, e));
67
67
  }
68
- const predecessor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.succeededAttributeId);
68
+ const predecessor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.predecessorId);
69
69
  if (typeof predecessor?.succeededBy !== "undefined") {
70
70
  predecessor.succeededBy = undefined;
71
71
  await this.consumptionController.attributes
72
72
  .updateAttributeUnsafe(predecessor)
73
- .catch((e) => this._logger.error(`Update failed for attribute (attribute id: ${notificationItem.succeededAttributeId}).`, e));
73
+ .catch((e) => this._logger.error(`Update failed for attribute (attribute id: ${notificationItem.predecessorId}).`, e));
74
74
  }
75
75
  }
76
76
  }
77
- exports.AttributeSucceededNotificationItemProcessor = AttributeSucceededNotificationItemProcessor;
78
- //# sourceMappingURL=AttributeSucceededNotificationItemProcessor.js.map
77
+ exports.PeerSharedAttributeSucceededNotificationItemProcessor = PeerSharedAttributeSucceededNotificationItemProcessor;
78
+ //# sourceMappingURL=PeerSharedAttributeSucceededNotificationItemProcessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeerSharedAttributeSucceededNotificationItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.ts"],"names":[],"mappings":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AAmB,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAA;IAClE,CAAC;IAEO,KAAK,CAAC,mBAAmB,CAC7B,gBAA8D,EAC9D,aAAgC;QAEhC,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QAC7G,IAAI,OAAO,SAAS,KAAK,WAAW,EAAE;YAClC,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU;iBACtC,qBAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;iBACnC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,gDAAgD,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;SAC7G;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAC7E,gBAAgB,CAAC,aAAa,CACjC,CAAA;QACD,IAAI,OAAO,WAAW,EAAE,WAAW,KAAK,WAAW,EAAE;YACjD,WAAW,CAAC,WAAW,GAAG,SAAS,CAAA;YACnC,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU;iBACtC,qBAAqB,CAAC,WAAW,CAAC;iBAClC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CACT,IAAI,CAAC,OAAO,CAAC,KAAK,CACd,8CAA8C,gBAAgB,CAAC,aAAa,IAAI,EAChF,CAAC,CACJ,CACJ,CAAA;SACR;IACL,CAAC;CACJ;AA/GD,sHA+GC"}
@@ -17,10 +17,10 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
17
17
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
18
18
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
19
19
  exports.buildInformation = {
20
- version: "3.5.1",
21
- build: "113",
22
- date: "2023-10-31T14:01:53+00:00",
23
- commit: "b4bf86f640160bfe11c2e1fec16d54ddd43371a1",
20
+ version: "3.6.0",
21
+ build: "114",
22
+ date: "2023-11-07T08:28:32+00:00",
23
+ commit: "c08ff9c7bd340b25e5289f39c7d4c5bd0d59aef9",
24
24
  dependencies: {"@js-soft/docdb-querytranslator":"^1.1.1","@nmshd/iql":"^0.0.4","ts-simple-nameof":"^1.3.1"},
25
25
  libraries: {
26
26
  transport: transport_1.buildInformation,
@@ -137,7 +137,7 @@ class ConsumptionController {
137
137
  }
138
138
  getDefaultNotificationItemProcessors() {
139
139
  return new Map([
140
- [content_1.AttributeSucceededNotificationItem, modules_1.AttributeSucceededNotificationItemProcessor]
140
+ [content_1.PeerSharedAttributeSucceededNotificationItem, modules_1.PeerSharedAttributeSucceededNotificationItemProcessor]
141
141
  ]);
142
142
  }
143
143
  }
@@ -2465,7 +2465,7 @@ __exportStar(__webpack_require__(/*! ./itemProcessors/AbstractNotificationItemPr
2465
2465
  __exportStar(__webpack_require__(/*! ./itemProcessors/NotificationItemConstructor */ "./dist/modules/notifications/itemProcessors/NotificationItemConstructor.js"), exports);
2466
2466
  __exportStar(__webpack_require__(/*! ./itemProcessors/NotificationItemProcessorConstructor */ "./dist/modules/notifications/itemProcessors/NotificationItemProcessorConstructor.js"), exports);
2467
2467
  __exportStar(__webpack_require__(/*! ./itemProcessors/NotificationItemProcessorRegistry */ "./dist/modules/notifications/itemProcessors/NotificationItemProcessorRegistry.js"), exports);
2468
- __exportStar(__webpack_require__(/*! ./itemProcessors/attributeSucceeded/AttributeSucceededNotificationItemProcessor */ "./dist/modules/notifications/itemProcessors/attributeSucceeded/AttributeSucceededNotificationItemProcessor.js"), exports);
2468
+ __exportStar(__webpack_require__(/*! ./itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor */ "./dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js"), exports);
2469
2469
  __exportStar(__webpack_require__(/*! ./local/LocalNotification */ "./dist/modules/notifications/local/LocalNotification.js"), exports);
2470
2470
  __exportStar(__webpack_require__(/*! ./local/LocalNotificationSource */ "./dist/modules/notifications/local/LocalNotificationSource.js"), exports);
2471
2471
  //# sourceMappingURL=index.js.map
@@ -2558,61 +2558,61 @@ exports.NotificationItemProcessorRegistry = NotificationItemProcessorRegistry;
2558
2558
 
2559
2559
  /***/ }),
2560
2560
 
2561
- /***/ "./dist/modules/notifications/itemProcessors/attributeSucceeded/AttributeSucceededNotificationItemProcessor.js":
2562
- /*!*********************************************************************************************************************!*\
2563
- !*** ./dist/modules/notifications/itemProcessors/attributeSucceeded/AttributeSucceededNotificationItemProcessor.js ***!
2564
- \*********************************************************************************************************************/
2561
+ /***/ "./dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js":
2562
+ /*!*******************************************************************************************************************************!*\
2563
+ !*** ./dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js ***!
2564
+ \*******************************************************************************************************************************/
2565
2565
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2566
2566
 
2567
2567
  "use strict";
2568
2568
 
2569
2569
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2570
- exports.AttributeSucceededNotificationItemProcessor = void 0;
2570
+ exports.PeerSharedAttributeSucceededNotificationItemProcessor = void 0;
2571
2571
  const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
2572
2572
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
2573
2573
  const CoreErrors_1 = __webpack_require__(/*! ../../../../consumption/CoreErrors */ "./dist/consumption/CoreErrors.js");
2574
2574
  const attributes_1 = __webpack_require__(/*! ../../../attributes */ "./dist/modules/attributes/index.js");
2575
2575
  const common_1 = __webpack_require__(/*! ../../../common */ "./dist/modules/common/index.js");
2576
2576
  const AbstractNotificationItemProcessor_1 = __webpack_require__(/*! ../AbstractNotificationItemProcessor */ "./dist/modules/notifications/itemProcessors/AbstractNotificationItemProcessor.js");
2577
- class AttributeSucceededNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
2577
+ class PeerSharedAttributeSucceededNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
2578
2578
  constructor(consumptionController) {
2579
2579
  super(consumptionController);
2580
- this._logger = transport_1.TransportLoggerFactory.getLogger(AttributeSucceededNotificationItemProcessor);
2580
+ this._logger = transport_1.TransportLoggerFactory.getLogger(PeerSharedAttributeSucceededNotificationItemProcessor);
2581
2581
  }
2582
2582
  async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
2583
- if (!notification.peer.equals(notificationItem.attribute.owner)) {
2583
+ if (!notification.peer.equals(notificationItem.successorContent.owner)) {
2584
2584
  return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.successionPeerIsNotOwner());
2585
2585
  }
2586
2586
  const successorParams = {
2587
- id: notificationItem.newAttributeId,
2588
- content: notificationItem.attribute,
2587
+ id: notificationItem.successorId,
2588
+ content: notificationItem.successorContent,
2589
2589
  shareInfo: { requestReference: notification.id, peer: notification.peer }
2590
2590
  };
2591
- if (notificationItem.attribute instanceof content_1.IdentityAttribute) {
2592
- const validationResult = await this.consumptionController.attributes.validatePeerSharedIdentityAttributeSuccession(notificationItem.succeededAttributeId, successorParams);
2591
+ if (notificationItem.successorContent instanceof content_1.IdentityAttribute) {
2592
+ const validationResult = await this.consumptionController.attributes.validatePeerSharedIdentityAttributeSuccession(notificationItem.predecessorId, successorParams);
2593
2593
  return validationResult;
2594
2594
  }
2595
- const validationResult = await this.consumptionController.attributes.validatePeerSharedRelationshipAttributeSuccession(notificationItem.succeededAttributeId, successorParams);
2595
+ const validationResult = await this.consumptionController.attributes.validatePeerSharedRelationshipAttributeSuccession(notificationItem.predecessorId, successorParams);
2596
2596
  return validationResult;
2597
2597
  }
2598
2598
  async process(notificationItem, notification) {
2599
2599
  const successorParams = {
2600
- id: notificationItem.newAttributeId,
2601
- content: notificationItem.attribute,
2600
+ id: notificationItem.successorId,
2601
+ content: notificationItem.successorContent,
2602
2602
  shareInfo: { requestReference: notification.id, peer: notification.peer }
2603
2603
  };
2604
2604
  let predecessor;
2605
2605
  let successor;
2606
2606
  try {
2607
- if (notificationItem.attribute instanceof content_1.IdentityAttribute) {
2607
+ if (notificationItem.successorContent instanceof content_1.IdentityAttribute) {
2608
2608
  ;
2609
2609
  ({ predecessor, successor } =
2610
- await this.consumptionController.attributes.succeedPeerSharedIdentityAttribute(notificationItem.succeededAttributeId, successorParams, false));
2610
+ await this.consumptionController.attributes.succeedPeerSharedIdentityAttribute(notificationItem.predecessorId, successorParams, false));
2611
2611
  }
2612
2612
  else {
2613
2613
  ;
2614
2614
  ({ predecessor, successor } =
2615
- await this.consumptionController.attributes.succeedPeerSharedRelationshipAttribute(notificationItem.succeededAttributeId, successorParams, false));
2615
+ await this.consumptionController.attributes.succeedPeerSharedRelationshipAttribute(notificationItem.predecessorId, successorParams, false));
2616
2616
  }
2617
2617
  }
2618
2618
  catch (e) {
@@ -2626,23 +2626,23 @@ class AttributeSucceededNotificationItemProcessor extends AbstractNotificationIt
2626
2626
  await this.rollbackPartialWork(notificationItem, notification);
2627
2627
  }
2628
2628
  async rollbackPartialWork(notificationItem, _notification) {
2629
- const successor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.newAttributeId);
2629
+ const successor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.successorId);
2630
2630
  if (typeof successor !== "undefined") {
2631
2631
  await this.consumptionController.attributes
2632
2632
  .deleteAttributeUnsafe(successor.id)
2633
2633
  .catch((e) => this._logger.error(`Deletion failed for attribute (attribute id: ${successor.id}).`, e));
2634
2634
  }
2635
- const predecessor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.succeededAttributeId);
2635
+ const predecessor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.predecessorId);
2636
2636
  if (typeof predecessor?.succeededBy !== "undefined") {
2637
2637
  predecessor.succeededBy = undefined;
2638
2638
  await this.consumptionController.attributes
2639
2639
  .updateAttributeUnsafe(predecessor)
2640
- .catch((e) => this._logger.error(`Update failed for attribute (attribute id: ${notificationItem.succeededAttributeId}).`, e));
2640
+ .catch((e) => this._logger.error(`Update failed for attribute (attribute id: ${notificationItem.predecessorId}).`, e));
2641
2641
  }
2642
2642
  }
2643
2643
  }
2644
- exports.AttributeSucceededNotificationItemProcessor = AttributeSucceededNotificationItemProcessor;
2645
- //# sourceMappingURL=AttributeSucceededNotificationItemProcessor.js.map
2644
+ exports.PeerSharedAttributeSucceededNotificationItemProcessor = PeerSharedAttributeSucceededNotificationItemProcessor;
2645
+ //# sourceMappingURL=PeerSharedAttributeSucceededNotificationItemProcessor.js.map
2646
2646
 
2647
2647
  /***/ }),
2648
2648