@nmshd/content 5.0.0-alpha.4 → 5.0.0-alpha.6

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: "5.0.0-alpha.4",
9
- build: "44",
10
- date: "2024-07-03T09:36:59+00:00",
11
- commit: "ec62b1150d2c5df39478f3d337d76242190445b0",
8
+ version: "5.0.0-alpha.6",
9
+ build: "51",
10
+ date: "2024-07-10T15:56:44+00:00",
11
+ commit: "d8f6c3878e63287280d67156244fda05004dd181",
12
12
  dependencies: {"@js-soft/logging-abstractions":"^1.0.1","@nmshd/iql":"^1.0.2","ts-simple-nameof":"^1.3.1"},
13
13
  libraries: {
14
14
  serval: ts_serval_1.buildInformation,
@@ -13,18 +13,13 @@ export interface RequestItemJSON extends ContentJSON {
13
13
  /**
14
14
  * This property can be used to add some arbitrary metadata to this item. The content
15
15
  * of this property will be copied into the response on the side of the recipient, so
16
- * the sender can use it to identify the group content as they receive the response.
16
+ * the sender can use it to identify the item as they receive the response.
17
17
  */
18
18
  metadata?: object;
19
19
  /**
20
- * If set to `true`, the recipient has to accept this group if he wants to accept the
20
+ * If set to `true`, the recipient has to accept this item if they want to accept the
21
21
  * Request.
22
- * If set to `false`, the recipient can decide whether he wants to accept it or not.
23
- *
24
- * Caution: this setting does not take effect in case it is inside of a
25
- * {@link RequestItemGroupJSON RequestItemGroup}, which is not accepted by the recipient,
26
- * since a {@link RequestItemJSON RequestItem} can only be accepted if the parent group
27
- * is accepted as well.
22
+ * If set to `false`, the recipient can decide whether they want to accept it or not.
28
23
  */
29
24
  mustBeAccepted: boolean;
30
25
  /**
@@ -46,18 +41,13 @@ export interface IRequestItem extends ISerializable {
46
41
  /**
47
42
  * This property can be used to add some arbitrary metadata to this item. The content
48
43
  * of this property will be copied into the response on the side of the recipient, so
49
- * the sender can use it to identify the group content as they receive the response.
44
+ * the sender can use it to identify the item as they receive the response.
50
45
  */
51
46
  metadata?: object;
52
47
  /**
53
- * If set to `true`, the recipient has to accept this group if he wants to accept the
48
+ * If set to `true`, the recipient has to accept this item if they want to accept the
54
49
  * Request.
55
- * If set to `false`, the recipient can decide whether he wants to accept it or not.
56
- *
57
- * Caution: this setting does not take effect in case it is inside of a
58
- * {@link RequestItemGroup RequestItemGroup}, which is not accepted by the recipient,
59
- * since a {@link RequestItem RequestItem} can only be accepted if the parent group
60
- * is accepted as well.
50
+ * If set to `false`, the recipient can decide whether they want to accept it or not.
61
51
  */
62
52
  mustBeAccepted: boolean;
63
53
  /**
@@ -76,4 +66,5 @@ export declare abstract class RequestItem extends Serializable {
76
66
  toJSON(verbose?: boolean | undefined, serializeAsString?: boolean | undefined): RequestItemJSON;
77
67
  }
78
68
  export type RequestItemDerivations = RequestItem | CreateAttributeRequestItem | DeleteAttributeRequestItem | ShareAttributeRequestItem | ProposeAttributeRequestItem | ReadAttributeRequestItem | ConsentRequestItem | AuthenticationRequestItem | FreeTextRequestItem | RegisterAttributeListenerRequestItem;
69
+ export declare function isRequestItemDerivation(input: any): input is RequestItemDerivations;
79
70
  //# sourceMappingURL=RequestItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestItem.d.ts","sourceRoot":"","sources":["../../src/requests/RequestItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAuB,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACH,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,8BAA8B,EAC9B,0BAA0B,EAC1B,8BAA8B,EAC9B,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,EACnB,2BAA2B,EAC3B,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AA2B,GAC3B,wBAAwB,GACxB,kBAAkB,GAClB,yBAAyB,GACzB,mBAAmB,GACnB,oCAAoC,CAAC;AAE3C,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,sBAAsB,CAanF"}
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RequestItem = void 0;
13
+ exports.isRequestItemDerivation = isRequestItemDerivation;
13
14
  const ts_serval_1 = require("@js-soft/ts-serval");
14
15
  class RequestItem extends ts_serval_1.Serializable {
15
16
  toJSON(verbose, serializeAsString) {
@@ -42,4 +43,16 @@ __decorate([
42
43
  (0, ts_serval_1.validate)({ nullable: true }),
43
44
  __metadata("design:type", Boolean)
44
45
  ], RequestItem.prototype, "requireManualDecision", void 0);
46
+ function isRequestItemDerivation(input) {
47
+ return (input["@type"] === "RequestItem" ||
48
+ input["@type"] === "CreateAttributeRequestItem" ||
49
+ input["@type"] === "DeleteAttributeRequestItem" ||
50
+ input["@type"] === "ShareAttributeRequestItem" ||
51
+ input["@type"] === "ProposeAttributeRequestItem" ||
52
+ input["@type"] === "ReadAttributeRequestItem" ||
53
+ input["@type"] === "ConsentRequestItem" ||
54
+ input["@type"] === "AuthenticationRequestItem" ||
55
+ input["@type"] === "FreeTextRequestItem" ||
56
+ input["@type"] === "RegisterAttributeListenerRequestItem");
57
+ }
45
58
  //# sourceMappingURL=RequestItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestItem.js","sourceRoot":"","sources":["../../src/requests/RequestItem.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAsF;AAkItF,MAAsB,WAAY,SAAQ,wBAAY;IAqBlC,MAAM,CAAC,OAA6B,EAAE,iBAAuC;QACzF,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAoB,CAAC;IACvE,CAAC;CACJ;AAxBD,kCAwBC;AArBU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C;;6CACJ;AAIlB;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACU;AAmB3C,SAAgB,uBAAuB,CAAC,KAAU;IAC9C,OAAO,CACH,KAAK,CAAC,OAAO,CAAC,KAAK,aAAa;QAChC,KAAK,CAAC,OAAO,CAAC,KAAK,4BAA4B;QAC/C,KAAK,CAAC,OAAO,CAAC,KAAK,4BAA4B;QAC/C,KAAK,CAAC,OAAO,CAAC,KAAK,2BAA2B;QAC9C,KAAK,CAAC,OAAO,CAAC,KAAK,6BAA6B;QAChD,KAAK,CAAC,OAAO,CAAC,KAAK,0BAA0B;QAC7C,KAAK,CAAC,OAAO,CAAC,KAAK,oBAAoB;QACvC,KAAK,CAAC,OAAO,CAAC,KAAK,2BAA2B;QAC9C,KAAK,CAAC,OAAO,CAAC,KAAK,qBAAqB;QACxC,KAAK,CAAC,OAAO,CAAC,KAAK,sCAAsC,CAC5D,CAAC;AACN,CAAC"}
@@ -3,13 +3,7 @@ import { ContentJSON } from "../ContentJSON";
3
3
  import { IRequestItemDerivations, RequestItemDerivations, RequestItemJSONDerivations } from "./RequestItem";
4
4
  /**
5
5
  * A RequestItemGroup can be used to group one or more RequestItems. This is useful
6
- * if you want to
7
- * * make sure that the items in the group can only be accepted together
8
- *
9
- * Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single
10
- * Request where the latter one targets an attribute created by the first one, it it should be impossible to
11
- * reject the first item, while accepting the second one.
12
- * * visually group items on the UI and give the a common title/description
6
+ * if you want to visually group RequestItems on the UI and give them a common `title` or `description`.
13
7
  */
14
8
  export interface RequestItemGroupJSON extends ContentJSON {
15
9
  "@type": "RequestItemGroup";
@@ -21,12 +15,6 @@ export interface RequestItemGroupJSON extends ContentJSON {
21
15
  * The human-readable description of this group.
22
16
  */
23
17
  description?: string;
24
- /**
25
- * If set to `true`, the recipient has to accept this group if he wants to accept the
26
- * Request.
27
- * If set to `false`, the recipient can decide whether he wants to accept it or not.
28
- */
29
- mustBeAccepted: boolean;
30
18
  /**
31
19
  * This property can be used to add some arbitrary metadata to this group. The content
32
20
  * of this property will be copied into the response on the side of the recipient, so
@@ -40,13 +28,7 @@ export interface RequestItemGroupJSON extends ContentJSON {
40
28
  }
41
29
  /**
42
30
  * A RequestItemGroup can be used to group one or more RequestItems. This is useful
43
- * if you want to
44
- * * make sure that the items in the group can only be accepted together
45
- *
46
- * Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single
47
- * Request where the latter one targets an attribute created by the first one, it it should be impossible to
48
- * reject the first item, while accepting the second one.
49
- * * visually group items on the UI and give the a common title/description
31
+ * if you want to visually group RequestItems on the UI and give them a common `title` or `description`.
50
32
  */
51
33
  export interface IRequestItemGroup extends ISerializable {
52
34
  /**
@@ -57,12 +39,6 @@ export interface IRequestItemGroup extends ISerializable {
57
39
  * The human-readable description of this group.
58
40
  */
59
41
  description?: string;
60
- /**
61
- * If set to `true`, the recipient has to accept this group if he wants to accept the
62
- * Request.
63
- * If set to `false`, the recipient can decide whether he wants to accept it or not.
64
- */
65
- mustBeAccepted: boolean;
66
42
  /**
67
43
  * This property can be used to add some arbitrary metadata to this group. The content
68
44
  * of this property will be copied into the response on the side of the recipient, so
@@ -77,11 +53,9 @@ export interface IRequestItemGroup extends ISerializable {
77
53
  export declare class RequestItemGroup extends Serializable {
78
54
  title?: string;
79
55
  description?: string;
80
- mustBeAccepted: boolean;
81
56
  items: RequestItemDerivations[];
82
57
  metadata?: object;
83
58
  static from(value: IRequestItemGroup | Omit<RequestItemGroupJSON, "@type">): RequestItemGroup;
84
- protected static postFrom<T extends Serializable>(value: T): T;
85
59
  toJSON(verbose?: boolean | undefined, serializeAsString?: boolean | undefined): RequestItemGroupJSON;
86
60
  }
87
61
  //# sourceMappingURL=RequestItemGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestItemGroup.d.ts","sour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AAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,GAAG,gBAAgB;IAIpF,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,oBAAoB;CAGvH"}
@@ -8,23 +8,13 @@ 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 RequestItemGroup_1;
12
11
  Object.defineProperty(exports, "__esModule", { value: true });
13
12
  exports.RequestItemGroup = void 0;
14
13
  const ts_serval_1 = require("@js-soft/ts-serval");
15
- const ts_simple_nameof_1 = require("ts-simple-nameof");
16
- let RequestItemGroup = RequestItemGroup_1 = class RequestItemGroup extends ts_serval_1.Serializable {
14
+ let RequestItemGroup = class RequestItemGroup extends ts_serval_1.Serializable {
17
15
  static from(value) {
18
16
  return this.fromAny(value);
19
17
  }
20
- static postFrom(value) {
21
- if (!(value instanceof RequestItemGroup_1))
22
- throw new Error("this should never happen");
23
- if (value.mustBeAccepted && value.items.every((item) => !item.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)}`);
25
- }
26
- return value;
27
- }
28
18
  toJSON(verbose, serializeAsString) {
29
19
  return super.toJSON(verbose, serializeAsString);
30
20
  }
@@ -40,11 +30,6 @@ __decorate([
40
30
  (0, ts_serval_1.validate)({ nullable: true, max: 500 }),
41
31
  __metadata("design:type", String)
42
32
  ], RequestItemGroup.prototype, "description", void 0);
43
- __decorate([
44
- (0, ts_serval_1.serialize)(),
45
- (0, ts_serval_1.validate)(),
46
- __metadata("design:type", Boolean)
47
- ], RequestItemGroup.prototype, "mustBeAccepted", void 0);
48
33
  __decorate([
49
34
  (0, ts_serval_1.serialize)(),
50
35
  (0, ts_serval_1.validate)({ customValidator: (v) => (v.length < 1 ? "may not be empty" : undefined) }),
@@ -55,7 +40,7 @@ __decorate([
55
40
  (0, ts_serval_1.validate)({ nullable: true }),
56
41
  __metadata("design:type", Object)
57
42
  ], RequestItemGroup.prototype, "metadata", void 0);
58
- exports.RequestItemGroup = RequestItemGroup = RequestItemGroup_1 = __decorate([
43
+ exports.RequestItemGroup = RequestItemGroup = __decorate([
59
44
  (0, ts_serval_1.type)("RequestItemGroup")
60
45
  ], RequestItemGroup);
61
46
  //# sourceMappingURL=RequestItemGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestItemGroup.js","sourceRoot":"","sources":["../../src/requests/RequestItemGroup.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA6G;AAC7G,uDAA0C;AAyFnC,IAAM,gBAAgB,wBAAtB,MAAM,gBAAiB,SAAQ,wBAAY;IAqBvC,MAAM,CAAC,IAAI,CAAC,KAA8D;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAES,MAAM,CAAU,QAAQ,CAAyB,KAAQ;QAC/D,IAAI,CAAC,CAAC,KAAK,YAAY,kBAAgB,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAEtF,IAAI,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;YAC5E,MAAM,IAAI,2BAAe,CACrB,kBAAgB,CAAC,IAAI,EACrB,IAAA,yBAAM,EAAmB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,EACjD,GAAG,IAAA,yBAAM,EAAmB,CAAC,CAAC,EAAE,EAAE,C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AAM,CAAC,IAAI,CAAC,KAA8D;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAEe,MAAM,CAAC,OAA6B,EAAE,iBAAuC;QACzF,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAyB,CAAC;IAC5E,CAAC;CACJ,CAAA;AAxBY,4CAAgB;AAGlB;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;;+CACjB;AAIf;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;;qDACX;AAIrB;IAFN,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;;+CAC/C;AAIhC;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACJ;2BAfhB,gBAAgB;IAD5B,IAAA,gBAAI,EAAC,kBAAkB,CAAC;GACZ,gBAAgB,CAwB5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nmshd/content",
3
- "version": "5.0.0-alpha.4",
3
+ "version": "5.0.0-alpha.6",
4
4
  "description": "The content library defines data structures that can be transmitted using the transport library.",
5
5
  "homepage": "https://enmeshed.eu",
6
6
  "repository": {