@twin.org/blob-storage-service 0.0.2-next.5 → 0.0.3-next.1

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.
@@ -57,71 +57,21 @@
57
57
  }
58
58
  },
59
59
  "responses": {
60
- "201": {
60
+ "200": {
61
61
  "description": "The rest request ended in created response.",
62
- "headers": {
63
- "location": {
64
- "schema": {
65
- "type": "string"
66
- },
67
- "description": "e.g. blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
68
- }
69
- }
70
- },
71
- "400": {
72
- "description": "The server cannot process the request, see the content for more details.",
73
- "content": {
74
- "application/json": {
75
- "schema": {
76
- "$ref": "#/components/schemas/Error"
77
- },
78
- "examples": {
79
- "exampleResponse": {
80
- "value": {
81
- "name": "GeneralError",
82
- "message": "errorMessage",
83
- "properties": {
84
- "foo": "bar"
85
- }
86
- }
87
- }
88
- }
89
- }
90
- }
91
- },
92
- "401": {
93
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
94
62
  "content": {
95
- "application/json": {
63
+ "text/plain": {
96
64
  "schema": {
97
- "$ref": "#/components/schemas/Error"
98
- },
99
- "examples": {
100
- "exampleResponse": {
101
- "value": {
102
- "name": "UnauthorizedError",
103
- "message": "errorMessage"
104
- }
105
- }
65
+ "$ref": "#/components/schemas/CreatedResponse"
106
66
  }
107
67
  }
108
- }
109
- },
110
- "500": {
111
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
112
- "content": {
113
- "application/json": {
68
+ },
69
+ "headers": {
70
+ "location": {
114
71
  "schema": {
115
- "$ref": "#/components/schemas/Error"
72
+ "type": "string"
116
73
  },
117
- "examples": {
118
- "exampleResponse": {
119
- "value": {
120
- "name": "InternalServerError",
121
- "message": "errorMessage"
122
- }
123
- }
124
- }
74
+ "description": "e.g. blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
125
75
  }
126
76
  }
127
77
  }
@@ -200,45 +150,11 @@
200
150
  ],
201
151
  "responses": {
202
152
  "200": {
203
- "description": "Response to getting the list of entries from a query.",
153
+ "description": "The resource you tried to access does not exist, see the content for more details.",
204
154
  "content": {
205
155
  "application/json": {
206
156
  "schema": {
207
- "$ref": "#/components/schemas/BlobStorageEntryList"
208
- },
209
- "examples": {
210
- "blobStorageListResponseExample": {
211
- "value": {
212
- "@context": [
213
- "https://schema.org",
214
- "https://schema.twindev.org/blob-storage/",
215
- "https://schema.twindev.org/common/"
216
- ],
217
- "type": "ItemList",
218
- "itemListElement": [
219
- {
220
- "@context": [
221
- "https://schema.twindev.org/blob-storage/",
222
- "https://schema.twindev.org/common/",
223
- "https://schema.org"
224
- ],
225
- "type": "BlobStorageEntry",
226
- "id": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
227
- "dateCreated": "2024-01-01T00:00:00Z",
228
- "encodingFormat": "application/pdf",
229
- "blobSize": 42,
230
- "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
231
- "fileExtension": "pdf",
232
- "metadata": {
233
- "@context": "https://schema.org",
234
- "@type": "DigitalDocument",
235
- "name": "myfile.pdf"
236
- },
237
- "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="
238
- }
239
- ]
240
- }
241
- }
157
+ "$ref": "#/components/schemas/NotFoundResponse"
242
158
  }
243
159
  },
244
160
  "application/ld+json": {
@@ -281,84 +197,6 @@
281
197
  }
282
198
  }
283
199
  }
284
- },
285
- "400": {
286
- "description": "The server cannot process the request, see the content for more details.",
287
- "content": {
288
- "application/json": {
289
- "schema": {
290
- "$ref": "#/components/schemas/Error"
291
- },
292
- "examples": {
293
- "exampleResponse": {
294
- "value": {
295
- "name": "GeneralError",
296
- "message": "errorMessage",
297
- "properties": {
298
- "foo": "bar"
299
- }
300
- }
301
- }
302
- }
303
- }
304
- }
305
- },
306
- "401": {
307
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
308
- "content": {
309
- "application/json": {
310
- "schema": {
311
- "$ref": "#/components/schemas/Error"
312
- },
313
- "examples": {
314
- "exampleResponse": {
315
- "value": {
316
- "name": "UnauthorizedError",
317
- "message": "errorMessage"
318
- }
319
- }
320
- }
321
- }
322
- }
323
- },
324
- "404": {
325
- "description": "The resource you tried to access does not exist, see the content for more details.",
326
- "content": {
327
- "application/json": {
328
- "schema": {
329
- "$ref": "#/components/schemas/NotFoundResponse"
330
- },
331
- "examples": {
332
- "exampleResponse": {
333
- "value": {
334
- "name": "NotFoundError",
335
- "message": "errorMessage",
336
- "properties": {
337
- "notFoundId": "1"
338
- }
339
- }
340
- }
341
- }
342
- }
343
- }
344
- },
345
- "500": {
346
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
347
- "content": {
348
- "application/json": {
349
- "schema": {
350
- "$ref": "#/components/schemas/Error"
351
- },
352
- "examples": {
353
- "exampleResponse": {
354
- "value": {
355
- "name": "InternalServerError",
356
- "message": "errorMessage"
357
- }
358
- }
359
- }
360
- }
361
- }
362
200
  }
363
201
  }
364
202
  }
@@ -433,35 +271,11 @@
433
271
  ],
434
272
  "responses": {
435
273
  "200": {
436
- "description": "Response to get an entry from blob storage.",
274
+ "description": "The resource you tried to access does not exist, see the content for more details.",
437
275
  "content": {
438
276
  "application/json": {
439
277
  "schema": {
440
- "$ref": "#/components/schemas/BlobStorageEntry"
441
- },
442
- "examples": {
443
- "blobStorageGetResponseExample": {
444
- "value": {
445
- "@context": [
446
- "https://schema.twindev.org/blob-storage/",
447
- "https://schema.twindev.org/common/",
448
- "https://schema.org"
449
- ],
450
- "type": "BlobStorageEntry",
451
- "id": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
452
- "dateCreated": "2024-01-01T00:00:00Z",
453
- "encodingFormat": "application/pdf",
454
- "blobSize": 42,
455
- "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
456
- "fileExtension": "pdf",
457
- "metadata": {
458
- "@context": "https://schema.org",
459
- "@type": "DigitalDocument",
460
- "name": "myfile.pdf"
461
- },
462
- "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="
463
- }
464
- }
278
+ "$ref": "#/components/schemas/NotFoundResponse"
465
279
  }
466
280
  },
467
281
  "application/ld+json": {
@@ -494,84 +308,6 @@
494
308
  }
495
309
  }
496
310
  }
497
- },
498
- "400": {
499
- "description": "The server cannot process the request, see the content for more details.",
500
- "content": {
501
- "application/json": {
502
- "schema": {
503
- "$ref": "#/components/schemas/Error"
504
- },
505
- "examples": {
506
- "exampleResponse": {
507
- "value": {
508
- "name": "GeneralError",
509
- "message": "errorMessage",
510
- "properties": {
511
- "foo": "bar"
512
- }
513
- }
514
- }
515
- }
516
- }
517
- }
518
- },
519
- "401": {
520
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
521
- "content": {
522
- "application/json": {
523
- "schema": {
524
- "$ref": "#/components/schemas/Error"
525
- },
526
- "examples": {
527
- "exampleResponse": {
528
- "value": {
529
- "name": "UnauthorizedError",
530
- "message": "errorMessage"
531
- }
532
- }
533
- }
534
- }
535
- }
536
- },
537
- "404": {
538
- "description": "The resource you tried to access does not exist, see the content for more details.",
539
- "content": {
540
- "application/json": {
541
- "schema": {
542
- "$ref": "#/components/schemas/NotFoundResponse"
543
- },
544
- "examples": {
545
- "exampleResponse": {
546
- "value": {
547
- "name": "NotFoundError",
548
- "message": "errorMessage",
549
- "properties": {
550
- "notFoundId": "1"
551
- }
552
- }
553
- }
554
- }
555
- }
556
- }
557
- },
558
- "500": {
559
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
560
- "content": {
561
- "application/json": {
562
- "schema": {
563
- "$ref": "#/components/schemas/Error"
564
- },
565
- "examples": {
566
- "exampleResponse": {
567
- "value": {
568
- "name": "InternalServerError",
569
- "message": "errorMessage"
570
- }
571
- }
572
- }
573
- }
574
- }
575
311
  }
576
312
  }
577
313
  },
@@ -622,62 +358,12 @@
622
358
  }
623
359
  },
624
360
  "responses": {
625
- "204": {
626
- "description": "The rest request ended in success with no data."
627
- },
628
- "400": {
629
- "description": "The server cannot process the request, see the content for more details.",
630
- "content": {
631
- "application/json": {
632
- "schema": {
633
- "$ref": "#/components/schemas/Error"
634
- },
635
- "examples": {
636
- "exampleResponse": {
637
- "value": {
638
- "name": "GeneralError",
639
- "message": "errorMessage",
640
- "properties": {
641
- "foo": "bar"
642
- }
643
- }
644
- }
645
- }
646
- }
647
- }
648
- },
649
- "401": {
650
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
651
- "content": {
652
- "application/json": {
653
- "schema": {
654
- "$ref": "#/components/schemas/Error"
655
- },
656
- "examples": {
657
- "exampleResponse": {
658
- "value": {
659
- "name": "UnauthorizedError",
660
- "message": "errorMessage"
661
- }
662
- }
663
- }
664
- }
665
- }
666
- },
667
- "500": {
668
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
361
+ "200": {
362
+ "description": "The rest request ended in success with no data.",
669
363
  "content": {
670
- "application/json": {
364
+ "text/plain": {
671
365
  "schema": {
672
- "$ref": "#/components/schemas/Error"
673
- },
674
- "examples": {
675
- "exampleResponse": {
676
- "value": {
677
- "name": "InternalServerError",
678
- "message": "errorMessage"
679
- }
680
- }
366
+ "$ref": "#/components/schemas/NoContentResponse"
681
367
  }
682
368
  }
683
369
  }
@@ -709,83 +395,17 @@
709
395
  }
710
396
  ],
711
397
  "responses": {
712
- "204": {
713
- "description": "The rest request ended in success with no data."
714
- },
715
- "400": {
716
- "description": "The server cannot process the request, see the content for more details.",
717
- "content": {
718
- "application/json": {
719
- "schema": {
720
- "$ref": "#/components/schemas/Error"
721
- },
722
- "examples": {
723
- "exampleResponse": {
724
- "value": {
725
- "name": "GeneralError",
726
- "message": "errorMessage",
727
- "properties": {
728
- "foo": "bar"
729
- }
730
- }
731
- }
732
- }
733
- }
734
- }
735
- },
736
- "401": {
737
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
738
- "content": {
739
- "application/json": {
740
- "schema": {
741
- "$ref": "#/components/schemas/Error"
742
- },
743
- "examples": {
744
- "exampleResponse": {
745
- "value": {
746
- "name": "UnauthorizedError",
747
- "message": "errorMessage"
748
- }
749
- }
750
- }
751
- }
752
- }
753
- },
754
- "404": {
398
+ "200": {
755
399
  "description": "The resource you tried to access does not exist, see the content for more details.",
756
400
  "content": {
757
- "application/json": {
401
+ "text/plain": {
758
402
  "schema": {
759
- "$ref": "#/components/schemas/NotFoundResponse"
760
- },
761
- "examples": {
762
- "exampleResponse": {
763
- "value": {
764
- "name": "NotFoundError",
765
- "message": "errorMessage",
766
- "properties": {
767
- "notFoundId": "1"
768
- }
769
- }
770
- }
403
+ "$ref": "#/components/schemas/NoContentResponse"
771
404
  }
772
- }
773
- }
774
- },
775
- "500": {
776
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
777
- "content": {
405
+ },
778
406
  "application/json": {
779
407
  "schema": {
780
- "$ref": "#/components/schemas/Error"
781
- },
782
- "examples": {
783
- "exampleResponse": {
784
- "value": {
785
- "name": "InternalServerError",
786
- "message": "errorMessage"
787
- }
788
- }
408
+ "$ref": "#/components/schemas/NotFoundResponse"
789
409
  }
790
410
  }
791
411
  }
@@ -820,7 +440,7 @@
820
440
  ],
821
441
  "responses": {
822
442
  "200": {
823
- "description": "The content of the blob, which will be a specific mime type if one can be detected from the content (or set as encodingFormat in the entry), or defaults to application/octet-stream.",
443
+ "description": "The resource you tried to access does not exist, see the content for more details.",
824
444
  "content": {
825
445
  "application/octet-stream": {
826
446
  "schema": {
@@ -833,83 +453,10 @@
833
453
  "value": ""
834
454
  }
835
455
  }
836
- }
837
- }
838
- },
839
- "400": {
840
- "description": "The server cannot process the request, see the content for more details.",
841
- "content": {
842
- "application/json": {
843
- "schema": {
844
- "$ref": "#/components/schemas/Error"
845
- },
846
- "examples": {
847
- "exampleResponse": {
848
- "value": {
849
- "name": "GeneralError",
850
- "message": "errorMessage",
851
- "properties": {
852
- "foo": "bar"
853
- }
854
- }
855
- }
856
- }
857
- }
858
- }
859
- },
860
- "401": {
861
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
862
- "content": {
863
- "application/json": {
864
- "schema": {
865
- "$ref": "#/components/schemas/Error"
866
- },
867
- "examples": {
868
- "exampleResponse": {
869
- "value": {
870
- "name": "UnauthorizedError",
871
- "message": "errorMessage"
872
- }
873
- }
874
- }
875
- }
876
- }
877
- },
878
- "404": {
879
- "description": "The resource you tried to access does not exist, see the content for more details.",
880
- "content": {
456
+ },
881
457
  "application/json": {
882
458
  "schema": {
883
459
  "$ref": "#/components/schemas/NotFoundResponse"
884
- },
885
- "examples": {
886
- "exampleResponse": {
887
- "value": {
888
- "name": "NotFoundError",
889
- "message": "errorMessage",
890
- "properties": {
891
- "notFoundId": "1"
892
- }
893
- }
894
- }
895
- }
896
- }
897
- }
898
- },
899
- "500": {
900
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
901
- "content": {
902
- "application/json": {
903
- "schema": {
904
- "$ref": "#/components/schemas/Error"
905
- },
906
- "examples": {
907
- "exampleResponse": {
908
- "value": {
909
- "name": "InternalServerError",
910
- "message": "errorMessage"
911
- }
912
- }
913
460
  }
914
461
  }
915
462
  }
@@ -983,9 +530,6 @@
983
530
  "@context": {
984
531
  "type": "array",
985
532
  "minItems": 2,
986
- "items": {
987
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
988
- },
989
533
  "description": "JSON-LD Context.",
990
534
  "prefixItems": [
991
535
  {
@@ -996,7 +540,10 @@
996
540
  "type": "string",
997
541
  "const": "https://schema.twindev.org/common/"
998
542
  }
999
- ]
543
+ ],
544
+ "items": {
545
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
546
+ }
1000
547
  },
1001
548
  "type": {
1002
549
  "type": "string",
@@ -1063,9 +610,6 @@
1063
610
  "@context": {
1064
611
  "type": "array",
1065
612
  "minItems": 3,
1066
- "items": {
1067
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
1068
- },
1069
613
  "description": "JSON-LD Context.",
1070
614
  "prefixItems": [
1071
615
  {
@@ -1080,7 +624,10 @@
1080
624
  "type": "string",
1081
625
  "const": "https://schema.twindev.org/common/"
1082
626
  }
1083
- ]
627
+ ],
628
+ "items": {
629
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
630
+ }
1084
631
  },
1085
632
  "type": {
1086
633
  "type": "string",
@@ -1089,13 +636,10 @@
1089
636
  },
1090
637
  "itemListElement": {
1091
638
  "type": "array",
1092
- "items": false,
1093
- "description": "The list of entries.",
1094
- "prefixItems": [
1095
- {
1096
- "$ref": "#/components/schemas/BlobStorageEntry"
1097
- }
1098
- ]
639
+ "items": {
640
+ "$ref": "#/components/schemas/BlobStorageEntry"
641
+ },
642
+ "description": "The list of entries."
1099
643
  },
1100
644
  "nextItem": {
1101
645
  "type": "string",
@@ -91,11 +91,3 @@ Is the entry encrypted.
91
91
  > `optional` **compression**: `BlobStorageCompressionType`
92
92
 
93
93
  Is the entry compressed.
94
-
95
- ***
96
-
97
- ### userIdentity?
98
-
99
- > `optional` **userIdentity**: `string`
100
-
101
- The user identity that created the blob.