@nmshd/runtime 2.0.0-alpha.11 → 2.0.0-alpha.12

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 (33) hide show
  1. package/dist/buildInformation.js +5 -5
  2. package/dist/useCases/common/Schemas.js +191 -222
  3. package/dist/useCases/common/Schemas.js.map +1 -1
  4. package/dist/useCases/consumption/attributes/CreateAttribute.d.ts +7 -6
  5. package/dist/useCases/consumption/attributes/CreateAttribute.js +13 -9
  6. package/dist/useCases/consumption/attributes/CreateAttribute.js.map +1 -1
  7. package/dist/useCases/consumption/attributes/CreateShareAttributeCopy.d.ts +17 -6
  8. package/dist/useCases/consumption/attributes/CreateShareAttributeCopy.js +15 -8
  9. package/dist/useCases/consumption/attributes/CreateShareAttributeCopy.js.map +1 -1
  10. package/dist/useCases/consumption/attributes/DeleteAttribute.d.ts +7 -4
  11. package/dist/useCases/consumption/attributes/DeleteAttribute.js +9 -6
  12. package/dist/useCases/consumption/attributes/DeleteAttribute.js.map +1 -1
  13. package/dist/useCases/consumption/attributes/ExtendedAttributeValue.d.ts +10 -0
  14. package/dist/useCases/consumption/attributes/ExtendedAttributeValue.js +3 -0
  15. package/dist/useCases/consumption/attributes/ExtendedAttributeValue.js.map +1 -0
  16. package/dist/useCases/consumption/attributes/GetAttribute.d.ts +7 -4
  17. package/dist/useCases/consumption/attributes/GetAttribute.js +9 -6
  18. package/dist/useCases/consumption/attributes/GetAttribute.js.map +1 -1
  19. package/dist/useCases/consumption/attributes/GetAttributes.d.ts +3 -7
  20. package/dist/useCases/consumption/attributes/GetAttributes.js +8 -16
  21. package/dist/useCases/consumption/attributes/GetAttributes.js.map +1 -1
  22. package/dist/useCases/consumption/attributes/SucceedAttribute.d.ts +11 -6
  23. package/dist/useCases/consumption/attributes/SucceedAttribute.js +14 -9
  24. package/dist/useCases/consumption/attributes/SucceedAttribute.js.map +1 -1
  25. package/dist/useCases/consumption/attributes/UpdateAttribute.d.ts +11 -6
  26. package/dist/useCases/consumption/attributes/UpdateAttribute.js +14 -14
  27. package/dist/useCases/consumption/attributes/UpdateAttribute.js.map +1 -1
  28. package/dist/useCases/consumption/requests/CompleteIncomingRequest.d.ts +1 -1
  29. package/lib-web/nmshd.runtime.js +278 -295
  30. package/lib-web/nmshd.runtime.js.map +1 -1
  31. package/lib-web/nmshd.runtime.min.js +3 -3
  32. package/lib-web/nmshd.runtime.min.js.map +1 -1
  33. package/package.json +3 -3
@@ -7,11 +7,11 @@ const content_1 = require("@nmshd/content");
7
7
  const crypto_1 = require("@nmshd/crypto");
8
8
  const transport_1 = require("@nmshd/transport");
9
9
  exports.buildInformation = {
10
- version: "2.0.0-alpha.11",
11
- build: "58",
12
- date: "2022-05-30T12:40:27+00:00",
13
- commit: "9e5ded1a4fff9a33ae25b60c4e5602b47eb30c4f",
14
- 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.17","@nmshd/content":"2.0.0-alpha.24","@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"},
10
+ version: "2.0.0-alpha.12",
11
+ build: "59",
12
+ date: "2022-06-01T08:00:48+00:00",
13
+ commit: "103f4d4d1bdefc1c691e6b7c6c7c6062ad5672c3",
14
+ 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.18","@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"},
15
15
  libraries: {
16
16
  serval: ts_serval_1.buildInformation,
17
17
  consumption: consumption_1.buildInformation,
@@ -47,27 +47,15 @@ exports.CreateAttributeRequest = {
47
47
  "$ref": "#/definitions/CreateAttributeRequest",
48
48
  "definitions": {
49
49
  "CreateAttributeRequest": {
50
- "type": "object",
51
- "properties": {
52
- "params": {
53
- "$ref": "#/definitions/ICreateConsumptionAttributeParams"
54
- }
55
- },
56
- "required": [
57
- "params"
58
- ],
59
- "additionalProperties": false
60
- },
61
- "ICreateConsumptionAttributeParams": {
62
50
  "type": "object",
63
51
  "properties": {
64
52
  "content": {
65
53
  "anyOf": [
66
54
  {
67
- "$ref": "#/definitions/IIdentityAttribute"
55
+ "$ref": "#/definitions/ExtendedIdentityAttributeJSON"
68
56
  },
69
57
  {
70
- "$ref": "#/definitions/IRelationshipAttribute"
58
+ "$ref": "#/definitions/ExtendedRelationshipAttributeJSON"
71
59
  }
72
60
  ]
73
61
  }
@@ -77,20 +65,43 @@ exports.CreateAttributeRequest = {
77
65
  ],
78
66
  "additionalProperties": false
79
67
  },
80
- "IIdentityAttribute": {
68
+ "ExtendedIdentityAttributeJSON": {
81
69
  "type": "object",
82
70
  "properties": {
71
+ "@type": {
72
+ "type": "string"
73
+ },
74
+ "@context": {
75
+ "type": "string"
76
+ },
77
+ "@version": {
78
+ "type": "string"
79
+ },
83
80
  "owner": {
84
- "$ref": "#/definitions/ICoreAddress"
81
+ "type": "string"
85
82
  },
86
83
  "validFrom": {
87
- "$ref": "#/definitions/ICoreDate"
84
+ "type": "string"
88
85
  },
89
86
  "validTo": {
90
- "$ref": "#/definitions/ICoreDate"
87
+ "type": "string"
91
88
  },
92
89
  "value": {
93
- "$ref": "#/definitions/IAbstractAttributeValue"
90
+ "type": "object",
91
+ "properties": {
92
+ "@type": {
93
+ "type": "string"
94
+ },
95
+ "@context": {
96
+ "type": "string"
97
+ },
98
+ "@version": {
99
+ "type": "string"
100
+ }
101
+ },
102
+ "required": [
103
+ "@type"
104
+ ]
94
105
  },
95
106
  "tags": {
96
107
  "type": "array",
@@ -100,54 +111,49 @@ exports.CreateAttributeRequest = {
100
111
  }
101
112
  },
102
113
  "required": [
114
+ "@type",
103
115
  "owner",
104
116
  "value"
105
117
  ],
106
118
  "additionalProperties": false
107
119
  },
108
- "ICoreAddress": {
120
+ "ExtendedRelationshipAttributeJSON": {
109
121
  "type": "object",
110
122
  "properties": {
111
- "address": {
123
+ "@type": {
112
124
  "type": "string"
113
- }
114
- },
115
- "required": [
116
- "address"
117
- ],
118
- "additionalProperties": false
119
- },
120
- "ICoreDate": {
121
- "type": "object",
122
- "properties": {
123
- "date": {
125
+ },
126
+ "@context": {
124
127
  "type": "string"
125
- }
126
- },
127
- "required": [
128
- "date"
129
- ],
130
- "additionalProperties": false
131
- },
132
- "IAbstractAttributeValue": {
133
- "type": "object",
134
- "additionalProperties": false,
135
- "properties": {}
136
- },
137
- "IRelationshipAttribute": {
138
- "type": "object",
139
- "properties": {
128
+ },
129
+ "@version": {
130
+ "type": "string"
131
+ },
140
132
  "owner": {
141
- "$ref": "#/definitions/ICoreAddress"
133
+ "type": "string"
142
134
  },
143
135
  "validFrom": {
144
- "$ref": "#/definitions/ICoreDate"
136
+ "type": "string"
145
137
  },
146
138
  "validTo": {
147
- "$ref": "#/definitions/ICoreDate"
139
+ "type": "string"
148
140
  },
149
141
  "value": {
150
- "$ref": "#/definitions/IAbstractAttributeValue"
142
+ "type": "object",
143
+ "properties": {
144
+ "@type": {
145
+ "type": "string"
146
+ },
147
+ "@context": {
148
+ "type": "string"
149
+ },
150
+ "@version": {
151
+ "type": "string"
152
+ }
153
+ },
154
+ "required": [
155
+ "@type"
156
+ ]
151
157
  },
152
158
  "key": {
153
159
  "type": "string"
@@ -160,6 +166,7 @@ exports.CreateAttributeRequest = {
160
166
  }
161
167
  },
162
168
  "required": [
169
+ "@type",
163
170
  "confidentiality",
164
171
  "key",
165
172
  "owner",
@@ -182,28 +189,19 @@ exports.CreateShareAttributeCopyRequest = {
182
189
  "$ref": "#/definitions/CreateShareAttributeCopyRequest",
183
190
  "definitions": {
184
191
  "CreateShareAttributeCopyRequest": {
185
- "type": "object",
186
- "properties": {
187
- "params": {
188
- "$ref": "#/definitions/ICreateSharedConsumptionAttributeCopyParams"
189
- }
190
- },
191
- "required": [
192
- "params"
193
- ],
194
- "additionalProperties": false
195
- },
196
- "ICreateSharedConsumptionAttributeCopyParams": {
197
192
  "type": "object",
198
193
  "properties": {
199
194
  "attributeId": {
200
- "$ref": "#/definitions/ICoreId"
195
+ "type": "string",
196
+ "pattern": "ATT[A-Za-z0-9]{17}"
201
197
  },
202
198
  "peer": {
203
- "$ref": "#/definitions/ICoreAddress"
199
+ "type": "string",
200
+ "pattern": "[a-zA-Z1-9]{35,36}"
204
201
  },
205
202
  "requestReference": {
206
- "$ref": "#/definitions/ICoreId"
203
+ "type": "string",
204
+ "pattern": "REQ[A-Za-z0-9]{17}"
207
205
  }
208
206
  },
209
207
  "required": [
@@ -212,30 +210,6 @@ exports.CreateShareAttributeCopyRequest = {
212
210
  "requestReference"
213
211
  ],
214
212
  "additionalProperties": false
215
- },
216
- "ICoreId": {
217
- "type": "object",
218
- "properties": {
219
- "id": {
220
- "type": "string"
221
- }
222
- },
223
- "required": [
224
- "id"
225
- ],
226
- "additionalProperties": false
227
- },
228
- "ICoreAddress": {
229
- "type": "object",
230
- "properties": {
231
- "address": {
232
- "type": "string"
233
- }
234
- },
235
- "required": [
236
- "address"
237
- ],
238
- "additionalProperties": false
239
213
  }
240
214
  }
241
215
  };
@@ -247,7 +221,8 @@ exports.DeleteAttributeRequest = {
247
221
  "type": "object",
248
222
  "properties": {
249
223
  "id": {
250
- "type": "string"
224
+ "type": "string",
225
+ "pattern": "ATT[A-Za-z0-9]{17}"
251
226
  }
252
227
  },
253
228
  "required": [
@@ -265,7 +240,8 @@ exports.GetAttributeRequest = {
265
240
  "type": "object",
266
241
  "properties": {
267
242
  "id": {
268
- "type": "string"
243
+ "type": "string",
244
+ "pattern": "ATT[A-Za-z0-9]{17}"
269
245
  }
270
246
  },
271
247
  "required": [
@@ -286,9 +262,6 @@ exports.GetAttributesRequest = {
286
262
  "$ref": "#/definitions/ConsumptionAttributeQuery"
287
263
  }
288
264
  },
289
- "required": [
290
- "query"
291
- ],
292
265
  "additionalProperties": false
293
266
  },
294
267
  "ConsumptionAttributeQuery": {
@@ -378,32 +351,21 @@ exports.SucceedAttributeRequest = {
378
351
  "$ref": "#/definitions/SucceedAttributeRequest",
379
352
  "definitions": {
380
353
  "SucceedAttributeRequest": {
381
- "type": "object",
382
- "properties": {
383
- "params": {
384
- "$ref": "#/definitions/ISucceedConsumptionAttributeParams"
385
- }
386
- },
387
- "required": [
388
- "params"
389
- ],
390
- "additionalProperties": false
391
- },
392
- "ISucceedConsumptionAttributeParams": {
393
354
  "type": "object",
394
355
  "properties": {
395
356
  "successorContent": {
396
357
  "anyOf": [
397
358
  {
398
- "$ref": "#/definitions/IIdentityAttribute"
359
+ "$ref": "#/definitions/ExtendedIdentityAttributeJSON"
399
360
  },
400
361
  {
401
- "$ref": "#/definitions/IRelationshipAttribute"
362
+ "$ref": "#/definitions/ExtendedRelationshipAttributeJSON"
402
363
  }
403
364
  ]
404
365
  },
405
366
  "succeeds": {
406
- "$ref": "#/definitions/ICoreId"
367
+ "type": "string",
368
+ "pattern": "ATT[A-Za-z0-9]{17}"
407
369
  }
408
370
  },
409
371
  "required": [
@@ -412,20 +374,43 @@ exports.SucceedAttributeRequest = {
412
374
  ],
413
375
  "additionalProperties": false
414
376
  },
415
- "IIdentityAttribute": {
377
+ "ExtendedIdentityAttributeJSON": {
416
378
  "type": "object",
417
379
  "properties": {
380
+ "@type": {
381
+ "type": "string"
382
+ },
383
+ "@context": {
384
+ "type": "string"
385
+ },
386
+ "@version": {
387
+ "type": "string"
388
+ },
418
389
  "owner": {
419
- "$ref": "#/definitions/ICoreAddress"
390
+ "type": "string"
420
391
  },
421
392
  "validFrom": {
422
- "$ref": "#/definitions/ICoreDate"
393
+ "type": "string"
423
394
  },
424
395
  "validTo": {
425
- "$ref": "#/definitions/ICoreDate"
396
+ "type": "string"
426
397
  },
427
398
  "value": {
428
- "$ref": "#/definitions/IAbstractAttributeValue"
399
+ "type": "object",
400
+ "properties": {
401
+ "@type": {
402
+ "type": "string"
403
+ },
404
+ "@context": {
405
+ "type": "string"
406
+ },
407
+ "@version": {
408
+ "type": "string"
409
+ }
410
+ },
411
+ "required": [
412
+ "@type"
413
+ ]
429
414
  },
430
415
  "tags": {
431
416
  "type": "array",
@@ -435,54 +420,49 @@ exports.SucceedAttributeRequest = {
435
420
  }
436
421
  },
437
422
  "required": [
423
+ "@type",
438
424
  "owner",
439
425
  "value"
440
426
  ],
441
427
  "additionalProperties": false
442
428
  },
443
- "ICoreAddress": {
429
+ "ExtendedRelationshipAttributeJSON": {
444
430
  "type": "object",
445
431
  "properties": {
446
- "address": {
432
+ "@type": {
447
433
  "type": "string"
448
- }
449
- },
450
- "required": [
451
- "address"
452
- ],
453
- "additionalProperties": false
454
- },
455
- "ICoreDate": {
456
- "type": "object",
457
- "properties": {
458
- "date": {
434
+ },
435
+ "@context": {
459
436
  "type": "string"
460
- }
461
- },
462
- "required": [
463
- "date"
464
- ],
465
- "additionalProperties": false
466
- },
467
- "IAbstractAttributeValue": {
468
- "type": "object",
469
- "additionalProperties": false,
470
- "properties": {}
471
- },
472
- "IRelationshipAttribute": {
473
- "type": "object",
474
- "properties": {
437
+ },
438
+ "@version": {
439
+ "type": "string"
440
+ },
475
441
  "owner": {
476
- "$ref": "#/definitions/ICoreAddress"
442
+ "type": "string"
477
443
  },
478
444
  "validFrom": {
479
- "$ref": "#/definitions/ICoreDate"
445
+ "type": "string"
480
446
  },
481
447
  "validTo": {
482
- "$ref": "#/definitions/ICoreDate"
448
+ "type": "string"
483
449
  },
484
450
  "value": {
485
- "$ref": "#/definitions/IAbstractAttributeValue"
451
+ "type": "object",
452
+ "properties": {
453
+ "@type": {
454
+ "type": "string"
455
+ },
456
+ "@context": {
457
+ "type": "string"
458
+ },
459
+ "@version": {
460
+ "type": "string"
461
+ }
462
+ },
463
+ "required": [
464
+ "@type"
465
+ ]
486
466
  },
487
467
  "key": {
488
468
  "type": "string"
@@ -495,6 +475,7 @@ exports.SucceedAttributeRequest = {
495
475
  }
496
476
  },
497
477
  "required": [
478
+ "@type",
498
479
  "confidentiality",
499
480
  "key",
500
481
  "owner",
@@ -509,18 +490,6 @@ exports.SucceedAttributeRequest = {
509
490
  "private",
510
491
  "protected"
511
492
  ]
512
- },
513
- "ICoreId": {
514
- "type": "object",
515
- "properties": {
516
- "id": {
517
- "type": "string"
518
- }
519
- },
520
- "required": [
521
- "id"
522
- ],
523
- "additionalProperties": false
524
493
  }
525
494
  }
526
495
  };
@@ -529,67 +498,66 @@ exports.UpdateAttributeRequest = {
529
498
  "$ref": "#/definitions/UpdateAttributeRequest",
530
499
  "definitions": {
531
500
  "UpdateAttributeRequest": {
532
- "type": "object",
533
- "properties": {
534
- "params": {
535
- "$ref": "#/definitions/UpdateConsumptionAttributeParams"
536
- }
537
- },
538
- "required": [
539
- "params"
540
- ],
541
- "additionalProperties": false
542
- },
543
- "UpdateConsumptionAttributeParams": {
544
501
  "type": "object",
545
502
  "properties": {
546
503
  "id": {
547
- "$ref": "#/definitions/CoreId"
504
+ "type": "string",
505
+ "pattern": "ATT[A-Za-z0-9]{17}"
548
506
  },
549
507
  "content": {
550
508
  "anyOf": [
551
509
  {
552
- "$ref": "#/definitions/IdentityAttribute"
510
+ "$ref": "#/definitions/ExtendedIdentityAttributeJSON"
553
511
  },
554
512
  {
555
- "$ref": "#/definitions/RelationshipAttribute"
513
+ "$ref": "#/definitions/ExtendedRelationshipAttributeJSON"
556
514
  }
557
515
  ]
558
516
  }
559
517
  },
560
518
  "required": [
561
- "content",
562
- "id"
519
+ "id",
520
+ "content"
563
521
  ],
564
522
  "additionalProperties": false
565
523
  },
566
- "CoreId": {
524
+ "ExtendedIdentityAttributeJSON": {
567
525
  "type": "object",
568
526
  "properties": {
569
- "id": {
527
+ "@type": {
570
528
  "type": "string"
571
- }
572
- },
573
- "required": [
574
- "id"
575
- ],
576
- "additionalProperties": false,
577
- "description": "A CoreId is any kind of identifier we have in the system."
578
- },
579
- "IdentityAttribute": {
580
- "type": "object",
581
- "properties": {
529
+ },
530
+ "@context": {
531
+ "type": "string"
532
+ },
533
+ "@version": {
534
+ "type": "string"
535
+ },
582
536
  "owner": {
583
- "$ref": "#/definitions/CoreAddress"
537
+ "type": "string"
584
538
  },
585
539
  "validFrom": {
586
- "$ref": "#/definitions/CoreDate"
540
+ "type": "string"
587
541
  },
588
542
  "validTo": {
589
- "$ref": "#/definitions/CoreDate"
543
+ "type": "string"
590
544
  },
591
545
  "value": {
592
- "$ref": "#/definitions/AbstractAttributeValue"
546
+ "type": "object",
547
+ "properties": {
548
+ "@type": {
549
+ "type": "string"
550
+ },
551
+ "@context": {
552
+ "type": "string"
553
+ },
554
+ "@version": {
555
+ "type": "string"
556
+ }
557
+ },
558
+ "required": [
559
+ "@type"
560
+ ]
593
561
  },
594
562
  "tags": {
595
563
  "type": "array",
@@ -599,48 +567,49 @@ exports.UpdateAttributeRequest = {
599
567
  }
600
568
  },
601
569
  "required": [
570
+ "@type",
602
571
  "owner",
603
572
  "value"
604
573
  ],
605
574
  "additionalProperties": false
606
575
  },
607
- "CoreAddress": {
576
+ "ExtendedRelationshipAttributeJSON": {
608
577
  "type": "object",
609
578
  "properties": {
610
- "address": {
579
+ "@type": {
611
580
  "type": "string"
612
- }
613
- },
614
- "required": [
615
- "address"
616
- ],
617
- "additionalProperties": false,
618
- "description": "A CoreAddress is the primariy technical identitier of an account."
619
- },
620
- "CoreDate": {
621
- "type": "object",
622
- "additionalProperties": false,
623
- "properties": {}
624
- },
625
- "AbstractAttributeValue": {
626
- "type": "object",
627
- "additionalProperties": false,
628
- "properties": {}
629
- },
630
- "RelationshipAttribute": {
631
- "type": "object",
632
- "properties": {
581
+ },
582
+ "@context": {
583
+ "type": "string"
584
+ },
585
+ "@version": {
586
+ "type": "string"
587
+ },
633
588
  "owner": {
634
- "$ref": "#/definitions/CoreAddress"
589
+ "type": "string"
635
590
  },
636
591
  "validFrom": {
637
- "$ref": "#/definitions/CoreDate"
592
+ "type": "string"
638
593
  },
639
594
  "validTo": {
640
- "$ref": "#/definitions/CoreDate"
595
+ "type": "string"
641
596
  },
642
597
  "value": {
643
- "$ref": "#/definitions/AbstractAttributeValue"
598
+ "type": "object",
599
+ "properties": {
600
+ "@type": {
601
+ "type": "string"
602
+ },
603
+ "@context": {
604
+ "type": "string"
605
+ },
606
+ "@version": {
607
+ "type": "string"
608
+ }
609
+ },
610
+ "required": [
611
+ "@type"
612
+ ]
644
613
  },
645
614
  "key": {
646
615
  "type": "string"
@@ -653,8 +622,8 @@ exports.UpdateAttributeRequest = {
653
622
  }
654
623
  },
655
624
  "required": [
625
+ "@type",
656
626
  "confidentiality",
657
- "isTechnical",
658
627
  "key",
659
628
  "owner",
660
629
  "value"
@@ -1209,7 +1178,7 @@ exports.CompleteIncomingRequestRequest = {
1209
1178
  "properties": {
1210
1179
  "requestId": {
1211
1180
  "type": "string",
1212
- "pattern": "REQ[A-Za-z0-9]{14}"
1181
+ "pattern": "REQ[A-Za-z0-9]{17}"
1213
1182
  },
1214
1183
  "responseSourceId": {
1215
1184
  "type": "string",