@nmshd/content 2.3.5 → 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.
@@ -43,16 +43,22 @@ export interface RelationshipAttributeQueryJSON extends AbstractAttributeQueryJS
43
43
  key: string;
44
44
  owner: string;
45
45
  attributeCreationHints: RelationshipAttributeCreationHintsJSON;
46
+ validFrom?: string;
47
+ validTo?: string;
46
48
  }
47
49
  export interface IRelationshipAttributeQuery extends IAbstractAttributeQuery {
48
50
  key: string;
49
51
  owner: ICoreAddress;
50
52
  attributeCreationHints: IRelationshipAttributeCreationHints;
53
+ validFrom?: ICoreDate;
54
+ validTo?: ICoreDate;
51
55
  }
52
56
  export declare class RelationshipAttributeQuery extends AbstractAttributeQuery implements IRelationshipAttributeQuery {
53
57
  key: string;
54
58
  owner: CoreAddress;
55
59
  attributeCreationHints: RelationshipAttributeCreationHints;
60
+ validFrom?: CoreDate;
61
+ validTo?: CoreDate;
56
62
  static from(value: IRelationshipAttributeQuery | Omit<RelationshipAttributeQueryJSON, "@type">): RelationshipAttributeQuery;
57
63
  toJSON(verbose?: boolean | undefined, serializeAsString?: boolean | undefined): RelationshipAttributeQueryJSON;
58
64
  }
@@ -102,6 +102,16 @@ __decorate([
102
102
  (0, ts_serval_1.validate)(),
103
103
  __metadata("design:type", RelationshipAttributeCreationHints)
104
104
  ], RelationshipAttributeQuery.prototype, "attributeCreationHints", void 0);
105
+ __decorate([
106
+ (0, ts_serval_1.serialize)(),
107
+ (0, ts_serval_1.validate)({ nullable: true }),
108
+ __metadata("design:type", transport_1.CoreDate)
109
+ ], RelationshipAttributeQuery.prototype, "validFrom", void 0);
110
+ __decorate([
111
+ (0, ts_serval_1.serialize)(),
112
+ (0, ts_serval_1.validate)({ nullable: true }),
113
+ __metadata("design:type", transport_1.CoreDate)
114
+ ], RelationshipAttributeQuery.prototype, "validTo", void 0);
105
115
  RelationshipAttributeQuery = __decorate([
106
116
  (0, ts_serval_1.type)("RelationshipAttributeQuery")
107
117
  ], RelationshipAttributeQuery);
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipAttributeQuery.js","sourceRoot":"","sources":["../../src/attributes/RelationshipAttributeQuery.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAC3F,gDAAiF;AACjF,qEAAsH;AACtH,+DAAuD;AACvD,iGAA6F;AAC7F,mCAAiE;AACjE,6FAA4G;AAsB5G;;;;GAIG;AAEI,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,wBAAY;IAuCtD,MAAM,CAAU,OAAO,CAAC,KAAU;QACxC,IAAI,OAAO,KAAK,CAAC,WAAW,KAAK,WAAW;YAAE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAA;QAEvE,OAAO,KAAK,CAAA;IAChB,CAAC;IAEM,MAAM,CAAC,IAAI,CACd,KAAkG;QAElG,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAjDG;IAAC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;;iEACH;AAEpB;IAAC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CACnB,CAAC,qCAAe,CAAC,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChD,CAAC,CAAC,mBAAmB,qCAAe,CAAC,YAAY,CAAC,sBAAsB,EAAE;YAC1E,CAAC,CAAC,SAAS;KACtB,CAAC;;qEACqD;AAEvD;IAAC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,wEAA4C,EAAE,CAAC;;uEACrD;AAE3B;IAAC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC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jE;IAAC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACV,oBAAQ;6DAAA;AAE3B;IAAC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACZ,oBAAQ;2DAAA;AAnBhB,0BAA0B;IADtC,IAAA,gBAAI,EAAC,4BAA4B,CAAC;GACtB,0BAA0B,CAiCtC;AAjCY,gEAA0B"}
@@ -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.5",
9
- build: "134",
10
- date: "2023-07-13T12:50:19+00:00",
11
- commit: "6cc29a9c7249d3bfd403a04eccf43355680bc9de",
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 { IdentityAttribute, IdentityAttributeJSON, IIdentityAttribute, IRelationshipAttribute, RelationshipAttribute, RelationshipAttributeJSON } from "../../../attributes";
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
- succeededId: string;
8
+ succeededAttributeId: string;
10
9
  /**
11
- * The succeeded Attribute with the updated validTo date. Its validTo date must be lower than the validFrom date of the new Attribute.
10
+ * The new Attribute.
12
11
  */
13
- succeededAttribute: IdentityAttributeJSON | RelationshipAttributeJSON;
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
- succeededId: ICoreId;
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. Its validFrom date must be greater than the validTo date of the succeeded Attribute.
20
+ * The new Attribute.
30
21
  */
31
- newAttribute: IIdentityAttribute | IRelationshipAttribute;
22
+ attribute: IIdentityAttribute | IRelationshipAttribute;
32
23
  }
33
24
  export declare class SucceedAttributeRequestItem extends RequestItem implements ISucceedAttributeRequestItem {
34
- succeededId: CoreId;
35
- succeededAttribute: IdentityAttribute | RelationshipAttribute;
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 = SucceedAttributeRequestItem_1 = class SucceedAttributeRequestItem extends RequestItem_1.RequestItem {
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, "succeededId", void 0);
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, "newAttribute", void 0);
62
- SucceedAttributeRequestItem = SucceedAttributeRequestItem_1 = __decorate([
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":";;;;;;;;;;;;;;;;AAAA,kDAA6F;AAC7F,gDAAkD;AAClD,kEAAkC;AAClC,oDAO4B;AAC5B,mDAA8E;AAmCvE,IAAM,2BAA2B,mCAAjC,MAAM,2BAA4B,SAAQ,yBAAW;IAa9C,MAAM,CAAU,QAAQ,CAAyB,KAAQ;QAC/D,IAAI,CAAC,CAAC,KAAK,YAAY,6BAA2B,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAA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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;AA7DG;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACQ,kBAAM;gEAAA;AAE1B;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,8BAAiB,EAAE,kCAAqB,CAAC,EAAE,CAAC;;uEACF;AAEpE;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,8BAAiB,EAAE,kCAAqB,CAAC,EAAE,CAAC;;iEACR;AAXrD,2BAA2B;IADvC,IAAA,gBAAI,EAAC,6BAA6B,CAAC;GACvB,2BAA2B,CA8DvC;AA9DY,kEAA2B"}
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"}
@@ -704,6 +704,16 @@ __decorate([
704
704
  (0, ts_serval_1.validate)(),
705
705
  __metadata("design:type", RelationshipAttributeCreationHints)
706
706
  ], RelationshipAttributeQuery.prototype, "attributeCreationHints", void 0);
707
+ __decorate([
708
+ (0, ts_serval_1.serialize)(),
709
+ (0, ts_serval_1.validate)({ nullable: true }),
710
+ __metadata("design:type", transport_1.CoreDate)
711
+ ], RelationshipAttributeQuery.prototype, "validFrom", void 0);
712
+ __decorate([
713
+ (0, ts_serval_1.serialize)(),
714
+ (0, ts_serval_1.validate)({ nullable: true }),
715
+ __metadata("design:type", transport_1.CoreDate)
716
+ ], RelationshipAttributeQuery.prototype, "validTo", void 0);
707
717
  RelationshipAttributeQuery = __decorate([
708
718
  (0, ts_serval_1.type)("RelationshipAttributeQuery")
709
719
  ], RelationshipAttributeQuery);
@@ -6232,10 +6242,10 @@ const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-s
6232
6242
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
6233
6243
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
6234
6244
  exports.buildInformation = {
6235
- version: "2.3.5",
6236
- build: "134",
6237
- date: "2023-07-13T12:50:19+00:00",
6238
- commit: "6cc29a9c7249d3bfd403a04eccf43355680bc9de",
6245
+ version: "2.3.7",
6246
+ build: "136",
6247
+ date: "2023-07-25T08:06:35+00:00",
6248
+ commit: "4fcb5c1933d7dff2ed0f002cb438032859e2d0b3",
6239
6249
  dependencies: {"@js-soft/logging-abstractions":"^1.0.0","@nmshd/iql":"^0.0.1","easy-tsnameof":"^3.0.6","mocha-param":"^2.0.1"},
6240
6250
  libraries: {
6241
6251
  serval: ts_serval_1.buildInformation,
@@ -7398,35 +7408,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7398
7408
  var __metadata = (this && this.__metadata) || function (k, v) {
7399
7409
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
7400
7410
  };
7401
- var __importDefault = (this && this.__importDefault) || function (mod) {
7402
- return (mod && mod.__esModule) ? mod : { "default": mod };
7403
- };
7404
- var SucceedAttributeRequestItem_1;
7405
7411
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7406
7412
  exports.SucceedAttributeRequestItem = void 0;
7407
7413
  const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
7408
7414
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
7409
- const easy_tsnameof_1 = __importDefault(__webpack_require__(/*! easy-tsnameof */ "./node_modules/easy-tsnameof/dist/easy-tsnameof.esm.js"));
7410
7415
  const attributes_1 = __webpack_require__(/*! ../../../attributes */ "./dist/attributes/index.js");
7411
7416
  const RequestItem_1 = __webpack_require__(/*! ../../RequestItem */ "./dist/requests/RequestItem.js");
7412
- let SucceedAttributeRequestItem = SucceedAttributeRequestItem_1 = class SucceedAttributeRequestItem extends RequestItem_1.RequestItem {
7413
- static postFrom(value) {
7414
- if (!(value instanceof SucceedAttributeRequestItem_1))
7415
- throw new Error("this should never happen");
7416
- if (value.succeededAttribute.toJSON()["@type"] !== value.newAttribute.toJSON()["@type"]) {
7417
- 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");
7418
- }
7419
- if (!value.succeededAttribute.validTo) {
7420
- throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.succeededAttribute.validTo), "succeededAttribute must have a validTo date");
7421
- }
7422
- if (!value.newAttribute.validFrom) {
7423
- throw new ts_serval_1.ValidationError(SucceedAttributeRequestItem_1.name, (0, easy_tsnameof_1.default)((x) => x.newAttribute.validFrom), "newAttribute must have a validFrom date");
7424
- }
7425
- if (!value.succeededAttribute.validTo.add({ day: 1 }).isSame(value.newAttribute.validFrom, "day")) {
7426
- 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");
7427
- }
7428
- return value;
7429
- }
7417
+ let SucceedAttributeRequestItem = class SucceedAttributeRequestItem extends RequestItem_1.RequestItem {
7430
7418
  static from(value) {
7431
7419
  return this.fromAny(value);
7432
7420
  }
@@ -7438,18 +7426,13 @@ __decorate([
7438
7426
  (0, ts_serval_1.validate)(),
7439
7427
  (0, ts_serval_1.serialize)(),
7440
7428
  __metadata("design:type", transport_1.CoreId)
7441
- ], SucceedAttributeRequestItem.prototype, "succeededId", void 0);
7442
- __decorate([
7443
- (0, ts_serval_1.validate)(),
7444
- (0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttribute, attributes_1.RelationshipAttribute] }),
7445
- __metadata("design:type", Object)
7446
- ], SucceedAttributeRequestItem.prototype, "succeededAttribute", void 0);
7429
+ ], SucceedAttributeRequestItem.prototype, "succeededAttributeId", void 0);
7447
7430
  __decorate([
7448
7431
  (0, ts_serval_1.validate)(),
7449
7432
  (0, ts_serval_1.serialize)({ unionTypes: [attributes_1.IdentityAttribute, attributes_1.RelationshipAttribute] }),
7450
7433
  __metadata("design:type", Object)
7451
- ], SucceedAttributeRequestItem.prototype, "newAttribute", void 0);
7452
- SucceedAttributeRequestItem = SucceedAttributeRequestItem_1 = __decorate([
7434
+ ], SucceedAttributeRequestItem.prototype, "attribute", void 0);
7435
+ SucceedAttributeRequestItem = __decorate([
7453
7436
  (0, ts_serval_1.type)("SucceedAttributeRequestItem")
7454
7437
  ], SucceedAttributeRequestItem);
7455
7438
  exports.SucceedAttributeRequestItem = SucceedAttributeRequestItem;