@nmshd/runtime 3.3.0 → 3.4.1

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.
Files changed (24) hide show
  1. package/dist/buildInformation.js +4 -4
  2. package/dist/dataViews/content/RequestItemDVOs.d.ts +1 -0
  3. package/dist/useCases/common/Schemas.js +9 -0
  4. package/dist/useCases/common/Schemas.js.map +1 -1
  5. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.d.ts +7 -2
  6. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.js +17 -3
  7. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.js.map +1 -1
  8. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.d.ts +7 -2
  9. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.js +17 -3
  10. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.js.map +1 -1
  11. package/dist/useCases/consumption/attributes/NotifyPeerAboutIdentityAttributeSuccession.d.ts +2 -1
  12. package/dist/useCases/consumption/attributes/NotifyPeerAboutIdentityAttributeSuccession.js +2 -1
  13. package/dist/useCases/consumption/attributes/NotifyPeerAboutIdentityAttributeSuccession.js.map +1 -1
  14. package/dist/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.d.ts +2 -1
  15. package/dist/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.js +2 -1
  16. package/dist/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.js.map +1 -1
  17. package/dist/useCases/transport/relationships/GetAttributesForRelationship.d.ts +1 -0
  18. package/dist/useCases/transport/relationships/GetAttributesForRelationship.js +5 -4
  19. package/dist/useCases/transport/relationships/GetAttributesForRelationship.js.map +1 -1
  20. package/lib-web/nmshd.runtime.js +56 -16
  21. package/lib-web/nmshd.runtime.js.map +1 -1
  22. package/lib-web/nmshd.runtime.min.js +2 -2
  23. package/lib-web/nmshd.runtime.min.js.map +1 -1
  24. package/package.json +2 -2
@@ -2,12 +2,13 @@ import { Result } from "@js-soft/ts-utils";
2
2
  import { AttributesController } from "@nmshd/consumption";
3
3
  import { IdentityController } from "@nmshd/transport";
4
4
  import { LocalAttributeDTO } from "../../../types";
5
- import { AddressString, UseCase } from "../../common";
5
+ import { AddressString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
6
6
  export interface GetOwnSharedAttributesRequest {
7
7
  peer: AddressString;
8
8
  onlyValid?: boolean;
9
9
  query?: GetOwnSharedAttributeRequestQuery;
10
10
  hideTechnical?: boolean;
11
+ onlyLatestVersions?: boolean;
11
12
  }
12
13
  export interface GetOwnSharedAttributeRequestQuery {
13
14
  createdAt?: string;
@@ -24,9 +25,13 @@ export interface GetOwnSharedAttributeRequestQuery {
24
25
  "shareInfo.notificationReference"?: string | string[];
25
26
  "shareInfo.sourceAttribute"?: string | string[];
26
27
  }
28
+ declare class Validator extends SchemaValidator<GetOwnSharedAttributesRequest> {
29
+ constructor(schemaRepository: SchemaRepository);
30
+ }
27
31
  export declare class GetOwnSharedAttributesUseCase extends UseCase<GetOwnSharedAttributesRequest, LocalAttributeDTO[]> {
28
32
  private readonly attributeController;
29
33
  private readonly identityController;
30
- constructor(attributeController: AttributesController, identityController: IdentityController);
34
+ constructor(attributeController: AttributesController, identityController: IdentityController, validator: Validator);
31
35
  protected executeInternal(request: GetOwnSharedAttributesRequest): Promise<Result<LocalAttributeDTO[]>>;
32
36
  }
37
+ export {};
@@ -21,9 +21,18 @@ const common_1 = require("../../common");
21
21
  const flattenObject_1 = require("../../common/flattenObject");
22
22
  const AttributeMapper_1 = require("./AttributeMapper");
23
23
  const GetAttributes_1 = require("./GetAttributes");
24
+ let Validator = class Validator extends common_1.SchemaValidator {
25
+ constructor(schemaRepository) {
26
+ super(schemaRepository.getSchema("GetOwnSharedAttributesRequest"));
27
+ }
28
+ };
29
+ Validator = __decorate([
30
+ __param(0, typescript_ioc_1.Inject),
31
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
32
+ ], Validator);
24
33
  let GetOwnSharedAttributesUseCase = class GetOwnSharedAttributesUseCase extends common_1.UseCase {
25
- constructor(attributeController, identityController) {
26
- super();
34
+ constructor(attributeController, identityController, validator) {
35
+ super(validator);
27
36
  this.attributeController = attributeController;
28
37
  this.identityController = identityController;
29
38
  }
@@ -33,6 +42,9 @@ let GetOwnSharedAttributesUseCase = class GetOwnSharedAttributesUseCase extends
33
42
  query["shareInfo.peer"] = request.peer;
34
43
  const flattenedQuery = (0, flattenObject_1.flattenObject)(query);
35
44
  const dbQuery = GetAttributes_1.GetAttributesUseCase.queryTranslator.parse(flattenedQuery);
45
+ if (request.onlyLatestVersions ?? true) {
46
+ dbQuery["succeededBy"] = { $exists: false };
47
+ }
36
48
  const attributes = await this.attributeController.getLocalAttributes(dbQuery, request.hideTechnical, request.onlyValid);
37
49
  return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
38
50
  }
@@ -41,7 +53,9 @@ exports.GetOwnSharedAttributesUseCase = GetOwnSharedAttributesUseCase;
41
53
  exports.GetOwnSharedAttributesUseCase = GetOwnSharedAttributesUseCase = __decorate([
42
54
  __param(0, typescript_ioc_1.Inject),
43
55
  __param(1, typescript_ioc_1.Inject),
56
+ __param(2, typescript_ioc_1.Inject),
44
57
  __metadata("design:paramtypes", [consumption_1.AttributesController,
45
- transport_1.IdentityController])
58
+ transport_1.IdentityController,
59
+ Validator])
46
60
  ], GetOwnSharedAttributesUseCase);
47
61
  //# sourceMappingURL=GetOwnSharedAttributes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GetOwnSharedAttributes.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/GetOwnSharedAttributes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0D;AAC1D,gDAAsD;AACtD,mDAAwC;AAExC,yCAAsD;AACtD,8DAA2D;AAC3D,uDAAoD;AACpD,mDAAkF;AAyBlF,IAAa,6BAA6B,GAA1C,MAAa,6BAA8B,SAAQ,gBAA2D;IAC1G,YAC6B,mBAAyC,EACzC,kBAAsC;QAE/D,KAAK,EAAE,CAAC;QAHiB,wBAAmB,GAAnB,mBAAmB,CAAsB;QACzC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAGnE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAsC;QAClE,MAAM,KAAK,GAA8B,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QAC7D,KAAK,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAEpE,KAAK,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QAEvC,MAAM,cAAc,GAAG,IAAA,6BAAa,EAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,oCAAoB,CAAC,eAAe,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAE3E,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QAExH,OAAO,iBAAM,CAAC,EAAE,CAAC,iCAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC;IACrE,CAAC;CACJ,CAAA;AArBY,sEAA6B;wCAA7B,6BAA6B;IAEjC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADuC,kCAAoB;QACrB,8BAAkB;GAH1D,6BAA6B,CAqBzC"}
1
+ {"version":3,"file":"GetOwnSharedAttributes.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/GetOwnSharedAttributes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0D;AAC1D,gDAAsD;AACtD,mDAAwC;AAExC,yCAAyF;AACzF,8DAA2D;AAC3D,uDAAoD;AACpD,mDAAkF;AA0BlF,IAAM,SAAS,GA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ACJ,CAAA;AA1BY,sEAA6B;wCAA7B,6BAA6B;IAEjC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAFuC,kCAAoB;QACrB,8BAAkB;QAC5C,SAAS;GAJvB,6BAA6B,CA0BzC"}
@@ -1,12 +1,13 @@
1
1
  import { Result } from "@js-soft/ts-utils";
2
2
  import { AttributesController } from "@nmshd/consumption";
3
3
  import { LocalAttributeDTO } from "../../../types";
4
- import { AddressString, UseCase } from "../../common";
4
+ import { AddressString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
5
  export interface GetPeerSharedAttributesRequest {
6
6
  peer: AddressString;
7
7
  onlyValid?: boolean;
8
8
  query?: GetPeerSharedAttributesRequestQuery;
9
9
  hideTechnical?: boolean;
10
+ onlyLatestVersions?: boolean;
10
11
  }
11
12
  export interface GetPeerSharedAttributesRequestQuery {
12
13
  createdAt?: string;
@@ -22,8 +23,12 @@ export interface GetPeerSharedAttributesRequestQuery {
22
23
  "shareInfo.requestReference"?: string | string[];
23
24
  "shareInfo.notificationReference"?: string | string[];
24
25
  }
26
+ declare class Validator extends SchemaValidator<GetPeerSharedAttributesRequest> {
27
+ constructor(schemaRepository: SchemaRepository);
28
+ }
25
29
  export declare class GetPeerSharedAttributesUseCase extends UseCase<GetPeerSharedAttributesRequest, LocalAttributeDTO[]> {
26
30
  private readonly attributeController;
27
- constructor(attributeController: AttributesController);
31
+ constructor(attributeController: AttributesController, validator: Validator);
28
32
  protected executeInternal(request: GetPeerSharedAttributesRequest): Promise<Result<LocalAttributeDTO[]>>;
29
33
  }
34
+ export {};
@@ -20,9 +20,18 @@ const common_1 = require("../../common");
20
20
  const flattenObject_1 = require("../../common/flattenObject");
21
21
  const AttributeMapper_1 = require("./AttributeMapper");
22
22
  const GetAttributes_1 = require("./GetAttributes");
23
+ let Validator = class Validator extends common_1.SchemaValidator {
24
+ constructor(schemaRepository) {
25
+ super(schemaRepository.getSchema("GetPeerSharedAttributesRequest"));
26
+ }
27
+ };
28
+ Validator = __decorate([
29
+ __param(0, typescript_ioc_1.Inject),
30
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
31
+ ], Validator);
23
32
  let GetPeerSharedAttributesUseCase = class GetPeerSharedAttributesUseCase extends common_1.UseCase {
24
- constructor(attributeController) {
25
- super();
33
+ constructor(attributeController, validator) {
34
+ super(validator);
26
35
  this.attributeController = attributeController;
27
36
  }
28
37
  async executeInternal(request) {
@@ -30,6 +39,9 @@ let GetPeerSharedAttributesUseCase = class GetPeerSharedAttributesUseCase extend
30
39
  query["content.owner"] = request.peer;
31
40
  const flattenedQuery = (0, flattenObject_1.flattenObject)(query);
32
41
  const dbQuery = GetAttributes_1.GetAttributesUseCase.queryTranslator.parse(flattenedQuery);
42
+ if (request.onlyLatestVersions ?? true) {
43
+ dbQuery["succeededBy"] = { $exists: false };
44
+ }
33
45
  const attributes = await this.attributeController.getLocalAttributes(dbQuery, request.hideTechnical, request.onlyValid);
34
46
  return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
35
47
  }
@@ -37,6 +49,8 @@ let GetPeerSharedAttributesUseCase = class GetPeerSharedAttributesUseCase extend
37
49
  exports.GetPeerSharedAttributesUseCase = GetPeerSharedAttributesUseCase;
38
50
  exports.GetPeerSharedAttributesUseCase = GetPeerSharedAttributesUseCase = __decorate([
39
51
  __param(0, typescript_ioc_1.Inject),
40
- __metadata("design:paramtypes", [consumption_1.AttributesController])
52
+ __param(1, typescript_ioc_1.Inject),
53
+ __metadata("design:paramtypes", [consumption_1.AttributesController,
54
+ Validator])
41
55
  ], GetPeerSharedAttributesUseCase);
42
56
  //# sourceMappingURL=GetPeerSharedAttributes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GetPeerSharedAttributes.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/GetPeerSharedAttributes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0D;AAC1D,mDAAwC;AAExC,yCAAsD;AACtD,8DAA2D;AAC3D,uDAAoD;AACpD,mDAAkF;AAwBlF,IAAa,8BAA8B,GAA3C,MAAa,8BAA+B,SAAQ,gBAA4D;IAC5G,YAA4C,mBAAyC;QACjF,KAAK,EAAE,CAAC;QADgC,wBAAmB,GAAnB,mBAAmB,CAAsB;IAErF,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAuC;QACnE,MAAM,KAAK,GAA8B,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QAC7D,KAAK,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QAEtC,MAAM,cAAc,GAAG,IAAA,6BAAa,EAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,oCAAoB,CAAC,eAAe,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAE3E,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QAExH,OAAO,iBAAM,CAAC,EAAE,CAAC,iCAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC;IACrE,CAAC;CACJ,CAAA;AAhBY,wEAA8B;yCAA9B,8BAA8B;IACnB,WAAA,uBAAM,CAAA;qCAAuC,kCAAoB;GAD5E,8BAA8B,CAgB1C"}
1
+ {"version":3,"file":"GetPeerSharedAttributes.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/GetPeerSharedAttributes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0D;AAC1D,mDAAwC;AAExC,yCAAyF;AACzF,8DAA2D;AAC3D,uDAAoD;AACpD,mDAAkF;AAyBlF,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA+C;IACnE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SA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ccountController, MessageController } from "@nmshd/transport";
3
+ import { AccountController, CoreId, MessageController } from "@nmshd/transport";
4
4
  import { LocalAttributeDTO } from "../../../types";
5
5
  import { AddressString, AttributeIdString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
6
6
  export interface NotifyPeerAboutIdentityAttributeSuccessionResponse {
7
7
  predecessor: LocalAttributeDTO;
8
8
  successor: LocalAttributeDTO;
9
+ notificationId: CoreId;
9
10
  }
10
11
  export interface NotifyPeerAboutIdentityAttributeSuccessionRequest {
11
12
  attributeId: AttributeIdString;
@@ -96,7 +96,8 @@ let NotifyPeerAboutIdentityAttributeSuccessionUseCase = class NotifyPeerAboutIde
96
96
  await this.accountController.syncDatawallet();
97
97
  const result = {
98
98
  predecessor: AttributeMapper_1.AttributeMapper.toAttributeDTO(updatedOwnSharedIdentityAttributePredecessor),
99
- successor: AttributeMapper_1.AttributeMapper.toAttributeDTO(ownSharedIdentityAttributeSuccessor)
99
+ successor: AttributeMapper_1.AttributeMapper.toAttributeDTO(ownSharedIdentityAttributeSuccessor),
100
+ notificationId: notificationId
100
101
  };
101
102
  return ts_utils_1.Result.ok(result);
102
103
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NotifyPeerAboutIdentityAttributeSuccession.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/NotifyPeerAboutIdentityAttributeSuccession.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAqH;AACrH,4CAA4F;AAC5F,gDAAgF;AAChF,mDAAwC;AAExC,yCAA2H;AAC3H,uDAAoD;AAYpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAkE;IACtF,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,mDAAmD,CAAC,CAAC,CAAC;IAC3F,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,iDA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CAAC;SACjF,CAAC;QACF,OAAO,iBAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;CACJ,CAAA;AAhGY,8GAAiD;4DAAjD,iDAAiD;IAKrD,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAHqC,6BAAiB;QACf,kCAAoB;QACtB,6BAAiB;QAC1C,SAAS;GARvB,iDAAiD,CAgG7D"}
1
+ {"version":3,"file":"NotifyPeerAboutIdentityAttributeSuccession.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/NotifyPeerAboutIdentityAttributeSuccession.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAqH;AACrH,4CAA4F;AAC5F,gDAAgF;AAChF,mDAAwC;AAExC,yCAA2H;AAC3H,uDAAoD;AAapD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAkE;IACtF,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,mDAAmD,CAAC,CAAC,CAAC;IAC3F,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,iDAAiD,GAA9D,MAAa,iDAAkD,SAAQ,gBAGtE;IACG,YAC6B,iBAAoC,EACpC,mBAAyC,EACzC,iBAAoC,EACrD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QALQ,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,wBAAmB,GAAnB,mBAAmB,CAAsB;QACzC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAIjE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAA0D;QACtF,MAAM,8BAA8B,GAAG,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACxE,MAAM,4BAA4B,GAAG,MA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ption";
3
3
  import { AttributeValues } from "@nmshd/content";
4
- import { AccountController, MessageController } from "@nmshd/transport";
4
+ import { AccountController, CoreId, MessageController } from "@nmshd/transport";
5
5
  import { LocalAttributeDTO } from "../../../types";
6
6
  import { AttributeIdString, ISO8601DateTimeString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
7
7
  export interface SucceedRelationshipAttributeAndNotifyPeerResponse {
8
8
  predecessor: LocalAttributeDTO;
9
9
  successor: LocalAttributeDTO;
10
+ notificationId: CoreId;
10
11
  }
11
12
  export interface SucceedRelationshipAttributeAndNotifyPeerRequest {
12
13
  predecessorId: AttributeIdString;
@@ -78,7 +78,8 @@ let SucceedRelationshipAttributeAndNotifyPeerUseCase = class SucceedRelationship
78
78
  });
79
79
  const response = {
80
80
  predecessor: AttributeMapper_1.AttributeMapper.toAttributeDTO(updatedPredecessor),
81
- successor: AttributeMapper_1.AttributeMapper.toAttributeDTO(successor)
81
+ successor: AttributeMapper_1.AttributeMapper.toAttributeDTO(successor),
82
+ notificationId: notificationId
82
83
  };
83
84
  return ts_utils_1.Result.ok(response);
84
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SucceedRelationshipAttributeAndNotifyPeer.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAgH;AAChH,4CAA+J;AAC/J,gDAAgF;AAChF,mDAAwC;AAExC,yCAAoH;AACpH,uDAAoD;AAgBpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAiE;IACrF,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,kDAAkD,CAAC,CAAC,CAAC;IAC1F,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,gDAAgD,GAA7D,MAAa,gDAAiD,SA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c,CAAC,SAAS,CAAC;SACvD,CAAC;QAEF,OAAO,iBAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;CACJ,CAAA;AA7DY,4GAAgD;2DAAhD,gDAAgD;IAEpD,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAHqC,6BAAiB;QACf,kCAAoB;QACtB,6BAAiB;QAC1C,SAAS;GALvB,gDAAgD,CA6D5D"}
1
+ {"version":3,"file":"SucceedRelationshipAttributeAndNotifyPeer.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAgH;AAChH,4CAA+J;AAC/J,gDAAgF;AAChF,mDAAwC;AAExC,yCAAoH;AACpH,uDAAoD;AAiBpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAiE;IACrF,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,kDAAkD,CAAC,CAAC,CAAC;IAC1F,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,gDAAgD,GAA7D,MAAa,gDAAiD,SAAQ,gBAA4G;IAC9K,YAC6B,iBAAoC,EACpC,mBAAyC,EACzC,iBAAoC,EACrD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QALQ,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,wBAAmB,GAAnB,mBAAmB,CAAsB;QACzC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAIjE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAyD;QACrF,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,kBAAM,CAAC,IAAI,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 @@ import { RelationshipIdString, SchemaRepository, SchemaValidator, UseCase } from
6
6
  export interface GetAttributesForRelationshipRequest {
7
7
  id: RelationshipIdString;
8
8
  hideTechnical?: boolean;
9
+ onlyLatestVersions?: boolean;
9
10
  }
10
11
  export interface GetAttributesForRelationshipResponse extends Array<LocalAttributeDTO> {
11
12
  }
@@ -16,13 +16,12 @@ exports.GetAttributesForRelationshipUseCase = void 0;
16
16
  const ts_utils_1 = require("@js-soft/ts-utils");
17
17
  const consumption_1 = require("@nmshd/consumption");
18
18
  const transport_1 = require("@nmshd/transport");
19
- const ts_simple_nameof_1 = require("ts-simple-nameof");
20
19
  const typescript_ioc_1 = require("typescript-ioc");
21
20
  const common_1 = require("../../common");
22
21
  const consumption_2 = require("../../consumption");
23
22
  let Validator = class Validator extends common_1.SchemaValidator {
24
23
  constructor(schemaRepository) {
25
- super(schemaRepository.getSchema("GetRelationshipRequest"));
24
+ super(schemaRepository.getSchema("GetAttributesForRelationshipRequest"));
26
25
  }
27
26
  };
28
27
  Validator = __decorate([
@@ -42,9 +41,11 @@ let GetAttributesForRelationshipUseCase = class GetAttributesForRelationshipUseC
42
41
  }
43
42
  const peerAddress = relationship.peer.address.toString();
44
43
  const query = {
45
- // shareInfo.peer
46
- [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: peerAddress
44
+ "shareInfo.peer": peerAddress
47
45
  };
46
+ if (request.onlyLatestVersions ?? true) {
47
+ query["succeededBy"] = { $exists: false };
48
+ }
48
49
  const attributes = await this.attributesController.getLocalAttributes(query, request.hideTechnical);
49
50
  return ts_utils_1.Result.ok(consumption_2.AttributeMapper.toAttributeDTOList(attributes));
50
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GetAttributesForRelationship.js","sourceRoot":"","sources":["../../../../src/useCases/transport/relationships/GetAttributesForRelationship.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA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BAAoB,CAAC,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;QAEpG,OAAO,iBAAM,CAAC,EAAE,CAAC,6BAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC;IACrE,CAAC;CACJ,CAAA;AAxBY,kFAAmC;8CAAnC,mCAAmC;IAEvC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAF2C,mCAAuB;QAC1B,kCAAoB;QAChD,SAAS;GAJvB,mCAAmC,CAwB/C"}
1
+ {"version":3,"file":"GetAttributesForRelationship.js","sourceRoot":"","sources":["../../../../src/useCases/transport/relationships/GetAttributesForRelationship.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0D;AAC1D,gDAAiF;AACjF,mDAAwC;AAExC,yCAA+G;AAC/G,mDAAoD;AAUpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAoD;IACxE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,qCAAqC,CAAC,CAAC,CAAC;IAC7E,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,mCAAmC,GAAhD,MAAa,mCAAoC,SAAQ,gBAAkF;IACvI,YAC6B,uBAAgD,EAChD,oBAA0C,EAC3D,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,yBAAoB,GAApB,oBAAoB,CAAsB;IAIvE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAA4C;QACxE,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACjG,IAAI,CAAC,YAAY,EAAE,CAAC;YAChB,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,OAAO,CAAC,cAAc,CAAC,wBAAY,CAAC,CAAC,CAAC;QAC3E,CAAC;QAED,MAAM,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzD,MAAM,KAAK,GAAQ;YACf,gBAAgB,EAAE,WAAW;SAChC,CAAC;QAEF,IAAI,OAAO,CAAC,kBAAkB,IAAI,IAAI,EAAE,CAAC;YACrC,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC9C,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;QAEpG,OAAO,iBAAM,CAAC,EAAE,CAAC,6BAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC;IACrE,CAAC;CACJ,CAAA;AA5BY,kFAAmC;8CAAnC,mCAAmC;IAEvC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAF2C,mCAAuB;QAC1B,kCAAoB;QAChD,SAAS;GAJvB,mCAAmC,CA4B/C"}
@@ -555,10 +555,10 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
555
555
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
556
556
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
557
557
  exports.buildInformation = {
558
- version: "3.3.0",
559
- build: "186",
560
- date: "2023-12-19T14:14:20+00:00",
561
- commit: "03639d3fa941e698085a496ad4eb81d929439266",
558
+ version: "3.4.1",
559
+ build: "189",
560
+ date: "2023-12-22T13:31:35+00:00",
561
+ commit: "aa78ea01a35682832600d66528b5369b52ab8ffc",
562
562
  dependencies: {"@js-soft/docdb-querytranslator":"1.1.2","@js-soft/logging-abstractions":"1.0.1","@js-soft/ts-serval":"2.0.10","@js-soft/ts-utils":"^2.3.3","@nmshd/consumption":"3.8.0","@nmshd/content":"2.8.1","@nmshd/crypto":"2.0.5","@nmshd/transport":"2.2.0","ajv":"^8.12.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^3.4.4","qrcode":"1.5.3","reflect-metadata":"0.2.1","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
563
563
  libraries: {
564
564
  serval: ts_serval_1.buildInformation,
@@ -23199,6 +23199,9 @@ exports.GetOwnSharedAttributesRequest = {
23199
23199
  },
23200
23200
  "hideTechnical": {
23201
23201
  "type": "boolean"
23202
+ },
23203
+ "onlyLatestVersions": {
23204
+ "type": "boolean"
23202
23205
  }
23203
23206
  },
23204
23207
  "required": [
@@ -23395,6 +23398,9 @@ exports.GetPeerSharedAttributesRequest = {
23395
23398
  },
23396
23399
  "hideTechnical": {
23397
23400
  "type": "boolean"
23401
+ },
23402
+ "onlyLatestVersions": {
23403
+ "type": "boolean"
23398
23404
  }
23399
23405
  },
23400
23406
  "required": [
@@ -27513,6 +27519,9 @@ exports.GetAttributesForRelationshipRequest = {
27513
27519
  },
27514
27520
  "hideTechnical": {
27515
27521
  "type": "boolean"
27522
+ },
27523
+ "onlyLatestVersions": {
27524
+ "type": "boolean"
27516
27525
  }
27517
27526
  },
27518
27527
  "required": [
@@ -29489,9 +29498,18 @@ const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common
29489
29498
  const flattenObject_1 = __webpack_require__(/*! ../../common/flattenObject */ "./dist/useCases/common/flattenObject.js");
29490
29499
  const AttributeMapper_1 = __webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consumption/attributes/AttributeMapper.js");
29491
29500
  const GetAttributes_1 = __webpack_require__(/*! ./GetAttributes */ "./dist/useCases/consumption/attributes/GetAttributes.js");
29501
+ let Validator = class Validator extends common_1.SchemaValidator {
29502
+ constructor(schemaRepository) {
29503
+ super(schemaRepository.getSchema("GetOwnSharedAttributesRequest"));
29504
+ }
29505
+ };
29506
+ Validator = __decorate([
29507
+ __param(0, typescript_ioc_1.Inject),
29508
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
29509
+ ], Validator);
29492
29510
  let GetOwnSharedAttributesUseCase = class GetOwnSharedAttributesUseCase extends common_1.UseCase {
29493
- constructor(attributeController, identityController) {
29494
- super();
29511
+ constructor(attributeController, identityController, validator) {
29512
+ super(validator);
29495
29513
  this.attributeController = attributeController;
29496
29514
  this.identityController = identityController;
29497
29515
  }
@@ -29501,6 +29519,9 @@ let GetOwnSharedAttributesUseCase = class GetOwnSharedAttributesUseCase extends
29501
29519
  query["shareInfo.peer"] = request.peer;
29502
29520
  const flattenedQuery = (0, flattenObject_1.flattenObject)(query);
29503
29521
  const dbQuery = GetAttributes_1.GetAttributesUseCase.queryTranslator.parse(flattenedQuery);
29522
+ if (request.onlyLatestVersions ?? true) {
29523
+ dbQuery["succeededBy"] = { $exists: false };
29524
+ }
29504
29525
  const attributes = await this.attributeController.getLocalAttributes(dbQuery, request.hideTechnical, request.onlyValid);
29505
29526
  return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
29506
29527
  }
@@ -29509,8 +29530,10 @@ exports.GetOwnSharedAttributesUseCase = GetOwnSharedAttributesUseCase;
29509
29530
  exports.GetOwnSharedAttributesUseCase = GetOwnSharedAttributesUseCase = __decorate([
29510
29531
  __param(0, typescript_ioc_1.Inject),
29511
29532
  __param(1, typescript_ioc_1.Inject),
29533
+ __param(2, typescript_ioc_1.Inject),
29512
29534
  __metadata("design:paramtypes", [consumption_1.AttributesController,
29513
- transport_1.IdentityController])
29535
+ transport_1.IdentityController,
29536
+ Validator])
29514
29537
  ], GetOwnSharedAttributesUseCase);
29515
29538
  //# sourceMappingURL=GetOwnSharedAttributes.js.map
29516
29539
 
@@ -29545,9 +29568,18 @@ const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common
29545
29568
  const flattenObject_1 = __webpack_require__(/*! ../../common/flattenObject */ "./dist/useCases/common/flattenObject.js");
29546
29569
  const AttributeMapper_1 = __webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consumption/attributes/AttributeMapper.js");
29547
29570
  const GetAttributes_1 = __webpack_require__(/*! ./GetAttributes */ "./dist/useCases/consumption/attributes/GetAttributes.js");
29571
+ let Validator = class Validator extends common_1.SchemaValidator {
29572
+ constructor(schemaRepository) {
29573
+ super(schemaRepository.getSchema("GetPeerSharedAttributesRequest"));
29574
+ }
29575
+ };
29576
+ Validator = __decorate([
29577
+ __param(0, typescript_ioc_1.Inject),
29578
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
29579
+ ], Validator);
29548
29580
  let GetPeerSharedAttributesUseCase = class GetPeerSharedAttributesUseCase extends common_1.UseCase {
29549
- constructor(attributeController) {
29550
- super();
29581
+ constructor(attributeController, validator) {
29582
+ super(validator);
29551
29583
  this.attributeController = attributeController;
29552
29584
  }
29553
29585
  async executeInternal(request) {
@@ -29555,6 +29587,9 @@ let GetPeerSharedAttributesUseCase = class GetPeerSharedAttributesUseCase extend
29555
29587
  query["content.owner"] = request.peer;
29556
29588
  const flattenedQuery = (0, flattenObject_1.flattenObject)(query);
29557
29589
  const dbQuery = GetAttributes_1.GetAttributesUseCase.queryTranslator.parse(flattenedQuery);
29590
+ if (request.onlyLatestVersions ?? true) {
29591
+ dbQuery["succeededBy"] = { $exists: false };
29592
+ }
29558
29593
  const attributes = await this.attributeController.getLocalAttributes(dbQuery, request.hideTechnical, request.onlyValid);
29559
29594
  return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
29560
29595
  }
@@ -29562,7 +29597,9 @@ let GetPeerSharedAttributesUseCase = class GetPeerSharedAttributesUseCase extend
29562
29597
  exports.GetPeerSharedAttributesUseCase = GetPeerSharedAttributesUseCase;
29563
29598
  exports.GetPeerSharedAttributesUseCase = GetPeerSharedAttributesUseCase = __decorate([
29564
29599
  __param(0, typescript_ioc_1.Inject),
29565
- __metadata("design:paramtypes", [consumption_1.AttributesController])
29600
+ __param(1, typescript_ioc_1.Inject),
29601
+ __metadata("design:paramtypes", [consumption_1.AttributesController,
29602
+ Validator])
29566
29603
  ], GetPeerSharedAttributesUseCase);
29567
29604
  //# sourceMappingURL=GetPeerSharedAttributes.js.map
29568
29605
 
@@ -29808,7 +29845,8 @@ let NotifyPeerAboutIdentityAttributeSuccessionUseCase = class NotifyPeerAboutIde
29808
29845
  await this.accountController.syncDatawallet();
29809
29846
  const result = {
29810
29847
  predecessor: AttributeMapper_1.AttributeMapper.toAttributeDTO(updatedOwnSharedIdentityAttributePredecessor),
29811
- successor: AttributeMapper_1.AttributeMapper.toAttributeDTO(ownSharedIdentityAttributeSuccessor)
29848
+ successor: AttributeMapper_1.AttributeMapper.toAttributeDTO(ownSharedIdentityAttributeSuccessor),
29849
+ notificationId: notificationId
29812
29850
  };
29813
29851
  return ts_utils_1.Result.ok(result);
29814
29852
  }
@@ -30128,7 +30166,8 @@ let SucceedRelationshipAttributeAndNotifyPeerUseCase = class SucceedRelationship
30128
30166
  });
30129
30167
  const response = {
30130
30168
  predecessor: AttributeMapper_1.AttributeMapper.toAttributeDTO(updatedPredecessor),
30131
- successor: AttributeMapper_1.AttributeMapper.toAttributeDTO(successor)
30169
+ successor: AttributeMapper_1.AttributeMapper.toAttributeDTO(successor),
30170
+ notificationId: notificationId
30132
30171
  };
30133
30172
  return ts_utils_1.Result.ok(response);
30134
30173
  }
@@ -36502,13 +36541,12 @@ exports.GetAttributesForRelationshipUseCase = void 0;
36502
36541
  const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
36503
36542
  const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
36504
36543
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
36505
- const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
36506
36544
  const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
36507
36545
  const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
36508
36546
  const consumption_2 = __webpack_require__(/*! ../../consumption */ "./dist/useCases/consumption/index.js");
36509
36547
  let Validator = class Validator extends common_1.SchemaValidator {
36510
36548
  constructor(schemaRepository) {
36511
- super(schemaRepository.getSchema("GetRelationshipRequest"));
36549
+ super(schemaRepository.getSchema("GetAttributesForRelationshipRequest"));
36512
36550
  }
36513
36551
  };
36514
36552
  Validator = __decorate([
@@ -36528,9 +36566,11 @@ let GetAttributesForRelationshipUseCase = class GetAttributesForRelationshipUseC
36528
36566
  }
36529
36567
  const peerAddress = relationship.peer.address.toString();
36530
36568
  const query = {
36531
- // shareInfo.peer
36532
- [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: peerAddress
36569
+ "shareInfo.peer": peerAddress
36533
36570
  };
36571
+ if (request.onlyLatestVersions ?? true) {
36572
+ query["succeededBy"] = { $exists: false };
36573
+ }
36534
36574
  const attributes = await this.attributesController.getLocalAttributes(query, request.hideTechnical);
36535
36575
  return ts_utils_1.Result.ok(consumption_2.AttributeMapper.toAttributeDTOList(attributes));
36536
36576
  }