@nmshd/content 1.2.0 → 1.3.0
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/Attribute.d.ts +0 -2
- package/dist/attributes/Attribute.js +0 -11
- package/dist/attributes/Attribute.js.map +1 -1
- package/dist/attributes/AttributeQuery.d.ts +12 -0
- package/dist/{requests/AttributesRequest.js → attributes/AttributeQuery.js} +23 -26
- package/dist/attributes/AttributeQuery.js.map +1 -0
- package/dist/attributes/index.d.ts +1 -0
- package/dist/attributes/index.js +1 -0
- package/dist/attributes/index.js.map +1 -1
- package/dist/buildInformation.js +4 -4
- package/dist/forms/FormItem.js +4 -10
- package/dist/forms/FormItem.js.map +1 -1
- package/dist/index.d.ts +6 -10
- package/dist/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/dist/messages/Mail.js +2 -3
- package/dist/messages/Mail.js.map +1 -1
- package/dist/messages/RequestMail.d.ts +5 -4
- package/dist/messages/RequestMail.js +12 -1
- package/dist/messages/RequestMail.js.map +1 -1
- package/dist/requests/AttributesChangeRequest.d.ts +43 -6
- package/dist/requests/AttributesChangeRequest.js +29 -5
- package/dist/requests/AttributesChangeRequest.js.map +1 -1
- package/dist/requests/AttributesShareRequest.d.ts +42 -5
- package/dist/requests/AttributesShareRequest.js +26 -2
- package/dist/requests/AttributesShareRequest.js.map +1 -1
- package/dist/requests/Request.d.ts +21 -25
- package/dist/requests/Request.js +9 -15
- package/dist/requests/Request.js.map +1 -1
- package/dist/requests/RequestItem.d.ts +62 -0
- package/dist/{attributes/addresses/DeliveryAddress.js → requests/RequestItem.js} +16 -18
- package/dist/requests/RequestItem.js.map +1 -0
- package/dist/requests/RequestItemGroup.d.ts +82 -0
- package/dist/requests/{PrivacyStatement.js → RequestItemGroup.js} +16 -22
- package/dist/requests/RequestItemGroup.js.map +1 -0
- package/dist/requests/Response.d.ts +18 -0
- package/dist/requests/{ChallengeResponse.js → Response.js} +18 -10
- package/dist/requests/Response.js.map +1 -0
- package/dist/requests/ResponseItem.d.ts +48 -0
- package/dist/requests/ResponseItem.js +71 -0
- package/dist/requests/ResponseItem.js.map +1 -0
- package/dist/requests/ResponseItemGroup.d.ts +15 -0
- package/dist/requests/{FormRequest.js → ResponseItemGroup.js} +15 -12
- package/dist/requests/ResponseItemGroup.js.map +1 -0
- package/dist/requests/ResponseItemResult.d.ts +5 -0
- package/dist/requests/ResponseItemResult.js +10 -0
- package/dist/requests/ResponseItemResult.js.map +1 -0
- package/lib-web/nmshd.content.js +313 -537
- package/lib-web/nmshd.content.min.js +1 -1
- package/package.json +2 -2
- package/dist/attributes/addresses/Address.d.ts +0 -22
- package/dist/attributes/addresses/Address.js +0 -64
- package/dist/attributes/addresses/Address.js.map +0 -1
- package/dist/attributes/addresses/DeliveryAddress.d.ts +0 -12
- package/dist/attributes/addresses/DeliveryAddress.js.map +0 -1
- package/dist/relationships/RelationshipCreationChangeRequestBody.d.ts +0 -37
- package/dist/relationships/RelationshipCreationChangeRequestBody.js +0 -68
- package/dist/relationships/RelationshipCreationChangeRequestBody.js.map +0 -1
- package/dist/relationships/RelationshipCreationChangeResponseBody.d.ts +0 -0
- package/dist/relationships/RelationshipCreationChangeResponseBody.js +0 -2
- package/dist/relationships/RelationshipCreationChangeResponseBody.js.map +0 -1
- package/dist/relationships/RelationshipExistsAction.d.ts +0 -7
- package/dist/relationships/RelationshipExistsAction.js +0 -17
- package/dist/relationships/RelationshipExistsAction.js.map +0 -1
- package/dist/relationships/RelationshipExistsMessageAction.d.ts +0 -11
- package/dist/relationships/RelationshipExistsMessageAction.js +0 -26
- package/dist/relationships/RelationshipExistsMessageAction.js.map +0 -1
- package/dist/relationships/RelationshipTemplateBody.d.ts +0 -56
- package/dist/relationships/RelationshipTemplateBody.js +0 -96
- package/dist/relationships/RelationshipTemplateBody.js.map +0 -1
- package/dist/requests/AttributesRequest.d.ts +0 -19
- package/dist/requests/AttributesRequest.js.map +0 -1
- package/dist/requests/AuthorizationGrantRequest.d.ts +0 -20
- package/dist/requests/AuthorizationGrantRequest.js +0 -42
- package/dist/requests/AuthorizationGrantRequest.js.map +0 -1
- package/dist/requests/ChallengeRequest.d.ts +0 -24
- package/dist/requests/ChallengeRequest.js +0 -33
- package/dist/requests/ChallengeRequest.js.map +0 -1
- package/dist/requests/ChallengeResponse.d.ts +0 -16
- package/dist/requests/ChallengeResponse.js.map +0 -1
- package/dist/requests/FormRequest.d.ts +0 -11
- package/dist/requests/FormRequest.js.map +0 -1
- package/dist/requests/PrivacyStatement.d.ts +0 -25
- package/dist/requests/PrivacyStatement.js.map +0 -1
|
@@ -16,8 +16,6 @@ export interface IAttribute extends ICoreSerializable {
|
|
|
16
16
|
validTo?: ICoreDate;
|
|
17
17
|
}
|
|
18
18
|
export declare class Attribute extends CoreSerializable implements IAttribute {
|
|
19
|
-
readonly technicalProperties: string[];
|
|
20
|
-
readonly userdataProperties: string[];
|
|
21
19
|
content: AbstractAttributeValue;
|
|
22
20
|
createdAt: CoreDate;
|
|
23
21
|
tags?: string[];
|
|
@@ -13,19 +13,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
exports.Attribute = void 0;
|
|
14
14
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
15
|
const transport_1 = require("@nmshd/transport");
|
|
16
|
-
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
17
16
|
const AbstractAttributeValue_1 = require("./AbstractAttributeValue");
|
|
18
17
|
let Attribute = Attribute_1 = class Attribute extends transport_1.CoreSerializable {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.technicalProperties = ["@type", "@context", (0, ts_simple_nameof_1.nameof)((r) => r.createdAt)];
|
|
22
|
-
this.userdataProperties = [
|
|
23
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.content),
|
|
24
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.validFrom),
|
|
25
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.validTo),
|
|
26
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.tags)
|
|
27
|
-
];
|
|
28
|
-
}
|
|
29
18
|
static from(value) {
|
|
30
19
|
return super.fromT(value, Attribute_1);
|
|
31
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attribute.js","sourceRoot":"","sources":["../../src/attributes/Attribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,gDAA2F;
|
|
1
|
+
{"version":3,"file":"Attribute.js","sourceRoot":"","sources":["../../src/attributes/Attribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,gDAA2F;AAE3F,qEAAsH;AAmBtH,IAAa,SAAS,iBAAtB,MAAa,SAAU,SAAQ,4BAAgB;IAqBpC,MAAM,CAAC,IAAI,CAAC,KAAiB;QAChC,OAAO,KAAK,CAAC,KAAK,CAAY,KAAK,EAAE,WAAS,CAAC,CAAA;IACnD,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,SAAwB;QAC3C,OAAO,KAAK,CAAC,KAAK,CAAY,SAAS,EAAE,WAAS,CAAC,CAAA;IACvD,CAAC;CACJ,CAAA;AAzBG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,+CAAsB;0CAAA;AAItC;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,oBAAQ;4CAAA;AAI1B;IAFC,IAAA,qBAAS,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC3B,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACP;AAItB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACV,oBAAQ;4CAAA;AAI3B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACZ,oBAAQ;0CAAA;AAnBhB,SAAS;IADrB,IAAA,gBAAI,EAAC,WAAW,CAAC;GACL,SAAS,CA4BrB;AA5BY,8BAAS"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CoreSerializable, ICoreSerializable } from "@nmshd/transport";
|
|
2
|
+
export interface IAttributeQuery extends ICoreSerializable {
|
|
3
|
+
attributeType?: string;
|
|
4
|
+
onlyValid: boolean;
|
|
5
|
+
tags?: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare class AttributeQuery extends CoreSerializable implements IAttributeQuery {
|
|
8
|
+
onlyValid: boolean;
|
|
9
|
+
attributeType?: string;
|
|
10
|
+
tags?: string[];
|
|
11
|
+
static from(value: IAttributeQuery): AttributeQuery;
|
|
12
|
+
}
|
|
@@ -8,39 +8,36 @@ 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
|
|
11
|
+
var AttributeQuery_1;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.AttributeQuery = void 0;
|
|
14
14
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
15
|
const transport_1 = require("@nmshd/transport");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return (await super.from(value, AttributesRequest_1));
|
|
20
|
-
}
|
|
21
|
-
static async fromJSON(value) {
|
|
22
|
-
return await this.from({
|
|
23
|
-
id: value.id ? transport_1.CoreId.from(value.id) : undefined,
|
|
24
|
-
expiresAt: value.expiresAt ? transport_1.CoreDate.from(value.expiresAt) : undefined,
|
|
25
|
-
key: value.key,
|
|
26
|
-
reason: value.reason,
|
|
27
|
-
names: value.names,
|
|
28
|
-
required: value.required
|
|
29
|
-
});
|
|
16
|
+
let AttributeQuery = AttributeQuery_1 = class AttributeQuery extends transport_1.CoreSerializable {
|
|
17
|
+
static from(value) {
|
|
18
|
+
return super.fromT(value, AttributeQuery_1);
|
|
30
19
|
}
|
|
31
20
|
};
|
|
32
21
|
__decorate([
|
|
33
|
-
(0, ts_serval_1.serialize)(
|
|
22
|
+
(0, ts_serval_1.serialize)(),
|
|
34
23
|
(0, ts_serval_1.validate)(),
|
|
35
|
-
__metadata("design:type",
|
|
36
|
-
],
|
|
24
|
+
__metadata("design:type", Boolean)
|
|
25
|
+
], AttributeQuery.prototype, "onlyValid", void 0);
|
|
37
26
|
__decorate([
|
|
38
27
|
(0, ts_serval_1.serialize)(),
|
|
28
|
+
(0, ts_serval_1.validate)({
|
|
29
|
+
nullable: true,
|
|
30
|
+
customValidator: (v) => (v === "" ? "must not be an empty string" : undefined)
|
|
31
|
+
}),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], AttributeQuery.prototype, "attributeType", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, ts_serval_1.serialize)({ type: String }),
|
|
39
36
|
(0, ts_serval_1.validate)({ nullable: true }),
|
|
40
|
-
__metadata("design:type",
|
|
41
|
-
],
|
|
42
|
-
|
|
43
|
-
(0, ts_serval_1.type)("
|
|
44
|
-
],
|
|
45
|
-
exports.
|
|
46
|
-
//# sourceMappingURL=
|
|
37
|
+
__metadata("design:type", Array)
|
|
38
|
+
], AttributeQuery.prototype, "tags", void 0);
|
|
39
|
+
AttributeQuery = AttributeQuery_1 = __decorate([
|
|
40
|
+
(0, ts_serval_1.type)("AttributeQuery")
|
|
41
|
+
], AttributeQuery);
|
|
42
|
+
exports.AttributeQuery = AttributeQuery;
|
|
43
|
+
//# sourceMappingURL=AttributeQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttributeQuery.js","sourceRoot":"","sources":["../../src/attributes/AttributeQuery.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,gDAAsE;AAStE,IAAa,cAAc,sBAA3B,MAAa,cAAe,SAAQ,4BAAgB;IAgBzC,MAAM,CAAC,IAAI,CAAC,KAAsB;QACrC,OAAO,KAAK,CAAC,KAAK,CAAiB,KAAK,EAAE,gBAAc,CAAC,CAAA;IAC7D,CAAC;CACJ,CAAA;AAhBG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;iDACc;AAOzB;IALC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,SAAS,CAAC;KACjF,CAAC;;qDAC2B;AAI7B;IAFC,IAAA,qBAAS,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC3B,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACP;AAdb,cAAc;IAD1B,IAAA,gBAAI,EAAC,gBAAgB,CAAC;GACV,cAAc,CAmB1B;AAnBY,wCAAc"}
|
package/dist/attributes/index.js
CHANGED
|
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AbstractAttributeValue"), exports);
|
|
18
18
|
__exportStar(require("./Attribute"), exports);
|
|
19
|
+
__exportStar(require("./AttributeQuery"), exports);
|
|
19
20
|
__exportStar(require("./types"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/attributes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,8CAA2B;AAC3B,0CAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/attributes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,8CAA2B;AAC3B,mDAAgC;AAChC,0CAAuB"}
|
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: "1.
|
|
9
|
-
build: "
|
|
10
|
-
date: "2022-03-
|
|
11
|
-
commit: "
|
|
8
|
+
version: "1.3.0",
|
|
9
|
+
build: "16",
|
|
10
|
+
date: "2022-03-18T06:15:58+00:00",
|
|
11
|
+
commit: "3759e23312fd9be031f9beb9b8c9cf098a1d44b2",
|
|
12
12
|
dependencies: {"@js-soft/logging-abstractions":"^1.0.0"},
|
|
13
13
|
libraries: {
|
|
14
14
|
serval: ts_serval_1.buildInformation,
|
package/dist/forms/FormItem.js
CHANGED
|
@@ -19,8 +19,8 @@ var FormType;
|
|
|
19
19
|
FormType["Date"] = "date";
|
|
20
20
|
FormType["Text"] = "text";
|
|
21
21
|
})(FormType = exports.FormType || (exports.FormType = {}));
|
|
22
|
-
|
|
23
|
-
}
|
|
22
|
+
class FormItem extends ts_serval_1.Serializable {
|
|
23
|
+
}
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, ts_serval_1.serialize)(),
|
|
26
26
|
(0, ts_serval_1.validate)(),
|
|
@@ -31,12 +31,9 @@ __decorate([
|
|
|
31
31
|
(0, ts_serval_1.validate)(),
|
|
32
32
|
__metadata("design:type", String)
|
|
33
33
|
], FormItem.prototype, "type", void 0);
|
|
34
|
-
FormItem = __decorate([
|
|
35
|
-
(0, ts_serval_1.type)("FormItem")
|
|
36
|
-
], FormItem);
|
|
37
34
|
exports.FormItem = FormItem;
|
|
38
|
-
|
|
39
|
-
}
|
|
35
|
+
class FormItemVisible extends FormItem {
|
|
36
|
+
}
|
|
40
37
|
__decorate([
|
|
41
38
|
(0, ts_serval_1.serialize)(),
|
|
42
39
|
(0, ts_serval_1.validate)(),
|
|
@@ -52,8 +49,5 @@ __decorate([
|
|
|
52
49
|
(0, ts_serval_1.validate)({ nullable: true }),
|
|
53
50
|
__metadata("design:type", String)
|
|
54
51
|
], FormItemVisible.prototype, "help", void 0);
|
|
55
|
-
FormItemVisible = __decorate([
|
|
56
|
-
(0, ts_serval_1.type)("FormItemVisible")
|
|
57
|
-
], FormItemVisible);
|
|
58
52
|
exports.FormItemVisible = FormItemVisible;
|
|
59
53
|
//# sourceMappingURL=FormItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormItem.js","sourceRoot":"","sources":["../../src/forms/FormItem.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"FormItem.js","sourceRoot":"","sources":["../../src/forms/FormItem.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAqF;AAGrF,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,mCAAuB,CAAA;IACvB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,yBAAa,CAAA;IACb,yBAAa,CAAA;AACjB,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB;AAkBD,MAAsB,QAAS,SAAQ,wBAAY;CAQlD;AALG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;qCACO;AAIlB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;sCACU;AAPzB,4BAQC;AAOD,MAAsB,eAAgB,SAAQ,QAAQ;CAYrD;AATG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;8CACS;AAIpB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACJ;AAIzB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACT;AAXxB,0CAYC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,16 +5,12 @@ export * from "./ContentJSON";
|
|
|
5
5
|
export * from "./forms";
|
|
6
6
|
export * from "./messages/Mail";
|
|
7
7
|
export * from "./messages/RequestMail";
|
|
8
|
-
export * from "./relationships/RelationshipCreationChangeRequestBody";
|
|
9
|
-
export * from "./relationships/RelationshipExistsAction";
|
|
10
|
-
export * from "./relationships/RelationshipExistsMessageAction";
|
|
11
|
-
export * from "./relationships/RelationshipTemplateBody";
|
|
12
8
|
export * from "./requests/AttributesChangeRequest";
|
|
13
|
-
export * from "./requests/AttributesRequest";
|
|
14
9
|
export * from "./requests/AttributesShareRequest";
|
|
15
|
-
export * from "./requests/AuthorizationGrantRequest";
|
|
16
|
-
export * from "./requests/ChallengeRequest";
|
|
17
|
-
export * from "./requests/ChallengeResponse";
|
|
18
|
-
export * from "./requests/FormRequest";
|
|
19
|
-
export * from "./requests/PrivacyStatement";
|
|
20
10
|
export * from "./requests/Request";
|
|
11
|
+
export * from "./requests/RequestItem";
|
|
12
|
+
export * from "./requests/RequestItemGroup";
|
|
13
|
+
export * from "./requests/Response";
|
|
14
|
+
export * from "./requests/ResponseItem";
|
|
15
|
+
export * from "./requests/ResponseItemGroup";
|
|
16
|
+
export * from "./requests/ResponseItemResult";
|
package/dist/index.js
CHANGED
|
@@ -21,17 +21,13 @@ __exportStar(require("./ContentJSON"), exports);
|
|
|
21
21
|
__exportStar(require("./forms"), exports);
|
|
22
22
|
__exportStar(require("./messages/Mail"), exports);
|
|
23
23
|
__exportStar(require("./messages/RequestMail"), exports);
|
|
24
|
-
__exportStar(require("./relationships/RelationshipCreationChangeRequestBody"), exports);
|
|
25
|
-
__exportStar(require("./relationships/RelationshipExistsAction"), exports);
|
|
26
|
-
__exportStar(require("./relationships/RelationshipExistsMessageAction"), exports);
|
|
27
|
-
__exportStar(require("./relationships/RelationshipTemplateBody"), exports);
|
|
28
24
|
__exportStar(require("./requests/AttributesChangeRequest"), exports);
|
|
29
|
-
__exportStar(require("./requests/AttributesRequest"), exports);
|
|
30
25
|
__exportStar(require("./requests/AttributesShareRequest"), exports);
|
|
31
|
-
__exportStar(require("./requests/AuthorizationGrantRequest"), exports);
|
|
32
|
-
__exportStar(require("./requests/ChallengeRequest"), exports);
|
|
33
|
-
__exportStar(require("./requests/ChallengeResponse"), exports);
|
|
34
|
-
__exportStar(require("./requests/FormRequest"), exports);
|
|
35
|
-
__exportStar(require("./requests/PrivacyStatement"), exports);
|
|
36
26
|
__exportStar(require("./requests/Request"), exports);
|
|
27
|
+
__exportStar(require("./requests/RequestItem"), exports);
|
|
28
|
+
__exportStar(require("./requests/RequestItemGroup"), exports);
|
|
29
|
+
__exportStar(require("./requests/Response"), exports);
|
|
30
|
+
__exportStar(require("./requests/ResponseItem"), exports);
|
|
31
|
+
__exportStar(require("./requests/ResponseItemGroup"), exports);
|
|
32
|
+
__exportStar(require("./requests/ResponseItemResult"), exports);
|
|
37
33
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,iEAA8C;AAC9C,qDAAkC;AAClC,gDAA6B;AAC7B,0CAAuB;AACvB,kDAA+B;AAC/B,yDAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,iEAA8C;AAC9C,qDAAkC;AAClC,gDAA6B;AAC7B,0CAAuB;AACvB,kDAA+B;AAC/B,yDAAsC;AACtC,qEAAkD;AAClD,oEAAiD;AACjD,qDAAkC;AAClC,yDAAsC;AACtC,8DAA2C;AAC3C,sDAAmC;AACnC,0DAAuC;AACvC,+DAA4C;AAC5C,gEAA6C"}
|
package/dist/messages/Mail.js
CHANGED
|
@@ -25,13 +25,12 @@ let Mail = Mail_1 = class Mail extends ts_serval_1.SerializableAsync {
|
|
|
25
25
|
return await super.fromT(value, Mail_1);
|
|
26
26
|
}
|
|
27
27
|
static async fromJSON(value) {
|
|
28
|
-
var _a, _b;
|
|
29
28
|
return await this.from({
|
|
30
29
|
body: value.body,
|
|
31
30
|
subject: value.subject,
|
|
32
31
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
33
|
-
to:
|
|
34
|
-
cc:
|
|
32
|
+
to: value.to?.map((recipient) => transport_1.CoreAddress.from(recipient)),
|
|
33
|
+
cc: value.cc?.map((recipient) => transport_1.CoreAddress.from(recipient))
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mail.js","sourceRoot":"","sources":["../../src/messages/Mail.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAAqG;AACrG,gDAA4D;AAiB5D,IAAa,IAAI,YAAjB,MAAa,IAAK,SAAQ,6BAAiB;IAiBhC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAY;QACjC,IAAI,OAAO,KAAK,CAAC,EAAE,KAAK,WAAW,EAAE;YACjC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAA;SAChB;QACD,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,WAAW,IAAK,KAAa,CAAC,OAAO,EAAE;YAC7D,KAAK,CAAC,IAAI,GAAI,KAAa,CAAC,OAAO,CAAA;YACnC,OAAQ,KAAa,CAAC,OAAO,CAAA;SAChC;QAED,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,MAAI,CAAC,CAAA;IACzC,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAe
|
|
1
|
+
{"version":3,"file":"Mail.js","sourceRo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,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC;;gCAC9D;AAIxB;IAFC,IAAA,qBAAS,EAAC,EAAE,IAAI,EAAE,uBAAW,EAAE,CAAC;IAChC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gCACJ;AAIzB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;qCACW;AAItB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;kCACQ;AAfV,IAAI;IADhB,IAAA,gBAAI,EAAC,MAAM,CAAC;GACA,IAAI,CAsChB;AAtCY,oBAAI"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AttributesChangeRequest, AttributesChangeRequestJSON, IAttributesChangeRequest } from "../requests/AttributesChangeRequest";
|
|
2
|
+
import { AttributesShareRequest, AttributesShareRequestJSON, IAttributesShareRequest } from "../requests/AttributesShareRequest";
|
|
2
3
|
import { IMail, Mail, MailJSON } from "./Mail";
|
|
3
4
|
export interface RequestMailJSON extends MailJSON {
|
|
4
|
-
requests:
|
|
5
|
+
requests: (AttributesChangeRequestJSON | AttributesShareRequestJSON)[];
|
|
5
6
|
}
|
|
6
7
|
export interface IRequestMail extends IMail {
|
|
7
|
-
requests:
|
|
8
|
+
requests: (IAttributesChangeRequest | IAttributesShareRequest)[];
|
|
8
9
|
}
|
|
9
10
|
export declare class RequestMail extends Mail {
|
|
10
|
-
requests:
|
|
11
|
+
requests: (AttributesChangeRequest | AttributesShareRequest)[];
|
|
11
12
|
static from(value: IRequestMail): Promise<RequestMail>;
|
|
12
13
|
static fromJSON(value: RequestMailJSON): Promise<RequestMail>;
|
|
13
14
|
}
|
|
@@ -12,6 +12,8 @@ var RequestMail_1;
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.RequestMail = void 0;
|
|
14
14
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
+
const AttributesChangeRequest_1 = require("../requests/AttributesChangeRequest");
|
|
16
|
+
const AttributesShareRequest_1 = require("../requests/AttributesShareRequest");
|
|
15
17
|
const Mail_1 = require("./Mail");
|
|
16
18
|
let RequestMail = RequestMail_1 = class RequestMail extends Mail_1.Mail {
|
|
17
19
|
static async from(value) {
|
|
@@ -19,7 +21,16 @@ let RequestMail = RequestMail_1 = class RequestMail extends Mail_1.Mail {
|
|
|
19
21
|
}
|
|
20
22
|
static async fromJSON(value) {
|
|
21
23
|
const mail = await Mail_1.Mail.fromJSON(value);
|
|
22
|
-
const requests =
|
|
24
|
+
const requests = await Promise.all(value.requests.map((request) => {
|
|
25
|
+
switch (request["@type"]) {
|
|
26
|
+
case "AttributesChangeRequest":
|
|
27
|
+
return ts_serval_1.SerializableAsync.fromT(request, AttributesChangeRequest_1.AttributesChangeRequest);
|
|
28
|
+
case "AttributesShareRequest":
|
|
29
|
+
return ts_serval_1.SerializableAsync.fromT(request, AttributesShareRequest_1.AttributesShareRequest);
|
|
30
|
+
default:
|
|
31
|
+
throw new Error(`Unknown request type: ${request["@type"]}`);
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
23
34
|
return await this.from({
|
|
24
35
|
body: mail.body,
|
|
25
36
|
subject: mail.subject,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestMail.js","sourceRoot":"","sources":["../../src/messages/RequestMail.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAAiF;
|
|
1
|
+
{"version":3,"file":"RequestMail.js","sourceRoot":"","sources":["../../src/messages/RequestMail.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAAiF;AACjF,iFAI4C;AAC5C,+EAI2C;AAC3C,iCAA8C;AAW9C,IAAa,WAAW,mBAAxB,MAAa,WAAY,SAAQ,WAAI;IAK1B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAmB;QACxC,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,aAAW,CAAC,CAAA;IAChD,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAsB;QAC/C,MAAM,IAAI,GAAS,MAAM,WAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC7C,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YAC3B,QAAQ,OAAO,CAAC,OAAO,CAAC,EAAE;gBACtB,KAAK,yBAAyB;oBAC1B,OAAO,6BAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,iDAAuB,CAAC,CAAA;gBACpE,KAAK,wBAAwB;oBACzB,OAAO,6BAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,+CAAsB,CAAC,CAAA;gBACnE;oBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;aACnE;QACL,CAAC,CAAC,CACL,CAAA;QAED,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,QAAQ,EAAE,QAAQ;SACrB,CAAC,CAAA;IACN,CAAC;CACJ,CAAA;AA7BG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;6CAC0D;AAH5D,WAAW;IADvB,IAAA,gBAAI,EAAC,aAAa,CAAC;GACP,WAAW,CAgCvB;AAhCY,kCAAW"}
|
|
@@ -1,15 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { ISerializable, SerializableAsync } from "@js-soft/ts-serval";
|
|
2
|
+
import { CoreAddress, CoreDate, CoreId, ICoreAddress, ICoreDate, ICoreId } from "@nmshd/transport";
|
|
3
|
+
import { Attribute, AttributeJSON, IAttribute } from "../attributes";
|
|
4
|
+
import { ContentJSON } from "../ContentJSON";
|
|
5
|
+
export interface AttributesChangeRequestJSON extends ContentJSON {
|
|
6
|
+
id?: string;
|
|
7
|
+
key?: string;
|
|
8
|
+
reason?: string;
|
|
9
|
+
expiresAt?: string;
|
|
10
|
+
impact?: string;
|
|
5
11
|
attributes: AttributeJSON[];
|
|
6
12
|
applyTo?: string;
|
|
7
13
|
}
|
|
8
|
-
export interface IAttributesChangeRequest extends
|
|
14
|
+
export interface IAttributesChangeRequest extends ISerializable {
|
|
15
|
+
id?: ICoreId;
|
|
16
|
+
/**
|
|
17
|
+
* The technial key of the request which is submitted back with the answer. This can be used
|
|
18
|
+
* for mapping requests and answers. The key should be unique and non-personal, best a random UUID.
|
|
19
|
+
* @default undefined - no key is used
|
|
20
|
+
*/
|
|
21
|
+
key?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The human-readable reason for this request. This can be used to provide the user with more input
|
|
24
|
+
* why this request is necessary and should be answered.
|
|
25
|
+
* @default undefined - no reason is given
|
|
26
|
+
*/
|
|
27
|
+
reason?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The point in time the request is considered obsolete either technically (e.g. the request is no longer
|
|
30
|
+
* valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer
|
|
31
|
+
* of interest).
|
|
32
|
+
* @default undefined - the request won't expire
|
|
33
|
+
*/
|
|
34
|
+
expiresAt?: ICoreDate;
|
|
35
|
+
/**
|
|
36
|
+
* The impact of this request. This can be used to show the user what happens if the user does not accept the request.
|
|
37
|
+
*
|
|
38
|
+
* @default undefined - no specific impact
|
|
39
|
+
*/
|
|
40
|
+
impact?: string;
|
|
9
41
|
attributes: IAttribute[];
|
|
10
42
|
applyTo?: ICoreAddress;
|
|
11
43
|
}
|
|
12
|
-
export declare class AttributesChangeRequest extends
|
|
44
|
+
export declare class AttributesChangeRequest extends SerializableAsync implements IAttributesChangeRequest {
|
|
45
|
+
id?: CoreId;
|
|
46
|
+
key?: string;
|
|
47
|
+
reason?: string;
|
|
48
|
+
expiresAt?: CoreDate;
|
|
49
|
+
impact?: string;
|
|
13
50
|
attributes: Attribute[];
|
|
14
51
|
applyTo?: CoreAddress;
|
|
15
52
|
static from(value: IAttributesChangeRequest): Promise<AttributesChangeRequest>;
|
|
@@ -13,14 +13,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
exports.AttributesChangeRequest = void 0;
|
|
14
14
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
15
|
const transport_1 = require("@nmshd/transport");
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
let AttributesChangeRequest = AttributesChangeRequest_1 = class AttributesChangeRequest extends Request_1.Request {
|
|
16
|
+
const attributes_1 = require("../attributes");
|
|
17
|
+
let AttributesChangeRequest = AttributesChangeRequest_1 = class AttributesChangeRequest extends ts_serval_1.SerializableAsync {
|
|
19
18
|
static async from(value) {
|
|
20
19
|
return (await super.from(value, AttributesChangeRequest_1));
|
|
21
20
|
}
|
|
22
21
|
static async fromJSON(value) {
|
|
23
|
-
const parsedAttributes = await Promise.all(value.attributes.map((attribute) =>
|
|
22
|
+
const parsedAttributes = await Promise.all(value.attributes.map((attribute) => attributes_1.Attribute.fromJSON(attribute)));
|
|
24
23
|
return await this.from({
|
|
25
24
|
id: value.id ? transport_1.CoreId.from(value.id) : undefined,
|
|
26
25
|
attributes: parsedAttributes,
|
|
@@ -32,7 +31,32 @@ let AttributesChangeRequest = AttributesChangeRequest_1 = class AttributesChange
|
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
33
|
__decorate([
|
|
35
|
-
(0, ts_serval_1.serialize)(
|
|
34
|
+
(0, ts_serval_1.serialize)(),
|
|
35
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
36
|
+
__metadata("design:type", transport_1.CoreId)
|
|
37
|
+
], AttributesChangeRequest.prototype, "id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, ts_serval_1.serialize)(),
|
|
40
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], AttributesChangeRequest.prototype, "key", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, ts_serval_1.serialize)(),
|
|
45
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AttributesChangeRequest.prototype, "reason", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, ts_serval_1.serialize)(),
|
|
50
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
51
|
+
__metadata("design:type", transport_1.CoreDate)
|
|
52
|
+
], AttributesChangeRequest.prototype, "expiresAt", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, ts_serval_1.serialize)(),
|
|
55
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], AttributesChangeRequest.prototype, "impact", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, ts_serval_1.serialize)({ type: attributes_1.Attribute }),
|
|
36
60
|
(0, ts_serval_1.validate)(),
|
|
37
61
|
__metadata("design:type", Array)
|
|
38
62
|
], AttributesChangeRequest.prototype, "attributes", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributesChangeRequest.js","sourceRoot":"","sources":["../../src/requests/AttributesChangeRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"AttributesChangeRequest.js","sourceRoot":"","sources":["../../src/requests/AttributesChangeRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAAgG;AAChG,gDAAkG;AAClG,8CAAoE;AA+CpE,IAAa,uBAAuB,+BAApC,MAAa,uBAAwB,SAAQ,6BAAiB;IA6BnD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAA+B;QACpD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BAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACV,oBAAQ;0DAAA;AAI3B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACP;AAItB;IAFC,IAAA,qBAAS,EAAC,EAAE,IAAI,EAAE,sBAAS,EAAE,CAAC;IAC9B,IAAA,oBAAQ,GAAE;;2DACmB;AAI9B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACZ,uBAAW;wDAAA;AA3BnB,uBAAuB;IADnC,IAAA,gBAAI,EAAC,yBAAyB,CAAC;GACnB,uBAAuB,CA4CnC;AA5CY,0DAAuB"}
|
|
@@ -1,14 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { ISerializable, SerializableAsync } from "@js-soft/ts-serval";
|
|
2
|
+
import { CoreAddress, CoreDate, CoreId, ICoreAddress, ICoreDate, ICoreId } from "@nmshd/transport";
|
|
3
|
+
import { ContentJSON } from "../ContentJSON";
|
|
4
|
+
export interface AttributesShareRequestJSON extends ContentJSON {
|
|
5
|
+
id?: string;
|
|
6
|
+
key?: string;
|
|
7
|
+
reason?: string;
|
|
8
|
+
expiresAt?: string;
|
|
9
|
+
impact?: string;
|
|
4
10
|
attributes: string[];
|
|
5
11
|
recipients: string[];
|
|
6
12
|
}
|
|
7
|
-
export interface IAttributesShareRequest extends
|
|
13
|
+
export interface IAttributesShareRequest extends ISerializable {
|
|
14
|
+
id?: ICoreId;
|
|
15
|
+
/**
|
|
16
|
+
* The technial key of the request which is submitted back with the answer. This can be used
|
|
17
|
+
* for mapping requests and answers. The key should be unique and non-personal, best a random UUID.
|
|
18
|
+
* @default undefined - no key is used
|
|
19
|
+
*/
|
|
20
|
+
key?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The human-readable reason for this request. This can be used to provide the user with more input
|
|
23
|
+
* why this request is necessary and should be answered.
|
|
24
|
+
* @default undefined - no reason is given
|
|
25
|
+
*/
|
|
26
|
+
reason?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The point in time the request is considered obsolete either technically (e.g. the request is no longer
|
|
29
|
+
* valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer
|
|
30
|
+
* of interest).
|
|
31
|
+
* @default undefined - the request won't expire
|
|
32
|
+
*/
|
|
33
|
+
expiresAt?: ICoreDate;
|
|
34
|
+
/**
|
|
35
|
+
* The impact of this request. This can be used to show the user what happens if the user does not accept the request.
|
|
36
|
+
*
|
|
37
|
+
* @default undefined - no specific impact
|
|
38
|
+
*/
|
|
39
|
+
impact?: string;
|
|
8
40
|
attributes: string[];
|
|
9
41
|
recipients: ICoreAddress[];
|
|
10
42
|
}
|
|
11
|
-
export declare class AttributesShareRequest extends
|
|
43
|
+
export declare class AttributesShareRequest extends SerializableAsync implements IAttributesShareRequest {
|
|
44
|
+
id?: CoreId;
|
|
45
|
+
key?: string;
|
|
46
|
+
reason?: string;
|
|
47
|
+
expiresAt?: CoreDate;
|
|
48
|
+
impact?: string;
|
|
12
49
|
attributes: string[];
|
|
13
50
|
recipients: CoreAddress[];
|
|
14
51
|
static from(value: IAttributesShareRequest): Promise<AttributesShareRequest>;
|
|
@@ -13,12 +13,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
exports.AttributesShareRequest = void 0;
|
|
14
14
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
15
|
const transport_1 = require("@nmshd/transport");
|
|
16
|
-
|
|
17
|
-
let AttributesShareRequest = AttributesShareRequest_1 = class AttributesShareRequest extends Request_1.Request {
|
|
16
|
+
let AttributesShareRequest = AttributesShareRequest_1 = class AttributesShareRequest extends ts_serval_1.SerializableAsync {
|
|
18
17
|
static async from(value) {
|
|
19
18
|
return await super.fromT(value, AttributesShareRequest_1);
|
|
20
19
|
}
|
|
21
20
|
};
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, ts_serval_1.serialize)(),
|
|
23
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
24
|
+
__metadata("design:type", transport_1.CoreId)
|
|
25
|
+
], AttributesShareRequest.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, ts_serval_1.serialize)(),
|
|
28
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], AttributesShareRequest.prototype, "key", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, ts_serval_1.serialize)(),
|
|
33
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], AttributesShareRequest.prototype, "reason", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, ts_serval_1.serialize)(),
|
|
38
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
39
|
+
__metadata("design:type", transport_1.CoreDate)
|
|
40
|
+
], AttributesShareRequest.prototype, "expiresAt", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, ts_serval_1.serialize)(),
|
|
43
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], AttributesShareRequest.prototype, "impact", void 0);
|
|
22
46
|
__decorate([
|
|
23
47
|
(0, ts_serval_1.serialize)({ type: String }),
|
|
24
48
|
(0, ts_serval_1.validate)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributesShareRequest.js","sourceRoot":"","sources":["../../src/requests/AttributesShareRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"AttributesShareRequest.js","sourceRoot":"","sources":["../../src/requests/AttributesShareRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAAgG;AAChG,gDAAkG;AA+ClG,IAAa,sB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