@nmshd/content 2.0.0-alpha.31 → 2.0.0-alpha.32

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.
@@ -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.31",
9
- build: "61",
10
- date: "2022-06-03T12:27:33+00:00",
11
- commit: "071ea400f2450675aee0e1d399f83111380b3cda",
8
+ version: "2.0.0-alpha.32",
9
+ build: "62",
10
+ date: "2022-06-03T15:06:19+00:00",
11
+ commit: "06f06cf3dc35d1caa1b1946c6308e1f6c80c3526",
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("RequestItemGroup", "mustBeAccepted", "mustBeAccepted can only be true if at least one item is flagged as mustBeAccepted");
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;AAuF5G,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,kBAAkB,EAClB,gBAAgB,EAChB,mFAAmF,CACtF,CAAA;SACJ;QAED,OAAO,KAAK,CAAA;IAChB,CAAC;CACJ,CAAA;AAnCG;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,CA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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?: IdentityAttributeJSON | RelationshipAttributeJSON;
6
+ attribute: IdentityAttributeJSON | RelationshipAttributeJSON;
7
7
  }
8
8
  export interface IProposeAttributeAcceptResponseItem extends IAcceptResponseItem {
9
9
  attributeId: ICoreId;
10
- attribute?: IIdentityAttribute | IRelationshipAttribute;
10
+ attribute: IIdentityAttribute | IRelationshipAttribute;
11
11
  }
12
12
  export declare class ProposeAttributeAcceptResponseItem extends AcceptResponseItem implements IProposeAttributeAcceptResponseItem {
13
13
  attributeId: CoreId;
14
- attribute?: IdentityAttribute | RelationshipAttribute;
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)({ nullable: true }),
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,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qEAC+B;AAVnD,kCAAkC;IAD9C,IAAA,gBAAI,EAAC,oCAAoC,CAAC;GAC9B,kCAAkC,CAiB9C;AAjBY,gFAAkC"}
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"}
@@ -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.31",
4933
- build: "61",
4934
- date: "2022-06-03T12:27:33+00:00",
4935
- commit: "071ea400f2450675aee0e1d399f83111380b3cda",
4932
+ version: "2.0.0-alpha.32",
4933
+ build: "62",
4934
+ date: "2022-06-03T15:06:19+00:00",
4935
+ commit: "06f06cf3dc35d1caa1b1946c6308e1f6c80c3526",
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("RequestItemGroup", "mustBeAccepted", "mustBeAccepted can only be true if at least one item is flagged as mustBeAccepted");
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)({ nullable: true }),
6001
+ (0, ts_serval_1.validate)(),
6001
6002
  __metadata("design:type", Object)
6002
6003
  ], ProposeAttributeAcceptResponseItem.prototype, "attribute", void 0);
6003
6004
  ProposeAttributeAcceptResponseItem = __decorate([
@@ -15175,6 +15176,73 @@ exports.Zone = Zone;
15175
15176
  //# sourceMappingURL=luxon.js.map
15176
15177
 
15177
15178
 
15179
+ /***/ }),
15180
+
15181
+ /***/ "./node_modules/ts-simple-nameof/index.js":
15182
+ /*!************************************************!*\
15183
+ !*** ./node_modules/ts-simple-nameof/index.js ***!
15184
+ \************************************************/
15185
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
15186
+
15187
+
15188
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
15189
+ exports.nameof = void 0;
15190
+ var nameof_1 = __webpack_require__(/*! ./src/nameof */ "./node_modules/ts-simple-nameof/src/nameof.js");
15191
+ Object.defineProperty(exports, "nameof", ({ enumerable: true, get: function () { return nameof_1.nameof; } }));
15192
+
15193
+
15194
+ /***/ }),
15195
+
15196
+ /***/ "./node_modules/ts-simple-nameof/src/nameof.js":
15197
+ /*!*****************************************************!*\
15198
+ !*** ./node_modules/ts-simple-nameof/src/nameof.js ***!
15199
+ \*****************************************************/
15200
+ /***/ ((__unused_webpack_module, exports) => {
15201
+
15202
+
15203
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
15204
+ exports.nameof = void 0;
15205
+ function cleanseAssertionOperators(parsedName) {
15206
+ return parsedName.replace(/[?!]/g, "");
15207
+ }
15208
+ function nameof(nameFunction, options) {
15209
+ var fnStr = nameFunction.toString();
15210
+ // ES6 class name:
15211
+ // "class ClassName { ..."
15212
+ if (fnStr.startsWith("class ")
15213
+ // Theoretically could, for some ill-advised reason, be "class => class.prop".
15214
+ && !fnStr.startsWith("class =>")) {
15215
+ return cleanseAssertionOperators(fnStr.substring("class ".length, fnStr.indexOf(" {")));
15216
+ }
15217
+ // ES6 prop selector:
15218
+ // "x => x.prop"
15219
+ if (fnStr.includes("=>")) {
15220
+ return cleanseAssertionOperators(fnStr.substring(fnStr.indexOf(".") + 1));
15221
+ }
15222
+ // ES5 prop selector:
15223
+ // "function (x) { return x.prop; }"
15224
+ // webpack production build excludes the spaces and optional trailing semicolon:
15225
+ // "function(x){return x.prop}"
15226
+ // FYI - during local dev testing i observed carriage returns after the curly brackets as well
15227
+ // Note by maintainer: See https://github.com/IRCraziestTaxi/ts-simple-nameof/pull/13#issuecomment-567171802 for explanation of this regex.
15228
+ var matchRegex = /function\s*\(\w+\)\s*\{[\r\n\s]*return\s+\w+\.((\w+\.)*(\w+))/i;
15229
+ var es5Match = fnStr.match(matchRegex);
15230
+ if (es5Match) {
15231
+ return (options && options.lastProp)
15232
+ ? es5Match[3]
15233
+ : es5Match[1];
15234
+ }
15235
+ // ES5 class name:
15236
+ // "function ClassName() { ..."
15237
+ if (fnStr.startsWith("function ")) {
15238
+ return cleanseAssertionOperators(fnStr.substring("function ".length, fnStr.indexOf("(")));
15239
+ }
15240
+ // Invalid function.
15241
+ throw new Error("ts-simple-nameof: Invalid function.");
15242
+ }
15243
+ exports.nameof = nameof;
15244
+
15245
+
15178
15246
  /***/ }),
15179
15247
 
15180
15248
  /***/ "@nmshd/crypto":