@nmshd/consumption 2.0.0-alpha.1 → 2.0.0-alpha.12
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/ConsumptionBaseController.d.ts +3 -4
- package/dist/consumption/ConsumptionBaseController.js +3 -23
- package/dist/consumption/ConsumptionBaseController.js.map +1 -1
- package/dist/consumption/ConsumptionController.d.ts +5 -6
- package/dist/consumption/ConsumptionController.js +4 -12
- package/dist/consumption/ConsumptionController.js.map +1 -1
- package/dist/consumption/ConsumptionIds.d.ts +2 -5
- package/dist/consumption/ConsumptionIds.js +4 -7
- package/dist/consumption/ConsumptionIds.js.map +1 -1
- package/dist/modules/attributes/ConsumptionAttributesController.d.ts +1 -1
- package/dist/modules/attributes/local/ConsumptionAttribute.d.ts +1 -1
- package/dist/modules/attributes/local/ConsumptionAttribute.js +5 -6
- package/dist/modules/attributes/local/ConsumptionAttribute.js.map +1 -1
- package/dist/modules/drafts/DraftsController.d.ts +3 -3
- package/dist/modules/drafts/DraftsController.js +2 -2
- package/dist/modules/drafts/DraftsController.js.map +1 -1
- package/dist/modules/drafts/local/Draft.d.ts +4 -4
- package/dist/modules/drafts/local/Draft.js +5 -6
- package/dist/modules/drafts/local/Draft.js.map +1 -1
- package/dist/modules/index.d.ts +2 -8
- package/dist/modules/index.js +2 -8
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/requests/incoming/DecideRequestParametersValidator.d.ts +6 -2
- package/dist/modules/requests/incoming/DecideRequestParametersValidator.js +55 -1
- package/dist/modules/requests/incoming/DecideRequestParametersValidator.js.map +1 -1
- package/dist/modules/requests/incoming/IncomingRequestsController.d.ts +11 -12
- package/dist/modules/requests/incoming/IncomingRequestsController.js +54 -55
- package/dist/modules/requests/incoming/IncomingRequestsController.js.map +1 -1
- package/dist/modules/requests/incoming/checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters.d.ts +4 -4
- package/dist/modules/requests/incoming/checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters.js +4 -5
- package/dist/modules/requests/incoming/checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters.js.map +1 -1
- package/dist/modules/requests/incoming/complete/CompleteIncomingRequestParameters.d.ts +4 -4
- package/dist/modules/requests/incoming/complete/CompleteIncomingRequestParameters.js +3 -3
- package/dist/modules/requests/incoming/complete/CompleteIncomingRequestParameters.js.map +1 -1
- package/dist/modules/requests/incoming/decide/AcceptRequestItemParameters.d.ts +2 -6
- package/dist/modules/requests/incoming/decide/AcceptRequestItemParameters.js +0 -19
- package/dist/modules/requests/incoming/decide/AcceptRequestItemParameters.js.map +1 -1
- package/dist/modules/requests/incoming/decide/DecideRequestItemGroupParameters.d.ts +4 -8
- package/dist/modules/requests/incoming/decide/DecideRequestItemGroupParameters.js +5 -26
- package/dist/modules/requests/incoming/decide/DecideRequestItemGroupParameters.js.map +1 -1
- package/dist/modules/requests/incoming/decide/DecideRequestItemParameters.d.ts +4 -5
- package/dist/modules/requests/incoming/decide/DecideRequestItemParameters.js +4 -4
- package/dist/modules/requests/incoming/decide/DecideRequestItemParameters.js.map +1 -1
- package/dist/modules/requests/incoming/decide/DecideRequestParameters.d.ts +5 -11
- package/dist/modules/requests/incoming/decide/DecideRequestParameters.js +0 -27
- package/dist/modules/requests/incoming/decide/DecideRequestParameters.js.map +1 -1
- package/dist/modules/requests/incoming/decide/InternalDecideRequestParameters.d.ts +15 -0
- package/dist/modules/{relationships/local/RelationshipAttribute.js → requests/incoming/decide/InternalDecideRequestParameters.js} +18 -20
- package/dist/modules/requests/incoming/decide/InternalDecideRequestParameters.js.map +1 -0
- package/dist/modules/requests/incoming/decide/RejectRequestItemParameters.d.ts +2 -8
- package/dist/modules/requests/incoming/decide/RejectRequestItemParameters.js +0 -32
- package/dist/modules/requests/incoming/decide/RejectRequestItemParameters.js.map +1 -1
- package/dist/modules/requests/incoming/received/ReceivedIncomingRequestParameters.d.ts +4 -4
- package/dist/modules/requests/incoming/received/ReceivedIncomingRequestParameters.js +4 -5
- package/dist/modules/requests/incoming/received/ReceivedIncomingRequestParameters.js.map +1 -1
- package/dist/modules/requests/incoming/requireManualDecision/RequireManualDecisionOfIncomingRequestParameters.d.ts +4 -4
- package/dist/modules/requests/incoming/requireManualDecision/RequireManualDecisionOfIncomingRequestParameters.js +3 -3
- package/dist/modules/requests/incoming/requireManualDecision/RequireManualDecisionOfIncomingRequestParameters.js.map +1 -1
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.d.ts +5 -5
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.js +4 -4
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.js.map +1 -1
- package/dist/modules/requests/itemProcessors/IRequestItemProcessor.d.ts +5 -5
- package/dist/modules/requests/itemProcessors/ProcessorConstructor.d.ts +2 -0
- package/dist/modules/requests/itemProcessors/ProcessorConstructor.js +3 -0
- package/dist/modules/requests/itemProcessors/ProcessorConstructor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/RequestItemConstructor.d.ts +2 -0
- package/dist/modules/requests/itemProcessors/RequestItemConstructor.js +3 -0
- package/dist/modules/requests/itemProcessors/RequestItemConstructor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/RequestItemProcessorRegistry.d.ts +6 -3
- package/dist/modules/requests/itemProcessors/RequestItemProcessorRegistry.js +4 -1
- package/dist/modules/requests/itemProcessors/RequestItemProcessorRegistry.js.map +1 -1
- package/dist/modules/requests/local/ConsumptionRequest.d.ts +5 -5
- package/dist/modules/requests/local/ConsumptionRequest.js +7 -8
- package/dist/modules/requests/local/ConsumptionRequest.js.map +1 -1
- package/dist/modules/requests/local/ConsumptionRequestStatusLogEntry.js +3 -4
- package/dist/modules/requests/local/ConsumptionRequestStatusLogEntry.js.map +1 -1
- package/dist/modules/requests/local/ConsumptionResponse.d.ts +7 -7
- package/dist/modules/requests/local/ConsumptionResponse.js +8 -9
- package/dist/modules/requests/local/ConsumptionResponse.js.map +1 -1
- package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts +6 -6
- package/dist/modules/requests/outgoing/OutgoingRequestsController.js +33 -20
- package/dist/modules/requests/outgoing/OutgoingRequestsController.js.map +1 -1
- package/dist/modules/requests/outgoing/completeOutgoingRequest/CompleteOutgoingRequestParameters.d.ts +4 -4
- package/dist/modules/requests/outgoing/completeOutgoingRequest/CompleteOutgoingRequestParameters.js +4 -5
- package/dist/modules/requests/outgoing/completeOutgoingRequest/CompleteOutgoingRequestParameters.js.map +1 -1
- package/dist/modules/requests/outgoing/createFromRelationshipCreationChange/CreateOutgoingRequestFromRelationshipCreationChangeParameters.d.ts +4 -4
- package/dist/modules/requests/outgoing/createFromRelationshipCreationChange/CreateOutgoingRequestFromRelationshipCreationChangeParameters.js +4 -5
- package/dist/modules/requests/outgoing/createFromRelationshipCreationChange/CreateOutgoingRequestFromRelationshipCreationChangeParameters.js.map +1 -1
- package/dist/modules/requests/outgoing/createOutgoingRequest/CreateOutgoingRequestParameters.d.ts +4 -4
- package/dist/modules/requests/outgoing/createOutgoingRequest/CreateOutgoingRequestParameters.js +4 -5
- package/dist/modules/requests/outgoing/createOutgoingRequest/CreateOutgoingRequestParameters.js.map +1 -1
- package/dist/modules/requests/outgoing/sentOutgoingRequest/SentOutgoingRequestParameters.d.ts +4 -4
- package/dist/modules/requests/outgoing/sentOutgoingRequest/SentOutgoingRequestParameters.js +4 -5
- package/dist/modules/requests/outgoing/sentOutgoingRequest/SentOutgoingRequestParameters.js.map +1 -1
- package/dist/modules/settings/SettingsController.d.ts +1 -1
- package/dist/modules/settings/SettingsController.js +2 -2
- package/dist/modules/settings/SettingsController.js.map +1 -1
- package/dist/modules/settings/local/CreateSettingParameter.d.ts +2 -2
- package/dist/modules/settings/local/Setting.d.ts +4 -4
- package/dist/modules/settings/local/Setting.js +5 -6
- package/dist/modules/settings/local/Setting.js.map +1 -1
- package/dist/modules/signatures/Signature.d.ts +5 -5
- package/dist/modules/signatures/Signature.js +9 -8
- package/dist/modules/signatures/Signature.js.map +1 -1
- package/dist/modules/signatures/SignatureContent.d.ts +0 -1
- package/dist/modules/signatures/SignatureContent.js +3 -7
- package/dist/modules/signatures/SignatureContent.js.map +1 -1
- package/lib-web/nmshd.consumption.js +313 -1057
- 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 +15 -15
- package/dist/modules/relationships/RelationshipInfoController.d.ts +0 -15
- package/dist/modules/relationships/RelationshipInfoController.js +0 -61
- package/dist/modules/relationships/RelationshipInfoController.js.map +0 -1
- package/dist/modules/relationships/RelationshipInfoUtil.d.ts +0 -15
- package/dist/modules/relationships/RelationshipInfoUtil.js +0 -219
- package/dist/modules/relationships/RelationshipInfoUtil.js.map +0 -1
- package/dist/modules/relationships/local/RelationshipAttribute.d.ts +0 -14
- package/dist/modules/relationships/local/RelationshipAttribute.js.map +0 -1
- package/dist/modules/relationships/local/RelationshipInfo.d.ts +0 -27
- package/dist/modules/relationships/local/RelationshipInfo.js +0 -97
- package/dist/modules/relationships/local/RelationshipInfo.js.map +0 -1
- package/dist/modules/relationships/local/RelationshipTheme.d.ts +0 -14
- package/dist/modules/relationships/local/RelationshipTheme.js +0 -44
- package/dist/modules/relationships/local/RelationshipTheme.js.map +0 -1
- package/dist/modules/requests/incoming/decide/AcceptRequestParameters.d.ts +0 -6
- package/dist/modules/requests/incoming/decide/AcceptRequestParameters.js +0 -22
- package/dist/modules/requests/incoming/decide/AcceptRequestParameters.js.map +0 -1
- package/dist/modules/requests/incoming/decide/RejectRequestParameters.d.ts +0 -6
- package/dist/modules/requests/incoming/decide/RejectRequestParameters.js +0 -22
- package/dist/modules/requests/incoming/decide/RejectRequestParameters.js.map +0 -1
- package/dist/modules/sharedItems/SharedItemsController.d.ts +0 -14
- package/dist/modules/sharedItems/SharedItemsController.js +0 -40
- package/dist/modules/sharedItems/SharedItemsController.js.map +0 -1
- package/dist/modules/sharedItems/local/SharedItem.d.ts +0 -31
- package/dist/modules/sharedItems/local/SharedItem.js +0 -101
- package/dist/modules/sharedItems/local/SharedItem.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nmshd/consumption",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.12",
|
|
4
4
|
"description": "The consumption library extends the transport library.",
|
|
5
5
|
"homepage": "https://enmeshed.eu",
|
|
6
6
|
"repository": "github:nmshd/cns-consumption",
|
|
@@ -46,34 +46,34 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@js-soft/docdb-access-loki": "1.0.2",
|
|
49
|
-
"@js-soft/docdb-access-mongo": "1.0.
|
|
49
|
+
"@js-soft/docdb-access-mongo": "1.0.5",
|
|
50
50
|
"@js-soft/eslint-config-ts": "1.5.2",
|
|
51
51
|
"@js-soft/license-check": "1.0.4",
|
|
52
52
|
"@js-soft/node-logger": "1.0.1",
|
|
53
|
-
"@js-soft/ts-serval": "
|
|
54
|
-
"@js-soft/ts-utils": "1.1.
|
|
53
|
+
"@js-soft/ts-serval": "2.0.3",
|
|
54
|
+
"@js-soft/ts-utils": "1.1.2",
|
|
55
55
|
"@js-soft/web-logger": "1.0.1",
|
|
56
|
-
"@nmshd/content": "2.0.0-alpha.
|
|
57
|
-
"@nmshd/crypto": "
|
|
58
|
-
"@nmshd/transport": "
|
|
56
|
+
"@nmshd/content": "2.0.0-alpha.14",
|
|
57
|
+
"@nmshd/crypto": "2.0.1",
|
|
58
|
+
"@nmshd/transport": "2.0.0-alpha.1",
|
|
59
59
|
"@types/chai": "^4.3.1",
|
|
60
60
|
"@types/glob": "^7.2.0",
|
|
61
|
-
"@types/luxon": "^2.3.
|
|
62
|
-
"@types/mocha": "^9.1.
|
|
63
|
-
"@types/node": "^17.0.
|
|
61
|
+
"@types/luxon": "^2.3.2",
|
|
62
|
+
"@types/mocha": "^9.1.1",
|
|
63
|
+
"@types/node": "^17.0.33",
|
|
64
64
|
"bt-runner": "^2.0.5",
|
|
65
65
|
"chai": "^4.3.6",
|
|
66
66
|
"copy-webpack-plugin": "^10.2.4",
|
|
67
|
-
"eslint": "^8.
|
|
67
|
+
"eslint": "^8.15.0",
|
|
68
68
|
"madge": "^5.0.1",
|
|
69
|
-
"mocha": "^
|
|
69
|
+
"mocha": "^10.0.0",
|
|
70
70
|
"mocha-param": "^2.0.1",
|
|
71
71
|
"prettier": "^2.6.2",
|
|
72
72
|
"terser-webpack-plugin": "5.3.1",
|
|
73
73
|
"ts-node": "^10.7.0",
|
|
74
|
-
"tsconfig-paths": "^
|
|
75
|
-
"typescript": "^4.6.
|
|
76
|
-
"webpack": "^5.72.
|
|
74
|
+
"tsconfig-paths": "^4.0.0",
|
|
75
|
+
"typescript": "^4.6.4",
|
|
76
|
+
"webpack": "^5.72.1",
|
|
77
77
|
"webpack-cli": "^4.9.2"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": {
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CoreId } from "@nmshd/transport";
|
|
2
|
-
import { ConsumptionBaseController } from "../../consumption";
|
|
3
|
-
import { ConsumptionController } from "../../consumption/ConsumptionController";
|
|
4
|
-
import { RelationshipInfo } from "./local/RelationshipInfo";
|
|
5
|
-
export declare class RelationshipInfoController extends ConsumptionBaseController {
|
|
6
|
-
private relationshipInfo;
|
|
7
|
-
constructor(parent: ConsumptionController);
|
|
8
|
-
init(): Promise<RelationshipInfoController>;
|
|
9
|
-
getRelationshipInfo(id: CoreId): Promise<RelationshipInfo | undefined>;
|
|
10
|
-
getRelationshipInfoByRelationship(relationshipId: CoreId): Promise<RelationshipInfo | undefined>;
|
|
11
|
-
getRelationshipInfos(query?: any): Promise<RelationshipInfo[]>;
|
|
12
|
-
createRelationshipInfo(relationshipInfo: RelationshipInfo): Promise<RelationshipInfo>;
|
|
13
|
-
updateRelationshipInfo(relationshipInfo: RelationshipInfo): Promise<void>;
|
|
14
|
-
deleteRelationshipInfo(relationshipInfo: RelationshipInfo): Promise<void>;
|
|
15
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RelationshipInfoController = void 0;
|
|
4
|
-
const consumption_1 = require("../../consumption");
|
|
5
|
-
const RelationshipInfo_1 = require("./local/RelationshipInfo");
|
|
6
|
-
const RelationshipInfoUtil_1 = require("./RelationshipInfoUtil");
|
|
7
|
-
class RelationshipInfoController extends consumption_1.ConsumptionBaseController {
|
|
8
|
-
constructor(parent) {
|
|
9
|
-
super(consumption_1.ConsumptionControllerName.RelationshipInfoController, parent);
|
|
10
|
-
}
|
|
11
|
-
async init() {
|
|
12
|
-
await super.init();
|
|
13
|
-
this.relationshipInfo = await this.parent.accountController.getSynchronizedCollection("RelationshipInfo");
|
|
14
|
-
return this;
|
|
15
|
-
}
|
|
16
|
-
async getRelationshipInfo(id) {
|
|
17
|
-
const result = await this.relationshipInfo.read(id.toString());
|
|
18
|
-
return result ? await RelationshipInfo_1.RelationshipInfo.from(result) : undefined;
|
|
19
|
-
}
|
|
20
|
-
async getRelationshipInfoByRelationship(relationshipId) {
|
|
21
|
-
const info = await new RelationshipInfoUtil_1.RelationshipInfoUtil(this.parent).createInitialRelationshipInfo(relationshipId);
|
|
22
|
-
return info;
|
|
23
|
-
/*
|
|
24
|
-
// So far, do not store the relationshipInfo, as they wouldn't be updated correctly
|
|
25
|
-
|
|
26
|
-
const result = await this.relationshipInfo.findOne({ relationshipId: relationshipId.toString() })
|
|
27
|
-
|
|
28
|
-
if (result) {
|
|
29
|
-
return await RelationshipInfo.from(result)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const info = await new RelationshipInfoUtil(this.parent).createInitialRelationshipInfo(relationshipId)
|
|
33
|
-
await this.relationshipInfo.create(info)
|
|
34
|
-
return info
|
|
35
|
-
*/
|
|
36
|
-
}
|
|
37
|
-
async getRelationshipInfos(query) {
|
|
38
|
-
const items = await this.relationshipInfo.find(query);
|
|
39
|
-
return await this.parseArray(items, RelationshipInfo_1.RelationshipInfo);
|
|
40
|
-
}
|
|
41
|
-
async createRelationshipInfo(relationshipInfo) {
|
|
42
|
-
const exists = await this.relationshipInfo.exists({ relationshipId: relationshipInfo.relationshipId });
|
|
43
|
-
if (exists) {
|
|
44
|
-
throw consumption_1.ConsumptionErrors.relationshipInfo.relationshipInfoExists(relationshipInfo.relationshipId.toString());
|
|
45
|
-
}
|
|
46
|
-
await this.relationshipInfo.create(relationshipInfo);
|
|
47
|
-
return relationshipInfo;
|
|
48
|
-
}
|
|
49
|
-
async updateRelationshipInfo(relationshipInfo) {
|
|
50
|
-
const oldRelationshipInfo = await this.relationshipInfo.read(relationshipInfo.id.toString());
|
|
51
|
-
if (!oldRelationshipInfo) {
|
|
52
|
-
throw new Error("RelationshipInfo Not Found");
|
|
53
|
-
}
|
|
54
|
-
await this.relationshipInfo.update(oldRelationshipInfo, relationshipInfo);
|
|
55
|
-
}
|
|
56
|
-
async deleteRelationshipInfo(relationshipInfo) {
|
|
57
|
-
await this.relationshipInfo.delete(relationshipInfo);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.RelationshipInfoController = RelationshipInfoController;
|
|
61
|
-
//# sourceMappingURL=RelationshipInfoController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipInfoController.js","sourceRoot":"","sources":["../../../src/modules/relationships/RelationshipInfoController.ts"],"names":[],"mappings":";;;AACA,mDAA2G;AAE3G,+DAA2D;AAC3D,iEAA6D;AAE7D,MAAa,0BAA2B,SAAQ,uCAAyB;IAGrE,YAAmB,MAA6B;QAC5C,KAAK,CAAC,uCAAyB,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAA;IACvE,CAAC;IAEe,KAAK,CAAC,IAAI;QACtB,MAAM,KAAK,CAAC,IAAI,EA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AO,gBAAgB,CAAA;IAC3B,CAAC;IAEM,KAAK,CAAC,sBAAsB,CAAC,gBAAkC;QAClE,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC5F,IAAI,CAAC,mBAAmB,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;SAChD;QACD,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAA;IAC7E,CAAC;IAEM,KAAK,CAAC,sBAAsB,CAAC,gBAAkC;QAClE,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAA;IACxD,CAAC;CACJ;AA/DD,gEA+DC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ILogger } from "@js-soft/logging-abstractions";
|
|
2
|
-
import { CoreId } from "@nmshd/transport";
|
|
3
|
-
import { ConsumptionController } from "../../consumption/ConsumptionController";
|
|
4
|
-
import { RelationshipInfo } from "./local/RelationshipInfo";
|
|
5
|
-
export declare class RelationshipInfoUtil {
|
|
6
|
-
private readonly parent;
|
|
7
|
-
protected _log: ILogger;
|
|
8
|
-
get log(): ILogger;
|
|
9
|
-
constructor(parent: ConsumptionController);
|
|
10
|
-
createInitialRelationshipInfo(id: CoreId): Promise<RelationshipInfo>;
|
|
11
|
-
private getTitle;
|
|
12
|
-
private createRelationshipInfo;
|
|
13
|
-
private parseTemplateBody;
|
|
14
|
-
private parseCreationRequest;
|
|
15
|
-
}
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RelationshipInfoUtil = void 0;
|
|
4
|
-
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
5
|
-
const content_1 = require("@nmshd/content");
|
|
6
|
-
const transport_1 = require("@nmshd/transport");
|
|
7
|
-
const consumption_1 = require("../../consumption");
|
|
8
|
-
const SharedItem_1 = require("../sharedItems/local/SharedItem");
|
|
9
|
-
const RelationshipAttribute_1 = require("./local/RelationshipAttribute");
|
|
10
|
-
const RelationshipInfo_1 = require("./local/RelationshipInfo");
|
|
11
|
-
class RelationshipInfoUtil {
|
|
12
|
-
constructor(parent) {
|
|
13
|
-
this.parent = parent;
|
|
14
|
-
this._log = transport_1.TransportLoggerFactory.getLogger(RelationshipInfoUtil);
|
|
15
|
-
}
|
|
16
|
-
get log() {
|
|
17
|
-
return this._log;
|
|
18
|
-
}
|
|
19
|
-
async createInitialRelationshipInfo(id) {
|
|
20
|
-
const relationship = await this.parent.accountController.relationships.getRelationship(id);
|
|
21
|
-
if (!relationship) {
|
|
22
|
-
throw transport_1.TransportErrors.general.recordNotFound(transport_1.Relationship, id.toString()).logWith(this._log);
|
|
23
|
-
}
|
|
24
|
-
await this.parseTemplateBody(relationship);
|
|
25
|
-
await this.parseCreationRequest(relationship);
|
|
26
|
-
return await this.createRelationshipInfo(relationship);
|
|
27
|
-
}
|
|
28
|
-
getTitle(relationship, attributeMap) {
|
|
29
|
-
let title = relationship.peer.address.toString().substring(3, 9);
|
|
30
|
-
const thingName = attributeMap.get("Thing.name")?.content.value;
|
|
31
|
-
const givenName = attributeMap.get("Person.givenName")?.content.value;
|
|
32
|
-
const familyName = attributeMap.get("Person.familyName")?.content.value;
|
|
33
|
-
const gender = attributeMap.get("Person.gender")?.content.value;
|
|
34
|
-
const orgname = attributeMap.get("Organization.name")?.content.value;
|
|
35
|
-
const legalName = attributeMap.get("Organization.legalname")?.content.value;
|
|
36
|
-
if (thingName) {
|
|
37
|
-
title = thingName;
|
|
38
|
-
}
|
|
39
|
-
else if (givenName && familyName) {
|
|
40
|
-
title = `${givenName} ${familyName}`;
|
|
41
|
-
}
|
|
42
|
-
else if (givenName) {
|
|
43
|
-
title = givenName;
|
|
44
|
-
}
|
|
45
|
-
else if (familyName && gender) {
|
|
46
|
-
title = `i18n://salutation.gender.${gender} ${familyName}`;
|
|
47
|
-
}
|
|
48
|
-
else if (orgname) {
|
|
49
|
-
title = orgname;
|
|
50
|
-
}
|
|
51
|
-
else if (legalName) {
|
|
52
|
-
title = legalName;
|
|
53
|
-
}
|
|
54
|
-
return title;
|
|
55
|
-
}
|
|
56
|
-
async createRelationshipInfo(relationship) {
|
|
57
|
-
const peerAddress = relationship.peer.address;
|
|
58
|
-
const truncatedAddress = peerAddress.address.substring(3, 9);
|
|
59
|
-
const info = await RelationshipInfo_1.RelationshipInfo.from({
|
|
60
|
-
attributes: [],
|
|
61
|
-
id: await consumption_1.ConsumptionIds.relationshipInfo.generate(),
|
|
62
|
-
isPinned: false,
|
|
63
|
-
relationshipId: relationship.id,
|
|
64
|
-
title: truncatedAddress
|
|
65
|
-
});
|
|
66
|
-
// info = await this.parent.relationshipInfo.createRelationshipInfo(info)
|
|
67
|
-
const items = await this.parent.sharedItems.getSharedItems({
|
|
68
|
-
sharedBy: relationship.peer.address.toString()
|
|
69
|
-
});
|
|
70
|
-
const attributes = [];
|
|
71
|
-
const attributeMap = new Map();
|
|
72
|
-
for (const item of items) {
|
|
73
|
-
if (item.content instanceof content_1.Attribute) {
|
|
74
|
-
const relAttr = await RelationshipAttribute_1.RelationshipAttribute.from({
|
|
75
|
-
name: item.content.name,
|
|
76
|
-
sharedItem: item.id,
|
|
77
|
-
content: item.content
|
|
78
|
-
});
|
|
79
|
-
attributes.push(relAttr);
|
|
80
|
-
attributeMap.set(relAttr.name, relAttr);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
info.attributes = attributes;
|
|
84
|
-
const title = this.getTitle(relationship, attributeMap);
|
|
85
|
-
info.title = title;
|
|
86
|
-
// await this.parent.relationshipInfo.updateRelationshipInfo(info)
|
|
87
|
-
return info;
|
|
88
|
-
}
|
|
89
|
-
async parseTemplateBody(relationship) {
|
|
90
|
-
const template = relationship.cache.template;
|
|
91
|
-
if (!template.cache) {
|
|
92
|
-
throw transport_1.TransportErrors.general.cacheEmpty(transport_1.RelationshipTemplate, template.id.toString()).logWith(this._log);
|
|
93
|
-
}
|
|
94
|
-
const body = template.cache.content;
|
|
95
|
-
const isTemplator = this.parent.accountController.identity.isMe(template.cache.createdBy);
|
|
96
|
-
const sharedAt = template.cache.createdAt;
|
|
97
|
-
const sharedBy = isTemplator ? this.parent.accountController.identity.address : relationship.peer.address;
|
|
98
|
-
const sharedWith = isTemplator ? relationship.peer.address : this.parent.accountController.identity.address;
|
|
99
|
-
const sharedItemsWithSameReference = await this.parent.sharedItems.getSharedItems({
|
|
100
|
-
reference: template.id.toString()
|
|
101
|
-
});
|
|
102
|
-
const missingItems = [];
|
|
103
|
-
if (body instanceof content_1.RelationshipTemplateBody) {
|
|
104
|
-
const attributes = body.sharedAttributes;
|
|
105
|
-
if (attributes) {
|
|
106
|
-
if (sharedItemsWithSameReference.length !== attributes.length) {
|
|
107
|
-
attributes.forEach((attribute) => {
|
|
108
|
-
if (!sharedItemsWithSameReference.find(function (item) {
|
|
109
|
-
const content = item.content;
|
|
110
|
-
return content.name === attribute.name;
|
|
111
|
-
})) {
|
|
112
|
-
missingItems.push(attribute);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
// Try to parse the old template format (without types)
|
|
120
|
-
let oldTemplateBody = body;
|
|
121
|
-
if (body instanceof ts_serval_1.JSONWrapper || body instanceof ts_serval_1.JSONWrapperAsync) {
|
|
122
|
-
oldTemplateBody = oldTemplateBody.value;
|
|
123
|
-
}
|
|
124
|
-
if (oldTemplateBody?.attributes && Array.isArray(oldTemplateBody.attributes)) {
|
|
125
|
-
if (sharedItemsWithSameReference.length !== oldTemplateBody.attributes.length) {
|
|
126
|
-
oldTemplateBody.attributes.forEach((attribute) => {
|
|
127
|
-
if (!sharedItemsWithSameReference.find(function (item) {
|
|
128
|
-
const content = item.content;
|
|
129
|
-
return content.name === attribute.name;
|
|
130
|
-
})) {
|
|
131
|
-
missingItems.push(content_1.Attribute.from({
|
|
132
|
-
name: attribute.name,
|
|
133
|
-
value: attribute.value
|
|
134
|
-
}));
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
for (const attribute of missingItems) {
|
|
141
|
-
const sharedItem = await SharedItem_1.SharedItem.from({
|
|
142
|
-
id: await consumption_1.ConsumptionIds.sharedItem.generate(),
|
|
143
|
-
content: attribute,
|
|
144
|
-
sharedAt: sharedAt,
|
|
145
|
-
sharedBy: sharedBy,
|
|
146
|
-
sharedWith: sharedWith,
|
|
147
|
-
reference: template.id,
|
|
148
|
-
expiresAt: attribute.validTo
|
|
149
|
-
});
|
|
150
|
-
await this.parent.sharedItems.createSharedItem(sharedItem);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
async parseCreationRequest(relationship) {
|
|
154
|
-
const change = relationship.cache.creationChange;
|
|
155
|
-
const request = change.request;
|
|
156
|
-
const body = request.content;
|
|
157
|
-
const isRequestor = this.parent.accountController.identity.isMe(request.createdBy);
|
|
158
|
-
const sharedAt = request.createdAt;
|
|
159
|
-
const sharedBy = isRequestor ? this.parent.accountController.identity.address : relationship.peer.address;
|
|
160
|
-
const sharedWith = isRequestor ? relationship.peer.address : this.parent.accountController.identity.address;
|
|
161
|
-
const sharedItemsWithSameReference = await this.parent.sharedItems.getSharedItems({
|
|
162
|
-
reference: change.id.toString()
|
|
163
|
-
});
|
|
164
|
-
const missingItems = [];
|
|
165
|
-
if (body instanceof content_1.RelationshipCreationChangeRequestBody) {
|
|
166
|
-
const attributes = body.sharedAttributes;
|
|
167
|
-
if (attributes && attributes.length > 0) {
|
|
168
|
-
if (sharedItemsWithSameReference.length !== attributes.length) {
|
|
169
|
-
attributes.forEach((attribute) => {
|
|
170
|
-
if (!sharedItemsWithSameReference.find(function (item) {
|
|
171
|
-
const content = item.content;
|
|
172
|
-
return content.name === attribute.name;
|
|
173
|
-
})) {
|
|
174
|
-
missingItems.push(attribute);
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
// Try to parse the old request format (without types)
|
|
182
|
-
let oldRequestBody = body;
|
|
183
|
-
if (body instanceof ts_serval_1.JSONWrapper || body instanceof ts_serval_1.JSONWrapperAsync) {
|
|
184
|
-
oldRequestBody = oldRequestBody.value;
|
|
185
|
-
}
|
|
186
|
-
if (oldRequestBody?.attributes) {
|
|
187
|
-
const keys = Object.keys(oldRequestBody.attributes);
|
|
188
|
-
if (sharedItemsWithSameReference.length !== keys.length) {
|
|
189
|
-
keys.forEach((key) => {
|
|
190
|
-
const attribute = oldRequestBody.attributes[key];
|
|
191
|
-
if (!sharedItemsWithSameReference.find(function (item) {
|
|
192
|
-
const content = item.content;
|
|
193
|
-
return content.name === attribute.name;
|
|
194
|
-
})) {
|
|
195
|
-
missingItems.push(content_1.Attribute.from({
|
|
196
|
-
name: attribute.name,
|
|
197
|
-
value: attribute.value
|
|
198
|
-
}));
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
for (const attribute of missingItems) {
|
|
205
|
-
const sharedItem = await SharedItem_1.SharedItem.from({
|
|
206
|
-
id: await consumption_1.ConsumptionIds.sharedItem.generate(),
|
|
207
|
-
content: attribute,
|
|
208
|
-
sharedAt: sharedAt,
|
|
209
|
-
sharedBy: sharedBy,
|
|
210
|
-
sharedWith: sharedWith,
|
|
211
|
-
reference: change.id,
|
|
212
|
-
expiresAt: attribute.validTo
|
|
213
|
-
});
|
|
214
|
-
await this.parent.sharedItems.createSharedItem(sharedItem);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
exports.RelationshipInfoUtil = RelationshipInfoUtil;
|
|
219
|
-
//# sourceMappingURL=RelationshipInfoUtil.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipInfoUtil.js","sourceRoot":"","sources":["../../../src/modules/relationships/RelationshipInfoUtil.ts"],"names":[],"mappings":";;;AACA,kDAAkE;AAClE,4CAA2G;AAC3G,gDAAsH;AACtH,mDAAkD;AAElD,gEAA4D;AAC5D,yEAAqE;AACrE,+DAA2D;AAE3D,MAAa,oBAAoB;IAM7B,YAAoC,MAA6B;QAA7B,WAAM,GAAN,MAAM,CAAuB;QAC7D,IAAI,CAAC,IAAI,GAAG,kCAAsB,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAA;IACtE,CAAC;IAND,IAAW,GAAG;QACV,OAAO,IAAI,CAAC,IAAI,CAAA;IACpB,CAAC;IAMM,KAAK,CAAC,6BAA6B,CAAC,EAAU;QACjD,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,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAA;QAC1C,MAAM,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAA;QAE7C,OAAO,MAAM,IAAI,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAA;IAC1D,CAAC;IAEO,QAAQ,CAAC,YAA0B,EAAE,YAAgD;QACzF,IAAI,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAEhE,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,OAAO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pB,KAAK,EAAE,SAAS,CAAC,KAAK;6BACzB,CAAC,CACL,CAAA;yBACJ;oBACL,CAAC,CAAC,CAAA;iBACL;aACJ;SACJ;QAED,KAAK,MAAM,SAAS,IAAI,YAAY,EAAE;YAClC,MAAM,UAAU,GAAG,MAAM,uBAAU,CAAC,IAAI,CAAC;gBACrC,EAAE,EAAE,MAAM,4BAAc,CAAC,UAAU,CAAC,QAAQ,EAAE;gBAC9C,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,QAAQ;gBAClB,QAAQ,EAAE,QAAQ;gBAClB,UAAU,EAAE,UAAU;gBACtB,SAAS,EAAE,MAAM,CAAC,EAAE;gBACpB,SAAS,EAAE,SAAS,CAAC,OAAO;aAC/B,CAAC,CAAA;YACF,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAA;SAC7D;IACL,CAAC;CACJ;AAvOD,oDAuOC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ISerializableAsync, SerializableAsync } from "@js-soft/ts-serval";
|
|
2
|
-
import { Attribute, IAttribute } from "@nmshd/content";
|
|
3
|
-
import { CoreId, ICoreId } from "@nmshd/transport";
|
|
4
|
-
export interface IRelationshipAttribute extends ISerializableAsync {
|
|
5
|
-
name: string;
|
|
6
|
-
content: IAttribute;
|
|
7
|
-
sharedItem: ICoreId;
|
|
8
|
-
}
|
|
9
|
-
export declare class RelationshipAttribute extends SerializableAsync implements IRelationshipAttribute {
|
|
10
|
-
name: string;
|
|
11
|
-
content: Attribute;
|
|
12
|
-
sharedItem: CoreId;
|
|
13
|
-
static from(value: IRelationshipAttribute): Promise<RelationshipAttribute>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipAttribute.js","sourceRoot":"","sources":["../../../../src/modules/relationships/local/RelationshipAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAAqG;AACrG,4CAAsD;AACtD,gDAAkD;AASlD,IAAa,qBAAqB,6BAAlC,MAAa,qBAAsB,SAAQ,6BAAiB;IAajD,MAAM,CAAU,KAAK,CAAC,IAAI,CAAC,KAA6B;QAC3D,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,uBAAqB,CAAC,CAAA;IAC1D,CAAC;CACJ,CAAA;AAbG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;mDACO;AAInB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,mBAAS;sDAAA;AAIzB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACO,kBAAM;yDAAA;AAXhB,qBAAqB;IADjC,IAAA,gBAAI,EAAC,uBAAuB,CAAC;GACjB,qBAAqB,CAgBjC;AAhBY,sDAAqB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { CoreId, CoreSynchronizable, ICoreId, ICoreSynchronizable, Relationship } from "@nmshd/transport";
|
|
2
|
-
import { IRelationshipAttribute, RelationshipAttribute } from "./RelationshipAttribute";
|
|
3
|
-
import { IRelationshipTheme, RelationshipTheme } from "./RelationshipTheme";
|
|
4
|
-
export interface IRelationshipInfo extends ICoreSynchronizable {
|
|
5
|
-
relationshipId: ICoreId;
|
|
6
|
-
attributes: IRelationshipAttribute[];
|
|
7
|
-
isPinned: boolean;
|
|
8
|
-
title: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
userTitle?: string;
|
|
11
|
-
userDescription?: string;
|
|
12
|
-
theme?: IRelationshipTheme;
|
|
13
|
-
}
|
|
14
|
-
export declare class RelationshipInfo extends CoreSynchronizable implements IRelationshipInfo {
|
|
15
|
-
readonly technicalProperties: string[];
|
|
16
|
-
readonly userdataProperties: string[];
|
|
17
|
-
relationshipId: CoreId;
|
|
18
|
-
attributes: RelationshipAttribute[];
|
|
19
|
-
isPinned: boolean;
|
|
20
|
-
userTitle?: string;
|
|
21
|
-
title: string;
|
|
22
|
-
userDescription?: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
theme?: RelationshipTheme;
|
|
25
|
-
static fromRelationship(relationship: Relationship): Promise<RelationshipInfo>;
|
|
26
|
-
static from(value: IRelationshipInfo): Promise<RelationshipInfo>;
|
|
27
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
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
|
-
var RelationshipInfo_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.RelationshipInfo = void 0;
|
|
14
|
-
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
-
const transport_1 = require("@nmshd/transport");
|
|
16
|
-
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
17
|
-
const consumption_1 = require("../../../consumption");
|
|
18
|
-
const RelationshipAttribute_1 = require("./RelationshipAttribute");
|
|
19
|
-
const RelationshipTheme_1 = require("./RelationshipTheme");
|
|
20
|
-
let RelationshipInfo = RelationshipInfo_1 = class RelationshipInfo extends transport_1.CoreSynchronizable {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
this.technicalProperties = [
|
|
24
|
-
"@type",
|
|
25
|
-
"@context",
|
|
26
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.relationshipId),
|
|
27
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.title),
|
|
28
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.description),
|
|
29
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.theme)
|
|
30
|
-
];
|
|
31
|
-
this.userdataProperties = [
|
|
32
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.isPinned),
|
|
33
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.userTitle),
|
|
34
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.userDescription)
|
|
35
|
-
];
|
|
36
|
-
}
|
|
37
|
-
static async fromRelationship(relationship) {
|
|
38
|
-
if (typeof relationship.metadata === "undefined") {
|
|
39
|
-
return await RelationshipInfo_1.from({
|
|
40
|
-
id: await consumption_1.ConsumptionIds.relationshipInfo.generate(),
|
|
41
|
-
relationshipId: relationship.id,
|
|
42
|
-
attributes: [],
|
|
43
|
-
isPinned: false,
|
|
44
|
-
title: relationship.peer.address.address.substring(3, 9)
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
return await RelationshipInfo_1.from(relationship.metadata);
|
|
48
|
-
}
|
|
49
|
-
static async from(value) {
|
|
50
|
-
return await super.fromT(value, RelationshipInfo_1);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, ts_serval_1.validate)(),
|
|
55
|
-
(0, ts_serval_1.serialize)(),
|
|
56
|
-
__metadata("design:type", transport_1.CoreId)
|
|
57
|
-
], RelationshipInfo.prototype, "relationshipId", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, ts_serval_1.validate)(),
|
|
60
|
-
(0, ts_serval_1.serialize)({ type: RelationshipAttribute_1.RelationshipAttribute }),
|
|
61
|
-
__metadata("design:type", Array)
|
|
62
|
-
], RelationshipInfo.prototype, "attributes", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, ts_serval_1.validate)(),
|
|
65
|
-
(0, ts_serval_1.serialize)(),
|
|
66
|
-
__metadata("design:type", Boolean)
|
|
67
|
-
], RelationshipInfo.prototype, "isPinned", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
70
|
-
(0, ts_serval_1.serialize)(),
|
|
71
|
-
__metadata("design:type", String)
|
|
72
|
-
], RelationshipInfo.prototype, "userTitle", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, ts_serval_1.validate)(),
|
|
75
|
-
(0, ts_serval_1.serialize)(),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], RelationshipInfo.prototype, "title", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
80
|
-
(0, ts_serval_1.serialize)(),
|
|
81
|
-
__metadata("design:type", String)
|
|
82
|
-
], RelationshipInfo.prototype, "userDescription", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
85
|
-
(0, ts_serval_1.serialize)(),
|
|
86
|
-
__metadata("design:type", String)
|
|
87
|
-
], RelationshipInfo.prototype, "description", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
90
|
-
(0, ts_serval_1.serialize)(),
|
|
91
|
-
__metadata("design:type", RelationshipTheme_1.RelationshipTheme)
|
|
92
|
-
], RelationshipInfo.prototype, "theme", void 0);
|
|
93
|
-
RelationshipInfo = RelationshipInfo_1 = __decorate([
|
|
94
|
-
(0, ts_serval_1.type)("RelationshipInfo")
|
|
95
|
-
], RelationshipInfo);
|
|
96
|
-
exports.RelationshipInfo = RelationshipInfo;
|
|
97
|
-
//# sourceMappingURL=RelationshipInfo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipInfo.js","sourceRoot":"","sources":["../../../../src/modules/relationships/local/RelationshipIn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";
|
|
2
|
-
export interface IRelationshipTheme extends ISerializableAsync {
|
|
3
|
-
image: string;
|
|
4
|
-
imageBar: string;
|
|
5
|
-
backgroundColor: string;
|
|
6
|
-
foregroundColor: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class RelationshipTheme extends SerializableAsync implements IRelationshipTheme {
|
|
9
|
-
image: string;
|
|
10
|
-
imageBar: string;
|
|
11
|
-
backgroundColor: string;
|
|
12
|
-
foregroundColor: string;
|
|
13
|
-
static from(value: IRelationshipTheme): Promise<RelationshipTheme>;
|
|
14
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
-
var RelationshipTheme_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.RelationshipTheme = void 0;
|
|
14
|
-
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
-
let RelationshipTheme = RelationshipTheme_1 = class RelationshipTheme extends ts_serval_1.SerializableAsync {
|
|
16
|
-
static async from(value) {
|
|
17
|
-
return await super.fromT(value, RelationshipTheme_1);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, ts_serval_1.validate)(),
|
|
22
|
-
(0, ts_serval_1.serialize)(),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], RelationshipTheme.prototype, "image", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, ts_serval_1.validate)(),
|
|
27
|
-
(0, ts_serval_1.serialize)(),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], RelationshipTheme.prototype, "imageBar", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, ts_serval_1.validate)(),
|
|
32
|
-
(0, ts_serval_1.serialize)(),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], RelationshipTheme.prototype, "backgroundColor", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, ts_serval_1.validate)(),
|
|
37
|
-
(0, ts_serval_1.serialize)(),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], RelationshipTheme.prototype, "foregroundColor", void 0);
|
|
40
|
-
RelationshipTheme = RelationshipTheme_1 = __decorate([
|
|
41
|
-
(0, ts_serval_1.type)("RelationshipTheme")
|
|
42
|
-
], RelationshipTheme);
|
|
43
|
-
exports.RelationshipTheme = RelationshipTheme;
|
|
44
|
-
//# sourceMappingURL=RelationshipTheme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipTheme.js","sourceRoot":"","sources":["../../../../src/modules/relationships/local/RelationshipTheme.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAAqG;AAUrG,IAAa,iBAAiB,yBAA9B,MAAa,iBAAkB,SAAQ,6BAAiB;IAiB7C,MAAM,CAAU,KAAK,CAAC,IAAI,CAAC,KAAyB;QACvD,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,mBAAiB,CAAC,CAAA;IACtD,CAAC;CACJ,CAAA;AAjBG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;gDACQ;AAIpB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;mDACW;AAIvB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;0DACkB;AAI9B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;0DACkB;AAfrB,iBAAiB;IAD7B,IAAA,gBAAI,EAAC,mBAAmB,CAAC;GACb,iBAAiB,CAoB7B;AApBY,8CAAiB"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DecideRequestParameters, IDecideRequestParameters } from "./DecideRequestParameters";
|
|
2
|
-
export interface IAcceptRequestParameters extends IDecideRequestParameters {
|
|
3
|
-
}
|
|
4
|
-
export declare class AcceptRequestParameters extends DecideRequestParameters implements IAcceptRequestParameters {
|
|
5
|
-
static from(params: IAcceptRequestParameters): Promise<AcceptRequestParameters>;
|
|
6
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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 AcceptRequestParameters_1;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.AcceptRequestParameters = void 0;
|
|
11
|
-
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
12
|
-
const DecideRequestParameters_1 = require("./DecideRequestParameters");
|
|
13
|
-
let AcceptRequestParameters = AcceptRequestParameters_1 = class AcceptRequestParameters extends DecideRequestParameters_1.DecideRequestParameters {
|
|
14
|
-
static async from(params) {
|
|
15
|
-
return await super.fromT(params, AcceptRequestParameters_1);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
AcceptRequestParameters = AcceptRequestParameters_1 = __decorate([
|
|
19
|
-
(0, ts_serval_1.type)("AcceptRequestParameters")
|
|
20
|
-
], AcceptRequestParameters);
|
|
21
|
-
exports.AcceptRequestParameters = AcceptRequestParameters;
|
|
22
|
-
//# sourceMappingURL=AcceptRequestParameters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcceptRequestParameters.js","sourceRoot":"","sources":["../../../../../src/modules/requests/incoming/decide/AcceptRequestParameters.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,kDAAyC;AACzC,uEAA6F;AAK7F,IAAa,uBAAuB,+BAApC,MAAa,uBAAwB,SAAQ,iDAAuB;IACzD,MAAM,CAAU,KAAK,CAAC,IAAI,CAAC,MAAgC;QAC9D,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,yBAAuB,CAAC,CAAA;IAC7D,CAAC;CACJ,CAAA;AAJY,uBAAuB;IADnC,IAAA,gBAAI,EAAC,yBAAyB,CAAC;GACnB,uBAAuB,CAInC;AAJY,0DAAuB"}
|