@nmshd/runtime 2.0.0-alpha.2 → 2.0.0-alpha.5
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/Runtime.js +0 -6
- package/dist/Runtime.js.map +1 -1
- package/dist/buildInformation.js +5 -5
- package/dist/dataViews/DataViewExpander.js +24 -19
- package/dist/dataViews/DataViewExpander.js.map +1 -1
- package/dist/events/index.d.ts +1 -0
- package/dist/events/index.js +1 -0
- package/dist/events/index.js.map +1 -1
- package/dist/events/transport/PeerRelationshipTemplateLoadedEvent.d.ts +6 -0
- package/dist/events/transport/PeerRelationshipTemplateLoadedEvent.js +12 -0
- package/dist/events/transport/PeerRelationshipTemplateLoadedEvent.js.map +1 -0
- package/dist/extensibility/ConsumptionServices.d.ts +2 -4
- package/dist/extensibility/ConsumptionServices.js +1 -7
- package/dist/extensibility/ConsumptionServices.js.map +1 -1
- package/dist/extensibility/facades/consumption/index.d.ts +0 -2
- package/dist/extensibility/facades/consumption/index.js +0 -2
- package/dist/extensibility/facades/consumption/index.js.map +1 -1
- package/dist/useCases/common/Schemas.d.ts +0 -15
- package/dist/useCases/common/Schemas.js +35 -510
- package/dist/useCases/common/Schemas.js.map +1 -1
- package/dist/useCases/common/index.d.ts +0 -1
- package/dist/useCases/common/index.js +0 -1
- package/dist/useCases/common/index.js.map +1 -1
- package/dist/useCases/consumption/index.d.ts +0 -2
- package/dist/useCases/consumption/index.js +0 -2
- package/dist/useCases/consumption/index.js.map +1 -1
- package/dist/useCases/consumption/requests/CheckPrerequisitesOfIncomingRequest.d.ts +1 -1
- package/dist/useCases/consumption/requests/CompleteIncomingRequest.d.ts +1 -1
- package/dist/useCases/consumption/requests/CompleteOutgoingRequest.d.ts +1 -1
- package/dist/useCases/consumption/requests/GetIncomingRequest.d.ts +1 -1
- package/dist/useCases/consumption/requests/GetOutgoingRequest.d.ts +1 -1
- package/dist/useCases/consumption/requests/RequireManualDecisionOfIncomingRequest.d.ts +1 -1
- package/dist/useCases/consumption/requests/SentOutgoingRequest.d.ts +1 -1
- package/dist/useCases/transport/relationshipTemplates/LoadPeerRelationshipTemplate.d.ts +3 -2
- package/dist/useCases/transport/relationshipTemplates/LoadPeerRelationshipTemplate.js +13 -5
- package/dist/useCases/transport/relationshipTemplates/LoadPeerRelationshipTemplate.js.map +1 -1
- package/lib-web/nmshd.runtime.js +156 -1942
- package/lib-web/nmshd.runtime.js.map +1 -1
- package/lib-web/nmshd.runtime.min.js +3 -3
- package/lib-web/nmshd.runtime.min.js.map +1 -1
- package/package.json +13 -13
- package/dist/extensibility/facades/consumption/RelationshipInfoFacade.d.ts +0 -18
- package/dist/extensibility/facades/consumption/RelationshipInfoFacade.js +0 -61
- package/dist/extensibility/facades/consumption/RelationshipInfoFacade.js.map +0 -1
- package/dist/extensibility/facades/consumption/SharedItemsFacade.d.ts +0 -24
- package/dist/extensibility/facades/consumption/SharedItemsFacade.js +0 -79
- package/dist/extensibility/facades/consumption/SharedItemsFacade.js.map +0 -1
- package/dist/useCases/common/validation/RelationshipAttributeDTOValidator.d.ts +0 -6
- package/dist/useCases/common/validation/RelationshipAttributeDTOValidator.js +0 -16
- package/dist/useCases/common/validation/RelationshipAttributeDTOValidator.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/CreateRelationshipInfo.d.ts +0 -26
- package/dist/useCases/consumption/relationshipInfo/CreateRelationshipInfo.js +0 -75
- package/dist/useCases/consumption/relationshipInfo/CreateRelationshipInfo.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.d.ts +0 -18
- package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.js +0 -54
- package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.d.ts +0 -18
- package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.js +0 -54
- package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfo.d.ts +0 -17
- package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfo.js +0 -50
- package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfo.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfoByRelationship.d.ts +0 -17
- package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfoByRelationship.js +0 -49
- package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfoByRelationship.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/RelationshipAttributeMapper.d.ts +0 -6
- package/dist/useCases/consumption/relationshipInfo/RelationshipAttributeMapper.js +0 -17
- package/dist/useCases/consumption/relationshipInfo/RelationshipAttributeMapper.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.d.ts +0 -6
- package/dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js +0 -25
- package/dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/RelationshipThemeMapper.d.ts +0 -6
- package/dist/useCases/consumption/relationshipInfo/RelationshipThemeMapper.js +0 -18
- package/dist/useCases/consumption/relationshipInfo/RelationshipThemeMapper.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/UpdateRelationshipInfo.d.ts +0 -31
- package/dist/useCases/consumption/relationshipInfo/UpdateRelationshipInfo.js +0 -71
- package/dist/useCases/consumption/relationshipInfo/UpdateRelationshipInfo.js.map +0 -1
- package/dist/useCases/consumption/relationshipInfo/index.d.ts +0 -6
- package/dist/useCases/consumption/relationshipInfo/index.js +0 -23
- package/dist/useCases/consumption/relationshipInfo/index.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/CreateSharedItem.d.ts +0 -26
- package/dist/useCases/consumption/sharedItems/CreateSharedItem.js +0 -71
- package/dist/useCases/consumption/sharedItems/CreateSharedItem.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/DeleteSharedItem.d.ts +0 -17
- package/dist/useCases/consumption/sharedItems/DeleteSharedItem.js +0 -53
- package/dist/useCases/consumption/sharedItems/DeleteSharedItem.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/GetSharedItem.d.ts +0 -16
- package/dist/useCases/consumption/sharedItems/GetSharedItem.js +0 -47
- package/dist/useCases/consumption/sharedItems/GetSharedItem.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/GetSharedItems.d.ts +0 -13
- package/dist/useCases/consumption/sharedItems/GetSharedItems.js +0 -59
- package/dist/useCases/consumption/sharedItems/GetSharedItems.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/GetSharedItemsByAddress.d.ts +0 -16
- package/dist/useCases/consumption/sharedItems/GetSharedItemsByAddress.js +0 -46
- package/dist/useCases/consumption/sharedItems/GetSharedItemsByAddress.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/GetSharedItemsByReference.d.ts +0 -16
- package/dist/useCases/consumption/sharedItems/GetSharedItemsByReference.js +0 -47
- package/dist/useCases/consumption/sharedItems/GetSharedItemsByReference.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedByAddress.d.ts +0 -16
- package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedByAddress.js +0 -46
- package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedByAddress.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedWithAddress.d.ts +0 -16
- package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedWithAddress.js +0 -46
- package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedWithAddress.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/SharedItemsMapper.d.ts +0 -6
- package/dist/useCases/consumption/sharedItems/SharedItemsMapper.js +0 -24
- package/dist/useCases/consumption/sharedItems/SharedItemsMapper.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/UpdateSharedItem.d.ts +0 -19
- package/dist/useCases/consumption/sharedItems/UpdateSharedItem.js +0 -57
- package/dist/useCases/consumption/sharedItems/UpdateSharedItem.js.map +0 -1
- package/dist/useCases/consumption/sharedItems/index.d.ts +0 -10
- package/dist/useCases/consumption/sharedItems/index.js +0 -27
- package/dist/useCases/consumption/sharedItems/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nmshd/runtime",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
4
4
|
"description": "The Enmeshed client runtime.",
|
|
5
5
|
"homepage": "https://enmeshed.eu",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@js-soft/docdb-querytranslator": "1.0.1",
|
|
55
55
|
"@js-soft/logging-abstractions": "1.0.0",
|
|
56
56
|
"@js-soft/ts-serval": "2.0.3",
|
|
57
|
-
"@js-soft/ts-utils": "^1.1.
|
|
58
|
-
"@nmshd/consumption": "2.0.0-alpha.
|
|
59
|
-
"@nmshd/content": "2.0.0-alpha.
|
|
57
|
+
"@js-soft/ts-utils": "^1.1.2",
|
|
58
|
+
"@nmshd/consumption": "2.0.0-alpha.9",
|
|
59
|
+
"@nmshd/content": "2.0.0-alpha.13",
|
|
60
60
|
"@nmshd/crypto": "2.0.1",
|
|
61
61
|
"@nmshd/transport": "2.0.0-alpha.1",
|
|
62
62
|
"ajv": "^8.11.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"ajv-formats": "^2.1.1",
|
|
65
65
|
"fluent-ts-validator": "3.0.3",
|
|
66
66
|
"json-stringify-safe": "^5.0.1",
|
|
67
|
-
"luxon": "^2.
|
|
67
|
+
"luxon": "^2.4.0",
|
|
68
68
|
"qrcode": "1.5.0",
|
|
69
69
|
"reflect-metadata": "0.1.13",
|
|
70
70
|
"ts-simple-nameof": "1.3.1",
|
|
@@ -77,23 +77,23 @@
|
|
|
77
77
|
"@js-soft/eslint-config-ts": "^1.5.2",
|
|
78
78
|
"@js-soft/license-check": "1.0.4",
|
|
79
79
|
"@js-soft/node-logger": "1.0.1",
|
|
80
|
-
"@types/jest": "^27.
|
|
80
|
+
"@types/jest": "^27.5.1",
|
|
81
81
|
"@types/jest-expect-message": "^1.0.3",
|
|
82
82
|
"@types/json-stringify-safe": "^5.0.0",
|
|
83
|
-
"@types/luxon": "^2.3.
|
|
84
|
-
"@types/node": "^17.0.
|
|
83
|
+
"@types/luxon": "^2.3.2",
|
|
84
|
+
"@types/node": "^17.0.33",
|
|
85
85
|
"@types/qrcode": "^1.4.2",
|
|
86
86
|
"@types/qs": "^6.9.7",
|
|
87
|
-
"eslint": "^8.
|
|
88
|
-
"jest": "^
|
|
87
|
+
"eslint": "^8.15.0",
|
|
88
|
+
"jest": "^28.1.0",
|
|
89
89
|
"madge": "^5.0.1",
|
|
90
90
|
"nodemon": "^2.0.16",
|
|
91
91
|
"prettier": "^2.6.2",
|
|
92
|
-
"ts-jest": "^
|
|
92
|
+
"ts-jest": "^28.0.2",
|
|
93
93
|
"ts-json-schema-generator": "^1.0.0",
|
|
94
|
-
"tsconfig-paths": "^
|
|
94
|
+
"tsconfig-paths": "^4.0.0",
|
|
95
95
|
"typescript": "^4.6.4",
|
|
96
|
-
"webpack": "^5.72.
|
|
96
|
+
"webpack": "^5.72.1",
|
|
97
97
|
"webpack-cli": "^4.9.2"
|
|
98
98
|
},
|
|
99
99
|
"publishConfig": {
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ApplicationError, Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { RelationshipInfoDTO } from "../../../types";
|
|
3
|
-
import { CreateRelationshipInfoRequest, CreateRelationshipInfoUseCase, DeleteRelationshipInfoByRelationshipRequest, DeleteRelationshipInfoByRelationshipUseCase, DeleteRelationshipInfoRequest, DeleteRelationshipInfoUseCase, GetRelationshipInfoByRelationshipRequest, GetRelationshipInfoByRelationshipUseCase, GetRelationshipInfoRequest, GetRelationshipInfoUseCase, UpdateRelationshipInfoRequest, UpdateRelationshipInfoUseCase } from "../../../useCases";
|
|
4
|
-
export declare class RelationshipInfoFacade {
|
|
5
|
-
private readonly createRelationshipInfoUseCase;
|
|
6
|
-
private readonly deleteRelationshipInfoUseCase;
|
|
7
|
-
private readonly deleteRelationshipInfoByRelationshipUseCase;
|
|
8
|
-
private readonly getRelationshipInfoUseCase;
|
|
9
|
-
private readonly getRelationshipInfoByRelationshipUseCase;
|
|
10
|
-
private readonly updateRelationshipInfoUseCase;
|
|
11
|
-
constructor(createRelationshipInfoUseCase: CreateRelationshipInfoUseCase, deleteRelationshipInfoUseCase: DeleteRelationshipInfoUseCase, deleteRelationshipInfoByRelationshipUseCase: DeleteRelationshipInfoByRelationshipUseCase, getRelationshipInfoUseCase: GetRelationshipInfoUseCase, getRelationshipInfoByRelationshipUseCase: GetRelationshipInfoByRelationshipUseCase, updateRelationshipInfoUseCase: UpdateRelationshipInfoUseCase);
|
|
12
|
-
createRelationshipInfo(request: CreateRelationshipInfoRequest): Promise<Result<RelationshipInfoDTO, ApplicationError>>;
|
|
13
|
-
deleteRelationshipInfo(request: DeleteRelationshipInfoRequest): Promise<Result<void, ApplicationError>>;
|
|
14
|
-
deleteRelationshipInfoByRelationship(request: DeleteRelationshipInfoByRelationshipRequest): Promise<Result<void, ApplicationError>>;
|
|
15
|
-
getRelationshipInfo(request: GetRelationshipInfoRequest): Promise<Result<RelationshipInfoDTO, ApplicationError>>;
|
|
16
|
-
getRelationshipInfoByRelationship(request: GetRelationshipInfoByRelationshipRequest): Promise<Result<RelationshipInfoDTO, ApplicationError>>;
|
|
17
|
-
updateRelationshipInfo(request: UpdateRelationshipInfoRequest): Promise<Result<RelationshipInfoDTO, ApplicationError>>;
|
|
18
|
-
}
|
|
@@ -1,61 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RelationshipInfoFacade = void 0;
|
|
16
|
-
const typescript_ioc_1 = require("typescript-ioc");
|
|
17
|
-
const useCases_1 = require("../../../useCases");
|
|
18
|
-
let RelationshipInfoFacade = class RelationshipInfoFacade {
|
|
19
|
-
constructor(createRelationshipInfoUseCase, deleteRelationshipInfoUseCase, deleteRelationshipInfoByRelationshipUseCase, getRelationshipInfoUseCase, getRelationshipInfoByRelationshipUseCase, updateRelationshipInfoUseCase) {
|
|
20
|
-
this.createRelationshipInfoUseCase = createRelationshipInfoUseCase;
|
|
21
|
-
this.deleteRelationshipInfoUseCase = deleteRelationshipInfoUseCase;
|
|
22
|
-
this.deleteRelationshipInfoByRelationshipUseCase = deleteRelationshipInfoByRelationshipUseCase;
|
|
23
|
-
this.getRelationshipInfoUseCase = getRelationshipInfoUseCase;
|
|
24
|
-
this.getRelationshipInfoByRelationshipUseCase = getRelationshipInfoByRelationshipUseCase;
|
|
25
|
-
this.updateRelationshipInfoUseCase = updateRelationshipInfoUseCase;
|
|
26
|
-
}
|
|
27
|
-
async createRelationshipInfo(request) {
|
|
28
|
-
return await this.createRelationshipInfoUseCase.execute(request);
|
|
29
|
-
}
|
|
30
|
-
async deleteRelationshipInfo(request) {
|
|
31
|
-
return await this.deleteRelationshipInfoUseCase.execute(request);
|
|
32
|
-
}
|
|
33
|
-
async deleteRelationshipInfoByRelationship(request) {
|
|
34
|
-
return await this.deleteRelationshipInfoByRelationshipUseCase.execute(request);
|
|
35
|
-
}
|
|
36
|
-
async getRelationshipInfo(request) {
|
|
37
|
-
return await this.getRelationshipInfoUseCase.execute(request);
|
|
38
|
-
}
|
|
39
|
-
async getRelationshipInfoByRelationship(request) {
|
|
40
|
-
return await this.getRelationshipInfoByRelationshipUseCase.execute(request);
|
|
41
|
-
}
|
|
42
|
-
async updateRelationshipInfo(request) {
|
|
43
|
-
return await this.updateRelationshipInfoUseCase.execute(request);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
RelationshipInfoFacade = __decorate([
|
|
47
|
-
__param(0, typescript_ioc_1.Inject),
|
|
48
|
-
__param(1, typescript_ioc_1.Inject),
|
|
49
|
-
__param(2, typescript_ioc_1.Inject),
|
|
50
|
-
__param(3, typescript_ioc_1.Inject),
|
|
51
|
-
__param(4, typescript_ioc_1.Inject),
|
|
52
|
-
__param(5, typescript_ioc_1.Inject),
|
|
53
|
-
__metadata("design:paramtypes", [useCases_1.CreateRelationshipInfoUseCase,
|
|
54
|
-
useCases_1.DeleteRelationshipInfoUseCase,
|
|
55
|
-
useCases_1.DeleteRelationshipInfoByRelationshipUseCase,
|
|
56
|
-
useCases_1.GetRelationshipInfoUseCase,
|
|
57
|
-
useCases_1.GetRelationshipInfoByRelationshipUseCase,
|
|
58
|
-
useCases_1.UpdateRelationshipInfoUseCase])
|
|
59
|
-
], RelationshipInfoFacade);
|
|
60
|
-
exports.RelationshipInfoFacade = RelationshipInfoFacade;
|
|
61
|
-
//# sourceMappingURL=RelationshipInfoFacade.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipInfoFacade.js","sourceRoot":"","sources":["../../../../src/extensibility/facades/consumption/RelationshipInfoFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,mDAAwC;AAExC,gDAa2B;AAE3B,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IAC/B,YAC6B,6BAA4D,EAC5D,6BAA4D,EAC5D,2CAAwF,EACxF,0BAAsD,EACtD,wCAAkF,EAClF,6BAA4D;QAL5D,kCAA6B,GAA7B,6BAA6B,CAA+B;QAC5D,kCAA6B,GAA7B,6BAA6B,CAA+B;QAC5D,gDAA2C,GAA3C,2CAA2C,CAA6C;QACxF,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,6CAAwC,GAAxC,wCAAwC,CAA0C;QAClF,kCAA6B,GAA7B,6BAA6B,CAA+B;IACtF,CAAC;IAEG,KAAK,CAAC,sBAAsB,CAAC,OAAsC;QACtE,OAAO,MAAM,IAAI,CAAC,6BAA6B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;IAEM,KAAK,CAAC,sBAAsB,CAAC,OAAsC;QACtE,OAAO,MAAM,IAAI,CAAC,6BAA6B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;IAEM,KAAK,CAAC,oCAAoC,CAAC,OAAoD;QAClG,OAAO,MAAM,IAAI,CAAC,2CAA2C,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAAC,OAAmC;QAChE,OAAO,MAAM,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAEM,KAAK,CAAC,iCAAiC,CAAC,OAAiD;QAC5F,OAAO,MAAM,IAAI,CAAC,wCAAwC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAChF,CAAC;IAEM,KAAK,CAAC,sBAAsB,CAAC,OAAsC;QACtE,OAAO,MAAM,IAAI,CAAC,6BAA6B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CACJ,CAAA;AAjCY,sBAAsB;IAE1B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCALiD,wCAA6B;QAC7B,wCAA6B;QACf,sDAA2C;QAC5D,qCAA0B;QACZ,mDAAwC;QACnD,wCAA6B;GAPhF,sBAAsB,CAiClC;AAjCY,wDAAsB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ApplicationError, Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { SharedItemDTO } from "../../..";
|
|
3
|
-
import { CreateSharedItemRequest, CreateSharedItemUseCase, DeleteSharedItemRequest, DeleteSharedItemUseCase, GetSharedItemRequest, GetSharedItemsByAddressRequest, GetSharedItemsByAddressUseCase, GetSharedItemsByReferenceRequest, GetSharedItemsByReferenceUseCase, GetSharedItemsRequest, GetSharedItemsSharedByAddressRequest, GetSharedItemsSharedByAddressUseCase, GetSharedItemsSharedWithAddressRequest, GetSharedItemsSharedWithAddressUseCase, GetSharedItemsUseCase, GetSharedItemUseCase, UpdateSharedItemRequest, UpdateSharedItemUseCase } from "../../../useCases";
|
|
4
|
-
export declare class SharedItemsFacade {
|
|
5
|
-
private readonly createSharedItemUseCase;
|
|
6
|
-
private readonly deleteSharedItemUseCase;
|
|
7
|
-
private readonly getSharedItemUseCase;
|
|
8
|
-
private readonly getSharedItemsUseCase;
|
|
9
|
-
private readonly getSharedItemsByAddressUseCase;
|
|
10
|
-
private readonly getSharedItemsByReferenceUseCase;
|
|
11
|
-
private readonly getSharedItemsSharedByAddressUseCase;
|
|
12
|
-
private readonly getSharedItemsSharedWithAddressUseCase;
|
|
13
|
-
private readonly updateSharedItemUseCase;
|
|
14
|
-
constructor(createSharedItemUseCase: CreateSharedItemUseCase, deleteSharedItemUseCase: DeleteSharedItemUseCase, getSharedItemUseCase: GetSharedItemUseCase, getSharedItemsUseCase: GetSharedItemsUseCase, getSharedItemsByAddressUseCase: GetSharedItemsByAddressUseCase, getSharedItemsByReferenceUseCase: GetSharedItemsByReferenceUseCase, getSharedItemsSharedByAddressUseCase: GetSharedItemsSharedByAddressUseCase, getSharedItemsSharedWithAddressUseCase: GetSharedItemsSharedWithAddressUseCase, updateSharedItemUseCase: UpdateSharedItemUseCase);
|
|
15
|
-
createSharedItem(request: CreateSharedItemRequest): Promise<Result<SharedItemDTO, ApplicationError>>;
|
|
16
|
-
deleteSharedItem(request: DeleteSharedItemRequest): Promise<Result<void, ApplicationError>>;
|
|
17
|
-
getSharedItem(request: GetSharedItemRequest): Promise<Result<SharedItemDTO, ApplicationError>>;
|
|
18
|
-
getSharedItems(request: GetSharedItemsRequest): Promise<Result<SharedItemDTO[], ApplicationError>>;
|
|
19
|
-
getSharedItemsByAddress(request: GetSharedItemsByAddressRequest): Promise<Result<SharedItemDTO[], ApplicationError>>;
|
|
20
|
-
getSharedItemsByReference(request: GetSharedItemsByReferenceRequest): Promise<Result<SharedItemDTO[], ApplicationError>>;
|
|
21
|
-
getSharedItemsSharedByAddress(request: GetSharedItemsSharedByAddressRequest): Promise<Result<SharedItemDTO[], ApplicationError>>;
|
|
22
|
-
getSharedItemsSharedWithAddress(request: GetSharedItemsSharedWithAddressRequest): Promise<Result<SharedItemDTO[], ApplicationError>>;
|
|
23
|
-
updateSharedItem(request: UpdateSharedItemRequest): Promise<Result<SharedItemDTO, ApplicationError>>;
|
|
24
|
-
}
|
|
@@ -1,79 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.SharedItemsFacade = void 0;
|
|
16
|
-
const typescript_ioc_1 = require("typescript-ioc");
|
|
17
|
-
const useCases_1 = require("../../../useCases");
|
|
18
|
-
let SharedItemsFacade = class SharedItemsFacade {
|
|
19
|
-
constructor(createSharedItemUseCase, deleteSharedItemUseCase, getSharedItemUseCase, getSharedItemsUseCase, getSharedItemsByAddressUseCase, getSharedItemsByReferenceUseCase, getSharedItemsSharedByAddressUseCase, getSharedItemsSharedWithAddressUseCase, updateSharedItemUseCase) {
|
|
20
|
-
this.createSharedItemUseCase = createSharedItemUseCase;
|
|
21
|
-
this.deleteSharedItemUseCase = deleteSharedItemUseCase;
|
|
22
|
-
this.getSharedItemUseCase = getSharedItemUseCase;
|
|
23
|
-
this.getSharedItemsUseCase = getSharedItemsUseCase;
|
|
24
|
-
this.getSharedItemsByAddressUseCase = getSharedItemsByAddressUseCase;
|
|
25
|
-
this.getSharedItemsByReferenceUseCase = getSharedItemsByReferenceUseCase;
|
|
26
|
-
this.getSharedItemsSharedByAddressUseCase = getSharedItemsSharedByAddressUseCase;
|
|
27
|
-
this.getSharedItemsSharedWithAddressUseCase = getSharedItemsSharedWithAddressUseCase;
|
|
28
|
-
this.updateSharedItemUseCase = updateSharedItemUseCase;
|
|
29
|
-
}
|
|
30
|
-
async createSharedItem(request) {
|
|
31
|
-
return await this.createSharedItemUseCase.execute(request);
|
|
32
|
-
}
|
|
33
|
-
async deleteSharedItem(request) {
|
|
34
|
-
return await this.deleteSharedItemUseCase.execute(request);
|
|
35
|
-
}
|
|
36
|
-
async getSharedItem(request) {
|
|
37
|
-
return await this.getSharedItemUseCase.execute(request);
|
|
38
|
-
}
|
|
39
|
-
async getSharedItems(request) {
|
|
40
|
-
return await this.getSharedItemsUseCase.execute(request);
|
|
41
|
-
}
|
|
42
|
-
async getSharedItemsByAddress(request) {
|
|
43
|
-
return await this.getSharedItemsByAddressUseCase.execute(request);
|
|
44
|
-
}
|
|
45
|
-
async getSharedItemsByReference(request) {
|
|
46
|
-
return await this.getSharedItemsByReferenceUseCase.execute(request);
|
|
47
|
-
}
|
|
48
|
-
async getSharedItemsSharedByAddress(request) {
|
|
49
|
-
return await this.getSharedItemsSharedByAddressUseCase.execute(request);
|
|
50
|
-
}
|
|
51
|
-
async getSharedItemsSharedWithAddress(request) {
|
|
52
|
-
return await this.getSharedItemsSharedWithAddressUseCase.execute(request);
|
|
53
|
-
}
|
|
54
|
-
async updateSharedItem(request) {
|
|
55
|
-
return await this.updateSharedItemUseCase.execute(request);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
SharedItemsFacade = __decorate([
|
|
59
|
-
__param(0, typescript_ioc_1.Inject),
|
|
60
|
-
__param(1, typescript_ioc_1.Inject),
|
|
61
|
-
__param(2, typescript_ioc_1.Inject),
|
|
62
|
-
__param(3, typescript_ioc_1.Inject),
|
|
63
|
-
__param(4, typescript_ioc_1.Inject),
|
|
64
|
-
__param(5, typescript_ioc_1.Inject),
|
|
65
|
-
__param(6, typescript_ioc_1.Inject),
|
|
66
|
-
__param(7, typescript_ioc_1.Inject),
|
|
67
|
-
__param(8, typescript_ioc_1.Inject),
|
|
68
|
-
__metadata("design:paramtypes", [useCases_1.CreateSharedItemUseCase,
|
|
69
|
-
useCases_1.DeleteSharedItemUseCase,
|
|
70
|
-
useCases_1.GetSharedItemUseCase,
|
|
71
|
-
useCases_1.GetSharedItemsUseCase,
|
|
72
|
-
useCases_1.GetSharedItemsByAddressUseCase,
|
|
73
|
-
useCases_1.GetSharedItemsByReferenceUseCase,
|
|
74
|
-
useCases_1.GetSharedItemsSharedByAddressUseCase,
|
|
75
|
-
useCases_1.GetSharedItemsSharedWithAddressUseCase,
|
|
76
|
-
useCases_1.UpdateSharedItemUseCase])
|
|
77
|
-
], SharedItemsFacade);
|
|
78
|
-
exports.SharedItemsFacade = SharedItemsFacade;
|
|
79
|
-
//# sourceMappingURL=SharedItemsFacade.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedItemsFacade.js","sourceRoot":"","sources":["../../../../src/extensibility/facades/consumption/SharedItemsFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,mDAAwC;AAExC,gDAmB2B;AAE3B,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAC1B,YAC6B,uBAAgD,EAChD,uBAAgD,EAChD,oBAA0C,EAC1C,qBAA4C,EAC5C,8BAA8D,EAC9D,gCAAkE,EAClE,oCAA0E,EAC1E,sCAA8E,EAC9E,uBAAgD;QARhD,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,mCAA8B,GAA9B,8BAA8B,CAAgC;QAC9D,qCAAgC,GAAhC,gCAAgC,CAAkC;QAClE,yCAAoC,GAApC,oCAAoC,CAAsC;QAC1E,2CAAsC,GAAtC,sCAAsC,CAAwC;QAC9E,4BAAuB,GAAvB,uBAAuB,CAAyB;IAC1E,CAAC;IAEG,KAAK,CAAC,gBAAgB,CAAC,OAAgC;QAC1D,OAAO,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,OAAgC;QAC1D,OAAO,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,OAA6B;QACpD,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5D,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,OAA8B;QACtD,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,OAAuC;QACxE,OAAO,MAAM,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;IAEM,KAAK,CAAC,yBAAyB,CAAC,OAAyC;QAC5E,OAAO,MAAM,IAAI,CAAC,gCAAgC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACxE,CAAC;IAEM,KAAK,CAAC,6BAA6B,CAAC,OAA6C;QACpF,OAAO,MAAM,IAAI,CAAC,oCAAoC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5E,CAAC;IAEM,KAAK,CAAC,+BAA+B,CAAC,OAA+C;QACxF,OAAO,MAAM,IAAI,CAAC,sCAAsC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9E,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,OAAgC;QAC1D,OAAO,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC;CACJ,CAAA;AAhDY,iBAAiB;IAErB,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAR2C,kCAAuB;QACvB,kCAAuB;QAC1B,+BAAoB;QACnB,gCAAqB;QACZ,yCAA8B;QAC5B,2CAAgC;QAC5B,+CAAoC;QAClC,iDAAsC;QACrD,kCAAuB;GAVpE,iBAAiB,CAgD7B;AAhDY,8CAAiB"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AbstractValidator } from "fluent-ts-validator";
|
|
2
|
-
import { RelationshipAttributeDTO } from "../../../types";
|
|
3
|
-
export declare class RelationshipAttributeDTOValidator extends AbstractValidator<RelationshipAttributeDTO> {
|
|
4
|
-
private constructor();
|
|
5
|
-
static required(): RelationshipAttributeDTOValidator;
|
|
6
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RelationshipAttributeDTOValidator = void 0;
|
|
4
|
-
const consumption_1 = require("@nmshd/consumption");
|
|
5
|
-
const fluent_ts_validator_1 = require("fluent-ts-validator");
|
|
6
|
-
class RelationshipAttributeDTOValidator extends fluent_ts_validator_1.AbstractValidator {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.validateIfString((x) => x.sharedItem).fulfills((x) => consumption_1.ConsumptionIds.sharedItem.validate(x));
|
|
10
|
-
}
|
|
11
|
-
static required() {
|
|
12
|
-
return new RelationshipAttributeDTOValidator();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.RelationshipAttributeDTOValidator = RelationshipAttributeDTOValidator;
|
|
16
|
-
//# sourceMappingURL=RelationshipAttributeDTOValidator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipAttributeDTOValidator.js","sourceRoot":"","sources":["../../../../src/useCases/common/validation/RelationshipAttributeDTOValidator.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,6DAAwD;AAGxD,MAAa,iCAAkC,SAAQ,uCAA2C;IAC9F;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,4BAAc,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC;IAEM,MAAM,CAAC,QAAQ;QAClB,OAAO,IAAI,iCAAiC,EAAE,CAAC;IACnD,CAAC;CACJ;AAVD,8EAUC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { RelationshipInfoController } from "@nmshd/consumption";
|
|
3
|
-
import { AccountController } from "@nmshd/transport";
|
|
4
|
-
import { RelationshipAttributeDTO, RelationshipInfoDTO, RelationshipThemeDTO } from "../../../types";
|
|
5
|
-
import { RuntimeValidator } from "../../common";
|
|
6
|
-
import { UseCase } from "../../common/UseCase";
|
|
7
|
-
export interface CreateRelationshipInfoRequest {
|
|
8
|
-
relationshipId: string;
|
|
9
|
-
attributes: RelationshipAttributeDTO[];
|
|
10
|
-
isPinned: boolean;
|
|
11
|
-
title: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
userTitle?: string;
|
|
14
|
-
userDescription?: string;
|
|
15
|
-
theme?: RelationshipThemeDTO;
|
|
16
|
-
}
|
|
17
|
-
declare class CreateRelationshipInfoRequestValidator extends RuntimeValidator<CreateRelationshipInfoRequest> {
|
|
18
|
-
constructor();
|
|
19
|
-
}
|
|
20
|
-
export declare class CreateRelationshipInfoUseCase extends UseCase<CreateRelationshipInfoRequest, RelationshipInfoDTO> {
|
|
21
|
-
private readonly relationshipInfoController;
|
|
22
|
-
private readonly accountController;
|
|
23
|
-
constructor(relationshipInfoController: RelationshipInfoController, accountController: AccountController, validator: CreateRelationshipInfoRequestValidator);
|
|
24
|
-
protected executeInternal(request: CreateRelationshipInfoRequest): Promise<Result<RelationshipInfoDTO>>;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,75 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CreateRelationshipInfoUseCase = void 0;
|
|
16
|
-
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
-
const consumption_1 = require("@nmshd/consumption");
|
|
18
|
-
const transport_1 = require("@nmshd/transport");
|
|
19
|
-
const typescript_ioc_1 = require("typescript-ioc");
|
|
20
|
-
const common_1 = require("../../common");
|
|
21
|
-
const UseCase_1 = require("../../common/UseCase");
|
|
22
|
-
const RelationshipInfoMapper_1 = require("./RelationshipInfoMapper");
|
|
23
|
-
class CreateRelationshipInfoRequestValidator extends common_1.RuntimeValidator {
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
this.validateIfAny((x) => x.relationshipId).fulfills(common_1.IdValidator.required(transport_1.BackboneIds.relationship));
|
|
27
|
-
this.validateIfEach((x) => x.attributes).fulfills(common_1.RelationshipAttributeDTOValidator.required());
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
let CreateRelationshipInfoUseCase = class CreateRelationshipInfoUseCase extends UseCase_1.UseCase {
|
|
31
|
-
constructor(relationshipInfoController, accountController, validator) {
|
|
32
|
-
super(validator);
|
|
33
|
-
this.relationshipInfoController = relationshipInfoController;
|
|
34
|
-
this.accountController = accountController;
|
|
35
|
-
}
|
|
36
|
-
async executeInternal(request) {
|
|
37
|
-
const relationshipId = transport_1.CoreId.from(request.relationshipId);
|
|
38
|
-
const existingRelationshipInfo = await this.relationshipInfoController.getRelationshipInfoByRelationship(relationshipId);
|
|
39
|
-
if (existingRelationshipInfo !== undefined) {
|
|
40
|
-
return ts_utils_1.Result.fail(common_1.RuntimeErrors.relationshipInfo.relationshipInfoExists(relationshipId.toString()));
|
|
41
|
-
}
|
|
42
|
-
const attributes = await Promise.all(request.attributes.map((a) => {
|
|
43
|
-
return consumption_1.RelationshipAttribute.from({
|
|
44
|
-
name: a.name,
|
|
45
|
-
content: a.content,
|
|
46
|
-
sharedItem: transport_1.CoreId.from(a.sharedItem)
|
|
47
|
-
});
|
|
48
|
-
}));
|
|
49
|
-
const theme = request.theme === undefined ? undefined : consumption_1.RelationshipTheme.from(request.theme);
|
|
50
|
-
const parameters = consumption_1.RelationshipInfo.from({
|
|
51
|
-
id: await consumption_1.ConsumptionIds.relationshipInfo.generate(),
|
|
52
|
-
relationshipId: relationshipId,
|
|
53
|
-
attributes: attributes,
|
|
54
|
-
isPinned: request.isPinned,
|
|
55
|
-
title: request.title,
|
|
56
|
-
description: request.description,
|
|
57
|
-
userTitle: request.userTitle,
|
|
58
|
-
userDescription: request.userDescription,
|
|
59
|
-
theme: theme
|
|
60
|
-
});
|
|
61
|
-
await this.relationshipInfoController.createRelationshipInfo(parameters);
|
|
62
|
-
await this.accountController.syncDatawallet();
|
|
63
|
-
return ts_utils_1.Result.ok(RelationshipInfoMapper_1.RelationshipInfoMapper.toRelationshipInfoDTO(parameters));
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
CreateRelationshipInfoUseCase = __decorate([
|
|
67
|
-
__param(0, typescript_ioc_1.Inject),
|
|
68
|
-
__param(1, typescript_ioc_1.Inject),
|
|
69
|
-
__param(2, typescript_ioc_1.Inject),
|
|
70
|
-
__metadata("design:paramtypes", [consumption_1.RelationshipInfoController,
|
|
71
|
-
transport_1.AccountController,
|
|
72
|
-
CreateRelationshipInfoRequestValidator])
|
|
73
|
-
], CreateRelationshipInfoUseCase);
|
|
74
|
-
exports.CreateRelationshipInfoUseCase = CreateRelationshipInfoUseCase;
|
|
75
|
-
//# sourceMappingURL=CreateRelationshipInfo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateRelationshipInfo.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/relationshipInfo/CreateRelationshipInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA4I;AAE5I,gDAA0E;AAC1E,mDAAwC;AAExC,yCAA+G;AAC/G,kDAA+C;AAC/C,qEAAkE;AAalE,MAAM,sCAAuC,SAAQ,yBAA+C;IAChG;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,oBAAW,CAAC,QAAQ,CAAC,uBAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QACrG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,0CAAiC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACpG,CAAC;CACJ;AAED,IAAa,6BAA6B,GAA1C,MAAa,6BAA8B,SAAQ,iBAA2D;IAC1G,YAC6B,0BAAsD,EACtD,iBAAoC,EACrD,SAAiD;QAEzD,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,sBAAiB,GAAjB,iBAAiB,CAAmB;IAIjE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAsC;QAClE,MAAM,cAAc,GAAG,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAC3D,MAAM,wBAAwB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,iCAAiC,CAAC,cAAc,CAAC,CAAC;QACzH,IAAI,wBAAwB,KAAK,SAAS,EAAE;YACxC,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;SACxG;QAED,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAChC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACzB,OAAO,mCAAqB,CAAC,IAAI,CAAC;gBAC9B,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,OAAO,EAAE,CAAC,CAAC,OAAqB;gBAChC,UAAU,EAAE,kBAAM,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;aACxC,CAAC,CAAC;QACP,CAAC,CAAC,CACL,CAAC;QACF,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,+BAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC9F,MAAM,UAAU,GAAG,8BAAgB,CAAC,IAAI,CAAC;YACrC,EAAE,EAAE,MAAM,4BAAc,CAAC,gBAAgB,CAAC,QAAQ,EAAE;YACpD,cAAc,EAAE,cAAc;YAC9B,UAAU,EAAE,UAAU;YACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,eAAe,EAAE,OAAO,CAAC,eAAe;YACxC,KAAK,EAAE,KAAK;SACf,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,0BAA0B,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;QACzE,MAAM,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;QAC9C,OAAO,iBAAM,CAAC,EAAE,CAAC,+CAAsB,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;IAC/E,CAAC;CACJ,CAAA;AAzCY,6BAA6B;IAEjC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAF8C,wCAA0B;QACnC,6BAAiB;QAC1C,sCAAsC;GAJpD,6BAA6B,CAyCzC;AAzCY,sEAA6B"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { RelationshipInfoController } from "@nmshd/consumption";
|
|
3
|
-
import { AccountController } from "@nmshd/transport";
|
|
4
|
-
import { RuntimeValidator } from "../../common";
|
|
5
|
-
import { UseCase } from "../../common/UseCase";
|
|
6
|
-
export interface DeleteRelationshipInfoRequest {
|
|
7
|
-
id: string;
|
|
8
|
-
}
|
|
9
|
-
declare class DeleteRelationshipInfoRequestValidator extends RuntimeValidator<DeleteRelationshipInfoRequest> {
|
|
10
|
-
constructor();
|
|
11
|
-
}
|
|
12
|
-
export declare class DeleteRelationshipInfoUseCase extends UseCase<DeleteRelationshipInfoRequest, void> {
|
|
13
|
-
private readonly relationshipInfoController;
|
|
14
|
-
private readonly accountController;
|
|
15
|
-
constructor(relationshipInfoController: RelationshipInfoController, accountController: AccountController, validator: DeleteRelationshipInfoRequestValidator);
|
|
16
|
-
protected executeInternal(request: DeleteRelationshipInfoRequest): Promise<Result<void>>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,54 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.DeleteRelationshipInfoUseCase = void 0;
|
|
16
|
-
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
-
const consumption_1 = require("@nmshd/consumption");
|
|
18
|
-
const transport_1 = require("@nmshd/transport");
|
|
19
|
-
const typescript_ioc_1 = require("typescript-ioc");
|
|
20
|
-
const common_1 = require("../../common");
|
|
21
|
-
const RuntimeErrors_1 = require("../../common/RuntimeErrors");
|
|
22
|
-
const UseCase_1 = require("../../common/UseCase");
|
|
23
|
-
class DeleteRelationshipInfoRequestValidator extends common_1.RuntimeValidator {
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
this.validateIfAny((x) => x.id).fulfills(common_1.IdValidator.required(consumption_1.ConsumptionIds.relationshipInfo));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
let DeleteRelationshipInfoUseCase = class DeleteRelationshipInfoUseCase extends UseCase_1.UseCase {
|
|
30
|
-
constructor(relationshipInfoController, accountController, validator) {
|
|
31
|
-
super(validator);
|
|
32
|
-
this.relationshipInfoController = relationshipInfoController;
|
|
33
|
-
this.accountController = accountController;
|
|
34
|
-
}
|
|
35
|
-
async executeInternal(request) {
|
|
36
|
-
const relationshipInfo = await this.relationshipInfoController.getRelationshipInfo(transport_1.CoreId.from(request.id));
|
|
37
|
-
if (!relationshipInfo) {
|
|
38
|
-
return ts_utils_1.Result.fail(RuntimeErrors_1.RuntimeErrors.general.recordNotFound(consumption_1.RelationshipInfo));
|
|
39
|
-
}
|
|
40
|
-
await this.relationshipInfoController.deleteRelationshipInfo(relationshipInfo);
|
|
41
|
-
await this.accountController.syncDatawallet();
|
|
42
|
-
return ts_utils_1.Result.ok(undefined);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
DeleteRelationshipInfoUseCase = __decorate([
|
|
46
|
-
__param(0, typescript_ioc_1.Inject),
|
|
47
|
-
__param(1, typescript_ioc_1.Inject),
|
|
48
|
-
__param(2, typescript_ioc_1.Inject),
|
|
49
|
-
__metadata("design:paramtypes", [consumption_1.RelationshipInfoController,
|
|
50
|
-
transport_1.AccountController,
|
|
51
|
-
DeleteRelationshipInfoRequestValidator])
|
|
52
|
-
], DeleteRelationshipInfoUseCase);
|
|
53
|
-
exports.DeleteRelationshipInfoUseCase = DeleteRelationshipInfoUseCase;
|
|
54
|
-
//# sourceMappingURL=DeleteRelationshipInfo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteRelationshipInfo.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAkG;AAClG,gDAA6D;AAC7D,mDAAwC;AACxC,yCAA6D;AAC7D,8DAA2D;AAC3D,kDAA+C;AAM/C,MAAM,sCAAuC,SAAQ,yBAA+C;IAChG;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,oBAAW,CAAC,QAAQ,CAAC,4BAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACpG,CAAC;CACJ;AAED,IAAa,6BAA6B,GAA1C,MAAa,6BAA8B,SAAQ,iBAA4C;IAC3F,YAC6B,0BAAsD,EACtD,iBAAoC,EACrD,SAAiD;QAEzD,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,sBAAiB,GAAjB,iBAAiB,CAAmB;IAIjE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAsC;QAClE,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,mBAAmB,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5G,IAAI,CAAC,gBAAgB,EAAE;YACnB,OAAO,iBAAM,CAAC,IAAI,CAAC,6BAAa,CAAC,OAAO,CAAC,cAAc,CAAC,8BAAgB,CAAC,CAAC,CAAC;SAC9E;QAED,MAAM,IAAI,CAAC,0BAA0B,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;QAC/E,MAAM,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;QAC9C,OAAO,iBAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;CACJ,CAAA;AAnBY,6BAA6B;IAEjC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAF8C,wCAA0B;QACnC,6BAAiB;QAC1C,sCAAsC;GAJpD,6BAA6B,CAmBzC;AAnBY,sEAA6B"}
|
package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { RelationshipInfoController } from "@nmshd/consumption";
|
|
3
|
-
import { AccountController } from "@nmshd/transport";
|
|
4
|
-
import { RuntimeValidator } from "../../common";
|
|
5
|
-
import { UseCase } from "../../common/UseCase";
|
|
6
|
-
export interface DeleteRelationshipInfoByRelationshipRequest {
|
|
7
|
-
relationshipId: string;
|
|
8
|
-
}
|
|
9
|
-
declare class DeleteRelationshipInfoByRelationshipRequestValidator extends RuntimeValidator<DeleteRelationshipInfoByRelationshipRequest> {
|
|
10
|
-
constructor();
|
|
11
|
-
}
|
|
12
|
-
export declare class DeleteRelationshipInfoByRelationshipUseCase extends UseCase<DeleteRelationshipInfoByRelationshipRequest, void> {
|
|
13
|
-
private readonly relationshipInfoController;
|
|
14
|
-
private readonly accountController;
|
|
15
|
-
constructor(relationshipInfoController: RelationshipInfoController, accountController: AccountController, validator: DeleteRelationshipInfoByRelationshipRequestValidator);
|
|
16
|
-
protected executeInternal(request: DeleteRelationshipInfoByRelationshipRequest): Promise<Result<void>>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,54 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.DeleteRelationshipInfoByRelationshipUseCase = void 0;
|
|
16
|
-
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
-
const consumption_1 = require("@nmshd/consumption");
|
|
18
|
-
const transport_1 = require("@nmshd/transport");
|
|
19
|
-
const typescript_ioc_1 = require("typescript-ioc");
|
|
20
|
-
const common_1 = require("../../common");
|
|
21
|
-
const RuntimeErrors_1 = require("../../common/RuntimeErrors");
|
|
22
|
-
const UseCase_1 = require("../../common/UseCase");
|
|
23
|
-
class DeleteRelationshipInfoByRelationshipRequestValidator extends common_1.RuntimeValidator {
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
this.validateIfAny((x) => x.relationshipId).fulfills(common_1.IdValidator.required(transport_1.BackboneIds.relationship));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
let DeleteRelationshipInfoByRelationshipUseCase = class DeleteRelationshipInfoByRelationshipUseCase extends UseCase_1.UseCase {
|
|
30
|
-
constructor(relationshipInfoController, accountController, validator) {
|
|
31
|
-
super(validator);
|
|
32
|
-
this.relationshipInfoController = relationshipInfoController;
|
|
33
|
-
this.accountController = accountController;
|
|
34
|
-
}
|
|
35
|
-
async executeInternal(request) {
|
|
36
|
-
const relationshipInfo = await this.relationshipInfoController.getRelationshipInfoByRelationship(transport_1.CoreId.from(request.relationshipId));
|
|
37
|
-
if (!relationshipInfo) {
|
|
38
|
-
return ts_utils_1.Result.fail(RuntimeErrors_1.RuntimeErrors.general.recordNotFound(consumption_1.RelationshipInfo));
|
|
39
|
-
}
|
|
40
|
-
await this.relationshipInfoController.deleteRelationshipInfo(relationshipInfo);
|
|
41
|
-
await this.accountController.syncDatawallet();
|
|
42
|
-
return ts_utils_1.Result.ok(undefined);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
DeleteRelationshipInfoByRelationshipUseCase = __decorate([
|
|
46
|
-
__param(0, typescript_ioc_1.Inject),
|
|
47
|
-
__param(1, typescript_ioc_1.Inject),
|
|
48
|
-
__param(2, typescript_ioc_1.Inject),
|
|
49
|
-
__metadata("design:paramtypes", [consumption_1.RelationshipInfoController,
|
|
50
|
-
transport_1.AccountController,
|
|
51
|
-
DeleteRelationshipInfoByRelationshipRequestValidator])
|
|
52
|
-
], DeleteRelationshipInfoByRelationshipUseCase);
|
|
53
|
-
exports.DeleteRelationshipInfoByRelationshipUseCase = DeleteRelationshipInfoByRelationshipUseCase;
|
|
54
|
-
//# sourceMappingURL=DeleteRelationshipInfoByRelationship.js.map
|
package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteRelationshipInfoByRelationship.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAkF;AAClF,gDAA0E;AAC1E,mDAAwC;AACxC,yCAA6D;AAC7D,8DAA2D;AAC3D,kDAA+C;AAM/C,MAAM,oDAAqD,SAAQ,yBAA6D;IAC5H;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,oBAAW,CAAC,QAAQ,CAAC,uBAAW,CAAC,YAAY,CAAC,CAAC,CAAC;IACzG,CAAC;CACJ;AAED,IAAa,2CAA2C,GAAxD,MAAa,2CAA4C,SAAQ,iBAA0D;IACvH,YAC6B,0BAAsD,EACtD,iBAAoC,EACrD,SAA+D;QAEvE,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,sBAAiB,GAAjB,iBAAiB,CAAmB;IAIjE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAoD;QAChF,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,iCAAiC,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;QACtI,IAAI,CAAC,gBAAgB,EAAE;YACnB,OAAO,iBAAM,CAAC,IAAI,CAAC,6BAAa,CAAC,OAAO,CAAC,cAAc,CAAC,8BAAgB,CAAC,CAAC,CAAC;SAC9E;QAED,MAAM,IAAI,CAAC,0BAA0B,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;QAC/E,MAAM,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;QAC9C,OAAO,iBAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;CACJ,CAAA;AAnBY,2CAA2C;IAE/C,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAF8C,wCAA0B;QACnC,6BAAiB;QAC1C,oDAAoD;GAJlE,2CAA2C,CAmBvD;AAnBY,kGAA2C"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { RelationshipInfoController } from "@nmshd/consumption";
|
|
3
|
-
import { AbstractValidator } from "fluent-ts-validator";
|
|
4
|
-
import { RelationshipInfoDTO } from "../../../types";
|
|
5
|
-
import { UseCase } from "../../common/UseCase";
|
|
6
|
-
export interface GetRelationshipInfoRequest {
|
|
7
|
-
id: string;
|
|
8
|
-
}
|
|
9
|
-
declare class GetRelationshipInfoRequestValidator extends AbstractValidator<GetRelationshipInfoRequest> {
|
|
10
|
-
constructor();
|
|
11
|
-
}
|
|
12
|
-
export declare class GetRelationshipInfoUseCase extends UseCase<GetRelationshipInfoRequest, RelationshipInfoDTO> {
|
|
13
|
-
private readonly relationshipInfoController;
|
|
14
|
-
constructor(relationshipInfoController: RelationshipInfoController, validator: GetRelationshipInfoRequestValidator);
|
|
15
|
-
protected executeInternal(request: GetRelationshipInfoRequest): Promise<Result<RelationshipInfoDTO>>;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,50 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.GetRelationshipInfoUseCase = void 0;
|
|
16
|
-
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
-
const consumption_1 = require("@nmshd/consumption");
|
|
18
|
-
const transport_1 = require("@nmshd/transport");
|
|
19
|
-
const fluent_ts_validator_1 = require("fluent-ts-validator");
|
|
20
|
-
const typescript_ioc_1 = require("typescript-ioc");
|
|
21
|
-
const common_1 = require("../../common");
|
|
22
|
-
const RuntimeErrors_1 = require("../../common/RuntimeErrors");
|
|
23
|
-
const UseCase_1 = require("../../common/UseCase");
|
|
24
|
-
const RelationshipInfoMapper_1 = require("./RelationshipInfoMapper");
|
|
25
|
-
class GetRelationshipInfoRequestValidator extends fluent_ts_validator_1.AbstractValidator {
|
|
26
|
-
constructor() {
|
|
27
|
-
super();
|
|
28
|
-
this.validateIfAny((x) => x.id).fulfills(common_1.IdValidator.required(consumption_1.ConsumptionIds.relationshipInfo));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
let GetRelationshipInfoUseCase = class GetRelationshipInfoUseCase extends UseCase_1.UseCase {
|
|
32
|
-
constructor(relationshipInfoController, validator) {
|
|
33
|
-
super(validator);
|
|
34
|
-
this.relationshipInfoController = relationshipInfoController;
|
|
35
|
-
}
|
|
36
|
-
async executeInternal(request) {
|
|
37
|
-
const relationshipInfo = await this.relationshipInfoController.getRelationshipInfo(transport_1.CoreId.from(request.id));
|
|
38
|
-
if (!relationshipInfo) {
|
|
39
|
-
return ts_utils_1.Result.fail(RuntimeErrors_1.RuntimeErrors.general.recordNotFound(consumption_1.RelationshipInfo));
|
|
40
|
-
}
|
|
41
|
-
return ts_utils_1.Result.ok(RelationshipInfoMapper_1.RelationshipInfoMapper.toRelationshipInfoDTO(relationshipInfo));
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
GetRelationshipInfoUseCase = __decorate([
|
|
45
|
-
__param(0, typescript_ioc_1.Inject),
|
|
46
|
-
__param(1, typescript_ioc_1.Inject),
|
|
47
|
-
__metadata("design:paramtypes", [consumption_1.RelationshipInfoController, GetRelationshipInfoRequestValidator])
|
|
48
|
-
], GetRelationshipInfoUseCase);
|
|
49
|
-
exports.GetRelationshipInfoUseCase = GetRelationshipInfoUseCase;
|
|
50
|
-
//# sourceMappingURL=GetRelationshipInfo.js.map
|