@nmshd/runtime 2.0.0-alpha.2 → 2.0.0-alpha.5

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 (113) hide show
  1. package/dist/Runtime.js +0 -6
  2. package/dist/Runtime.js.map +1 -1
  3. package/dist/buildInformation.js +5 -5
  4. package/dist/dataViews/DataViewExpander.js +24 -19
  5. package/dist/dataViews/DataViewExpander.js.map +1 -1
  6. package/dist/events/index.d.ts +1 -0
  7. package/dist/events/index.js +1 -0
  8. package/dist/events/index.js.map +1 -1
  9. package/dist/events/transport/PeerRelationshipTemplateLoadedEvent.d.ts +6 -0
  10. package/dist/events/transport/PeerRelationshipTemplateLoadedEvent.js +12 -0
  11. package/dist/events/transport/PeerRelationshipTemplateLoadedEvent.js.map +1 -0
  12. package/dist/extensibility/ConsumptionServices.d.ts +2 -4
  13. package/dist/extensibility/ConsumptionServices.js +1 -7
  14. package/dist/extensibility/ConsumptionServices.js.map +1 -1
  15. package/dist/extensibility/facades/consumption/index.d.ts +0 -2
  16. package/dist/extensibility/facades/consumption/index.js +0 -2
  17. package/dist/extensibility/facades/consumption/index.js.map +1 -1
  18. package/dist/useCases/common/Schemas.d.ts +0 -15
  19. package/dist/useCases/common/Schemas.js +35 -510
  20. package/dist/useCases/common/Schemas.js.map +1 -1
  21. package/dist/useCases/common/index.d.ts +0 -1
  22. package/dist/useCases/common/index.js +0 -1
  23. package/dist/useCases/common/index.js.map +1 -1
  24. package/dist/useCases/consumption/index.d.ts +0 -2
  25. package/dist/useCases/consumption/index.js +0 -2
  26. package/dist/useCases/consumption/index.js.map +1 -1
  27. package/dist/useCases/consumption/requests/CheckPrerequisitesOfIncomingRequest.d.ts +1 -1
  28. package/dist/useCases/consumption/requests/CompleteIncomingRequest.d.ts +1 -1
  29. package/dist/useCases/consumption/requests/CompleteOutgoingRequest.d.ts +1 -1
  30. package/dist/useCases/consumption/requests/GetIncomingRequest.d.ts +1 -1
  31. package/dist/useCases/consumption/requests/GetOutgoingRequest.d.ts +1 -1
  32. package/dist/useCases/consumption/requests/RequireManualDecisionOfIncomingRequest.d.ts +1 -1
  33. package/dist/useCases/consumption/requests/SentOutgoingRequest.d.ts +1 -1
  34. package/dist/useCases/transport/relationshipTemplates/LoadPeerRelationshipTemplate.d.ts +3 -2
  35. package/dist/useCases/transport/relationshipTemplates/LoadPeerRelationshipTemplate.js +13 -5
  36. package/dist/useCases/transport/relationshipTemplates/LoadPeerRelationshipTemplate.js.map +1 -1
  37. package/lib-web/nmshd.runtime.js +156 -1942
  38. package/lib-web/nmshd.runtime.js.map +1 -1
  39. package/lib-web/nmshd.runtime.min.js +3 -3
  40. package/lib-web/nmshd.runtime.min.js.map +1 -1
  41. package/package.json +13 -13
  42. package/dist/extensibility/facades/consumption/RelationshipInfoFacade.d.ts +0 -18
  43. package/dist/extensibility/facades/consumption/RelationshipInfoFacade.js +0 -61
  44. package/dist/extensibility/facades/consumption/RelationshipInfoFacade.js.map +0 -1
  45. package/dist/extensibility/facades/consumption/SharedItemsFacade.d.ts +0 -24
  46. package/dist/extensibility/facades/consumption/SharedItemsFacade.js +0 -79
  47. package/dist/extensibility/facades/consumption/SharedItemsFacade.js.map +0 -1
  48. package/dist/useCases/common/validation/RelationshipAttributeDTOValidator.d.ts +0 -6
  49. package/dist/useCases/common/validation/RelationshipAttributeDTOValidator.js +0 -16
  50. package/dist/useCases/common/validation/RelationshipAttributeDTOValidator.js.map +0 -1
  51. package/dist/useCases/consumption/relationshipInfo/CreateRelationshipInfo.d.ts +0 -26
  52. package/dist/useCases/consumption/relationshipInfo/CreateRelationshipInfo.js +0 -75
  53. package/dist/useCases/consumption/relationshipInfo/CreateRelationshipInfo.js.map +0 -1
  54. package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.d.ts +0 -18
  55. package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.js +0 -54
  56. package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.js.map +0 -1
  57. package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.d.ts +0 -18
  58. package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.js +0 -54
  59. package/dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.js.map +0 -1
  60. package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfo.d.ts +0 -17
  61. package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfo.js +0 -50
  62. package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfo.js.map +0 -1
  63. package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfoByRelationship.d.ts +0 -17
  64. package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfoByRelationship.js +0 -49
  65. package/dist/useCases/consumption/relationshipInfo/GetRelationshipInfoByRelationship.js.map +0 -1
  66. package/dist/useCases/consumption/relationshipInfo/RelationshipAttributeMapper.d.ts +0 -6
  67. package/dist/useCases/consumption/relationshipInfo/RelationshipAttributeMapper.js +0 -17
  68. package/dist/useCases/consumption/relationshipInfo/RelationshipAttributeMapper.js.map +0 -1
  69. package/dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.d.ts +0 -6
  70. package/dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js +0 -25
  71. package/dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js.map +0 -1
  72. package/dist/useCases/consumption/relationshipInfo/RelationshipThemeMapper.d.ts +0 -6
  73. package/dist/useCases/consumption/relationshipInfo/RelationshipThemeMapper.js +0 -18
  74. package/dist/useCases/consumption/relationshipInfo/RelationshipThemeMapper.js.map +0 -1
  75. package/dist/useCases/consumption/relationshipInfo/UpdateRelationshipInfo.d.ts +0 -31
  76. package/dist/useCases/consumption/relationshipInfo/UpdateRelationshipInfo.js +0 -71
  77. package/dist/useCases/consumption/relationshipInfo/UpdateRelationshipInfo.js.map +0 -1
  78. package/dist/useCases/consumption/relationshipInfo/index.d.ts +0 -6
  79. package/dist/useCases/consumption/relationshipInfo/index.js +0 -23
  80. package/dist/useCases/consumption/relationshipInfo/index.js.map +0 -1
  81. package/dist/useCases/consumption/sharedItems/CreateSharedItem.d.ts +0 -26
  82. package/dist/useCases/consumption/sharedItems/CreateSharedItem.js +0 -71
  83. package/dist/useCases/consumption/sharedItems/CreateSharedItem.js.map +0 -1
  84. package/dist/useCases/consumption/sharedItems/DeleteSharedItem.d.ts +0 -17
  85. package/dist/useCases/consumption/sharedItems/DeleteSharedItem.js +0 -53
  86. package/dist/useCases/consumption/sharedItems/DeleteSharedItem.js.map +0 -1
  87. package/dist/useCases/consumption/sharedItems/GetSharedItem.d.ts +0 -16
  88. package/dist/useCases/consumption/sharedItems/GetSharedItem.js +0 -47
  89. package/dist/useCases/consumption/sharedItems/GetSharedItem.js.map +0 -1
  90. package/dist/useCases/consumption/sharedItems/GetSharedItems.d.ts +0 -13
  91. package/dist/useCases/consumption/sharedItems/GetSharedItems.js +0 -59
  92. package/dist/useCases/consumption/sharedItems/GetSharedItems.js.map +0 -1
  93. package/dist/useCases/consumption/sharedItems/GetSharedItemsByAddress.d.ts +0 -16
  94. package/dist/useCases/consumption/sharedItems/GetSharedItemsByAddress.js +0 -46
  95. package/dist/useCases/consumption/sharedItems/GetSharedItemsByAddress.js.map +0 -1
  96. package/dist/useCases/consumption/sharedItems/GetSharedItemsByReference.d.ts +0 -16
  97. package/dist/useCases/consumption/sharedItems/GetSharedItemsByReference.js +0 -47
  98. package/dist/useCases/consumption/sharedItems/GetSharedItemsByReference.js.map +0 -1
  99. package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedByAddress.d.ts +0 -16
  100. package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedByAddress.js +0 -46
  101. package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedByAddress.js.map +0 -1
  102. package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedWithAddress.d.ts +0 -16
  103. package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedWithAddress.js +0 -46
  104. package/dist/useCases/consumption/sharedItems/GetSharedItemsSharedWithAddress.js.map +0 -1
  105. package/dist/useCases/consumption/sharedItems/SharedItemsMapper.d.ts +0 -6
  106. package/dist/useCases/consumption/sharedItems/SharedItemsMapper.js +0 -24
  107. package/dist/useCases/consumption/sharedItems/SharedItemsMapper.js.map +0 -1
  108. package/dist/useCases/consumption/sharedItems/UpdateSharedItem.d.ts +0 -19
  109. package/dist/useCases/consumption/sharedItems/UpdateSharedItem.js +0 -57
  110. package/dist/useCases/consumption/sharedItems/UpdateSharedItem.js.map +0 -1
  111. package/dist/useCases/consumption/sharedItems/index.d.ts +0 -10
  112. package/dist/useCases/consumption/sharedItems/index.js +0 -27
  113. package/dist/useCases/consumption/sharedItems/index.js.map +0 -1
@@ -254,9 +254,6 @@ class Runtime {
254
254
  typescript_ioc_1.Container.bind(consumption_1.DraftsController)
255
255
  .factory(() => this.getConsumptionController().drafts)
256
256
  .scope(typescript_ioc_1.Scope.Request);
257
- typescript_ioc_1.Container.bind(consumption_1.RelationshipInfoController)
258
- .factory(() => this.getConsumptionController().relationshipInfo)
259
- .scope(typescript_ioc_1.Scope.Request);
260
257
  typescript_ioc_1.Container.bind(consumption_1.IncomingRequestsController)
261
258
  .factory(() => this.getConsumptionController().incomingRequests)
262
259
  .scope(typescript_ioc_1.Scope.Request);
@@ -266,9 +263,6 @@ class Runtime {
266
263
  typescript_ioc_1.Container.bind(consumption_1.SettingsController)
267
264
  .factory(() => this.getConsumptionController().settings)
268
265
  .scope(typescript_ioc_1.Scope.Request);
269
- typescript_ioc_1.Container.bind(consumption_1.SharedItemsController)
270
- .factory(() => this.getConsumptionController().sharedItems)
271
- .scope(typescript_ioc_1.Scope.Request);
272
266
  typescript_ioc_1.Container.bind(transport_1.AnonymousTokenController)
273
267
  .factory(() => new transport_1.AnonymousTokenController(this.transport.config))
274
268
  .scope(typescript_ioc_1.Scope.Singleton);
@@ -428,11 +422,11 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
428
422
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
429
423
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
430
424
  exports.buildInformation = {
431
- version: "2.0.0-alpha.2",
432
- build: "49",
433
- date: "2022-05-06T08:36:59+00:00",
434
- commit: "4d90b6b7b9e510db139d00a2c4e5cde99e38486e",
435
- dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.3","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"2.0.0-alpha.8","@nmshd/content":"2.0.0-alpha.8","@nmshd/crypto":"2.0.1","@nmshd/transport":"2.0.0-alpha.1","ajv":"^8.11.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.3","json-stringify-safe":"^5.0.1","luxon":"^2.3.2","qrcode":"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
425
+ version: "2.0.0-alpha.5",
426
+ build: "52",
427
+ date: "2022-05-16T09:22:03+00:00",
428
+ commit: "db9d9e60243e5497a469660a153f7f4f0b8fe1d6",
429
+ dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.3","@js-soft/ts-utils":"^1.1.2","@nmshd/consumption":"2.0.0-alpha.9","@nmshd/content":"2.0.0-alpha.13","@nmshd/crypto":"2.0.1","@nmshd/transport":"2.0.0-alpha.1","ajv":"^8.11.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.3","json-stringify-safe":"^5.0.1","luxon":"^2.4.0","qrcode":"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
436
430
  libraries: {
437
431
  serval: ts_serval_1.buildInformation,
438
432
  consumption: consumption_1.buildInformation,
@@ -954,10 +948,11 @@ let DataViewExpander = class DataViewExpander {
954
948
  return await Promise.all(changePromises);
955
949
  }
956
950
  async createRelationshipDVO(relationship, relationshipInfo) {
957
- if (!relationshipInfo) {
958
- const relationshipInfoResult = await this.consumption.relationshipInfo.getRelationshipInfoByRelationship({ relationshipId: relationship.id });
959
- relationshipInfo = relationshipInfoResult.value;
960
- }
951
+ // TODO: re-enable when we can query relationship info
952
+ // if (!relationshipInfo) {
953
+ // const relationshipInfoResult = await this.consumption.relationshipInfo.getRelationshipInfoByRelationship({ relationshipId: relationship.id });
954
+ // relationshipInfo = relationshipInfoResult.value;
955
+ // }
961
956
  let direction = RelationshipDVO_1.RelationshipDirection.Incoming;
962
957
  if (this.identityController.isMe(transport_1.CoreAddress.from(relationship.changes[0].request.createdBy))) {
963
958
  direction = RelationshipDVO_1.RelationshipDirection.Outgoing;
@@ -981,35 +976,39 @@ let DataViewExpander = class DataViewExpander {
981
976
  const changes = await this.expandRelationshipChanges(relationship);
982
977
  return {
983
978
  id: relationship.id,
984
- name: relationshipInfo.userTitle ? relationshipInfo.userTitle : relationshipInfo.title,
985
- description: relationshipInfo.userDescription ? relationshipInfo.userDescription : relationshipInfo.description,
979
+ name: relationshipInfo?.userTitle ?? relationshipInfo?.title ?? "",
980
+ description: relationshipInfo?.userDescription ?? relationshipInfo?.description ?? "",
986
981
  date: relationship.changes[0].request.createdAt,
987
982
  image: "",
988
983
  type: "RelationshipDVO",
989
984
  status: relationship.status,
990
985
  statusText: statusText,
991
986
  direction: direction,
992
- isPinned: relationshipInfo.isPinned,
987
+ isPinned: relationshipInfo?.isPinned ?? false,
993
988
  theme: {
994
- image: relationshipInfo.theme?.image,
995
- headerImage: relationshipInfo.theme?.imageBar,
996
- backgroundColor: relationshipInfo.theme?.backgroundColor,
997
- foregroundColor: relationshipInfo.theme?.foregroundColor
989
+ image: relationshipInfo?.theme?.image,
990
+ headerImage: relationshipInfo?.theme?.imageBar,
991
+ backgroundColor: relationshipInfo?.theme?.backgroundColor,
992
+ foregroundColor: relationshipInfo?.theme?.foregroundColor
998
993
  },
999
994
  changes: changes,
1000
995
  changeCount: changes.length
1001
996
  };
1002
997
  }
1003
998
  async expandRelationshipDTO(relationship) {
1004
- const relationshipInfoResult = await this.consumption.relationshipInfo.getRelationshipInfoByRelationship({ relationshipId: relationship.id });
1005
- const relationshipInfo = relationshipInfoResult.value;
1006
- const name = relationshipInfo.userTitle ? relationshipInfo.userTitle : relationshipInfo.title;
1007
- let description = relationshipInfo.userDescription ? relationshipInfo.userDescription : relationshipInfo.description;
999
+ // TODO: re-enable when we can query relationship info
1000
+ // const relationshipInfoResult = await this.consumption.relationshipInfo.getRelationshipInfoByRelationship({ relationshipId: relationship.id });
1001
+ // const relationshipInfo = relationshipInfoResult.value;
1002
+ // const name = relationshipInfo.userTitle ? relationshipInfo.userTitle : relationshipInfo.title;
1003
+ // let description = relationshipInfo.userDescription ? relationshipInfo.userDescription : relationshipInfo.description;
1004
+ const name = "";
1005
+ const description = "";
1008
1006
  const initials = (name.match(/\b\w/g) ?? []).join("");
1009
- const relationshipDVO = await this.createRelationshipDVO(relationship, relationshipInfo);
1010
- if (!description) {
1011
- description = relationshipDVO.statusText;
1012
- }
1007
+ const relationshipDVO = await this.createRelationshipDVO(relationship);
1008
+ // TODO: re-enable when we can query relationship info
1009
+ // if (!description) {
1010
+ // description = relationshipDVO.statusText;
1011
+ // }
1013
1012
  return {
1014
1013
  type: "IdentityDVO",
1015
1014
  id: relationship.peer,
@@ -1754,6 +1753,7 @@ __exportStar(__webpack_require__(/*! ./runtime/RuntimeInitializedEvent */ "./dis
1754
1753
  __exportStar(__webpack_require__(/*! ./runtime/RuntimeInitializingEvent */ "./dist/events/runtime/RuntimeInitializingEvent.js"), exports);
1755
1754
  __exportStar(__webpack_require__(/*! ./transport/MessageReceivedEvent */ "./dist/events/transport/MessageReceivedEvent.js"), exports);
1756
1755
  __exportStar(__webpack_require__(/*! ./transport/MessageSentEvent */ "./dist/events/transport/MessageSentEvent.js"), exports);
1756
+ __exportStar(__webpack_require__(/*! ./transport/PeerRelationshipTemplateLoadedEvent */ "./dist/events/transport/PeerRelationshipTemplateLoadedEvent.js"), exports);
1757
1757
  __exportStar(__webpack_require__(/*! ./transport/RelationshipChangedEvent */ "./dist/events/transport/RelationshipChangedEvent.js"), exports);
1758
1758
  __exportStar(__webpack_require__(/*! ./transport/TransportLibraryInitializedEvent */ "./dist/events/transport/TransportLibraryInitializedEvent.js"), exports);
1759
1759
  __exportStar(__webpack_require__(/*! ./transport/TransportLibraryInitializingEvent */ "./dist/events/transport/TransportLibraryInitializingEvent.js"), exports);
@@ -1915,6 +1915,28 @@ MessageSentEvent.namespace = "transport.messageSent";
1915
1915
 
1916
1916
  /***/ }),
1917
1917
 
1918
+ /***/ "./dist/events/transport/PeerRelationshipTemplateLoadedEvent.js":
1919
+ /*!**********************************************************************!*\
1920
+ !*** ./dist/events/transport/PeerRelationshipTemplateLoadedEvent.js ***!
1921
+ \**********************************************************************/
1922
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1923
+
1924
+ "use strict";
1925
+
1926
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1927
+ exports.PeerRelationshipTemplateLoadedEvent = void 0;
1928
+ const DataEvent_1 = __webpack_require__(/*! ../DataEvent */ "./dist/events/DataEvent.js");
1929
+ class PeerRelationshipTemplateLoadedEvent extends DataEvent_1.DataEvent {
1930
+ constructor(eventTargetAddress, data) {
1931
+ super(PeerRelationshipTemplateLoadedEvent.namespace, eventTargetAddress, data);
1932
+ }
1933
+ }
1934
+ exports.PeerRelationshipTemplateLoadedEvent = PeerRelationshipTemplateLoadedEvent;
1935
+ PeerRelationshipTemplateLoadedEvent.namespace = "transport.peerRelationshipTemplateLoaded";
1936
+ //# sourceMappingURL=PeerRelationshipTemplateLoadedEvent.js.map
1937
+
1938
+ /***/ }),
1939
+
1918
1940
  /***/ "./dist/events/transport/RelationshipChangedEvent.js":
1919
1941
  /*!***********************************************************!*\
1920
1942
  !*** ./dist/events/transport/RelationshipChangedEvent.js ***!
@@ -2044,12 +2066,10 @@ exports.ConsumptionServices = void 0;
2044
2066
  const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
2045
2067
  const consumption_1 = __webpack_require__(/*! ./facades/consumption */ "./dist/extensibility/facades/consumption/index.js");
2046
2068
  let ConsumptionServices = class ConsumptionServices {
2047
- constructor(attributes, drafts, settings, sharedItems, relationshipInfo, incomingRequests, outgoingRequests) {
2069
+ constructor(attributes, drafts, settings, incomingRequests, outgoingRequests) {
2048
2070
  this.attributes = attributes;
2049
2071
  this.drafts = drafts;
2050
2072
  this.settings = settings;
2051
- this.sharedItems = sharedItems;
2052
- this.relationshipInfo = relationshipInfo;
2053
2073
  this.incomingRequests = incomingRequests;
2054
2074
  this.outgoingRequests = outgoingRequests;
2055
2075
  }
@@ -2060,13 +2080,9 @@ ConsumptionServices = __decorate([
2060
2080
  __param(2, typescript_ioc_1.Inject),
2061
2081
  __param(3, typescript_ioc_1.Inject),
2062
2082
  __param(4, typescript_ioc_1.Inject),
2063
- __param(5, typescript_ioc_1.Inject),
2064
- __param(6, typescript_ioc_1.Inject),
2065
2083
  __metadata("design:paramtypes", [consumption_1.AttributesFacade,
2066
2084
  consumption_1.DraftsFacade,
2067
2085
  consumption_1.SettingsFacade,
2068
- consumption_1.SharedItemsFacade,
2069
- consumption_1.RelationshipInfoFacade,
2070
2086
  consumption_1.IncomingRequestsFacade,
2071
2087
  consumption_1.OutgoingRequestsFacade])
2072
2088
  ], ConsumptionServices);
@@ -2547,77 +2563,6 @@ exports.OutgoingRequestsFacade = OutgoingRequestsFacade;
2547
2563
 
2548
2564
  /***/ }),
2549
2565
 
2550
- /***/ "./dist/extensibility/facades/consumption/RelationshipInfoFacade.js":
2551
- /*!**************************************************************************!*\
2552
- !*** ./dist/extensibility/facades/consumption/RelationshipInfoFacade.js ***!
2553
- \**************************************************************************/
2554
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2555
-
2556
- "use strict";
2557
-
2558
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2559
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2560
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2561
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2562
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2563
- };
2564
- var __metadata = (this && this.__metadata) || function (k, v) {
2565
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2566
- };
2567
- var __param = (this && this.__param) || function (paramIndex, decorator) {
2568
- return function (target, key) { decorator(target, key, paramIndex); }
2569
- };
2570
- Object.defineProperty(exports, "__esModule", ({ value: true }));
2571
- exports.RelationshipInfoFacade = void 0;
2572
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
2573
- const useCases_1 = __webpack_require__(/*! ../../../useCases */ "./dist/useCases/index.js");
2574
- let RelationshipInfoFacade = class RelationshipInfoFacade {
2575
- constructor(createRelationshipInfoUseCase, deleteRelationshipInfoUseCase, deleteRelationshipInfoByRelationshipUseCase, getRelationshipInfoUseCase, getRelationshipInfoByRelationshipUseCase, updateRelationshipInfoUseCase) {
2576
- this.createRelationshipInfoUseCase = createRelationshipInfoUseCase;
2577
- this.deleteRelationshipInfoUseCase = deleteRelationshipInfoUseCase;
2578
- this.deleteRelationshipInfoByRelationshipUseCase = deleteRelationshipInfoByRelationshipUseCase;
2579
- this.getRelationshipInfoUseCase = getRelationshipInfoUseCase;
2580
- this.getRelationshipInfoByRelationshipUseCase = getRelationshipInfoByRelationshipUseCase;
2581
- this.updateRelationshipInfoUseCase = updateRelationshipInfoUseCase;
2582
- }
2583
- async createRelationshipInfo(request) {
2584
- return await this.createRelationshipInfoUseCase.execute(request);
2585
- }
2586
- async deleteRelationshipInfo(request) {
2587
- return await this.deleteRelationshipInfoUseCase.execute(request);
2588
- }
2589
- async deleteRelationshipInfoByRelationship(request) {
2590
- return await this.deleteRelationshipInfoByRelationshipUseCase.execute(request);
2591
- }
2592
- async getRelationshipInfo(request) {
2593
- return await this.getRelationshipInfoUseCase.execute(request);
2594
- }
2595
- async getRelationshipInfoByRelationship(request) {
2596
- return await this.getRelationshipInfoByRelationshipUseCase.execute(request);
2597
- }
2598
- async updateRelationshipInfo(request) {
2599
- return await this.updateRelationshipInfoUseCase.execute(request);
2600
- }
2601
- };
2602
- RelationshipInfoFacade = __decorate([
2603
- __param(0, typescript_ioc_1.Inject),
2604
- __param(1, typescript_ioc_1.Inject),
2605
- __param(2, typescript_ioc_1.Inject),
2606
- __param(3, typescript_ioc_1.Inject),
2607
- __param(4, typescript_ioc_1.Inject),
2608
- __param(5, typescript_ioc_1.Inject),
2609
- __metadata("design:paramtypes", [useCases_1.CreateRelationshipInfoUseCase,
2610
- useCases_1.DeleteRelationshipInfoUseCase,
2611
- useCases_1.DeleteRelationshipInfoByRelationshipUseCase,
2612
- useCases_1.GetRelationshipInfoUseCase,
2613
- useCases_1.GetRelationshipInfoByRelationshipUseCase,
2614
- useCases_1.UpdateRelationshipInfoUseCase])
2615
- ], RelationshipInfoFacade);
2616
- exports.RelationshipInfoFacade = RelationshipInfoFacade;
2617
- //# sourceMappingURL=RelationshipInfoFacade.js.map
2618
-
2619
- /***/ }),
2620
-
2621
2566
  /***/ "./dist/extensibility/facades/consumption/SettingsFacade.js":
2622
2567
  /*!******************************************************************!*\
2623
2568
  !*** ./dist/extensibility/facades/consumption/SettingsFacade.js ***!
@@ -2683,95 +2628,6 @@ exports.SettingsFacade = SettingsFacade;
2683
2628
 
2684
2629
  /***/ }),
2685
2630
 
2686
- /***/ "./dist/extensibility/facades/consumption/SharedItemsFacade.js":
2687
- /*!*********************************************************************!*\
2688
- !*** ./dist/extensibility/facades/consumption/SharedItemsFacade.js ***!
2689
- \*********************************************************************/
2690
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2691
-
2692
- "use strict";
2693
-
2694
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2695
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2696
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2697
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2698
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2699
- };
2700
- var __metadata = (this && this.__metadata) || function (k, v) {
2701
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2702
- };
2703
- var __param = (this && this.__param) || function (paramIndex, decorator) {
2704
- return function (target, key) { decorator(target, key, paramIndex); }
2705
- };
2706
- Object.defineProperty(exports, "__esModule", ({ value: true }));
2707
- exports.SharedItemsFacade = void 0;
2708
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
2709
- const useCases_1 = __webpack_require__(/*! ../../../useCases */ "./dist/useCases/index.js");
2710
- let SharedItemsFacade = class SharedItemsFacade {
2711
- constructor(createSharedItemUseCase, deleteSharedItemUseCase, getSharedItemUseCase, getSharedItemsUseCase, getSharedItemsByAddressUseCase, getSharedItemsByReferenceUseCase, getSharedItemsSharedByAddressUseCase, getSharedItemsSharedWithAddressUseCase, updateSharedItemUseCase) {
2712
- this.createSharedItemUseCase = createSharedItemUseCase;
2713
- this.deleteSharedItemUseCase = deleteSharedItemUseCase;
2714
- this.getSharedItemUseCase = getSharedItemUseCase;
2715
- this.getSharedItemsUseCase = getSharedItemsUseCase;
2716
- this.getSharedItemsByAddressUseCase = getSharedItemsByAddressUseCase;
2717
- this.getSharedItemsByReferenceUseCase = getSharedItemsByReferenceUseCase;
2718
- this.getSharedItemsSharedByAddressUseCase = getSharedItemsSharedByAddressUseCase;
2719
- this.getSharedItemsSharedWithAddressUseCase = getSharedItemsSharedWithAddressUseCase;
2720
- this.updateSharedItemUseCase = updateSharedItemUseCase;
2721
- }
2722
- async createSharedItem(request) {
2723
- return await this.createSharedItemUseCase.execute(request);
2724
- }
2725
- async deleteSharedItem(request) {
2726
- return await this.deleteSharedItemUseCase.execute(request);
2727
- }
2728
- async getSharedItem(request) {
2729
- return await this.getSharedItemUseCase.execute(request);
2730
- }
2731
- async getSharedItems(request) {
2732
- return await this.getSharedItemsUseCase.execute(request);
2733
- }
2734
- async getSharedItemsByAddress(request) {
2735
- return await this.getSharedItemsByAddressUseCase.execute(request);
2736
- }
2737
- async getSharedItemsByReference(request) {
2738
- return await this.getSharedItemsByReferenceUseCase.execute(request);
2739
- }
2740
- async getSharedItemsSharedByAddress(request) {
2741
- return await this.getSharedItemsSharedByAddressUseCase.execute(request);
2742
- }
2743
- async getSharedItemsSharedWithAddress(request) {
2744
- return await this.getSharedItemsSharedWithAddressUseCase.execute(request);
2745
- }
2746
- async updateSharedItem(request) {
2747
- return await this.updateSharedItemUseCase.execute(request);
2748
- }
2749
- };
2750
- SharedItemsFacade = __decorate([
2751
- __param(0, typescript_ioc_1.Inject),
2752
- __param(1, typescript_ioc_1.Inject),
2753
- __param(2, typescript_ioc_1.Inject),
2754
- __param(3, typescript_ioc_1.Inject),
2755
- __param(4, typescript_ioc_1.Inject),
2756
- __param(5, typescript_ioc_1.Inject),
2757
- __param(6, typescript_ioc_1.Inject),
2758
- __param(7, typescript_ioc_1.Inject),
2759
- __param(8, typescript_ioc_1.Inject),
2760
- __metadata("design:paramtypes", [useCases_1.CreateSharedItemUseCase,
2761
- useCases_1.DeleteSharedItemUseCase,
2762
- useCases_1.GetSharedItemUseCase,
2763
- useCases_1.GetSharedItemsUseCase,
2764
- useCases_1.GetSharedItemsByAddressUseCase,
2765
- useCases_1.GetSharedItemsByReferenceUseCase,
2766
- useCases_1.GetSharedItemsSharedByAddressUseCase,
2767
- useCases_1.GetSharedItemsSharedWithAddressUseCase,
2768
- useCases_1.UpdateSharedItemUseCase])
2769
- ], SharedItemsFacade);
2770
- exports.SharedItemsFacade = SharedItemsFacade;
2771
- //# sourceMappingURL=SharedItemsFacade.js.map
2772
-
2773
- /***/ }),
2774
-
2775
2631
  /***/ "./dist/extensibility/facades/consumption/index.js":
2776
2632
  /*!*********************************************************!*\
2777
2633
  !*** ./dist/extensibility/facades/consumption/index.js ***!
@@ -2799,9 +2655,7 @@ __exportStar(__webpack_require__(/*! ./AttributesFacade */ "./dist/extensibility
2799
2655
  __exportStar(__webpack_require__(/*! ./DraftsFacade */ "./dist/extensibility/facades/consumption/DraftsFacade.js"), exports);
2800
2656
  __exportStar(__webpack_require__(/*! ./IncomingRequestsFacade */ "./dist/extensibility/facades/consumption/IncomingRequestsFacade.js"), exports);
2801
2657
  __exportStar(__webpack_require__(/*! ./OutgoingRequestsFacade */ "./dist/extensibility/facades/consumption/OutgoingRequestsFacade.js"), exports);
2802
- __exportStar(__webpack_require__(/*! ./RelationshipInfoFacade */ "./dist/extensibility/facades/consumption/RelationshipInfoFacade.js"), exports);
2803
2658
  __exportStar(__webpack_require__(/*! ./SettingsFacade */ "./dist/extensibility/facades/consumption/SettingsFacade.js"), exports);
2804
- __exportStar(__webpack_require__(/*! ./SharedItemsFacade */ "./dist/extensibility/facades/consumption/SharedItemsFacade.js"), exports);
2805
2659
  //# sourceMappingURL=index.js.map
2806
2660
 
2807
2661
  /***/ }),
@@ -4620,8 +4474,8 @@ exports.JsonSchema = JsonSchema;
4620
4474
  "use strict";
4621
4475
 
4622
4476
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4623
- exports.GetSharedItemsSharedWithAddressRequest = exports.GetSharedItemsSharedByAddressRequest = exports.GetSharedItemsByReferenceRequest = exports.GetSharedItemsByAddressRequest = exports.GetSharedItemsRequest = exports.GetSharedItemRequest = exports.DeleteSharedItemRequest = exports.CreateSharedItemRequest = exports.UpdateSettingRequest = exports.GetSettingsRequest = exports.GetSettingRequest = exports.DeleteSettingRequest = exports.CreateSettingRequest = exports.SentOutgoingRequestRequest = exports.RequireManualDecisionOfIncomingRequestRequest = exports.ReceivedIncomingRequestRequest = exports.GetOutgoingRequestsRequest = exports.GetOutgoingRequestRequest = exports.GetIncomingRequestsRequest = exports.GetIncomingRequestRequest = exports.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest = exports.CompleteOutgoingRequestRequest = exports.CompleteIncomingRequestRequest = exports.CheckPrerequisitesOfIncomingRequestRequest = exports.RejectIncomingRequestRequest = exports.CreateOutgoingRequestRequest = exports.AcceptIncomingRequestRequest = exports.UpdateRelationshipInfoRequest = exports.GetRelationshipInfoByRelationshipRequest = exports.GetRelationshipInfoRequest = exports.DeleteRelationshipInfoByRelationshipRequest = exports.DeleteRelationshipInfoRequest = exports.CreateRelationshipInfoRequest = exports.UpdateDraftRequest = exports.GetDraftsRequest = exports.GetDraftRequest = exports.DeleteDraftRequest = exports.CreateDraftRequest = exports.UpdateAttributeRequest = exports.SucceedAttributeRequest = exports.GetHistoryByNameRequest = exports.GetAttributesRequest = exports.GetAttributeByNameRequest = exports.GetAttributeRequest = exports.DeleteAttributeByNameRequest = exports.DeleteAttributeRequest = exports.CreateAttributeRequest = exports.GetAttributesByNamesRequest = exports.LoadPeerTokenAnonymousByTruncatedReferenceRequest = exports.LoadPeerTokenAnonymousByIdAndKeyRequest = void 0;
4624
- exports.LoadPeerTokenRequest = exports.GetTokensRequest = exports.GetTokenRequest = exports.GetQRCodeForTokenRequest = exports.CreateOwnTokenRequest = exports.LoadPeerRelationshipTemplateRequest = exports.GetRelationshipTemplatesRequest = exports.GetRelationshipTemplateRequest = exports.CreateTokenQrCodeForOwnTemplateRequest = exports.CreateTokenForOwnTemplateRequest = exports.CreateOwnRelationshipTemplateRequest = exports.RevokeRelationshipChangeRequest = exports.RejectRelationshipChangeRequest = exports.GetRelationshipsRequest = exports.GetRelationshipByAddressRequest = exports.GetRelationshipRequest = exports.CreateRelationshipChangeRequest = exports.CreateRelationshipRequest = exports.AcceptRelationshipChangeRequest = exports.SendMessageRequest = exports.GetMessagesRequest = exports.GetMessageRequest = exports.GetAttachmentMetadataRequest = exports.CheckIdentityRequest = exports.UploadOwnFileRequest = exports.LoadPeerFileRequest = exports.LoadPeerFileViaReferenceRequest = exports.LoadPeerFileViaSecretRequest = exports.GetFilesRequest = exports.GetFileRequest = exports.CreateTokenQrCodeForFileRequest = exports.CreateTokenForFileRequest = exports.UpdateDeviceRequest = exports.GetDeviceOnboardingInfoRequest = exports.GetDeviceRequest = exports.DeleteDeviceRequest = exports.CreateDeviceOnboardingTokenRequest = exports.CreateDeviceRequest = exports.ValidateChallengeRequest = exports.CreateChallengeRequest = exports.CreateDeviceChallengeRequest = exports.CreateIdentityChallengeRequest = exports.CreateRelationshipChallengeRequest = exports.SyncEverythingRequest = exports.DownloadAttachmentRequest = exports.DownloadFileRequest = exports.SyncDatawalletRequest = exports.RegisterPushNotificationTokenRequest = exports.UpdateSharedItemRequest = void 0;
4477
+ exports.GetDeviceRequest = exports.DeleteDeviceRequest = exports.CreateDeviceOnboardingTokenRequest = exports.CreateDeviceRequest = exports.ValidateChallengeRequest = exports.CreateChallengeRequest = exports.CreateDeviceChallengeRequest = exports.CreateIdentityChallengeRequest = exports.CreateRelationshipChallengeRequest = exports.SyncEverythingRequest = exports.DownloadAttachmentRequest = exports.DownloadFileRequest = exports.SyncDatawalletRequest = exports.RegisterPushNotificationTokenRequest = exports.UpdateSettingRequest = exports.GetSettingsRequest = exports.GetSettingRequest = exports.DeleteSettingRequest = exports.CreateSettingRequest = exports.SentOutgoingRequestRequest = exports.RequireManualDecisionOfIncomingRequestRequest = exports.ReceivedIncomingRequestRequest = exports.GetOutgoingRequestsRequest = exports.GetOutgoingRequestRequest = exports.GetIncomingRequestsRequest = exports.GetIncomingRequestRequest = exports.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest = exports.CompleteOutgoingRequestRequest = exports.CompleteIncomingRequestRequest = exports.CheckPrerequisitesOfIncomingRequestRequest = exports.RejectIncomingRequestRequest = exports.CreateOutgoingRequestRequest = exports.AcceptIncomingRequestRequest = exports.UpdateDraftRequest = exports.GetDraftsRequest = exports.GetDraftRequest = exports.DeleteDraftRequest = exports.CreateDraftRequest = exports.UpdateAttributeRequest = exports.SucceedAttributeRequest = exports.GetHistoryByNameRequest = exports.GetAttributesRequest = exports.GetAttributeByNameRequest = exports.GetAttributeRequest = exports.DeleteAttributeByNameRequest = exports.DeleteAttributeRequest = exports.CreateAttributeRequest = exports.GetAttributesByNamesRequest = exports.LoadPeerTokenAnonymousByTruncatedReferenceRequest = exports.LoadPeerTokenAnonymousByIdAndKeyRequest = void 0;
4478
+ exports.LoadPeerTokenRequest = exports.GetTokensRequest = exports.GetTokenRequest = exports.GetQRCodeForTokenRequest = exports.CreateOwnTokenRequest = exports.LoadPeerRelationshipTemplateRequest = exports.GetRelationshipTemplatesRequest = exports.GetRelationshipTemplateRequest = exports.CreateTokenQrCodeForOwnTemplateRequest = exports.CreateTokenForOwnTemplateRequest = exports.CreateOwnRelationshipTemplateRequest = exports.RevokeRelationshipChangeRequest = exports.RejectRelationshipChangeRequest = exports.GetRelationshipsRequest = exports.GetRelationshipByAddressRequest = exports.GetRelationshipRequest = exports.CreateRelationshipChangeRequest = exports.CreateRelationshipRequest = exports.AcceptRelationshipChangeRequest = exports.SendMessageRequest = exports.GetMessagesRequest = exports.GetMessageRequest = exports.GetAttachmentMetadataRequest = exports.CheckIdentityRequest = exports.UploadOwnFileRequest = exports.LoadPeerFileRequest = exports.LoadPeerFileViaReferenceRequest = exports.LoadPeerFileViaSecretRequest = exports.GetFilesRequest = exports.GetFileRequest = exports.CreateTokenQrCodeForFileRequest = exports.CreateTokenForFileRequest = exports.UpdateDeviceRequest = exports.GetDeviceOnboardingInfoRequest = void 0;
4625
4479
  exports.LoadPeerTokenAnonymousByIdAndKeyRequest = {
4626
4480
  "$schema": "http://json-schema.org/draft-07/schema#",
4627
4481
  "$ref": "#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",
@@ -5017,314 +4871,6 @@ exports.UpdateDraftRequest = {
5017
4871
  }
5018
4872
  }
5019
4873
  };
5020
- exports.CreateRelationshipInfoRequest = {
5021
- "$schema": "http://json-schema.org/draft-07/schema#",
5022
- "$ref": "#/definitions/CreateRelationshipInfoRequest",
5023
- "definitions": {
5024
- "CreateRelationshipInfoRequest": {
5025
- "type": "object",
5026
- "properties": {
5027
- "relationshipId": {
5028
- "type": "string"
5029
- },
5030
- "attributes": {
5031
- "type": "array",
5032
- "items": {
5033
- "$ref": "#/definitions/RelationshipAttributeDTO"
5034
- }
5035
- },
5036
- "isPinned": {
5037
- "type": "boolean"
5038
- },
5039
- "title": {
5040
- "type": "string"
5041
- },
5042
- "description": {
5043
- "type": "string"
5044
- },
5045
- "userTitle": {
5046
- "type": "string"
5047
- },
5048
- "userDescription": {
5049
- "type": "string"
5050
- },
5051
- "theme": {
5052
- "$ref": "#/definitions/RelationshipThemeDTO"
5053
- }
5054
- },
5055
- "required": [
5056
- "relationshipId",
5057
- "attributes",
5058
- "isPinned",
5059
- "title"
5060
- ],
5061
- "additionalProperties": false
5062
- },
5063
- "RelationshipAttributeDTO": {
5064
- "type": "object",
5065
- "properties": {
5066
- "name": {
5067
- "type": "string"
5068
- },
5069
- "content": {
5070
- "$ref": "#/definitions/AttributeJSON"
5071
- },
5072
- "sharedItem": {
5073
- "type": "string"
5074
- }
5075
- },
5076
- "required": [
5077
- "name",
5078
- "content",
5079
- "sharedItem"
5080
- ],
5081
- "additionalProperties": false
5082
- },
5083
- "AttributeJSON": {
5084
- "type": "object",
5085
- "properties": {
5086
- "@type": {
5087
- "type": "string"
5088
- },
5089
- "@context": {
5090
- "type": "string"
5091
- },
5092
- "@version": {
5093
- "type": "string"
5094
- },
5095
- "name": {
5096
- "type": "string"
5097
- },
5098
- "value": {},
5099
- "validFrom": {
5100
- "type": "string"
5101
- },
5102
- "validTo": {
5103
- "type": "string"
5104
- }
5105
- },
5106
- "required": [
5107
- "@type",
5108
- "name",
5109
- "value"
5110
- ],
5111
- "additionalProperties": false
5112
- },
5113
- "RelationshipThemeDTO": {
5114
- "type": "object",
5115
- "properties": {
5116
- "image": {
5117
- "type": "string"
5118
- },
5119
- "imageBar": {
5120
- "type": "string"
5121
- },
5122
- "backgroundColor": {
5123
- "type": "string"
5124
- },
5125
- "foregroundColor": {
5126
- "type": "string"
5127
- }
5128
- },
5129
- "required": [
5130
- "image",
5131
- "imageBar",
5132
- "backgroundColor",
5133
- "foregroundColor"
5134
- ],
5135
- "additionalProperties": false
5136
- }
5137
- }
5138
- };
5139
- exports.DeleteRelationshipInfoRequest = {
5140
- "$schema": "http://json-schema.org/draft-07/schema#",
5141
- "$ref": "#/definitions/DeleteRelationshipInfoRequest",
5142
- "definitions": {
5143
- "DeleteRelationshipInfoRequest": {
5144
- "type": "object",
5145
- "properties": {
5146
- "id": {
5147
- "type": "string"
5148
- }
5149
- },
5150
- "required": [
5151
- "id"
5152
- ],
5153
- "additionalProperties": false
5154
- }
5155
- }
5156
- };
5157
- exports.DeleteRelationshipInfoByRelationshipRequest = {
5158
- "$schema": "http://json-schema.org/draft-07/schema#",
5159
- "$ref": "#/definitions/DeleteRelationshipInfoByRelationshipRequest",
5160
- "definitions": {
5161
- "DeleteRelationshipInfoByRelationshipRequest": {
5162
- "type": "object",
5163
- "properties": {
5164
- "relationshipId": {
5165
- "type": "string"
5166
- }
5167
- },
5168
- "required": [
5169
- "relationshipId"
5170
- ],
5171
- "additionalProperties": false
5172
- }
5173
- }
5174
- };
5175
- exports.GetRelationshipInfoRequest = {
5176
- "$schema": "http://json-schema.org/draft-07/schema#",
5177
- "$ref": "#/definitions/GetRelationshipInfoRequest",
5178
- "definitions": {
5179
- "GetRelationshipInfoRequest": {
5180
- "type": "object",
5181
- "properties": {
5182
- "id": {
5183
- "type": "string"
5184
- }
5185
- },
5186
- "required": [
5187
- "id"
5188
- ],
5189
- "additionalProperties": false
5190
- }
5191
- }
5192
- };
5193
- exports.GetRelationshipInfoByRelationshipRequest = {
5194
- "$schema": "http://json-schema.org/draft-07/schema#",
5195
- "$ref": "#/definitions/GetRelationshipInfoByRelationshipRequest",
5196
- "definitions": {
5197
- "GetRelationshipInfoByRelationshipRequest": {
5198
- "type": "object",
5199
- "properties": {
5200
- "relationshipId": {
5201
- "type": "string"
5202
- }
5203
- },
5204
- "required": [
5205
- "relationshipId"
5206
- ],
5207
- "additionalProperties": false
5208
- }
5209
- }
5210
- };
5211
- exports.UpdateRelationshipInfoRequest = {
5212
- "$schema": "http://json-schema.org/draft-07/schema#",
5213
- "$ref": "#/definitions/UpdateRelationshipInfoRequest",
5214
- "definitions": {
5215
- "UpdateRelationshipInfoRequest": {
5216
- "type": "object",
5217
- "properties": {
5218
- "id": {
5219
- "type": "string"
5220
- },
5221
- "attributes": {
5222
- "type": "array",
5223
- "items": {
5224
- "$ref": "#/definitions/RelationshipAttributeDTO"
5225
- }
5226
- },
5227
- "isPinned": {
5228
- "type": "boolean"
5229
- },
5230
- "title": {
5231
- "type": "string"
5232
- },
5233
- "description": {
5234
- "type": "string"
5235
- },
5236
- "userTitle": {
5237
- "type": "string"
5238
- },
5239
- "userDescription": {
5240
- "type": "string"
5241
- },
5242
- "theme": {
5243
- "$ref": "#/definitions/RelationshipThemeDTO"
5244
- }
5245
- },
5246
- "required": [
5247
- "id"
5248
- ],
5249
- "additionalProperties": false,
5250
- "description": "Overwrite a RelationshipInfo's attributes with the request's corresponding fields. Undefined fields in the request will leave the corresponding RelationshipInfo's attributes untouched."
5251
- },
5252
- "RelationshipAttributeDTO": {
5253
- "type": "object",
5254
- "properties": {
5255
- "name": {
5256
- "type": "string"
5257
- },
5258
- "content": {
5259
- "$ref": "#/definitions/AttributeJSON"
5260
- },
5261
- "sharedItem": {
5262
- "type": "string"
5263
- }
5264
- },
5265
- "required": [
5266
- "name",
5267
- "content",
5268
- "sharedItem"
5269
- ],
5270
- "additionalProperties": false
5271
- },
5272
- "AttributeJSON": {
5273
- "type": "object",
5274
- "properties": {
5275
- "@type": {
5276
- "type": "string"
5277
- },
5278
- "@context": {
5279
- "type": "string"
5280
- },
5281
- "@version": {
5282
- "type": "string"
5283
- },
5284
- "name": {
5285
- "type": "string"
5286
- },
5287
- "value": {},
5288
- "validFrom": {
5289
- "type": "string"
5290
- },
5291
- "validTo": {
5292
- "type": "string"
5293
- }
5294
- },
5295
- "required": [
5296
- "@type",
5297
- "name",
5298
- "value"
5299
- ],
5300
- "additionalProperties": false
5301
- },
5302
- "RelationshipThemeDTO": {
5303
- "type": "object",
5304
- "properties": {
5305
- "image": {
5306
- "type": "string"
5307
- },
5308
- "imageBar": {
5309
- "type": "string"
5310
- },
5311
- "backgroundColor": {
5312
- "type": "string"
5313
- },
5314
- "foregroundColor": {
5315
- "type": "string"
5316
- }
5317
- },
5318
- "required": [
5319
- "image",
5320
- "imageBar",
5321
- "backgroundColor",
5322
- "foregroundColor"
5323
- ],
5324
- "additionalProperties": false
5325
- }
5326
- }
5327
- };
5328
4874
  exports.AcceptIncomingRequestRequest = {
5329
4875
  "$schema": "http://json-schema.org/draft-07/schema#",
5330
4876
  "$ref": "#/definitions/AcceptIncomingRequestRequest",
@@ -5473,6 +5019,19 @@ exports.CreateOutgoingRequestRequest = {
5473
5019
  ],
5474
5020
  "description": "The items of the Request. Can be either a single {@link RequestItemJSON RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSON RequestItems } ."
5475
5021
  },
5022
+ "responseMetadata": {
5023
+ "anyOf": [
5024
+ {
5025
+ "type": "object",
5026
+ "description": "This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."
5027
+ },
5028
+ {
5029
+ "type": "object",
5030
+ "description": "This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."
5031
+ }
5032
+ ],
5033
+ "description": "This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."
5034
+ },
5476
5035
  "@context": {
5477
5036
  "type": "string"
5478
5037
  }
@@ -5531,7 +5090,7 @@ exports.CreateOutgoingRequestRequest = {
5531
5090
  },
5532
5091
  "responseMetadata": {
5533
5092
  "type": "object",
5534
- "description": "This propertycan be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5093
+ "description": "This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5535
5094
  },
5536
5095
  "items": {
5537
5096
  "type": "array",
@@ -5571,7 +5130,7 @@ exports.CreateOutgoingRequestRequest = {
5571
5130
  },
5572
5131
  "responseMetadata": {
5573
5132
  "type": "object",
5574
- "description": "This propertycan be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5133
+ "description": "This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5575
5134
  },
5576
5135
  "mustBeAccepted": {
5577
5136
  "type": "boolean",
@@ -5601,7 +5160,7 @@ exports.CreateOutgoingRequestRequest = {
5601
5160
  },
5602
5161
  "responseMetadata": {
5603
5162
  "type": "object",
5604
- "description": "This propertycan be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5163
+ "description": "This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5605
5164
  },
5606
5165
  "items": {
5607
5166
  "type": "array",
@@ -5631,7 +5190,7 @@ exports.CreateOutgoingRequestRequest = {
5631
5190
  },
5632
5191
  "responseMetadata": {
5633
5192
  "type": "object",
5634
- "description": "This propertycan be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5193
+ "description": "This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5635
5194
  },
5636
5195
  "mustBeAccepted": {
5637
5196
  "type": "boolean",
@@ -5743,7 +5302,7 @@ exports.CheckPrerequisitesOfIncomingRequestRequest = {
5743
5302
  "properties": {
5744
5303
  "requestId": {
5745
5304
  "type": "string",
5746
- "pattern": "CNSREQ[A-Za-z0-9]{14}"
5305
+ "pattern": "REQ[A-Za-z0-9]{14}"
5747
5306
  }
5748
5307
  },
5749
5308
  "required": [
@@ -5762,7 +5321,7 @@ exports.CompleteIncomingRequestRequest = {
5762
5321
  "properties": {
5763
5322
  "requestId": {
5764
5323
  "type": "string",
5765
- "pattern": "CNSREQ[A-Za-z0-9]{14}"
5324
+ "pattern": "REQ[A-Za-z0-9]{14}"
5766
5325
  },
5767
5326
  "responseSourceId": {
5768
5327
  "type": "string",
@@ -5786,7 +5345,7 @@ exports.CompleteOutgoingRequestRequest = {
5786
5345
  "properties": {
5787
5346
  "requestId": {
5788
5347
  "type": "string",
5789
- "pattern": "CNSREQ[A-Za-z0-9]{14}"
5348
+ "pattern": "REQ[A-Za-z0-9]{14}"
5790
5349
  },
5791
5350
  "receivedResponse": {
5792
5351
  "$ref": "#/definitions/ResponseJSON"
@@ -5833,6 +5392,9 @@ exports.CompleteOutgoingRequestRequest = {
5833
5392
  }
5834
5393
  ]
5835
5394
  }
5395
+ },
5396
+ "metadata": {
5397
+ "type": "object"
5836
5398
  }
5837
5399
  },
5838
5400
  "required": [
@@ -5946,7 +5508,7 @@ exports.GetIncomingRequestRequest = {
5946
5508
  "properties": {
5947
5509
  "id": {
5948
5510
  "type": "string",
5949
- "pattern": "CNSREQ[A-Za-z0-9]{14}"
5511
+ "pattern": "REQ[A-Za-z0-9]{14}"
5950
5512
  }
5951
5513
  },
5952
5514
  "required": [
@@ -6076,7 +5638,7 @@ exports.GetOutgoingRequestRequest = {
6076
5638
  "properties": {
6077
5639
  "id": {
6078
5640
  "type": "string",
6079
- "pattern": "CNSREQ[A-Za-z0-9]{14}"
5641
+ "pattern": "REQ[A-Za-z0-9]{14}"
6080
5642
  }
6081
5643
  },
6082
5644
  "required": [
@@ -6252,6 +5814,10 @@ exports.ReceivedIncomingRequestRequest = {
6252
5814
  ]
6253
5815
  },
6254
5816
  "description": "The items of the Request. Can be either a single {@link RequestItemJSON RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSON RequestItems } ."
5817
+ },
5818
+ "responseMetadata": {
5819
+ "type": "object",
5820
+ "description": "This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."
6255
5821
  }
6256
5822
  },
6257
5823
  "required": [
@@ -6286,7 +5852,7 @@ exports.ReceivedIncomingRequestRequest = {
6286
5852
  },
6287
5853
  "responseMetadata": {
6288
5854
  "type": "object",
6289
- "description": "This propertycan be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5855
+ "description": "This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
6290
5856
  },
6291
5857
  "items": {
6292
5858
  "type": "array",
@@ -6326,7 +5892,7 @@ exports.ReceivedIncomingRequestRequest = {
6326
5892
  },
6327
5893
  "responseMetadata": {
6328
5894
  "type": "object",
6329
- "description": "This propertycan be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
5895
+ "description": "This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."
6330
5896
  },
6331
5897
  "mustBeAccepted": {
6332
5898
  "type": "boolean",
@@ -6350,7 +5916,7 @@ exports.RequireManualDecisionOfIncomingRequestRequest = {
6350
5916
  "properties": {
6351
5917
  "requestId": {
6352
5918
  "type": "string",
6353
- "pattern": "CNSREQ[A-Za-z0-9]{14}"
5919
+ "pattern": "REQ[A-Za-z0-9]{14}"
6354
5920
  }
6355
5921
  },
6356
5922
  "required": [
@@ -6369,7 +5935,7 @@ exports.SentOutgoingRequestRequest = {
6369
5935
  "properties": {
6370
5936
  "requestId": {
6371
5937
  "type": "string",
6372
- "pattern": "CNSREQ[A-Za-z0-9]{14}"
5938
+ "pattern": "REQ[A-Za-z0-9]{14}"
6373
5939
  },
6374
5940
  "messageId": {
6375
5941
  "type": "string",
@@ -6485,193 +6051,6 @@ exports.UpdateSettingRequest = {
6485
6051
  }
6486
6052
  }
6487
6053
  };
6488
- exports.CreateSharedItemRequest = {
6489
- "$schema": "http://json-schema.org/draft-07/schema#",
6490
- "$ref": "#/definitions/CreateSharedItemRequest",
6491
- "definitions": {
6492
- "CreateSharedItemRequest": {
6493
- "type": "object",
6494
- "properties": {
6495
- "tags": {
6496
- "type": "array",
6497
- "items": {
6498
- "type": "string"
6499
- }
6500
- },
6501
- "sharedBy": {
6502
- "type": "string"
6503
- },
6504
- "sharedWith": {
6505
- "type": "string"
6506
- },
6507
- "sharedAt": {
6508
- "type": "string"
6509
- },
6510
- "reference": {
6511
- "type": "string"
6512
- },
6513
- "content": {},
6514
- "succeedsItem": {
6515
- "type": "string"
6516
- },
6517
- "succeedsAt": {
6518
- "type": "string"
6519
- },
6520
- "expiresAt": {
6521
- "type": "string"
6522
- }
6523
- },
6524
- "required": [
6525
- "sharedBy",
6526
- "sharedWith",
6527
- "sharedAt",
6528
- "content"
6529
- ],
6530
- "additionalProperties": false
6531
- }
6532
- }
6533
- };
6534
- exports.DeleteSharedItemRequest = {
6535
- "$schema": "http://json-schema.org/draft-07/schema#",
6536
- "$ref": "#/definitions/DeleteSharedItemRequest",
6537
- "definitions": {
6538
- "DeleteSharedItemRequest": {
6539
- "type": "object",
6540
- "properties": {
6541
- "id": {
6542
- "type": "string"
6543
- }
6544
- },
6545
- "required": [
6546
- "id"
6547
- ],
6548
- "additionalProperties": false
6549
- }
6550
- }
6551
- };
6552
- exports.GetSharedItemRequest = {
6553
- "$schema": "http://json-schema.org/draft-07/schema#",
6554
- "$ref": "#/definitions/GetSharedItemRequest",
6555
- "definitions": {
6556
- "GetSharedItemRequest": {
6557
- "type": "object",
6558
- "properties": {
6559
- "id": {
6560
- "type": "string"
6561
- }
6562
- },
6563
- "required": [
6564
- "id"
6565
- ],
6566
- "additionalProperties": false
6567
- }
6568
- }
6569
- };
6570
- exports.GetSharedItemsRequest = {
6571
- "$schema": "http://json-schema.org/draft-07/schema#",
6572
- "$ref": "#/definitions/GetSharedItemsRequest",
6573
- "definitions": {
6574
- "GetSharedItemsRequest": {
6575
- "type": "object",
6576
- "properties": {
6577
- "query": {}
6578
- },
6579
- "additionalProperties": false
6580
- }
6581
- }
6582
- };
6583
- exports.GetSharedItemsByAddressRequest = {
6584
- "$schema": "http://json-schema.org/draft-07/schema#",
6585
- "$ref": "#/definitions/GetSharedItemsByAddressRequest",
6586
- "definitions": {
6587
- "GetSharedItemsByAddressRequest": {
6588
- "type": "object",
6589
- "properties": {
6590
- "address": {
6591
- "type": "string"
6592
- }
6593
- },
6594
- "required": [
6595
- "address"
6596
- ],
6597
- "additionalProperties": false
6598
- }
6599
- }
6600
- };
6601
- exports.GetSharedItemsByReferenceRequest = {
6602
- "$schema": "http://json-schema.org/draft-07/schema#",
6603
- "$ref": "#/definitions/GetSharedItemsByReferenceRequest",
6604
- "definitions": {
6605
- "GetSharedItemsByReferenceRequest": {
6606
- "type": "object",
6607
- "properties": {
6608
- "reference": {
6609
- "type": "string"
6610
- }
6611
- },
6612
- "required": [
6613
- "reference"
6614
- ],
6615
- "additionalProperties": false
6616
- }
6617
- }
6618
- };
6619
- exports.GetSharedItemsSharedByAddressRequest = {
6620
- "$schema": "http://json-schema.org/draft-07/schema#",
6621
- "$ref": "#/definitions/GetSharedItemsSharedByAddressRequest",
6622
- "definitions": {
6623
- "GetSharedItemsSharedByAddressRequest": {
6624
- "type": "object",
6625
- "properties": {
6626
- "address": {
6627
- "type": "string"
6628
- }
6629
- },
6630
- "required": [
6631
- "address"
6632
- ],
6633
- "additionalProperties": false
6634
- }
6635
- }
6636
- };
6637
- exports.GetSharedItemsSharedWithAddressRequest = {
6638
- "$schema": "http://json-schema.org/draft-07/schema#",
6639
- "$ref": "#/definitions/GetSharedItemsSharedWithAddressRequest",
6640
- "definitions": {
6641
- "GetSharedItemsSharedWithAddressRequest": {
6642
- "type": "object",
6643
- "properties": {
6644
- "address": {
6645
- "type": "string"
6646
- }
6647
- },
6648
- "required": [
6649
- "address"
6650
- ],
6651
- "additionalProperties": false
6652
- }
6653
- }
6654
- };
6655
- exports.UpdateSharedItemRequest = {
6656
- "$schema": "http://json-schema.org/draft-07/schema#",
6657
- "$ref": "#/definitions/UpdateSharedItemRequest",
6658
- "definitions": {
6659
- "UpdateSharedItemRequest": {
6660
- "type": "object",
6661
- "properties": {
6662
- "id": {
6663
- "type": "string"
6664
- },
6665
- "content": {}
6666
- },
6667
- "required": [
6668
- "id",
6669
- "content"
6670
- ],
6671
- "additionalProperties": false
6672
- }
6673
- }
6674
- };
6675
6054
  exports.RegisterPushNotificationTokenRequest = {
6676
6055
  "$schema": "http://json-schema.org/draft-07/schema#",
6677
6056
  "$ref": "#/definitions/RegisterPushNotificationTokenRequest",
@@ -7912,7 +7291,6 @@ __exportStar(__webpack_require__(/*! ./UseCase */ "./dist/useCases/common/UseCas
7912
7291
  __exportStar(__webpack_require__(/*! ./validation/AddressValidator */ "./dist/useCases/common/validation/AddressValidator.js"), exports);
7913
7292
  __exportStar(__webpack_require__(/*! ./validation/DateValidator */ "./dist/useCases/common/validation/DateValidator.js"), exports);
7914
7293
  __exportStar(__webpack_require__(/*! ./validation/IdValidator */ "./dist/useCases/common/validation/IdValidator.js"), exports);
7915
- __exportStar(__webpack_require__(/*! ./validation/RelationshipAttributeDTOValidator */ "./dist/useCases/common/validation/RelationshipAttributeDTOValidator.js"), exports);
7916
7294
  __exportStar(__webpack_require__(/*! ./validation/SchemaValidator */ "./dist/useCases/common/validation/SchemaValidator.js"), exports);
7917
7295
  //# sourceMappingURL=index.js.map
7918
7296
 
@@ -8024,32 +7402,6 @@ exports.IdValidator = IdValidator;
8024
7402
 
8025
7403
  /***/ }),
8026
7404
 
8027
- /***/ "./dist/useCases/common/validation/RelationshipAttributeDTOValidator.js":
8028
- /*!******************************************************************************!*\
8029
- !*** ./dist/useCases/common/validation/RelationshipAttributeDTOValidator.js ***!
8030
- \******************************************************************************/
8031
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8032
-
8033
- "use strict";
8034
-
8035
- Object.defineProperty(exports, "__esModule", ({ value: true }));
8036
- exports.RelationshipAttributeDTOValidator = void 0;
8037
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
8038
- const fluent_ts_validator_1 = __webpack_require__(/*! fluent-ts-validator */ "./node_modules/fluent-ts-validator/dist/index.js");
8039
- class RelationshipAttributeDTOValidator extends fluent_ts_validator_1.AbstractValidator {
8040
- constructor() {
8041
- super();
8042
- this.validateIfString((x) => x.sharedItem).fulfills((x) => consumption_1.ConsumptionIds.sharedItem.validate(x));
8043
- }
8044
- static required() {
8045
- return new RelationshipAttributeDTOValidator();
8046
- }
8047
- }
8048
- exports.RelationshipAttributeDTOValidator = RelationshipAttributeDTOValidator;
8049
- //# sourceMappingURL=RelationshipAttributeDTOValidator.js.map
8050
-
8051
- /***/ }),
8052
-
8053
7405
  /***/ "./dist/useCases/common/validation/SchemaValidator.js":
8054
7406
  /*!************************************************************!*\
8055
7407
  !*** ./dist/useCases/common/validation/SchemaValidator.js ***!
@@ -9181,546 +8533,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
9181
8533
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9182
8534
  __exportStar(__webpack_require__(/*! ./attributes */ "./dist/useCases/consumption/attributes/index.js"), exports);
9183
8535
  __exportStar(__webpack_require__(/*! ./drafts */ "./dist/useCases/consumption/drafts/index.js"), exports);
9184
- __exportStar(__webpack_require__(/*! ./relationshipInfo */ "./dist/useCases/consumption/relationshipInfo/index.js"), exports);
9185
8536
  __exportStar(__webpack_require__(/*! ./requests */ "./dist/useCases/consumption/requests/index.js"), exports);
9186
8537
  __exportStar(__webpack_require__(/*! ./settings */ "./dist/useCases/consumption/settings/index.js"), exports);
9187
- __exportStar(__webpack_require__(/*! ./sharedItems */ "./dist/useCases/consumption/sharedItems/index.js"), exports);
9188
- //# sourceMappingURL=index.js.map
9189
-
9190
- /***/ }),
9191
-
9192
- /***/ "./dist/useCases/consumption/relationshipInfo/CreateRelationshipInfo.js":
9193
- /*!******************************************************************************!*\
9194
- !*** ./dist/useCases/consumption/relationshipInfo/CreateRelationshipInfo.js ***!
9195
- \******************************************************************************/
9196
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9197
-
9198
- "use strict";
9199
-
9200
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
9201
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9202
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9203
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9204
- return c > 3 && r && Object.defineProperty(target, key, r), r;
9205
- };
9206
- var __metadata = (this && this.__metadata) || function (k, v) {
9207
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9208
- };
9209
- var __param = (this && this.__param) || function (paramIndex, decorator) {
9210
- return function (target, key) { decorator(target, key, paramIndex); }
9211
- };
9212
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9213
- exports.CreateRelationshipInfoUseCase = void 0;
9214
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
9215
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
9216
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
9217
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
9218
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
9219
- const UseCase_1 = __webpack_require__(/*! ../../common/UseCase */ "./dist/useCases/common/UseCase.js");
9220
- const RelationshipInfoMapper_1 = __webpack_require__(/*! ./RelationshipInfoMapper */ "./dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js");
9221
- class CreateRelationshipInfoRequestValidator extends common_1.RuntimeValidator {
9222
- constructor() {
9223
- super();
9224
- this.validateIfAny((x) => x.relationshipId).fulfills(common_1.IdValidator.required(transport_1.BackboneIds.relationship));
9225
- this.validateIfEach((x) => x.attributes).fulfills(common_1.RelationshipAttributeDTOValidator.required());
9226
- }
9227
- }
9228
- let CreateRelationshipInfoUseCase = class CreateRelationshipInfoUseCase extends UseCase_1.UseCase {
9229
- constructor(relationshipInfoController, accountController, validator) {
9230
- super(validator);
9231
- this.relationshipInfoController = relationshipInfoController;
9232
- this.accountController = accountController;
9233
- }
9234
- async executeInternal(request) {
9235
- const relationshipId = transport_1.CoreId.from(request.relationshipId);
9236
- const existingRelationshipInfo = await this.relationshipInfoController.getRelationshipInfoByRelationship(relationshipId);
9237
- if (existingRelationshipInfo !== undefined) {
9238
- return ts_utils_1.Result.fail(common_1.RuntimeErrors.relationshipInfo.relationshipInfoExists(relationshipId.toString()));
9239
- }
9240
- const attributes = await Promise.all(request.attributes.map((a) => {
9241
- return consumption_1.RelationshipAttribute.from({
9242
- name: a.name,
9243
- content: a.content,
9244
- sharedItem: transport_1.CoreId.from(a.sharedItem)
9245
- });
9246
- }));
9247
- const theme = request.theme === undefined ? undefined : consumption_1.RelationshipTheme.from(request.theme);
9248
- const parameters = consumption_1.RelationshipInfo.from({
9249
- id: await consumption_1.ConsumptionIds.relationshipInfo.generate(),
9250
- relationshipId: relationshipId,
9251
- attributes: attributes,
9252
- isPinned: request.isPinned,
9253
- title: request.title,
9254
- description: request.description,
9255
- userTitle: request.userTitle,
9256
- userDescription: request.userDescription,
9257
- theme: theme
9258
- });
9259
- await this.relationshipInfoController.createRelationshipInfo(parameters);
9260
- await this.accountController.syncDatawallet();
9261
- return ts_utils_1.Result.ok(RelationshipInfoMapper_1.RelationshipInfoMapper.toRelationshipInfoDTO(parameters));
9262
- }
9263
- };
9264
- CreateRelationshipInfoUseCase = __decorate([
9265
- __param(0, typescript_ioc_1.Inject),
9266
- __param(1, typescript_ioc_1.Inject),
9267
- __param(2, typescript_ioc_1.Inject),
9268
- __metadata("design:paramtypes", [consumption_1.RelationshipInfoController,
9269
- transport_1.AccountController,
9270
- CreateRelationshipInfoRequestValidator])
9271
- ], CreateRelationshipInfoUseCase);
9272
- exports.CreateRelationshipInfoUseCase = CreateRelationshipInfoUseCase;
9273
- //# sourceMappingURL=CreateRelationshipInfo.js.map
9274
-
9275
- /***/ }),
9276
-
9277
- /***/ "./dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.js":
9278
- /*!******************************************************************************!*\
9279
- !*** ./dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.js ***!
9280
- \******************************************************************************/
9281
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9282
-
9283
- "use strict";
9284
-
9285
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
9286
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9287
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9288
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9289
- return c > 3 && r && Object.defineProperty(target, key, r), r;
9290
- };
9291
- var __metadata = (this && this.__metadata) || function (k, v) {
9292
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9293
- };
9294
- var __param = (this && this.__param) || function (paramIndex, decorator) {
9295
- return function (target, key) { decorator(target, key, paramIndex); }
9296
- };
9297
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9298
- exports.DeleteRelationshipInfoUseCase = void 0;
9299
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
9300
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
9301
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
9302
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
9303
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
9304
- const RuntimeErrors_1 = __webpack_require__(/*! ../../common/RuntimeErrors */ "./dist/useCases/common/RuntimeErrors.js");
9305
- const UseCase_1 = __webpack_require__(/*! ../../common/UseCase */ "./dist/useCases/common/UseCase.js");
9306
- class DeleteRelationshipInfoRequestValidator extends common_1.RuntimeValidator {
9307
- constructor() {
9308
- super();
9309
- this.validateIfAny((x) => x.id).fulfills(common_1.IdValidator.required(consumption_1.ConsumptionIds.relationshipInfo));
9310
- }
9311
- }
9312
- let DeleteRelationshipInfoUseCase = class DeleteRelationshipInfoUseCase extends UseCase_1.UseCase {
9313
- constructor(relationshipInfoController, accountController, validator) {
9314
- super(validator);
9315
- this.relationshipInfoController = relationshipInfoController;
9316
- this.accountController = accountController;
9317
- }
9318
- async executeInternal(request) {
9319
- const relationshipInfo = await this.relationshipInfoController.getRelationshipInfo(transport_1.CoreId.from(request.id));
9320
- if (!relationshipInfo) {
9321
- return ts_utils_1.Result.fail(RuntimeErrors_1.RuntimeErrors.general.recordNotFound(consumption_1.RelationshipInfo));
9322
- }
9323
- await this.relationshipInfoController.deleteRelationshipInfo(relationshipInfo);
9324
- await this.accountController.syncDatawallet();
9325
- return ts_utils_1.Result.ok(undefined);
9326
- }
9327
- };
9328
- DeleteRelationshipInfoUseCase = __decorate([
9329
- __param(0, typescript_ioc_1.Inject),
9330
- __param(1, typescript_ioc_1.Inject),
9331
- __param(2, typescript_ioc_1.Inject),
9332
- __metadata("design:paramtypes", [consumption_1.RelationshipInfoController,
9333
- transport_1.AccountController,
9334
- DeleteRelationshipInfoRequestValidator])
9335
- ], DeleteRelationshipInfoUseCase);
9336
- exports.DeleteRelationshipInfoUseCase = DeleteRelationshipInfoUseCase;
9337
- //# sourceMappingURL=DeleteRelationshipInfo.js.map
9338
-
9339
- /***/ }),
9340
-
9341
- /***/ "./dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.js":
9342
- /*!********************************************************************************************!*\
9343
- !*** ./dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.js ***!
9344
- \********************************************************************************************/
9345
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9346
-
9347
- "use strict";
9348
-
9349
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
9350
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9351
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9352
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9353
- return c > 3 && r && Object.defineProperty(target, key, r), r;
9354
- };
9355
- var __metadata = (this && this.__metadata) || function (k, v) {
9356
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9357
- };
9358
- var __param = (this && this.__param) || function (paramIndex, decorator) {
9359
- return function (target, key) { decorator(target, key, paramIndex); }
9360
- };
9361
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9362
- exports.DeleteRelationshipInfoByRelationshipUseCase = void 0;
9363
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
9364
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
9365
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
9366
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
9367
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
9368
- const RuntimeErrors_1 = __webpack_require__(/*! ../../common/RuntimeErrors */ "./dist/useCases/common/RuntimeErrors.js");
9369
- const UseCase_1 = __webpack_require__(/*! ../../common/UseCase */ "./dist/useCases/common/UseCase.js");
9370
- class DeleteRelationshipInfoByRelationshipRequestValidator extends common_1.RuntimeValidator {
9371
- constructor() {
9372
- super();
9373
- this.validateIfAny((x) => x.relationshipId).fulfills(common_1.IdValidator.required(transport_1.BackboneIds.relationship));
9374
- }
9375
- }
9376
- let DeleteRelationshipInfoByRelationshipUseCase = class DeleteRelationshipInfoByRelationshipUseCase extends UseCase_1.UseCase {
9377
- constructor(relationshipInfoController, accountController, validator) {
9378
- super(validator);
9379
- this.relationshipInfoController = relationshipInfoController;
9380
- this.accountController = accountController;
9381
- }
9382
- async executeInternal(request) {
9383
- const relationshipInfo = await this.relationshipInfoController.getRelationshipInfoByRelationship(transport_1.CoreId.from(request.relationshipId));
9384
- if (!relationshipInfo) {
9385
- return ts_utils_1.Result.fail(RuntimeErrors_1.RuntimeErrors.general.recordNotFound(consumption_1.RelationshipInfo));
9386
- }
9387
- await this.relationshipInfoController.deleteRelationshipInfo(relationshipInfo);
9388
- await this.accountController.syncDatawallet();
9389
- return ts_utils_1.Result.ok(undefined);
9390
- }
9391
- };
9392
- DeleteRelationshipInfoByRelationshipUseCase = __decorate([
9393
- __param(0, typescript_ioc_1.Inject),
9394
- __param(1, typescript_ioc_1.Inject),
9395
- __param(2, typescript_ioc_1.Inject),
9396
- __metadata("design:paramtypes", [consumption_1.RelationshipInfoController,
9397
- transport_1.AccountController,
9398
- DeleteRelationshipInfoByRelationshipRequestValidator])
9399
- ], DeleteRelationshipInfoByRelationshipUseCase);
9400
- exports.DeleteRelationshipInfoByRelationshipUseCase = DeleteRelationshipInfoByRelationshipUseCase;
9401
- //# sourceMappingURL=DeleteRelationshipInfoByRelationship.js.map
9402
-
9403
- /***/ }),
9404
-
9405
- /***/ "./dist/useCases/consumption/relationshipInfo/GetRelationshipInfo.js":
9406
- /*!***************************************************************************!*\
9407
- !*** ./dist/useCases/consumption/relationshipInfo/GetRelationshipInfo.js ***!
9408
- \***************************************************************************/
9409
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9410
-
9411
- "use strict";
9412
-
9413
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
9414
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9415
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9416
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9417
- return c > 3 && r && Object.defineProperty(target, key, r), r;
9418
- };
9419
- var __metadata = (this && this.__metadata) || function (k, v) {
9420
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9421
- };
9422
- var __param = (this && this.__param) || function (paramIndex, decorator) {
9423
- return function (target, key) { decorator(target, key, paramIndex); }
9424
- };
9425
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9426
- exports.GetRelationshipInfoUseCase = void 0;
9427
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
9428
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
9429
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
9430
- const fluent_ts_validator_1 = __webpack_require__(/*! fluent-ts-validator */ "./node_modules/fluent-ts-validator/dist/index.js");
9431
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
9432
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
9433
- const RuntimeErrors_1 = __webpack_require__(/*! ../../common/RuntimeErrors */ "./dist/useCases/common/RuntimeErrors.js");
9434
- const UseCase_1 = __webpack_require__(/*! ../../common/UseCase */ "./dist/useCases/common/UseCase.js");
9435
- const RelationshipInfoMapper_1 = __webpack_require__(/*! ./RelationshipInfoMapper */ "./dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js");
9436
- class GetRelationshipInfoRequestValidator extends fluent_ts_validator_1.AbstractValidator {
9437
- constructor() {
9438
- super();
9439
- this.validateIfAny((x) => x.id).fulfills(common_1.IdValidator.required(consumption_1.ConsumptionIds.relationshipInfo));
9440
- }
9441
- }
9442
- let GetRelationshipInfoUseCase = class GetRelationshipInfoUseCase extends UseCase_1.UseCase {
9443
- constructor(relationshipInfoController, validator) {
9444
- super(validator);
9445
- this.relationshipInfoController = relationshipInfoController;
9446
- }
9447
- async executeInternal(request) {
9448
- const relationshipInfo = await this.relationshipInfoController.getRelationshipInfo(transport_1.CoreId.from(request.id));
9449
- if (!relationshipInfo) {
9450
- return ts_utils_1.Result.fail(RuntimeErrors_1.RuntimeErrors.general.recordNotFound(consumption_1.RelationshipInfo));
9451
- }
9452
- return ts_utils_1.Result.ok(RelationshipInfoMapper_1.RelationshipInfoMapper.toRelationshipInfoDTO(relationshipInfo));
9453
- }
9454
- };
9455
- GetRelationshipInfoUseCase = __decorate([
9456
- __param(0, typescript_ioc_1.Inject),
9457
- __param(1, typescript_ioc_1.Inject),
9458
- __metadata("design:paramtypes", [consumption_1.RelationshipInfoController, GetRelationshipInfoRequestValidator])
9459
- ], GetRelationshipInfoUseCase);
9460
- exports.GetRelationshipInfoUseCase = GetRelationshipInfoUseCase;
9461
- //# sourceMappingURL=GetRelationshipInfo.js.map
9462
-
9463
- /***/ }),
9464
-
9465
- /***/ "./dist/useCases/consumption/relationshipInfo/GetRelationshipInfoByRelationship.js":
9466
- /*!*****************************************************************************************!*\
9467
- !*** ./dist/useCases/consumption/relationshipInfo/GetRelationshipInfoByRelationship.js ***!
9468
- \*****************************************************************************************/
9469
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9470
-
9471
- "use strict";
9472
-
9473
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
9474
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9475
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9476
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9477
- return c > 3 && r && Object.defineProperty(target, key, r), r;
9478
- };
9479
- var __metadata = (this && this.__metadata) || function (k, v) {
9480
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9481
- };
9482
- var __param = (this && this.__param) || function (paramIndex, decorator) {
9483
- return function (target, key) { decorator(target, key, paramIndex); }
9484
- };
9485
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9486
- exports.GetRelationshipInfoByRelationshipUseCase = void 0;
9487
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
9488
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
9489
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
9490
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
9491
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
9492
- const RuntimeErrors_1 = __webpack_require__(/*! ../../common/RuntimeErrors */ "./dist/useCases/common/RuntimeErrors.js");
9493
- const UseCase_1 = __webpack_require__(/*! ../../common/UseCase */ "./dist/useCases/common/UseCase.js");
9494
- const RelationshipInfoMapper_1 = __webpack_require__(/*! ./RelationshipInfoMapper */ "./dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js");
9495
- class GetRelationshipInfoRequestValidator extends common_1.RuntimeValidator {
9496
- constructor() {
9497
- super();
9498
- this.validateIfAny((x) => x.relationshipId).fulfills(common_1.IdValidator.required(transport_1.BackboneIds.relationship));
9499
- }
9500
- }
9501
- let GetRelationshipInfoByRelationshipUseCase = class GetRelationshipInfoByRelationshipUseCase extends UseCase_1.UseCase {
9502
- constructor(relationshipInfoController, validator) {
9503
- super(validator);
9504
- this.relationshipInfoController = relationshipInfoController;
9505
- }
9506
- async executeInternal(request) {
9507
- const relationshipInfo = await this.relationshipInfoController.getRelationshipInfoByRelationship(transport_1.CoreId.from(request.relationshipId));
9508
- if (!relationshipInfo) {
9509
- return ts_utils_1.Result.fail(RuntimeErrors_1.RuntimeErrors.general.recordNotFound(consumption_1.RelationshipInfo));
9510
- }
9511
- return ts_utils_1.Result.ok(RelationshipInfoMapper_1.RelationshipInfoMapper.toRelationshipInfoDTO(relationshipInfo));
9512
- }
9513
- };
9514
- GetRelationshipInfoByRelationshipUseCase = __decorate([
9515
- __param(0, typescript_ioc_1.Inject),
9516
- __param(1, typescript_ioc_1.Inject),
9517
- __metadata("design:paramtypes", [consumption_1.RelationshipInfoController, GetRelationshipInfoRequestValidator])
9518
- ], GetRelationshipInfoByRelationshipUseCase);
9519
- exports.GetRelationshipInfoByRelationshipUseCase = GetRelationshipInfoByRelationshipUseCase;
9520
- //# sourceMappingURL=GetRelationshipInfoByRelationship.js.map
9521
-
9522
- /***/ }),
9523
-
9524
- /***/ "./dist/useCases/consumption/relationshipInfo/RelationshipAttributeMapper.js":
9525
- /*!***********************************************************************************!*\
9526
- !*** ./dist/useCases/consumption/relationshipInfo/RelationshipAttributeMapper.js ***!
9527
- \***********************************************************************************/
9528
- /***/ ((__unused_webpack_module, exports) => {
9529
-
9530
- "use strict";
9531
-
9532
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9533
- exports.RelationshipAttributeMapper = void 0;
9534
- class RelationshipAttributeMapper {
9535
- static toRelationshipAttributeDTO(relationshipAttribute) {
9536
- return {
9537
- name: relationshipAttribute.name,
9538
- content: relationshipAttribute.content.toJSON(),
9539
- sharedItem: relationshipAttribute.sharedItem.toString()
9540
- };
9541
- }
9542
- static toRelationshipAttributeDTOList(relationshipAttributes) {
9543
- return relationshipAttributes.map((elem) => this.toRelationshipAttributeDTO(elem));
9544
- }
9545
- }
9546
- exports.RelationshipAttributeMapper = RelationshipAttributeMapper;
9547
- //# sourceMappingURL=RelationshipAttributeMapper.js.map
9548
-
9549
- /***/ }),
9550
-
9551
- /***/ "./dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js":
9552
- /*!******************************************************************************!*\
9553
- !*** ./dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js ***!
9554
- \******************************************************************************/
9555
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9556
-
9557
- "use strict";
9558
-
9559
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9560
- exports.RelationshipInfoMapper = void 0;
9561
- const RelationshipAttributeMapper_1 = __webpack_require__(/*! ./RelationshipAttributeMapper */ "./dist/useCases/consumption/relationshipInfo/RelationshipAttributeMapper.js");
9562
- const RelationshipThemeMapper_1 = __webpack_require__(/*! ./RelationshipThemeMapper */ "./dist/useCases/consumption/relationshipInfo/RelationshipThemeMapper.js");
9563
- class RelationshipInfoMapper {
9564
- static toRelationshipInfoDTO(relationshipInfo) {
9565
- return {
9566
- id: relationshipInfo.id.toString(),
9567
- relationshipId: relationshipInfo.relationshipId.toString(),
9568
- attributes: RelationshipAttributeMapper_1.RelationshipAttributeMapper.toRelationshipAttributeDTOList(relationshipInfo.attributes),
9569
- isPinned: relationshipInfo.isPinned,
9570
- title: relationshipInfo.title,
9571
- description: relationshipInfo.description,
9572
- userTitle: relationshipInfo.userTitle,
9573
- userDescription: relationshipInfo.userDescription,
9574
- theme: relationshipInfo.theme ? RelationshipThemeMapper_1.RelationshipThemeMapper.toRelationshipThemeDTO(relationshipInfo.theme) : undefined
9575
- };
9576
- }
9577
- static toRelationshipInfoDTOList(relationshipInfoList) {
9578
- return relationshipInfoList.map((elem) => this.toRelationshipInfoDTO(elem));
9579
- }
9580
- }
9581
- exports.RelationshipInfoMapper = RelationshipInfoMapper;
9582
- //# sourceMappingURL=RelationshipInfoMapper.js.map
9583
-
9584
- /***/ }),
9585
-
9586
- /***/ "./dist/useCases/consumption/relationshipInfo/RelationshipThemeMapper.js":
9587
- /*!*******************************************************************************!*\
9588
- !*** ./dist/useCases/consumption/relationshipInfo/RelationshipThemeMapper.js ***!
9589
- \*******************************************************************************/
9590
- /***/ ((__unused_webpack_module, exports) => {
9591
-
9592
- "use strict";
9593
-
9594
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9595
- exports.RelationshipThemeMapper = void 0;
9596
- class RelationshipThemeMapper {
9597
- static toRelationshipThemeDTO(relationshipTheme) {
9598
- return {
9599
- image: relationshipTheme.image,
9600
- imageBar: relationshipTheme.imageBar,
9601
- backgroundColor: relationshipTheme.backgroundColor,
9602
- foregroundColor: relationshipTheme.foregroundColor
9603
- };
9604
- }
9605
- static toRelationshipThemeDTOList(relationshipThemes) {
9606
- return relationshipThemes.map((elem) => this.toRelationshipThemeDTO(elem));
9607
- }
9608
- }
9609
- exports.RelationshipThemeMapper = RelationshipThemeMapper;
9610
- //# sourceMappingURL=RelationshipThemeMapper.js.map
9611
-
9612
- /***/ }),
9613
-
9614
- /***/ "./dist/useCases/consumption/relationshipInfo/UpdateRelationshipInfo.js":
9615
- /*!******************************************************************************!*\
9616
- !*** ./dist/useCases/consumption/relationshipInfo/UpdateRelationshipInfo.js ***!
9617
- \******************************************************************************/
9618
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9619
-
9620
- "use strict";
9621
-
9622
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
9623
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9624
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9625
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9626
- return c > 3 && r && Object.defineProperty(target, key, r), r;
9627
- };
9628
- var __metadata = (this && this.__metadata) || function (k, v) {
9629
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9630
- };
9631
- var __param = (this && this.__param) || function (paramIndex, decorator) {
9632
- return function (target, key) { decorator(target, key, paramIndex); }
9633
- };
9634
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9635
- exports.UpdateRelationshipInfoUseCase = void 0;
9636
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
9637
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
9638
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
9639
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
9640
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
9641
- const RuntimeErrors_1 = __webpack_require__(/*! ../../common/RuntimeErrors */ "./dist/useCases/common/RuntimeErrors.js");
9642
- const UseCase_1 = __webpack_require__(/*! ../../common/UseCase */ "./dist/useCases/common/UseCase.js");
9643
- const RelationshipInfoMapper_1 = __webpack_require__(/*! ./RelationshipInfoMapper */ "./dist/useCases/consumption/relationshipInfo/RelationshipInfoMapper.js");
9644
- class UpdateRelationshipInfoRequestValidator extends common_1.RuntimeValidator {
9645
- constructor() {
9646
- super();
9647
- this.validateIfAny((x) => x.id).fulfills(common_1.IdValidator.required(consumption_1.ConsumptionIds.relationshipInfo));
9648
- this.validateIfEachAny((x) => x.attributes).fulfills(common_1.RelationshipAttributeDTOValidator.required());
9649
- }
9650
- }
9651
- let UpdateRelationshipInfoUseCase = class UpdateRelationshipInfoUseCase extends UseCase_1.UseCase {
9652
- constructor(relationshipInfoController, accountController, validator) {
9653
- super(validator);
9654
- this.relationshipInfoController = relationshipInfoController;
9655
- this.accountController = accountController;
9656
- }
9657
- async executeInternal(request) {
9658
- const relationshipInfo = await this.relationshipInfoController.getRelationshipInfo(transport_1.CoreId.from(request.id));
9659
- if (!relationshipInfo) {
9660
- return ts_utils_1.Result.fail(RuntimeErrors_1.RuntimeErrors.general.recordNotFound(consumption_1.RelationshipInfo));
9661
- }
9662
- if (request.attributes !== undefined) {
9663
- relationshipInfo.attributes = await Promise.all(request.attributes.map((a) => {
9664
- return consumption_1.RelationshipAttribute.from({
9665
- name: a.name,
9666
- content: a.content,
9667
- sharedItem: transport_1.CoreId.from(a.sharedItem)
9668
- });
9669
- }));
9670
- }
9671
- relationshipInfo.isPinned = request.isPinned === undefined ? relationshipInfo.isPinned : request.isPinned;
9672
- relationshipInfo.title = request.title === undefined ? relationshipInfo.title : request.title;
9673
- relationshipInfo.description = request.description === undefined ? relationshipInfo.description : request.description;
9674
- relationshipInfo.userTitle = request.userTitle === undefined ? relationshipInfo.userTitle : request.userTitle;
9675
- relationshipInfo.userDescription = request.userDescription === undefined ? relationshipInfo.userDescription : request.userDescription;
9676
- relationshipInfo.theme = request.theme === undefined ? relationshipInfo.theme : consumption_1.RelationshipTheme.from(request.theme);
9677
- await this.relationshipInfoController.updateRelationshipInfo(relationshipInfo);
9678
- await this.accountController.syncDatawallet();
9679
- return ts_utils_1.Result.ok(RelationshipInfoMapper_1.RelationshipInfoMapper.toRelationshipInfoDTO(relationshipInfo));
9680
- }
9681
- };
9682
- UpdateRelationshipInfoUseCase = __decorate([
9683
- __param(0, typescript_ioc_1.Inject),
9684
- __param(1, typescript_ioc_1.Inject),
9685
- __param(2, typescript_ioc_1.Inject),
9686
- __metadata("design:paramtypes", [consumption_1.RelationshipInfoController,
9687
- transport_1.AccountController,
9688
- UpdateRelationshipInfoRequestValidator])
9689
- ], UpdateRelationshipInfoUseCase);
9690
- exports.UpdateRelationshipInfoUseCase = UpdateRelationshipInfoUseCase;
9691
- //# sourceMappingURL=UpdateRelationshipInfo.js.map
9692
-
9693
- /***/ }),
9694
-
9695
- /***/ "./dist/useCases/consumption/relationshipInfo/index.js":
9696
- /*!*************************************************************!*\
9697
- !*** ./dist/useCases/consumption/relationshipInfo/index.js ***!
9698
- \*************************************************************/
9699
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9700
-
9701
- "use strict";
9702
-
9703
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9704
- if (k2 === undefined) k2 = k;
9705
- var desc = Object.getOwnPropertyDescriptor(m, k);
9706
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9707
- desc = { enumerable: true, get: function() { return m[k]; } };
9708
- }
9709
- Object.defineProperty(o, k2, desc);
9710
- }) : (function(o, m, k, k2) {
9711
- if (k2 === undefined) k2 = k;
9712
- o[k2] = m[k];
9713
- }));
9714
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
9715
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
9716
- };
9717
- Object.defineProperty(exports, "__esModule", ({ value: true }));
9718
- __exportStar(__webpack_require__(/*! ./CreateRelationshipInfo */ "./dist/useCases/consumption/relationshipInfo/CreateRelationshipInfo.js"), exports);
9719
- __exportStar(__webpack_require__(/*! ./DeleteRelationshipInfo */ "./dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfo.js"), exports);
9720
- __exportStar(__webpack_require__(/*! ./DeleteRelationshipInfoByRelationship */ "./dist/useCases/consumption/relationshipInfo/DeleteRelationshipInfoByRelationship.js"), exports);
9721
- __exportStar(__webpack_require__(/*! ./GetRelationshipInfo */ "./dist/useCases/consumption/relationshipInfo/GetRelationshipInfo.js"), exports);
9722
- __exportStar(__webpack_require__(/*! ./GetRelationshipInfoByRelationship */ "./dist/useCases/consumption/relationshipInfo/GetRelationshipInfoByRelationship.js"), exports);
9723
- __exportStar(__webpack_require__(/*! ./UpdateRelationshipInfo */ "./dist/useCases/consumption/relationshipInfo/UpdateRelationshipInfo.js"), exports);
9724
8538
  //# sourceMappingURL=index.js.map
9725
8539
 
9726
8540
  /***/ }),
@@ -11444,639 +10258,6 @@ __exportStar(__webpack_require__(/*! ./UpdateSetting */ "./dist/useCases/consump
11444
10258
 
11445
10259
  /***/ }),
11446
10260
 
11447
- /***/ "./dist/useCases/consumption/sharedItems/CreateSharedItem.js":
11448
- /*!*******************************************************************!*\
11449
- !*** ./dist/useCases/consumption/sharedItems/CreateSharedItem.js ***!
11450
- \*******************************************************************/
11451
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11452
-
11453
- "use strict";
11454
-
11455
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11456
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11457
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11458
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11459
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11460
- };
11461
- var __metadata = (this && this.__metadata) || function (k, v) {
11462
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11463
- };
11464
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11465
- return function (target, key) { decorator(target, key, paramIndex); }
11466
- };
11467
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11468
- exports.CreateSharedItemUseCase = void 0;
11469
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
11470
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
11471
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
11472
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
11473
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
11474
- const SharedItemsMapper_1 = __webpack_require__(/*! ./SharedItemsMapper */ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js");
11475
- class CreateSharedItemRequestValidator extends common_1.RuntimeValidator {
11476
- constructor() {
11477
- super();
11478
- this.validateIfEachString((x) => x.tags)
11479
- .isDefined()
11480
- .whenDefined();
11481
- this.validateIfString((x) => x.sharedBy).fulfills(common_1.AddressValidator.required());
11482
- this.validateIfString((x) => x.sharedWith).fulfills(common_1.AddressValidator.required());
11483
- this.validateIfString((x) => x.sharedAt).fulfills(common_1.DateValidator.required());
11484
- this.validateIfString((x) => x.reference).fulfills(common_1.IdValidator.optional(transport_1.TransportIds.generic));
11485
- this.validateIfString((x) => x.content).isDefined();
11486
- this.validateIfString((x) => x.succeedsItem).fulfills(common_1.IdValidator.optional(consumption_1.ConsumptionIds.sharedItem));
11487
- this.validateIfString((x) => x.succeedsAt).fulfills(common_1.DateValidator.optional());
11488
- this.validateIfString((x) => x.expiresAt).fulfills(common_1.DateValidator.optional());
11489
- }
11490
- }
11491
- let CreateSharedItemUseCase = class CreateSharedItemUseCase extends common_1.UseCase {
11492
- constructor(sharedItemsController, accountController, validator) {
11493
- super(validator);
11494
- this.sharedItemsController = sharedItemsController;
11495
- this.accountController = accountController;
11496
- }
11497
- async executeInternal(request) {
11498
- const sharedItem = consumption_1.SharedItem.from({
11499
- id: await consumption_1.ConsumptionIds.sharedItem.generate(),
11500
- tags: request.tags,
11501
- sharedBy: transport_1.CoreAddress.from(request.sharedBy),
11502
- sharedWith: transport_1.CoreAddress.from(request.sharedWith),
11503
- sharedAt: transport_1.CoreDate.from(request.sharedAt),
11504
- reference: request.reference ? transport_1.CoreId.from(request.reference) : undefined,
11505
- content: request.content,
11506
- succeedsItem: request.succeedsItem ? transport_1.CoreId.from(request.succeedsItem) : undefined,
11507
- succeedsAt: request.succeedsAt ? transport_1.CoreDate.from(request.succeedsAt) : undefined,
11508
- expiresAt: request.expiresAt ? transport_1.CoreDate.from(request.expiresAt) : undefined
11509
- });
11510
- await this.sharedItemsController.createSharedItem(sharedItem);
11511
- await this.accountController.syncDatawallet();
11512
- return ts_utils_1.Result.ok(SharedItemsMapper_1.SharedItemsMapper.toSharedItemDTO(sharedItem));
11513
- }
11514
- };
11515
- CreateSharedItemUseCase = __decorate([
11516
- __param(0, typescript_ioc_1.Inject),
11517
- __param(1, typescript_ioc_1.Inject),
11518
- __param(2, typescript_ioc_1.Inject),
11519
- __metadata("design:paramtypes", [consumption_1.SharedItemsController,
11520
- transport_1.AccountController,
11521
- CreateSharedItemRequestValidator])
11522
- ], CreateSharedItemUseCase);
11523
- exports.CreateSharedItemUseCase = CreateSharedItemUseCase;
11524
- //# sourceMappingURL=CreateSharedItem.js.map
11525
-
11526
- /***/ }),
11527
-
11528
- /***/ "./dist/useCases/consumption/sharedItems/DeleteSharedItem.js":
11529
- /*!*******************************************************************!*\
11530
- !*** ./dist/useCases/consumption/sharedItems/DeleteSharedItem.js ***!
11531
- \*******************************************************************/
11532
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11533
-
11534
- "use strict";
11535
-
11536
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11537
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11538
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11539
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11540
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11541
- };
11542
- var __metadata = (this && this.__metadata) || function (k, v) {
11543
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11544
- };
11545
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11546
- return function (target, key) { decorator(target, key, paramIndex); }
11547
- };
11548
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11549
- exports.DeleteSharedItemUseCase = void 0;
11550
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
11551
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
11552
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
11553
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
11554
- const __1 = __webpack_require__(/*! ../.. */ "./dist/useCases/index.js");
11555
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
11556
- class DeleteSharedItemRequestValidator extends common_1.RuntimeValidator {
11557
- constructor() {
11558
- super();
11559
- this.validateIfString((x) => x.id).fulfills(common_1.IdValidator.required(consumption_1.ConsumptionIds.sharedItem));
11560
- }
11561
- }
11562
- let DeleteSharedItemUseCase = class DeleteSharedItemUseCase extends common_1.UseCase {
11563
- constructor(sharedItemsController, accountController, validator) {
11564
- super(validator);
11565
- this.sharedItemsController = sharedItemsController;
11566
- this.accountController = accountController;
11567
- }
11568
- async executeInternal(request) {
11569
- const sharedItem = await this.sharedItemsController.getSharedItem(transport_1.CoreId.from(request.id));
11570
- if (!sharedItem) {
11571
- return ts_utils_1.Result.fail(__1.RuntimeErrors.general.recordNotFound(consumption_1.SharedItem));
11572
- }
11573
- await this.sharedItemsController.deleteSharedItem(sharedItem);
11574
- await this.accountController.syncDatawallet();
11575
- return ts_utils_1.Result.ok(undefined);
11576
- }
11577
- };
11578
- DeleteSharedItemUseCase = __decorate([
11579
- __param(0, typescript_ioc_1.Inject),
11580
- __param(1, typescript_ioc_1.Inject),
11581
- __param(2, typescript_ioc_1.Inject),
11582
- __metadata("design:paramtypes", [consumption_1.SharedItemsController,
11583
- transport_1.AccountController,
11584
- DeleteSharedItemRequestValidator])
11585
- ], DeleteSharedItemUseCase);
11586
- exports.DeleteSharedItemUseCase = DeleteSharedItemUseCase;
11587
- //# sourceMappingURL=DeleteSharedItem.js.map
11588
-
11589
- /***/ }),
11590
-
11591
- /***/ "./dist/useCases/consumption/sharedItems/GetSharedItem.js":
11592
- /*!****************************************************************!*\
11593
- !*** ./dist/useCases/consumption/sharedItems/GetSharedItem.js ***!
11594
- \****************************************************************/
11595
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11596
-
11597
- "use strict";
11598
-
11599
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11600
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11601
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11602
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11603
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11604
- };
11605
- var __metadata = (this && this.__metadata) || function (k, v) {
11606
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11607
- };
11608
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11609
- return function (target, key) { decorator(target, key, paramIndex); }
11610
- };
11611
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11612
- exports.GetSharedItemUseCase = void 0;
11613
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
11614
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
11615
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
11616
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
11617
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
11618
- const SharedItemsMapper_1 = __webpack_require__(/*! ./SharedItemsMapper */ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js");
11619
- class GetSharedItemRequestValidator extends common_1.RuntimeValidator {
11620
- constructor() {
11621
- super();
11622
- this.validateIfString((x) => x.id).fulfills(common_1.IdValidator.required(consumption_1.ConsumptionIds.sharedItem));
11623
- }
11624
- }
11625
- let GetSharedItemUseCase = class GetSharedItemUseCase extends common_1.UseCase {
11626
- constructor(sharedItemsController, validator) {
11627
- super(validator);
11628
- this.sharedItemsController = sharedItemsController;
11629
- }
11630
- async executeInternal(request) {
11631
- const sharedItem = await this.sharedItemsController.getSharedItem(transport_1.CoreId.from(request.id));
11632
- if (!sharedItem) {
11633
- return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(consumption_1.SharedItem));
11634
- }
11635
- return ts_utils_1.Result.ok(SharedItemsMapper_1.SharedItemsMapper.toSharedItemDTO(sharedItem));
11636
- }
11637
- };
11638
- GetSharedItemUseCase = __decorate([
11639
- __param(0, typescript_ioc_1.Inject),
11640
- __param(1, typescript_ioc_1.Inject),
11641
- __metadata("design:paramtypes", [consumption_1.SharedItemsController, GetSharedItemRequestValidator])
11642
- ], GetSharedItemUseCase);
11643
- exports.GetSharedItemUseCase = GetSharedItemUseCase;
11644
- //# sourceMappingURL=GetSharedItem.js.map
11645
-
11646
- /***/ }),
11647
-
11648
- /***/ "./dist/useCases/consumption/sharedItems/GetSharedItems.js":
11649
- /*!*****************************************************************!*\
11650
- !*** ./dist/useCases/consumption/sharedItems/GetSharedItems.js ***!
11651
- \*****************************************************************/
11652
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11653
-
11654
- "use strict";
11655
-
11656
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11657
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11658
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11659
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11660
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11661
- };
11662
- var __metadata = (this && this.__metadata) || function (k, v) {
11663
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11664
- };
11665
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11666
- return function (target, key) { decorator(target, key, paramIndex); }
11667
- };
11668
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11669
- exports.GetSharedItemsUseCase = void 0;
11670
- const docdb_querytranslator_1 = __webpack_require__(/*! @js-soft/docdb-querytranslator */ "./node_modules/@js-soft/docdb-querytranslator/dist/index.js");
11671
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
11672
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
11673
- const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
11674
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
11675
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
11676
- const SharedItemsMapper_1 = __webpack_require__(/*! ./SharedItemsMapper */ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js");
11677
- let GetSharedItemsUseCase = class GetSharedItemsUseCase extends common_1.UseCase {
11678
- constructor(sharedItemsController, validator) {
11679
- super(validator);
11680
- this.sharedItemsController = sharedItemsController;
11681
- }
11682
- async executeInternal(request) {
11683
- const query = GetSharedItemsUseCase.queryTranslator.parse(request.query);
11684
- const sharedItem = await this.sharedItemsController.getSharedItems(query);
11685
- return ts_utils_1.Result.ok(SharedItemsMapper_1.SharedItemsMapper.toSharedItemDTOList(sharedItem));
11686
- }
11687
- };
11688
- GetSharedItemsUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({
11689
- whitelist: {
11690
- [(0, ts_simple_nameof_1.nameof)((c) => c.tags)]: true,
11691
- [(0, ts_simple_nameof_1.nameof)((c) => c.sharedBy)]: true,
11692
- [(0, ts_simple_nameof_1.nameof)((c) => c.sharedWith)]: true,
11693
- [(0, ts_simple_nameof_1.nameof)((c) => c.sharedAt)]: true,
11694
- [(0, ts_simple_nameof_1.nameof)((c) => c.reference)]: true,
11695
- [(0, ts_simple_nameof_1.nameof)((c) => c.succeedsItem)]: true,
11696
- [(0, ts_simple_nameof_1.nameof)((c) => c.succeedsAt)]: true,
11697
- [(0, ts_simple_nameof_1.nameof)((c) => c.expiresAt)]: true
11698
- },
11699
- custom: {
11700
- tags: (query, input) => {
11701
- query["tags"] = {
11702
- $contains: input
11703
- };
11704
- }
11705
- }
11706
- });
11707
- GetSharedItemsUseCase = __decorate([
11708
- __param(0, typescript_ioc_1.Inject),
11709
- __param(1, typescript_ioc_1.Inject),
11710
- __metadata("design:paramtypes", [consumption_1.SharedItemsController, common_1.RuntimeValidator])
11711
- ], GetSharedItemsUseCase);
11712
- exports.GetSharedItemsUseCase = GetSharedItemsUseCase;
11713
- //# sourceMappingURL=GetSharedItems.js.map
11714
-
11715
- /***/ }),
11716
-
11717
- /***/ "./dist/useCases/consumption/sharedItems/GetSharedItemsByAddress.js":
11718
- /*!**************************************************************************!*\
11719
- !*** ./dist/useCases/consumption/sharedItems/GetSharedItemsByAddress.js ***!
11720
- \**************************************************************************/
11721
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11722
-
11723
- "use strict";
11724
-
11725
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11726
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11727
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11728
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11729
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11730
- };
11731
- var __metadata = (this && this.__metadata) || function (k, v) {
11732
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11733
- };
11734
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11735
- return function (target, key) { decorator(target, key, paramIndex); }
11736
- };
11737
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11738
- exports.GetSharedItemsByAddressUseCase = void 0;
11739
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
11740
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
11741
- const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
11742
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
11743
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
11744
- const SharedItemsMapper_1 = __webpack_require__(/*! ./SharedItemsMapper */ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js");
11745
- class GetSharedItemsByAddressRequestValidator extends common_1.RuntimeValidator {
11746
- constructor() {
11747
- super();
11748
- this.validateIfString((x) => x.address).fulfills(common_1.AddressValidator.required());
11749
- }
11750
- }
11751
- let GetSharedItemsByAddressUseCase = class GetSharedItemsByAddressUseCase extends common_1.UseCase {
11752
- constructor(sharedItemsController, validator) {
11753
- super(validator);
11754
- this.sharedItemsController = sharedItemsController;
11755
- }
11756
- async executeInternal(request) {
11757
- const sharedItems = await this.sharedItemsController.getSharedItems({
11758
- $or: [{ [(0, ts_simple_nameof_1.nameof)((s) => s.sharedBy)]: request.address }, { [(0, ts_simple_nameof_1.nameof)((s) => s.sharedWith)]: request.address }]
11759
- });
11760
- return ts_utils_1.Result.ok(SharedItemsMapper_1.SharedItemsMapper.toSharedItemDTOList(sharedItems));
11761
- }
11762
- };
11763
- GetSharedItemsByAddressUseCase = __decorate([
11764
- __param(0, typescript_ioc_1.Inject),
11765
- __param(1, typescript_ioc_1.Inject),
11766
- __metadata("design:paramtypes", [consumption_1.SharedItemsController, GetSharedItemsByAddressRequestValidator])
11767
- ], GetSharedItemsByAddressUseCase);
11768
- exports.GetSharedItemsByAddressUseCase = GetSharedItemsByAddressUseCase;
11769
- //# sourceMappingURL=GetSharedItemsByAddress.js.map
11770
-
11771
- /***/ }),
11772
-
11773
- /***/ "./dist/useCases/consumption/sharedItems/GetSharedItemsByReference.js":
11774
- /*!****************************************************************************!*\
11775
- !*** ./dist/useCases/consumption/sharedItems/GetSharedItemsByReference.js ***!
11776
- \****************************************************************************/
11777
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11778
-
11779
- "use strict";
11780
-
11781
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11782
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11783
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11784
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11785
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11786
- };
11787
- var __metadata = (this && this.__metadata) || function (k, v) {
11788
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11789
- };
11790
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11791
- return function (target, key) { decorator(target, key, paramIndex); }
11792
- };
11793
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11794
- exports.GetSharedItemsByReferenceUseCase = void 0;
11795
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
11796
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
11797
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
11798
- const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
11799
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
11800
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
11801
- const SharedItemsMapper_1 = __webpack_require__(/*! ./SharedItemsMapper */ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js");
11802
- class GetSharedItemsByReferenceRequestValidator extends common_1.RuntimeValidator {
11803
- constructor() {
11804
- super();
11805
- this.validateIfString((x) => x.reference).fulfills(common_1.IdValidator.required(transport_1.TransportIds.generic));
11806
- }
11807
- }
11808
- let GetSharedItemsByReferenceUseCase = class GetSharedItemsByReferenceUseCase extends common_1.UseCase {
11809
- constructor(sharedItemsController, validator) {
11810
- super(validator);
11811
- this.sharedItemsController = sharedItemsController;
11812
- }
11813
- async executeInternal(request) {
11814
- const sharedItems = await this.sharedItemsController.getSharedItems({
11815
- [(0, ts_simple_nameof_1.nameof)((s) => s.reference)]: request.reference
11816
- });
11817
- return ts_utils_1.Result.ok(SharedItemsMapper_1.SharedItemsMapper.toSharedItemDTOList(sharedItems));
11818
- }
11819
- };
11820
- GetSharedItemsByReferenceUseCase = __decorate([
11821
- __param(0, typescript_ioc_1.Inject),
11822
- __param(1, typescript_ioc_1.Inject),
11823
- __metadata("design:paramtypes", [consumption_1.SharedItemsController, GetSharedItemsByReferenceRequestValidator])
11824
- ], GetSharedItemsByReferenceUseCase);
11825
- exports.GetSharedItemsByReferenceUseCase = GetSharedItemsByReferenceUseCase;
11826
- //# sourceMappingURL=GetSharedItemsByReference.js.map
11827
-
11828
- /***/ }),
11829
-
11830
- /***/ "./dist/useCases/consumption/sharedItems/GetSharedItemsSharedByAddress.js":
11831
- /*!********************************************************************************!*\
11832
- !*** ./dist/useCases/consumption/sharedItems/GetSharedItemsSharedByAddress.js ***!
11833
- \********************************************************************************/
11834
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11835
-
11836
- "use strict";
11837
-
11838
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11839
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11840
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11841
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11842
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11843
- };
11844
- var __metadata = (this && this.__metadata) || function (k, v) {
11845
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11846
- };
11847
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11848
- return function (target, key) { decorator(target, key, paramIndex); }
11849
- };
11850
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11851
- exports.GetSharedItemsSharedByAddressUseCase = void 0;
11852
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
11853
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
11854
- const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
11855
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
11856
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
11857
- const SharedItemsMapper_1 = __webpack_require__(/*! ./SharedItemsMapper */ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js");
11858
- class GetSharedItemsSharedByAddressRequestValidator extends common_1.RuntimeValidator {
11859
- constructor() {
11860
- super();
11861
- this.validateIfString((x) => x.address).fulfills(common_1.AddressValidator.required());
11862
- }
11863
- }
11864
- let GetSharedItemsSharedByAddressUseCase = class GetSharedItemsSharedByAddressUseCase extends common_1.UseCase {
11865
- constructor(sharedItemsController, validator) {
11866
- super(validator);
11867
- this.sharedItemsController = sharedItemsController;
11868
- }
11869
- async executeInternal(request) {
11870
- const sharedItems = await this.sharedItemsController.getSharedItems({
11871
- [(0, ts_simple_nameof_1.nameof)((s) => s.sharedBy)]: request.address
11872
- });
11873
- return ts_utils_1.Result.ok(SharedItemsMapper_1.SharedItemsMapper.toSharedItemDTOList(sharedItems));
11874
- }
11875
- };
11876
- GetSharedItemsSharedByAddressUseCase = __decorate([
11877
- __param(0, typescript_ioc_1.Inject),
11878
- __param(1, typescript_ioc_1.Inject),
11879
- __metadata("design:paramtypes", [consumption_1.SharedItemsController, GetSharedItemsSharedByAddressRequestValidator])
11880
- ], GetSharedItemsSharedByAddressUseCase);
11881
- exports.GetSharedItemsSharedByAddressUseCase = GetSharedItemsSharedByAddressUseCase;
11882
- //# sourceMappingURL=GetSharedItemsSharedByAddress.js.map
11883
-
11884
- /***/ }),
11885
-
11886
- /***/ "./dist/useCases/consumption/sharedItems/GetSharedItemsSharedWithAddress.js":
11887
- /*!**********************************************************************************!*\
11888
- !*** ./dist/useCases/consumption/sharedItems/GetSharedItemsSharedWithAddress.js ***!
11889
- \**********************************************************************************/
11890
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11891
-
11892
- "use strict";
11893
-
11894
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11895
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11896
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11897
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11898
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11899
- };
11900
- var __metadata = (this && this.__metadata) || function (k, v) {
11901
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11902
- };
11903
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11904
- return function (target, key) { decorator(target, key, paramIndex); }
11905
- };
11906
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11907
- exports.GetSharedItemsSharedWithAddressUseCase = void 0;
11908
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
11909
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
11910
- const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
11911
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
11912
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
11913
- const SharedItemsMapper_1 = __webpack_require__(/*! ./SharedItemsMapper */ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js");
11914
- class GetSharedItemsSharedWithAddressRequestValidator extends common_1.RuntimeValidator {
11915
- constructor() {
11916
- super();
11917
- this.validateIfString((x) => x.address).fulfills(common_1.AddressValidator.required());
11918
- }
11919
- }
11920
- let GetSharedItemsSharedWithAddressUseCase = class GetSharedItemsSharedWithAddressUseCase extends common_1.UseCase {
11921
- constructor(sharedItemsController, validator) {
11922
- super(validator);
11923
- this.sharedItemsController = sharedItemsController;
11924
- }
11925
- async executeInternal(request) {
11926
- const sharedItems = await this.sharedItemsController.getSharedItems({
11927
- [(0, ts_simple_nameof_1.nameof)((s) => s.sharedWith)]: request.address
11928
- });
11929
- return ts_utils_1.Result.ok(SharedItemsMapper_1.SharedItemsMapper.toSharedItemDTOList(sharedItems));
11930
- }
11931
- };
11932
- GetSharedItemsSharedWithAddressUseCase = __decorate([
11933
- __param(0, typescript_ioc_1.Inject),
11934
- __param(1, typescript_ioc_1.Inject),
11935
- __metadata("design:paramtypes", [consumption_1.SharedItemsController, GetSharedItemsSharedWithAddressRequestValidator])
11936
- ], GetSharedItemsSharedWithAddressUseCase);
11937
- exports.GetSharedItemsSharedWithAddressUseCase = GetSharedItemsSharedWithAddressUseCase;
11938
- //# sourceMappingURL=GetSharedItemsSharedWithAddress.js.map
11939
-
11940
- /***/ }),
11941
-
11942
- /***/ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js":
11943
- /*!********************************************************************!*\
11944
- !*** ./dist/useCases/consumption/sharedItems/SharedItemsMapper.js ***!
11945
- \********************************************************************/
11946
- /***/ ((__unused_webpack_module, exports) => {
11947
-
11948
- "use strict";
11949
-
11950
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11951
- exports.SharedItemsMapper = void 0;
11952
- class SharedItemsMapper {
11953
- static toSharedItemDTO(sharedItem) {
11954
- return {
11955
- id: sharedItem.id.toString(),
11956
- tags: sharedItem.tags,
11957
- sharedBy: sharedItem.sharedBy.toString(),
11958
- sharedWith: sharedItem.sharedWith.toString(),
11959
- sharedAt: sharedItem.sharedAt.toString(),
11960
- reference: sharedItem.reference?.toString(),
11961
- content: sharedItem.content.toJSON(),
11962
- succeedsItem: sharedItem.succeedsItem?.toString(),
11963
- succeedsAt: sharedItem.succeedsAt?.toString(),
11964
- expiresAt: sharedItem.expiresAt?.toString()
11965
- };
11966
- }
11967
- static toSharedItemDTOList(sharedItems) {
11968
- return sharedItems.map((s) => this.toSharedItemDTO(s));
11969
- }
11970
- }
11971
- exports.SharedItemsMapper = SharedItemsMapper;
11972
- //# sourceMappingURL=SharedItemsMapper.js.map
11973
-
11974
- /***/ }),
11975
-
11976
- /***/ "./dist/useCases/consumption/sharedItems/UpdateSharedItem.js":
11977
- /*!*******************************************************************!*\
11978
- !*** ./dist/useCases/consumption/sharedItems/UpdateSharedItem.js ***!
11979
- \*******************************************************************/
11980
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11981
-
11982
- "use strict";
11983
-
11984
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11985
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11986
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11987
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11988
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11989
- };
11990
- var __metadata = (this && this.__metadata) || function (k, v) {
11991
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11992
- };
11993
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11994
- return function (target, key) { decorator(target, key, paramIndex); }
11995
- };
11996
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11997
- exports.UpdateSharedItemUseCase = void 0;
11998
- const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
11999
- const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
12000
- const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
12001
- const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
12002
- const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
12003
- const __1 = __webpack_require__(/*! ../.. */ "./dist/useCases/index.js");
12004
- const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
12005
- const SharedItemsMapper_1 = __webpack_require__(/*! ./SharedItemsMapper */ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js");
12006
- class UpdateSharedItemRequestValidator extends common_1.RuntimeValidator {
12007
- constructor() {
12008
- super();
12009
- this.validateIfString((x) => x.id).fulfills(common_1.IdValidator.required(consumption_1.ConsumptionIds.sharedItem));
12010
- this.validateIfAny((x) => x.content).isDefined();
12011
- }
12012
- }
12013
- let UpdateSharedItemUseCase = class UpdateSharedItemUseCase extends common_1.UseCase {
12014
- constructor(sharedItemsController, accountController, validator) {
12015
- super(validator);
12016
- this.sharedItemsController = sharedItemsController;
12017
- this.accountController = accountController;
12018
- }
12019
- async executeInternal(request) {
12020
- const sharedItem = await this.sharedItemsController.getSharedItem(transport_1.CoreId.from(request.id));
12021
- if (!sharedItem) {
12022
- return ts_utils_1.Result.fail(__1.RuntimeErrors.general.recordNotFound(consumption_1.SharedItem));
12023
- }
12024
- sharedItem.content = ts_serval_1.Serializable.fromUnknown(request.content);
12025
- await this.sharedItemsController.updateSharedItem(sharedItem);
12026
- await this.accountController.syncDatawallet();
12027
- return ts_utils_1.Result.ok(SharedItemsMapper_1.SharedItemsMapper.toSharedItemDTO(sharedItem));
12028
- }
12029
- };
12030
- UpdateSharedItemUseCase = __decorate([
12031
- __param(0, typescript_ioc_1.Inject),
12032
- __param(1, typescript_ioc_1.Inject),
12033
- __param(2, typescript_ioc_1.Inject),
12034
- __metadata("design:paramtypes", [consumption_1.SharedItemsController,
12035
- transport_1.AccountController,
12036
- UpdateSharedItemRequestValidator])
12037
- ], UpdateSharedItemUseCase);
12038
- exports.UpdateSharedItemUseCase = UpdateSharedItemUseCase;
12039
- //# sourceMappingURL=UpdateSharedItem.js.map
12040
-
12041
- /***/ }),
12042
-
12043
- /***/ "./dist/useCases/consumption/sharedItems/index.js":
12044
- /*!********************************************************!*\
12045
- !*** ./dist/useCases/consumption/sharedItems/index.js ***!
12046
- \********************************************************/
12047
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
12048
-
12049
- "use strict";
12050
-
12051
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12052
- if (k2 === undefined) k2 = k;
12053
- var desc = Object.getOwnPropertyDescriptor(m, k);
12054
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12055
- desc = { enumerable: true, get: function() { return m[k]; } };
12056
- }
12057
- Object.defineProperty(o, k2, desc);
12058
- }) : (function(o, m, k, k2) {
12059
- if (k2 === undefined) k2 = k;
12060
- o[k2] = m[k];
12061
- }));
12062
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
12063
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
12064
- };
12065
- Object.defineProperty(exports, "__esModule", ({ value: true }));
12066
- __exportStar(__webpack_require__(/*! ./CreateSharedItem */ "./dist/useCases/consumption/sharedItems/CreateSharedItem.js"), exports);
12067
- __exportStar(__webpack_require__(/*! ./DeleteSharedItem */ "./dist/useCases/consumption/sharedItems/DeleteSharedItem.js"), exports);
12068
- __exportStar(__webpack_require__(/*! ./GetSharedItem */ "./dist/useCases/consumption/sharedItems/GetSharedItem.js"), exports);
12069
- __exportStar(__webpack_require__(/*! ./GetSharedItems */ "./dist/useCases/consumption/sharedItems/GetSharedItems.js"), exports);
12070
- __exportStar(__webpack_require__(/*! ./GetSharedItemsByAddress */ "./dist/useCases/consumption/sharedItems/GetSharedItemsByAddress.js"), exports);
12071
- __exportStar(__webpack_require__(/*! ./GetSharedItemsByReference */ "./dist/useCases/consumption/sharedItems/GetSharedItemsByReference.js"), exports);
12072
- __exportStar(__webpack_require__(/*! ./GetSharedItemsSharedByAddress */ "./dist/useCases/consumption/sharedItems/GetSharedItemsSharedByAddress.js"), exports);
12073
- __exportStar(__webpack_require__(/*! ./GetSharedItemsSharedWithAddress */ "./dist/useCases/consumption/sharedItems/GetSharedItemsSharedWithAddress.js"), exports);
12074
- __exportStar(__webpack_require__(/*! ./SharedItemsMapper */ "./dist/useCases/consumption/sharedItems/SharedItemsMapper.js"), exports);
12075
- __exportStar(__webpack_require__(/*! ./UpdateSharedItem */ "./dist/useCases/consumption/sharedItems/UpdateSharedItem.js"), exports);
12076
- //# sourceMappingURL=index.js.map
12077
-
12078
- /***/ }),
12079
-
12080
10261
  /***/ "./dist/useCases/index.js":
12081
10262
  /*!********************************!*\
12082
10263
  !*** ./dist/useCases/index.js ***!
@@ -15088,6 +13269,7 @@ const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/
15088
13269
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
15089
13270
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
15090
13271
  const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
13272
+ const events_1 = __webpack_require__(/*! ../../../events */ "./dist/events/index.js");
15091
13273
  const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
15092
13274
  const RelationshipTemplateMapper_1 = __webpack_require__(/*! ./RelationshipTemplateMapper */ "./dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.js");
15093
13275
  class LoadPeerRelationshipTemplateRequestValidator extends common_1.RuntimeValidator {
@@ -15121,26 +13303,31 @@ class LoadPeerRelationshipTemplateRequestValidator extends common_1.RuntimeValid
15121
13303
  }
15122
13304
  }
15123
13305
  let LoadPeerRelationshipTemplateUseCase = class LoadPeerRelationshipTemplateUseCase extends common_1.UseCase {
15124
- constructor(templateController, tokenController, accountController, validator) {
13306
+ constructor(templateController, tokenController, accountController, eventBus, validator) {
15125
13307
  super(validator);
15126
13308
  this.templateController = templateController;
15127
13309
  this.tokenController = tokenController;
15128
13310
  this.accountController = accountController;
13311
+ this.eventBus = eventBus;
15129
13312
  }
15130
13313
  async executeInternal(request) {
15131
- let createdTemplate;
13314
+ let createdTemplateResult;
15132
13315
  if (request.id && request.secretKey) {
15133
13316
  const key = crypto_1.CryptoSecretKey.fromBase64(request.secretKey);
15134
- createdTemplate = await this.loadTemplate(transport_1.CoreId.from(request.id), key);
13317
+ createdTemplateResult = await this.loadTemplate(transport_1.CoreId.from(request.id), key);
15135
13318
  }
15136
13319
  else if (request.reference) {
15137
- createdTemplate = await this.createRelationshipTemplateFromTokenReferenceRequest(request.reference);
13320
+ createdTemplateResult = await this.createRelationshipTemplateFromTokenReferenceRequest(request.reference);
15138
13321
  }
15139
13322
  else {
15140
13323
  throw new Error("Invalid request format.");
15141
13324
  }
15142
13325
  await this.accountController.syncDatawallet();
15143
- return createdTemplate;
13326
+ if (createdTemplateResult.isSuccess) {
13327
+ const event = new events_1.PeerRelationshipTemplateLoadedEvent(this.accountController.identity.address.address, createdTemplateResult.value);
13328
+ this.eventBus.publish(event);
13329
+ }
13330
+ return createdTemplateResult;
15144
13331
  }
15145
13332
  async createRelationshipTemplateFromTokenReferenceRequest(reference) {
15146
13333
  const token = await this.tokenController.loadPeerTokenByTruncated(reference, true);
@@ -15163,9 +13350,11 @@ LoadPeerRelationshipTemplateUseCase = __decorate([
15163
13350
  __param(1, typescript_ioc_1.Inject),
15164
13351
  __param(2, typescript_ioc_1.Inject),
15165
13352
  __param(3, typescript_ioc_1.Inject),
13353
+ __param(4, typescript_ioc_1.Inject),
15166
13354
  __metadata("design:paramtypes", [transport_1.RelationshipTemplateController,
15167
13355
  transport_1.TokenController,
15168
13356
  transport_1.AccountController,
13357
+ ts_utils_1.EventBus,
15169
13358
  LoadPeerRelationshipTemplateRequestValidator])
15170
13359
  ], LoadPeerRelationshipTemplateUseCase);
15171
13360
  exports.LoadPeerRelationshipTemplateUseCase = LoadPeerRelationshipTemplateUseCase;
@@ -31181,7 +29370,7 @@ function formatOffset(offset, format) {
31181
29370
  function timeObject(obj) {
31182
29371
  return pick(obj, ["hour", "minute", "second", "millisecond"]);
31183
29372
  }
31184
- var ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/;
29373
+ var ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
31185
29374
 
31186
29375
  /**
31187
29376
  * @private
@@ -31955,6 +30144,11 @@ var Zone = /*#__PURE__*/function () {
31955
30144
  get: function get() {
31956
30145
  throw new ZoneIsAbstractError();
31957
30146
  }
30147
+ }, {
30148
+ key: "ianaName",
30149
+ get: function get() {
30150
+ return this.name;
30151
+ }
31958
30152
  /**
31959
30153
  * Returns whether the offset is known to be fixed for the whole year.
31960
30154
  * @abstract
@@ -32389,6 +30583,15 @@ var FixedOffsetZone = /*#__PURE__*/function (_Zone) {
32389
30583
  get: function get() {
32390
30584
  return this.fixed === 0 ? "UTC" : "UTC" + formatOffset(this.fixed, "narrow");
32391
30585
  }
30586
+ }, {
30587
+ key: "ianaName",
30588
+ get: function get() {
30589
+ if (this.fixed === 0) {
30590
+ return "Etc/UTC";
30591
+ } else {
30592
+ return "Etc/GMT" + formatOffset(-this.fixed, "narrow");
30593
+ }
30594
+ }
32392
30595
  }, {
32393
30596
  key: "isUniversal",
32394
30597
  get: function get() {
@@ -33298,7 +31501,7 @@ function combineExtractors() {
33298
31501
  zone = _ex[1],
33299
31502
  next = _ex[2];
33300
31503
 
33301
- return [_extends({}, mergedVals, val), mergedZone || zone, next];
31504
+ return [_extends({}, mergedVals, val), zone || mergedZone, next];
33302
31505
  }, [{}, null, 1]).slice(0, 2);
33303
31506
  };
33304
31507
  }
@@ -33344,19 +31547,20 @@ function simpleParse() {
33344
31547
  } // ISO and SQL parsing
33345
31548
 
33346
31549
 
33347
- var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,
33348
- isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,
33349
- isoTimeRegex = RegExp("" + isoTimeBaseRegex.source + offsetRegex.source + "?"),
33350
- isoTimeExtensionRegex = RegExp("(?:T" + isoTimeRegex.source + ")?"),
33351
- isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,
33352
- isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/,
33353
- isoOrdinalRegex = /(\d{4})-?(\d{3})/,
33354
- extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"),
33355
- extractISOOrdinalData = simpleParse("year", "ordinal"),
33356
- sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/,
33357
- // dumbed-down version of the ISO one
33358
- sqlTimeRegex = RegExp(isoTimeBaseRegex.source + " ?(?:" + offsetRegex.source + "|(" + ianaRegex.source + "))?"),
33359
- sqlTimeExtensionRegex = RegExp("(?: " + sqlTimeRegex.source + ")?");
31550
+ var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/;
31551
+ var isoExtendedZone = "(?:" + offsetRegex.source + "?(?:\\[(" + ianaRegex.source + ")\\])?)?";
31552
+ var isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/;
31553
+ var isoTimeRegex = RegExp("" + isoTimeBaseRegex.source + isoExtendedZone);
31554
+ var isoTimeExtensionRegex = RegExp("(?:T" + isoTimeRegex.source + ")?");
31555
+ var isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/;
31556
+ var isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/;
31557
+ var isoOrdinalRegex = /(\d{4})-?(\d{3})/;
31558
+ var extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay");
31559
+ var extractISOOrdinalData = simpleParse("year", "ordinal");
31560
+ var sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/; // dumbed-down version of the ISO one
31561
+
31562
+ var sqlTimeRegex = RegExp(isoTimeBaseRegex.source + " ?(?:" + offsetRegex.source + "|(" + ianaRegex.source + "))?");
31563
+ var sqlTimeExtensionRegex = RegExp("(?: " + sqlTimeRegex.source + ")?");
33360
31564
 
33361
31565
  function int(match, pos, fallback) {
33362
31566
  var m = match[pos];
@@ -33531,11 +31735,11 @@ var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionR
33531
31735
  var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);
33532
31736
  var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);
33533
31737
  var isoTimeCombinedRegex = combineRegexes(isoTimeRegex);
33534
- var extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset);
33535
- var extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset);
33536
- var extractISOOrdinalDateAndTime = combineExtractors(extractISOOrdinalData, extractISOTime, extractISOOffset);
33537
- var extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset);
33538
- /**
31738
+ var extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone);
31739
+ var extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset, extractIANAZone);
31740
+ var extractISOOrdinalDateAndTime = combineExtractors(extractISOOrdinalData, extractISOTime, extractISOOffset, extractIANAZone);
31741
+ var extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone);
31742
+ /*
33539
31743
  * @private
33540
31744
  */
33541
31745
 
@@ -33557,10 +31761,9 @@ function parseISOTimeOnly(s) {
33557
31761
  }
33558
31762
  var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);
33559
31763
  var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);
33560
- var extractISOYmdTimeOffsetAndIANAZone = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone);
33561
31764
  var extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone);
33562
31765
  function parseSQL(s) {
33563
- return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]);
31766
+ return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]);
33564
31767
  }
33565
31768
 
33566
31769
  var INVALID$2 = "Invalid Duration"; // unit conversion constants
@@ -35708,7 +33911,7 @@ function intUnit(regex, post) {
35708
33911
  }
35709
33912
 
35710
33913
  var NBSP = String.fromCharCode(160);
35711
- var spaceOrNBSP = "( |" + NBSP + ")";
33914
+ var spaceOrNBSP = "[ " + NBSP + "]";
35712
33915
  var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g");
35713
33916
 
35714
33917
  function fixListRegex(s) {
@@ -36592,7 +34795,7 @@ function _toISODate(o, extended) {
36592
34795
  return c;
36593
34796
  }
36594
34797
 
36595
- function _toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset) {
34798
+ function _toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone) {
36596
34799
  var c = padStart(o.c.hour);
36597
34800
 
36598
34801
  if (extended) {
@@ -36616,7 +34819,7 @@ function _toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeO
36616
34819
  }
36617
34820
 
36618
34821
  if (includeOffset) {
36619
- if (o.isOffsetFixed && o.offset === 0) {
34822
+ if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {
36620
34823
  c += "Z";
36621
34824
  } else if (o.o < 0) {
36622
34825
  c += "-";
@@ -36631,6 +34834,10 @@ function _toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeO
36631
34834
  }
36632
34835
  }
36633
34836
 
34837
+ if (extendedZone) {
34838
+ c += "[" + o.zone.ianaName + "]";
34839
+ }
34840
+
36634
34841
  return c;
36635
34842
  } // defaults for unspecified units in the supported calendars
36636
34843
 
@@ -37804,6 +36011,7 @@ var DateTime = /*#__PURE__*/function () {
37804
36011
  * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
37805
36012
  * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
37806
36013
  * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
36014
+ * @param {boolean} [opts.extendedZone=true] - add the time zone format extension
37807
36015
  * @param {string} [opts.format='extended'] - choose between the basic and extended format
37808
36016
  * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
37809
36017
  * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
@@ -37822,7 +36030,9 @@ var DateTime = /*#__PURE__*/function () {
37822
36030
  _ref4$suppressMillise = _ref4.suppressMilliseconds,
37823
36031
  suppressMilliseconds = _ref4$suppressMillise === void 0 ? false : _ref4$suppressMillise,
37824
36032
  _ref4$includeOffset = _ref4.includeOffset,
37825
- includeOffset = _ref4$includeOffset === void 0 ? true : _ref4$includeOffset;
36033
+ includeOffset = _ref4$includeOffset === void 0 ? true : _ref4$includeOffset,
36034
+ _ref4$extendedZone = _ref4.extendedZone,
36035
+ extendedZone = _ref4$extendedZone === void 0 ? false : _ref4$extendedZone;
37826
36036
 
37827
36037
  if (!this.isValid) {
37828
36038
  return null;
@@ -37833,7 +36043,7 @@ var DateTime = /*#__PURE__*/function () {
37833
36043
  var c = _toISODate(this, ext);
37834
36044
 
37835
36045
  c += "T";
37836
- c += _toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset);
36046
+ c += _toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);
37837
36047
  return c;
37838
36048
  }
37839
36049
  /**
@@ -37873,6 +36083,7 @@ var DateTime = /*#__PURE__*/function () {
37873
36083
  * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
37874
36084
  * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
37875
36085
  * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
36086
+ * @param {boolean} [opts.extendedZone=true] - add the time zone format extension
37876
36087
  * @param {boolean} [opts.includePrefix=false] - include the `T` prefix
37877
36088
  * @param {string} [opts.format='extended'] - choose between the basic and extended format
37878
36089
  * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'
@@ -37893,6 +36104,8 @@ var DateTime = /*#__PURE__*/function () {
37893
36104
  includeOffset = _ref6$includeOffset === void 0 ? true : _ref6$includeOffset,
37894
36105
  _ref6$includePrefix = _ref6.includePrefix,
37895
36106
  includePrefix = _ref6$includePrefix === void 0 ? false : _ref6$includePrefix,
36107
+ _ref6$extendedZone = _ref6.extendedZone,
36108
+ extendedZone = _ref6$extendedZone === void 0 ? false : _ref6$extendedZone,
37896
36109
  _ref6$format = _ref6.format,
37897
36110
  format = _ref6$format === void 0 ? "extended" : _ref6$format;
37898
36111
 
@@ -37901,7 +36114,7 @@ var DateTime = /*#__PURE__*/function () {
37901
36114
  }
37902
36115
 
37903
36116
  var c = includePrefix ? "T" : "";
37904
- return c + _toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset);
36117
+ return c + _toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);
37905
36118
  }
37906
36119
  /**
37907
36120
  * Returns an RFC 2822-compatible string representation of this DateTime
@@ -38708,7 +36921,8 @@ var DateTime = /*#__PURE__*/function () {
38708
36921
  return false;
38709
36922
  } else {
38710
36923
  return this.offset > this.set({
38711
- month: 1
36924
+ month: 1,
36925
+ day: 1
38712
36926
  }).offset || this.offset > this.set({
38713
36927
  month: 5
38714
36928
  }).offset;
@@ -38994,7 +37208,7 @@ function friendlyDateTime(dateTimeish) {
38994
37208
  }
38995
37209
  }
38996
37210
 
38997
- var VERSION = "2.3.2";
37211
+ var VERSION = "2.4.0";
38998
37212
 
38999
37213
  exports.DateTime = DateTime;
39000
37214
  exports.Duration = Duration;