@nmshd/content 2.3.6 → 2.3.7
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/buildInformation.js +4 -4
- package/dist/requests/items/succeedAttribute/SucceedAttributeRequestItem.d.ts +9 -20
- package/dist/requests/items/succeedAttribute/SucceedAttributeRequestItem.js +4 -31
- package/dist/requests/items/succeedAttribute/SucceedAttributeRequestItem.js.map +1 -1
- package/lib-web/nmshd.content.js +8 -35
- package/lib-web/nmshd.content.min.js +1 -1
- package/package.json +1 -1
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.3.
|
|
9
|
-
build: "
|
|
10
|
-
date: "2023-07-
|
|
11
|
-
commit: "
|
|
8
|
+
version: "2.3.7",
|
|
9
|
+
build: "136",
|
|
10
|
+
date: "2023-07-25T08:06:35+00:00",
|
|
11
|
+
commit: "4fcb5c1933d7dff2ed0f002cb438032859e2d0b3",
|
|
12
12
|
dependencies: {"@js-soft/logging-abstractions":"^1.0.0","@nmshd/iql":"^0.0.1","easy-tsnameof":"^3.0.6","mocha-param":"^2.0.1"},
|
|
13
13
|
libraries: {
|
|
14
14
|
serval: ts_serval_1.buildInformation,
|
|
@@ -1,40 +1,29 @@
|
|
|
1
|
-
import { Serializable } from "@js-soft/ts-serval";
|
|
2
1
|
import { CoreId, ICoreId } from "@nmshd/transport";
|
|
3
|
-
import {
|
|
2
|
+
import { IIdentityAttribute, IRelationshipAttribute, IdentityAttribute, IdentityAttributeJSON, RelationshipAttribute, RelationshipAttributeJSON } from "../../../attributes";
|
|
4
3
|
import { IRequestItem, RequestItem, RequestItemJSON } from "../../RequestItem";
|
|
5
4
|
export interface SucceedAttributeRequestItemJSON extends RequestItemJSON {
|
|
6
5
|
/**
|
|
7
6
|
* The id of the Attribute to be succeeded.
|
|
8
7
|
*/
|
|
9
|
-
|
|
8
|
+
succeededAttributeId: string;
|
|
10
9
|
/**
|
|
11
|
-
* The
|
|
10
|
+
* The new Attribute.
|
|
12
11
|
*/
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The new Attribute. Its validFrom date must be greater than the validTo date of the succeeded Attribute.
|
|
16
|
-
*/
|
|
17
|
-
newAttribute: IdentityAttributeJSON | RelationshipAttributeJSON;
|
|
12
|
+
attribute: IdentityAttributeJSON | RelationshipAttributeJSON;
|
|
18
13
|
}
|
|
19
14
|
export interface ISucceedAttributeRequestItem extends IRequestItem {
|
|
20
15
|
/**
|
|
21
16
|
* The id of the Attribute to be succeeded.
|
|
22
17
|
*/
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The succeeded Attribute with the updated validTo date. Its validTo date must be lower than the validFrom date of the new Attribute.
|
|
26
|
-
*/
|
|
27
|
-
succeededAttribute: IIdentityAttribute | IRelationshipAttribute;
|
|
18
|
+
succeededAttributeId: ICoreId;
|
|
28
19
|
/**
|
|
29
|
-
* The new Attribute.
|
|
20
|
+
* The new Attribute.
|
|
30
21
|
*/
|
|
31
|
-
|
|
22
|
+
attribute: IIdentityAttribute | IRelationshipAttribute;
|
|
32
23
|
}
|
|
33
24
|
export declare class SucceedAttributeRequestItem extends RequestItem implements ISucceedAttributeRequestItem {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
newAttribute: IdentityAttribute | RelationshipAttribute;
|
|
37
|
-
protected static postFrom<T extends Serializable>(value: T): T;
|
|
25
|
+
succeededAttributeId: CoreId;
|
|
26
|
+
attribute: IdentityAttribute | RelationshipAttribute;
|
|
38
27
|
static from(value: ISucceedAttributeRequestItem | SucceedAttributeRequestItemJSON): SucceedAttributeRequestItem;
|
|
39
28
|
toJSON(verbose?: boolean | undefined, serializeAsString?: boolean | undefined): SucceedAttributeRequestItemJSON;
|
|
40
29
|
}
|
|
@@ -8,35 +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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
var SucceedAttributeRequestItem_1;
|
|
15
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
12
|
exports.SucceedAttributeRequestItem = void 0;
|
|
17
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
18
14
|
const transport_1 = require("@nmshd/transport");
|
|
19
|
-
const easy_tsnameof_1 = __importDefault(require("easy-tsnameof"));
|
|
20
15
|
const attributes_1 = require("../../../attributes");
|
|
21
16
|
const RequestItem_1 = require("../../RequestItem");
|
|
22
|
-
let SucceedAttributeRequestItem =
|
|
23
|
-
static postFrom(value) {
|
|
24
|
-
if (!(value instanceof SucceedAttributeRequestItem_1))
|
|
25
|
-
throw new Error("this should never happen");
|
|
26
|
-
if (value.succeededAttribute.toJSON()["@type"] !== value.newAttribute.toJSON()["@type"]) {
|
|
27
|
-
throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.succeededAttribute), "the type of the new Attribute must be the same as the type of the succeeded Attribute");
|
|
28
|
-
}
|
|
29
|
-
if (!value.succeededAttribute.validTo) {
|
|
30
|
-
throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.succeededAttribute.validTo), "succeededAttribute must have a validTo date");
|
|
31
|
-
}
|
|
32
|
-
if (!value.newAttribute.validFrom) {
|
|
33
|
-
throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.newAttribute.validFrom), "newAttribute must have a validFrom date");
|
|
34
|
-
}
|
|
35
|
-
if (!value.succeededAttribute.validTo.add({ day: 1 }).isSame(value.newAttribute.validFrom, "day")) {
|
|
36
|
-
throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.succeededAttribute.validTo), "the validTo date of the succeeded Attribute must be one day before the validFrom date of the new Attribute");
|
|
37
|
-
}
|
|
38
|
-
return value;
|
|
39
|
-
}
|
|
17
|
+
let SucceedAttributeRequestItem = class SucceedAttributeRequestItem extends RequestItem_1.RequestItem {
|
|
40
18
|
static from(value) {
|
|
41
19
|
return this.fromAny(value);
|
|
42
20
|
}
|
|
@@ -48,18 +26,13 @@ __decorate([
|
|
|
48
26
|
(0, ts_serval_1.validate)(),
|
|
49
27
|
(0, ts_serval_1.serialize)(),
|
|
50
28
|
__metadata("design:type", transport_1.CoreId)
|
|
51
|
-
], SucceedAttributeRequestItem.prototype, "
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, ts_serval_1.validate)(),
|
|
54
|
-
(0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttribute, attributes_1.RelationshipAttribute] }),
|
|
55
|
-
__metadata("design:type", Object)
|
|
56
|
-
], SucceedAttributeRequestItem.prototype, "succeededAttribute", void 0);
|
|
29
|
+
], SucceedAttributeRequestItem.prototype, "succeededAttributeId", void 0);
|
|
57
30
|
__decorate([
|
|
58
31
|
(0, ts_serval_1.validate)(),
|
|
59
32
|
(0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttribute, attributes_1.RelationshipAttribute] }),
|
|
60
33
|
__metadata("design:type", Object)
|
|
61
|
-
], SucceedAttributeRequestItem.prototype, "
|
|
62
|
-
SucceedAttributeRequestItem =
|
|
34
|
+
], SucceedAttributeRequestItem.prototype, "attribute", void 0);
|
|
35
|
+
SucceedAttributeRequestItem = __decorate([
|
|
63
36
|
(0, ts_serval_1.type)("SucceedAttributeRequestItem")
|
|
64
37
|
], SucceedAttributeRequestItem);
|
|
65
38
|
exports.SucceedAttributeRequestItem = SucceedAttributeRequestItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SucceedAttributeRequestItem.js","sourceRoot":"","sources":["../../../../src/requests/items/succeedAttribute/SucceedAttributeRequestItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SucceedAttributeRequestItem.js","sourceRoot":"","sources":["../../../../src/requests/items/succeedAttribute/SucceedAttributeRequestItem.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,gDAAkD;AAClD,oDAO4B;AAC5B,mDAA8E;AA2BvE,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,yBAAW;IASjD,MAAM,CAAC,IAAI,CACd,KAAqE;QAErE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;IAEe,MAAM,CAClB,OAA6B,EAC7B,iBAAuC;QAEvC,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAoC,CAAA;IACtF,CAAC;CACJ,CAAA;AApBG;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACiB,kBAAM;yEAAA;AAEnC;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,8BAAiB,EAAE,kCAAqB,CAAC,EAAE,CAAC;;8DACX;AAPlD,2BAA2B;IADvC,IAAA,gBAAI,EAAC,6BAA6B,CAAC;GACvB,2BAA2B,CAqBvC;AArBY,kEAA2B"}
|
package/lib-web/nmshd.content.js
CHANGED
|
@@ -6242,10 +6242,10 @@ const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-s
|
|
|
6242
6242
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
6243
6243
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
6244
6244
|
exports.buildInformation = {
|
|
6245
|
-
version: "2.3.
|
|
6246
|
-
build: "
|
|
6247
|
-
date: "2023-07-
|
|
6248
|
-
commit: "
|
|
6245
|
+
version: "2.3.7",
|
|
6246
|
+
build: "136",
|
|
6247
|
+
date: "2023-07-25T08:06:35+00:00",
|
|
6248
|
+
commit: "4fcb5c1933d7dff2ed0f002cb438032859e2d0b3",
|
|
6249
6249
|
dependencies: {"@js-soft/logging-abstractions":"^1.0.0","@nmshd/iql":"^0.0.1","easy-tsnameof":"^3.0.6","mocha-param":"^2.0.1"},
|
|
6250
6250
|
libraries: {
|
|
6251
6251
|
serval: ts_serval_1.buildInformation,
|
|
@@ -7408,35 +7408,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7408
7408
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
7409
7409
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
7410
7410
|
};
|
|
7411
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7412
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7413
|
-
};
|
|
7414
|
-
var SucceedAttributeRequestItem_1;
|
|
7415
7411
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7416
7412
|
exports.SucceedAttributeRequestItem = void 0;
|
|
7417
7413
|
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
7418
7414
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
7419
|
-
const easy_tsnameof_1 = __importDefault(__webpack_require__(/*! easy-tsnameof */ "./node_modules/easy-tsnameof/dist/easy-tsnameof.esm.js"));
|
|
7420
7415
|
const attributes_1 = __webpack_require__(/*! ../../../attributes */ "./dist/attributes/index.js");
|
|
7421
7416
|
const RequestItem_1 = __webpack_require__(/*! ../../RequestItem */ "./dist/requests/RequestItem.js");
|
|
7422
|
-
let SucceedAttributeRequestItem =
|
|
7423
|
-
static postFrom(value) {
|
|
7424
|
-
if (!(value instanceof SucceedAttributeRequestItem_1))
|
|
7425
|
-
throw new Error("this should never happen");
|
|
7426
|
-
if (value.succeededAttribute.toJSON()["@type"] !== value.newAttribute.toJSON()["@type"]) {
|
|
7427
|
-
throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.succeededAttribute), "the type of the new Attribute must be the same as the type of the succeeded Attribute");
|
|
7428
|
-
}
|
|
7429
|
-
if (!value.succeededAttribute.validTo) {
|
|
7430
|
-
throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.succeededAttribute.validTo), "succeededAttribute must have a validTo date");
|
|
7431
|
-
}
|
|
7432
|
-
if (!value.newAttribute.validFrom) {
|
|
7433
|
-
throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.newAttribute.validFrom), "newAttribute must have a validFrom date");
|
|
7434
|
-
}
|
|
7435
|
-
if (!value.succeededAttribute.validTo.add({ day: 1 }).isSame(value.newAttribute.validFrom, "day")) {
|
|
7436
|
-
throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.succeededAttribute.validTo), "the validTo date of the succeeded Attribute must be one day before the validFrom date of the new Attribute");
|
|
7437
|
-
}
|
|
7438
|
-
return value;
|
|
7439
|
-
}
|
|
7417
|
+
let SucceedAttributeRequestItem = class SucceedAttributeRequestItem extends RequestItem_1.RequestItem {
|
|
7440
7418
|
static from(value) {
|
|
7441
7419
|
return this.fromAny(value);
|
|
7442
7420
|
}
|
|
@@ -7448,18 +7426,13 @@ __decorate([
|
|
|
7448
7426
|
(0, ts_serval_1.validate)(),
|
|
7449
7427
|
(0, ts_serval_1.serialize)(),
|
|
7450
7428
|
__metadata("design:type", transport_1.CoreId)
|
|
7451
|
-
], SucceedAttributeRequestItem.prototype, "
|
|
7452
|
-
__decorate([
|
|
7453
|
-
(0, ts_serval_1.validate)(),
|
|
7454
|
-
(0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttribute, attributes_1.RelationshipAttribute] }),
|
|
7455
|
-
__metadata("design:type", Object)
|
|
7456
|
-
], SucceedAttributeRequestItem.prototype, "succeededAttribute", void 0);
|
|
7429
|
+
], SucceedAttributeRequestItem.prototype, "succeededAttributeId", void 0);
|
|
7457
7430
|
__decorate([
|
|
7458
7431
|
(0, ts_serval_1.validate)(),
|
|
7459
7432
|
(0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttribute, attributes_1.RelationshipAttribute] }),
|
|
7460
7433
|
__metadata("design:type", Object)
|
|
7461
|
-
], SucceedAttributeRequestItem.prototype, "
|
|
7462
|
-
SucceedAttributeRequestItem =
|
|
7434
|
+
], SucceedAttributeRequestItem.prototype, "attribute", void 0);
|
|
7435
|
+
SucceedAttributeRequestItem = __decorate([
|
|
7463
7436
|
(0, ts_serval_1.type)("SucceedAttributeRequestItem")
|
|
7464
7437
|
], SucceedAttributeRequestItem);
|
|
7465
7438
|
exports.SucceedAttributeRequestItem = SucceedAttributeRequestItem;
|