@twin.org/document-management-service 0.0.1-next.2 → 0.0.1-next.20

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.
@@ -21,41 +21,28 @@
21
21
  }
22
22
  ],
23
23
  "paths": {
24
- "/documents/{auditableItemGraphId}": {
24
+ "/document-management": {
25
25
  "post": {
26
26
  "operationId": "DocumentManagementSet",
27
27
  "summary": "Store a document in an auditable item graph vertex and add its content to blob storage.",
28
28
  "tags": [
29
29
  "Document Management"
30
30
  ],
31
- "parameters": [
32
- {
33
- "name": "auditableItemGraphId",
34
- "description": "The id of the auditable item graph vertex to store the document on.",
35
- "in": "path",
36
- "required": true,
37
- "schema": {
38
- "type": "string"
39
- },
40
- "style": "simple",
41
- "example": "aig:123456"
42
- }
43
- ],
44
31
  "security": [
45
32
  {
46
33
  "jwtBearerAuthScheme": []
47
34
  }
48
35
  ],
49
36
  "requestBody": {
50
- "description": "Request to set a document in an auditable item graph vertex.",
37
+ "description": "Request to create a document as an auditable item graph vertex.",
51
38
  "required": true,
52
39
  "content": {
53
40
  "application/json": {
54
41
  "schema": {
55
- "$ref": "#/components/schemas/DocumentManagementSetRequest"
42
+ "$ref": "#/components/schemas/DocumentManagementCreateRequest"
56
43
  },
57
44
  "examples": {
58
- "DocumentManagementSetRequestExample": {
45
+ "DocumentManagementCreateRequestExample": {
59
46
  "value": {
60
47
  "documentId": "2721000",
61
48
  "documentIdFormat": "bol",
@@ -81,7 +68,7 @@
81
68
  "schema": {
82
69
  "type": "string"
83
70
  },
84
- "description": "e.g. documents:123456:705:2721000"
71
+ "description": "e.g. aig:123456"
85
72
  }
86
73
  }
87
74
  },
@@ -152,50 +139,34 @@
152
139
  ],
153
140
  "parameters": [
154
141
  {
155
- "name": "auditableItemGraphId",
156
- "description": "The id of the auditable item graph vertex which contains the documents.",
157
- "in": "path",
158
- "required": true,
159
- "schema": {
160
- "type": "string"
161
- },
162
- "style": "simple",
163
- "example": "aig:123456"
164
- },
165
- {
166
- "name": "documentCodes",
167
- "description": "List of comma separated document codes to filter the query.",
142
+ "name": "documentId",
143
+ "description": "The id of the document id we are trying to find.",
168
144
  "in": "query",
169
145
  "required": false,
170
146
  "schema": {
171
147
  "type": "string"
172
- }
173
- },
174
- {
175
- "name": "includeRemoved",
176
- "description": "Include deleted documents in the response.",
177
- "in": "query",
178
- "required": false,
179
- "schema": {
180
- "type": "boolean"
181
- }
148
+ },
149
+ "example": "2721000"
182
150
  },
183
151
  {
184
- "name": "includeMostRecentRevisions",
185
- "description": "Include the most recent 5 revisions, use the individual get to retrieve more.",
152
+ "name": "cursor",
153
+ "description": "The cursor to get the next chunk of documents.",
186
154
  "in": "query",
187
155
  "required": false,
188
156
  "schema": {
189
- "type": "boolean"
157
+ "type": "string"
190
158
  }
191
159
  },
192
160
  {
193
- "name": "cursor",
194
- "description": "The cursor to get the next chunk of documents.",
161
+ "name": "pageSize",
162
+ "description": "The number of documents to return.",
195
163
  "in": "query",
196
164
  "required": false,
197
165
  "schema": {
198
- "type": "string"
166
+ "type": [
167
+ "number",
168
+ "string"
169
+ ]
199
170
  }
200
171
  },
201
172
  {
@@ -219,76 +190,67 @@
219
190
  "content": {
220
191
  "application/json": {
221
192
  "schema": {
222
- "$ref": "#/components/schemas/DocumentList"
193
+ "$ref": "https://schema.twindev.org/aig/AuditableItemGraphVertexList"
223
194
  },
224
195
  "examples": {
225
196
  "DocumentManagementQueryResponseExample": {
226
197
  "value": {
227
198
  "@context": [
228
- "https://schema.twindev.org/documents/",
229
- "https://schema.twindev.org/common/"
199
+ "https://schema.org",
200
+ "https://schema.twindev.org/aig/"
230
201
  ],
231
- "type": "DocumentList",
232
- "documents": [
233
- {
234
- "@context": [
235
- "https://schema.twindev.org/documents/",
236
- "https://schema.twindev.org/common/",
237
- "https://schema.org"
238
- ],
239
- "type": "Document",
240
- "id": "documents:705:2721000:rev-0",
241
- "documentId": "2721000",
242
- "documentIdFormat": "bol",
243
- "documentCode": "unece:DocumentCodeList#705",
244
- "documentRevision": 0,
245
- "blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
246
- "blobHash": "sha256:123456",
247
- "dateCreated": "2024-01-01T00:00:00Z",
248
- "annotationObject": {
249
- "@context": "https://schema.org",
250
- "@type": "DigitalDocument",
251
- "name": "myfile.pdf"
252
- }
253
- }
254
- ]
255
- }
256
- }
257
- }
258
- },
259
- "application/ld+json": {
260
- "schema": {
261
- "$ref": "#/components/schemas/DocumentList"
262
- },
263
- "examples": {
264
- "DocumentManagementListResponseJsonLdExample": {
265
- "value": {
266
- "@context": [
267
- "https://schema.twindev.org/documents/",
268
- "https://schema.twindev.org/common/"
202
+ "type": [
203
+ "ItemList",
204
+ "AuditableItemGraphVertexList"
269
205
  ],
270
- "type": "DocumentList",
271
- "documents": [
206
+ "itemListElement": [
272
207
  {
273
208
  "@context": [
274
- "https://schema.twindev.org/documents/",
275
- "https://schema.twindev.org/common/",
276
- "https://schema.org"
209
+ "https://schema.twindev.org/aig/",
210
+ "https://schema.twindev.org/common/"
277
211
  ],
278
- "type": "Document",
279
- "id": "documents:705:2721000:rev-0",
280
- "documentId": "2721000",
281
- "documentIdFormat": "bol",
282
- "documentCode": "unece:DocumentCodeList#705",
283
- "documentRevision": 0,
284
- "blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
285
- "blobHash": "sha256:123456",
286
- "dateCreated": "2024-01-01T00:00:00Z",
287
- "annotationObject": {
288
- "@context": "https://schema.org",
289
- "@type": "DigitalDocument",
290
- "name": "myfile.pdf"
291
- }
212
+ "id": "aig:c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7",
213
+ "type": "AuditableItemGraphVertex",
214
+ "dateCreated": "2024-08-22T04:13:20.000Z",
215
+ "aliases": [
216
+ {
217
+ "@context": [
218
+ "https://schema.twindev.org/aig/"
219
+ ],
220
+ "id": "test-id-0",
221
+ "type": "AuditableItemGraphAlias",
222
+ "dateCreated": "2024-08-22T04:13:20.000Z"
223
+ }
224
+ ],
225
+ "resources": [
226
+ {
227
+ "@context": "https://schema.twindev.org/aig/",
228
+ "type": "AuditableItemGraphResource",
229
+ "dateCreated": "2024-08-22T04:13:20.000Z",
230
+ "resourceObject": {
231
+ "@context": [
232
+ "https://schema.twindev.org/documents/",
233
+ "https://schema.twindev.org/common/",
234
+ "https://schema.org"
235
+ ],
236
+ "type": "Document",
237
+ "id": "test-id-0:0",
238
+ "documentId": "test-id-0",
239
+ "documentCode": "unece:DocumentCodeList#705",
240
+ "documentRevision": 0,
241
+ "annotationObject": {
242
+ "@context": "https://schema.org",
243
+ "type": "DigitalDocument",
244
+ "name": "bill-of-lading"
245
+ },
246
+ "blobHash": "sha256:E3Duqrp6bHojSx+CzDttAToAiP1eFkCDAPBbKLABVGM=",
247
+ "blobStorageId": "blob:memory:1370eeaaba7a6c7a234b1f82cc3b6d013a0088fd5e16408300f05b28b0015463",
248
+ "dateCreated": "2024-08-22T04:13:20.000Z",
249
+ "nodeIdentity": "did:entity-storage:0x0101010101010101010101010101010101010101010101010101010101010101",
250
+ "userIdentity": "did:entity-storage:0x0404040404040404040404040404040404040404040404040404040404040404"
251
+ }
252
+ }
253
+ ]
292
254
  }
293
255
  ]
294
256
  }
@@ -357,27 +319,126 @@
357
319
  }
358
320
  }
359
321
  },
360
- "/documents/{auditableItemGraphId}/{documentId}": {
361
- "get": {
362
- "operationId": "DocumentManagementGet",
363
- "summary": "Get the data for a document from document management",
322
+ "/document-management/{auditableItemGraphDocumentId}": {
323
+ "put": {
324
+ "operationId": "DocumentManagementUpdate",
325
+ "summary": "Update a document in an auditable item graph vertex and add its content to blob storage.",
364
326
  "tags": [
365
327
  "Document Management"
366
328
  ],
367
329
  "parameters": [
368
330
  {
369
- "name": "auditableItemGraphId",
370
- "description": "The id of the auditable item graph vertex to store the document on.",
331
+ "name": "auditableItemGraphDocumentId",
332
+ "description": "The full id of the document to get.",
371
333
  "in": "path",
372
334
  "required": true,
373
335
  "schema": {
374
336
  "type": "string"
375
337
  },
376
338
  "style": "simple",
377
- "example": "aig:1234"
339
+ "example": "aig:123456"
340
+ }
341
+ ],
342
+ "security": [
343
+ {
344
+ "jwtBearerAuthScheme": []
345
+ }
346
+ ],
347
+ "requestBody": {
348
+ "description": "Request to update a document as an auditable item graph vertex.",
349
+ "required": true,
350
+ "content": {
351
+ "application/json": {
352
+ "schema": {
353
+ "$ref": "#/components/schemas/DocumentManagementUpdateRequest"
354
+ },
355
+ "examples": {
356
+ "DocumentManagementUpdateRequestExample": {
357
+ "value": {
358
+ "blob": "SGVsbG8gV29ybGQ=",
359
+ "annotationObject": {
360
+ "@context": "https://schema.org",
361
+ "@type": "DigitalDocument",
362
+ "name": "myfile.pdf"
363
+ }
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }
369
+ },
370
+ "responses": {
371
+ "204": {
372
+ "description": "The rest request ended in success with no data."
373
+ },
374
+ "400": {
375
+ "description": "The server cannot process the request, see the content for more details.",
376
+ "content": {
377
+ "application/json": {
378
+ "schema": {
379
+ "$ref": "#/components/schemas/Error"
380
+ },
381
+ "examples": {
382
+ "exampleResponse": {
383
+ "value": {
384
+ "name": "GeneralError",
385
+ "message": "component.error",
386
+ "properties": {
387
+ "foo": "bar"
388
+ }
389
+ }
390
+ }
391
+ }
392
+ }
393
+ }
394
+ },
395
+ "401": {
396
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
397
+ "content": {
398
+ "application/json": {
399
+ "schema": {
400
+ "$ref": "#/components/schemas/Error"
401
+ },
402
+ "examples": {
403
+ "exampleResponse": {
404
+ "value": {
405
+ "name": "UnauthorizedError",
406
+ "message": "component.error"
407
+ }
408
+ }
409
+ }
410
+ }
411
+ }
378
412
  },
413
+ "500": {
414
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
415
+ "content": {
416
+ "application/json": {
417
+ "schema": {
418
+ "$ref": "#/components/schemas/Error"
419
+ },
420
+ "examples": {
421
+ "exampleResponse": {
422
+ "value": {
423
+ "name": "InternalServerError",
424
+ "message": "component.error"
425
+ }
426
+ }
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ },
433
+ "get": {
434
+ "operationId": "DocumentManagementGet",
435
+ "summary": "Get the data for a document from document management",
436
+ "tags": [
437
+ "Document Management"
438
+ ],
439
+ "parameters": [
379
440
  {
380
- "name": "documentId",
441
+ "name": "auditableItemGraphDocumentId",
381
442
  "description": "The full id of the document to get.",
382
443
  "in": "path",
383
444
  "required": true,
@@ -385,7 +446,7 @@
385
446
  "type": "string"
386
447
  },
387
448
  "style": "simple",
388
- "example": "documents:123456:705:2721000"
449
+ "example": "aig:123456"
389
450
  },
390
451
  {
391
452
  "name": "includeBlobStorageMetadata",
@@ -393,7 +454,10 @@
393
454
  "in": "query",
394
455
  "required": false,
395
456
  "schema": {
396
- "type": "boolean"
457
+ "type": [
458
+ "boolean",
459
+ "string"
460
+ ]
397
461
  }
398
462
  },
399
463
  {
@@ -402,7 +466,10 @@
402
466
  "in": "query",
403
467
  "required": false,
404
468
  "schema": {
405
- "type": "boolean"
469
+ "type": [
470
+ "boolean",
471
+ "string"
472
+ ]
406
473
  }
407
474
  },
408
475
  {
@@ -411,7 +478,10 @@
411
478
  "in": "query",
412
479
  "required": false,
413
480
  "schema": {
414
- "type": "boolean"
481
+ "type": [
482
+ "boolean",
483
+ "string"
484
+ ]
415
485
  }
416
486
  },
417
487
  {
@@ -420,20 +490,44 @@
420
490
  "in": "query",
421
491
  "required": false,
422
492
  "schema": {
423
- "type": "boolean"
493
+ "type": [
494
+ "boolean",
495
+ "string"
496
+ ]
497
+ }
498
+ },
499
+ {
500
+ "name": "extractRuleGroupId",
501
+ "description": "If provided will extract data from the document using the specified rule group id.",
502
+ "in": "query",
503
+ "required": false,
504
+ "schema": {
505
+ "type": "string"
506
+ }
507
+ },
508
+ {
509
+ "name": "extractMimeType",
510
+ "description": "By default extraction will auto detect the mime type of the document, this can be used to override the detection.",
511
+ "in": "query",
512
+ "required": false,
513
+ "schema": {
514
+ "type": "string"
424
515
  }
425
516
  },
426
517
  {
427
- "name": "maxRevisionCount",
428
- "description": "Max number of revisions to return.",
518
+ "name": "pageSize",
519
+ "description": "Page size of items to return, defaults to 1 so only most recent is returned.",
429
520
  "in": "query",
430
521
  "required": false,
431
522
  "schema": {
432
- "type": "number"
523
+ "type": [
524
+ "number",
525
+ "string"
526
+ ]
433
527
  }
434
528
  },
435
529
  {
436
- "name": "revisionCursor",
530
+ "name": "cursor",
437
531
  "description": "The cursor to get the next chunk of revisions.",
438
532
  "in": "query",
439
533
  "required": false,
@@ -462,60 +556,271 @@
462
556
  "content": {
463
557
  "application/json": {
464
558
  "schema": {
465
- "$ref": "#/components/schemas/Document"
559
+ "$ref": "#/components/schemas/DocumentList"
466
560
  },
467
561
  "examples": {
468
562
  "DocumentManagementGetResponseExample": {
469
563
  "value": {
470
564
  "@context": [
565
+ "https://schema.org",
471
566
  "https://schema.twindev.org/documents/",
472
- "https://schema.twindev.org/common/",
473
- "https://schema.org"
567
+ "https://schema.twindev.org/common/"
474
568
  ],
475
- "type": "Document",
476
- "id": "documents:705:2721000:rev-0",
477
- "documentId": "2721000",
478
- "documentIdFormat": "bol",
479
- "documentCode": "unece:DocumentCodeList#705",
480
- "documentRevision": 0,
481
- "blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
482
- "blobHash": "sha256:123456",
483
- "dateCreated": "2024-01-01T00:00:00Z",
484
- "annotationObject": {
485
- "@context": "https://schema.org",
486
- "@type": "DigitalDocument",
487
- "name": "myfile.pdf"
488
- }
569
+ "type": "ItemList",
570
+ "itemListElement": [
571
+ {
572
+ "@context": [
573
+ "https://schema.twindev.org/documents/",
574
+ "https://schema.twindev.org/common/",
575
+ "https://schema.org"
576
+ ],
577
+ "type": "Document",
578
+ "id": "2721000:0",
579
+ "documentId": "2721000",
580
+ "documentIdFormat": "bol",
581
+ "documentCode": "unece:DocumentCodeList#705",
582
+ "documentRevision": 0,
583
+ "blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
584
+ "blobHash": "sha256:123456",
585
+ "dateCreated": "2024-01-01T00:00:00Z",
586
+ "annotationObject": {
587
+ "@context": "https://schema.org",
588
+ "@type": "DigitalDocument",
589
+ "name": "myfile.pdf"
590
+ },
591
+ "nodeIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
592
+ "userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
593
+ }
594
+ ]
489
595
  }
490
596
  }
491
597
  }
492
598
  },
493
599
  "application/ld+json": {
494
600
  "schema": {
495
- "$ref": "#/components/schemas/Document"
601
+ "$ref": "#/components/schemas/DocumentList"
496
602
  },
497
603
  "examples": {
498
604
  "DocumentManagementGetResponseExample": {
499
605
  "value": {
500
606
  "@context": [
607
+ "https://schema.org",
501
608
  "https://schema.twindev.org/documents/",
502
- "https://schema.twindev.org/common/",
503
- "https://schema.org"
609
+ "https://schema.twindev.org/common/"
504
610
  ],
505
- "type": "Document",
506
- "id": "documents:705:2721000:rev-0",
507
- "documentId": "2721000",
508
- "documentIdFormat": "bol",
509
- "documentCode": "unece:DocumentCodeList#705",
510
- "documentRevision": 0,
511
- "blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
512
- "blobHash": "sha256:123456",
611
+ "type": "ItemList",
612
+ "itemListElement": [
613
+ {
614
+ "@context": [
615
+ "https://schema.twindev.org/documents/",
616
+ "https://schema.twindev.org/common/",
617
+ "https://schema.org"
618
+ ],
619
+ "type": "Document",
620
+ "id": "2721000:0",
621
+ "documentId": "2721000",
622
+ "documentIdFormat": "bol",
623
+ "documentCode": "unece:DocumentCodeList#705",
624
+ "documentRevision": 0,
625
+ "blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
626
+ "blobHash": "sha256:123456",
627
+ "dateCreated": "2024-01-01T00:00:00Z",
628
+ "annotationObject": {
629
+ "@context": "https://schema.org",
630
+ "@type": "DigitalDocument",
631
+ "name": "myfile.pdf"
632
+ },
633
+ "nodeIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
634
+ "userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
635
+ }
636
+ ]
637
+ }
638
+ }
639
+ }
640
+ }
641
+ }
642
+ },
643
+ "400": {
644
+ "description": "The server cannot process the request, see the content for more details.",
645
+ "content": {
646
+ "application/json": {
647
+ "schema": {
648
+ "$ref": "#/components/schemas/Error"
649
+ },
650
+ "examples": {
651
+ "exampleResponse": {
652
+ "value": {
653
+ "name": "GeneralError",
654
+ "message": "component.error",
655
+ "properties": {
656
+ "foo": "bar"
657
+ }
658
+ }
659
+ }
660
+ }
661
+ }
662
+ }
663
+ },
664
+ "401": {
665
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
666
+ "content": {
667
+ "application/json": {
668
+ "schema": {
669
+ "$ref": "#/components/schemas/Error"
670
+ },
671
+ "examples": {
672
+ "exampleResponse": {
673
+ "value": {
674
+ "name": "UnauthorizedError",
675
+ "message": "component.error"
676
+ }
677
+ }
678
+ }
679
+ }
680
+ }
681
+ },
682
+ "404": {
683
+ "description": "The resource you tried to access does not exist, see the content for more details.",
684
+ "content": {
685
+ "application/json": {
686
+ "schema": {
687
+ "$ref": "#/components/schemas/NotFoundResponse"
688
+ },
689
+ "examples": {
690
+ "exampleResponse": {
691
+ "value": {
692
+ "name": "NotFoundError",
693
+ "message": "component.error",
694
+ "properties": {
695
+ "notFoundId": "1"
696
+ }
697
+ }
698
+ }
699
+ }
700
+ }
701
+ }
702
+ },
703
+ "500": {
704
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
705
+ "content": {
706
+ "application/json": {
707
+ "schema": {
708
+ "$ref": "#/components/schemas/Error"
709
+ },
710
+ "examples": {
711
+ "exampleResponse": {
712
+ "value": {
713
+ "name": "InternalServerError",
714
+ "message": "component.error"
715
+ }
716
+ }
717
+ }
718
+ }
719
+ }
720
+ }
721
+ }
722
+ }
723
+ },
724
+ "/document-management/{auditableItemGraphDocumentId}/{revision}": {
725
+ "get": {
726
+ "operationId": "DocumentManagementGetRevision",
727
+ "summary": "Get the data for a document revision from document management",
728
+ "tags": [
729
+ "Document Management"
730
+ ],
731
+ "parameters": [
732
+ {
733
+ "name": "auditableItemGraphDocumentId",
734
+ "description": "",
735
+ "in": "path",
736
+ "required": true,
737
+ "schema": {
738
+ "type": "string"
739
+ },
740
+ "style": "simple",
741
+ "example": "aig:123456"
742
+ },
743
+ {
744
+ "name": "revision",
745
+ "description": "",
746
+ "in": "path",
747
+ "required": true,
748
+ "schema": {
749
+ "type": "string"
750
+ },
751
+ "style": "simple",
752
+ "example": "1"
753
+ }
754
+ ],
755
+ "security": [
756
+ {
757
+ "jwtBearerAuthScheme": []
758
+ }
759
+ ],
760
+ "responses": {
761
+ "200": {
762
+ "description": "Response to get a document revision from an auditable item graph vertex.",
763
+ "content": {
764
+ "application/json": {
765
+ "schema": {
766
+ "$ref": "#/components/schemas/Document"
767
+ },
768
+ "examples": {
769
+ "DocumentManagementGetRevisionResponseExample": {
770
+ "value": {
771
+ "@context": [
772
+ "https://schema.twindev.org/documents/",
773
+ "https://schema.twindev.org/common/",
774
+ "https://schema.org"
775
+ ],
776
+ "type": "Document",
777
+ "id": "2721000:0",
778
+ "documentId": "2721000",
779
+ "documentIdFormat": "bol",
780
+ "documentCode": "unece:DocumentCodeList#705",
781
+ "documentRevision": 1,
782
+ "blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
783
+ "blobHash": "sha256:123456",
513
784
  "dateCreated": "2024-01-01T00:00:00Z",
514
785
  "annotationObject": {
515
786
  "@context": "https://schema.org",
516
787
  "@type": "DigitalDocument",
517
788
  "name": "myfile.pdf"
518
- }
789
+ },
790
+ "nodeIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
791
+ "userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
792
+ }
793
+ }
794
+ }
795
+ },
796
+ "application/ld+json": {
797
+ "schema": {
798
+ "$ref": "#/components/schemas/Document"
799
+ },
800
+ "examples": {
801
+ "DocumentManagementGetRevisionResponseExample": {
802
+ "value": {
803
+ "@context": [
804
+ "https://schema.twindev.org/documents/",
805
+ "https://schema.twindev.org/common/",
806
+ "https://schema.org"
807
+ ],
808
+ "type": "Document",
809
+ "id": "2721000:0",
810
+ "documentId": "2721000",
811
+ "documentIdFormat": "bol",
812
+ "documentCode": "unece:DocumentCodeList#705",
813
+ "documentRevision": 1,
814
+ "blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
815
+ "blobHash": "sha256:123456",
816
+ "dateCreated": "2024-01-01T00:00:00Z",
817
+ "annotationObject": {
818
+ "@context": "https://schema.org",
819
+ "@type": "DigitalDocument",
820
+ "name": "myfile.pdf"
821
+ },
822
+ "nodeIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
823
+ "userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
519
824
  }
520
825
  }
521
826
  }
@@ -610,8 +915,8 @@
610
915
  ],
611
916
  "parameters": [
612
917
  {
613
- "name": "auditableItemGraphId",
614
- "description": "The id of the auditable item graph vertex to remove the document from.",
918
+ "name": "auditableItemGraphDocumentId",
919
+ "description": "The id of the auditable item graph vertex to remove the revision from.",
615
920
  "in": "path",
616
921
  "required": true,
617
922
  "schema": {
@@ -621,24 +926,15 @@
621
926
  "example": "aig:1234"
622
927
  },
623
928
  {
624
- "name": "documentId",
625
- "description": "The full id of the document to remove.",
929
+ "name": "revision",
930
+ "description": "The revision of the document to remove.",
626
931
  "in": "path",
627
932
  "required": true,
628
933
  "schema": {
629
934
  "type": "string"
630
935
  },
631
936
  "style": "simple",
632
- "example": "documents:123456:705:2721000"
633
- },
634
- {
635
- "name": "removeAllRevisions",
636
- "description": "Flag to remove all revisions of the document.",
637
- "in": "query",
638
- "required": false,
639
- "schema": {
640
- "type": "boolean"
641
- }
937
+ "example": "1"
642
938
  }
643
939
  ],
644
940
  "security": [
@@ -734,16 +1030,17 @@
734
1030
  },
735
1031
  "components": {
736
1032
  "schemas": {
737
- "AttestationInformation": {
1033
+ "Document": {
738
1034
  "type": "object",
739
1035
  "properties": {
740
1036
  "@context": {
741
1037
  "type": "array",
742
1038
  "minItems": 3,
743
- "items": [
1039
+ "description": "JSON-LD Context.",
1040
+ "prefixItems": [
744
1041
  {
745
1042
  "type": "string",
746
- "const": "https://schema.twindev.org/attestation/"
1043
+ "const": "https://schema.twindev.org/documents/"
747
1044
  },
748
1045
  {
749
1046
  "type": "string",
@@ -754,320 +1051,256 @@
754
1051
  "const": "https://schema.org"
755
1052
  }
756
1053
  ],
757
- "additionalItems": {
758
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
759
- },
760
- "description": "JSON-LD Context."
1054
+ "items": {
1055
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
1056
+ }
761
1057
  },
762
1058
  "type": {
763
1059
  "type": "string",
764
- "const": "Information",
1060
+ "const": "Document",
765
1061
  "description": "JSON-LD Type."
766
1062
  },
767
1063
  "id": {
768
1064
  "type": "string",
769
- "description": "The unique identifier of the attestation."
1065
+ "description": "The full id of the document."
770
1066
  },
771
- "dateCreated": {
1067
+ "documentId": {
772
1068
  "type": "string",
773
- "description": "Created date/time of the attestation in ISO format."
1069
+ "description": "The id of the document."
774
1070
  },
775
- "dateTransferred": {
1071
+ "documentIdFormat": {
776
1072
  "type": "string",
777
- "description": "Transferred date/time of the attestation in ISO format, can be blank if holder identity is owner."
1073
+ "description": "The format of the document id."
1074
+ },
1075
+ "documentCode": {
1076
+ "$ref": "#/components/schemas/UneceDocumentCodes"
1077
+ },
1078
+ "documentRevision": {
1079
+ "type": "number",
1080
+ "description": "The revision of the document as a 0 based index."
778
1081
  },
779
- "ownerIdentity": {
1082
+ "annotationObject": {
1083
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1084
+ },
1085
+ "blobStorageId": {
780
1086
  "type": "string",
781
- "description": "The identity of the owner."
1087
+ "description": "The blob storage id for the document."
782
1088
  },
783
- "holderIdentity": {
1089
+ "blobHash": {
784
1090
  "type": "string",
785
- "description": "The identity of the current holder, can be undefined if owner is still the holder."
1091
+ "description": "The hash of the blob data."
786
1092
  },
787
- "attestationObject": {
788
- "$ref": "#/components/schemas/JsonLdNodeObject"
1093
+ "blobStorageEntry": {
1094
+ "$ref": "https://schema.twindev.org/blob-storage/BlobStorageEntry"
789
1095
  },
790
- "proof": {
791
- "$ref": "#/components/schemas/JsonLdNodeObject"
1096
+ "extractedData": {
1097
+ "description": "The data extracted from the document using data extraction services."
792
1098
  },
793
- "verified": {
794
- "type": "boolean",
795
- "description": "Whether the attestation has been verified."
1099
+ "attestationId": {
1100
+ "type": "string",
1101
+ "description": "The attestation for the document if one was created."
1102
+ },
1103
+ "attestationInformation": {
1104
+ "$ref": "https://schema.twindev.org/attestation/AttestationInformation"
1105
+ },
1106
+ "dateCreated": {
1107
+ "type": "string",
1108
+ "description": "The date/time of when the document was created."
1109
+ },
1110
+ "dateModified": {
1111
+ "type": "string",
1112
+ "description": "The date/time of when the document was modified."
1113
+ },
1114
+ "dateDeleted": {
1115
+ "type": "string",
1116
+ "description": "The date/time of when the document was deleted, as we never actually remove items."
1117
+ },
1118
+ "nodeIdentity": {
1119
+ "type": "string",
1120
+ "description": "The node which added the document to the graph."
796
1121
  },
797
- "verificationFailure": {
1122
+ "userIdentity": {
798
1123
  "type": "string",
799
- "description": "The verification failure message."
1124
+ "description": "The user who added the document to the graph."
800
1125
  }
801
1126
  },
802
1127
  "required": [
803
1128
  "@context",
804
1129
  "type",
805
1130
  "id",
1131
+ "documentId",
1132
+ "documentCode",
1133
+ "documentRevision",
1134
+ "blobStorageId",
1135
+ "blobHash",
806
1136
  "dateCreated",
807
- "ownerIdentity",
808
- "attestationObject"
1137
+ "nodeIdentity",
1138
+ "userIdentity"
809
1139
  ],
810
1140
  "additionalProperties": false,
811
- "description": "Interface describing the collated attestation information."
1141
+ "description": "Interface describing a document."
812
1142
  },
813
- "BlobStorageEntry": {
1143
+ "DocumentList": {
814
1144
  "type": "object",
815
1145
  "properties": {
816
1146
  "@context": {
817
1147
  "type": "array",
818
- "minItems": 2,
819
- "items": [
1148
+ "minItems": 3,
1149
+ "description": "JSON-LD Context.",
1150
+ "prefixItems": [
1151
+ {
1152
+ "type": "string",
1153
+ "const": "https://schema.org"
1154
+ },
820
1155
  {
821
1156
  "type": "string",
822
- "const": "https://schema.twindev.org/blob-storage/"
1157
+ "const": "https://schema.twindev.org/documents/"
823
1158
  },
824
1159
  {
825
1160
  "type": "string",
826
1161
  "const": "https://schema.twindev.org/common/"
827
1162
  }
828
1163
  ],
829
- "additionalItems": {
830
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
831
- },
832
- "description": "JSON-LD Context."
1164
+ "items": {
1165
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
1166
+ }
833
1167
  },
834
1168
  "type": {
835
1169
  "type": "string",
836
- "const": "BlobStorageEntry",
1170
+ "const": "ItemList",
837
1171
  "description": "JSON-LD Type."
838
1172
  },
839
- "id": {
840
- "type": "string",
841
- "description": "The id for the blob."
842
- },
843
- "dateCreated": {
844
- "type": "string",
845
- "description": "The date/time when the entry was created."
846
- },
847
- "dateModified": {
848
- "type": "string",
849
- "description": "The date/time when the entry was modified."
850
- },
851
- "blobSize": {
852
- "type": "number",
853
- "description": "The size of the data in the blob."
854
- },
855
- "blobHash": {
856
- "type": "string",
857
- "description": "The hash of the data in the blob."
858
- },
859
- "encodingFormat": {
860
- "type": "string",
861
- "description": "The mime type for the blob."
862
- },
863
- "fileExtension": {
864
- "type": "string",
865
- "description": "The extension."
1173
+ "itemListElement": {
1174
+ "type": "array",
1175
+ "description": "The list of documents.",
1176
+ "prefixItems": [
1177
+ {
1178
+ "$ref": "#/components/schemas/Document"
1179
+ }
1180
+ ]
866
1181
  },
867
- "metadata": {
868
- "$ref": "#/components/schemas/JsonLdNodeObject"
1182
+ "edges": {
1183
+ "type": "array",
1184
+ "description": "The ids of the other vertices which are connected to the document.",
1185
+ "prefixItems": [
1186
+ {
1187
+ "type": "string"
1188
+ }
1189
+ ]
869
1190
  },
870
- "blob": {
1191
+ "nextItem": {
871
1192
  "type": "string",
872
- "description": "The blob in base64 format, included if the includeContent flag was set in the request."
1193
+ "description": "The cursor to get the next chunk of documents."
873
1194
  }
874
1195
  },
875
1196
  "required": [
876
1197
  "@context",
877
1198
  "type",
878
- "id",
879
- "dateCreated",
880
- "blobSize",
881
- "blobHash"
1199
+ "itemListElement"
882
1200
  ],
883
1201
  "additionalProperties": false,
884
- "description": "Interface describing a blob storage entry."
1202
+ "description": "Interface describing a list of document entries."
885
1203
  },
886
- "Document": {
1204
+ "DocumentManagementCreateRequest": {
887
1205
  "type": "object",
888
1206
  "properties": {
889
- "@context": {
890
- "type": "array",
891
- "minItems": 3,
892
- "items": [
893
- {
894
- "type": "string",
895
- "const": "https://schema.twindev.org/documents/"
896
- },
897
- {
898
- "type": "string",
899
- "const": "https://schema.twindev.org/common/"
900
- },
901
- {
902
- "type": "string",
903
- "const": "https://schema.org"
904
- }
905
- ],
906
- "additionalItems": {
907
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
908
- },
909
- "description": "JSON-LD Context."
910
- },
911
- "type": {
912
- "type": "string",
913
- "const": "Document",
914
- "description": "JSON-LD Type."
915
- },
916
- "id": {
917
- "type": "string",
918
- "description": "The full id of the document."
919
- },
920
1207
  "documentId": {
921
1208
  "type": "string",
922
- "description": "The id of the document."
1209
+ "description": "The document id to create."
923
1210
  },
924
1211
  "documentIdFormat": {
925
1212
  "type": "string",
926
- "description": "The format of the document id."
1213
+ "description": "The format of the document identifier."
927
1214
  },
928
1215
  "documentCode": {
929
1216
  "$ref": "#/components/schemas/UneceDocumentCodes"
930
1217
  },
931
- "documentRevision": {
932
- "type": "number",
933
- "description": "The revision of the document as a 0 based index."
934
- },
935
- "annotationObject": {
936
- "$ref": "#/components/schemas/JsonLdNodeObject"
937
- },
938
- "blobStorageId": {
939
- "type": "string",
940
- "description": "The blob storage id for the document."
941
- },
942
- "blobHash": {
943
- "type": "string",
944
- "description": "The hash of the blob data."
945
- },
946
- "blobStorageEntry": {
947
- "$ref": "#/components/schemas/BlobStorageEntry"
948
- },
949
- "attestationId": {
950
- "type": "string",
951
- "description": "The attestation for the document if one was created."
952
- },
953
- "attestationInformation": {
954
- "$ref": "#/components/schemas/AttestationInformation"
955
- },
956
- "dateCreated": {
957
- "type": "string",
958
- "description": "The date/time of when the document was created."
959
- },
960
- "dateModified": {
961
- "type": "string",
962
- "description": "The date/time of when the document was modified."
963
- },
964
- "dateDeleted": {
1218
+ "blob": {
965
1219
  "type": "string",
966
- "description": "The date/time of when the document was deleted, as we never actually remove items."
1220
+ "description": "The data to create the document with, in base64."
967
1221
  },
968
- "revisions": {
969
- "type": "array",
970
- "items": {
971
- "$ref": "#/components/schemas/Document"
972
- },
973
- "description": "The previous revisions of the document."
1222
+ "annotationObject": {
1223
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
974
1224
  },
975
- "revisionCursor": {
976
- "type": "string",
977
- "description": "The cursor to get the next chunk of revisions."
978
- }
979
- },
980
- "required": [
981
- "@context",
982
- "type",
983
- "id",
984
- "documentId",
985
- "documentCode",
986
- "documentRevision",
987
- "blobStorageId",
988
- "blobHash",
989
- "dateCreated"
990
- ],
991
- "additionalProperties": false,
992
- "description": "Interface describing a document."
993
- },
994
- "DocumentList": {
995
- "type": "object",
996
- "properties": {
997
- "@context": {
1225
+ "auditableItemGraphEdges": {
998
1226
  "type": "array",
999
- "minItems": 2,
1000
- "items": [
1001
- {
1002
- "type": "string",
1003
- "const": "https://schema.twindev.org/documents/"
1004
- },
1227
+ "description": "The auditable item graph vertices to connect the document to.",
1228
+ "prefixItems": [
1005
1229
  {
1006
- "type": "string",
1007
- "const": "https://schema.twindev.org/common/"
1230
+ "type": "object",
1231
+ "properties": {
1232
+ "id": {
1233
+ "type": "string"
1234
+ },
1235
+ "addAlias": {
1236
+ "type": "boolean"
1237
+ },
1238
+ "aliasAnnotationObject": {
1239
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1240
+ }
1241
+ },
1242
+ "required": [
1243
+ "id"
1244
+ ],
1245
+ "additionalProperties": false
1008
1246
  }
1009
- ],
1010
- "additionalItems": {
1011
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
1012
- },
1013
- "description": "JSON-LD Context."
1247
+ ]
1014
1248
  },
1015
- "type": {
1016
- "type": "string",
1017
- "const": "DocumentList",
1018
- "description": "JSON-LD Type."
1249
+ "createAttestation": {
1250
+ "type": "boolean",
1251
+ "description": "Flag to create an attestation for the document, defaults to false."
1019
1252
  },
1020
- "documents": {
1021
- "type": "array",
1022
- "items": {
1023
- "$ref": "#/components/schemas/Document"
1024
- },
1025
- "description": "The list of documents."
1253
+ "addAlias": {
1254
+ "type": "boolean",
1255
+ "description": "Flag to add the document id as an alias to the aig vertex, defaults to true."
1026
1256
  },
1027
- "cursor": {
1028
- "type": "string",
1029
- "description": "The cursor to get the next chunk of documents."
1257
+ "aliasAnnotationObject": {
1258
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1030
1259
  }
1031
1260
  },
1032
1261
  "required": [
1033
- "@context",
1034
- "type",
1035
- "documents"
1262
+ "documentId",
1263
+ "documentCode",
1264
+ "blob"
1036
1265
  ],
1037
1266
  "additionalProperties": false,
1038
- "description": "Interface describing a document entry list."
1267
+ "description": "The body parameters."
1039
1268
  },
1040
- "DocumentManagementSetRequest": {
1269
+ "DocumentManagementUpdateRequest": {
1041
1270
  "type": "object",
1042
1271
  "properties": {
1043
- "documentId": {
1044
- "type": "string",
1045
- "description": "The document id to create."
1046
- },
1047
- "documentIdFormat": {
1048
- "type": "string",
1049
- "description": "The format of the document identifier."
1050
- },
1051
- "documentCode": {
1052
- "$ref": "#/components/schemas/UneceDocumentCodes"
1053
- },
1054
1272
  "blob": {
1055
1273
  "type": "string",
1056
1274
  "description": "The data to create the document with, in base64."
1057
1275
  },
1058
1276
  "annotationObject": {
1059
- "$ref": "#/components/schemas/JsonLdNodeObject"
1277
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1060
1278
  },
1061
- "createAttestation": {
1062
- "type": "boolean",
1063
- "description": "Flag to create an attestation for the document, defaults to false"
1279
+ "auditableItemGraphEdges": {
1280
+ "type": "array",
1281
+ "description": "The auditable item graph vertices to connect the document to.",
1282
+ "prefixItems": [
1283
+ {
1284
+ "type": "object",
1285
+ "properties": {
1286
+ "id": {
1287
+ "type": "string"
1288
+ },
1289
+ "addAlias": {
1290
+ "type": "boolean"
1291
+ },
1292
+ "aliasAnnotationObject": {
1293
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1294
+ }
1295
+ },
1296
+ "required": [
1297
+ "id"
1298
+ ],
1299
+ "additionalProperties": false
1300
+ }
1301
+ ]
1064
1302
  }
1065
1303
  },
1066
- "required": [
1067
- "documentId",
1068
- "documentCode",
1069
- "blob"
1070
- ],
1071
1304
  "additionalProperties": false,
1072
1305
  "description": "The body parameters."
1073
1306
  },
@@ -1106,1075 +1339,6 @@
1106
1339
  "additionalProperties": false,
1107
1340
  "description": "Model to describe serialized error."
1108
1341
  },
1109
- "JsonLdContainerType": {
1110
- "type": "string",
1111
- "enum": [
1112
- "@language",
1113
- "@index",
1114
- "@id",
1115
- "@graph",
1116
- "@type"
1117
- ],
1118
- "description": "Helper Types"
1119
- },
1120
- "JsonLdContainerTypeArray": {
1121
- "anyOf": [
1122
- {
1123
- "type": "array",
1124
- "minItems": 2,
1125
- "items": [
1126
- {
1127
- "type": "string",
1128
- "const": "@graph"
1129
- },
1130
- {
1131
- "type": "string",
1132
- "const": "@id"
1133
- }
1134
- ],
1135
- "maxItems": 2
1136
- },
1137
- {
1138
- "type": "array",
1139
- "minItems": 2,
1140
- "items": [
1141
- {
1142
- "type": "string",
1143
- "const": "@id"
1144
- },
1145
- {
1146
- "type": "string",
1147
- "const": "@graph"
1148
- }
1149
- ],
1150
- "maxItems": 2
1151
- },
1152
- {
1153
- "type": "array",
1154
- "minItems": 3,
1155
- "items": [
1156
- {
1157
- "type": "string",
1158
- "const": "@set"
1159
- },
1160
- {
1161
- "type": "string",
1162
- "const": "@graph"
1163
- },
1164
- {
1165
- "type": "string",
1166
- "const": "@id"
1167
- }
1168
- ],
1169
- "maxItems": 3
1170
- },
1171
- {
1172
- "type": "array",
1173
- "minItems": 3,
1174
- "items": [
1175
- {
1176
- "type": "string",
1177
- "const": "@set"
1178
- },
1179
- {
1180
- "type": "string",
1181
- "const": "@id"
1182
- },
1183
- {
1184
- "type": "string",
1185
- "const": "@graph"
1186
- }
1187
- ],
1188
- "maxItems": 3
1189
- },
1190
- {
1191
- "type": "array",
1192
- "minItems": 3,
1193
- "items": [
1194
- {
1195
- "type": "string",
1196
- "const": "@graph"
1197
- },
1198
- {
1199
- "type": "string",
1200
- "const": "@set"
1201
- },
1202
- {
1203
- "type": "string",
1204
- "const": "@id"
1205
- }
1206
- ],
1207
- "maxItems": 3
1208
- },
1209
- {
1210
- "type": "array",
1211
- "minItems": 3,
1212
- "items": [
1213
- {
1214
- "type": "string",
1215
- "const": "@id"
1216
- },
1217
- {
1218
- "type": "string",
1219
- "const": "@set"
1220
- },
1221
- {
1222
- "type": "string",
1223
- "const": "@graph"
1224
- }
1225
- ],
1226
- "maxItems": 3
1227
- },
1228
- {
1229
- "type": "array",
1230
- "minItems": 3,
1231
- "items": [
1232
- {
1233
- "type": "string",
1234
- "const": "@graph"
1235
- },
1236
- {
1237
- "type": "string",
1238
- "const": "@id"
1239
- },
1240
- {
1241
- "type": "string",
1242
- "const": "@set"
1243
- }
1244
- ],
1245
- "maxItems": 3
1246
- },
1247
- {
1248
- "type": "array",
1249
- "minItems": 3,
1250
- "items": [
1251
- {
1252
- "type": "string",
1253
- "const": "@id"
1254
- },
1255
- {
1256
- "type": "string",
1257
- "const": "@graph"
1258
- },
1259
- {
1260
- "type": "string",
1261
- "const": "@set"
1262
- }
1263
- ],
1264
- "maxItems": 3
1265
- },
1266
- {
1267
- "type": "array",
1268
- "minItems": 2,
1269
- "items": [
1270
- {
1271
- "type": "string",
1272
- "const": "@set"
1273
- },
1274
- {
1275
- "$ref": "#/components/schemas/JsonLdContainerType"
1276
- }
1277
- ],
1278
- "maxItems": 2
1279
- },
1280
- {
1281
- "type": "array",
1282
- "minItems": 2,
1283
- "items": [
1284
- {
1285
- "$ref": "#/components/schemas/JsonLdContainerType"
1286
- },
1287
- {
1288
- "type": "string",
1289
- "const": "@set"
1290
- }
1291
- ],
1292
- "maxItems": 2
1293
- }
1294
- ],
1295
- "description": "Helper Types."
1296
- },
1297
- "JsonLdContextDefinition": {
1298
- "type": "object",
1299
- "properties": {
1300
- "@base": {
1301
- "type": [
1302
- "string",
1303
- "null"
1304
- ]
1305
- },
1306
- "@direction": {
1307
- "type": [
1308
- "string",
1309
- "null"
1310
- ],
1311
- "enum": [
1312
- "ltr",
1313
- "rtl",
1314
- null
1315
- ]
1316
- },
1317
- "@import": {
1318
- "type": "string"
1319
- },
1320
- "@language": {
1321
- "type": "string"
1322
- },
1323
- "@propagate": {
1324
- "type": "boolean"
1325
- },
1326
- "@protected": {
1327
- "type": "boolean"
1328
- },
1329
- "@type": {
1330
- "type": "object",
1331
- "properties": {
1332
- "@container": {
1333
- "type": "string",
1334
- "const": "@set"
1335
- },
1336
- "@protected": {
1337
- "type": "boolean"
1338
- }
1339
- },
1340
- "required": [
1341
- "@container"
1342
- ],
1343
- "additionalProperties": false
1344
- },
1345
- "@version": {
1346
- "type": "string",
1347
- "const": "1.1"
1348
- },
1349
- "@vocab": {
1350
- "type": [
1351
- "string",
1352
- "null"
1353
- ]
1354
- }
1355
- },
1356
- "additionalProperties": {
1357
- "anyOf": [
1358
- {
1359
- "type": "null"
1360
- },
1361
- {
1362
- "type": "string"
1363
- },
1364
- {
1365
- "$ref": "#/components/schemas/JsonLdExpandedTermDefinition"
1366
- }
1367
- ]
1368
- },
1369
- "description": "A context definition defines a local context in a node object."
1370
- },
1371
- "JsonLdContextDefinitionElement": {
1372
- "anyOf": [
1373
- {
1374
- "type": "null"
1375
- },
1376
- {
1377
- "type": "string"
1378
- },
1379
- {
1380
- "$ref": "#/components/schemas/JsonLdContextDefinition"
1381
- }
1382
- ],
1383
- "description": "A context definition element is used to define the types of a context definition."
1384
- },
1385
- "JsonLdContextDefinitionRoot": {
1386
- "anyOf": [
1387
- {
1388
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
1389
- },
1390
- {
1391
- "type": "array",
1392
- "items": {
1393
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
1394
- }
1395
- }
1396
- ],
1397
- "description": "A context definition root is used to define the root of a context definition."
1398
- },
1399
- "JsonLdExpandedTermDefinition": {
1400
- "anyOf": [
1401
- {
1402
- "type": "object",
1403
- "additionalProperties": false,
1404
- "properties": {
1405
- "@id": {
1406
- "anyOf": [
1407
- {
1408
- "type": "string"
1409
- },
1410
- {
1411
- "type": "array",
1412
- "items": {
1413
- "type": "string"
1414
- }
1415
- },
1416
- {
1417
- "type": "null"
1418
- }
1419
- ]
1420
- },
1421
- "@nest": {
1422
- "type": "string"
1423
- },
1424
- "@container": {
1425
- "anyOf": [
1426
- {
1427
- "type": "string",
1428
- "const": "@list"
1429
- },
1430
- {
1431
- "type": "string",
1432
- "const": "@set"
1433
- },
1434
- {
1435
- "$ref": "#/components/schemas/JsonLdContainerType"
1436
- },
1437
- {
1438
- "type": "array",
1439
- "items": {
1440
- "anyOf": [
1441
- {
1442
- "type": "string",
1443
- "const": "@list"
1444
- },
1445
- {
1446
- "type": "string",
1447
- "const": "@set"
1448
- },
1449
- {
1450
- "$ref": "#/components/schemas/JsonLdContainerType"
1451
- }
1452
- ]
1453
- }
1454
- },
1455
- {
1456
- "$ref": "#/components/schemas/JsonLdContainerTypeArray"
1457
- },
1458
- {
1459
- "type": "null"
1460
- }
1461
- ]
1462
- },
1463
- "@type": {
1464
- "type": "string"
1465
- },
1466
- "@language": {
1467
- "type": "string"
1468
- },
1469
- "@index": {
1470
- "type": "string"
1471
- },
1472
- "@context": {
1473
- "$ref": "#/components/schemas/JsonLdContextDefinition"
1474
- },
1475
- "@prefix": {
1476
- "type": "boolean"
1477
- },
1478
- "@propagate": {
1479
- "type": "boolean"
1480
- },
1481
- "@protected": {
1482
- "type": "boolean"
1483
- }
1484
- }
1485
- },
1486
- {
1487
- "type": "object",
1488
- "additionalProperties": false,
1489
- "properties": {
1490
- "@reverse": {
1491
- "type": "string"
1492
- },
1493
- "@container": {
1494
- "type": [
1495
- "string",
1496
- "null"
1497
- ],
1498
- "enum": [
1499
- "@set",
1500
- "@index",
1501
- null
1502
- ]
1503
- },
1504
- "@type": {
1505
- "type": "string"
1506
- },
1507
- "@language": {
1508
- "type": "string"
1509
- },
1510
- "@index": {
1511
- "type": "string"
1512
- },
1513
- "@context": {
1514
- "$ref": "#/components/schemas/JsonLdContextDefinition"
1515
- },
1516
- "@prefix": {
1517
- "type": "boolean"
1518
- },
1519
- "@propagate": {
1520
- "type": "boolean"
1521
- },
1522
- "@protected": {
1523
- "type": "boolean"
1524
- }
1525
- },
1526
- "required": [
1527
- "@reverse"
1528
- ]
1529
- }
1530
- ],
1531
- "description": "An expanded term definition is used to describe the mapping between a term and its expanded identifier, as well as other properties of the value associated with the term when it is used as key in a node object."
1532
- },
1533
- "JsonLdGraphObject": {
1534
- "type": "object",
1535
- "properties": {
1536
- "@graph": {
1537
- "anyOf": [
1538
- {
1539
- "$ref": "#/components/schemas/JsonLdNodeObject"
1540
- },
1541
- {
1542
- "type": "array",
1543
- "items": {
1544
- "$ref": "#/components/schemas/JsonLdNodeObject"
1545
- }
1546
- }
1547
- ]
1548
- },
1549
- "@index": {
1550
- "$ref": "#/components/schemas/JsonLdKeyword"
1551
- },
1552
- "@id": {
1553
- "$ref": "#/components/schemas/JsonLdKeyword"
1554
- },
1555
- "@context": {
1556
- "$ref": "#/components/schemas/JsonLdKeyword"
1557
- }
1558
- },
1559
- "required": [
1560
- "@graph"
1561
- ],
1562
- "additionalProperties": false,
1563
- "description": "A graph object represents a named graph, which MAY include an explicit graph name."
1564
- },
1565
- "JsonLdIdMap": {
1566
- "type": "object",
1567
- "additionalProperties": {
1568
- "$ref": "#/components/schemas/JsonLdNodeObject"
1569
- },
1570
- "description": "An id map is used to associate an IRI with a value that allows easy programmatic access."
1571
- },
1572
- "JsonLdIncludedBlock": {
1573
- "anyOf": [
1574
- {
1575
- "$ref": "#/components/schemas/JsonLdNodeObject"
1576
- },
1577
- {
1578
- "type": "array",
1579
- "items": {
1580
- "$ref": "#/components/schemas/JsonLdNodeObject"
1581
- }
1582
- }
1583
- ],
1584
- "description": "An included block is used to provide a set of node objects."
1585
- },
1586
- "JsonLdIndexMap": {
1587
- "type": "object",
1588
- "additionalProperties": {
1589
- "anyOf": [
1590
- {
1591
- "$ref": "#/components/schemas/JsonLdIndexMapItem"
1592
- },
1593
- {
1594
- "type": "array",
1595
- "items": {
1596
- "$ref": "#/components/schemas/JsonLdIndexMapItem"
1597
- }
1598
- }
1599
- ]
1600
- },
1601
- "description": "An index map allows keys that have no semantic meaning, but should be preserved regardless, to be used in JSON-LD documents."
1602
- },
1603
- "JsonLdIndexMapItem": {
1604
- "anyOf": [
1605
- {
1606
- "type": "null"
1607
- },
1608
- {
1609
- "type": "boolean"
1610
- },
1611
- {
1612
- "type": "number"
1613
- },
1614
- {
1615
- "type": "string"
1616
- },
1617
- {
1618
- "$ref": "#/components/schemas/JsonLdNodeObject"
1619
- },
1620
- {
1621
- "$ref": "#/components/schemas/JsonLdValueObject"
1622
- },
1623
- {
1624
- "$ref": "#/components/schemas/JsonLdListObject"
1625
- },
1626
- {
1627
- "$ref": "#/components/schemas/JsonLdSetObject"
1628
- }
1629
- ],
1630
- "description": "The items that can be stored in an index map."
1631
- },
1632
- "JsonLdJsonArray": {
1633
- "type": "array",
1634
- "items": {
1635
- "$ref": "#/components/schemas/JsonLdJsonValue"
1636
- },
1637
- "description": "JSON Type for array."
1638
- },
1639
- "JsonLdJsonObject": {
1640
- "type": "object",
1641
- "additionalProperties": {
1642
- "anyOf": [
1643
- {
1644
- "$ref": "#/components/schemas/JsonLdJsonValue"
1645
- },
1646
- {
1647
- "not": {}
1648
- }
1649
- ]
1650
- },
1651
- "description": "JSON Type for object."
1652
- },
1653
- "JsonLdJsonPrimitive": {
1654
- "type": [
1655
- "string",
1656
- "number",
1657
- "boolean",
1658
- "null"
1659
- ],
1660
- "description": "JSON Primitive."
1661
- },
1662
- "JsonLdJsonValue": {
1663
- "anyOf": [
1664
- {
1665
- "$ref": "#/components/schemas/JsonLdJsonPrimitive"
1666
- },
1667
- {
1668
- "$ref": "#/components/schemas/JsonLdJsonArray"
1669
- },
1670
- {
1671
- "$ref": "#/components/schemas/JsonLdJsonObject"
1672
- }
1673
- ],
1674
- "description": "JSON Value."
1675
- },
1676
- "JsonLdKeyword": {
1677
- "type": "object",
1678
- "properties": {
1679
- "@base": {
1680
- "type": [
1681
- "string",
1682
- "null"
1683
- ]
1684
- },
1685
- "@container": {
1686
- "anyOf": [
1687
- {
1688
- "type": "string",
1689
- "const": "@list"
1690
- },
1691
- {
1692
- "type": "string",
1693
- "const": "@set"
1694
- },
1695
- {
1696
- "$ref": "#/components/schemas/JsonLdContainerType"
1697
- },
1698
- {
1699
- "type": "array",
1700
- "items": {
1701
- "anyOf": [
1702
- {
1703
- "type": "string",
1704
- "const": "@list"
1705
- },
1706
- {
1707
- "type": "string",
1708
- "const": "@set"
1709
- },
1710
- {
1711
- "$ref": "#/components/schemas/JsonLdContainerType"
1712
- }
1713
- ]
1714
- }
1715
- },
1716
- {
1717
- "$ref": "#/components/schemas/JsonLdContainerTypeArray"
1718
- },
1719
- {
1720
- "type": "null"
1721
- }
1722
- ]
1723
- },
1724
- "@context": {
1725
- "$ref": "#/components/schemas/JsonLdContextDefinitionRoot"
1726
- },
1727
- "@direction": {
1728
- "type": [
1729
- "string",
1730
- "null"
1731
- ],
1732
- "enum": [
1733
- "ltr",
1734
- "rtl",
1735
- null
1736
- ]
1737
- },
1738
- "@graph": {
1739
- "anyOf": [
1740
- {
1741
- "$ref": "#/components/schemas/JsonLdValueObject"
1742
- },
1743
- {
1744
- "$ref": "#/components/schemas/JsonLdNodeObject"
1745
- },
1746
- {
1747
- "type": "array",
1748
- "items": {
1749
- "anyOf": [
1750
- {
1751
- "$ref": "#/components/schemas/JsonLdValueObject"
1752
- },
1753
- {
1754
- "$ref": "#/components/schemas/JsonLdNodeObject"
1755
- }
1756
- ]
1757
- }
1758
- }
1759
- ]
1760
- },
1761
- "@id": {
1762
- "anyOf": [
1763
- {
1764
- "type": "string"
1765
- },
1766
- {
1767
- "type": "array",
1768
- "items": {
1769
- "type": "string"
1770
- }
1771
- }
1772
- ]
1773
- },
1774
- "@import": {
1775
- "type": "string"
1776
- },
1777
- "@included": {
1778
- "$ref": "#/components/schemas/JsonLdIncludedBlock"
1779
- },
1780
- "@index": {
1781
- "type": "string"
1782
- },
1783
- "@json": {
1784
- "type": "string",
1785
- "const": "@json"
1786
- },
1787
- "@language": {
1788
- "type": "string"
1789
- },
1790
- "@list": {
1791
- "anyOf": [
1792
- {
1793
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1794
- },
1795
- {
1796
- "type": "array",
1797
- "items": {
1798
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1799
- }
1800
- }
1801
- ]
1802
- },
1803
- "@nest": {
1804
- "type": "object"
1805
- },
1806
- "@none": {
1807
- "type": "string",
1808
- "const": "@none"
1809
- },
1810
- "@prefix": {
1811
- "type": "boolean"
1812
- },
1813
- "@propagate": {
1814
- "type": "boolean"
1815
- },
1816
- "@protected": {
1817
- "type": "boolean"
1818
- },
1819
- "@reverse": {
1820
- "type": "string"
1821
- },
1822
- "@set": {
1823
- "anyOf": [
1824
- {
1825
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1826
- },
1827
- {
1828
- "type": "array",
1829
- "items": {
1830
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1831
- }
1832
- }
1833
- ]
1834
- },
1835
- "@type": {
1836
- "type": "string"
1837
- },
1838
- "@value": {
1839
- "type": [
1840
- "null",
1841
- "boolean",
1842
- "number",
1843
- "string"
1844
- ]
1845
- },
1846
- "@version": {
1847
- "type": "string",
1848
- "const": "1.1"
1849
- },
1850
- "@vocab": {
1851
- "type": [
1852
- "string",
1853
- "null"
1854
- ]
1855
- }
1856
- },
1857
- "required": [
1858
- "@base",
1859
- "@container",
1860
- "@context",
1861
- "@direction",
1862
- "@graph",
1863
- "@id",
1864
- "@import",
1865
- "@included",
1866
- "@index",
1867
- "@json",
1868
- "@language",
1869
- "@list",
1870
- "@nest",
1871
- "@none",
1872
- "@prefix",
1873
- "@propagate",
1874
- "@protected",
1875
- "@reverse",
1876
- "@set",
1877
- "@type",
1878
- "@value",
1879
- "@version",
1880
- "@vocab"
1881
- ],
1882
- "additionalProperties": false,
1883
- "description": "A list of keywords and their types. Only used for internal reference; not an actual interface. Not for export."
1884
- },
1885
- "JsonLdLanguageMap": {
1886
- "type": "object",
1887
- "additionalProperties": {
1888
- "anyOf": [
1889
- {
1890
- "type": "null"
1891
- },
1892
- {
1893
- "type": "string"
1894
- },
1895
- {
1896
- "type": "array",
1897
- "items": {
1898
- "type": "string"
1899
- }
1900
- }
1901
- ]
1902
- },
1903
- "description": "A language map is used to associate a language with a value in a way that allows easy programmatic access."
1904
- },
1905
- "JsonLdListObject": {
1906
- "type": "object",
1907
- "properties": {
1908
- "@list": {
1909
- "$ref": "#/components/schemas/JsonLdKeyword"
1910
- },
1911
- "@index": {
1912
- "$ref": "#/components/schemas/JsonLdKeyword"
1913
- }
1914
- },
1915
- "required": [
1916
- "@list"
1917
- ],
1918
- "additionalProperties": false,
1919
- "description": "A list represents an ordered set of values."
1920
- },
1921
- "JsonLdListOrSetItem": {
1922
- "anyOf": [
1923
- {
1924
- "type": "null"
1925
- },
1926
- {
1927
- "type": "boolean"
1928
- },
1929
- {
1930
- "type": "number"
1931
- },
1932
- {
1933
- "type": "string"
1934
- },
1935
- {
1936
- "$ref": "#/components/schemas/JsonLdNodeObject"
1937
- },
1938
- {
1939
- "$ref": "#/components/schemas/JsonLdValueObject"
1940
- }
1941
- ],
1942
- "description": "A list or set item can be a null, boolean, number, string, node object, or value object."
1943
- },
1944
- "JsonLdNodeObject": {
1945
- "type": "object",
1946
- "additionalProperties": {
1947
- "anyOf": [
1948
- {
1949
- "$ref": "#/components/schemas/JsonLdNodePrimitive"
1950
- },
1951
- {
1952
- "$ref": "#/components/schemas/JsonLdLanguageMap"
1953
- },
1954
- {
1955
- "$ref": "#/components/schemas/JsonLdIndexMap"
1956
- },
1957
- {
1958
- "$ref": "#/components/schemas/JsonLdIncludedBlock"
1959
- },
1960
- {
1961
- "$ref": "#/components/schemas/JsonLdIdMap"
1962
- },
1963
- {
1964
- "$ref": "#/components/schemas/JsonLdTypeMap"
1965
- },
1966
- {
1967
- "type": "array"
1968
- }
1969
- ]
1970
- },
1971
- "properties": {
1972
- "@context": {
1973
- "$ref": "#/components/schemas/JsonLdKeyword"
1974
- },
1975
- "@id": {
1976
- "$ref": "#/components/schemas/JsonLdKeyword"
1977
- },
1978
- "@included": {
1979
- "$ref": "#/components/schemas/JsonLdKeyword"
1980
- },
1981
- "@graph": {
1982
- "anyOf": [
1983
- {
1984
- "$ref": "#/components/schemas/JsonLdNodeObject"
1985
- },
1986
- {
1987
- "type": "array",
1988
- "items": {
1989
- "$ref": "#/components/schemas/JsonLdNodeObject"
1990
- }
1991
- }
1992
- ]
1993
- },
1994
- "@nest": {
1995
- "anyOf": [
1996
- {
1997
- "$ref": "#/components/schemas/JsonLdJsonObject"
1998
- },
1999
- {
2000
- "type": "array",
2001
- "items": {
2002
- "$ref": "#/components/schemas/JsonLdJsonObject"
2003
- }
2004
- }
2005
- ]
2006
- },
2007
- "@type": {
2008
- "anyOf": [
2009
- {
2010
- "$ref": "#/components/schemas/JsonLdKeyword"
2011
- },
2012
- {
2013
- "type": "array",
2014
- "items": {
2015
- "$ref": "#/components/schemas/JsonLdKeyword"
2016
- }
2017
- }
2018
- ]
2019
- },
2020
- "@reverse": {
2021
- "type": "object",
2022
- "additionalProperties": {
2023
- "$ref": "#/components/schemas/JsonLdKeyword"
2024
- }
2025
- },
2026
- "@index": {
2027
- "$ref": "#/components/schemas/JsonLdKeyword"
2028
- }
2029
- },
2030
- "description": "A node object represents zero or more properties of a node in the graph serialized by the JSON-LD document."
2031
- },
2032
- "JsonLdNodePrimitive": {
2033
- "anyOf": [
2034
- {
2035
- "type": "null"
2036
- },
2037
- {
2038
- "type": "boolean"
2039
- },
2040
- {
2041
- "type": "number"
2042
- },
2043
- {
2044
- "type": "string"
2045
- },
2046
- {
2047
- "$ref": "#/components/schemas/JsonLdNodeObject"
2048
- },
2049
- {
2050
- "$ref": "#/components/schemas/JsonLdGraphObject"
2051
- },
2052
- {
2053
- "$ref": "#/components/schemas/JsonLdValueObject"
2054
- },
2055
- {
2056
- "$ref": "#/components/schemas/JsonLdListObject"
2057
- },
2058
- {
2059
- "$ref": "#/components/schemas/JsonLdSetObject"
2060
- }
2061
- ],
2062
- "description": "A node primitive is a JSON-LD value which is not one of the defined NodeObject properties."
2063
- },
2064
- "JsonLdSetObject": {
2065
- "type": "object",
2066
- "properties": {
2067
- "@set": {
2068
- "$ref": "#/components/schemas/JsonLdKeyword"
2069
- },
2070
- "@index": {
2071
- "$ref": "#/components/schemas/JsonLdKeyword"
2072
- }
2073
- },
2074
- "required": [
2075
- "@set"
2076
- ],
2077
- "additionalProperties": false,
2078
- "description": "A set represents an unordered set of values."
2079
- },
2080
- "JsonLdTypeMap": {
2081
- "type": "object",
2082
- "additionalProperties": {
2083
- "anyOf": [
2084
- {
2085
- "type": "string"
2086
- },
2087
- {
2088
- "$ref": "#/components/schemas/JsonLdNodeObject"
2089
- }
2090
- ]
2091
- },
2092
- "description": "A type map is used to associate an IRI with a value that allows easy programmatic access."
2093
- },
2094
- "JsonLdValueObject": {
2095
- "anyOf": [
2096
- {
2097
- "type": "object",
2098
- "additionalProperties": false,
2099
- "properties": {
2100
- "@value": {
2101
- "$ref": "#/components/schemas/JsonLdKeyword"
2102
- },
2103
- "@language": {
2104
- "$ref": "#/components/schemas/JsonLdKeyword"
2105
- },
2106
- "@direction": {
2107
- "$ref": "#/components/schemas/JsonLdKeyword"
2108
- },
2109
- "@index": {
2110
- "$ref": "#/components/schemas/JsonLdKeyword"
2111
- },
2112
- "@context": {
2113
- "$ref": "#/components/schemas/JsonLdKeyword"
2114
- }
2115
- },
2116
- "required": [
2117
- "@value"
2118
- ]
2119
- },
2120
- {
2121
- "type": "object",
2122
- "additionalProperties": false,
2123
- "properties": {
2124
- "@value": {
2125
- "$ref": "#/components/schemas/JsonLdKeyword"
2126
- },
2127
- "@type": {
2128
- "$ref": "#/components/schemas/JsonLdKeyword"
2129
- },
2130
- "@index": {
2131
- "$ref": "#/components/schemas/JsonLdKeyword"
2132
- },
2133
- "@context": {
2134
- "$ref": "#/components/schemas/JsonLdKeyword"
2135
- }
2136
- },
2137
- "required": [
2138
- "@type",
2139
- "@value"
2140
- ]
2141
- },
2142
- {
2143
- "type": "object",
2144
- "additionalProperties": false,
2145
- "properties": {
2146
- "@value": {
2147
- "anyOf": [
2148
- {
2149
- "$ref": "#/components/schemas/JsonLdKeyword"
2150
- },
2151
- {
2152
- "$ref": "#/components/schemas/JsonLdJsonObject"
2153
- },
2154
- {
2155
- "$ref": "#/components/schemas/JsonLdJsonArray"
2156
- }
2157
- ]
2158
- },
2159
- "@type": {
2160
- "type": "string",
2161
- "const": "@json"
2162
- },
2163
- "@index": {
2164
- "$ref": "#/components/schemas/JsonLdKeyword"
2165
- },
2166
- "@context": {
2167
- "$ref": "#/components/schemas/JsonLdKeyword"
2168
- }
2169
- },
2170
- "required": [
2171
- "@type",
2172
- "@value"
2173
- ]
2174
- }
2175
- ],
2176
- "description": "A value object is used to explicitly associate a type or a language with a value to create a typed value or a language-tagged string and possibly associate a base direction."
2177
- },
2178
1342
  "NotFoundResponse": {
2179
1343
  "type": "object",
2180
1344
  "additionalProperties": false,