@twin.org/blob-storage-models 0.0.3-next.5 → 0.0.3-next.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"IBlobStorageEntry.js","sourceRoot":"","sources":["../../../src/models/IBlobStorageEntry.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { BlobStorageCompressionType } from \"./blobStorageCompressionType.js\";\nimport type { BlobStorageContexts } from \"./blobStorageContexts.js\";\nimport type { BlobStorageTypes } from \"./blobStorageTypes.js\";\n\n/**\n * Interface describing a blob storage entry.\n */\nexport interface IBlobStorageEntry {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof BlobStorageContexts.Context,\n\t\ttypeof BlobStorageContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof BlobStorageTypes.Entry;\n\n\t/**\n\t * The id for the blob.\n\t */\n\tid: string;\n\n\t/**\n\t * The date/time when the entry was created.\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The date/time when the entry was modified.\n\t */\n\tdateModified?: string;\n\n\t/**\n\t * The size of the data in the blob.\n\t */\n\tblobSize: number;\n\n\t/**\n\t * The hash of the data in the blob.\n\t */\n\tblobHash: string;\n\n\t/**\n\t * The mime type for the blob.\n\t */\n\tencodingFormat?: string;\n\n\t/**\n\t * Indicates if the blob is encrypted.\n\t */\n\tisEncrypted?: boolean;\n\n\t/**\n\t * The type of compression used for the blob, if not set it is not stored with compression.\n\t */\n\tcompression?: BlobStorageCompressionType;\n\n\t/**\n\t * The extension.\n\t */\n\tfileExtension?: string;\n\n\t/**\n\t * The metadata for the blob as JSON-LD.\n\t */\n\tmetadata?: IJsonLdNodeObject;\n\n\t/**\n\t * The blob in base64 format, included if the includeContent flag was set in the request.\n\t */\n\tblob?: string;\n}\n"]}
1
+ {"version":3,"file":"IBlobStorageEntry.js","sourceRoot":"","sources":["../../../src/models/IBlobStorageEntry.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { BlobStorageCompressionType } from \"./blobStorageCompressionType.js\";\nimport type { BlobStorageContexts } from \"./blobStorageContexts.js\";\nimport type { BlobStorageTypes } from \"./blobStorageTypes.js\";\n\n/**\n * Interface describing a blob storage entry.\n */\nexport interface IBlobStorageEntry {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof BlobStorageContexts.Context,\n\t\ttypeof BlobStorageContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof BlobStorageTypes.Entry;\n\n\t/**\n\t * The id for the blob.\n\t */\n\tid: string;\n\n\t/**\n\t * The date/time when the entry was created.\n\t * json-ld namespace:schema\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The date/time when the entry was modified.\n\t * json-ld namespace:schema\n\t */\n\tdateModified?: string;\n\n\t/**\n\t * The size of the data in the blob.\n\t * json-ld type:schema:Integer\n\t */\n\tblobSize: number;\n\n\t/**\n\t * The integrity of the data in the blob.\n\t * json-ld namespace:twin-common\n\t */\n\tintegrity: string;\n\n\t/**\n\t * The mime type for the blob.\n\t * json-ld namespace:schema\n\t */\n\tencodingFormat?: string;\n\n\t/**\n\t * Indicates if the blob is encrypted.\n\t * json-ld type:schema:Boolean\n\t */\n\tisEncrypted?: boolean;\n\n\t/**\n\t * The type of compression used for the blob, if not set it is not stored with compression.\n\t * json-ld type:schema:Text\n\t */\n\tcompression?: BlobStorageCompressionType;\n\n\t/**\n\t * The extension.\n\t * json-ld type:schema:Text\n\t */\n\tfileExtension?: string;\n\n\t/**\n\t * The metadata for the blob as JSON-LD.\n\t * json-ld id\n\t */\n\tmetadata?: IJsonLdNodeObject;\n\n\t/**\n\t * The blob in base64 format, included if the includeContent flag was set in the request.\n\t * json-ld type:schema:Text\n\t */\n\tblob?: string;\n}\n"]}
@@ -33,43 +33,43 @@
33
33
  },
34
34
  "dateCreated": {
35
35
  "type": "string",
36
- "description": "The date/time when the entry was created."
36
+ "description": "The date/time when the entry was created. json-ld namespace:schema"
37
37
  },
38
38
  "dateModified": {
39
39
  "type": "string",
40
- "description": "The date/time when the entry was modified."
40
+ "description": "The date/time when the entry was modified. json-ld namespace:schema"
41
41
  },
42
42
  "blobSize": {
43
43
  "type": "number",
44
- "description": "The size of the data in the blob."
44
+ "description": "The size of the data in the blob. json-ld type:schema:Integer"
45
45
  },
46
- "blobHash": {
46
+ "integrity": {
47
47
  "type": "string",
48
- "description": "The hash of the data in the blob."
48
+ "description": "The integrity of the data in the blob. json-ld namespace:twin-common"
49
49
  },
50
50
  "encodingFormat": {
51
51
  "type": "string",
52
- "description": "The mime type for the blob."
52
+ "description": "The mime type for the blob. json-ld namespace:schema"
53
53
  },
54
54
  "isEncrypted": {
55
55
  "type": "boolean",
56
- "description": "Indicates if the blob is encrypted."
56
+ "description": "Indicates if the blob is encrypted. json-ld type:schema:Boolean"
57
57
  },
58
58
  "compression": {
59
59
  "$ref": "https://schema.twindev.org/blob-storage/BlobStorageCompressionType",
60
- "description": "The type of compression used for the blob, if not set it is not stored with compression."
60
+ "description": "The type of compression used for the blob, if not set it is not stored with compression. json-ld type:schema:Text"
61
61
  },
62
62
  "fileExtension": {
63
63
  "type": "string",
64
- "description": "The extension."
64
+ "description": "The extension. json-ld type:schema:Text"
65
65
  },
66
66
  "metadata": {
67
67
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
68
- "description": "The metadata for the blob as JSON-LD."
68
+ "description": "The metadata for the blob as JSON-LD. json-ld id"
69
69
  },
70
70
  "blob": {
71
71
  "type": "string",
72
- "description": "The blob in base64 format, included if the includeContent flag was set in the request."
72
+ "description": "The blob in base64 format, included if the includeContent flag was set in the request. json-ld type:schema:Text"
73
73
  }
74
74
  },
75
75
  "required": [
@@ -78,7 +78,6 @@
78
78
  "id",
79
79
  "dateCreated",
80
80
  "blobSize",
81
- "blobHash"
82
- ],
83
- "additionalProperties": false
81
+ "integrity"
82
+ ]
84
83
  }
@@ -24,42 +24,52 @@ export interface IBlobStorageEntry {
24
24
  id: string;
25
25
  /**
26
26
  * The date/time when the entry was created.
27
+ * json-ld namespace:schema
27
28
  */
28
29
  dateCreated: string;
29
30
  /**
30
31
  * The date/time when the entry was modified.
32
+ * json-ld namespace:schema
31
33
  */
32
34
  dateModified?: string;
33
35
  /**
34
36
  * The size of the data in the blob.
37
+ * json-ld type:schema:Integer
35
38
  */
36
39
  blobSize: number;
37
40
  /**
38
- * The hash of the data in the blob.
41
+ * The integrity of the data in the blob.
42
+ * json-ld namespace:twin-common
39
43
  */
40
- blobHash: string;
44
+ integrity: string;
41
45
  /**
42
46
  * The mime type for the blob.
47
+ * json-ld namespace:schema
43
48
  */
44
49
  encodingFormat?: string;
45
50
  /**
46
51
  * Indicates if the blob is encrypted.
52
+ * json-ld type:schema:Boolean
47
53
  */
48
54
  isEncrypted?: boolean;
49
55
  /**
50
56
  * The type of compression used for the blob, if not set it is not stored with compression.
57
+ * json-ld type:schema:Text
51
58
  */
52
59
  compression?: BlobStorageCompressionType;
53
60
  /**
54
61
  * The extension.
62
+ * json-ld type:schema:Text
55
63
  */
56
64
  fileExtension?: string;
57
65
  /**
58
66
  * The metadata for the blob as JSON-LD.
67
+ * json-ld id
59
68
  */
60
69
  metadata?: IJsonLdNodeObject;
61
70
  /**
62
71
  * The blob in base64 format, included if the includeContent flag was set in the request.
72
+ * json-ld type:schema:Text
63
73
  */
64
74
  blob?: string;
65
75
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @twin.org/blob-storage-models - Changelog
2
2
 
3
+ ## [0.0.3-next.7](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.3-next.6...blob-storage-models-v0.0.3-next.7) (2026-02-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * update schemas ([6fe6571](https://github.com/twinfoundation/blob-storage/commit/6fe65714e23209cdd760ecd5aa8e18762044e4b3))
9
+
10
+ ## [0.0.3-next.6](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.3-next.5...blob-storage-models-v0.0.3-next.6) (2026-02-09)
11
+
12
+
13
+ ### Features
14
+
15
+ * add missing namespace for JSON-LD context ([80b15cf](https://github.com/twinfoundation/blob-storage/commit/80b15cf34b580d9550affa66bcbc9b9ccb34ce21))
16
+ * add ts-to-jsonld-context tool ([2fd217f](https://github.com/twinfoundation/blob-storage/commit/2fd217f50dfaf6ac068091876237f5a101a7995e))
17
+ * blobHash changed to integrity ([#41](https://github.com/twinfoundation/blob-storage/issues/41)) ([c06a55f](https://github.com/twinfoundation/blob-storage/commit/c06a55f0eed3f7cad5d19c4084abd8ef0cdbfb60))
18
+
3
19
  ## [0.0.3-next.5](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.3-next.4...blob-storage-models-v0.0.3-next.5) (2026-01-26)
4
20
 
5
21
 
@@ -33,6 +33,7 @@ The id for the blob.
33
33
  > **dateCreated**: `string`
34
34
 
35
35
  The date/time when the entry was created.
36
+ json-ld namespace:schema
36
37
 
37
38
  ***
38
39
 
@@ -41,6 +42,7 @@ The date/time when the entry was created.
41
42
  > `optional` **dateModified**: `string`
42
43
 
43
44
  The date/time when the entry was modified.
45
+ json-ld namespace:schema
44
46
 
45
47
  ***
46
48
 
@@ -49,14 +51,16 @@ The date/time when the entry was modified.
49
51
  > **blobSize**: `number`
50
52
 
51
53
  The size of the data in the blob.
54
+ json-ld type:schema:Integer
52
55
 
53
56
  ***
54
57
 
55
- ### blobHash
58
+ ### integrity
56
59
 
57
- > **blobHash**: `string`
60
+ > **integrity**: `string`
58
61
 
59
- The hash of the data in the blob.
62
+ The integrity of the data in the blob.
63
+ json-ld namespace:twin-common
60
64
 
61
65
  ***
62
66
 
@@ -65,6 +69,7 @@ The hash of the data in the blob.
65
69
  > `optional` **encodingFormat**: `string`
66
70
 
67
71
  The mime type for the blob.
72
+ json-ld namespace:schema
68
73
 
69
74
  ***
70
75
 
@@ -73,6 +78,7 @@ The mime type for the blob.
73
78
  > `optional` **isEncrypted**: `boolean`
74
79
 
75
80
  Indicates if the blob is encrypted.
81
+ json-ld type:schema:Boolean
76
82
 
77
83
  ***
78
84
 
@@ -81,6 +87,7 @@ Indicates if the blob is encrypted.
81
87
  > `optional` **compression**: [`BlobStorageCompressionType`](../type-aliases/BlobStorageCompressionType.md)
82
88
 
83
89
  The type of compression used for the blob, if not set it is not stored with compression.
90
+ json-ld type:schema:Text
84
91
 
85
92
  ***
86
93
 
@@ -89,6 +96,7 @@ The type of compression used for the blob, if not set it is not stored with comp
89
96
  > `optional` **fileExtension**: `string`
90
97
 
91
98
  The extension.
99
+ json-ld type:schema:Text
92
100
 
93
101
  ***
94
102
 
@@ -97,6 +105,7 @@ The extension.
97
105
  > `optional` **metadata**: `IJsonLdNodeObject`
98
106
 
99
107
  The metadata for the blob as JSON-LD.
108
+ json-ld id
100
109
 
101
110
  ***
102
111
 
@@ -105,3 +114,4 @@ The metadata for the blob as JSON-LD.
105
114
  > `optional` **blob**: `string`
106
115
 
107
116
  The blob in base64 format, included if the includeContent flag was set in the request.
117
+ json-ld type:schema:Text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/blob-storage-models",
3
- "version": "0.0.3-next.5",
3
+ "version": "0.0.3-next.7",
4
4
  "description": "Models which define the structure of the blob storage contracts and connectors",
5
5
  "repository": {
6
6
  "type": "git",