@nmshd/runtime 2.0.0-alpha.14 → 2.0.0-alpha.17

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 (43) hide show
  1. package/dist/buildInformation.js +5 -5
  2. package/dist/dataViews/DataViewExpander.js.map +1 -1
  3. package/dist/dataViews/consumption/ConsumptionAttributeDVO.d.ts +2 -2
  4. package/dist/dataViews/transport/RelationshipTemplateDVO.d.ts +1 -0
  5. package/dist/extensibility/facades/consumption/AttributesFacade.d.ts +10 -4
  6. package/dist/extensibility/facades/consumption/AttributesFacade.js +20 -6
  7. package/dist/extensibility/facades/consumption/AttributesFacade.js.map +1 -1
  8. package/dist/types/transport/RelationshipTemplateDTO.d.ts +1 -0
  9. package/dist/useCases/common/Schemas.d.ts +3 -0
  10. package/dist/useCases/common/Schemas.js +489 -7
  11. package/dist/useCases/common/Schemas.js.map +1 -1
  12. package/dist/useCases/consumption/attributes/AttributeMapper.js +1 -2
  13. package/dist/useCases/consumption/attributes/AttributeMapper.js.map +1 -1
  14. package/dist/useCases/consumption/attributes/ExecuteIdentityAttributeQuery.d.ts +13 -0
  15. package/dist/useCases/consumption/attributes/{GetAllValid.js → ExecuteIdentityAttributeQuery.js} +11 -8
  16. package/dist/useCases/consumption/attributes/ExecuteIdentityAttributeQuery.js.map +1 -0
  17. package/dist/useCases/consumption/attributes/ExecuteRelationshipAttributeQuery.d.ts +13 -0
  18. package/dist/useCases/consumption/attributes/ExecuteRelationshipAttributeQuery.js +39 -0
  19. package/dist/useCases/consumption/attributes/ExecuteRelationshipAttributeQuery.js.map +1 -0
  20. package/dist/useCases/consumption/attributes/GetAttributes.d.ts +2 -2
  21. package/dist/useCases/consumption/attributes/GetAttributes.js +2 -2
  22. package/dist/useCases/consumption/attributes/GetAttributes.js.map +1 -1
  23. package/dist/useCases/consumption/attributes/GetValidAttributes.d.ts +35 -0
  24. package/dist/useCases/consumption/attributes/GetValidAttributes.js +108 -0
  25. package/dist/useCases/consumption/attributes/GetValidAttributes.js.map +1 -0
  26. package/dist/useCases/consumption/attributes/index.d.ts +3 -1
  27. package/dist/useCases/consumption/attributes/index.js +3 -1
  28. package/dist/useCases/consumption/attributes/index.js.map +1 -1
  29. package/dist/useCases/consumption/requests/GetIncomingRequests.d.ts +2 -2
  30. package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.d.ts +5 -0
  31. package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.js +4 -0
  32. package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.js.map +1 -1
  33. package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js +2 -0
  34. package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js.map +1 -1
  35. package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.js +1 -0
  36. package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.js.map +1 -1
  37. package/lib-web/nmshd.runtime.js +714 -40
  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/useCases/consumption/attributes/GetAllValid.d.ts +0 -9
  43. package/dist/useCases/consumption/attributes/GetAllValid.js.map +0 -1
@@ -435,11 +435,11 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
435
435
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
436
436
  const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
437
437
  exports.buildInformation = {
438
- version: "2.0.0-alpha.14",
439
- build: "61",
440
- date: "2022-06-01T12:31:43+00:00",
441
- commit: "604f34d6e64110e3540f5c165a2b503abf925bbb",
442
- 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.19","@nmshd/content":"2.0.0-alpha.25","@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"},
438
+ version: "2.0.0-alpha.17",
439
+ build: "64",
440
+ date: "2022-06-14T08:55:01+00:00",
441
+ commit: "1a66d300cf56949ab479115f2fbe098df64f0b92",
442
+ 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.20","@nmshd/content":"2.0.0-alpha.35","@nmshd/crypto":"2.0.1","@nmshd/transport":"2.0.0-alpha.2","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"},
443
443
  libraries: {
444
444
  serval: ts_serval_1.buildInformation,
445
445
  consumption: consumption_1.buildInformation,
@@ -2215,16 +2215,20 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
2215
2215
  exports.AttributesFacade = void 0;
2216
2216
  const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
2217
2217
  const useCases_1 = __webpack_require__(/*! ../../../useCases */ "./dist/useCases/index.js");
2218
+ const ExecuteIdentityAttributeQuery_1 = __webpack_require__(/*! ../../../useCases/consumption/attributes/ExecuteIdentityAttributeQuery */ "./dist/useCases/consumption/attributes/ExecuteIdentityAttributeQuery.js");
2219
+ const ExecuteRelationshipAttributeQuery_1 = __webpack_require__(/*! ../../../useCases/consumption/attributes/ExecuteRelationshipAttributeQuery */ "./dist/useCases/consumption/attributes/ExecuteRelationshipAttributeQuery.js");
2218
2220
  let AttributesFacade = class AttributesFacade {
2219
- constructor(createAttributeUseCase, createSharedAttributeCopyUseCase, deleteAttributeUseCase, getAllValidUseCase, getAttributeUseCase, getAttributesUseCase, succeedAttributeUseCase, updateAttributeUseCase) {
2221
+ constructor(createAttributeUseCase, createSharedAttributeCopyUseCase, deleteAttributeUseCase, getValidAttributesUseCase, getAttributeUseCase, getAttributesUseCase, succeedAttributeUseCase, updateAttributeUseCase, executeIdentityAttributeQueryUseCase, executeRelationshipAttributeQueryUseCase) {
2220
2222
  this.createAttributeUseCase = createAttributeUseCase;
2221
2223
  this.createSharedAttributeCopyUseCase = createSharedAttributeCopyUseCase;
2222
2224
  this.deleteAttributeUseCase = deleteAttributeUseCase;
2223
- this.getAllValidUseCase = getAllValidUseCase;
2225
+ this.getValidAttributesUseCase = getValidAttributesUseCase;
2224
2226
  this.getAttributeUseCase = getAttributeUseCase;
2225
2227
  this.getAttributesUseCase = getAttributesUseCase;
2226
2228
  this.succeedAttributeUseCase = succeedAttributeUseCase;
2227
2229
  this.updateAttributeUseCase = updateAttributeUseCase;
2230
+ this.executeIdentityAttributeQueryUseCase = executeIdentityAttributeQueryUseCase;
2231
+ this.executeRelationshipAttributeQueryUseCase = executeRelationshipAttributeQueryUseCase;
2228
2232
  }
2229
2233
  async createAttribute(request) {
2230
2234
  return await this.createAttributeUseCase.execute(request);
@@ -2235,8 +2239,8 @@ let AttributesFacade = class AttributesFacade {
2235
2239
  async deleteAttribute(request) {
2236
2240
  return await this.deleteAttributeUseCase.execute(request);
2237
2241
  }
2238
- async getAllValid() {
2239
- return await this.getAllValidUseCase.execute();
2242
+ async getValidAttributes(request) {
2243
+ return await this.getValidAttributesUseCase.execute(request);
2240
2244
  }
2241
2245
  async getAttribute(request) {
2242
2246
  return await this.getAttributeUseCase.execute(request);
@@ -2244,6 +2248,12 @@ let AttributesFacade = class AttributesFacade {
2244
2248
  async getAttributes(request) {
2245
2249
  return await this.getAttributesUseCase.execute(request);
2246
2250
  }
2251
+ async executeIdentityAttributeQuery(request) {
2252
+ return await this.executeIdentityAttributeQueryUseCase.execute(request);
2253
+ }
2254
+ async executeRelationshipAttributeQuery(request) {
2255
+ return await this.executeRelationshipAttributeQueryUseCase.execute(request);
2256
+ }
2247
2257
  async succeedAttribute(request) {
2248
2258
  return await this.succeedAttributeUseCase.execute(request);
2249
2259
  }
@@ -2260,14 +2270,18 @@ AttributesFacade = __decorate([
2260
2270
  __param(5, typescript_ioc_1.Inject),
2261
2271
  __param(6, typescript_ioc_1.Inject),
2262
2272
  __param(7, typescript_ioc_1.Inject),
2273
+ __param(8, typescript_ioc_1.Inject),
2274
+ __param(9, typescript_ioc_1.Inject),
2263
2275
  __metadata("design:paramtypes", [useCases_1.CreateAttributeUseCase,
2264
2276
  useCases_1.CreateSharedAttributeCopyUseCase,
2265
2277
  useCases_1.DeleteAttributeUseCase,
2266
- useCases_1.GetAllValidUseCase,
2278
+ useCases_1.GetValidAttributesUseCase,
2267
2279
  useCases_1.GetAttributeUseCase,
2268
2280
  useCases_1.GetAttributesUseCase,
2269
2281
  useCases_1.SucceedAttributeUseCase,
2270
- useCases_1.UpdateAttributeUseCase])
2282
+ useCases_1.UpdateAttributeUseCase,
2283
+ ExecuteIdentityAttributeQuery_1.ExecuteIdentityAttributeQueryUseCase,
2284
+ ExecuteRelationshipAttributeQuery_1.ExecuteRelationshipAttributeQueryUseCase])
2271
2285
  ], AttributesFacade);
2272
2286
  exports.AttributesFacade = AttributesFacade;
2273
2287
  //# sourceMappingURL=AttributesFacade.js.map
@@ -4618,8 +4632,8 @@ exports.JsonSchema = JsonSchema;
4618
4632
  "use strict";
4619
4633
 
4620
4634
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4621
- 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.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.GetAttributesRequest = exports.GetAttributeRequest = exports.DeleteAttributeRequest = exports.CreateShareAttributeCopyRequest = exports.CreateAttributeRequest = exports.LoadPeerTokenAnonymousByTruncatedReferenceRequest = exports.LoadPeerTokenAnonymousByIdAndKeyRequest = void 0;
4622
- 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.GetAttributesForRelationshipRequest = 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 = void 0;
4635
+ 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.GetValidAttributesRequest = exports.GetAttributesRequest = exports.GetAttributeRequest = exports.ExecuteRelationshipAttributeQueryRequest = exports.ExecuteIdentityAttributeQueryRequest = exports.DeleteAttributeRequest = exports.CreateShareAttributeCopyRequest = exports.CreateAttributeRequest = exports.LoadPeerTokenAnonymousByTruncatedReferenceRequest = exports.LoadPeerTokenAnonymousByIdAndKeyRequest = void 0;
4636
+ 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.GetAttributesForRelationshipRequest = 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;
4623
4637
  exports.LoadPeerTokenAnonymousByIdAndKeyRequest = {
4624
4638
  "$schema": "http://json-schema.org/draft-07/schema#",
4625
4639
  "$ref": "#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",
@@ -4838,13 +4852,405 @@ exports.DeleteAttributeRequest = {
4838
4852
  "DeleteAttributeRequest": {
4839
4853
  "type": "object",
4840
4854
  "properties": {
4841
- "id": {
4842
- "type": "string",
4843
- "pattern": "ATT[A-Za-z0-9]{17}"
4855
+ "id": {
4856
+ "type": "string",
4857
+ "pattern": "ATT[A-Za-z0-9]{17}"
4858
+ }
4859
+ },
4860
+ "required": [
4861
+ "id"
4862
+ ],
4863
+ "additionalProperties": false
4864
+ }
4865
+ }
4866
+ };
4867
+ exports.ExecuteIdentityAttributeQueryRequest = {
4868
+ "$schema": "http://json-schema.org/draft-07/schema#",
4869
+ "$ref": "#/definitions/ExecuteIdentityAttributeQueryRequest",
4870
+ "definitions": {
4871
+ "ExecuteIdentityAttributeQueryRequest": {
4872
+ "type": "object",
4873
+ "properties": {
4874
+ "query": {
4875
+ "anyOf": [
4876
+ {
4877
+ "$ref": "#/definitions/IIdentityAttributeQuery"
4878
+ },
4879
+ {
4880
+ "$ref": "#/definitions/IdentityAttributeQueryJSON"
4881
+ }
4882
+ ]
4883
+ }
4884
+ },
4885
+ "required": [
4886
+ "query"
4887
+ ],
4888
+ "additionalProperties": false
4889
+ },
4890
+ "IIdentityAttributeQuery": {
4891
+ "type": "object",
4892
+ "properties": {
4893
+ "valueType": {
4894
+ "type": "string"
4895
+ },
4896
+ "validFrom": {
4897
+ "$ref": "#/definitions/ICoreDate"
4898
+ },
4899
+ "validTo": {
4900
+ "$ref": "#/definitions/ICoreDate"
4901
+ },
4902
+ "tags": {
4903
+ "type": "array",
4904
+ "items": {
4905
+ "type": "string"
4906
+ }
4907
+ }
4908
+ },
4909
+ "additionalProperties": false,
4910
+ "required": [
4911
+ "valueType"
4912
+ ]
4913
+ },
4914
+ "ICoreDate": {
4915
+ "type": "object",
4916
+ "properties": {
4917
+ "date": {
4918
+ "type": "string"
4919
+ }
4920
+ },
4921
+ "required": [
4922
+ "date"
4923
+ ],
4924
+ "additionalProperties": false
4925
+ },
4926
+ "IdentityAttributeQueryJSON": {
4927
+ "type": "object",
4928
+ "properties": {
4929
+ "@type": {
4930
+ "type": "string"
4931
+ },
4932
+ "@context": {
4933
+ "type": "string"
4934
+ },
4935
+ "@version": {
4936
+ "type": "string"
4937
+ },
4938
+ "valueType": {
4939
+ "type": "string"
4940
+ },
4941
+ "validFrom": {
4942
+ "type": "string"
4943
+ },
4944
+ "validTo": {
4945
+ "type": "string"
4946
+ },
4947
+ "tags": {
4948
+ "type": "array",
4949
+ "items": {
4950
+ "type": "string"
4951
+ }
4952
+ }
4953
+ },
4954
+ "additionalProperties": false,
4955
+ "required": [
4956
+ "@type",
4957
+ "valueType"
4958
+ ]
4959
+ }
4960
+ }
4961
+ };
4962
+ exports.ExecuteRelationshipAttributeQueryRequest = {
4963
+ "$schema": "http://json-schema.org/draft-07/schema#",
4964
+ "$ref": "#/definitions/ExecuteRelationshipAttributeQueryRequest",
4965
+ "definitions": {
4966
+ "ExecuteRelationshipAttributeQueryRequest": {
4967
+ "type": "object",
4968
+ "properties": {
4969
+ "query": {
4970
+ "anyOf": [
4971
+ {
4972
+ "$ref": "#/definitions/IRelationshipAttributeQuery"
4973
+ },
4974
+ {
4975
+ "$ref": "#/definitions/RelationshipAttributeQueryJSON"
4976
+ }
4977
+ ]
4978
+ }
4979
+ },
4980
+ "required": [
4981
+ "query"
4982
+ ],
4983
+ "additionalProperties": false
4984
+ },
4985
+ "IRelationshipAttributeQuery": {
4986
+ "type": "object",
4987
+ "properties": {
4988
+ "valueType": {
4989
+ "type": "string"
4990
+ },
4991
+ "validFrom": {
4992
+ "$ref": "#/definitions/ICoreDate"
4993
+ },
4994
+ "validTo": {
4995
+ "$ref": "#/definitions/ICoreDate"
4996
+ },
4997
+ "key": {
4998
+ "type": "string"
4999
+ },
5000
+ "owner": {
5001
+ "$ref": "#/definitions/ICoreAddress"
5002
+ },
5003
+ "thirdParty": {
5004
+ "$ref": "#/definitions/ICoreAddress"
5005
+ },
5006
+ "attributeCreationHints": {
5007
+ "$ref": "#/definitions/IRelationshipAttributeCreationHints"
5008
+ }
5009
+ },
5010
+ "required": [
5011
+ "attributeCreationHints",
5012
+ "key",
5013
+ "owner",
5014
+ "valueType"
5015
+ ],
5016
+ "additionalProperties": false
5017
+ },
5018
+ "ICoreDate": {
5019
+ "type": "object",
5020
+ "properties": {
5021
+ "date": {
5022
+ "type": "string"
5023
+ }
5024
+ },
5025
+ "required": [
5026
+ "date"
5027
+ ],
5028
+ "additionalProperties": false
5029
+ },
5030
+ "ICoreAddress": {
5031
+ "type": "object",
5032
+ "properties": {
5033
+ "address": {
5034
+ "type": "string"
5035
+ }
5036
+ },
5037
+ "required": [
5038
+ "address"
5039
+ ],
5040
+ "additionalProperties": false
5041
+ },
5042
+ "IRelationshipAttributeCreationHints": {
5043
+ "type": "object",
5044
+ "properties": {
5045
+ "title": {
5046
+ "type": "string"
5047
+ },
5048
+ "description": {
5049
+ "type": "string"
5050
+ },
5051
+ "valueHints": {
5052
+ "$ref": "#/definitions/IValueHints"
5053
+ },
5054
+ "isTechnical": {
5055
+ "type": "boolean"
5056
+ },
5057
+ "confidentiality": {
5058
+ "$ref": "#/definitions/RelationshipAttributeConfidentiality"
5059
+ }
5060
+ },
5061
+ "required": [
5062
+ "title",
5063
+ "confidentiality"
5064
+ ],
5065
+ "additionalProperties": false
5066
+ },
5067
+ "IValueHints": {
5068
+ "type": "object",
5069
+ "properties": {
5070
+ "editHelp": {
5071
+ "type": "string"
5072
+ },
5073
+ "min": {
5074
+ "type": "number"
5075
+ },
5076
+ "max": {
5077
+ "type": "number"
5078
+ },
5079
+ "pattern": {
5080
+ "type": "string"
5081
+ },
5082
+ "values": {
5083
+ "type": "array",
5084
+ "items": {
5085
+ "$ref": "#/definitions/IValueHintsValue"
5086
+ }
5087
+ },
5088
+ "defaultValue": {
5089
+ "type": [
5090
+ "string",
5091
+ "number",
5092
+ "boolean"
5093
+ ]
5094
+ }
5095
+ },
5096
+ "additionalProperties": false
5097
+ },
5098
+ "IValueHintsValue": {
5099
+ "type": "object",
5100
+ "properties": {
5101
+ "key": {
5102
+ "type": [
5103
+ "string",
5104
+ "number",
5105
+ "boolean"
5106
+ ]
5107
+ },
5108
+ "displayName": {
5109
+ "type": "string"
5110
+ }
5111
+ },
5112
+ "required": [
5113
+ "key",
5114
+ "displayName"
5115
+ ],
5116
+ "additionalProperties": false
5117
+ },
5118
+ "RelationshipAttributeConfidentiality": {
5119
+ "type": "string",
5120
+ "enum": [
5121
+ "public",
5122
+ "private",
5123
+ "protected"
5124
+ ]
5125
+ },
5126
+ "RelationshipAttributeQueryJSON": {
5127
+ "type": "object",
5128
+ "properties": {
5129
+ "@type": {
5130
+ "type": "string"
5131
+ },
5132
+ "@context": {
5133
+ "type": "string"
5134
+ },
5135
+ "@version": {
5136
+ "type": "string"
5137
+ },
5138
+ "valueType": {
5139
+ "type": "string"
5140
+ },
5141
+ "validFrom": {
5142
+ "type": "string"
5143
+ },
5144
+ "validTo": {
5145
+ "type": "string"
5146
+ },
5147
+ "key": {
5148
+ "type": "string"
5149
+ },
5150
+ "owner": {
5151
+ "type": "string"
5152
+ },
5153
+ "thirdParty": {
5154
+ "type": "string"
5155
+ },
5156
+ "attributeCreationHints": {
5157
+ "$ref": "#/definitions/RelationshipAttributeCreationHintsJSON"
5158
+ }
5159
+ },
5160
+ "required": [
5161
+ "@type",
5162
+ "attributeCreationHints",
5163
+ "key",
5164
+ "owner",
5165
+ "valueType"
5166
+ ],
5167
+ "additionalProperties": false
5168
+ },
5169
+ "RelationshipAttributeCreationHintsJSON": {
5170
+ "type": "object",
5171
+ "properties": {
5172
+ "title": {
5173
+ "type": "string"
5174
+ },
5175
+ "description": {
5176
+ "type": "string"
5177
+ },
5178
+ "valueHints": {
5179
+ "$ref": "#/definitions/ValueHintsJSON"
5180
+ },
5181
+ "isTechnical": {
5182
+ "type": "boolean"
5183
+ },
5184
+ "confidentiality": {
5185
+ "$ref": "#/definitions/RelationshipAttributeConfidentiality"
5186
+ }
5187
+ },
5188
+ "required": [
5189
+ "title",
5190
+ "confidentiality"
5191
+ ],
5192
+ "additionalProperties": false
5193
+ },
5194
+ "ValueHintsJSON": {
5195
+ "type": "object",
5196
+ "properties": {
5197
+ "@type": {
5198
+ "type": "string"
5199
+ },
5200
+ "@context": {
5201
+ "type": "string"
5202
+ },
5203
+ "@version": {
5204
+ "type": "string"
5205
+ },
5206
+ "editHelp": {
5207
+ "type": "string"
5208
+ },
5209
+ "min": {
5210
+ "type": "number"
5211
+ },
5212
+ "max": {
5213
+ "type": "number"
5214
+ },
5215
+ "pattern": {
5216
+ "type": "string"
5217
+ },
5218
+ "values": {
5219
+ "type": "array",
5220
+ "items": {
5221
+ "$ref": "#/definitions/ValueHintsValueJSON"
5222
+ }
5223
+ },
5224
+ "defaultValue": {
5225
+ "type": [
5226
+ "string",
5227
+ "number",
5228
+ "boolean"
5229
+ ]
5230
+ }
5231
+ },
5232
+ "additionalProperties": false,
5233
+ "required": [
5234
+ "@type"
5235
+ ]
5236
+ },
5237
+ "ValueHintsValueJSON": {
5238
+ "type": "object",
5239
+ "properties": {
5240
+ "key": {
5241
+ "type": [
5242
+ "string",
5243
+ "number",
5244
+ "boolean"
5245
+ ]
5246
+ },
5247
+ "displayName": {
5248
+ "type": "string"
4844
5249
  }
4845
5250
  },
4846
5251
  "required": [
4847
- "id"
5252
+ "key",
5253
+ "displayName"
4848
5254
  ],
4849
5255
  "additionalProperties": false
4850
5256
  }
@@ -4877,12 +5283,12 @@ exports.GetAttributesRequest = {
4877
5283
  "type": "object",
4878
5284
  "properties": {
4879
5285
  "query": {
4880
- "$ref": "#/definitions/ConsumptionAttributeQuery"
5286
+ "$ref": "#/definitions/GetAttributesRequestQuery"
4881
5287
  }
4882
5288
  },
4883
5289
  "additionalProperties": false
4884
5290
  },
4885
- "ConsumptionAttributeQuery": {
5291
+ "GetAttributesRequestQuery": {
4886
5292
  "type": "object",
4887
5293
  "properties": {
4888
5294
  "createdAt": {
@@ -4964,6 +5370,92 @@ exports.GetAttributesRequest = {
4964
5370
  }
4965
5371
  }
4966
5372
  };
5373
+ exports.GetValidAttributesRequest = {
5374
+ "$schema": "http://json-schema.org/draft-07/schema#",
5375
+ "$ref": "#/definitions/GetValidAttributesRequest",
5376
+ "definitions": {
5377
+ "GetValidAttributesRequest": {
5378
+ "type": "object",
5379
+ "properties": {
5380
+ "query": {
5381
+ "$ref": "#/definitions/GetValidAttributesRequestQuery"
5382
+ }
5383
+ },
5384
+ "additionalProperties": false
5385
+ },
5386
+ "GetValidAttributesRequestQuery": {
5387
+ "type": "object",
5388
+ "properties": {
5389
+ "content": {
5390
+ "type": "object",
5391
+ "properties": {
5392
+ "@type": {
5393
+ "type": "string"
5394
+ },
5395
+ "tags": {
5396
+ "type": "array",
5397
+ "items": {
5398
+ "type": "string"
5399
+ }
5400
+ },
5401
+ "owner": {
5402
+ "type": "string"
5403
+ },
5404
+ "key": {
5405
+ "type": "string"
5406
+ },
5407
+ "isTechnical": {
5408
+ "type": "boolean"
5409
+ },
5410
+ "confidentiality": {
5411
+ "$ref": "#/definitions/RelationshipAttributeConfidentiality"
5412
+ },
5413
+ "value": {
5414
+ "type": "object",
5415
+ "properties": {
5416
+ "@type": {
5417
+ "type": "string"
5418
+ }
5419
+ },
5420
+ "additionalProperties": false
5421
+ }
5422
+ },
5423
+ "additionalProperties": false
5424
+ },
5425
+ "succeeds": {
5426
+ "type": "string"
5427
+ },
5428
+ "succeededBy": {
5429
+ "type": "string"
5430
+ },
5431
+ "shareInfo": {
5432
+ "type": "object",
5433
+ "properties": {
5434
+ "requestReference": {
5435
+ "type": "string"
5436
+ },
5437
+ "peer": {
5438
+ "type": "string"
5439
+ },
5440
+ "sourceAttribute": {
5441
+ "type": "string"
5442
+ }
5443
+ },
5444
+ "additionalProperties": false
5445
+ }
5446
+ },
5447
+ "additionalProperties": {}
5448
+ },
5449
+ "RelationshipAttributeConfidentiality": {
5450
+ "type": "string",
5451
+ "enum": [
5452
+ "public",
5453
+ "private",
5454
+ "protected"
5455
+ ]
5456
+ }
5457
+ }
5458
+ };
4967
5459
  exports.SucceedAttributeRequest = {
4968
5460
  "$schema": "http://json-schema.org/draft-07/schema#",
4969
5461
  "$ref": "#/definitions/SucceedAttributeRequest",
@@ -5996,12 +6488,12 @@ exports.GetIncomingRequestsRequest = {
5996
6488
  "type": "object",
5997
6489
  "properties": {
5998
6490
  "query": {
5999
- "$ref": "#/definitions/GetIncomingRequestsRequestsQuery"
6491
+ "$ref": "#/definitions/GetIncomingRequestsRequestQuery"
6000
6492
  }
6001
6493
  },
6002
6494
  "additionalProperties": false
6003
6495
  },
6004
- "GetIncomingRequestsRequestsQuery": {
6496
+ "GetIncomingRequestsRequestQuery": {
6005
6497
  "type": "object",
6006
6498
  "properties": {
6007
6499
  "id": {
@@ -7420,8 +7912,12 @@ exports.CreateOwnRelationshipTemplateRequest = {
7420
7912
  "type": "string"
7421
7913
  },
7422
7914
  "content": {},
7423
- "maxNumberOfRelationships": {
7915
+ "maxNumberOfAllocations": {
7424
7916
  "type": "number"
7917
+ },
7918
+ "maxNumberOfRelationships": {
7919
+ "type": "number",
7920
+ "deprecated": "use `maxNumberOfAllocations` instead"
7425
7921
  }
7426
7922
  },
7427
7923
  "required": [
@@ -7931,18 +8427,17 @@ exports.SchemaValidator = SchemaValidator;
7931
8427
  /*!*****************************************************************!*\
7932
8428
  !*** ./dist/useCases/consumption/attributes/AttributeMapper.js ***!
7933
8429
  \*****************************************************************/
7934
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8430
+ /***/ ((__unused_webpack_module, exports) => {
7935
8431
 
7936
8432
  "use strict";
7937
8433
 
7938
8434
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7939
8435
  exports.AttributeMapper = void 0;
7940
- const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
7941
8436
  class AttributeMapper {
7942
8437
  static toAttributeDTO(attribute) {
7943
8438
  return {
7944
8439
  id: attribute.id.toString(),
7945
- content: attribute.content instanceof content_1.IdentityAttribute ? attribute.content.toJSON() : attribute.content.toJSON(),
8440
+ content: attribute.content.toJSON(),
7946
8441
  createdAt: attribute.createdAt.toString(),
7947
8442
  succeeds: attribute.succeeds?.toString(),
7948
8443
  succeededBy: attribute.succeededBy?.toString(),
@@ -8155,10 +8650,10 @@ exports.DeleteAttributeUseCase = DeleteAttributeUseCase;
8155
8650
 
8156
8651
  /***/ }),
8157
8652
 
8158
- /***/ "./dist/useCases/consumption/attributes/GetAllValid.js":
8159
- /*!*************************************************************!*\
8160
- !*** ./dist/useCases/consumption/attributes/GetAllValid.js ***!
8161
- \*************************************************************/
8653
+ /***/ "./dist/useCases/consumption/attributes/ExecuteIdentityAttributeQuery.js":
8654
+ /*!*******************************************************************************!*\
8655
+ !*** ./dist/useCases/consumption/attributes/ExecuteIdentityAttributeQuery.js ***!
8656
+ \*******************************************************************************/
8162
8657
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8163
8658
 
8164
8659
  "use strict";
@@ -8176,28 +8671,80 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
8176
8671
  return function (target, key) { decorator(target, key, paramIndex); }
8177
8672
  };
8178
8673
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8179
- exports.GetAllValidUseCase = void 0;
8674
+ exports.ExecuteIdentityAttributeQueryUseCase = void 0;
8180
8675
  const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
8181
8676
  const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
8182
8677
  const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
8183
8678
  const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
8184
8679
  const AttributeMapper_1 = __webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consumption/attributes/AttributeMapper.js");
8185
- let GetAllValidUseCase = class GetAllValidUseCase extends common_1.UseCase {
8680
+ let ExecuteIdentityAttributeQueryUseCase = class ExecuteIdentityAttributeQueryUseCase extends common_1.UseCase {
8186
8681
  constructor(attributeController) {
8187
8682
  super();
8188
8683
  this.attributeController = attributeController;
8189
8684
  }
8190
- async executeInternal() {
8191
- const attributes = await this.attributeController.getValidConsumptionAttributes();
8685
+ async executeInternal(request) {
8686
+ const params = {
8687
+ query: request.query
8688
+ };
8689
+ const attributes = await this.attributeController.executeIdentityAttributeQuery(params);
8690
+ return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
8691
+ }
8692
+ };
8693
+ ExecuteIdentityAttributeQueryUseCase = __decorate([
8694
+ __param(0, typescript_ioc_1.Inject),
8695
+ __metadata("design:paramtypes", [consumption_1.ConsumptionAttributesController])
8696
+ ], ExecuteIdentityAttributeQueryUseCase);
8697
+ exports.ExecuteIdentityAttributeQueryUseCase = ExecuteIdentityAttributeQueryUseCase;
8698
+ //# sourceMappingURL=ExecuteIdentityAttributeQuery.js.map
8699
+
8700
+ /***/ }),
8701
+
8702
+ /***/ "./dist/useCases/consumption/attributes/ExecuteRelationshipAttributeQuery.js":
8703
+ /*!***********************************************************************************!*\
8704
+ !*** ./dist/useCases/consumption/attributes/ExecuteRelationshipAttributeQuery.js ***!
8705
+ \***********************************************************************************/
8706
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8707
+
8708
+ "use strict";
8709
+
8710
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
8711
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8712
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8713
+ 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;
8714
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
8715
+ };
8716
+ var __metadata = (this && this.__metadata) || function (k, v) {
8717
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
8718
+ };
8719
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
8720
+ return function (target, key) { decorator(target, key, paramIndex); }
8721
+ };
8722
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
8723
+ exports.ExecuteRelationshipAttributeQueryUseCase = void 0;
8724
+ const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
8725
+ const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
8726
+ const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
8727
+ const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
8728
+ const AttributeMapper_1 = __webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consumption/attributes/AttributeMapper.js");
8729
+ let ExecuteRelationshipAttributeQueryUseCase = class ExecuteRelationshipAttributeQueryUseCase extends common_1.UseCase {
8730
+ constructor(attributeController) {
8731
+ super();
8732
+ this.attributeController = attributeController;
8733
+ }
8734
+ async executeInternal(request) {
8735
+ const params = {
8736
+ query: request.query
8737
+ };
8738
+ const attributes = await this.attributeController.executeRelationshipAttributeQuery(params);
8192
8739
  return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
8193
8740
  }
8194
8741
  };
8195
- GetAllValidUseCase = __decorate([
8742
+ ExecuteRelationshipAttributeQueryUseCase = __decorate([
8196
8743
  __param(0, typescript_ioc_1.Inject),
8197
8744
  __metadata("design:paramtypes", [consumption_1.ConsumptionAttributesController])
8198
- ], GetAllValidUseCase);
8199
- exports.GetAllValidUseCase = GetAllValidUseCase;
8200
- //# sourceMappingURL=GetAllValid.js.map
8745
+ ], ExecuteRelationshipAttributeQueryUseCase);
8746
+ exports.ExecuteRelationshipAttributeQueryUseCase = ExecuteRelationshipAttributeQueryUseCase;
8747
+ //# sourceMappingURL=ExecuteRelationshipAttributeQuery.js.map
8201
8748
 
8202
8749
  /***/ }),
8203
8750
 
@@ -8301,8 +8848,8 @@ let GetAttributesUseCase = class GetAttributesUseCase extends common_1.UseCase {
8301
8848
  async executeInternal(request) {
8302
8849
  const flattenedQuery = (0, flattenObject_1.flattenObject)(request.query);
8303
8850
  const dbQuery = GetAttributesUseCase.queryTranslator.parse(flattenedQuery);
8304
- const fetched = await this.attributeController.getConsumptionAttributes(dbQuery);
8305
- return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(fetched));
8851
+ const attributes = await this.attributeController.getConsumptionAttributes(dbQuery);
8852
+ return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
8306
8853
  }
8307
8854
  };
8308
8855
  GetAttributesUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({
@@ -8411,6 +8958,124 @@ exports.GetAttributesUseCase = GetAttributesUseCase;
8411
8958
 
8412
8959
  /***/ }),
8413
8960
 
8961
+ /***/ "./dist/useCases/consumption/attributes/GetValidAttributes.js":
8962
+ /*!********************************************************************!*\
8963
+ !*** ./dist/useCases/consumption/attributes/GetValidAttributes.js ***!
8964
+ \********************************************************************/
8965
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8966
+
8967
+ "use strict";
8968
+
8969
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
8970
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8971
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8972
+ 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;
8973
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
8974
+ };
8975
+ var __metadata = (this && this.__metadata) || function (k, v) {
8976
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
8977
+ };
8978
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
8979
+ return function (target, key) { decorator(target, key, paramIndex); }
8980
+ };
8981
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
8982
+ exports.GetValidAttributesUseCase = void 0;
8983
+ const docdb_querytranslator_1 = __webpack_require__(/*! @js-soft/docdb-querytranslator */ "./node_modules/@js-soft/docdb-querytranslator/dist/index.js");
8984
+ const ts_utils_1 = __webpack_require__(/*! @js-soft/ts-utils */ "./node_modules/@js-soft/ts-utils/dist/index.js");
8985
+ const consumption_1 = __webpack_require__(/*! @nmshd/consumption */ "@nmshd/consumption");
8986
+ const ts_simple_nameof_1 = __webpack_require__(/*! ts-simple-nameof */ "./node_modules/ts-simple-nameof/index.js");
8987
+ const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modules/typescript-ioc/dist/typescript-ioc.js");
8988
+ const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
8989
+ const flattenObject_1 = __webpack_require__(/*! ../requests/flattenObject */ "./dist/useCases/consumption/requests/flattenObject.js");
8990
+ const AttributeMapper_1 = __webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consumption/attributes/AttributeMapper.js");
8991
+ let GetValidAttributesUseCase = class GetValidAttributesUseCase extends common_1.UseCase {
8992
+ constructor(attributeController) {
8993
+ super();
8994
+ this.attributeController = attributeController;
8995
+ }
8996
+ async executeInternal(request) {
8997
+ const flattenedQuery = (0, flattenObject_1.flattenObject)(request.query);
8998
+ const dbQuery = GetValidAttributesUseCase.queryTranslator.parse(flattenedQuery);
8999
+ const attributes = await this.attributeController.getValidConsumptionAttributes(dbQuery);
9000
+ return ts_utils_1.Result.ok(AttributeMapper_1.AttributeMapper.toAttributeDTOList(attributes));
9001
+ }
9002
+ };
9003
+ GetValidAttributesUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({
9004
+ whitelist: {
9005
+ [(0, ts_simple_nameof_1.nameof)((x) => x.succeeds)]: true,
9006
+ [(0, ts_simple_nameof_1.nameof)((x) => x.succeededBy)]: true,
9007
+ // content.abstractAttribute
9008
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`]: true,
9009
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`]: true,
9010
+ // content.identityAttribute
9011
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: true,
9012
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`]: true,
9013
+ // content.relationshipAttribute
9014
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`]: true,
9015
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`]: true,
9016
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`]: true,
9017
+ // content.shareInfo
9018
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: true,
9019
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`]: true,
9020
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: true
9021
+ },
9022
+ alias: {
9023
+ [(0, ts_simple_nameof_1.nameof)((x) => x.succeeds)]: [(0, ts_simple_nameof_1.nameof)((x) => x.succeeds)],
9024
+ [(0, ts_simple_nameof_1.nameof)((x) => x.succeededBy)]: [(0, ts_simple_nameof_1.nameof)((x) => x.succeededBy)],
9025
+ // content.abstractAttribute
9026
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`]: [
9027
+ `${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`
9028
+ ],
9029
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`]: [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`],
9030
+ // content.identityAttribute
9031
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: [
9032
+ `${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`
9033
+ ],
9034
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`]: [
9035
+ `${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`
9036
+ ],
9037
+ // content.relationshipAttribute
9038
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`]: [
9039
+ `${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`
9040
+ ],
9041
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`]: [
9042
+ `${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.isTechnical)}`
9043
+ ],
9044
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`]: [
9045
+ `${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.confidentiality)}`
9046
+ ],
9047
+ // content.shareInfo
9048
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`]: [
9049
+ `${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`
9050
+ ],
9051
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`]: [
9052
+ `${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.requestReference)}`
9053
+ ],
9054
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`]: [
9055
+ `${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.sourceAttribute)}`
9056
+ ]
9057
+ },
9058
+ custom: {
9059
+ // content.tags
9060
+ [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: (query, input) => {
9061
+ const allowedTags = [];
9062
+ for (const tag of input) {
9063
+ const tagQuery = { [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: { $contains: tag } };
9064
+ allowedTags.push(tagQuery);
9065
+ }
9066
+ query["$or"] = allowedTags;
9067
+ }
9068
+ }
9069
+ });
9070
+ GetValidAttributesUseCase = __decorate([
9071
+ __param(0, typescript_ioc_1.Inject),
9072
+ __metadata("design:paramtypes", [consumption_1.ConsumptionAttributesController])
9073
+ ], GetValidAttributesUseCase);
9074
+ exports.GetValidAttributesUseCase = GetValidAttributesUseCase;
9075
+ //# sourceMappingURL=GetValidAttributes.js.map
9076
+
9077
+ /***/ }),
9078
+
8414
9079
  /***/ "./dist/useCases/consumption/attributes/SucceedAttribute.js":
8415
9080
  /*!******************************************************************!*\
8416
9081
  !*** ./dist/useCases/consumption/attributes/SucceedAttribute.js ***!
@@ -8570,9 +9235,11 @@ __exportStar(__webpack_require__(/*! ./AttributeMapper */ "./dist/useCases/consu
8570
9235
  __exportStar(__webpack_require__(/*! ./CreateAttribute */ "./dist/useCases/consumption/attributes/CreateAttribute.js"), exports);
8571
9236
  __exportStar(__webpack_require__(/*! ./CreateShareAttributeCopy */ "./dist/useCases/consumption/attributes/CreateShareAttributeCopy.js"), exports);
8572
9237
  __exportStar(__webpack_require__(/*! ./DeleteAttribute */ "./dist/useCases/consumption/attributes/DeleteAttribute.js"), exports);
8573
- __exportStar(__webpack_require__(/*! ./GetAllValid */ "./dist/useCases/consumption/attributes/GetAllValid.js"), exports);
9238
+ __exportStar(__webpack_require__(/*! ./ExecuteIdentityAttributeQuery */ "./dist/useCases/consumption/attributes/ExecuteIdentityAttributeQuery.js"), exports);
9239
+ __exportStar(__webpack_require__(/*! ./ExecuteRelationshipAttributeQuery */ "./dist/useCases/consumption/attributes/ExecuteRelationshipAttributeQuery.js"), exports);
8574
9240
  __exportStar(__webpack_require__(/*! ./GetAttribute */ "./dist/useCases/consumption/attributes/GetAttribute.js"), exports);
8575
9241
  __exportStar(__webpack_require__(/*! ./GetAttributes */ "./dist/useCases/consumption/attributes/GetAttributes.js"), exports);
9242
+ __exportStar(__webpack_require__(/*! ./GetValidAttributes */ "./dist/useCases/consumption/attributes/GetValidAttributes.js"), exports);
8576
9243
  __exportStar(__webpack_require__(/*! ./SucceedAttribute */ "./dist/useCases/consumption/attributes/SucceedAttribute.js"), exports);
8577
9244
  __exportStar(__webpack_require__(/*! ./UpdateAttribute */ "./dist/useCases/consumption/attributes/UpdateAttribute.js"), exports);
8578
9245
  //# sourceMappingURL=index.js.map
@@ -13357,6 +14024,9 @@ class CreateOwnRelationshipTemplateRequestValidator extends common_1.RuntimeVali
13357
14024
  this.validateIfNumber((x) => x.maxNumberOfRelationships)
13358
14025
  .isGreaterThanOrEqual(1)
13359
14026
  .whenNotNull();
14027
+ this.validateIfNumber((x) => x.maxNumberOfAllocations)
14028
+ .isGreaterThanOrEqual(1)
14029
+ .whenNotNull();
13360
14030
  }
13361
14031
  }
13362
14032
  let CreateOwnRelationshipTemplateUseCase = class CreateOwnRelationshipTemplateUseCase extends common_1.UseCase {
@@ -13369,6 +14039,7 @@ let CreateOwnRelationshipTemplateUseCase = class CreateOwnRelationshipTemplateUs
13369
14039
  const relationshipTemplate = await this.templateController.sendRelationshipTemplate({
13370
14040
  content: request.content,
13371
14041
  expiresAt: transport_1.CoreDate.from(request.expiresAt),
14042
+ maxNumberOfAllocations: request.maxNumberOfAllocations,
13372
14043
  maxNumberOfRelationships: request.maxNumberOfRelationships
13373
14044
  });
13374
14045
  await this.accountController.syncDatawallet();
@@ -13651,6 +14322,7 @@ GetRelationshipTemplatesUseCase.queryTranslator = new docdb_querytranslator_1.Qu
13651
14322
  [(0, ts_simple_nameof_1.nameof)((r) => r.expiresAt)]: true,
13652
14323
  [(0, ts_simple_nameof_1.nameof)((r) => r.createdBy)]: true,
13653
14324
  [(0, ts_simple_nameof_1.nameof)((r) => r.createdByDevice)]: true,
14325
+ [(0, ts_simple_nameof_1.nameof)((r) => r.maxNumberOfAllocations)]: true,
13654
14326
  [(0, ts_simple_nameof_1.nameof)((r) => r.maxNumberOfRelationships)]: true
13655
14327
  },
13656
14328
  alias: {
@@ -13659,6 +14331,7 @@ GetRelationshipTemplatesUseCase.queryTranslator = new docdb_querytranslator_1.Qu
13659
14331
  [(0, ts_simple_nameof_1.nameof)((r) => r.expiresAt)]: `${(0, ts_simple_nameof_1.nameof)((r) => r.cache)}.${(0, ts_simple_nameof_1.nameof)((t) => t.expiresAt)}`,
13660
14332
  [(0, ts_simple_nameof_1.nameof)((r) => r.createdBy)]: `${(0, ts_simple_nameof_1.nameof)((r) => r.cache)}.${(0, ts_simple_nameof_1.nameof)((t) => t.createdBy)}`,
13661
14333
  [(0, ts_simple_nameof_1.nameof)((r) => r.createdByDevice)]: `${(0, ts_simple_nameof_1.nameof)((r) => r.cache)}.${(0, ts_simple_nameof_1.nameof)((t) => t.createdByDevice)}`,
14334
+ [(0, ts_simple_nameof_1.nameof)((r) => r.maxNumberOfAllocations)]: `${(0, ts_simple_nameof_1.nameof)((r) => r.cache)}.${(0, ts_simple_nameof_1.nameof)((t) => t.maxNumberOfAllocations)}`,
13662
14335
  [(0, ts_simple_nameof_1.nameof)((r) => r.maxNumberOfRelationships)]: `${(0, ts_simple_nameof_1.nameof)((r) => r.cache)}.${(0, ts_simple_nameof_1.nameof)((t) => t.maxNumberOfRelationships)}`
13663
14336
  }
13664
14337
  });
@@ -13816,6 +14489,7 @@ class RelationshipTemplateMapper {
13816
14489
  createdAt: template.cache.createdAt.toString(),
13817
14490
  content: template.cache.content.toJSON(),
13818
14491
  expiresAt: template.cache.expiresAt?.toString(),
14492
+ maxNumberOfAllocations: template.cache.maxNumberOfAllocations,
13819
14493
  maxNumberOfRelationships: template.cache.maxNumberOfRelationships
13820
14494
  };
13821
14495
  }