@nmshd/consumption 1.0.6 → 1.0.10
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/modules/index.d.ts +0 -1
- package/dist/modules/index.js +0 -1
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/relationships/RelationshipInfoController.js +18 -4
- package/dist/modules/relationships/RelationshipInfoController.js.map +1 -1
- package/dist/modules/relationships/RelationshipInfoUtil.d.ts +15 -0
- package/dist/modules/relationships/RelationshipInfoUtil.js +192 -0
- package/dist/modules/relationships/RelationshipInfoUtil.js.map +1 -0
- package/dist/modules/relationships/local/RelationshipInfo.js +1 -1
- package/dist/modules/relationships/local/RelationshipInfo.js.map +1 -1
- package/lib-web/nmshd.consumption.js +135 -132
- package/lib-web/nmshd.consumption.js.map +1 -1
- package/lib-web/nmshd.consumption.min.js +1 -1
- package/lib-web/nmshd.consumption.min.js.map +1 -1
- package/package.json +8 -8
- package/dist/modules/relationships/SingleRelationshipController.d.ts +0 -21
- package/dist/modules/relationships/SingleRelationshipController.js +0 -202
- package/dist/modules/relationships/SingleRelationshipController.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nmshd/consumption",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "The consumption library extends the transport library.",
|
|
5
5
|
"homepage": "https://enmeshed.eu",
|
|
6
6
|
"repository": "github:nmshd/cns-consumption",
|
|
@@ -53,22 +53,22 @@
|
|
|
53
53
|
"@js-soft/ts-serval": "1.0.2",
|
|
54
54
|
"@js-soft/ts-utils": "1.1.1",
|
|
55
55
|
"@js-soft/web-logger": "1.0.0",
|
|
56
|
-
"@nmshd/content": "1.1.
|
|
57
|
-
"@nmshd/crypto": "1.0.
|
|
58
|
-
"@nmshd/transport": "1.1.
|
|
56
|
+
"@nmshd/content": "1.1.2",
|
|
57
|
+
"@nmshd/crypto": "1.0.6",
|
|
58
|
+
"@nmshd/transport": "1.1.1",
|
|
59
59
|
"@types/chai": "^4.3.0",
|
|
60
60
|
"@types/glob": "^7.2.0",
|
|
61
61
|
"@types/luxon": "^2.0.8",
|
|
62
62
|
"@types/mocha": "^9.0.0",
|
|
63
|
-
"@types/node": "^17.0.
|
|
63
|
+
"@types/node": "^17.0.2",
|
|
64
64
|
"bt-runner": "^1.0.21",
|
|
65
65
|
"chai": "^4.3.4",
|
|
66
|
-
"copy-webpack-plugin": "^10.
|
|
67
|
-
"eslint": "^8.
|
|
66
|
+
"copy-webpack-plugin": "^10.2.0",
|
|
67
|
+
"eslint": "^8.5.0",
|
|
68
68
|
"madge": "^5.0.1",
|
|
69
69
|
"mocha": "^9.1.3",
|
|
70
70
|
"prettier": "^2.5.1",
|
|
71
|
-
"terser-webpack-plugin": "5.
|
|
71
|
+
"terser-webpack-plugin": "5.3.0",
|
|
72
72
|
"ts-node": "^10.4.0",
|
|
73
73
|
"tsconfig-paths": "^3.12.0",
|
|
74
74
|
"typescript": "^4.5.4",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CoreId, Relationship } from "@nmshd/transport";
|
|
2
|
-
import { ConsumptionBaseController } from "../../consumption";
|
|
3
|
-
import { ConsumptionController } from "../../consumption/ConsumptionController";
|
|
4
|
-
import { RelationshipAttribute } from "./local/RelationshipAttribute";
|
|
5
|
-
import { RelationshipInfo } from "./local/RelationshipInfo";
|
|
6
|
-
export declare class SingleRelationshipController extends ConsumptionBaseController {
|
|
7
|
-
private _relationship;
|
|
8
|
-
get relationship(): Relationship;
|
|
9
|
-
private _info;
|
|
10
|
-
get info(): RelationshipInfo;
|
|
11
|
-
private _attributeMap;
|
|
12
|
-
get attributeMap(): Map<string, RelationshipAttribute>;
|
|
13
|
-
constructor(parent: ConsumptionController);
|
|
14
|
-
initWithRelationshipId(id: CoreId): Promise<SingleRelationshipController>;
|
|
15
|
-
initWithRelationship(relationship: Relationship): Promise<SingleRelationshipController>;
|
|
16
|
-
private initialFill;
|
|
17
|
-
private getTitle;
|
|
18
|
-
updateRelationshipInfo(): Promise<RelationshipInfo>;
|
|
19
|
-
private parseTemplateBody;
|
|
20
|
-
private parseCreationRequest;
|
|
21
|
-
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SingleRelationshipController = void 0;
|
|
4
|
-
const content_1 = require("@nmshd/content");
|
|
5
|
-
const transport_1 = require("@nmshd/transport");
|
|
6
|
-
const consumption_1 = require("../../consumption");
|
|
7
|
-
const SharedItem_1 = require("../sharedItems/local/SharedItem");
|
|
8
|
-
const RelationshipAttribute_1 = require("./local/RelationshipAttribute");
|
|
9
|
-
const RelationshipInfo_1 = require("./local/RelationshipInfo");
|
|
10
|
-
class SingleRelationshipController extends consumption_1.ConsumptionBaseController {
|
|
11
|
-
constructor(parent) {
|
|
12
|
-
super(consumption_1.ConsumptionControllerName.SingleRelationshipController, parent);
|
|
13
|
-
}
|
|
14
|
-
get relationship() {
|
|
15
|
-
return this._relationship;
|
|
16
|
-
}
|
|
17
|
-
get info() {
|
|
18
|
-
return this._info;
|
|
19
|
-
}
|
|
20
|
-
get attributeMap() {
|
|
21
|
-
return this._attributeMap;
|
|
22
|
-
}
|
|
23
|
-
async initWithRelationshipId(id) {
|
|
24
|
-
const relationship = await this.parent.accountController.relationships.getRelationship(id);
|
|
25
|
-
if (!relationship) {
|
|
26
|
-
throw transport_1.TransportErrors.general.recordNotFound(transport_1.Relationship, id.toString()).logWith(this._log);
|
|
27
|
-
}
|
|
28
|
-
return await this.initWithRelationship(relationship);
|
|
29
|
-
}
|
|
30
|
-
async initWithRelationship(relationship) {
|
|
31
|
-
await super.init();
|
|
32
|
-
this._relationship = relationship;
|
|
33
|
-
const info = await this.parent.relationshipInfo.getRelationshipInfoByRelationship(this.relationship.id);
|
|
34
|
-
if (!info) {
|
|
35
|
-
await this.initialFill();
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
const attributeMap = new Map();
|
|
39
|
-
for (const item of info.attributes) {
|
|
40
|
-
attributeMap.set(item.name, item);
|
|
41
|
-
}
|
|
42
|
-
this._attributeMap = attributeMap;
|
|
43
|
-
this._info = info;
|
|
44
|
-
}
|
|
45
|
-
return this;
|
|
46
|
-
}
|
|
47
|
-
async initialFill() {
|
|
48
|
-
const relationship = await this.parent.accountController.relationships.getRelationship(this._relationship.id);
|
|
49
|
-
if (!relationship) {
|
|
50
|
-
throw transport_1.TransportErrors.general
|
|
51
|
-
.recordNotFound(transport_1.Relationship, this._relationship.id.toString())
|
|
52
|
-
.logWith(this._log);
|
|
53
|
-
}
|
|
54
|
-
this._relationship = relationship;
|
|
55
|
-
const template = await this.parent.accountController.relationshipTemplates.getRelationshipTemplate(relationship.cache.template.id);
|
|
56
|
-
if (!template) {
|
|
57
|
-
throw transport_1.TransportErrors.general
|
|
58
|
-
.recordNotFound(transport_1.RelationshipTemplate, relationship.cache.template.id.toString())
|
|
59
|
-
.logWith(this._log);
|
|
60
|
-
}
|
|
61
|
-
await this.parseTemplateBody(template);
|
|
62
|
-
await this.parseCreationRequest();
|
|
63
|
-
this._info = await this.updateRelationshipInfo();
|
|
64
|
-
return this;
|
|
65
|
-
}
|
|
66
|
-
getTitle() {
|
|
67
|
-
var _a, _b, _c, _d, _e, _f;
|
|
68
|
-
let title = this.relationship.peer.address.toString().substr(3, 6);
|
|
69
|
-
const thingname = (_a = this.attributeMap.get("Thing.name")) === null || _a === void 0 ? void 0 : _a.content.value;
|
|
70
|
-
const firstname = (_b = this.attributeMap.get("Person.firstname")) === null || _b === void 0 ? void 0 : _b.content.value;
|
|
71
|
-
const lastname = (_c = this.attributeMap.get("Person.lastname")) === null || _c === void 0 ? void 0 : _c.content.value;
|
|
72
|
-
const gender = (_d = this.attributeMap.get("Person.gender")) === null || _d === void 0 ? void 0 : _d.content.value;
|
|
73
|
-
const orgname = (_e = this.attributeMap.get("Organization.name")) === null || _e === void 0 ? void 0 : _e.content.value;
|
|
74
|
-
const legalname = (_f = this.attributeMap.get("Organization.legalname")) === null || _f === void 0 ? void 0 : _f.content.value;
|
|
75
|
-
if (thingname) {
|
|
76
|
-
title = thingname;
|
|
77
|
-
}
|
|
78
|
-
else if (firstname && lastname) {
|
|
79
|
-
title = `${firstname} ${lastname}`;
|
|
80
|
-
}
|
|
81
|
-
else if (lastname && gender) {
|
|
82
|
-
title = `~~gender.salutation.${gender}~~ ${lastname}`;
|
|
83
|
-
}
|
|
84
|
-
else if (orgname) {
|
|
85
|
-
title = orgname;
|
|
86
|
-
}
|
|
87
|
-
else if (legalname) {
|
|
88
|
-
title = legalname;
|
|
89
|
-
}
|
|
90
|
-
return title;
|
|
91
|
-
}
|
|
92
|
-
async updateRelationshipInfo() {
|
|
93
|
-
let info = await this.parent.relationshipInfo.getRelationshipInfoByRelationship(this.relationship.id);
|
|
94
|
-
if (!info) {
|
|
95
|
-
const peerAddress = this.relationship.peer.address;
|
|
96
|
-
const truncatedAddress = peerAddress.address.substr(3, 6);
|
|
97
|
-
info = await RelationshipInfo_1.RelationshipInfo.from({
|
|
98
|
-
attributes: [],
|
|
99
|
-
id: await consumption_1.ConsumptionIds.relationshipInfo.generate(),
|
|
100
|
-
isPinned: false,
|
|
101
|
-
relationshipId: this.relationship.id,
|
|
102
|
-
title: truncatedAddress
|
|
103
|
-
});
|
|
104
|
-
info = await this.parent.relationshipInfo.createRelationshipInfo(info);
|
|
105
|
-
}
|
|
106
|
-
const items = await this.parent.sharedItems.getSharedItems({
|
|
107
|
-
sharedBy: this.relationship.peer.address.toString()
|
|
108
|
-
});
|
|
109
|
-
const attributes = [];
|
|
110
|
-
const attributeMap = new Map();
|
|
111
|
-
for (const item of items) {
|
|
112
|
-
if (item.content instanceof content_1.Attribute) {
|
|
113
|
-
const relAttr = await RelationshipAttribute_1.RelationshipAttribute.from({
|
|
114
|
-
name: item.content.name,
|
|
115
|
-
sharedItem: item.id,
|
|
116
|
-
content: item.content
|
|
117
|
-
});
|
|
118
|
-
attributes.push(relAttr);
|
|
119
|
-
attributeMap.set(relAttr.name, relAttr);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
this._attributeMap = attributeMap;
|
|
123
|
-
info.attributes = attributes;
|
|
124
|
-
const title = this.getTitle();
|
|
125
|
-
info.title = title;
|
|
126
|
-
await this.parent.relationshipInfo.updateRelationshipInfo(info);
|
|
127
|
-
return info;
|
|
128
|
-
}
|
|
129
|
-
async parseTemplateBody(template) {
|
|
130
|
-
if (!template.cache) {
|
|
131
|
-
throw transport_1.TransportErrors.general.cacheEmpty(transport_1.RelationshipTemplate, template.id.toString()).logWith(this._log);
|
|
132
|
-
}
|
|
133
|
-
const isTemplator = this.parent.accountController.identity.isMe(template.cache.createdBy);
|
|
134
|
-
if (template.cache.content instanceof content_1.RelationshipTemplateBody) {
|
|
135
|
-
const body = template.cache.content;
|
|
136
|
-
const attributes = body.sharedAttributes;
|
|
137
|
-
if (attributes) {
|
|
138
|
-
const sharedAt = template.cache.createdAt;
|
|
139
|
-
const sharedBy = isTemplator
|
|
140
|
-
? this.parent.accountController.identity.address
|
|
141
|
-
: this.relationship.peer.address;
|
|
142
|
-
const sharedWith = isTemplator
|
|
143
|
-
? this.relationship.peer.address
|
|
144
|
-
: this.parent.accountController.identity.address;
|
|
145
|
-
for (const attribute of attributes) {
|
|
146
|
-
const sharedItem = await SharedItem_1.SharedItem.from({
|
|
147
|
-
id: await consumption_1.ConsumptionIds.sharedItem.generate(),
|
|
148
|
-
content: attribute,
|
|
149
|
-
sharedAt: sharedAt,
|
|
150
|
-
sharedBy: sharedBy,
|
|
151
|
-
sharedWith: sharedWith,
|
|
152
|
-
reference: template.id,
|
|
153
|
-
expiresAt: attribute.validTo
|
|
154
|
-
});
|
|
155
|
-
await this.parent.sharedItems.createSharedItem(sharedItem);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
async parseCreationRequest() {
|
|
161
|
-
const request = this.relationship.cache.creationChange.request;
|
|
162
|
-
if (!request.content) {
|
|
163
|
-
const error = new Error("error.consumption.noRequestContent");
|
|
164
|
-
this._log.error(error);
|
|
165
|
-
throw error;
|
|
166
|
-
}
|
|
167
|
-
let isRequestor = false;
|
|
168
|
-
if (this.parent.accountController.identity.isMe(request.createdBy)) {
|
|
169
|
-
isRequestor = true;
|
|
170
|
-
}
|
|
171
|
-
if (request.content instanceof content_1.RelationshipCreationChangeRequestBody) {
|
|
172
|
-
const body = request.content;
|
|
173
|
-
const attributes = body.sharedAttributes;
|
|
174
|
-
if (attributes) {
|
|
175
|
-
const sharedAt = request.createdAt;
|
|
176
|
-
const sharedBy = isRequestor
|
|
177
|
-
? this.parent.accountController.identity.address
|
|
178
|
-
: this.relationship.peer.address;
|
|
179
|
-
const sharedWith = isRequestor
|
|
180
|
-
? this.relationship.peer.address
|
|
181
|
-
: this.parent.accountController.identity.address;
|
|
182
|
-
for (const attribute of attributes) {
|
|
183
|
-
const sharedItem = await SharedItem_1.SharedItem.from({
|
|
184
|
-
id: await consumption_1.ConsumptionIds.sharedItem.generate(),
|
|
185
|
-
content: attribute,
|
|
186
|
-
sharedAt: sharedAt,
|
|
187
|
-
sharedBy: sharedBy,
|
|
188
|
-
sharedWith: sharedWith,
|
|
189
|
-
reference: this.relationship.id,
|
|
190
|
-
expiresAt: attribute.validTo
|
|
191
|
-
});
|
|
192
|
-
await this.parent.sharedItems.createSharedItem(sharedItem);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
throw new Error("Request.content.content is no RelationshipCreationChangeRequestBody");
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
exports.SingleRelationshipController = SingleRelationshipController;
|
|
202
|
-
//# sourceMappingURL=SingleRelationshipController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SingleRelationshipController.js","sourceRoot":"","sources":["../../../src/modules/relationships/SingleRelationshipController.ts"],"names":[],"mappings":";;;AAAA,4CAA2G;AAC3G,gDAA8F;AAC9F,mDAAwG;AAExG,gEAA4D;AAC5D,yEAAqE;AACrE,+DAA2D;AAE3D,MAAa,4BAA6B,SAAQ,uCAAyB;IAgBvE,YAAmB,MAA6B;QAC5C,KAAK,CAAC,uCAAyB,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAA;IACzE,CAAC;IAhBD,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAA;IAC7B,CAAC;IAGD,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAA;IACrB,CAAC;IAGD,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAA;IAC7B,CAAC;IAMM,KAAK,CAAC,sBAAsB,CAAC,EAAU;QAC1C,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,CAAC,CAAA;QAC1F,IAAI,CAAC,YAAY,EAAE;YACf,MAAM,2BAAe,CAAC,OAAO,CAAC,cAAc,CAAC,wBAAY,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SAC/F;QAED,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAA;IACxD,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,YAA0B;QACxD,MAAM,KAAK,CAAC,IAAI,EAAE,CAAA;QAElB,IAAI,CAAC,aAAa,GAAG,YAAY,CAAA;QAEjC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,iCAAiC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;QACvG,IAAI,CAAC,IAAI,EAAE;YACP,MAAM,IAAI,CAAC,WAAW,EAAE,CA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