@twin.org/auditable-item-stream-service 0.0.3-next.2 → 0.0.3-next.21
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/README.md +2 -2
- package/dist/es/auditableItemStreamRoutes.js +471 -130
- package/dist/es/auditableItemStreamRoutes.js.map +1 -1
- package/dist/es/auditableItemStreamService.js +330 -138
- package/dist/es/auditableItemStreamService.js.map +1 -1
- package/dist/es/entities/auditableItemStream.js +20 -6
- package/dist/es/entities/auditableItemStream.js.map +1 -1
- package/dist/es/models/IAuditableItemStreamServiceConstructorOptions.js.map +1 -1
- package/dist/es/models/IAuditableItemStreamServiceContext.js.map +1 -1
- package/dist/types/auditableItemStreamRoutes.d.ts +33 -1
- package/dist/types/auditableItemStreamService.d.ts +44 -37
- package/dist/types/entities/auditableItemStream.d.ts +12 -3
- package/dist/types/models/IAuditableItemStreamServiceConstructorOptions.d.ts +4 -0
- package/dist/types/models/IAuditableItemStreamServiceContext.d.ts +4 -0
- package/docs/changelog.md +355 -77
- package/docs/examples.md +211 -1
- package/docs/open-api/spec.json +839 -177
- package/docs/reference/classes/AuditableItemStream.md +32 -16
- package/docs/reference/classes/AuditableItemStreamEntry.md +13 -13
- package/docs/reference/classes/AuditableItemStreamService.md +107 -84
- package/docs/reference/functions/auditableItemStreamClose.md +31 -0
- package/docs/reference/functions/auditableItemStreamListEntriesNoStream.md +31 -0
- package/docs/reference/functions/auditableItemStreamListEntryObjectsNoStream.md +31 -0
- package/docs/reference/functions/auditableItemStreamRemoveProof.md +31 -0
- package/docs/reference/index.md +4 -0
- package/docs/reference/interfaces/IAuditableItemStreamServiceConfig.md +2 -2
- package/docs/reference/interfaces/IAuditableItemStreamServiceConstructorOptions.md +18 -10
- package/locales/en.json +6 -1
- package/package.json +6 -5
package/docs/open-api/spec.json
CHANGED
|
@@ -39,26 +39,36 @@
|
|
|
39
39
|
"content": {
|
|
40
40
|
"application/json": {
|
|
41
41
|
"schema": {
|
|
42
|
-
"$ref": "
|
|
42
|
+
"$ref": "https://schema.twindev.org/ais/AuditableItemStreamBase"
|
|
43
43
|
},
|
|
44
44
|
"examples": {
|
|
45
45
|
"auditableItemStreamCreateRequestExample": {
|
|
46
46
|
"value": {
|
|
47
|
+
"@context": [
|
|
48
|
+
"https://schema.org",
|
|
49
|
+
"https://schema.twindev.org/ais/",
|
|
50
|
+
"https://schema.twindev.org/common/"
|
|
51
|
+
],
|
|
52
|
+
"type": "AuditableItemStream",
|
|
47
53
|
"annotationObject": {
|
|
48
54
|
"@context": "https://schema.org",
|
|
49
55
|
"@type": "Note",
|
|
50
56
|
"content": "This is a simple note"
|
|
51
57
|
},
|
|
52
|
-
"entries":
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
58
|
+
"entries": {
|
|
59
|
+
"type": "ItemList",
|
|
60
|
+
"itemListElement": [
|
|
61
|
+
{
|
|
62
|
+
"type": "AuditableItemStreamEntry",
|
|
63
|
+
"entryObject": {
|
|
64
|
+
"@context": "https://schema.org",
|
|
65
|
+
"@type": "Event",
|
|
66
|
+
"startDate": "2011-04-09T20:00:00Z",
|
|
67
|
+
"description": "A description of the event"
|
|
68
|
+
}
|
|
59
69
|
}
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
]
|
|
71
|
+
}
|
|
62
72
|
}
|
|
63
73
|
}
|
|
64
74
|
}
|
|
@@ -73,7 +83,7 @@
|
|
|
73
83
|
"schema": {
|
|
74
84
|
"type": "string"
|
|
75
85
|
},
|
|
76
|
-
"description": "e.g. ais
|
|
86
|
+
"description": "e.g. ais%3A1234567890"
|
|
77
87
|
}
|
|
78
88
|
}
|
|
79
89
|
},
|
|
@@ -158,7 +168,6 @@
|
|
|
158
168
|
"in": "query",
|
|
159
169
|
"required": false,
|
|
160
170
|
"schema": {
|
|
161
|
-
"type": "string",
|
|
162
171
|
"enum": [
|
|
163
172
|
"dateCreated",
|
|
164
173
|
"dateModified"
|
|
@@ -239,6 +248,7 @@
|
|
|
239
248
|
"itemListElement": [
|
|
240
249
|
{
|
|
241
250
|
"@context": [
|
|
251
|
+
"https://schema.org",
|
|
242
252
|
"https://schema.twindev.org/ais/",
|
|
243
253
|
"https://schema.twindev.org/common/"
|
|
244
254
|
],
|
|
@@ -253,10 +263,10 @@
|
|
|
253
263
|
},
|
|
254
264
|
"organizationIdentity": "did:iota:1234567890",
|
|
255
265
|
"proofId": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
256
|
-
"immutableInterval": 10
|
|
266
|
+
"immutableInterval": 10,
|
|
267
|
+
"numberOfItems": 0
|
|
257
268
|
}
|
|
258
|
-
]
|
|
259
|
-
"nextItem": "1"
|
|
269
|
+
]
|
|
260
270
|
}
|
|
261
271
|
}
|
|
262
272
|
}
|
|
@@ -280,6 +290,7 @@
|
|
|
280
290
|
"itemListElement": [
|
|
281
291
|
{
|
|
282
292
|
"@context": [
|
|
293
|
+
"https://schema.org",
|
|
283
294
|
"https://schema.twindev.org/ais/",
|
|
284
295
|
"https://schema.twindev.org/common/"
|
|
285
296
|
],
|
|
@@ -294,10 +305,10 @@
|
|
|
294
305
|
},
|
|
295
306
|
"organizationIdentity": "did:iota:1234567890",
|
|
296
307
|
"proofId": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
297
|
-
"immutableInterval": 10
|
|
308
|
+
"immutableInterval": 10,
|
|
309
|
+
"numberOfItems": 0
|
|
298
310
|
}
|
|
299
|
-
]
|
|
300
|
-
"nextItem": "1"
|
|
311
|
+
]
|
|
301
312
|
}
|
|
302
313
|
}
|
|
303
314
|
}
|
|
@@ -412,9 +423,27 @@
|
|
|
412
423
|
"style": "simple",
|
|
413
424
|
"example": "ais:1234567890"
|
|
414
425
|
},
|
|
426
|
+
{
|
|
427
|
+
"name": "cursor",
|
|
428
|
+
"description": "Cursor to use for next chunk of entries.",
|
|
429
|
+
"in": "query",
|
|
430
|
+
"required": false,
|
|
431
|
+
"schema": {
|
|
432
|
+
"type": "string"
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"name": "limit",
|
|
437
|
+
"description": "Limit the number of entries to return, only applicable if includeEntries is true.",
|
|
438
|
+
"in": "query",
|
|
439
|
+
"required": false,
|
|
440
|
+
"schema": {
|
|
441
|
+
"type": "string"
|
|
442
|
+
}
|
|
443
|
+
},
|
|
415
444
|
{
|
|
416
445
|
"name": "includeEntries",
|
|
417
|
-
"description": "Whether to include the entries, defaults to false
|
|
446
|
+
"description": "Whether to include the entries, defaults to false.\nThe entries will be limited to the first page of entries in date descending order.\nIf you want to get more entries you can use the returned cursor with the get entries method.",
|
|
418
447
|
"in": "query",
|
|
419
448
|
"required": false,
|
|
420
449
|
"schema": {
|
|
@@ -476,6 +505,7 @@
|
|
|
476
505
|
"auditableItemStreamGetResponseExample": {
|
|
477
506
|
"value": {
|
|
478
507
|
"@context": [
|
|
508
|
+
"https://schema.org",
|
|
479
509
|
"https://schema.twindev.org/ais/",
|
|
480
510
|
"https://schema.twindev.org/common/"
|
|
481
511
|
],
|
|
@@ -491,25 +521,29 @@
|
|
|
491
521
|
"organizationIdentity": "did:iota:1234567890",
|
|
492
522
|
"proofId": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
493
523
|
"immutableInterval": 10,
|
|
494
|
-
"
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
"
|
|
507
|
-
"
|
|
508
|
-
"
|
|
509
|
-
|
|
524
|
+
"numberOfItems": 1,
|
|
525
|
+
"entries": {
|
|
526
|
+
"type": "ItemList",
|
|
527
|
+
"itemListElement": [
|
|
528
|
+
{
|
|
529
|
+
"@context": [
|
|
530
|
+
"https://schema.twindev.org/ais/",
|
|
531
|
+
"https://schema.twindev.org/common/"
|
|
532
|
+
],
|
|
533
|
+
"type": "AuditableItemStreamEntry",
|
|
534
|
+
"id": "tst:1234567890",
|
|
535
|
+
"dateCreated": "2024-08-22T11:55:16.271Z",
|
|
536
|
+
"proofId": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
537
|
+
"index": 0,
|
|
538
|
+
"entryObject": {
|
|
539
|
+
"@context": "https://schema.org",
|
|
540
|
+
"@type": "Event",
|
|
541
|
+
"startDate": "2011-04-09T20:00:00Z",
|
|
542
|
+
"description": "A description of the event"
|
|
543
|
+
}
|
|
510
544
|
}
|
|
511
|
-
|
|
512
|
-
|
|
545
|
+
]
|
|
546
|
+
}
|
|
513
547
|
}
|
|
514
548
|
}
|
|
515
549
|
}
|
|
@@ -522,6 +556,7 @@
|
|
|
522
556
|
"auditableItemStreamJsonLdGetResponseExample": {
|
|
523
557
|
"value": {
|
|
524
558
|
"@context": [
|
|
559
|
+
"https://schema.org",
|
|
525
560
|
"https://schema.twindev.org/ais/",
|
|
526
561
|
"https://schema.twindev.org/common/"
|
|
527
562
|
],
|
|
@@ -537,25 +572,29 @@
|
|
|
537
572
|
"organizationIdentity": "did:iota:1234567890",
|
|
538
573
|
"proofId": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
539
574
|
"immutableInterval": 10,
|
|
540
|
-
"
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
"
|
|
553
|
-
"
|
|
554
|
-
"
|
|
555
|
-
|
|
575
|
+
"numberOfItems": 1,
|
|
576
|
+
"entries": {
|
|
577
|
+
"type": "ItemList",
|
|
578
|
+
"itemListElement": [
|
|
579
|
+
{
|
|
580
|
+
"@context": [
|
|
581
|
+
"https://schema.twindev.org/ais/",
|
|
582
|
+
"https://schema.twindev.org/common/"
|
|
583
|
+
],
|
|
584
|
+
"type": "AuditableItemStreamEntry",
|
|
585
|
+
"id": "tst:1234567890",
|
|
586
|
+
"dateCreated": "2024-08-22T11:55:16.271Z",
|
|
587
|
+
"proofId": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
588
|
+
"index": 0,
|
|
589
|
+
"entryObject": {
|
|
590
|
+
"@context": "https://schema.org",
|
|
591
|
+
"@type": "Event",
|
|
592
|
+
"startDate": "2011-04-09T20:00:00Z",
|
|
593
|
+
"description": "A description of the event"
|
|
594
|
+
}
|
|
556
595
|
}
|
|
557
|
-
|
|
558
|
-
|
|
596
|
+
]
|
|
597
|
+
}
|
|
559
598
|
}
|
|
560
599
|
}
|
|
561
600
|
}
|
|
@@ -685,6 +724,12 @@
|
|
|
685
724
|
"examples": {
|
|
686
725
|
"auditableItemStreamUpdateRequestExample": {
|
|
687
726
|
"value": {
|
|
727
|
+
"@context": [
|
|
728
|
+
"https://schema.org",
|
|
729
|
+
"https://schema.twindev.org/ais/",
|
|
730
|
+
"https://schema.twindev.org/common/"
|
|
731
|
+
],
|
|
732
|
+
"type": "AuditableItemStream",
|
|
688
733
|
"annotationObject": {
|
|
689
734
|
"@context": "https://schema.org",
|
|
690
735
|
"@type": "Note",
|
|
@@ -887,7 +932,119 @@
|
|
|
887
932
|
}
|
|
888
933
|
}
|
|
889
934
|
}
|
|
890
|
-
}
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
"/auditable-item-stream/{id}/close": {
|
|
938
|
+
"put": {
|
|
939
|
+
"operationId": "auditableItemStreamClose",
|
|
940
|
+
"summary": "Close a stream",
|
|
941
|
+
"tags": [
|
|
942
|
+
"Auditable Item Stream"
|
|
943
|
+
],
|
|
944
|
+
"parameters": [
|
|
945
|
+
{
|
|
946
|
+
"name": "id",
|
|
947
|
+
"description": "The id of the stream to close.",
|
|
948
|
+
"in": "path",
|
|
949
|
+
"required": true,
|
|
950
|
+
"schema": {
|
|
951
|
+
"type": "string"
|
|
952
|
+
},
|
|
953
|
+
"style": "simple",
|
|
954
|
+
"example": "ais:1234567890"
|
|
955
|
+
}
|
|
956
|
+
],
|
|
957
|
+
"security": [
|
|
958
|
+
{
|
|
959
|
+
"jwtBearerAuthScheme": []
|
|
960
|
+
}
|
|
961
|
+
],
|
|
962
|
+
"responses": {
|
|
963
|
+
"204": {
|
|
964
|
+
"description": "The rest request ended in success with no data."
|
|
965
|
+
},
|
|
966
|
+
"400": {
|
|
967
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
968
|
+
"content": {
|
|
969
|
+
"application/json": {
|
|
970
|
+
"schema": {
|
|
971
|
+
"$ref": "#/components/schemas/Error"
|
|
972
|
+
},
|
|
973
|
+
"examples": {
|
|
974
|
+
"exampleResponse": {
|
|
975
|
+
"value": {
|
|
976
|
+
"name": "GeneralError",
|
|
977
|
+
"message": "errorMessage",
|
|
978
|
+
"properties": {
|
|
979
|
+
"foo": "bar"
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
"401": {
|
|
988
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
989
|
+
"content": {
|
|
990
|
+
"application/json": {
|
|
991
|
+
"schema": {
|
|
992
|
+
"$ref": "#/components/schemas/Error"
|
|
993
|
+
},
|
|
994
|
+
"examples": {
|
|
995
|
+
"exampleResponse": {
|
|
996
|
+
"value": {
|
|
997
|
+
"name": "UnauthorizedError",
|
|
998
|
+
"message": "errorMessage"
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
"404": {
|
|
1006
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
1007
|
+
"content": {
|
|
1008
|
+
"application/json": {
|
|
1009
|
+
"schema": {
|
|
1010
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
1011
|
+
},
|
|
1012
|
+
"examples": {
|
|
1013
|
+
"exampleResponse": {
|
|
1014
|
+
"value": {
|
|
1015
|
+
"name": "NotFoundError",
|
|
1016
|
+
"message": "errorMessage",
|
|
1017
|
+
"properties": {
|
|
1018
|
+
"notFoundId": "1"
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
"500": {
|
|
1027
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
1028
|
+
"content": {
|
|
1029
|
+
"application/json": {
|
|
1030
|
+
"schema": {
|
|
1031
|
+
"$ref": "#/components/schemas/Error"
|
|
1032
|
+
},
|
|
1033
|
+
"examples": {
|
|
1034
|
+
"exampleResponse": {
|
|
1035
|
+
"value": {
|
|
1036
|
+
"name": "InternalServerError",
|
|
1037
|
+
"message": "errorMessage"
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
"/auditable-item-stream/{id}/entries": {
|
|
891
1048
|
"post": {
|
|
892
1049
|
"operationId": "auditableItemStreamCreateEntry",
|
|
893
1050
|
"summary": "Create a new stream entry",
|
|
@@ -943,7 +1100,7 @@
|
|
|
943
1100
|
"schema": {
|
|
944
1101
|
"type": "string"
|
|
945
1102
|
},
|
|
946
|
-
"description": "e.g. ais
|
|
1103
|
+
"description": "e.g. ais%3A1234567890%3A01010101010"
|
|
947
1104
|
}
|
|
948
1105
|
}
|
|
949
1106
|
},
|
|
@@ -1005,19 +1162,17 @@
|
|
|
1005
1162
|
}
|
|
1006
1163
|
}
|
|
1007
1164
|
}
|
|
1008
|
-
}
|
|
1009
|
-
},
|
|
1010
|
-
"/auditable-item-stream/{id}/{entryId}": {
|
|
1165
|
+
},
|
|
1011
1166
|
"get": {
|
|
1012
|
-
"operationId": "
|
|
1013
|
-
"summary": "Get a stream
|
|
1167
|
+
"operationId": "auditableItemStreamListEntries",
|
|
1168
|
+
"summary": "Get the entry objects in a stream",
|
|
1014
1169
|
"tags": [
|
|
1015
1170
|
"Auditable Item Stream"
|
|
1016
1171
|
],
|
|
1017
1172
|
"parameters": [
|
|
1018
1173
|
{
|
|
1019
1174
|
"name": "id",
|
|
1020
|
-
"description": "The id of the stream to
|
|
1175
|
+
"description": "The id of the stream to get.",
|
|
1021
1176
|
"in": "path",
|
|
1022
1177
|
"required": true,
|
|
1023
1178
|
"schema": {
|
|
@@ -1027,19 +1182,53 @@
|
|
|
1027
1182
|
"example": "ais:1234567890"
|
|
1028
1183
|
},
|
|
1029
1184
|
{
|
|
1030
|
-
"name": "
|
|
1031
|
-
"description": "The
|
|
1032
|
-
"in": "
|
|
1033
|
-
"required":
|
|
1185
|
+
"name": "conditions",
|
|
1186
|
+
"description": "The conditions to filter the stream, JSON stringified IComparator[].",
|
|
1187
|
+
"in": "query",
|
|
1188
|
+
"required": false,
|
|
1034
1189
|
"schema": {
|
|
1035
1190
|
"type": "string"
|
|
1036
|
-
}
|
|
1037
|
-
"style": "simple",
|
|
1038
|
-
"example": "ais:1234567890:01010101010"
|
|
1191
|
+
}
|
|
1039
1192
|
},
|
|
1040
1193
|
{
|
|
1041
|
-
"name": "
|
|
1042
|
-
"description": "
|
|
1194
|
+
"name": "includeDeleted",
|
|
1195
|
+
"description": "Whether to include deleted entries, defaults to false.",
|
|
1196
|
+
"in": "query",
|
|
1197
|
+
"required": false,
|
|
1198
|
+
"schema": {
|
|
1199
|
+
"type": "string"
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
"name": "verifyEntries",
|
|
1204
|
+
"description": "Should the entries be verified, defaults to false.",
|
|
1205
|
+
"in": "query",
|
|
1206
|
+
"required": false,
|
|
1207
|
+
"schema": {
|
|
1208
|
+
"type": "string"
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"name": "order",
|
|
1213
|
+
"description": "Retrieve the entries in ascending/descending time order, defaults to Ascending.",
|
|
1214
|
+
"in": "query",
|
|
1215
|
+
"required": false,
|
|
1216
|
+
"schema": {
|
|
1217
|
+
"$ref": "#/components/schemas/SortDirection"
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
"name": "limit",
|
|
1222
|
+
"description": "How many entries to return.",
|
|
1223
|
+
"in": "query",
|
|
1224
|
+
"required": false,
|
|
1225
|
+
"schema": {
|
|
1226
|
+
"type": "string"
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
"name": "cursor",
|
|
1231
|
+
"description": "Cursor to use for next chunk of data.",
|
|
1043
1232
|
"in": "query",
|
|
1044
1233
|
"required": false,
|
|
1045
1234
|
"schema": {
|
|
@@ -1063,23 +1252,250 @@
|
|
|
1063
1252
|
],
|
|
1064
1253
|
"responses": {
|
|
1065
1254
|
"200": {
|
|
1066
|
-
"description": "Response to getting an auditable item stream
|
|
1255
|
+
"description": "Response to getting an auditable item stream entries.",
|
|
1067
1256
|
"content": {
|
|
1068
1257
|
"application/json": {
|
|
1069
1258
|
"schema": {
|
|
1070
|
-
"$ref": "https://schema.twindev.org/ais/
|
|
1259
|
+
"$ref": "https://schema.twindev.org/ais/AuditableItemStreamEntryList"
|
|
1071
1260
|
},
|
|
1072
1261
|
"examples": {
|
|
1073
|
-
"
|
|
1262
|
+
"auditableItemStreamListEntriesResponseExample": {
|
|
1074
1263
|
"value": {
|
|
1075
1264
|
"@context": [
|
|
1265
|
+
"https://schema.org",
|
|
1076
1266
|
"https://schema.twindev.org/ais/",
|
|
1077
1267
|
"https://schema.twindev.org/common/"
|
|
1078
1268
|
],
|
|
1079
|
-
"type":
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1269
|
+
"type": [
|
|
1270
|
+
"ItemList",
|
|
1271
|
+
"AuditableItemStreamEntryList"
|
|
1272
|
+
],
|
|
1273
|
+
"itemListElement": [
|
|
1274
|
+
{
|
|
1275
|
+
"@context": [
|
|
1276
|
+
"https://schema.twindev.org/ais/",
|
|
1277
|
+
"https://schema.twindev.org/common/"
|
|
1278
|
+
],
|
|
1279
|
+
"type": "AuditableItemStreamEntry",
|
|
1280
|
+
"id": "tst:1234567890",
|
|
1281
|
+
"dateCreated": "2024-08-22T11:55:16.271Z",
|
|
1282
|
+
"proofId": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
1283
|
+
"index": 0,
|
|
1284
|
+
"entryObject": {
|
|
1285
|
+
"@context": "https://schema.org",
|
|
1286
|
+
"@type": "Event",
|
|
1287
|
+
"startDate": "2011-04-09T20:00:00Z",
|
|
1288
|
+
"description": "A description of the event"
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
]
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
"application/ld+json": {
|
|
1297
|
+
"schema": {
|
|
1298
|
+
"$ref": "https://schema.twindev.org/ais/AuditableItemStreamEntryList"
|
|
1299
|
+
},
|
|
1300
|
+
"examples": {
|
|
1301
|
+
"auditableItemStreamJsonLdListEntriesResponseExample": {
|
|
1302
|
+
"value": {
|
|
1303
|
+
"@context": [
|
|
1304
|
+
"https://schema.org",
|
|
1305
|
+
"https://schema.twindev.org/ais/",
|
|
1306
|
+
"https://schema.twindev.org/common/"
|
|
1307
|
+
],
|
|
1308
|
+
"type": [
|
|
1309
|
+
"ItemList",
|
|
1310
|
+
"AuditableItemStreamEntryList"
|
|
1311
|
+
],
|
|
1312
|
+
"itemListElement": [
|
|
1313
|
+
{
|
|
1314
|
+
"@context": [
|
|
1315
|
+
"https://schema.twindev.org/ais/",
|
|
1316
|
+
"https://schema.twindev.org/common/"
|
|
1317
|
+
],
|
|
1318
|
+
"type": "AuditableItemStreamEntry",
|
|
1319
|
+
"id": "tst:1234567890",
|
|
1320
|
+
"dateCreated": "2024-08-22T11:55:16.271Z",
|
|
1321
|
+
"proofId": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
1322
|
+
"index": 0,
|
|
1323
|
+
"entryObject": {
|
|
1324
|
+
"@context": "https://schema.org",
|
|
1325
|
+
"@type": "Event",
|
|
1326
|
+
"startDate": "2011-04-09T20:00:00Z",
|
|
1327
|
+
"description": "A description of the event"
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
]
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
},
|
|
1336
|
+
"headers": {
|
|
1337
|
+
"content-type": {
|
|
1338
|
+
"schema": {
|
|
1339
|
+
"type": "string"
|
|
1340
|
+
},
|
|
1341
|
+
"description": "e.g. application/ld+json"
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
"400": {
|
|
1346
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
1347
|
+
"content": {
|
|
1348
|
+
"application/json": {
|
|
1349
|
+
"schema": {
|
|
1350
|
+
"$ref": "#/components/schemas/Error"
|
|
1351
|
+
},
|
|
1352
|
+
"examples": {
|
|
1353
|
+
"exampleResponse": {
|
|
1354
|
+
"value": {
|
|
1355
|
+
"name": "GeneralError",
|
|
1356
|
+
"message": "errorMessage",
|
|
1357
|
+
"properties": {
|
|
1358
|
+
"foo": "bar"
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
},
|
|
1366
|
+
"401": {
|
|
1367
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
1368
|
+
"content": {
|
|
1369
|
+
"application/json": {
|
|
1370
|
+
"schema": {
|
|
1371
|
+
"$ref": "#/components/schemas/Error"
|
|
1372
|
+
},
|
|
1373
|
+
"examples": {
|
|
1374
|
+
"exampleResponse": {
|
|
1375
|
+
"value": {
|
|
1376
|
+
"name": "UnauthorizedError",
|
|
1377
|
+
"message": "errorMessage"
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
"404": {
|
|
1385
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
1386
|
+
"content": {
|
|
1387
|
+
"application/json": {
|
|
1388
|
+
"schema": {
|
|
1389
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
1390
|
+
},
|
|
1391
|
+
"examples": {
|
|
1392
|
+
"exampleResponse": {
|
|
1393
|
+
"value": {
|
|
1394
|
+
"name": "NotFoundError",
|
|
1395
|
+
"message": "errorMessage",
|
|
1396
|
+
"properties": {
|
|
1397
|
+
"notFoundId": "1"
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
"500": {
|
|
1406
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
1407
|
+
"content": {
|
|
1408
|
+
"application/json": {
|
|
1409
|
+
"schema": {
|
|
1410
|
+
"$ref": "#/components/schemas/Error"
|
|
1411
|
+
},
|
|
1412
|
+
"examples": {
|
|
1413
|
+
"exampleResponse": {
|
|
1414
|
+
"value": {
|
|
1415
|
+
"name": "InternalServerError",
|
|
1416
|
+
"message": "errorMessage"
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
},
|
|
1426
|
+
"/auditable-item-stream/{id}/entries/{entryId}": {
|
|
1427
|
+
"get": {
|
|
1428
|
+
"operationId": "auditableItemStreamGetEntry",
|
|
1429
|
+
"summary": "Get a stream entry",
|
|
1430
|
+
"tags": [
|
|
1431
|
+
"Auditable Item Stream"
|
|
1432
|
+
],
|
|
1433
|
+
"parameters": [
|
|
1434
|
+
{
|
|
1435
|
+
"name": "id",
|
|
1436
|
+
"description": "The id of the stream to update the get in.",
|
|
1437
|
+
"in": "path",
|
|
1438
|
+
"required": true,
|
|
1439
|
+
"schema": {
|
|
1440
|
+
"type": "string"
|
|
1441
|
+
},
|
|
1442
|
+
"style": "simple",
|
|
1443
|
+
"example": "ais:1234567890"
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
"name": "entryId",
|
|
1447
|
+
"description": "The id of the entry to update.",
|
|
1448
|
+
"in": "path",
|
|
1449
|
+
"required": true,
|
|
1450
|
+
"schema": {
|
|
1451
|
+
"type": "string"
|
|
1452
|
+
},
|
|
1453
|
+
"style": "simple",
|
|
1454
|
+
"example": "ais:1234567890:01010101010"
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
"name": "verifyEntry",
|
|
1458
|
+
"description": "Verify the entry, defaults to false.",
|
|
1459
|
+
"in": "query",
|
|
1460
|
+
"required": false,
|
|
1461
|
+
"schema": {
|
|
1462
|
+
"type": "string"
|
|
1463
|
+
}
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
"name": "accept",
|
|
1467
|
+
"in": "header",
|
|
1468
|
+
"required": true,
|
|
1469
|
+
"schema": {
|
|
1470
|
+
"type": "string"
|
|
1471
|
+
},
|
|
1472
|
+
"style": "simple"
|
|
1473
|
+
}
|
|
1474
|
+
],
|
|
1475
|
+
"security": [
|
|
1476
|
+
{
|
|
1477
|
+
"jwtBearerAuthScheme": []
|
|
1478
|
+
}
|
|
1479
|
+
],
|
|
1480
|
+
"responses": {
|
|
1481
|
+
"200": {
|
|
1482
|
+
"description": "Response to getting an auditable item stream entry.",
|
|
1483
|
+
"content": {
|
|
1484
|
+
"application/json": {
|
|
1485
|
+
"schema": {
|
|
1486
|
+
"$ref": "https://schema.twindev.org/ais/AuditableItemStreamEntry"
|
|
1487
|
+
},
|
|
1488
|
+
"examples": {
|
|
1489
|
+
"auditableItemStreamGetEntryResponseExample": {
|
|
1490
|
+
"value": {
|
|
1491
|
+
"@context": [
|
|
1492
|
+
"https://schema.twindev.org/ais/",
|
|
1493
|
+
"https://schema.twindev.org/common/"
|
|
1494
|
+
],
|
|
1495
|
+
"type": "AuditableItemStreamEntry",
|
|
1496
|
+
"id": "tst:1234567890",
|
|
1497
|
+
"dateCreated": "2024-08-22T11:55:16.271Z",
|
|
1498
|
+
"proofId": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
1083
1499
|
"index": 0,
|
|
1084
1500
|
"entryObject": {
|
|
1085
1501
|
"@context": "https://schema.org",
|
|
@@ -1468,10 +1884,10 @@
|
|
|
1468
1884
|
}
|
|
1469
1885
|
}
|
|
1470
1886
|
},
|
|
1471
|
-
"/auditable-item-stream/{id}/{entryId}/object": {
|
|
1887
|
+
"/auditable-item-stream/{id}/entries/{entryId}/object": {
|
|
1472
1888
|
"get": {
|
|
1473
1889
|
"operationId": "auditableItemStreamGetEntryObject",
|
|
1474
|
-
"summary": "Get a stream entry",
|
|
1890
|
+
"summary": "Get a stream entry object",
|
|
1475
1891
|
"tags": [
|
|
1476
1892
|
"Auditable Item Stream"
|
|
1477
1893
|
],
|
|
@@ -1606,25 +2022,14 @@
|
|
|
1606
2022
|
}
|
|
1607
2023
|
}
|
|
1608
2024
|
},
|
|
1609
|
-
"/auditable-item-stream/
|
|
2025
|
+
"/auditable-item-stream/entries": {
|
|
1610
2026
|
"get": {
|
|
1611
|
-
"operationId": "
|
|
1612
|
-
"summary": "Get the entry objects
|
|
2027
|
+
"operationId": "auditableItemStreamListEntriesNoStream",
|
|
2028
|
+
"summary": "Get the entry objects for all streams",
|
|
1613
2029
|
"tags": [
|
|
1614
2030
|
"Auditable Item Stream"
|
|
1615
2031
|
],
|
|
1616
2032
|
"parameters": [
|
|
1617
|
-
{
|
|
1618
|
-
"name": "id",
|
|
1619
|
-
"description": "The id of the stream to get.",
|
|
1620
|
-
"in": "path",
|
|
1621
|
-
"required": true,
|
|
1622
|
-
"schema": {
|
|
1623
|
-
"type": "string"
|
|
1624
|
-
},
|
|
1625
|
-
"style": "simple",
|
|
1626
|
-
"example": "ais:1234567890"
|
|
1627
|
-
},
|
|
1628
2033
|
{
|
|
1629
2034
|
"name": "conditions",
|
|
1630
2035
|
"description": "The conditions to filter the stream, JSON stringified IComparator[].",
|
|
@@ -1703,7 +2108,7 @@
|
|
|
1703
2108
|
"$ref": "https://schema.twindev.org/ais/AuditableItemStreamEntryList"
|
|
1704
2109
|
},
|
|
1705
2110
|
"examples": {
|
|
1706
|
-
"
|
|
2111
|
+
"auditableItemStreamListEntriesNoStreamResponseExample": {
|
|
1707
2112
|
"value": {
|
|
1708
2113
|
"@context": [
|
|
1709
2114
|
"https://schema.org",
|
|
@@ -1732,8 +2137,7 @@
|
|
|
1732
2137
|
"description": "A description of the event"
|
|
1733
2138
|
}
|
|
1734
2139
|
}
|
|
1735
|
-
]
|
|
1736
|
-
"nextItem": "1"
|
|
2140
|
+
]
|
|
1737
2141
|
}
|
|
1738
2142
|
}
|
|
1739
2143
|
}
|
|
@@ -1743,7 +2147,7 @@
|
|
|
1743
2147
|
"$ref": "https://schema.twindev.org/ais/AuditableItemStreamEntryList"
|
|
1744
2148
|
},
|
|
1745
2149
|
"examples": {
|
|
1746
|
-
"
|
|
2150
|
+
"auditableItemStreamJsonLdListEntriesNoStreamResponseExample": {
|
|
1747
2151
|
"value": {
|
|
1748
2152
|
"@context": [
|
|
1749
2153
|
"https://schema.org",
|
|
@@ -1772,8 +2176,7 @@
|
|
|
1772
2176
|
"description": "A description of the event"
|
|
1773
2177
|
}
|
|
1774
2178
|
}
|
|
1775
|
-
]
|
|
1776
|
-
"nextItem": "1"
|
|
2179
|
+
]
|
|
1777
2180
|
}
|
|
1778
2181
|
}
|
|
1779
2182
|
}
|
|
@@ -1975,8 +2378,7 @@
|
|
|
1975
2378
|
"startDate": "2011-04-09T20:00:00Z",
|
|
1976
2379
|
"description": "A description of the event"
|
|
1977
2380
|
}
|
|
1978
|
-
]
|
|
1979
|
-
"nextItem": "1"
|
|
2381
|
+
]
|
|
1980
2382
|
}
|
|
1981
2383
|
}
|
|
1982
2384
|
}
|
|
@@ -2063,10 +2465,303 @@
|
|
|
2063
2465
|
}
|
|
2064
2466
|
}
|
|
2065
2467
|
}
|
|
2066
|
-
}
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2468
|
+
},
|
|
2469
|
+
"/auditable-item-stream/entries/objects": {
|
|
2470
|
+
"get": {
|
|
2471
|
+
"operationId": "auditableItemStreamListEntryObjectsNoStream",
|
|
2472
|
+
"summary": "Get the entry objects for all streams",
|
|
2473
|
+
"tags": [
|
|
2474
|
+
"Auditable Item Stream"
|
|
2475
|
+
],
|
|
2476
|
+
"parameters": [
|
|
2477
|
+
{
|
|
2478
|
+
"name": "conditions",
|
|
2479
|
+
"description": "The conditions to filter the stream, JSON stringified IComparator[].",
|
|
2480
|
+
"in": "query",
|
|
2481
|
+
"required": false,
|
|
2482
|
+
"schema": {
|
|
2483
|
+
"type": "string"
|
|
2484
|
+
}
|
|
2485
|
+
},
|
|
2486
|
+
{
|
|
2487
|
+
"name": "includeDeleted",
|
|
2488
|
+
"description": "Whether to include deleted entries, defaults to false.",
|
|
2489
|
+
"in": "query",
|
|
2490
|
+
"required": false,
|
|
2491
|
+
"schema": {
|
|
2492
|
+
"type": "string"
|
|
2493
|
+
}
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
"name": "order",
|
|
2497
|
+
"description": "Retrieve the entries in ascending/descending time order, defaults to Ascending.",
|
|
2498
|
+
"in": "query",
|
|
2499
|
+
"required": false,
|
|
2500
|
+
"schema": {
|
|
2501
|
+
"$ref": "#/components/schemas/SortDirection"
|
|
2502
|
+
}
|
|
2503
|
+
},
|
|
2504
|
+
{
|
|
2505
|
+
"name": "limit",
|
|
2506
|
+
"description": "How many entries to return.",
|
|
2507
|
+
"in": "query",
|
|
2508
|
+
"required": false,
|
|
2509
|
+
"schema": {
|
|
2510
|
+
"type": "string"
|
|
2511
|
+
}
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
"name": "cursor",
|
|
2515
|
+
"description": "Cursor to use for next chunk of data.",
|
|
2516
|
+
"in": "query",
|
|
2517
|
+
"required": false,
|
|
2518
|
+
"schema": {
|
|
2519
|
+
"type": "string"
|
|
2520
|
+
}
|
|
2521
|
+
},
|
|
2522
|
+
{
|
|
2523
|
+
"name": "accept",
|
|
2524
|
+
"in": "header",
|
|
2525
|
+
"required": true,
|
|
2526
|
+
"schema": {
|
|
2527
|
+
"type": "string"
|
|
2528
|
+
},
|
|
2529
|
+
"style": "simple"
|
|
2530
|
+
}
|
|
2531
|
+
],
|
|
2532
|
+
"security": [
|
|
2533
|
+
{
|
|
2534
|
+
"jwtBearerAuthScheme": []
|
|
2535
|
+
}
|
|
2536
|
+
],
|
|
2537
|
+
"responses": {
|
|
2538
|
+
"200": {
|
|
2539
|
+
"description": "Response to getting an auditable item stream entries objects.",
|
|
2540
|
+
"content": {
|
|
2541
|
+
"application/json": {
|
|
2542
|
+
"schema": {
|
|
2543
|
+
"$ref": "https://schema.twindev.org/ais/AuditableItemStreamEntryObjectList"
|
|
2544
|
+
},
|
|
2545
|
+
"examples": {
|
|
2546
|
+
"auditableItemStreamListEntryObjectsNoStreamResponseExample": {
|
|
2547
|
+
"value": {
|
|
2548
|
+
"@context": [
|
|
2549
|
+
"https://schema.org",
|
|
2550
|
+
"https://schema.twindev.org/ais/",
|
|
2551
|
+
"https://schema.twindev.org/common/"
|
|
2552
|
+
],
|
|
2553
|
+
"type": [
|
|
2554
|
+
"ItemList",
|
|
2555
|
+
"AuditableItemStreamEntryObjectList"
|
|
2556
|
+
],
|
|
2557
|
+
"itemListElement": [
|
|
2558
|
+
{
|
|
2559
|
+
"@context": "https://schema.org",
|
|
2560
|
+
"@type": "Event",
|
|
2561
|
+
"startDate": "2011-04-09T20:00:00Z",
|
|
2562
|
+
"description": "A description of the event"
|
|
2563
|
+
}
|
|
2564
|
+
]
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
},
|
|
2571
|
+
"400": {
|
|
2572
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
2573
|
+
"content": {
|
|
2574
|
+
"application/json": {
|
|
2575
|
+
"schema": {
|
|
2576
|
+
"$ref": "#/components/schemas/Error"
|
|
2577
|
+
},
|
|
2578
|
+
"examples": {
|
|
2579
|
+
"exampleResponse": {
|
|
2580
|
+
"value": {
|
|
2581
|
+
"name": "GeneralError",
|
|
2582
|
+
"message": "errorMessage",
|
|
2583
|
+
"properties": {
|
|
2584
|
+
"foo": "bar"
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
},
|
|
2592
|
+
"401": {
|
|
2593
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
2594
|
+
"content": {
|
|
2595
|
+
"application/json": {
|
|
2596
|
+
"schema": {
|
|
2597
|
+
"$ref": "#/components/schemas/Error"
|
|
2598
|
+
},
|
|
2599
|
+
"examples": {
|
|
2600
|
+
"exampleResponse": {
|
|
2601
|
+
"value": {
|
|
2602
|
+
"name": "UnauthorizedError",
|
|
2603
|
+
"message": "errorMessage"
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
},
|
|
2610
|
+
"404": {
|
|
2611
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
2612
|
+
"content": {
|
|
2613
|
+
"application/json": {
|
|
2614
|
+
"schema": {
|
|
2615
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
2616
|
+
},
|
|
2617
|
+
"examples": {
|
|
2618
|
+
"exampleResponse": {
|
|
2619
|
+
"value": {
|
|
2620
|
+
"name": "NotFoundError",
|
|
2621
|
+
"message": "errorMessage",
|
|
2622
|
+
"properties": {
|
|
2623
|
+
"notFoundId": "1"
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
},
|
|
2631
|
+
"500": {
|
|
2632
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
2633
|
+
"content": {
|
|
2634
|
+
"application/json": {
|
|
2635
|
+
"schema": {
|
|
2636
|
+
"$ref": "#/components/schemas/Error"
|
|
2637
|
+
},
|
|
2638
|
+
"examples": {
|
|
2639
|
+
"exampleResponse": {
|
|
2640
|
+
"value": {
|
|
2641
|
+
"name": "InternalServerError",
|
|
2642
|
+
"message": "errorMessage"
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
"/auditable-item-stream/{id}/proof": {
|
|
2653
|
+
"delete": {
|
|
2654
|
+
"operationId": "auditableItemStreamRemoveProof",
|
|
2655
|
+
"summary": "Remove the proof from a stream",
|
|
2656
|
+
"tags": [
|
|
2657
|
+
"Auditable Item Stream"
|
|
2658
|
+
],
|
|
2659
|
+
"parameters": [
|
|
2660
|
+
{
|
|
2661
|
+
"name": "id",
|
|
2662
|
+
"description": "The id of the stream to remove the proof from.",
|
|
2663
|
+
"in": "path",
|
|
2664
|
+
"required": true,
|
|
2665
|
+
"schema": {
|
|
2666
|
+
"type": "string"
|
|
2667
|
+
},
|
|
2668
|
+
"style": "simple",
|
|
2669
|
+
"example": "ais:1234567890"
|
|
2670
|
+
}
|
|
2671
|
+
],
|
|
2672
|
+
"security": [
|
|
2673
|
+
{
|
|
2674
|
+
"jwtBearerAuthScheme": []
|
|
2675
|
+
}
|
|
2676
|
+
],
|
|
2677
|
+
"responses": {
|
|
2678
|
+
"204": {
|
|
2679
|
+
"description": "The rest request ended in success with no data."
|
|
2680
|
+
},
|
|
2681
|
+
"400": {
|
|
2682
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
2683
|
+
"content": {
|
|
2684
|
+
"application/json": {
|
|
2685
|
+
"schema": {
|
|
2686
|
+
"$ref": "#/components/schemas/Error"
|
|
2687
|
+
},
|
|
2688
|
+
"examples": {
|
|
2689
|
+
"exampleResponse": {
|
|
2690
|
+
"value": {
|
|
2691
|
+
"name": "GeneralError",
|
|
2692
|
+
"message": "errorMessage",
|
|
2693
|
+
"properties": {
|
|
2694
|
+
"foo": "bar"
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
},
|
|
2702
|
+
"401": {
|
|
2703
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
2704
|
+
"content": {
|
|
2705
|
+
"application/json": {
|
|
2706
|
+
"schema": {
|
|
2707
|
+
"$ref": "#/components/schemas/Error"
|
|
2708
|
+
},
|
|
2709
|
+
"examples": {
|
|
2710
|
+
"exampleResponse": {
|
|
2711
|
+
"value": {
|
|
2712
|
+
"name": "UnauthorizedError",
|
|
2713
|
+
"message": "errorMessage"
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
},
|
|
2720
|
+
"404": {
|
|
2721
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
2722
|
+
"content": {
|
|
2723
|
+
"application/json": {
|
|
2724
|
+
"schema": {
|
|
2725
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
2726
|
+
},
|
|
2727
|
+
"examples": {
|
|
2728
|
+
"exampleResponse": {
|
|
2729
|
+
"value": {
|
|
2730
|
+
"name": "NotFoundError",
|
|
2731
|
+
"message": "errorMessage",
|
|
2732
|
+
"properties": {
|
|
2733
|
+
"notFoundId": "1"
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
},
|
|
2741
|
+
"500": {
|
|
2742
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
2743
|
+
"content": {
|
|
2744
|
+
"application/json": {
|
|
2745
|
+
"schema": {
|
|
2746
|
+
"$ref": "#/components/schemas/Error"
|
|
2747
|
+
},
|
|
2748
|
+
"examples": {
|
|
2749
|
+
"exampleResponse": {
|
|
2750
|
+
"value": {
|
|
2751
|
+
"name": "InternalServerError",
|
|
2752
|
+
"message": "errorMessage"
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
},
|
|
2763
|
+
"components": {
|
|
2764
|
+
"schemas": {
|
|
2070
2765
|
"AuditableItemStreamCreateEntryRequest": {
|
|
2071
2766
|
"type": "object",
|
|
2072
2767
|
"properties": {
|
|
@@ -2077,37 +2772,6 @@
|
|
|
2077
2772
|
"required": [
|
|
2078
2773
|
"entryObject"
|
|
2079
2774
|
],
|
|
2080
|
-
"additionalProperties": false,
|
|
2081
|
-
"description": "The data to be used in the stream."
|
|
2082
|
-
},
|
|
2083
|
-
"AuditableItemStreamCreateRequest": {
|
|
2084
|
-
"type": "object",
|
|
2085
|
-
"properties": {
|
|
2086
|
-
"annotationObject": {
|
|
2087
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
2088
|
-
},
|
|
2089
|
-
"entries": {
|
|
2090
|
-
"type": "array",
|
|
2091
|
-
"items": {
|
|
2092
|
-
"type": "object",
|
|
2093
|
-
"properties": {
|
|
2094
|
-
"entryObject": {
|
|
2095
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
2096
|
-
}
|
|
2097
|
-
},
|
|
2098
|
-
"required": [
|
|
2099
|
-
"entryObject"
|
|
2100
|
-
],
|
|
2101
|
-
"additionalProperties": false
|
|
2102
|
-
},
|
|
2103
|
-
"description": "The entries for the stream."
|
|
2104
|
-
},
|
|
2105
|
-
"immutableInterval": {
|
|
2106
|
-
"type": "number",
|
|
2107
|
-
"description": "After how many entries do we add immutable checks, defaults to service configured value. A value of 0 will disable immutable checks, 1 will be every item, or any other integer for an interval."
|
|
2108
|
-
}
|
|
2109
|
-
},
|
|
2110
|
-
"additionalProperties": false,
|
|
2111
2775
|
"description": "The data to be used in the stream."
|
|
2112
2776
|
},
|
|
2113
2777
|
"AuditableItemStreamUpdateEntryRequest": {
|
|
@@ -2120,20 +2784,46 @@
|
|
|
2120
2784
|
"required": [
|
|
2121
2785
|
"entryObject"
|
|
2122
2786
|
],
|
|
2123
|
-
"additionalProperties": false,
|
|
2124
2787
|
"description": "The data to be used in the entry."
|
|
2125
2788
|
},
|
|
2126
2789
|
"AuditableItemStreamUpdateRequest": {
|
|
2790
|
+
"description": "The data to be used in the stream, entries should be updated separately.",
|
|
2127
2791
|
"type": "object",
|
|
2128
2792
|
"properties": {
|
|
2793
|
+
"@context": {
|
|
2794
|
+
"type": "array",
|
|
2795
|
+
"prefixItems": [
|
|
2796
|
+
{
|
|
2797
|
+
"const": "https://schema.org"
|
|
2798
|
+
},
|
|
2799
|
+
{
|
|
2800
|
+
"const": "https://schema.twindev.org/ais/"
|
|
2801
|
+
},
|
|
2802
|
+
{
|
|
2803
|
+
"const": "https://schema.twindev.org/common/"
|
|
2804
|
+
}
|
|
2805
|
+
],
|
|
2806
|
+
"items": {
|
|
2807
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
2808
|
+
},
|
|
2809
|
+
"minItems": 3,
|
|
2810
|
+
"description": "JSON-LD Context."
|
|
2811
|
+
},
|
|
2812
|
+
"type": {
|
|
2813
|
+
"const": "AuditableItemStream",
|
|
2814
|
+
"description": "JSON-LD Type."
|
|
2815
|
+
},
|
|
2129
2816
|
"annotationObject": {
|
|
2130
2817
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
2131
2818
|
}
|
|
2132
2819
|
},
|
|
2133
|
-
"
|
|
2134
|
-
|
|
2820
|
+
"required": [
|
|
2821
|
+
"@context",
|
|
2822
|
+
"type"
|
|
2823
|
+
]
|
|
2135
2824
|
},
|
|
2136
2825
|
"Error": {
|
|
2826
|
+
"description": "Model to describe serialized error.",
|
|
2137
2827
|
"type": "object",
|
|
2138
2828
|
"properties": {
|
|
2139
2829
|
"name": {
|
|
@@ -2142,7 +2832,7 @@
|
|
|
2142
2832
|
},
|
|
2143
2833
|
"message": {
|
|
2144
2834
|
"type": "string",
|
|
2145
|
-
"description": "The message for the error."
|
|
2835
|
+
"description": "The message for the error as an i18n key."
|
|
2146
2836
|
},
|
|
2147
2837
|
"source": {
|
|
2148
2838
|
"type": "string",
|
|
@@ -2164,63 +2854,35 @@
|
|
|
2164
2854
|
"required": [
|
|
2165
2855
|
"name",
|
|
2166
2856
|
"message"
|
|
2167
|
-
]
|
|
2168
|
-
"additionalProperties": false,
|
|
2169
|
-
"description": "Model to describe serialized error."
|
|
2857
|
+
]
|
|
2170
2858
|
},
|
|
2171
2859
|
"NotFoundResponse": {
|
|
2172
2860
|
"type": "object",
|
|
2173
|
-
"additionalProperties": false,
|
|
2174
2861
|
"properties": {
|
|
2175
2862
|
"notFoundId": {
|
|
2176
2863
|
"type": "string",
|
|
2177
2864
|
"description": "The id if the item that was not found."
|
|
2178
|
-
},
|
|
2179
|
-
"name": {
|
|
2180
|
-
"type": "string",
|
|
2181
|
-
"description": "The name for the error."
|
|
2182
|
-
},
|
|
2183
|
-
"message": {
|
|
2184
|
-
"type": "string",
|
|
2185
|
-
"description": "The message for the error."
|
|
2186
|
-
},
|
|
2187
|
-
"source": {
|
|
2188
|
-
"type": "string",
|
|
2189
|
-
"description": "The source of the error."
|
|
2190
|
-
},
|
|
2191
|
-
"properties": {
|
|
2192
|
-
"type": "object",
|
|
2193
|
-
"additionalProperties": {},
|
|
2194
|
-
"description": "Any additional information for the error."
|
|
2195
|
-
},
|
|
2196
|
-
"stack": {
|
|
2197
|
-
"type": "string",
|
|
2198
|
-
"description": "The stack trace for the error."
|
|
2199
|
-
},
|
|
2200
|
-
"cause": {
|
|
2201
|
-
"$ref": "#/components/schemas/Error"
|
|
2202
2865
|
}
|
|
2203
2866
|
},
|
|
2204
|
-
"
|
|
2205
|
-
|
|
2206
|
-
|
|
2867
|
+
"allOf": [
|
|
2868
|
+
{
|
|
2869
|
+
"$ref": "#/components/schemas/Error"
|
|
2870
|
+
}
|
|
2207
2871
|
],
|
|
2208
2872
|
"description": "The body which contains the error."
|
|
2209
2873
|
},
|
|
2210
2874
|
"SortDirection": {
|
|
2875
|
+
"description": "The sort directions.",
|
|
2211
2876
|
"anyOf": [
|
|
2212
2877
|
{
|
|
2213
|
-
"type": "string",
|
|
2214
2878
|
"const": "asc",
|
|
2215
2879
|
"description": "Ascending."
|
|
2216
2880
|
},
|
|
2217
2881
|
{
|
|
2218
|
-
"type": "string",
|
|
2219
2882
|
"const": "desc",
|
|
2220
2883
|
"description": "Descending."
|
|
2221
2884
|
}
|
|
2222
|
-
]
|
|
2223
|
-
"description": "The sort directions."
|
|
2885
|
+
]
|
|
2224
2886
|
}
|
|
2225
2887
|
},
|
|
2226
2888
|
"securitySchemes": {
|