@nmshd/consumption 3.9.7 → 3.11.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.
- package/dist/buildInformation.js +4 -4
- package/dist/consumption/ConsumptionController.d.ts.map +1 -1
- package/dist/consumption/ConsumptionController.js +5 -1
- package/dist/consumption/ConsumptionController.js.map +1 -1
- package/dist/consumption/CoreErrors.d.ts +19 -3
- package/dist/consumption/CoreErrors.d.ts.map +1 -1
- package/dist/consumption/CoreErrors.js +52 -4
- package/dist/consumption/CoreErrors.js.map +1 -1
- package/dist/modules/attributes/AttributesController.d.ts +19 -1
- package/dist/modules/attributes/AttributesController.d.ts.map +1 -1
- package/dist/modules/attributes/AttributesController.js +238 -59
- package/dist/modules/attributes/AttributesController.js.map +1 -1
- package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts +7 -0
- package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts.map +1 -0
- package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js +12 -0
- package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js.map +1 -0
- package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts +7 -0
- package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts.map +1 -0
- package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js +12 -0
- package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js.map +1 -0
- package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.d.ts +7 -0
- package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.d.ts.map +1 -0
- package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js +12 -0
- package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js.map +1 -0
- package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeSucceededEvent.d.ts +8 -0
- package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeSucceededEvent.d.ts.map +1 -0
- package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeSucceededEvent.js +12 -0
- package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeSucceededEvent.js.map +1 -0
- package/dist/modules/attributes/events/index.d.ts +4 -0
- package/dist/modules/attributes/events/index.d.ts.map +1 -1
- package/dist/modules/attributes/events/index.js +4 -0
- package/dist/modules/attributes/events/index.js.map +1 -1
- package/dist/modules/attributes/index.d.ts +1 -0
- package/dist/modules/attributes/index.d.ts.map +1 -1
- package/dist/modules/attributes/index.js +1 -0
- package/dist/modules/attributes/index.js.map +1 -1
- package/dist/modules/attributes/local/LocalAttribute.d.ts +20 -9
- package/dist/modules/attributes/local/LocalAttribute.d.ts.map +1 -1
- package/dist/modules/attributes/local/LocalAttribute.js +48 -13
- package/dist/modules/attributes/local/LocalAttribute.js.map +1 -1
- package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts +21 -0
- package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts.map +1 -0
- package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js +40 -0
- package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js.map +1 -0
- package/dist/modules/notifications/index.d.ts +3 -0
- package/dist/modules/notifications/index.d.ts.map +1 -1
- package/dist/modules/notifications/index.js +3 -0
- package/dist/modules/notifications/index.js.map +1 -1
- package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts +14 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +1 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js +56 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js.map +1 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js +57 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyOwnedRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyOwnedRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyOwnedRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +57 -0
- package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyOwnedRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
- package/dist/modules/requests/incoming/IncomingRequestsController.d.ts.map +1 -1
- package/dist/modules/requests/incoming/IncomingRequestsController.js +1 -1
- package/dist/modules/requests/incoming/IncomingRequestsController.js.map +1 -1
- package/dist/modules/requests/index.d.ts +2 -0
- package/dist/modules/requests/index.d.ts.map +1 -1
- package/dist/modules/requests/index.js +2 -0
- package/dist/modules/requests/index.js.map +1 -1
- package/dist/modules/requests/itemProcessors/AbstractRequestItemProcessor.d.ts +2 -1
- package/dist/modules/requests/itemProcessors/AbstractRequestItemProcessor.d.ts.map +1 -1
- package/dist/modules/requests/itemProcessors/AbstractRequestItemProcessor.js.map +1 -1
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.d.ts +2 -1
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.d.ts.map +1 -1
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.js +0 -1
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.js.map +1 -1
- package/dist/modules/requests/itemProcessors/IRequestItemProcessor.d.ts +2 -1
- package/dist/modules/requests/itemProcessors/IRequestItemProcessor.d.ts.map +1 -1
- package/dist/modules/requests/itemProcessors/deleteAttribute/AcceptDeleteAttributeRequestItemParameters.d.ts +11 -0
- package/dist/modules/requests/itemProcessors/deleteAttribute/AcceptDeleteAttributeRequestItemParameters.d.ts.map +1 -0
- package/dist/modules/requests/itemProcessors/deleteAttribute/AcceptDeleteAttributeRequestItemParameters.js +29 -0
- package/dist/modules/requests/itemProcessors/deleteAttribute/AcceptDeleteAttributeRequestItemParameters.js.map +1 -0
- package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts +13 -0
- package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts.map +1 -0
- package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js +87 -0
- package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/freeText/AcceptFreeTextRequestItemParameters.js +1 -1
- package/dist/modules/requests/itemProcessors/freeText/AcceptFreeTextRequestItemParameters.js.map +1 -1
- package/dist/modules/requests/itemProcessors/freeText/FreeTextRequestItemProcessor.js +1 -1
- package/dist/modules/requests/itemProcessors/freeText/FreeTextRequestItemProcessor.js.map +1 -1
- package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts +5 -4
- package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts.map +1 -1
- package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js +92 -22
- package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js.map +1 -1
- package/dist/modules/requests/itemProcessors/readAttribute/AcceptReadAttributeRequestItemParameters.d.ts +1 -1
- package/dist/modules/requests/itemProcessors/readAttribute/AcceptReadAttributeRequestItemParameters.d.ts.map +1 -1
- package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts +7 -4
- package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts.map +1 -1
- package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js +129 -20
- package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js.map +1 -1
- package/package.json +6 -15
- package/lib-web/nmshd.consumption.js +0 -35727
- package/lib-web/nmshd.consumption.js.map +0 -1
- package/lib-web/nmshd.consumption.min.js +0 -3
- package/lib-web/nmshd.consumption.min.js.map +0 -1
- package/ui5.yaml +0 -9
package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent = void 0;
|
|
4
|
+
const transport_1 = require("@nmshd/transport");
|
|
5
|
+
class ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent extends transport_1.TransportDataEvent {
|
|
6
|
+
static { this.namespace = "consumption.thirdPartyOwnedRelationshipAttributeDeletedByPeer"; }
|
|
7
|
+
constructor(eventTargetAddress, data) {
|
|
8
|
+
super(ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.namespace, eventTargetAddress, data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent = ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent;
|
|
12
|
+
//# sourceMappingURL=ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js.map
|
package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js","sourceRoot":"","sources":["../../../../src/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.ts"],"names":[],"mappings":";;;AAAA,gDAAsD;AAGtD,MAAa,sDAAuD,SAAQ,8BAAkC;aACnF,cAAS,GAAG,+DAA+D,CAAC;IAEnG,YAAmB,kBAA0B,EAAE,IAAoB;QAC/D,KAAK,CAAC,sDAAsD,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IACtG,CAAC;;AALL,wHAMC"}
|
package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeSucceededEvent.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TransportDataEvent } from "@nmshd/transport";
|
|
2
|
+
import { LocalAttribute } from "../local/LocalAttribute";
|
|
3
|
+
import { AttributeSucceededEventData } from "./AttributeSucceededEventData";
|
|
4
|
+
export declare class ThirdPartyOwnedRelationshipAttributeSucceededEvent extends TransportDataEvent<AttributeSucceededEventData> {
|
|
5
|
+
static readonly namespace = "consumption.thirdPartyOwnedRelationshipAttributeSucceded";
|
|
6
|
+
constructor(eventTargetAddress: string, predecessor: LocalAttribute, successor: LocalAttribute);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ThirdPartyOwnedRelationshipAttributeSucceededEvent.d.ts.map
|
package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeSucceededEvent.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThirdPartyOwnedRelationshipAttributeSucceededEvent.d.ts","sourceRoot":"","sources":["../../../../src/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeSucceededEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,qBAAa,kDAAmD,SAAQ,kBAAkB,CAAC,2BAA2B,CAAC;IACnH,gBAAuB,SAAS,8DAA8D;gBAE3E,kBAAkB,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc;CAGxG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThirdPartyOwnedRelationshipAttributeSucceededEvent = void 0;
|
|
4
|
+
const transport_1 = require("@nmshd/transport");
|
|
5
|
+
class ThirdPartyOwnedRelationshipAttributeSucceededEvent extends transport_1.TransportDataEvent {
|
|
6
|
+
static { this.namespace = "consumption.thirdPartyOwnedRelationshipAttributeSucceded"; }
|
|
7
|
+
constructor(eventTargetAddress, predecessor, successor) {
|
|
8
|
+
super(ThirdPartyOwnedRelationshipAttributeSucceededEvent.namespace, eventTargetAddress, { predecessor, successor });
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ThirdPartyOwnedRelationshipAttributeSucceededEvent = ThirdPartyOwnedRelationshipAttributeSucceededEvent;
|
|
12
|
+
//# sourceMappingURL=ThirdPartyOwnedRelationshipAttributeSucceededEvent.js.map
|
package/dist/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeSucceededEvent.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThirdPartyOwnedRelationshipAttributeSucceededEvent.js","sourceRoot":"","sources":["../../../../src/modules/attributes/events/ThirdPartyOwnedRelationshipAttributeSucceededEvent.ts"],"names":[],"mappings":";;;AAAA,gDAAsD;AAItD,MAAa,kDAAmD,SAAQ,8BAA+C;aAC5F,cAAS,GAAG,0DAA0D,CAAC;IAE9F,YAAmB,kBAA0B,EAAE,WAA2B,EAAE,SAAyB;QACjG,KAAK,CAAC,kDAAkD,CAAC,SAAS,EAAE,kBAAkB,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;IACxH,CAAC;;AALL,gHAMC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export * from "./AttributeCreatedEvent";
|
|
2
2
|
export * from "./AttributeDeletedEvent";
|
|
3
3
|
export * from "./AttributeSucceededEventData";
|
|
4
|
+
export * from "./OwnSharedAttributeDeletedByOwnerEvent";
|
|
4
5
|
export * from "./OwnSharedAttributeSucceededEvent";
|
|
6
|
+
export * from "./PeerSharedAttributeDeletedByPeerEvent";
|
|
5
7
|
export * from "./PeerSharedAttributeSucceededEvent";
|
|
6
8
|
export * from "./RepositoryAttributeSucceededEvent";
|
|
7
9
|
export * from "./SharedAttributeCopyCreatedEvent";
|
|
10
|
+
export * from "./ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent";
|
|
11
|
+
export * from "./ThirdPartyOwnedRelationshipAttributeSucceededEvent";
|
|
8
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/attributes/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/attributes/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,0DAA0D,CAAC;AACzE,cAAc,sDAAsD,CAAC"}
|
|
@@ -17,8 +17,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./AttributeCreatedEvent"), exports);
|
|
18
18
|
__exportStar(require("./AttributeDeletedEvent"), exports);
|
|
19
19
|
__exportStar(require("./AttributeSucceededEventData"), exports);
|
|
20
|
+
__exportStar(require("./OwnSharedAttributeDeletedByOwnerEvent"), exports);
|
|
20
21
|
__exportStar(require("./OwnSharedAttributeSucceededEvent"), exports);
|
|
22
|
+
__exportStar(require("./PeerSharedAttributeDeletedByPeerEvent"), exports);
|
|
21
23
|
__exportStar(require("./PeerSharedAttributeSucceededEvent"), exports);
|
|
22
24
|
__exportStar(require("./RepositoryAttributeSucceededEvent"), exports);
|
|
23
25
|
__exportStar(require("./SharedAttributeCopyCreatedEvent"), exports);
|
|
26
|
+
__exportStar(require("./ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent"), exports);
|
|
27
|
+
__exportStar(require("./ThirdPartyOwnedRelationshipAttributeSucceededEvent"), exports);
|
|
24
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/attributes/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,0DAAwC;AACxC,gEAA8C;AAC9C,qEAAmD;AACnD,sEAAoD;AACpD,sEAAoD;AACpD,oEAAkD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/attributes/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,0DAAwC;AACxC,gEAA8C;AAC9C,0EAAwD;AACxD,qEAAmD;AACnD,0EAAwD;AACxD,sEAAoD;AACpD,sEAAoD;AACpD,oEAAkD;AAClD,2FAAyE;AACzE,uFAAqE"}
|
|
@@ -5,5 +5,6 @@ export * from "./local/CreateLocalAttributeParams";
|
|
|
5
5
|
export * from "./local/CreatePeerLocalAttributeParams";
|
|
6
6
|
export * from "./local/CreateSharedLocalAttributeCopyParams";
|
|
7
7
|
export * from "./local/LocalAttribute";
|
|
8
|
+
export * from "./local/LocalAttributeDeletionInfo";
|
|
8
9
|
export * from "./local/LocalAttributeShareInfo";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/attributes/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/attributes/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wBAAwB,CAAC;AACvC,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC"}
|
|
@@ -21,5 +21,6 @@ __exportStar(require("./local/CreateLocalAttributeParams"), exports);
|
|
|
21
21
|
__exportStar(require("./local/CreatePeerLocalAttributeParams"), exports);
|
|
22
22
|
__exportStar(require("./local/CreateSharedLocalAttributeCopyParams"), exports);
|
|
23
23
|
__exportStar(require("./local/LocalAttribute"), exports);
|
|
24
|
+
__exportStar(require("./local/LocalAttributeDeletionInfo"), exports);
|
|
24
25
|
__exportStar(require("./local/LocalAttributeShareInfo"), exports);
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/attributes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,2CAAyB;AACzB,mEAAiD;AACjD,qEAAmD;AACnD,yEAAuD;AACvD,+EAA6D;AAC7D,yDAAuC;AACvC,kEAAgD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/attributes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,2CAAyB;AACzB,mEAAiD;AACjD,qEAAmD;AACnD,yEAAuD;AACvD,+EAA6D;AAC7D,yDAAuC;AACvC,qEAAmD;AACnD,kEAAgD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IdentityAttribute, IdentityAttributeJSON, IIdentityAttribute, IRelationshipAttribute, RelationshipAttribute, RelationshipAttributeJSON } from "@nmshd/content";
|
|
2
2
|
import { CoreAddress, CoreDate, CoreId, CoreSynchronizable, ICoreDate, ICoreId, ICoreSynchronizable } from "@nmshd/transport";
|
|
3
|
+
import { ILocalAttributeDeletionInfo, LocalAttributeDeletionInfo, LocalAttributeDeletionInfoJSON } from "./LocalAttributeDeletionInfo";
|
|
3
4
|
import { ILocalAttributeShareInfo, LocalAttributeShareInfo, LocalAttributeShareInfoJSON } from "./LocalAttributeShareInfo";
|
|
4
5
|
export interface LocalAttributeJSON {
|
|
5
6
|
content: IdentityAttributeJSON | RelationshipAttributeJSON;
|
|
@@ -7,6 +8,7 @@ export interface LocalAttributeJSON {
|
|
|
7
8
|
succeeds?: string;
|
|
8
9
|
succeededBy?: string;
|
|
9
10
|
shareInfo?: LocalAttributeShareInfoJSON;
|
|
11
|
+
deletionInfo?: LocalAttributeDeletionInfoJSON;
|
|
10
12
|
parentId?: string;
|
|
11
13
|
}
|
|
12
14
|
export interface ILocalAttribute extends ICoreSynchronizable {
|
|
@@ -15,19 +17,16 @@ export interface ILocalAttribute extends ICoreSynchronizable {
|
|
|
15
17
|
succeeds?: ICoreId;
|
|
16
18
|
succeededBy?: ICoreId;
|
|
17
19
|
shareInfo?: ILocalAttributeShareInfo;
|
|
20
|
+
deletionInfo?: ILocalAttributeDeletionInfo;
|
|
18
21
|
parentId?: ICoreId;
|
|
19
22
|
}
|
|
20
23
|
export type OwnSharedIdentityAttribute = LocalAttribute & {
|
|
21
24
|
content: IdentityAttribute;
|
|
22
|
-
shareInfo: LocalAttributeShareInfo
|
|
23
|
-
sourceAttribute: CoreId;
|
|
24
|
-
};
|
|
25
|
+
shareInfo: LocalAttributeShareInfo;
|
|
25
26
|
};
|
|
26
27
|
export type OwnSharedRelationshipAttribute = LocalAttribute & {
|
|
27
28
|
content: RelationshipAttribute;
|
|
28
|
-
shareInfo: LocalAttributeShareInfo
|
|
29
|
-
sourceAttribute: undefined;
|
|
30
|
-
};
|
|
29
|
+
shareInfo: LocalAttributeShareInfo;
|
|
31
30
|
};
|
|
32
31
|
export type PeerSharedIdentityAttribute = LocalAttribute & {
|
|
33
32
|
content: IdentityAttribute;
|
|
@@ -41,6 +40,10 @@ export type PeerSharedRelationshipAttribute = LocalAttribute & {
|
|
|
41
40
|
sourceAttribute: undefined;
|
|
42
41
|
};
|
|
43
42
|
};
|
|
43
|
+
export type ThirdPartyOwnedRelationshipAttribute = LocalAttribute & {
|
|
44
|
+
content: RelationshipAttribute;
|
|
45
|
+
shareInfo: LocalAttributeShareInfo;
|
|
46
|
+
};
|
|
44
47
|
export type RepositoryAttribute = LocalAttribute & {
|
|
45
48
|
content: IdentityAttribute;
|
|
46
49
|
shareInfo: undefined;
|
|
@@ -53,29 +56,37 @@ export declare class LocalAttribute extends CoreSynchronizable implements ILocal
|
|
|
53
56
|
succeeds?: CoreId;
|
|
54
57
|
succeededBy?: CoreId;
|
|
55
58
|
shareInfo?: LocalAttributeShareInfo;
|
|
59
|
+
deletionInfo?: LocalAttributeDeletionInfo;
|
|
56
60
|
parentId?: CoreId;
|
|
57
61
|
isOwnSharedIdentityAttribute(ownAddress: CoreAddress, peerAddress?: CoreAddress): this is OwnSharedIdentityAttribute;
|
|
58
62
|
isOwnSharedRelationshipAttribute(ownAddress: CoreAddress, peerAddress?: CoreAddress): this is OwnSharedRelationshipAttribute;
|
|
59
63
|
isPeerSharedIdentityAttribute(peerAddress?: CoreAddress): this is PeerSharedIdentityAttribute;
|
|
60
64
|
isPeerSharedRelationshipAttribute(peerAddress?: CoreAddress): this is PeerSharedRelationshipAttribute;
|
|
65
|
+
isThirdPartyOwnedRelationshipAttribute(ownAddress: CoreAddress, thirdPartyAddress?: CoreAddress): this is ThirdPartyOwnedRelationshipAttribute;
|
|
61
66
|
isRepositoryAttribute(ownAddress: CoreAddress): this is RepositoryAttribute;
|
|
62
67
|
isOwnSharedAttribute(ownAddress: CoreAddress, peerAddress?: CoreAddress): this is OwnSharedIdentityAttribute | OwnSharedRelationshipAttribute;
|
|
63
68
|
isPeerSharedAttribute(peerAddress?: CoreAddress): this is PeerSharedIdentityAttribute | PeerSharedRelationshipAttribute;
|
|
69
|
+
isThirdPartyOwnedAttribute(ownAddress: CoreAddress, thirdPartyAddress?: CoreAddress): this is ThirdPartyOwnedRelationshipAttribute;
|
|
64
70
|
isIdentityAttribute(): this is LocalAttribute & {
|
|
65
71
|
content: IdentityAttribute;
|
|
66
72
|
};
|
|
67
73
|
isRelationshipAttribute(): this is LocalAttribute & {
|
|
68
74
|
content: RelationshipAttribute;
|
|
69
75
|
} & {
|
|
70
|
-
shareInfo: LocalAttributeShareInfo
|
|
71
|
-
sourceAttribute: undefined;
|
|
72
|
-
};
|
|
76
|
+
shareInfo: LocalAttributeShareInfo;
|
|
73
77
|
};
|
|
74
78
|
isComplexAttribute(): boolean;
|
|
75
79
|
isOwnedBy(identity: CoreAddress): boolean;
|
|
76
80
|
isShared(): this is LocalAttribute & {
|
|
77
81
|
shareInfo: LocalAttributeShareInfo;
|
|
78
82
|
};
|
|
83
|
+
setDeletionInfo(deletionInfo: LocalAttributeDeletionInfo, ownAddress: CoreAddress): this;
|
|
84
|
+
private isPeerSharedAttributeDeletionInfo;
|
|
85
|
+
private isOwnSharedAttributeDeletionInfo;
|
|
86
|
+
private isThirdPartyOwnedRelationshipAttributeDeletionInfo;
|
|
87
|
+
hasDeletionInfo(): this is LocalAttribute & {
|
|
88
|
+
deletionInfo: LocalAttributeDeletionInfo;
|
|
89
|
+
};
|
|
79
90
|
static from(value: ILocalAttribute | LocalAttributeJSON): LocalAttribute;
|
|
80
91
|
static fromAttribute(content: IIdentityAttribute | IRelationshipAttribute, succeeds?: ICoreId, shareInfo?: ILocalAttributeShareInfo, id?: CoreId, parentId?: CoreId): Promise<LocalAttribute>;
|
|
81
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalAttribute.d.ts","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttribute.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"LocalAttribute.d.ts","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttribute.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,EAA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
|
@@ -15,6 +15,8 @@ const content_1 = require("@nmshd/content");
|
|
|
15
15
|
const transport_1 = require("@nmshd/transport");
|
|
16
16
|
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
17
17
|
const ConsumptionIds_1 = require("../../../consumption/ConsumptionIds");
|
|
18
|
+
const CoreErrors_1 = require("../../../consumption/CoreErrors");
|
|
19
|
+
const LocalAttributeDeletionInfo_1 = require("./LocalAttributeDeletionInfo");
|
|
18
20
|
const LocalAttributeShareInfo_1 = require("./LocalAttributeShareInfo");
|
|
19
21
|
let LocalAttribute = class LocalAttribute extends transport_1.CoreSynchronizable {
|
|
20
22
|
constructor() {
|
|
@@ -26,6 +28,7 @@ let LocalAttribute = class LocalAttribute extends transport_1.CoreSynchronizable
|
|
|
26
28
|
(0, ts_simple_nameof_1.nameof)((r) => r.succeeds),
|
|
27
29
|
(0, ts_simple_nameof_1.nameof)((r) => r.succeededBy),
|
|
28
30
|
(0, ts_simple_nameof_1.nameof)((r) => r.shareInfo),
|
|
31
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.deletionInfo),
|
|
29
32
|
(0, ts_simple_nameof_1.nameof)((r) => r.parentId)
|
|
30
33
|
];
|
|
31
34
|
this.userdataProperties = [(0, ts_simple_nameof_1.nameof)((r) => r.content)];
|
|
@@ -42,17 +45,14 @@ let LocalAttribute = class LocalAttribute extends transport_1.CoreSynchronizable
|
|
|
42
45
|
isPeerSharedRelationshipAttribute(peerAddress) {
|
|
43
46
|
return this.isRelationshipAttribute() && this.isPeerSharedAttribute(peerAddress);
|
|
44
47
|
}
|
|
48
|
+
isThirdPartyOwnedRelationshipAttribute(ownAddress, thirdPartyAddress) {
|
|
49
|
+
return this.isRelationshipAttribute() && this.isThirdPartyOwnedAttribute(ownAddress, thirdPartyAddress);
|
|
50
|
+
}
|
|
45
51
|
isRepositoryAttribute(ownAddress) {
|
|
46
52
|
return this.isIdentityAttribute() && !this.isShared() && this.isOwnedBy(ownAddress);
|
|
47
53
|
}
|
|
48
54
|
isOwnSharedAttribute(ownAddress, peerAddress) {
|
|
49
55
|
let isOwnSharedAttribute = this.isShared() && this.isOwnedBy(ownAddress);
|
|
50
|
-
if (!isOwnSharedAttribute) {
|
|
51
|
-
return isOwnSharedAttribute;
|
|
52
|
-
}
|
|
53
|
-
if (this.isIdentityAttribute()) {
|
|
54
|
-
isOwnSharedAttribute &&= typeof this.shareInfo.sourceAttribute !== "undefined";
|
|
55
|
-
}
|
|
56
56
|
if (typeof peerAddress !== "undefined") {
|
|
57
57
|
isOwnSharedAttribute &&= this.shareInfo.peer.equals(peerAddress);
|
|
58
58
|
}
|
|
@@ -60,22 +60,24 @@ let LocalAttribute = class LocalAttribute extends transport_1.CoreSynchronizable
|
|
|
60
60
|
}
|
|
61
61
|
isPeerSharedAttribute(peerAddress) {
|
|
62
62
|
let isPeerSharedAttribute = this.isShared() && this.isOwnedBy(this.shareInfo.peer);
|
|
63
|
-
|
|
64
|
-
return isPeerSharedAttribute;
|
|
65
|
-
}
|
|
66
|
-
if (this.isIdentityAttribute()) {
|
|
67
|
-
isPeerSharedAttribute &&= typeof this.shareInfo.sourceAttribute === "undefined";
|
|
68
|
-
}
|
|
63
|
+
isPeerSharedAttribute &&= typeof this.shareInfo.sourceAttribute === "undefined";
|
|
69
64
|
if (typeof peerAddress !== "undefined") {
|
|
70
65
|
isPeerSharedAttribute &&= this.isOwnedBy(peerAddress);
|
|
71
66
|
}
|
|
72
67
|
return isPeerSharedAttribute;
|
|
73
68
|
}
|
|
69
|
+
isThirdPartyOwnedAttribute(ownAddress, thirdPartyAddress) {
|
|
70
|
+
let isThirdPartyOwnedAttribute = this.isShared() && !this.isOwnedBy(ownAddress) && !this.isOwnedBy(this.shareInfo.peer);
|
|
71
|
+
if (typeof thirdPartyAddress !== "undefined") {
|
|
72
|
+
isThirdPartyOwnedAttribute &&= this.isOwnedBy(thirdPartyAddress);
|
|
73
|
+
}
|
|
74
|
+
return isThirdPartyOwnedAttribute;
|
|
75
|
+
}
|
|
74
76
|
isIdentityAttribute() {
|
|
75
77
|
return this.content instanceof content_1.IdentityAttribute;
|
|
76
78
|
}
|
|
77
79
|
isRelationshipAttribute() {
|
|
78
|
-
return this.content instanceof content_1.RelationshipAttribute && this.isShared()
|
|
80
|
+
return this.content instanceof content_1.RelationshipAttribute && this.isShared();
|
|
79
81
|
}
|
|
80
82
|
isComplexAttribute() {
|
|
81
83
|
return this.content.value instanceof content_1.AbstractComplexValue;
|
|
@@ -86,6 +88,34 @@ let LocalAttribute = class LocalAttribute extends transport_1.CoreSynchronizable
|
|
|
86
88
|
isShared() {
|
|
87
89
|
return typeof this.shareInfo !== "undefined";
|
|
88
90
|
}
|
|
91
|
+
setDeletionInfo(deletionInfo, ownAddress) {
|
|
92
|
+
if (this.isRepositoryAttribute(ownAddress)) {
|
|
93
|
+
throw CoreErrors_1.CoreErrors.attributes.cannotSetDeletionInfoOfRepositoryAttributes();
|
|
94
|
+
}
|
|
95
|
+
if (this.isOwnSharedAttribute(ownAddress) && !this.isOwnSharedAttributeDeletionInfo(deletionInfo)) {
|
|
96
|
+
throw CoreErrors_1.CoreErrors.attributes.invalidDeletionInfoOfOwnSharedAttribute();
|
|
97
|
+
}
|
|
98
|
+
if (this.isPeerSharedAttribute() && !this.isPeerSharedAttributeDeletionInfo(deletionInfo)) {
|
|
99
|
+
throw CoreErrors_1.CoreErrors.attributes.invalidDeletionInfoOfPeerSharedAttribute();
|
|
100
|
+
}
|
|
101
|
+
if (this.isThirdPartyOwnedRelationshipAttribute(ownAddress) && !this.isThirdPartyOwnedRelationshipAttributeDeletionInfo(deletionInfo)) {
|
|
102
|
+
throw CoreErrors_1.CoreErrors.attributes.invalidDeletionInfoOfThirdPartyOwnedRelationshipAttribute();
|
|
103
|
+
}
|
|
104
|
+
this.deletionInfo = deletionInfo;
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
isPeerSharedAttributeDeletionInfo(deletionInfo) {
|
|
108
|
+
return deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.DeletionStatus.DeletedByOwner || deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.DeletionStatus.ToBeDeleted;
|
|
109
|
+
}
|
|
110
|
+
isOwnSharedAttributeDeletionInfo(deletionInfo) {
|
|
111
|
+
return deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.DeletionStatus.DeletedByPeer || deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.DeletionStatus.ToBeDeletedByPeer;
|
|
112
|
+
}
|
|
113
|
+
isThirdPartyOwnedRelationshipAttributeDeletionInfo(deletionInfo) {
|
|
114
|
+
return deletionInfo.deletionStatus === LocalAttributeDeletionInfo_1.DeletionStatus.DeletedByPeer;
|
|
115
|
+
}
|
|
116
|
+
hasDeletionInfo() {
|
|
117
|
+
return typeof this.deletionInfo !== "undefined";
|
|
118
|
+
}
|
|
89
119
|
static from(value) {
|
|
90
120
|
return this.fromAny(value);
|
|
91
121
|
}
|
|
@@ -126,6 +156,11 @@ __decorate([
|
|
|
126
156
|
(0, ts_serval_1.serialize)(),
|
|
127
157
|
__metadata("design:type", LocalAttributeShareInfo_1.LocalAttributeShareInfo)
|
|
128
158
|
], LocalAttribute.prototype, "shareInfo", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
161
|
+
(0, ts_serval_1.serialize)(),
|
|
162
|
+
__metadata("design:type", LocalAttributeDeletionInfo_1.LocalAttributeDeletionInfo)
|
|
163
|
+
], LocalAttribute.prototype, "deletionInfo", void 0);
|
|
129
164
|
__decorate([
|
|
130
165
|
(0, ts_serval_1.validate)({ nullable: true }),
|
|
131
166
|
(0, ts_serval_1.serialize)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalAttribute.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA+D;AAC/D,4CAQwB;AACxB,gDAA8H;AAC9H,uD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ializable, ICoreDate } from "@nmshd/transport";
|
|
2
|
+
export declare enum DeletionStatus {
|
|
3
|
+
ToBeDeleted = "ToBeDeleted",
|
|
4
|
+
ToBeDeletedByPeer = "ToBeDeletedByPeer",
|
|
5
|
+
DeletedByPeer = "DeletedByPeer",
|
|
6
|
+
DeletedByOwner = "DeletedByOwner"
|
|
7
|
+
}
|
|
8
|
+
export interface LocalAttributeDeletionInfoJSON {
|
|
9
|
+
deletionStatus: string;
|
|
10
|
+
deletionDate: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ILocalAttributeDeletionInfo {
|
|
13
|
+
deletionStatus: DeletionStatus;
|
|
14
|
+
deletionDate: ICoreDate;
|
|
15
|
+
}
|
|
16
|
+
export declare class LocalAttributeDeletionInfo extends CoreSerializable implements ILocalAttributeDeletionInfo {
|
|
17
|
+
deletionStatus: DeletionStatus;
|
|
18
|
+
deletionDate: CoreDate;
|
|
19
|
+
static from(value: ILocalAttributeDeletionInfo | LocalAttributeDeletionInfoJSON): LocalAttributeDeletionInfo;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=LocalAttributeDeletionInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalAttributeDeletionInfo.d.ts","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttributeDeletionInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEzE,oBAAY,cAAc;IACtB,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;CACpC;AAED,MAAM,WAAW,8BAA8B;IAC3C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IACxC,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,SAAS,CAAC;CAC3B;AAED,qBAAa,0BAA2B,SAAQ,gBAAiB,YAAW,2BAA2B;IAK5F,cAAc,EAAE,cAAc,CAAC;IAI/B,YAAY,EAAE,QAAQ,CAAC;WAEhB,IAAI,CAAC,KAAK,EAAE,2BAA2B,GAAG,8BAA8B,GAAG,0BAA0B;CAGtH"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LocalAttributeDeletionInfo = exports.DeletionStatus = void 0;
|
|
13
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const transport_1 = require("@nmshd/transport");
|
|
15
|
+
var DeletionStatus;
|
|
16
|
+
(function (DeletionStatus) {
|
|
17
|
+
DeletionStatus["ToBeDeleted"] = "ToBeDeleted";
|
|
18
|
+
DeletionStatus["ToBeDeletedByPeer"] = "ToBeDeletedByPeer";
|
|
19
|
+
DeletionStatus["DeletedByPeer"] = "DeletedByPeer";
|
|
20
|
+
DeletionStatus["DeletedByOwner"] = "DeletedByOwner";
|
|
21
|
+
})(DeletionStatus || (exports.DeletionStatus = DeletionStatus = {}));
|
|
22
|
+
class LocalAttributeDeletionInfo extends transport_1.CoreSerializable {
|
|
23
|
+
static from(value) {
|
|
24
|
+
return this.fromAny(value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.LocalAttributeDeletionInfo = LocalAttributeDeletionInfo;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, ts_serval_1.serialize)(),
|
|
30
|
+
(0, ts_serval_1.validate)({
|
|
31
|
+
customValidator: (v) => (!Object.values(DeletionStatus).includes(v) ? `must be one of: ${Object.values(DeletionStatus).map((o) => `"${o}"`)}` : undefined)
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], LocalAttributeDeletionInfo.prototype, "deletionStatus", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, ts_serval_1.serialize)(),
|
|
37
|
+
(0, ts_serval_1.validate)(),
|
|
38
|
+
__metadata("design:type", transport_1.CoreDate)
|
|
39
|
+
], LocalAttributeDeletionInfo.prototype, "deletionDate", void 0);
|
|
40
|
+
//# sourceMappingURL=LocalAttributeDeletionInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalAttributeDeletionInfo.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttributeDeletionInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAyD;AACzD,gDAAyE;AAEzE,IAAY,cAKX;AALD,WAAY,cAAc;IACtB,6CAA2B,CAAA;IAC3B,yDAAuC,CAAA;IACvC,iDAA+B,CAAA;IAC/B,mDAAiC,CAAA;AACrC,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB;AAYD,MAAa,0BAA2B,SAAQ,4BAAgB;IAWrD,MAAM,CAAC,IAAI,CAAC,KAAmE;QAClF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;CACJ;AAdD,gEAcC;AATU;IAJN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAC7J,CAAC;;kEACoC;AAI/B;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACU,oBAAQ;gEAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * from "./itemProcessors/AbstractNotificationItemProcessor";
|
|
2
|
+
export * from "./itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor";
|
|
3
|
+
export * from "./itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor";
|
|
4
|
+
export * from "./itemProcessors/attributeDeleted/ThirdPartyOwnedRelationshipAttributeDeletedByPeerNotificationItemProcessor";
|
|
2
5
|
export * from "./itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor";
|
|
3
6
|
export * from "./itemProcessors/NotificationItemConstructor";
|
|
4
7
|
export * from "./itemProcessors/NotificationItemProcessorConstructor";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/notifications/index.ts"],"names":[],"mappings":"AAAA,cAAc,oDAAoD,CAAC;AACnE,cAAc,2FAA2F,CAAC;AAC1G,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/notifications/index.ts"],"names":[],"mappings":"AAAA,cAAc,oDAAoD,CAAC;AACnE,cAAc,6FAA6F,CAAC;AAC5G,cAAc,6FAA6F,CAAC;AAC5G,cAAc,8GAA8G,CAAC;AAC7H,cAAc,2FAA2F,CAAC;AAC1G,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC"}
|
|
@@ -15,6 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./itemProcessors/AbstractNotificationItemProcessor"), exports);
|
|
18
|
+
__exportStar(require("./itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor"), exports);
|
|
19
|
+
__exportStar(require("./itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor"), exports);
|
|
20
|
+
__exportStar(require("./itemProcessors/attributeDeleted/ThirdPartyOwnedRelationshipAttributeDeletedByPeerNotificationItemProcessor"), exports);
|
|
18
21
|
__exportStar(require("./itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor"), exports);
|
|
19
22
|
__exportStar(require("./itemProcessors/NotificationItemConstructor"), exports);
|
|
20
23
|
__exportStar(require("./itemProcessors/NotificationItemProcessorConstructor"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/notifications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qFAAmE;AACnE,4HAA0G;AAC1G,+EAA6D;AAC7D,wFAAsE;AACtE,qFAAmE;AACnE,4DAA0C;AAC1C,kEAAgD;AAChD,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/notifications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qFAAmE;AACnE,8HAA4G;AAC5G,8HAA4G;AAC5G,+IAA6H;AAC7H,4HAA0G;AAC1G,+EAA6D;AAC7D,wFAAsE;AACtE,qFAAmE;AACnE,4DAA0C;AAC1C,kEAAgD;AAChD,4DAA0C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OwnSharedAttributeDeletedByOwnerNotificationItem } from "@nmshd/content";
|
|
2
|
+
import { ConsumptionController } from "../../../../consumption/ConsumptionController";
|
|
3
|
+
import { OwnSharedAttributeDeletedByOwnerEvent } from "../../../attributes";
|
|
4
|
+
import { ValidationResult } from "../../../common";
|
|
5
|
+
import { LocalNotification } from "../../local/LocalNotification";
|
|
6
|
+
import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
|
|
7
|
+
export declare class OwnSharedAttributeDeletedByOwnerNotificationItemProcessor extends AbstractNotificationItemProcessor<OwnSharedAttributeDeletedByOwnerNotificationItem> {
|
|
8
|
+
private readonly _logger;
|
|
9
|
+
constructor(consumptionController: ConsumptionController);
|
|
10
|
+
checkPrerequisitesOfIncomingNotificationItem(notificationItem: OwnSharedAttributeDeletedByOwnerNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
|
|
11
|
+
process(notificationItem: OwnSharedAttributeDeletedByOwnerNotificationItem, _notification: LocalNotification): Promise<OwnSharedAttributeDeletedByOwnerEvent | void>;
|
|
12
|
+
rollback(notificationItem: OwnSharedAttributeDeletedByOwnerNotificationItem, _notification: LocalNotification): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gDAAgD,EAAE,MAAM,gBAAgB,CAAC;AAElF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAA8C,qCAAqC,EAAE,MAAM,qBAAqB,CAAC;AACxH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAEzF,qBAAa,yDAA0D,SAAQ,iCAAiC,CAAC,gDAAgD,CAAC;IAC9J,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,qBAAqB,EAAE,qBAAqB;IAKzC,4CAA4C,CAC9D,gBAAgB,EAAE,gDAAgD,EAClE,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAkBN,OAAO,CACzB,gBAAgB,EAAE,gDAAgD,EAClE,aAAa,EAAE,iBAAiB,GACjC,OAAO,CAAC,qCAAqC,GAAG,IAAI,CAAC;IAqBlC,QAAQ,CAAC,gBAAgB,EAAE,gDAAgD,EAAE,aAAa,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAUtJ"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OwnSharedAttributeDeletedByOwnerNotificationItemProcessor = void 0;
|
|
4
|
+
const transport_1 = require("@nmshd/transport");
|
|
5
|
+
const CoreErrors_1 = require("../../../../consumption/CoreErrors");
|
|
6
|
+
const attributes_1 = require("../../../attributes");
|
|
7
|
+
const common_1 = require("../../../common");
|
|
8
|
+
const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
|
|
9
|
+
class OwnSharedAttributeDeletedByOwnerNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
|
|
10
|
+
constructor(consumptionController) {
|
|
11
|
+
super(consumptionController);
|
|
12
|
+
this._logger = transport_1.TransportLoggerFactory.getLogger(OwnSharedAttributeDeletedByOwnerNotificationItemProcessor);
|
|
13
|
+
}
|
|
14
|
+
async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
|
|
15
|
+
const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
|
|
16
|
+
if (typeof attribute === "undefined") {
|
|
17
|
+
return common_1.ValidationResult.success();
|
|
18
|
+
}
|
|
19
|
+
if (!attribute.isPeerSharedAttribute()) {
|
|
20
|
+
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.isNotPeerSharedAttribute(notificationItem.attributeId));
|
|
21
|
+
}
|
|
22
|
+
if (!notification.peer.equals(attribute.shareInfo.peer)) {
|
|
23
|
+
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.senderIsNotPeerOfSharedAttribute(notification.peer, notificationItem.attributeId));
|
|
24
|
+
}
|
|
25
|
+
return common_1.ValidationResult.success();
|
|
26
|
+
}
|
|
27
|
+
async process(notificationItem, _notification) {
|
|
28
|
+
const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
|
|
29
|
+
if (typeof attribute === "undefined")
|
|
30
|
+
return;
|
|
31
|
+
const deletionInfo = attributes_1.LocalAttributeDeletionInfo.from({
|
|
32
|
+
deletionStatus: attributes_1.DeletionStatus.DeletedByOwner,
|
|
33
|
+
deletionDate: transport_1.CoreDate.utc()
|
|
34
|
+
});
|
|
35
|
+
const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
|
|
36
|
+
for (const attr of [attribute, ...predecessors]) {
|
|
37
|
+
if (typeof attr.deletionInfo === "undefined") {
|
|
38
|
+
attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
|
|
39
|
+
await this.consumptionController.attributes.updateAttributeUnsafe(attr);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return new attributes_1.OwnSharedAttributeDeletedByOwnerEvent(this.currentIdentityAddress.toString(), attribute);
|
|
43
|
+
}
|
|
44
|
+
async rollback(notificationItem, _notification) {
|
|
45
|
+
const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
|
|
46
|
+
if (typeof attribute === "undefined")
|
|
47
|
+
return;
|
|
48
|
+
const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
|
|
49
|
+
for (const attr of [attribute, ...predecessors]) {
|
|
50
|
+
attr.deletionInfo = undefined;
|
|
51
|
+
await this.consumptionController.attributes.updateAttributeUnsafe(attr);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.OwnSharedAttributeDeletedByOwnerNotificationItemProcessor = OwnSharedAttributeDeletedByOwnerNotificationItemProcessor;
|
|
56
|
+
//# sourceMappingURL=OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.ts"],"names":[],"mappings":";;;AAEA,gDAAoE;AAEpE,mEAAgE;AAChE,oDAAwH;AACxH,4CAAmD;AAEnD,4FAAyF;AAEzF,MAAa,yDAA0D,SAAQ,qEAAmF;IAG9J,YAAmB,qBAA4C;QAC3D,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,kCAAsB,CAAC,SAAS,CAAC,yDAAyD,CAAC,CAAC;IAC/G,CAAC;IAEe,KAAK,CAAC,4CAA4C,CAC9D,gBAAkE,EAClE,YAA+B;QAE/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAE9G,IAAI,OAAO,SAAS,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,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAC5E,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;YAC5E,CAAC;QACL,CAAC;QAED,OAAO,IAAI,kDAAqC,CAAC,IAAI,CAAC,sBAAsB,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,CAAC;IACxG,CAAC;IAEe,KAAK,CAAC,QAAQ,CAAC,gBAAkE,EAAE,aAAgC;QAC/H,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC9G,IAAI,OAAO,SAAS,KAAK,WAAW;YAAE,OAAO;QAE7C,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAC1G,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,GAAG,YAAY,CAAC,EAAE,CAAC;YAC9C,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC;IACL,CAAC;CACJ;AA/DD,8HA+DC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PeerSharedAttributeDeletedByPeerNotificationItem } from "@nmshd/content";
|
|
2
|
+
import { ConsumptionController } from "../../../../consumption/ConsumptionController";
|
|
3
|
+
import { PeerSharedAttributeDeletedByPeerEvent } from "../../../attributes";
|
|
4
|
+
import { ValidationResult } from "../../../common";
|
|
5
|
+
import { LocalNotification } from "../../local/LocalNotification";
|
|
6
|
+
import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
|
|
7
|
+
export declare class PeerSharedAttributeDeletedByPeerNotificationItemProcessor extends AbstractNotificationItemProcessor<PeerSharedAttributeDeletedByPeerNotificationItem> {
|
|
8
|
+
private readonly _logger;
|
|
9
|
+
constructor(consumptionController: ConsumptionController);
|
|
10
|
+
checkPrerequisitesOfIncomingNotificationItem(notificationItem: PeerSharedAttributeDeletedByPeerNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
|
|
11
|
+
process(notificationItem: PeerSharedAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<PeerSharedAttributeDeletedByPeerEvent | void>;
|
|
12
|
+
rollback(notificationItem: PeerSharedAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gDAAgD,EAAE,MAAM,gBAAgB,CAAC;AAElF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,qCAAqC,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAEzF,qBAAa,yDAA0D,SAAQ,iCAAiC,CAAC,gDAAgD,CAAC;IAC9J,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,qBAAqB,EAAE,qBAAqB;IAKzC,4CAA4C,CAC9D,gBAAgB,EAAE,gDAAgD,EAClE,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAkBN,OAAO,CACzB,gBAAgB,EAAE,gDAAgD,EAClE,aAAa,EAAE,iBAAiB,GACjC,OAAO,CAAC,qCAAqC,GAAG,IAAI,CAAC;IAoBlC,QAAQ,CAAC,gBAAgB,EAAE,gDAAgD,EAAE,aAAa,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAYtJ"}
|