@nmshd/runtime 2.0.0-alpha.14 → 2.0.0-alpha.15
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/extensibility/facades/consumption/AttributesFacade.d.ts +4 -4
- package/dist/extensibility/facades/consumption/AttributesFacade.js +5 -5
- package/dist/extensibility/facades/consumption/AttributesFacade.js.map +1 -1
- package/dist/useCases/common/Schemas.d.ts +1 -0
- package/dist/useCases/common/Schemas.js +92 -6
- package/dist/useCases/common/Schemas.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetAttributes.d.ts +2 -2
- package/dist/useCases/consumption/attributes/GetAttributes.js +2 -2
- package/dist/useCases/consumption/attributes/GetAttributes.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetValidAttributes.d.ts +35 -0
- package/dist/useCases/consumption/attributes/GetValidAttributes.js +108 -0
- package/dist/useCases/consumption/attributes/GetValidAttributes.js.map +1 -0
- package/dist/useCases/consumption/attributes/index.d.ts +1 -1
- package/dist/useCases/consumption/attributes/index.js +1 -1
- package/dist/useCases/consumption/attributes/index.js.map +1 -1
- package/dist/useCases/consumption/requests/GetIncomingRequests.d.ts +2 -2
- package/lib-web/nmshd.runtime.js +222 -64
- package/lib-web/nmshd.runtime.js.map +1 -1
- package/lib-web/nmshd.runtime.min.js +1 -1
- package/lib-web/nmshd.runtime.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/useCases/consumption/attributes/GetAllValid.d.ts +0 -9
- package/dist/useCases/consumption/attributes/GetAllValid.js +0 -36
- package/dist/useCases/consumption/attributes/GetAllValid.js.map +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
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.GetValidAttributesUseCase = void 0;
|
|
16
|
+
const docdb_querytranslator_1 = require("@js-soft/docdb-querytranslator");
|
|
17
|
+
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
18
|
+
const consumption_1 = require("@nmshd/consumption");
|
|
19
|
+
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
20
|
+
const typescript_ioc_1 = require("typescript-ioc");
|
|
21
|
+
const common_1 = require("../../common");
|
|
22
|
+
const flattenObject_1 = require("../requests/flattenObject");
|
|
23
|
+
const AttributeMapper_1 = require("./AttributeMapper");
|
|
24
|
+
let GetValidAttributesUseCase = class GetValidAttributesUseCase extends common_1.UseCase {
|
|
25
|
+
constructor(attributeController) {
|
|
26
|
+
super();
|
|
27
|
+
this.attributeController = attributeController;
|
|
28
|
+
}
|
|
29
|
+
async executeInternal(request) {
|
|
30
|
+
const flattenedQuery = (0, flattenObject_1.flattenObject)(request.query);
|
|
31
|
+
const dbQuery = GetValidAttributesUseCase.queryTranslator.parse(flattenedQuery);
|
|
32
|
+
const attributes = await this.attributeController.getValidConsumptionAttributes(dbQuery);
|
|
33
|
+
return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
GetValidAttributesUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({
|
|
37
|
+
whitelist: {
|
|
38
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.succeeds)]: true,
|
|
39
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.succeededBy)]: true,
|
|
40
|
+
// content.abstractAttribute
|
|
41
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`]: true,
|
|
42
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`]: true,
|
|
43
|
+
// content.identityAttribute
|
|
44
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: true,
|
|
45
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`]: true,
|
|
46
|
+
// content.relationshipAttribute
|
|
47
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`]: true,
|
|
48
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`]: true,
|
|
49
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`]: true,
|
|
50
|
+
// content.shareInfo
|
|
51
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: true,
|
|
52
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`]: true,
|
|
53
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: true
|
|
54
|
+
},
|
|
55
|
+
alias: {
|
|
56
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.succeeds)]: [(0, ts_simple_nameof_1.nameof)((x) => x.succeeds)],
|
|
57
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.succeededBy)]: [(0, ts_simple_nameof_1.nameof)((x) => x.succeededBy)],
|
|
58
|
+
// content.abstractAttribute
|
|
59
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`]: [
|
|
60
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`
|
|
61
|
+
],
|
|
62
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`]: [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`],
|
|
63
|
+
// content.identityAttribute
|
|
64
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: [
|
|
65
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`
|
|
66
|
+
],
|
|
67
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`]: [
|
|
68
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`
|
|
69
|
+
],
|
|
70
|
+
// content.relationshipAttribute
|
|
71
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`]: [
|
|
72
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`
|
|
73
|
+
],
|
|
74
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`]: [
|
|
75
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`
|
|
76
|
+
],
|
|
77
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`]: [
|
|
78
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`
|
|
79
|
+
],
|
|
80
|
+
// content.shareInfo
|
|
81
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: [
|
|
82
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`
|
|
83
|
+
],
|
|
84
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`]: [
|
|
85
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`
|
|
86
|
+
],
|
|
87
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: [
|
|
88
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
custom: {
|
|
92
|
+
// content.tags
|
|
93
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: (query, input) => {
|
|
94
|
+
const allowedTags = [];
|
|
95
|
+
for (const tag of input) {
|
|
96
|
+
const tagQuery = { [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: { $contains: tag } };
|
|
97
|
+
allowedTags.push(tagQuery);
|
|
98
|
+
}
|
|
99
|
+
query["$or"] = allowedTags;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
GetValidAttributesUseCase = __decorate([
|
|
104
|
+
__param(0, typescript_ioc_1.Inject),
|
|
105
|
+
__metadata("design:paramtypes", [consumption_1.ConsumptionAttributesController])
|
|
106
|
+
], GetValidAttributesUseCase);
|
|
107
|
+
exports.GetValidAttributesUseCase = GetValidAttributesUseCase;
|
|
108
|
+
//# sourceMappingURL=GetValidAttributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetValidAttributes.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/GetValidAttributes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0EAAiE;AACjE,gDAA2C;AAC3C,oDAA8H;AAE9H,uDAA0C;AAC1C,mDAAwC;AAExC,yCAAuC;AACvC,6DAA0D;AAC1D,uDAAoD;AA4BpD,IAAa,yBAAyB,GAAtC,MAAa,yBAA0B,SAAQ,gBAA6D;IA6ExG,YAA4C,mBAAoD;QAC5F,KAAK,EAAE,CAAC;QADgC,wBAAmB,GAAnB,mBAAmB,CAAiC;IAEhG,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAkC;QAC9D,MAAM,cAAc,GAAG,IAAA,6BAAa,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpD,MAAM,OAAO,GAAG,yBAAyB,CAAC,eAAe,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAChF,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC;QACzF,OAAO,iBAAM,CAAC,EAAE,CAAC,iCAAe,CAAC,kBAAkB,CAAC,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,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,IAAA,yBAAM,EAAoC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,EAAE;SAC/H;KACJ;IACD,MAAM,EAAE;QACJ,eAAe;QACf,CAAC,GAAG,IAAA,yBAAM,EAA0B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,IAAA,yBAAM,EAAoB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,KAAU,EAAE,KAAU,EAAE,EAAE;YAC7H,MAAM,WAAW,GAAG,EAAE,CAAC;YACvB,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;gBACrB,MAAM,QAAQ,GAAG,EAAE,CAAC,GAAG,IAAA,yBAAM,EAAuB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,IAAA,yBAAM,EAAwB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,CAAC;gBAC/I,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC9B;YACD,KAAK,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC;QAC/B,CAAC;KACJ;CACJ,CAAE,CAAA;AA3EM,yBAAyB;IA6Ed,WAAA,uBAAM,CAAA;qCAAuC,6CAA+B;GA7EvF,yBAAyB,CAuFrC;AAvFY,8DAAyB"}
|
|
@@ -2,8 +2,8 @@ export * from "./AttributeMapper";
|
|
|
2
2
|
export * from "./CreateAttribute";
|
|
3
3
|
export * from "./CreateShareAttributeCopy";
|
|
4
4
|
export * from "./DeleteAttribute";
|
|
5
|
-
export * from "./GetAllValid";
|
|
6
5
|
export * from "./GetAttribute";
|
|
7
6
|
export * from "./GetAttributes";
|
|
7
|
+
export * from "./GetValidAttributes";
|
|
8
8
|
export * from "./SucceedAttribute";
|
|
9
9
|
export * from "./UpdateAttribute";
|
|
@@ -18,9 +18,9 @@ __exportStar(require("./AttributeMapper"), exports);
|
|
|
18
18
|
__exportStar(require("./CreateAttribute"), exports);
|
|
19
19
|
__exportStar(require("./CreateShareAttributeCopy"), exports);
|
|
20
20
|
__exportStar(require("./DeleteAttribute"), exports);
|
|
21
|
-
__exportStar(require("./GetAllValid"), exports);
|
|
22
21
|
__exportStar(require("./GetAttribute"), exports);
|
|
23
22
|
__exportStar(require("./GetAttributes"), exports);
|
|
23
|
+
__exportStar(require("./GetValidAttributes"), exports);
|
|
24
24
|
__exportStar(require("./SucceedAttribute"), exports);
|
|
25
25
|
__exportStar(require("./UpdateAttribute"), exports);
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC;AAClC,6DAA2C;AAC3C,oDAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC;AAClC,6DAA2C;AAC3C,oDAAkC;AAClC,iDAA+B;AAC/B,kDAAgC;AAChC,uDAAqC;AACrC,qDAAmC;AACnC,oDAAkC"}
|
|
@@ -3,9 +3,9 @@ import { IncomingRequestsController } from "@nmshd/consumption";
|
|
|
3
3
|
import { ConsumptionRequestDTO } from "../../../types";
|
|
4
4
|
import { UseCase } from "../../common";
|
|
5
5
|
export interface GetIncomingRequestsRequest {
|
|
6
|
-
query?:
|
|
6
|
+
query?: GetIncomingRequestsRequestQuery;
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface GetIncomingRequestsRequestQuery {
|
|
9
9
|
id?: string;
|
|
10
10
|
peer?: string;
|
|
11
11
|
createdAt?: string;
|
package/lib-web/nmshd.runtime.js
CHANGED
|
@@ -435,10 +435,10 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
|
|
|
435
435
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
436
436
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
437
437
|
exports.buildInformation = {
|
|
438
|
-
version: "2.0.0-alpha.
|
|
439
|
-
build: "
|
|
440
|
-
date: "2022-06-
|
|
441
|
-
commit: "
|
|
438
|
+
version: "2.0.0-alpha.15",
|
|
439
|
+
build: "62",
|
|
440
|
+
date: "2022-06-02T07:46:10+00:00",
|
|
441
|
+
commit: "3caf1936287d4fa6a2587baa26ca444259d4d63a",
|
|
442
442
|
dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.3","@js-soft/ts-utils":"^1.1.2","@nmshd/consumption":"2.0.0-alpha.19","@nmshd/content":"2.0.0-alpha.25","@nmshd/crypto":"2.0.1","@nmshd/transport":"2.0.0-alpha.1","ajv":"^8.11.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.3","json-stringify-safe":"^5.0.1","luxon":"^2.4.0","qrcode":"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
|
|
443
443
|
libraries: {
|
|
444
444
|
serval: ts_serval_1.buildInformation,
|
|
@@ -2216,11 +2216,11 @@ exports.AttributesFacade = void 0;
|
|
|
2216
2216
|
const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
|
|
2217
2217
|
const useCases_1 = __webpack_require__(/*! ../../../useCases */ "./dist/useCases/index.js");
|
|
2218
2218
|
let AttributesFacade = class AttributesFacade {
|
|
2219
|
-
constructor(createAttributeUseCase, createSharedAttributeCopyUseCase, deleteAttributeUseCase,
|
|
2219
|
+
constructor(createAttributeUseCase, createSharedAttributeCopyUseCase, deleteAttributeUseCase, getValidAttributesUseCase, getAttributeUseCase, getAttributesUseCase, succeedAttributeUseCase, updateAttributeUseCase) {
|
|
2220
2220
|
this.createAttributeUseCase = createAttributeUseCase;
|
|
2221
2221
|
this.createSharedAttributeCopyUseCase = createSharedAttributeCopyUseCase;
|
|
2222
2222
|
this.deleteAttributeUseCase = deleteAttributeUseCase;
|
|
2223
|
-
this.
|
|
2223
|
+
this.getValidAttributesUseCase = getValidAttributesUseCase;
|
|
2224
2224
|
this.getAttributeUseCase = getAttributeUseCase;
|
|
2225
2225
|
this.getAttributesUseCase = getAttributesUseCase;
|
|
2226
2226
|
this.succeedAttributeUseCase = succeedAttributeUseCase;
|
|
@@ -2235,8 +2235,8 @@ let AttributesFacade = class AttributesFacade {
|
|
|
2235
2235
|
async deleteAttribute(request) {
|
|
2236
2236
|
return await this.deleteAttributeUseCase.execute(request);
|
|
2237
2237
|
}
|
|
2238
|
-
async
|
|
2239
|
-
return await this.
|
|
2238
|
+
async getValidAttributes(request) {
|
|
2239
|
+
return await this.getValidAttributesUseCase.execute(request);
|
|
2240
2240
|
}
|
|
2241
2241
|
async getAttribute(request) {
|
|
2242
2242
|
return await this.getAttributeUseCase.execute(request);
|
|
@@ -2263,7 +2263,7 @@ AttributesFacade = __decorate([
|
|
|
2263
2263
|
__metadata("design:paramtypes", [useCases_1.CreateAttributeUseCase,
|
|
2264
2264
|
useCases_1.CreateSharedAttributeCopyUseCase,
|
|
2265
2265
|
useCases_1.DeleteAttributeUseCase,
|
|
2266
|
-
useCases_1.
|
|
2266
|
+
useCases_1.GetValidAttributesUseCase,
|
|
2267
2267
|
useCases_1.GetAttributeUseCase,
|
|
2268
2268
|
useCases_1.GetAttributesUseCase,
|
|
2269
2269
|
useCases_1.SucceedAttributeUseCase,
|
|
@@ -4618,8 +4618,8 @@ exports.JsonSchema = JsonSchema;
|
|
|
4618
4618
|
"use strict";
|
|
4619
4619
|
|
|
4620
4620
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4621
|
-
exports.
|
|
4622
|
-
exports.LoadPeerTokenRequest = exports.GetTokensRequest = exports.GetTokenRequest = exports.GetQRCodeForTokenRequest = exports.CreateOwnTokenRequest = exports.LoadPeerRelationshipTemplateRequest = exports.GetRelationshipTemplatesRequest = exports.GetRelationshipTemplateRequest = exports.CreateTokenQrCodeForOwnTemplateRequest = exports.CreateTokenForOwnTemplateRequest = exports.CreateOwnRelationshipTemplateRequest = exports.RevokeRelationshipChangeRequest = exports.RejectRelationshipChangeRequest = exports.GetRelationshipsRequest = exports.GetRelationshipByAddressRequest = exports.GetRelationshipRequest = exports.GetAttributesForRelationshipRequest = exports.CreateRelationshipChangeRequest = exports.CreateRelationshipRequest = exports.AcceptRelationshipChangeRequest = exports.SendMessageRequest = exports.GetMessagesRequest = exports.GetMessageRequest = exports.GetAttachmentMetadataRequest = exports.CheckIdentityRequest = exports.UploadOwnFileRequest = exports.LoadPeerFileRequest = exports.LoadPeerFileViaReferenceRequest = exports.LoadPeerFileViaSecretRequest = exports.GetFilesRequest = exports.GetFileRequest = exports.CreateTokenQrCodeForFileRequest = void 0;
|
|
4621
|
+
exports.UpdateDeviceRequest = exports.GetDeviceOnboardingInfoRequest = exports.GetDeviceRequest = exports.DeleteDeviceRequest = exports.CreateDeviceOnboardingTokenRequest = exports.CreateDeviceRequest = exports.ValidateChallengeRequest = exports.CreateChallengeRequest = exports.CreateDeviceChallengeRequest = exports.CreateIdentityChallengeRequest = exports.CreateRelationshipChallengeRequest = exports.SyncEverythingRequest = exports.DownloadAttachmentRequest = exports.DownloadFileRequest = exports.SyncDatawalletRequest = exports.RegisterPushNotificationTokenRequest = exports.UpdateSettingRequest = exports.GetSettingsRequest = exports.GetSettingRequest = exports.DeleteSettingRequest = exports.CreateSettingRequest = exports.SentOutgoingRequestRequest = exports.RequireManualDecisionOfIncomingRequestRequest = exports.ReceivedIncomingRequestRequest = exports.GetOutgoingRequestsRequest = exports.GetOutgoingRequestRequest = exports.GetIncomingRequestsRequest = exports.GetIncomingRequestRequest = exports.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest = exports.CompleteOutgoingRequestRequest = exports.CompleteIncomingRequestRequest = exports.CheckPrerequisitesOfIncomingRequestRequest = exports.RejectIncomingRequestRequest = exports.CreateOutgoingRequestRequest = exports.AcceptIncomingRequestRequest = exports.UpdateDraftRequest = exports.GetDraftsRequest = exports.GetDraftRequest = exports.DeleteDraftRequest = exports.CreateDraftRequest = exports.UpdateAttributeRequest = exports.SucceedAttributeRequest = exports.GetValidAttributesRequest = exports.GetAttributesRequest = exports.GetAttributeRequest = exports.DeleteAttributeRequest = exports.CreateShareAttributeCopyRequest = exports.CreateAttributeRequest = exports.LoadPeerTokenAnonymousByTruncatedReferenceRequest = exports.LoadPeerTokenAnonymousByIdAndKeyRequest = void 0;
|
|
4622
|
+
exports.LoadPeerTokenRequest = exports.GetTokensRequest = exports.GetTokenRequest = exports.GetQRCodeForTokenRequest = exports.CreateOwnTokenRequest = exports.LoadPeerRelationshipTemplateRequest = exports.GetRelationshipTemplatesRequest = exports.GetRelationshipTemplateRequest = exports.CreateTokenQrCodeForOwnTemplateRequest = exports.CreateTokenForOwnTemplateRequest = exports.CreateOwnRelationshipTemplateRequest = exports.RevokeRelationshipChangeRequest = exports.RejectRelationshipChangeRequest = exports.GetRelationshipsRequest = exports.GetRelationshipByAddressRequest = exports.GetRelationshipRequest = exports.GetAttributesForRelationshipRequest = exports.CreateRelationshipChangeRequest = exports.CreateRelationshipRequest = exports.AcceptRelationshipChangeRequest = exports.SendMessageRequest = exports.GetMessagesRequest = exports.GetMessageRequest = exports.GetAttachmentMetadataRequest = exports.CheckIdentityRequest = exports.UploadOwnFileRequest = exports.LoadPeerFileRequest = exports.LoadPeerFileViaReferenceRequest = exports.LoadPeerFileViaSecretRequest = exports.GetFilesRequest = exports.GetFileRequest = exports.CreateTokenQrCodeForFileRequest = exports.CreateTokenForFileRequest = void 0;
|
|
4623
4623
|
exports.LoadPeerTokenAnonymousByIdAndKeyRequest = {
|
|
4624
4624
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4625
4625
|
"$ref": "#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",
|
|
@@ -4877,12 +4877,12 @@ exports.GetAttributesRequest = {
|
|
|
4877
4877
|
"type": "object",
|
|
4878
4878
|
"properties": {
|
|
4879
4879
|
"query": {
|
|
4880
|
-
"$ref": "#/definitions/
|
|
4880
|
+
"$ref": "#/definitions/GetAttributesRequestQuery"
|
|
4881
4881
|
}
|
|
4882
4882
|
},
|
|
4883
4883
|
"additionalProperties": false
|
|
4884
4884
|
},
|
|
4885
|
-
"
|
|
4885
|
+
"GetAttributesRequestQuery": {
|
|
4886
4886
|
"type": "object",
|
|
4887
4887
|
"properties": {
|
|
4888
4888
|
"createdAt": {
|
|
@@ -4964,6 +4964,92 @@ exports.GetAttributesRequest = {
|
|
|
4964
4964
|
}
|
|
4965
4965
|
}
|
|
4966
4966
|
};
|
|
4967
|
+
exports.GetValidAttributesRequest = {
|
|
4968
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4969
|
+
"$ref": "#/definitions/GetValidAttributesRequest",
|
|
4970
|
+
"definitions": {
|
|
4971
|
+
"GetValidAttributesRequest": {
|
|
4972
|
+
"type": "object",
|
|
4973
|
+
"properties": {
|
|
4974
|
+
"query": {
|
|
4975
|
+
"$ref": "#/definitions/GetValidAttributesRequestQuery"
|
|
4976
|
+
}
|
|
4977
|
+
},
|
|
4978
|
+
"additionalProperties": false
|
|
4979
|
+
},
|
|
4980
|
+
"GetValidAttributesRequestQuery": {
|
|
4981
|
+
"type": "object",
|
|
4982
|
+
"properties": {
|
|
4983
|
+
"content": {
|
|
4984
|
+
"type": "object",
|
|
4985
|
+
"properties": {
|
|
4986
|
+
"@type": {
|
|
4987
|
+
"type": "string"
|
|
4988
|
+
},
|
|
4989
|
+
"tags": {
|
|
4990
|
+
"type": "array",
|
|
4991
|
+
"items": {
|
|
4992
|
+
"type": "string"
|
|
4993
|
+
}
|
|
4994
|
+
},
|
|
4995
|
+
"owner": {
|
|
4996
|
+
"type": "string"
|
|
4997
|
+
},
|
|
4998
|
+
"key": {
|
|
4999
|
+
"type": "string"
|
|
5000
|
+
},
|
|
5001
|
+
"isTechnical": {
|
|
5002
|
+
"type": "boolean"
|
|
5003
|
+
},
|
|
5004
|
+
"confidentiality": {
|
|
5005
|
+
"$ref": "#/definitions/RelationshipAttributeConfidentiality"
|
|
5006
|
+
},
|
|
5007
|
+
"value": {
|
|
5008
|
+
"type": "object",
|
|
5009
|
+
"properties": {
|
|
5010
|
+
"@type": {
|
|
5011
|
+
"type": "string"
|
|
5012
|
+
}
|
|
5013
|
+
},
|
|
5014
|
+
"additionalProperties": false
|
|
5015
|
+
}
|
|
5016
|
+
},
|
|
5017
|
+
"additionalProperties": false
|
|
5018
|
+
},
|
|
5019
|
+
"succeeds": {
|
|
5020
|
+
"type": "string"
|
|
5021
|
+
},
|
|
5022
|
+
"succeededBy": {
|
|
5023
|
+
"type": "string"
|
|
5024
|
+
},
|
|
5025
|
+
"shareInfo": {
|
|
5026
|
+
"type": "object",
|
|
5027
|
+
"properties": {
|
|
5028
|
+
"requestReference": {
|
|
5029
|
+
"type": "string"
|
|
5030
|
+
},
|
|
5031
|
+
"peer": {
|
|
5032
|
+
"type": "string"
|
|
5033
|
+
},
|
|
5034
|
+
"sourceAttribute": {
|
|
5035
|
+
"type": "string"
|
|
5036
|
+
}
|
|
5037
|
+
},
|
|
5038
|
+
"additionalProperties": false
|
|
5039
|
+
}
|
|
5040
|
+
},
|
|
5041
|
+
"additionalProperties": {}
|
|
5042
|
+
},
|
|
5043
|
+
"RelationshipAttributeConfidentiality": {
|
|
5044
|
+
"type": "string",
|
|
5045
|
+
"enum": [
|
|
5046
|
+
"public",
|
|
5047
|
+
"private",
|
|
5048
|
+
"protected"
|
|
5049
|
+
]
|
|
5050
|
+
}
|
|
5051
|
+
}
|
|
5052
|
+
};
|
|
4967
5053
|
exports.SucceedAttributeRequest = {
|
|
4968
5054
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4969
5055
|
"$ref": "#/definitions/SucceedAttributeRequest",
|
|
@@ -5996,12 +6082,12 @@ exports.GetIncomingRequestsRequest = {
|
|
|
5996
6082
|
"type": "object",
|
|
5997
6083
|
"properties": {
|
|
5998
6084
|
"query": {
|
|
5999
|
-
"$ref": "#/definitions/
|
|
6085
|
+
"$ref": "#/definitions/GetIncomingRequestsRequestQuery"
|
|
6000
6086
|
}
|
|
6001
6087
|
},
|
|
6002
6088
|
"additionalProperties": false
|
|
6003
6089
|
},
|
|
6004
|
-
"
|
|
6090
|
+
"GetIncomingRequestsRequestQuery": {
|
|
6005
6091
|
"type": "object",
|
|
6006
6092
|
"properties": {
|
|
6007
6093
|
"id": {
|
|
@@ -8155,52 +8241,6 @@ exports.DeleteAttributeUseCase = DeleteAttributeUseCase;
|
|
|
8155
8241
|
|
|
8156
8242
|
/***/ }),
|
|
8157
8243
|
|
|
8158
|
-
/***/ "./dist/useCases/consumption/attributes/GetAllValid.js":
|
|
8159
|
-
/*!*************************************************************!*\
|
|
8160
|
-
!*** ./dist/useCases/consumption/attributes/GetAllValid.js ***!
|
|
8161
|
-
\*************************************************************/
|
|
8162
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
8163
|
-
|
|
8164
|
-
"use strict";
|
|
8165
|
-
|
|
8166
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8167
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8168
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8169
|
-
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;
|
|
8170
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8171
|
-
};
|
|
8172
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8173
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
8174
|
-
};
|
|
8175
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
8176
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
8177
|
-
};
|
|
8178
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8179
|
-
exports.GetAllValidUseCase = void 0;
|
|
8180
|
-
const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
|
|
8181
|
-
const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
|
|
8182
|
-
const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
|
|
8183
|
-
const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
|
|
8184
|
-
const AttributeMapper_1 = __webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consumption/attributes/AttributeMapper.js");
|
|
8185
|
-
let GetAllValidUseCase = class GetAllValidUseCase extends common_1.UseCase {
|
|
8186
|
-
constructor(attributeController) {
|
|
8187
|
-
super();
|
|
8188
|
-
this.attributeController = attributeController;
|
|
8189
|
-
}
|
|
8190
|
-
async executeInternal() {
|
|
8191
|
-
const attributes = await this.attributeController.getValidConsumptionAttributes();
|
|
8192
|
-
return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
|
|
8193
|
-
}
|
|
8194
|
-
};
|
|
8195
|
-
GetAllValidUseCase = __decorate([
|
|
8196
|
-
__param(0, typescript_ioc_1.Inject),
|
|
8197
|
-
__metadata("design:paramtypes", [consumption_1.ConsumptionAttributesController])
|
|
8198
|
-
], GetAllValidUseCase);
|
|
8199
|
-
exports.GetAllValidUseCase = GetAllValidUseCase;
|
|
8200
|
-
//# sourceMappingURL=GetAllValid.js.map
|
|
8201
|
-
|
|
8202
|
-
/***/ }),
|
|
8203
|
-
|
|
8204
8244
|
/***/ "./dist/useCases/consumption/attributes/GetAttribute.js":
|
|
8205
8245
|
/*!**************************************************************!*\
|
|
8206
8246
|
!*** ./dist/useCases/consumption/attributes/GetAttribute.js ***!
|
|
@@ -8301,8 +8341,8 @@ let GetAttributesUseCase = class GetAttributesUseCase extends common_1.UseCase {
|
|
|
8301
8341
|
async executeInternal(request) {
|
|
8302
8342
|
const flattenedQuery = (0, flattenObject_1.flattenObject)(request.query);
|
|
8303
8343
|
const dbQuery = GetAttributesUseCase.queryTranslator.parse(flattenedQuery);
|
|
8304
|
-
const
|
|
8305
|
-
return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(
|
|
8344
|
+
const attributes = await this.attributeController.getConsumptionAttributes(dbQuery);
|
|
8345
|
+
return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
|
|
8306
8346
|
}
|
|
8307
8347
|
};
|
|
8308
8348
|
GetAttributesUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({
|
|
@@ -8411,6 +8451,124 @@ exports.GetAttributesUseCase = GetAttributesUseCase;
|
|
|
8411
8451
|
|
|
8412
8452
|
/***/ }),
|
|
8413
8453
|
|
|
8454
|
+
/***/ "./dist/useCases/consumption/attributes/GetValidAttributes.js":
|
|
8455
|
+
/*!********************************************************************!*\
|
|
8456
|
+
!*** ./dist/useCases/consumption/attributes/GetValidAttributes.js ***!
|
|
8457
|
+
\********************************************************************/
|
|
8458
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
8459
|
+
|
|
8460
|
+
"use strict";
|
|
8461
|
+
|
|
8462
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8463
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8464
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8465
|
+
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;
|
|
8466
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8467
|
+
};
|
|
8468
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8469
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
8470
|
+
};
|
|
8471
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
8472
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
8473
|
+
};
|
|
8474
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8475
|
+
exports.GetValidAttributesUseCase = void 0;
|
|
8476
|
+
const docdb_querytranslator_1 = __webpack_require__(/*! @js-soft/docdb-querytranslator */ "./node_modules/@js-soft/docdb-querytranslator/dist/index.js");
|
|
8477
|
+
const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
|
|
8478
|
+
const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
|
|
8479
|
+
const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
|
|
8480
|
+
const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
|
|
8481
|
+
const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
|
|
8482
|
+
const flattenObject_1 = __webpack_require__(/*! ../requests/flattenObject */ "./dist/useCases/consumption/requests/flattenObject.js");
|
|
8483
|
+
const AttributeMapper_1 = __webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consumption/attributes/AttributeMapper.js");
|
|
8484
|
+
let GetValidAttributesUseCase = class GetValidAttributesUseCase extends common_1.UseCase {
|
|
8485
|
+
constructor(attributeController) {
|
|
8486
|
+
super();
|
|
8487
|
+
this.attributeController = attributeController;
|
|
8488
|
+
}
|
|
8489
|
+
async executeInternal(request) {
|
|
8490
|
+
const flattenedQuery = (0, flattenObject_1.flattenObject)(request.query);
|
|
8491
|
+
const dbQuery = GetValidAttributesUseCase.queryTranslator.parse(flattenedQuery);
|
|
8492
|
+
const attributes = await this.attributeController.getValidConsumptionAttributes(dbQuery);
|
|
8493
|
+
return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
|
|
8494
|
+
}
|
|
8495
|
+
};
|
|
8496
|
+
GetValidAttributesUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({
|
|
8497
|
+
whitelist: {
|
|
8498
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.succeeds)]: true,
|
|
8499
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.succeededBy)]: true,
|
|
8500
|
+
// content.abstractAttribute
|
|
8501
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`]: true,
|
|
8502
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`]: true,
|
|
8503
|
+
// content.identityAttribute
|
|
8504
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: true,
|
|
8505
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`]: true,
|
|
8506
|
+
// content.relationshipAttribute
|
|
8507
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`]: true,
|
|
8508
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`]: true,
|
|
8509
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`]: true,
|
|
8510
|
+
// content.shareInfo
|
|
8511
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: true,
|
|
8512
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`]: true,
|
|
8513
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: true
|
|
8514
|
+
},
|
|
8515
|
+
alias: {
|
|
8516
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.succeeds)]: [(0, ts_simple_nameof_1.nameof)((x) => x.succeeds)],
|
|
8517
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.succeededBy)]: [(0, ts_simple_nameof_1.nameof)((x) => x.succeededBy)],
|
|
8518
|
+
// content.abstractAttribute
|
|
8519
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`]: [
|
|
8520
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`
|
|
8521
|
+
],
|
|
8522
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`]: [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`],
|
|
8523
|
+
// content.identityAttribute
|
|
8524
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: [
|
|
8525
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`
|
|
8526
|
+
],
|
|
8527
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`]: [
|
|
8528
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`
|
|
8529
|
+
],
|
|
8530
|
+
// content.relationshipAttribute
|
|
8531
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`]: [
|
|
8532
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`
|
|
8533
|
+
],
|
|
8534
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`]: [
|
|
8535
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`
|
|
8536
|
+
],
|
|
8537
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`]: [
|
|
8538
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`
|
|
8539
|
+
],
|
|
8540
|
+
// content.shareInfo
|
|
8541
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: [
|
|
8542
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`
|
|
8543
|
+
],
|
|
8544
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`]: [
|
|
8545
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`
|
|
8546
|
+
],
|
|
8547
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: [
|
|
8548
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`
|
|
8549
|
+
]
|
|
8550
|
+
},
|
|
8551
|
+
custom: {
|
|
8552
|
+
// content.tags
|
|
8553
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: (query, input) => {
|
|
8554
|
+
const allowedTags = [];
|
|
8555
|
+
for (const tag of input) {
|
|
8556
|
+
const tagQuery = { [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: { $contains: tag } };
|
|
8557
|
+
allowedTags.push(tagQuery);
|
|
8558
|
+
}
|
|
8559
|
+
query["$or"] = allowedTags;
|
|
8560
|
+
}
|
|
8561
|
+
}
|
|
8562
|
+
});
|
|
8563
|
+
GetValidAttributesUseCase = __decorate([
|
|
8564
|
+
__param(0, typescript_ioc_1.Inject),
|
|
8565
|
+
__metadata("design:paramtypes", [consumption_1.ConsumptionAttributesController])
|
|
8566
|
+
], GetValidAttributesUseCase);
|
|
8567
|
+
exports.GetValidAttributesUseCase = GetValidAttributesUseCase;
|
|
8568
|
+
//# sourceMappingURL=GetValidAttributes.js.map
|
|
8569
|
+
|
|
8570
|
+
/***/ }),
|
|
8571
|
+
|
|
8414
8572
|
/***/ "./dist/useCases/consumption/attributes/SucceedAttribute.js":
|
|
8415
8573
|
/*!******************************************************************!*\
|
|
8416
8574
|
!*** ./dist/useCases/consumption/attributes/SucceedAttribute.js ***!
|
|
@@ -8570,9 +8728,9 @@ __exportStar(__webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consu
|
|
|
8570
8728
|
__exportStar(__webpack_require__(/*! ./CreateAttribute */ "./dist/useCases/consumption/attributes/CreateAttribute.js"), exports);
|
|
8571
8729
|
__exportStar(__webpack_require__(/*! ./CreateShareAttributeCopy */ "./dist/useCases/consumption/attributes/CreateShareAttributeCopy.js"), exports);
|
|
8572
8730
|
__exportStar(__webpack_require__(/*! ./DeleteAttribute */ "./dist/useCases/consumption/attributes/DeleteAttribute.js"), exports);
|
|
8573
|
-
__exportStar(__webpack_require__(/*! ./GetAllValid */ "./dist/useCases/consumption/attributes/GetAllValid.js"), exports);
|
|
8574
8731
|
__exportStar(__webpack_require__(/*! ./GetAttribute */ "./dist/useCases/consumption/attributes/GetAttribute.js"), exports);
|
|
8575
8732
|
__exportStar(__webpack_require__(/*! ./GetAttributes */ "./dist/useCases/consumption/attributes/GetAttributes.js"), exports);
|
|
8733
|
+
__exportStar(__webpack_require__(/*! ./GetValidAttributes */ "./dist/useCases/consumption/attributes/GetValidAttributes.js"), exports);
|
|
8576
8734
|
__exportStar(__webpack_require__(/*! ./SucceedAttribute */ "./dist/useCases/consumption/attributes/SucceedAttribute.js"), exports);
|
|
8577
8735
|
__exportStar(__webpack_require__(/*! ./UpdateAttribute */ "./dist/useCases/consumption/attributes/UpdateAttribute.js"), exports);
|
|
8578
8736
|
//# sourceMappingURL=index.js.map
|