@nmshd/runtime 2.0.0-alpha.16 → 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.
- package/dist/buildInformation.js +5 -5
- package/dist/dataViews/DataViewExpander.js.map +1 -1
- package/dist/dataViews/consumption/ConsumptionAttributeDVO.d.ts +2 -2
- package/dist/dataViews/transport/RelationshipTemplateDVO.d.ts +1 -0
- package/dist/types/transport/RelationshipTemplateDTO.d.ts +1 -0
- package/dist/useCases/common/Schemas.js +24 -14
- package/dist/useCases/common/Schemas.js.map +1 -1
- package/dist/useCases/consumption/attributes/AttributeMapper.js +1 -2
- package/dist/useCases/consumption/attributes/AttributeMapper.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.d.ts +5 -0
- package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.js +4 -0
- package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js +2 -0
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.js +1 -0
- package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.js.map +1 -1
- package/lib-web/nmshd.runtime.js +38 -22
- package/lib-web/nmshd.runtime.js.map +1 -1
- package/lib-web/nmshd.runtime.min.js +1 -1
- package/lib-web/nmshd.runtime.min.js.map +1 -1
- package/package.json +13 -13
package/lib-web/nmshd.runtime.js
CHANGED
|
@@ -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.
|
|
439
|
-
build: "
|
|
440
|
-
date: "2022-06-
|
|
441
|
-
commit: "
|
|
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.
|
|
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,
|
|
@@ -4906,7 +4906,10 @@ exports.ExecuteIdentityAttributeQueryRequest = {
|
|
|
4906
4906
|
}
|
|
4907
4907
|
}
|
|
4908
4908
|
},
|
|
4909
|
-
"additionalProperties": false
|
|
4909
|
+
"additionalProperties": false,
|
|
4910
|
+
"required": [
|
|
4911
|
+
"valueType"
|
|
4912
|
+
]
|
|
4910
4913
|
},
|
|
4911
4914
|
"ICoreDate": {
|
|
4912
4915
|
"type": "object",
|
|
@@ -4950,7 +4953,8 @@ exports.ExecuteIdentityAttributeQueryRequest = {
|
|
|
4950
4953
|
},
|
|
4951
4954
|
"additionalProperties": false,
|
|
4952
4955
|
"required": [
|
|
4953
|
-
"@type"
|
|
4956
|
+
"@type",
|
|
4957
|
+
"valueType"
|
|
4954
4958
|
]
|
|
4955
4959
|
}
|
|
4956
4960
|
}
|
|
@@ -4996,17 +5000,18 @@ exports.ExecuteRelationshipAttributeQueryRequest = {
|
|
|
4996
5000
|
"owner": {
|
|
4997
5001
|
"$ref": "#/definitions/ICoreAddress"
|
|
4998
5002
|
},
|
|
4999
|
-
"attributeHints": {
|
|
5000
|
-
"$ref": "#/definitions/IRelationshipAttributeHints"
|
|
5001
|
-
},
|
|
5002
5003
|
"thirdParty": {
|
|
5003
5004
|
"$ref": "#/definitions/ICoreAddress"
|
|
5005
|
+
},
|
|
5006
|
+
"attributeCreationHints": {
|
|
5007
|
+
"$ref": "#/definitions/IRelationshipAttributeCreationHints"
|
|
5004
5008
|
}
|
|
5005
5009
|
},
|
|
5006
5010
|
"required": [
|
|
5011
|
+
"attributeCreationHints",
|
|
5007
5012
|
"key",
|
|
5008
5013
|
"owner",
|
|
5009
|
-
"
|
|
5014
|
+
"valueType"
|
|
5010
5015
|
],
|
|
5011
5016
|
"additionalProperties": false
|
|
5012
5017
|
},
|
|
@@ -5034,7 +5039,7 @@ exports.ExecuteRelationshipAttributeQueryRequest = {
|
|
|
5034
5039
|
],
|
|
5035
5040
|
"additionalProperties": false
|
|
5036
5041
|
},
|
|
5037
|
-
"
|
|
5042
|
+
"IRelationshipAttributeCreationHints": {
|
|
5038
5043
|
"type": "object",
|
|
5039
5044
|
"properties": {
|
|
5040
5045
|
"title": {
|
|
@@ -5145,22 +5150,23 @@ exports.ExecuteRelationshipAttributeQueryRequest = {
|
|
|
5145
5150
|
"owner": {
|
|
5146
5151
|
"type": "string"
|
|
5147
5152
|
},
|
|
5148
|
-
"attributeHints": {
|
|
5149
|
-
"$ref": "#/definitions/RelationshipAttributeHintsJSON"
|
|
5150
|
-
},
|
|
5151
5153
|
"thirdParty": {
|
|
5152
5154
|
"type": "string"
|
|
5155
|
+
},
|
|
5156
|
+
"attributeCreationHints": {
|
|
5157
|
+
"$ref": "#/definitions/RelationshipAttributeCreationHintsJSON"
|
|
5153
5158
|
}
|
|
5154
5159
|
},
|
|
5155
5160
|
"required": [
|
|
5156
5161
|
"@type",
|
|
5157
|
-
"
|
|
5162
|
+
"attributeCreationHints",
|
|
5158
5163
|
"key",
|
|
5159
|
-
"owner"
|
|
5164
|
+
"owner",
|
|
5165
|
+
"valueType"
|
|
5160
5166
|
],
|
|
5161
5167
|
"additionalProperties": false
|
|
5162
5168
|
},
|
|
5163
|
-
"
|
|
5169
|
+
"RelationshipAttributeCreationHintsJSON": {
|
|
5164
5170
|
"type": "object",
|
|
5165
5171
|
"properties": {
|
|
5166
5172
|
"title": {
|
|
@@ -7906,8 +7912,12 @@ exports.CreateOwnRelationshipTemplateRequest = {
|
|
|
7906
7912
|
"type": "string"
|
|
7907
7913
|
},
|
|
7908
7914
|
"content": {},
|
|
7909
|
-
"
|
|
7915
|
+
"maxNumberOfAllocations": {
|
|
7910
7916
|
"type": "number"
|
|
7917
|
+
},
|
|
7918
|
+
"maxNumberOfRelationships": {
|
|
7919
|
+
"type": "number",
|
|
7920
|
+
"deprecated": "use `maxNumberOfAllocations` instead"
|
|
7911
7921
|
}
|
|
7912
7922
|
},
|
|
7913
7923
|
"required": [
|
|
@@ -8417,18 +8427,17 @@ exports.SchemaValidator = SchemaValidator;
|
|
|
8417
8427
|
/*!*****************************************************************!*\
|
|
8418
8428
|
!*** ./dist/useCases/consumption/attributes/AttributeMapper.js ***!
|
|
8419
8429
|
\*****************************************************************/
|
|
8420
|
-
/***/ ((__unused_webpack_module, exports
|
|
8430
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
8421
8431
|
|
|
8422
8432
|
"use strict";
|
|
8423
8433
|
|
|
8424
8434
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8425
8435
|
exports.AttributeMapper = void 0;
|
|
8426
|
-
const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
|
|
8427
8436
|
class AttributeMapper {
|
|
8428
8437
|
static toAttributeDTO(attribute) {
|
|
8429
8438
|
return {
|
|
8430
8439
|
id: attribute.id.toString(),
|
|
8431
|
-
content: attribute.content
|
|
8440
|
+
content: attribute.content.toJSON(),
|
|
8432
8441
|
createdAt: attribute.createdAt.toString(),
|
|
8433
8442
|
succeeds: attribute.succeeds?.toString(),
|
|
8434
8443
|
succeededBy: attribute.succeededBy?.toString(),
|
|
@@ -14015,6 +14024,9 @@ class CreateOwnRelationshipTemplateRequestValidator extends common_1.RuntimeVali
|
|
|
14015
14024
|
this.validateIfNumber((x) => x.maxNumberOfRelationships)
|
|
14016
14025
|
.isGreaterThanOrEqual(1)
|
|
14017
14026
|
.whenNotNull();
|
|
14027
|
+
this.validateIfNumber((x) => x.maxNumberOfAllocations)
|
|
14028
|
+
.isGreaterThanOrEqual(1)
|
|
14029
|
+
.whenNotNull();
|
|
14018
14030
|
}
|
|
14019
14031
|
}
|
|
14020
14032
|
let CreateOwnRelationshipTemplateUseCase = class CreateOwnRelationshipTemplateUseCase extends common_1.UseCase {
|
|
@@ -14027,6 +14039,7 @@ let CreateOwnRelationshipTemplateUseCase = class CreateOwnRelationshipTemplateUs
|
|
|
14027
14039
|
const relationshipTemplate = await this.templateController.sendRelationshipTemplate({
|
|
14028
14040
|
content: request.content,
|
|
14029
14041
|
expiresAt: transport_1.CoreDate.from(request.expiresAt),
|
|
14042
|
+
maxNumberOfAllocations: request.maxNumberOfAllocations,
|
|
14030
14043
|
maxNumberOfRelationships: request.maxNumberOfRelationships
|
|
14031
14044
|
});
|
|
14032
14045
|
await this.accountController.syncDatawallet();
|
|
@@ -14309,6 +14322,7 @@ GetRelationshipTemplatesUseCase.queryTranslator = new docdb_querytranslator_1.Qu
|
|
|
14309
14322
|
[(0, ts_simple_nameof_1.nameof)((r) => r.expiresAt)]: true,
|
|
14310
14323
|
[(0, ts_simple_nameof_1.nameof)((r) => r.createdBy)]: true,
|
|
14311
14324
|
[(0, ts_simple_nameof_1.nameof)((r) => r.createdByDevice)]: true,
|
|
14325
|
+
[(0, ts_simple_nameof_1.nameof)((r) => r.maxNumberOfAllocations)]: true,
|
|
14312
14326
|
[(0, ts_simple_nameof_1.nameof)((r) => r.maxNumberOfRelationships)]: true
|
|
14313
14327
|
},
|
|
14314
14328
|
alias: {
|
|
@@ -14317,6 +14331,7 @@ GetRelationshipTemplatesUseCase.queryTranslator = new docdb_querytranslator_1.Qu
|
|
|
14317
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)}`,
|
|
14318
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)}`,
|
|
14319
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)}`,
|
|
14320
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)}`
|
|
14321
14336
|
}
|
|
14322
14337
|
});
|
|
@@ -14474,6 +14489,7 @@ class RelationshipTemplateMapper {
|
|
|
14474
14489
|
createdAt: template.cache.createdAt.toString(),
|
|
14475
14490
|
content: template.cache.content.toJSON(),
|
|
14476
14491
|
expiresAt: template.cache.expiresAt?.toString(),
|
|
14492
|
+
maxNumberOfAllocations: template.cache.maxNumberOfAllocations,
|
|
14477
14493
|
maxNumberOfRelationships: template.cache.maxNumberOfRelationships
|
|
14478
14494
|
};
|
|
14479
14495
|
}
|