@nmshd/content 2.0.0-alpha.20 → 2.0.0-alpha.23

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.
@@ -11,7 +11,7 @@ export interface IAbstractAttributeQuery extends ICoreSerializable {
11
11
  validTo?: ICoreDate;
12
12
  }
13
13
  export declare abstract class AbstractAttributeQuery extends CoreSerializable implements IAbstractAttributeQuery {
14
- valueType: string;
14
+ valueType?: string;
15
15
  validFrom?: CoreDate;
16
16
  validTo?: CoreDate;
17
17
  }
@@ -17,7 +17,8 @@ class AbstractAttributeQuery extends transport_1.CoreSerializable {
17
17
  __decorate([
18
18
  (0, ts_serval_1.serialize)(),
19
19
  (0, ts_serval_1.validate)({
20
- customValidator: (v) => (v === "" ? "must not be an empty string" : undefined)
20
+ customValidator: (v) => (v === "" ? "must not be an empty string" : undefined),
21
+ nullable: true
21
22
  }),
22
23
  __metadata("design:type", String)
23
24
  ], AbstractAttributeQuery.prototype, "valueType", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractAttributeQuery.js","sourceRoot":"","sources":["../../src/attributes/AbstractAttributeQuery.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAwD;AACxD,gDAA2F;AAe3F,MAAsB,sBAAuB,SAAQ,4BAAgB;CAcpE;AATG;IAJC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,SAAS,CAAC;KACjF,CAAC;;yDACsB;AAIxB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACV,oBAAQ;yDAAA;AAI3B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACZ,oBAAQ;uDAAA;AAb7B,wDAcC"}
1
+ {"version":3,"file":"AbstractAttributeQuery.js","sourceRoot":"","sources":["../../src/attributes/AbstractAttributeQuery.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAwD;AACxD,gDAA2F;AAe3F,MAAsB,sBAAuB,SAAQ,4BAAgB;CAepE;AATG;IALC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,SAAS,CAAC;QAC9E,QAAQ,EAAE,IAAI;KACjB,CAAC;;yDACuB;AAIzB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACV,oBAAQ;yDAAA;AAI3B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACZ,oBAAQ;uDAAA;AAd7B,wDAeC"}
@@ -47,5 +47,6 @@ export declare class RelationshipAttribute<TValueClass extends AbstractAttribute
47
47
  key: string;
48
48
  isTechnical: boolean;
49
49
  confidentiality: RelationshipAttributeConfidentiality;
50
+ protected static preFrom(value: any): any;
50
51
  static from<TValueClass extends AbstractAttributeValue = AbstractAttributeValue, TValueInterface extends IAbstractAttributeValue = IAbstractAttributeValue, TValueJSONInterface extends AbstractAttributeValueJSON = AbstractAttributeValueJSON>(value: IRelationshipAttribute<TValueInterface> | RelationshipAttributeJSON<TValueJSONInterface>): RelationshipAttribute<TValueClass>;
51
52
  }
@@ -45,9 +45,10 @@ var RelationshipAttributeConfidentiality;
45
45
  RelationshipAttributeConfidentiality["Protected"] = "protected";
46
46
  })(RelationshipAttributeConfidentiality = exports.RelationshipAttributeConfidentiality || (exports.RelationshipAttributeConfidentiality = {}));
47
47
  let RelationshipAttribute = class RelationshipAttribute extends AbstractAttribute_1.AbstractAttribute {
48
- constructor() {
49
- super(...arguments);
50
- this.isTechnical = false;
48
+ static preFrom(value) {
49
+ if (typeof value.isTechnical === "undefined")
50
+ value.isTechnical = false;
51
+ return value;
51
52
  }
52
53
  static from(value) {
53
54
  return this.fromAny(value);
@@ -65,8 +66,8 @@ __decorate([
65
66
  ], RelationshipAttribute.prototype, "key", void 0);
66
67
  __decorate([
67
68
  (0, ts_serval_1.serialize)(),
68
- (0, ts_serval_1.validate)(),
69
- __metadata("design:type", Object)
69
+ (0, ts_serval_1.validate)({ nullable: true }),
70
+ __metadata("design:type", Boolean)
70
71
  ], RelationshipAttribute.prototype, "isTechnical", void 0);
71
72
  __decorate([
72
73
  (0, ts_serval_1.serialize)(),
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipAttribute.js","sourceRoot":"","sources":["../../src/attributes/RelationshipAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,2DAAkG;AAClG,qEAAsH;AAEtH,IAAY,oCA6BX;AA7BD,WAAY,oCAAoC;IAC5C;;;;;;;;;OASG;IACH,yDAAiB,CAAA;IACjB;;;;;;OAMG;IACH,2DAAmB,CAAA;IACnB;;;;;;;OAOG;IACH,+DAAuB,CAAA;AAC3B,CAAC,EA7BW,oCAAoC,GAApC,4CAAoC,KAApC,4CAAoC,QA6B/C;AAoBD,IAAa,qBAAqB,GAAlC,MAAa,qBACT,SAAQ,qCAAiB;IAD7B;;QAeW,gBAAW,GAAG,KAAK,CAAA;IAoB9B,CAAC;IATU,MAAM,CAAC,IAAI,CAKd,KAA+F;QAE/F,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAuC,CAAA;IACpE,CAAC;CACJ,CAAA;AA5BG;IAFC,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,+CAAsB,CAAC,EAAE,CAAC;IACnD,IAAA,oBAAQ,GAAE;;oDACc;AAIzB;IAFC,IAAA,qBAA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qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,+CAAsB,CAAC,EAAE,CAAC;IACnD,IAAA,oBAAQ,GAAE;;oDACc;AAIzB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;kDACO;AAIlB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACF;AAS3B;IAPC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CACnB,CAAC,MAAM,CAAC,MAAM,CAAC,oCAAoC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5D,CAAC,CAAC,mBAAmB,MAAM,CAAC,MAAM,CAAC,oCAAoC,CAAC,EAAE;YAC1E,CAAC,CAAC,SAAS;KACtB,CAAC;;8DAC0D;AAxBnD,qBAAqB;IADjC,IAAA,gBAAI,EAAC,uBAAuB,CAAC;GACjB,qBAAqB,CAyCjC;AAzCY,sDAAqB"}
@@ -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.20",
9
- build: "49",
10
- date: "2022-05-23T11:58:42+00:00",
11
- commit: "266682aa1a94634e0fd3d64d07f32e42829948f3",
8
+ version: "2.0.0-alpha.23",
9
+ build: "52",
10
+ date: "2022-05-25T13:40:31+00:00",
11
+ commit: "ab5758eb644d1a25f0ec62d35b2379322360239e",
12
12
  dependencies: {"@js-soft/logging-abstractions":"^1.0.0"},
13
13
  libraries: {
14
14
  serval: ts_serval_1.buildInformation,
@@ -82,7 +82,8 @@ class AbstractAttributeQuery extends transport_1.CoreSerializable {
82
82
  __decorate([
83
83
  (0, ts_serval_1.serialize)(),
84
84
  (0, ts_serval_1.validate)({
85
- customValidator: (v) => (v === "" ? "must not be an empty string" : undefined)
85
+ customValidator: (v) => (v === "" ? "must not be an empty string" : undefined),
86
+ nullable: true
86
87
  }),
87
88
  __metadata("design:type", String)
88
89
  ], AbstractAttributeQuery.prototype, "valueType", void 0);
@@ -357,9 +358,10 @@ var RelationshipAttributeConfidentiality;
357
358
  RelationshipAttributeConfidentiality["Protected"] = "protected";
358
359
  })(RelationshipAttributeConfidentiality = exports.RelationshipAttributeConfidentiality || (exports.RelationshipAttributeConfidentiality = {}));
359
360
  let RelationshipAttribute = class RelationshipAttribute extends AbstractAttribute_1.AbstractAttribute {
360
- constructor() {
361
- super(...arguments);
362
- this.isTechnical = false;
361
+ static preFrom(value) {
362
+ if (typeof value.isTechnical === "undefined")
363
+ value.isTechnical = false;
364
+ return value;
363
365
  }
364
366
  static from(value) {
365
367
  return this.fromAny(value);
@@ -377,8 +379,8 @@ __decorate([
377
379
  ], RelationshipAttribute.prototype, "key", void 0);
378
380
  __decorate([
379
381
  (0, ts_serval_1.serialize)(),
380
- (0, ts_serval_1.validate)(),
381
- __metadata("design:type", Object)
382
+ (0, ts_serval_1.validate)({ nullable: true }),
383
+ __metadata("design:type", Boolean)
382
384
  ], RelationshipAttribute.prototype, "isTechnical", void 0);
383
385
  __decorate([
384
386
  (0, ts_serval_1.serialize)(),
@@ -4682,10 +4684,10 @@ const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-s
4682
4684
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
4683
4685
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
4684
4686
  exports.buildInformation = {
4685
- version: "2.0.0-alpha.20",
4686
- build: "49",
4687
- date: "2022-05-23T11:58:42+00:00",
4688
- commit: "266682aa1a94634e0fd3d64d07f32e42829948f3",
4687
+ version: "2.0.0-alpha.23",
4688
+ build: "52",
4689
+ date: "2022-05-25T13:40:31+00:00",
4690
+ commit: "ab5758eb644d1a25f0ec62d35b2379322360239e",
4689
4691
  dependencies: {"@js-soft/logging-abstractions":"^1.0.0"},
4690
4692
  libraries: {
4691
4693
  serval: ts_serval_1.buildInformation,