@nmshd/content 2.0.0-alpha.31 → 2.0.0-alpha.34
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/attributes/hints/RelationshipAttributeHints.d.ts +1 -1
- package/dist/attributes/hints/RelationshipAttributeHints.js +1 -1
- package/dist/attributes/hints/RelationshipAttributeHints.js.map +1 -1
- package/dist/buildInformation.js +4 -4
- package/dist/requests/RequestItemGroup.js +2 -1
- package/dist/requests/RequestItemGroup.js.map +1 -1
- package/dist/requests/items/proposeAttribute/ProposeAttributeAcceptResponseItem.d.ts +3 -3
- package/dist/requests/items/proposeAttribute/ProposeAttributeAcceptResponseItem.js +1 -1
- package/dist/requests/items/proposeAttribute/ProposeAttributeAcceptResponseItem.js.map +1 -1
- package/dist/requests/items/proposeAttribute/ProposeAttributeRequestItem.d.ts +2 -0
- package/dist/requests/items/proposeAttribute/ProposeAttributeRequestItem.js +20 -2
- package/dist/requests/items/proposeAttribute/ProposeAttributeRequestItem.js.map +1 -1
- package/lib-web/nmshd.content.js +95 -9
- package/lib-web/nmshd.content.min.js +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ export declare class RelationshipAttributeCreationHints extends Serializable imp
|
|
|
24
24
|
title: string;
|
|
25
25
|
description?: string;
|
|
26
26
|
valueHints?: ValueHints;
|
|
27
|
-
isTechnical
|
|
27
|
+
isTechnical?: boolean;
|
|
28
28
|
confidentiality: RelationshipAttributeConfidentiality;
|
|
29
29
|
static from(value: IRelationshipAttributeCreationHints | RelationshipAttributeCreationHintsJSON): RelationshipAttributeCreationHints;
|
|
30
30
|
}
|
|
@@ -45,7 +45,7 @@ __decorate([
|
|
|
45
45
|
__decorate([
|
|
46
46
|
(0, ts_serval_1.serialize)(),
|
|
47
47
|
(0, ts_serval_1.validate)({ nullable: true }),
|
|
48
|
-
__metadata("design:type",
|
|
48
|
+
__metadata("design:type", Boolean)
|
|
49
49
|
], RelationshipAttributeCreationHints.prototype, "isTechnical", void 0);
|
|
50
50
|
__decorate([
|
|
51
51
|
(0, ts_serval_1.serialize)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipAttributeHints.js","sourceRoot":"","sources":["../../../src/attributes/hints/RelationshipAttributeHints.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAC3F,oEAA+E;AAC/E,6CAAsE;AAkBtE;;;;GAIG;AAEH,IAAa,kCAAkC,GAA/C,MAAa,kCAAmC,SAAQ,wBAAY;IAApE;;QAeW,gBAAW,
|
|
1
|
+
{"version":3,"file":"RelationshipAttributeHints.js","sourceRoot":"","sources":["../../../src/attributes/hints/RelationshipAttributeHints.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAC3F,oEAA+E;AAC/E,6CAAsE;AAkBtE;;;;GAIG;AAEH,IAAa,kCAAkC,GAA/C,MAAa,kCAAmC,SAAQ,wBAAY;IAApE;;QAeW,gBAAW,GAAa,KAAK,CAAA;IAgBxC,CAAC;IALU,MAAM,CAAC,IAAI,CACd,KAAmF;QAEnF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AA5BG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;iEACS;AAIpB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uEACF;AAI3B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACT,uBAAU;sEAAA;AAI9B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uEACO;AASpC;IAPC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CACnB,CAAC,MAAM,CAAC,MAAM,CAAC,4DAAoC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5D,CAAC,CAAC,mBAAmB,MAAM,CAAC,MAAM,CAAC,4DAAoC,CAAC,EAAE;YAC1E,CAAC,CAAC,SAAS;KACtB,CAAC;;2EAC0D;AAxBnD,kCAAkC;IAD9C,IAAA,gBAAI,EAAC,4BAA4B,CAAC;GACtB,kCAAkC,CA+B9C;AA/BY,gFAAkC"}
|
package/dist/buildInformation.js
CHANGED
|
@@ -5,10 +5,10 @@ const ts_serval_1 = require("@js-soft/ts-serval");
|
|
|
5
5
|
const crypto_1 = require("@nmshd/crypto");
|
|
6
6
|
const transport_1 = require("@nmshd/transport");
|
|
7
7
|
exports.buildInformation = {
|
|
8
|
-
version: "2.0.0-alpha.
|
|
9
|
-
build: "
|
|
10
|
-
date: "2022-06-
|
|
11
|
-
commit: "
|
|
8
|
+
version: "2.0.0-alpha.34",
|
|
9
|
+
build: "64",
|
|
10
|
+
date: "2022-06-10T13:31:36+00:00",
|
|
11
|
+
commit: "9b6c65f0648fc110c4b010147ad54f59d972436d",
|
|
12
12
|
dependencies: {"@js-soft/logging-abstractions":"^1.0.0"},
|
|
13
13
|
libraries: {
|
|
14
14
|
serval: ts_serval_1.buildInformation,
|
|
@@ -12,6 +12,7 @@ var RequestItemGroup_1;
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.RequestItemGroup = void 0;
|
|
14
14
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
+
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
15
16
|
let RequestItemGroup = RequestItemGroup_1 = class RequestItemGroup extends ts_serval_1.Serializable {
|
|
16
17
|
static from(value) {
|
|
17
18
|
return this.fromAny(value);
|
|
@@ -20,7 +21,7 @@ let RequestItemGroup = RequestItemGroup_1 = class RequestItemGroup extends ts_se
|
|
|
20
21
|
if (!(value instanceof RequestItemGroup_1))
|
|
21
22
|
throw new Error("this should never happen");
|
|
22
23
|
if (value.mustBeAccepted && value.items.every((item) => !item.mustBeAccepted)) {
|
|
23
|
-
throw new ts_serval_1.ValidationError(
|
|
24
|
+
throw new ts_serval_1.ValidationError(RequestItemGroup_1.name, (0, ts_simple_nameof_1.nameof)((x) => x.mustBeAccepted), `${(0, ts_simple_nameof_1.nameof)((x) => x.mustBeAccepted)} can only be true if at least one item is flagged as ${(0, ts_simple_nameof_1.nameof)((x) => x.mustBeAccepted)}`);
|
|
24
25
|
}
|
|
25
26
|
return value;
|
|
26
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestItemGroup.js","sourceRoot":"","sources":["../../src/requests/RequestItemGroup.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA4G;
|
|
1
|
+
{"version":3,"file":"RequestItemGroup.js","sourceRoot":"","sources":["../../src/requests/RequestItemGroup.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA4G;AAC5G,uDAAyC;AAuFzC,IAAa,gBAAgB,wBAA7B,MAAa,gBAAiB,SAAQ,wBAAY;IAqBvC,MAAM,CAAC,IAAI,CAAC,KAA+C;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;IAES,MAAM,CAAU,QAAQ,CAAyB,KAAQ;QAC/D,IAAI,CAAC,CAAC,KAAK,YAAY,kBAAgB,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QAErF,IAAI,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE;YAC3E,MAAM,IAAI,2BAAe,CACrB,kBAAgB,CAAC,IAAI,EACrB,IAAA,yBAAM,EAAmB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,EACjD,GAAG,IAAA,yBAAM,EACL,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAC1B,wDAAwD,IAAA,yBAAM,EAC3D,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAC1B,EAAE,CACN,CAAA;SACJ;QAED,OAAO,KAAK,CAAA;IAChB,CAAC;CACJ,CAAA;AAvCG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACR;AAIrB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACF;AAI3B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;wDACmB;AAI9B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC;;+CAC3D;AAI3B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACG;AAnBvB,gBAAgB;IAD5B,IAAA,gBAAI,EAAC,kBAAkB,CAAC;GACZ,gBAAgB,CA0C5B;AA1CY,4CAAgB"}
|
|
@@ -3,14 +3,14 @@ import { IdentityAttribute, IdentityAttributeJSON, IIdentityAttribute, IRelation
|
|
|
3
3
|
import { AcceptResponseItem, AcceptResponseItemJSON, IAcceptResponseItem } from "../../response";
|
|
4
4
|
export interface ProposeAttributeAcceptResponseItemJSON extends AcceptResponseItemJSON {
|
|
5
5
|
attributeId: string;
|
|
6
|
-
attribute
|
|
6
|
+
attribute: IdentityAttributeJSON | RelationshipAttributeJSON;
|
|
7
7
|
}
|
|
8
8
|
export interface IProposeAttributeAcceptResponseItem extends IAcceptResponseItem {
|
|
9
9
|
attributeId: ICoreId;
|
|
10
|
-
attribute
|
|
10
|
+
attribute: IIdentityAttribute | IRelationshipAttribute;
|
|
11
11
|
}
|
|
12
12
|
export declare class ProposeAttributeAcceptResponseItem extends AcceptResponseItem implements IProposeAttributeAcceptResponseItem {
|
|
13
13
|
attributeId: CoreId;
|
|
14
|
-
attribute
|
|
14
|
+
attribute: IdentityAttribute | RelationshipAttribute;
|
|
15
15
|
static from(value: IProposeAttributeAcceptResponseItem | ProposeAttributeAcceptResponseItemJSON): ProposeAttributeAcceptResponseItem;
|
|
16
16
|
}
|
|
@@ -26,7 +26,7 @@ __decorate([
|
|
|
26
26
|
], ProposeAttributeAcceptResponseItem.prototype, "attributeId", void 0);
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttribute, attributes_1.RelationshipAttribute] }),
|
|
29
|
-
(0, ts_serval_1.validate)(
|
|
29
|
+
(0, ts_serval_1.validate)(),
|
|
30
30
|
__metadata("design:type", Object)
|
|
31
31
|
], ProposeAttributeAcceptResponseItem.prototype, "attribute", void 0);
|
|
32
32
|
ProposeAttributeAcceptResponseItem = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProposeAttributeAcceptResponseItem.js","sourceRoot":"","sources":["../../../../src/requests/items/proposeAttribute/ProposeAttributeAcceptResponseItem.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,gDAAkD;AAClD,oDAO4B;AAC5B,6CAAgG;AAahG,IAAa,kCAAkC,GAA/C,MAAa,kCACT,SAAQ,6BAAkB;IAWnB,MAAM,CAAU,IAAI,CACvB,KAAmF;QAEnF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAXG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACS,kBAAM;uEAAA;AAI1B;IAFC,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,8BAAiB,EAAE,kCAAqB,CAAC,EAAE,CAAC;IACrE,IAAA,oBAAQ,
|
|
1
|
+
{"version":3,"file":"ProposeAttributeAcceptResponseItem.js","sourceRoot":"","sources":["../../../../src/requests/items/proposeAttribute/ProposeAttributeAcceptResponseItem.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,gDAAkD;AAClD,oDAO4B;AAC5B,6CAAgG;AAahG,IAAa,kCAAkC,GAA/C,MAAa,kCACT,SAAQ,6BAAkB;IAWnB,MAAM,CAAU,IAAI,CACvB,KAAmF;QAEnF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAXG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACS,kBAAM;uEAAA;AAI1B;IAFC,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,8BAAiB,EAAE,kCAAqB,CAAC,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;;qEACgD;AAVlD,kCAAkC;IAD9C,IAAA,gBAAI,EAAC,oCAAoC,CAAC;GAC9B,kCAAkC,CAiB9C;AAjBY,gFAAkC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Serializable } from "@js-soft/ts-serval";
|
|
1
2
|
import { IdentityAttribute, IdentityAttributeJSON, IdentityAttributeQuery, IdentityAttributeQueryJSON, IIdentityAttribute, IIdentityAttributeQuery, IRelationshipAttribute, IRelationshipAttributeQuery, RelationshipAttribute, RelationshipAttributeJSON, RelationshipAttributeQuery, RelationshipAttributeQueryJSON } from "../../../attributes";
|
|
2
3
|
import { IRequestItem, RequestItem, RequestItemJSON } from "../../RequestItem";
|
|
3
4
|
export interface ProposeAttributeRequestItemJSON extends RequestItemJSON {
|
|
@@ -12,4 +13,5 @@ export declare class ProposeAttributeRequestItem extends RequestItem implements
|
|
|
12
13
|
query: IdentityAttributeQuery | RelationshipAttributeQuery;
|
|
13
14
|
attribute: IdentityAttribute | RelationshipAttribute;
|
|
14
15
|
static from(value: IProposeAttributeRequestItem): ProposeAttributeRequestItem;
|
|
16
|
+
protected static postFrom<T extends Serializable>(value: T): T;
|
|
15
17
|
}
|
|
@@ -8,15 +8,33 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var ProposeAttributeRequestItem_1;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.ProposeAttributeRequestItem = void 0;
|
|
13
14
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
+
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
14
16
|
const attributes_1 = require("../../../attributes");
|
|
15
17
|
const RequestItem_1 = require("../../RequestItem");
|
|
16
|
-
let ProposeAttributeRequestItem = class ProposeAttributeRequestItem extends RequestItem_1.RequestItem {
|
|
18
|
+
let ProposeAttributeRequestItem = ProposeAttributeRequestItem_1 = class ProposeAttributeRequestItem extends RequestItem_1.RequestItem {
|
|
17
19
|
static from(value) {
|
|
18
20
|
return this.fromAny(value);
|
|
19
21
|
}
|
|
22
|
+
static postFrom(value) {
|
|
23
|
+
if (!(value instanceof ProposeAttributeRequestItem_1))
|
|
24
|
+
throw new Error("this should never happen");
|
|
25
|
+
const attributeValueType = value.attribute.value.toJSON()["@type"];
|
|
26
|
+
const queryValueType = value.query.valueType;
|
|
27
|
+
if (attributeValueType !== queryValueType) {
|
|
28
|
+
throw new ts_serval_1.ValidationError(ProposeAttributeRequestItem_1.name, `${(0, ts_simple_nameof_1.nameof)((x) => x.query)}.${(0, ts_simple_nameof_1.nameof)((x) => x.valueType)}`, `You cannot propose an Attribute whose type of the value ('${attributeValueType}') is different from the value type of the query ('${queryValueType}').`);
|
|
29
|
+
}
|
|
30
|
+
if (value.attribute instanceof attributes_1.RelationshipAttribute && !(value.query instanceof attributes_1.RelationshipAttributeQuery)) {
|
|
31
|
+
throw new ts_serval_1.ValidationError(ProposeAttributeRequestItem_1.name, "", "When proposing a RelationshipAttribute, the corresponding query has to be a RelationshipAttributeQuery.");
|
|
32
|
+
}
|
|
33
|
+
if (value.attribute instanceof attributes_1.IdentityAttribute && !(value.query instanceof attributes_1.IdentityAttributeQuery)) {
|
|
34
|
+
throw new ts_serval_1.ValidationError(ProposeAttributeRequestItem_1.name, "", "When proposing an IdentityAttribute, the corresponding query has to be a IdentityAttributeQuery.");
|
|
35
|
+
}
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
20
38
|
};
|
|
21
39
|
__decorate([
|
|
22
40
|
(0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttributeQuery, attributes_1.RelationshipAttributeQuery] }),
|
|
@@ -28,7 +46,7 @@ __decorate([
|
|
|
28
46
|
(0, ts_serval_1.validate)(),
|
|
29
47
|
__metadata("design:type", Object)
|
|
30
48
|
], ProposeAttributeRequestItem.prototype, "attribute", void 0);
|
|
31
|
-
ProposeAttributeRequestItem = __decorate([
|
|
49
|
+
ProposeAttributeRequestItem = ProposeAttributeRequestItem_1 = __decorate([
|
|
32
50
|
(0, ts_serval_1.type)("ProposeAttributeRequestItem")
|
|
33
51
|
], ProposeAttributeRequestItem);
|
|
34
52
|
exports.ProposeAttributeRequestItem = ProposeAttributeRequestItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProposeAttributeRequestItem.js","sourceRoot":"","sources":["../../../../src/requests/items/proposeAttribute/ProposeAttributeRequestItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProposeAttributeRequestItem.js","sourceRoot":"","sources":["../../../../src/requests/items/proposeAttribute/ProposeAttributeRequestItem.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA6F;AAC7F,uDAAyC;AACzC,oDAc4B;AAC5B,mDAA8E;AAa9E,IAAa,2BAA2B,mCAAxC,MAAa,2BAA4B,SAAQ,yBAAW;IASjD,MAAM,CAAC,IAAI,CAAC,KAAmC;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;IAES,MAAM,CAAU,QAAQ,CAAyB,KAAQ;QAC/D,IAAI,CAAC,CAAC,KAAK,YAAY,6BAA2B,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QAEhG,MAAM,kBAAkB,GAAI,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAU,CAAC,OAAO,CAAC,CAAA;QAC3E,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAA;QAE5C,IAAI,kBAAkB,KAAK,cAAc,EAAE;YACvC,MAAM,IAAI,2BAAe,CACrB,6BAA2B,CAAC,IAAI,EAChC,GAAG,IAAA,yBAAM,EAA8B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAA,yBAAM,EAC5D,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACrB,EAAE,EACH,6DAA6D,kBAAkB,sDAAsD,cAAc,KAAK,CAC3J,CAAA;SACJ;QAED,IAAI,KAAK,CAAC,SAAS,YAAY,kCAAqB,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,YAAY,uCAA0B,CAAC,EAAE;YAC1G,MAAM,IAAI,2BAAe,CACrB,6BAA2B,CAAC,IAAI,EAChC,EAAE,EACF,yGAAyG,CAC5G,CAAA;SACJ;QAED,IAAI,KAAK,CAAC,SAAS,YAAY,8BAAiB,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,YAAY,mCAAsB,CAAC,EAAE;YAClG,MAAM,IAAI,2BAAe,CACrB,6BAA2B,CAAC,IAAI,EAChC,EAAE,EACF,kGAAkG,CACrG,CAAA;SACJ;QAED,OAAO,KAAK,CAAA;IAChB,CAAC;CACJ,CAAA;AA5CG;IAFC,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,mCAAsB,EAAE,uCAA0B,CAAC,EAAE,CAAC;IAC/E,IAAA,oBAAQ,GAAE;;0DACsD;AAIjE;IAFC,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,8BAAiB,EAAE,kCAAqB,CAAC,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;;8DACgD;AAPlD,2BAA2B;IADvC,IAAA,gBAAI,EAAC,6BAA6B,CAAC;GACvB,2BAA2B,CA+CvC;AA/CY,kEAA2B"}
|
package/lib-web/nmshd.content.js
CHANGED
|
@@ -1448,7 +1448,7 @@ __decorate([
|
|
|
1448
1448
|
__decorate([
|
|
1449
1449
|
(0, ts_serval_1.serialize)(),
|
|
1450
1450
|
(0, ts_serval_1.validate)({ nullable: true }),
|
|
1451
|
-
__metadata("design:type",
|
|
1451
|
+
__metadata("design:type", Boolean)
|
|
1452
1452
|
], RelationshipAttributeCreationHints.prototype, "isTechnical", void 0);
|
|
1453
1453
|
__decorate([
|
|
1454
1454
|
(0, ts_serval_1.serialize)(),
|
|
@@ -4929,10 +4929,10 @@ const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-s
|
|
|
4929
4929
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
4930
4930
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
4931
4931
|
exports.buildInformation = {
|
|
4932
|
-
version: "2.0.0-alpha.
|
|
4933
|
-
build: "
|
|
4934
|
-
date: "2022-06-
|
|
4935
|
-
commit: "
|
|
4932
|
+
version: "2.0.0-alpha.34",
|
|
4933
|
+
build: "64",
|
|
4934
|
+
date: "2022-06-10T13:31:36+00:00",
|
|
4935
|
+
commit: "9b6c65f0648fc110c4b010147ad54f59d972436d",
|
|
4936
4936
|
dependencies: {"@js-soft/logging-abstractions":"^1.0.0"},
|
|
4937
4937
|
libraries: {
|
|
4938
4938
|
serval: ts_serval_1.buildInformation,
|
|
@@ -5774,6 +5774,7 @@ var RequestItemGroup_1;
|
|
|
5774
5774
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5775
5775
|
exports.RequestItemGroup = void 0;
|
|
5776
5776
|
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
5777
|
+
const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
|
|
5777
5778
|
let RequestItemGroup = RequestItemGroup_1 = class RequestItemGroup extends ts_serval_1.Serializable {
|
|
5778
5779
|
static from(value) {
|
|
5779
5780
|
return this.fromAny(value);
|
|
@@ -5782,7 +5783,7 @@ let RequestItemGroup = RequestItemGroup_1 = class RequestItemGroup extends ts_se
|
|
|
5782
5783
|
if (!(value instanceof RequestItemGroup_1))
|
|
5783
5784
|
throw new Error("this should never happen");
|
|
5784
5785
|
if (value.mustBeAccepted && value.items.every((item) => !item.mustBeAccepted)) {
|
|
5785
|
-
throw new ts_serval_1.ValidationError(
|
|
5786
|
+
throw new ts_serval_1.ValidationError(RequestItemGroup_1.name, (0, ts_simple_nameof_1.nameof)((x) => x.mustBeAccepted), `${(0, ts_simple_nameof_1.nameof)((x) => x.mustBeAccepted)} can only be true if at least one item is flagged as ${(0, ts_simple_nameof_1.nameof)((x) => x.mustBeAccepted)}`);
|
|
5786
5787
|
}
|
|
5787
5788
|
return value;
|
|
5788
5789
|
}
|
|
@@ -5997,7 +5998,7 @@ __decorate([
|
|
|
5997
5998
|
], ProposeAttributeAcceptResponseItem.prototype, "attributeId", void 0);
|
|
5998
5999
|
__decorate([
|
|
5999
6000
|
(0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttribute, attributes_1.RelationshipAttribute] }),
|
|
6000
|
-
(0, ts_serval_1.validate)(
|
|
6001
|
+
(0, ts_serval_1.validate)(),
|
|
6001
6002
|
__metadata("design:type", Object)
|
|
6002
6003
|
], ProposeAttributeAcceptResponseItem.prototype, "attribute", void 0);
|
|
6003
6004
|
ProposeAttributeAcceptResponseItem = __decorate([
|
|
@@ -6024,15 +6025,33 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6024
6025
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
6025
6026
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
6026
6027
|
};
|
|
6028
|
+
var ProposeAttributeRequestItem_1;
|
|
6027
6029
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6028
6030
|
exports.ProposeAttributeRequestItem = void 0;
|
|
6029
6031
|
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
6032
|
+
const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
|
|
6030
6033
|
const attributes_1 = __webpack_require__(/*! ../../../attributes */ "./dist/attributes/index.js");
|
|
6031
6034
|
const RequestItem_1 = __webpack_require__(/*! ../../RequestItem */ "./dist/requests/RequestItem.js");
|
|
6032
|
-
let ProposeAttributeRequestItem = class ProposeAttributeRequestItem extends RequestItem_1.RequestItem {
|
|
6035
|
+
let ProposeAttributeRequestItem = ProposeAttributeRequestItem_1 = class ProposeAttributeRequestItem extends RequestItem_1.RequestItem {
|
|
6033
6036
|
static from(value) {
|
|
6034
6037
|
return this.fromAny(value);
|
|
6035
6038
|
}
|
|
6039
|
+
static postFrom(value) {
|
|
6040
|
+
if (!(value instanceof ProposeAttributeRequestItem_1))
|
|
6041
|
+
throw new Error("this should never happen");
|
|
6042
|
+
const attributeValueType = value.attribute.value.toJSON()["@type"];
|
|
6043
|
+
const queryValueType = value.query.valueType;
|
|
6044
|
+
if (attributeValueType !== queryValueType) {
|
|
6045
|
+
throw new ts_serval_1.ValidationError(ProposeAttributeRequestItem_1.name, `${(0, ts_simple_nameof_1.nameof)((x) => x.query)}.${(0, ts_simple_nameof_1.nameof)((x) => x.valueType)}`, `You cannot propose an Attribute whose type of the value ('${attributeValueType}') is different from the value type of the query ('${queryValueType}').`);
|
|
6046
|
+
}
|
|
6047
|
+
if (value.attribute instanceof attributes_1.RelationshipAttribute && !(value.query instanceof attributes_1.RelationshipAttributeQuery)) {
|
|
6048
|
+
throw new ts_serval_1.ValidationError(ProposeAttributeRequestItem_1.name, "", "When proposing a RelationshipAttribute, the corresponding query has to be a RelationshipAttributeQuery.");
|
|
6049
|
+
}
|
|
6050
|
+
if (value.attribute instanceof attributes_1.IdentityAttribute && !(value.query instanceof attributes_1.IdentityAttributeQuery)) {
|
|
6051
|
+
throw new ts_serval_1.ValidationError(ProposeAttributeRequestItem_1.name, "", "When proposing an IdentityAttribute, the corresponding query has to be a IdentityAttributeQuery.");
|
|
6052
|
+
}
|
|
6053
|
+
return value;
|
|
6054
|
+
}
|
|
6036
6055
|
};
|
|
6037
6056
|
__decorate([
|
|
6038
6057
|
(0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttributeQuery, attributes_1.RelationshipAttributeQuery] }),
|
|
@@ -6044,7 +6063,7 @@ __decorate([
|
|
|
6044
6063
|
(0, ts_serval_1.validate)(),
|
|
6045
6064
|
__metadata("design:type", Object)
|
|
6046
6065
|
], ProposeAttributeRequestItem.prototype, "attribute", void 0);
|
|
6047
|
-
ProposeAttributeRequestItem = __decorate([
|
|
6066
|
+
ProposeAttributeRequestItem = ProposeAttributeRequestItem_1 = __decorate([
|
|
6048
6067
|
(0, ts_serval_1.type)("ProposeAttributeRequestItem")
|
|
6049
6068
|
], ProposeAttributeRequestItem);
|
|
6050
6069
|
exports.ProposeAttributeRequestItem = ProposeAttributeRequestItem;
|
|
@@ -15175,6 +15194,73 @@ exports.Zone = Zone;
|
|
|
15175
15194
|
//# sourceMappingURL=luxon.js.map
|
|
15176
15195
|
|
|
15177
15196
|
|
|
15197
|
+
/***/ }),
|
|
15198
|
+
|
|
15199
|
+
/***/ "./node_modules/ts-simple-nameof/index.js":
|
|
15200
|
+
/*!************************************************!*\
|
|
15201
|
+
!*** ./node_modules/ts-simple-nameof/index.js ***!
|
|
15202
|
+
\************************************************/
|
|
15203
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
15204
|
+
|
|
15205
|
+
|
|
15206
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
15207
|
+
exports.nameof = void 0;
|
|
15208
|
+
var nameof_1 = __webpack_require__(/*! ./src/nameof */ "./node_modules/ts-simple-nameof/src/nameof.js");
|
|
15209
|
+
Object.defineProperty(exports, "nameof", ({ enumerable: true, get: function () { return nameof_1.nameof; } }));
|
|
15210
|
+
|
|
15211
|
+
|
|
15212
|
+
/***/ }),
|
|
15213
|
+
|
|
15214
|
+
/***/ "./node_modules/ts-simple-nameof/src/nameof.js":
|
|
15215
|
+
/*!*****************************************************!*\
|
|
15216
|
+
!*** ./node_modules/ts-simple-nameof/src/nameof.js ***!
|
|
15217
|
+
\*****************************************************/
|
|
15218
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
15219
|
+
|
|
15220
|
+
|
|
15221
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
15222
|
+
exports.nameof = void 0;
|
|
15223
|
+
function cleanseAssertionOperators(parsedName) {
|
|
15224
|
+
return parsedName.replace(/[?!]/g, "");
|
|
15225
|
+
}
|
|
15226
|
+
function nameof(nameFunction, options) {
|
|
15227
|
+
var fnStr = nameFunction.toString();
|
|
15228
|
+
// ES6 class name:
|
|
15229
|
+
// "class ClassName { ..."
|
|
15230
|
+
if (fnStr.startsWith("class ")
|
|
15231
|
+
// Theoretically could, for some ill-advised reason, be "class => class.prop".
|
|
15232
|
+
&& !fnStr.startsWith("class =>")) {
|
|
15233
|
+
return cleanseAssertionOperators(fnStr.substring("class ".length, fnStr.indexOf(" {")));
|
|
15234
|
+
}
|
|
15235
|
+
// ES6 prop selector:
|
|
15236
|
+
// "x => x.prop"
|
|
15237
|
+
if (fnStr.includes("=>")) {
|
|
15238
|
+
return cleanseAssertionOperators(fnStr.substring(fnStr.indexOf(".") + 1));
|
|
15239
|
+
}
|
|
15240
|
+
// ES5 prop selector:
|
|
15241
|
+
// "function (x) { return x.prop; }"
|
|
15242
|
+
// webpack production build excludes the spaces and optional trailing semicolon:
|
|
15243
|
+
// "function(x){return x.prop}"
|
|
15244
|
+
// FYI - during local dev testing i observed carriage returns after the curly brackets as well
|
|
15245
|
+
// Note by maintainer: See https://github.com/IRCraziestTaxi/ts-simple-nameof/pull/13#issuecomment-567171802 for explanation of this regex.
|
|
15246
|
+
var matchRegex = /function\s*\(\w+\)\s*\{[\r\n\s]*return\s+\w+\.((\w+\.)*(\w+))/i;
|
|
15247
|
+
var es5Match = fnStr.match(matchRegex);
|
|
15248
|
+
if (es5Match) {
|
|
15249
|
+
return (options && options.lastProp)
|
|
15250
|
+
? es5Match[3]
|
|
15251
|
+
: es5Match[1];
|
|
15252
|
+
}
|
|
15253
|
+
// ES5 class name:
|
|
15254
|
+
// "function ClassName() { ..."
|
|
15255
|
+
if (fnStr.startsWith("function ")) {
|
|
15256
|
+
return cleanseAssertionOperators(fnStr.substring("function ".length, fnStr.indexOf("(")));
|
|
15257
|
+
}
|
|
15258
|
+
// Invalid function.
|
|
15259
|
+
throw new Error("ts-simple-nameof: Invalid function.");
|
|
15260
|
+
}
|
|
15261
|
+
exports.nameof = nameof;
|
|
15262
|
+
|
|
15263
|
+
|
|
15178
15264
|
/***/ }),
|
|
15179
15265
|
|
|
15180
15266
|
/***/ "@nmshd/crypto":
|