@twin.org/blob-storage-service 0.0.1-next.22 → 0.0.1-next.23

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.
@@ -45,7 +45,7 @@
45
45
  "blobStorageCreateRequestExample": {
46
46
  "value": {
47
47
  "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==",
48
- "metadata": {
48
+ "annotationObject": {
49
49
  "@context": "https://schema.org",
50
50
  "@type": "DigitalDocument",
51
51
  "name": "myfile.pdf"
@@ -210,13 +210,15 @@
210
210
  "blobStorageListResponseExample": {
211
211
  "value": {
212
212
  "@context": [
213
- "https://schema.twindev.org/blob-storage/"
213
+ "https://schema.twindev.org/blob-storage/",
214
+ "https://schema.twindev.org/common/"
214
215
  ],
215
216
  "type": "BlobStorageEntryList",
216
217
  "entries": [
217
218
  {
218
219
  "@context": [
219
220
  "https://schema.twindev.org/blob-storage/",
221
+ "https://schema.twindev.org/common/",
220
222
  "https://schema.org"
221
223
  ],
222
224
  "type": "BlobStorageEntry",
@@ -224,8 +226,9 @@
224
226
  "dateCreated": "2024-01-01T00:00:00Z",
225
227
  "encodingFormat": "application/pdf",
226
228
  "blobSize": 42,
229
+ "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
227
230
  "fileExtension": "pdf",
228
- "metadata": {
231
+ "annotationObject": {
229
232
  "@context": "https://schema.org",
230
233
  "@type": "DigitalDocument",
231
234
  "name": "myfile.pdf"
@@ -245,13 +248,15 @@
245
248
  "blobStorageListResponseJsonLdExample": {
246
249
  "value": {
247
250
  "@context": [
248
- "https://schema.twindev.org/blob-storage/"
251
+ "https://schema.twindev.org/blob-storage/",
252
+ "https://schema.twindev.org/common/"
249
253
  ],
250
254
  "type": "BlobStorageEntryList",
251
255
  "entries": [
252
256
  {
253
257
  "@context": [
254
258
  "https://schema.twindev.org/blob-storage/",
259
+ "https://schema.twindev.org/common/",
255
260
  "https://schema.org"
256
261
  ],
257
262
  "type": "BlobStorageEntry",
@@ -259,8 +264,9 @@
259
264
  "dateCreated": "2024-01-01T00:00:00Z",
260
265
  "encodingFormat": "application/pdf",
261
266
  "blobSize": 42,
267
+ "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
262
268
  "fileExtension": "pdf",
263
- "metadata": {
269
+ "annotationObject": {
264
270
  "@context": "https://schema.org",
265
271
  "@type": "DigitalDocument",
266
272
  "name": "myfile.pdf"
@@ -358,7 +364,7 @@
358
364
  "/blob-storage/{id}": {
359
365
  "get": {
360
366
  "operationId": "blobStorageGet",
361
- "summary": "Get the metadata for an item from blob storage",
367
+ "summary": "Get the annotation for an item from blob storage",
362
368
  "tags": [
363
369
  "Blob Storage"
364
370
  ],
@@ -376,7 +382,7 @@
376
382
  },
377
383
  {
378
384
  "name": "includeContent",
379
- "description": "Include the content in the response, otherwise only metadata is returned.",
385
+ "description": "Include the content in the response, otherwise only annotation is returned.",
380
386
  "in": "query",
381
387
  "required": false,
382
388
  "schema": {
@@ -412,6 +418,7 @@
412
418
  "value": {
413
419
  "@context": [
414
420
  "https://schema.twindev.org/blob-storage/",
421
+ "https://schema.twindev.org/common/",
415
422
  "https://schema.org"
416
423
  ],
417
424
  "type": "BlobStorageEntry",
@@ -419,8 +426,9 @@
419
426
  "dateCreated": "2024-01-01T00:00:00Z",
420
427
  "encodingFormat": "application/pdf",
421
428
  "blobSize": 42,
429
+ "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
422
430
  "fileExtension": "pdf",
423
- "metadata": {
431
+ "annotationObject": {
424
432
  "@context": "https://schema.org",
425
433
  "@type": "DigitalDocument",
426
434
  "name": "myfile.pdf"
@@ -439,6 +447,7 @@
439
447
  "value": {
440
448
  "@context": [
441
449
  "https://schema.twindev.org/blob-storage/",
450
+ "https://schema.twindev.org/common/",
442
451
  "https://schema.org"
443
452
  ],
444
453
  "type": "BlobStorageEntry",
@@ -446,8 +455,9 @@
446
455
  "dateCreated": "2024-01-01T00:00:00Z",
447
456
  "encodingFormat": "application/pdf",
448
457
  "blobSize": 42,
458
+ "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
449
459
  "fileExtension": "pdf",
450
- "metadata": {
460
+ "annotationObject": {
451
461
  "@context": "https://schema.org",
452
462
  "@type": "DigitalDocument",
453
463
  "name": "myfile.pdf"
@@ -541,7 +551,7 @@
541
551
  },
542
552
  "put": {
543
553
  "operationId": "blobStorageUpdate",
544
- "summary": "Update the metadata for an item in blob storage",
554
+ "summary": "Update the annotation for an item in blob storage",
545
555
  "tags": [
546
556
  "Blob Storage"
547
557
  ],
@@ -574,7 +584,7 @@
574
584
  "examples": {
575
585
  "blobStorageUpdateRequestExample": {
576
586
  "value": {
577
- "metadata": {
587
+ "annotationObject": {
578
588
  "@context": "https://schema.org",
579
589
  "@type": "DigitalDocument",
580
590
  "name": "myfile.pdf"
@@ -911,7 +921,7 @@
911
921
  "type": "string",
912
922
  "description": "The extension of the blob, will be detected if left undefined."
913
923
  },
914
- "metadata": {
924
+ "annotationObject": {
915
925
  "$ref": "#/components/schemas/JsonLdNodeObject"
916
926
  },
917
927
  "namespace": {
@@ -929,25 +939,21 @@
929
939
  "type": "object",
930
940
  "properties": {
931
941
  "@context": {
932
- "anyOf": [
942
+ "type": "array",
943
+ "minItems": 2,
944
+ "items": [
933
945
  {
934
946
  "type": "string",
935
947
  "const": "https://schema.twindev.org/blob-storage/"
936
948
  },
937
949
  {
938
- "type": "array",
939
- "minItems": 1,
940
- "items": [
941
- {
942
- "type": "string",
943
- "const": "https://schema.twindev.org/blob-storage/"
944
- }
945
- ],
946
- "additionalItems": {
947
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
948
- }
950
+ "type": "string",
951
+ "const": "https://schema.twindev.org/common/"
949
952
  }
950
953
  ],
954
+ "additionalItems": {
955
+ "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
956
+ },
951
957
  "description": "JSON-LD Context."
952
958
  },
953
959
  "type": {
@@ -971,6 +977,10 @@
971
977
  "type": "number",
972
978
  "description": "The size of the data in the blob."
973
979
  },
980
+ "blobHash": {
981
+ "type": "string",
982
+ "description": "The hash of the data in the blob."
983
+ },
974
984
  "encodingFormat": {
975
985
  "type": "string",
976
986
  "description": "The mime type for the blob."
@@ -979,7 +989,7 @@
979
989
  "type": "string",
980
990
  "description": "The extension."
981
991
  },
982
- "metadata": {
992
+ "annotationObject": {
983
993
  "$ref": "#/components/schemas/JsonLdNodeObject"
984
994
  },
985
995
  "blob": {
@@ -992,7 +1002,8 @@
992
1002
  "type",
993
1003
  "id",
994
1004
  "dateCreated",
995
- "blobSize"
1005
+ "blobSize",
1006
+ "blobHash"
996
1007
  ],
997
1008
  "additionalProperties": false,
998
1009
  "description": "Interface describing a blob storage entry."
@@ -1001,25 +1012,21 @@
1001
1012
  "type": "object",
1002
1013
  "properties": {
1003
1014
  "@context": {
1004
- "anyOf": [
1015
+ "type": "array",
1016
+ "minItems": 2,
1017
+ "items": [
1005
1018
  {
1006
1019
  "type": "string",
1007
1020
  "const": "https://schema.twindev.org/blob-storage/"
1008
1021
  },
1009
1022
  {
1010
- "type": "array",
1011
- "minItems": 1,
1012
- "items": [
1013
- {
1014
- "type": "string",
1015
- "const": "https://schema.twindev.org/blob-storage/"
1016
- }
1017
- ],
1018
- "additionalItems": {
1019
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
1020
- }
1023
+ "type": "string",
1024
+ "const": "https://schema.twindev.org/common/"
1021
1025
  }
1022
1026
  ],
1027
+ "additionalItems": {
1028
+ "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
1029
+ },
1023
1030
  "description": "JSON-LD Context."
1024
1031
  },
1025
1032
  "type": {
@@ -1058,7 +1065,7 @@
1058
1065
  "type": "string",
1059
1066
  "description": "The extension of the blob, will be detected if left undefined."
1060
1067
  },
1061
- "metadata": {
1068
+ "annotationObject": {
1062
1069
  "$ref": "#/components/schemas/JsonLdNodeObject"
1063
1070
  }
1064
1071
  },
@@ -1108,7 +1115,8 @@
1108
1115
  "@id",
1109
1116
  "@graph",
1110
1117
  "@type"
1111
- ]
1118
+ ],
1119
+ "description": "Helper Types"
1112
1120
  },
1113
1121
  "JsonLdContainerTypeArray": {
1114
1122
  "anyOf": [
@@ -1284,28 +1292,40 @@
1284
1292
  ],
1285
1293
  "maxItems": 2
1286
1294
  }
1287
- ]
1295
+ ],
1296
+ "description": "Helper Types."
1288
1297
  },
1289
1298
  "JsonLdContextDefinition": {
1290
1299
  "type": "object",
1291
1300
  "properties": {
1292
1301
  "@base": {
1293
- "$ref": "#/components/schemas/JsonLdKeyword"
1302
+ "type": [
1303
+ "string",
1304
+ "null"
1305
+ ]
1294
1306
  },
1295
1307
  "@direction": {
1296
- "$ref": "#/components/schemas/JsonLdKeyword"
1308
+ "type": [
1309
+ "string",
1310
+ "null"
1311
+ ],
1312
+ "enum": [
1313
+ "ltr",
1314
+ "rtl",
1315
+ null
1316
+ ]
1297
1317
  },
1298
1318
  "@import": {
1299
- "$ref": "#/components/schemas/JsonLdKeyword"
1319
+ "type": "string"
1300
1320
  },
1301
1321
  "@language": {
1302
- "$ref": "#/components/schemas/JsonLdKeyword"
1322
+ "type": "string"
1303
1323
  },
1304
1324
  "@propagate": {
1305
- "$ref": "#/components/schemas/JsonLdKeyword"
1325
+ "type": "boolean"
1306
1326
  },
1307
1327
  "@protected": {
1308
- "$ref": "#/components/schemas/JsonLdKeyword"
1328
+ "type": "boolean"
1309
1329
  },
1310
1330
  "@type": {
1311
1331
  "type": "object",
@@ -1315,7 +1335,7 @@
1315
1335
  "const": "@set"
1316
1336
  },
1317
1337
  "@protected": {
1318
- "$ref": "#/components/schemas/JsonLdKeyword"
1338
+ "type": "boolean"
1319
1339
  }
1320
1340
  },
1321
1341
  "required": [
@@ -1324,10 +1344,14 @@
1324
1344
  "additionalProperties": false
1325
1345
  },
1326
1346
  "@version": {
1327
- "$ref": "#/components/schemas/JsonLdKeyword"
1347
+ "type": "string",
1348
+ "const": "1.1"
1328
1349
  },
1329
1350
  "@vocab": {
1330
- "$ref": "#/components/schemas/JsonLdKeyword"
1351
+ "type": [
1352
+ "string",
1353
+ "null"
1354
+ ]
1331
1355
  }
1332
1356
  },
1333
1357
  "additionalProperties": {
@@ -1382,7 +1406,13 @@
1382
1406
  "@id": {
1383
1407
  "anyOf": [
1384
1408
  {
1385
- "$ref": "#/components/schemas/JsonLdKeyword"
1409
+ "type": "string"
1410
+ },
1411
+ {
1412
+ "type": "array",
1413
+ "items": {
1414
+ "type": "string"
1415
+ }
1386
1416
  },
1387
1417
  {
1388
1418
  "type": "null"
@@ -1393,28 +1423,64 @@
1393
1423
  "type": "string"
1394
1424
  },
1395
1425
  "@container": {
1396
- "$ref": "#/components/schemas/JsonLdKeyword"
1426
+ "anyOf": [
1427
+ {
1428
+ "type": "string",
1429
+ "const": "@list"
1430
+ },
1431
+ {
1432
+ "type": "string",
1433
+ "const": "@set"
1434
+ },
1435
+ {
1436
+ "$ref": "#/components/schemas/JsonLdContainerType"
1437
+ },
1438
+ {
1439
+ "type": "array",
1440
+ "items": {
1441
+ "anyOf": [
1442
+ {
1443
+ "type": "string",
1444
+ "const": "@list"
1445
+ },
1446
+ {
1447
+ "type": "string",
1448
+ "const": "@set"
1449
+ },
1450
+ {
1451
+ "$ref": "#/components/schemas/JsonLdContainerType"
1452
+ }
1453
+ ]
1454
+ }
1455
+ },
1456
+ {
1457
+ "$ref": "#/components/schemas/JsonLdContainerTypeArray"
1458
+ },
1459
+ {
1460
+ "type": "null"
1461
+ }
1462
+ ]
1397
1463
  },
1398
1464
  "@type": {
1399
1465
  "type": "string"
1400
1466
  },
1401
1467
  "@language": {
1402
- "$ref": "#/components/schemas/JsonLdKeyword"
1468
+ "type": "string"
1403
1469
  },
1404
1470
  "@index": {
1405
- "$ref": "#/components/schemas/JsonLdKeyword"
1471
+ "type": "string"
1406
1472
  },
1407
1473
  "@context": {
1408
1474
  "$ref": "#/components/schemas/JsonLdContextDefinition"
1409
1475
  },
1410
1476
  "@prefix": {
1411
- "$ref": "#/components/schemas/JsonLdKeyword"
1477
+ "type": "boolean"
1412
1478
  },
1413
1479
  "@propagate": {
1414
- "$ref": "#/components/schemas/JsonLdKeyword"
1480
+ "type": "boolean"
1415
1481
  },
1416
1482
  "@protected": {
1417
- "$ref": "#/components/schemas/JsonLdKeyword"
1483
+ "type": "boolean"
1418
1484
  }
1419
1485
  }
1420
1486
  },
@@ -1423,7 +1489,7 @@
1423
1489
  "additionalProperties": false,
1424
1490
  "properties": {
1425
1491
  "@reverse": {
1426
- "$ref": "#/components/schemas/JsonLdKeyword"
1492
+ "type": "string"
1427
1493
  },
1428
1494
  "@container": {
1429
1495
  "type": [
@@ -1440,22 +1506,22 @@
1440
1506
  "type": "string"
1441
1507
  },
1442
1508
  "@language": {
1443
- "$ref": "#/components/schemas/JsonLdKeyword"
1509
+ "type": "string"
1444
1510
  },
1445
1511
  "@index": {
1446
- "$ref": "#/components/schemas/JsonLdKeyword"
1512
+ "type": "string"
1447
1513
  },
1448
1514
  "@context": {
1449
1515
  "$ref": "#/components/schemas/JsonLdContextDefinition"
1450
1516
  },
1451
1517
  "@prefix": {
1452
- "$ref": "#/components/schemas/JsonLdKeyword"
1518
+ "type": "boolean"
1453
1519
  },
1454
1520
  "@propagate": {
1455
- "$ref": "#/components/schemas/JsonLdKeyword"
1521
+ "type": "boolean"
1456
1522
  },
1457
1523
  "@protected": {
1458
- "$ref": "#/components/schemas/JsonLdKeyword"
1524
+ "type": "boolean"
1459
1525
  }
1460
1526
  },
1461
1527
  "required": [
@@ -1482,23 +1548,13 @@
1482
1548
  ]
1483
1549
  },
1484
1550
  "@index": {
1485
- "type": "string"
1551
+ "$ref": "#/components/schemas/JsonLdKeyword"
1486
1552
  },
1487
1553
  "@id": {
1488
- "anyOf": [
1489
- {
1490
- "type": "string"
1491
- },
1492
- {
1493
- "type": "array",
1494
- "items": {
1495
- "type": "string"
1496
- }
1497
- }
1498
- ]
1554
+ "$ref": "#/components/schemas/JsonLdKeyword"
1499
1555
  },
1500
1556
  "@context": {
1501
- "$ref": "#/components/schemas/JsonLdContextDefinitionRoot"
1557
+ "$ref": "#/components/schemas/JsonLdKeyword"
1502
1558
  }
1503
1559
  },
1504
1560
  "required": [
@@ -1578,7 +1634,8 @@
1578
1634
  "type": "array",
1579
1635
  "items": {
1580
1636
  "$ref": "#/components/schemas/JsonLdJsonValue"
1581
- }
1637
+ },
1638
+ "description": "JSON Type for array."
1582
1639
  },
1583
1640
  "JsonLdJsonObject": {
1584
1641
  "type": "object",
@@ -1591,7 +1648,8 @@
1591
1648
  "not": {}
1592
1649
  }
1593
1650
  ]
1594
- }
1651
+ },
1652
+ "description": "JSON Type for object."
1595
1653
  },
1596
1654
  "JsonLdJsonPrimitive": {
1597
1655
  "type": [
@@ -1599,7 +1657,8 @@
1599
1657
  "number",
1600
1658
  "boolean",
1601
1659
  "null"
1602
- ]
1660
+ ],
1661
+ "description": "JSON Primitive."
1603
1662
  },
1604
1663
  "JsonLdJsonValue": {
1605
1664
  "anyOf": [
@@ -1612,7 +1671,8 @@
1612
1671
  {
1613
1672
  "$ref": "#/components/schemas/JsonLdJsonObject"
1614
1673
  }
1615
- ]
1674
+ ],
1675
+ "description": "JSON Value."
1616
1676
  },
1617
1677
  "JsonLdKeyword": {
1618
1678
  "type": "object",
@@ -1847,20 +1907,10 @@
1847
1907
  "type": "object",
1848
1908
  "properties": {
1849
1909
  "@list": {
1850
- "anyOf": [
1851
- {
1852
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1853
- },
1854
- {
1855
- "type": "array",
1856
- "items": {
1857
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1858
- }
1859
- }
1860
- ]
1910
+ "$ref": "#/components/schemas/JsonLdKeyword"
1861
1911
  },
1862
1912
  "@index": {
1863
- "type": "string"
1913
+ "$ref": "#/components/schemas/JsonLdKeyword"
1864
1914
  }
1865
1915
  },
1866
1916
  "required": [
@@ -1921,23 +1971,13 @@
1921
1971
  },
1922
1972
  "properties": {
1923
1973
  "@context": {
1924
- "$ref": "#/components/schemas/JsonLdContextDefinitionRoot"
1974
+ "$ref": "#/components/schemas/JsonLdKeyword"
1925
1975
  },
1926
1976
  "@id": {
1927
- "anyOf": [
1928
- {
1929
- "type": "string"
1930
- },
1931
- {
1932
- "type": "array",
1933
- "items": {
1934
- "type": "string"
1935
- }
1936
- }
1937
- ]
1977
+ "$ref": "#/components/schemas/JsonLdKeyword"
1938
1978
  },
1939
1979
  "@included": {
1940
- "$ref": "#/components/schemas/JsonLdIncludedBlock"
1980
+ "$ref": "#/components/schemas/JsonLdKeyword"
1941
1981
  },
1942
1982
  "@graph": {
1943
1983
  "anyOf": [
@@ -1968,12 +2008,12 @@
1968
2008
  "@type": {
1969
2009
  "anyOf": [
1970
2010
  {
1971
- "type": "string"
2011
+ "$ref": "#/components/schemas/JsonLdKeyword"
1972
2012
  },
1973
2013
  {
1974
2014
  "type": "array",
1975
2015
  "items": {
1976
- "type": "string"
2016
+ "$ref": "#/components/schemas/JsonLdKeyword"
1977
2017
  }
1978
2018
  }
1979
2019
  ]
@@ -1981,11 +2021,11 @@
1981
2021
  "@reverse": {
1982
2022
  "type": "object",
1983
2023
  "additionalProperties": {
1984
- "type": "string"
2024
+ "$ref": "#/components/schemas/JsonLdKeyword"
1985
2025
  }
1986
2026
  },
1987
2027
  "@index": {
1988
- "type": "string"
2028
+ "$ref": "#/components/schemas/JsonLdKeyword"
1989
2029
  }
1990
2030
  },
1991
2031
  "description": "A node object represents zero or more properties of a node in the graph serialized by the JSON-LD document."
@@ -2026,20 +2066,10 @@
2026
2066
  "type": "object",
2027
2067
  "properties": {
2028
2068
  "@set": {
2029
- "anyOf": [
2030
- {
2031
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
2032
- },
2033
- {
2034
- "type": "array",
2035
- "items": {
2036
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
2037
- }
2038
- }
2039
- ]
2069
+ "$ref": "#/components/schemas/JsonLdKeyword"
2040
2070
  },
2041
2071
  "@index": {
2042
- "type": "string"
2072
+ "$ref": "#/components/schemas/JsonLdKeyword"
2043
2073
  }
2044
2074
  },
2045
2075
  "required": [
@@ -46,6 +46,14 @@ The length of the data in the blob.
46
46
 
47
47
  ***
48
48
 
49
+ ### blobHash
50
+
51
+ > **blobHash**: `string`
52
+
53
+ The hash of the data in the blob.
54
+
55
+ ***
56
+
49
57
  ### encodingFormat?
50
58
 
51
59
  > `optional` **encodingFormat**: `string`
@@ -62,11 +70,11 @@ The extension.
62
70
 
63
71
  ***
64
72
 
65
- ### metadata?
73
+ ### annotationObject?
66
74
 
67
- > `optional` **metadata**: `IJsonLdNodeObject`
75
+ > `optional` **annotationObject**: `IJsonLdNodeObject`
68
76
 
69
- The metadata for the blob as JSON-LD.
77
+ The annotation object for the blob as JSON-LD.
70
78
 
71
79
  ***
72
80