@twin.org/blob-storage-models 0.0.3-next.14 → 0.0.3-next.16

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":"IBlobStorageComponent.js","sourceRoot":"","sources":["../../../src/models/IBlobStorageComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { EntityCondition, SortDirection } from \"@twin.org/entity\";\nimport type { BlobStorageCompressionType } from \"./blobStorageCompressionType.js\";\nimport type { IBlobStorageEntry } from \"./IBlobStorageEntry.js\";\nimport type { IBlobStorageEntryList } from \"./IBlobStorageEntryList.js\";\n\n/**\n * Interface describing an blob storage component.\n */\nexport interface IBlobStorageComponent extends IComponent {\n\t/**\n\t * Create the blob with some metadata.\n\t * @param blob The data for the blob in base64 format.\n\t * @param encodingFormat Mime type for the blob, will be detected if left undefined.\n\t * @param fileExtension Extension for the blob, will be detected if left undefined.\n\t * @param metadata Data for the custom metadata as JSON-LD.\n\t * @param options Optional options for the creation of the blob.\n\t * @param options.disableEncryption Disables encryption if enabled by default.\n\t * @param options.overrideVaultKeyId Use a different vault key id for encryption, if not provided the default vault key id will be used.\n\t * @param options.compress Optional compression type to use for the blob, defaults to no compression.\n\t * @param options.namespace The namespace to use for storing, defaults to component configured namespace.\n\t * @returns The id of the stored blob in urn format.\n\t */\n\tcreate(\n\t\tblob: string,\n\t\tencodingFormat?: string,\n\t\tfileExtension?: string,\n\t\tmetadata?: IJsonLdNodeObject,\n\t\toptions?: {\n\t\t\tdisableEncryption?: boolean;\n\t\t\toverrideVaultKeyId?: string;\n\t\t\tcompress?: BlobStorageCompressionType;\n\t\t\tnamespace?: string;\n\t\t}\n\t): Promise<string>;\n\n\t/**\n\t * Get the blob and metadata.\n\t * @param id The id of the blob to get in urn format.\n\t * @param options Optional options for the retrieval of the blob.\n\t * @param options.includeContent Include the content, or just get the metadata.\n\t * @param options.overrideVaultKeyId Use a different vault key id for decryption, if not provided the default vault key id will be used.\n\t * @param options.decompress If the content should be decompressed, if it was compressed when stored, defaults to true.\n\t * @returns The data and metadata for the blob if it can be found.\n\t * @throws Not found error if the blob cannot be found.\n\t */\n\tget(\n\t\tid: string,\n\t\toptions?: {\n\t\t\tincludeContent?: boolean;\n\t\t\tdecompress?: boolean;\n\t\t\toverrideVaultKeyId?: string;\n\t\t}\n\t): Promise<IBlobStorageEntry>;\n\n\t/**\n\t * Update the blob with metadata.\n\t * @param id The id of the blob metadata to update.\n\t * @param encodingFormat Mime type for the blob, will be detected if left undefined.\n\t * @param fileExtension Extension for the blob, will be detected if left undefined.\n\t * @param metadata Data for the custom metadata as JSON-LD.\n\t * @returns Nothing.\n\t * @throws Not found error if the blob cannot be found.\n\t */\n\tupdate(\n\t\tid: string,\n\t\tencodingFormat?: string,\n\t\tfileExtension?: string,\n\t\tmetadata?: IJsonLdNodeObject\n\t): Promise<void>;\n\n\t/**\n\t * Remove the blob.\n\t * @param id The id of the blob to remove in urn format.\n\t * @returns Nothing.\n\t * @throws Not found error if the blob cannot be found.\n\t */\n\tremove(id: string): Promise<void>;\n\n\t/**\n\t * Remove all blobs from the storage.\n\t * @returns Nothing.\n\t */\n\tempty(): Promise<void>;\n\n\t/**\n\t * Query all the blob storage entries which match the conditions.\n\t * @param conditions The conditions to match for the entries.\n\t * @param orderBy The order for the results, defaults to created.\n\t * @param orderByDirection The direction for the order, defaults to descending.\n\t * @param cursor The cursor to request the next page of entries.\n\t * @param limit The suggested number of entries to return in each chunk, in some scenarios can return a different amount.\n\t * @returns All the entries for the storage matching the conditions,\n\t * and a cursor which can be used to request more entities.\n\t */\n\tquery(\n\t\tconditions?: EntityCondition<IBlobStorageEntry>,\n\t\torderBy?: keyof Pick<IBlobStorageEntry, \"dateCreated\" | \"dateModified\">,\n\t\torderByDirection?: SortDirection,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IBlobStorageEntryList;\n\t\tcursor?: string;\n\t}>;\n}\n"]}
1
+ {"version":3,"file":"IBlobStorageComponent.js","sourceRoot":"","sources":["../../../src/models/IBlobStorageComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { EntityCondition, SortDirection } from \"@twin.org/entity\";\nimport type { BlobStorageCompressionType } from \"./blobStorageCompressionType.js\";\nimport type { IBlobStorageEntry } from \"./IBlobStorageEntry.js\";\nimport type { IBlobStorageEntryList } from \"./IBlobStorageEntryList.js\";\n\n/**\n * Interface describing a blob storage component.\n */\nexport interface IBlobStorageComponent extends IComponent {\n\t/**\n\t * Create the blob with some metadata.\n\t * @param blob The data for the blob in base64 format.\n\t * @param encodingFormat Mime type for the blob, will be detected if left undefined.\n\t * @param fileExtension Extension for the blob, will be detected if left undefined.\n\t * @param metadata Data for the custom metadata as JSON-LD.\n\t * @param options Optional options for the creation of the blob.\n\t * @param options.disableEncryption Disables encryption if enabled by default.\n\t * @param options.overrideVaultKeyId Use a different vault key id for encryption, if not provided the default vault key id will be used.\n\t * @param options.compress Optional compression type to use for the blob, defaults to no compression.\n\t * @param options.namespace The namespace to use for storing, defaults to component configured namespace.\n\t * @returns The id of the stored blob in urn format.\n\t */\n\tcreate(\n\t\tblob: string,\n\t\tencodingFormat?: string,\n\t\tfileExtension?: string,\n\t\tmetadata?: IJsonLdNodeObject,\n\t\toptions?: {\n\t\t\tdisableEncryption?: boolean;\n\t\t\toverrideVaultKeyId?: string;\n\t\t\tcompress?: BlobStorageCompressionType;\n\t\t\tnamespace?: string;\n\t\t}\n\t): Promise<string>;\n\n\t/**\n\t * Get the blob and metadata.\n\t * @param id The id of the blob to get in urn format.\n\t * @param options Optional options for the retrieval of the blob.\n\t * @param options.includeContent Include the content, or just get the metadata.\n\t * @param options.overrideVaultKeyId Use a different vault key id for decryption, if not provided the default vault key id will be used.\n\t * @param options.decompress If the content should be decompressed, if it was compressed when stored, defaults to true.\n\t * @returns The data and metadata for the blob if it can be found.\n\t * @throws Not found error if the blob cannot be found.\n\t */\n\tget(\n\t\tid: string,\n\t\toptions?: {\n\t\t\tincludeContent?: boolean;\n\t\t\tdecompress?: boolean;\n\t\t\toverrideVaultKeyId?: string;\n\t\t}\n\t): Promise<IBlobStorageEntry>;\n\n\t/**\n\t * Update the blob with metadata.\n\t * @param id The id of the blob metadata to update.\n\t * @param encodingFormat Mime type for the blob, will be detected if left undefined.\n\t * @param fileExtension Extension for the blob, will be detected if left undefined.\n\t * @param metadata Data for the custom metadata as JSON-LD.\n\t * @returns A promise that resolves when the blob metadata has been updated.\n\t * @throws Not found error if the blob cannot be found.\n\t */\n\tupdate(\n\t\tid: string,\n\t\tencodingFormat?: string,\n\t\tfileExtension?: string,\n\t\tmetadata?: IJsonLdNodeObject\n\t): Promise<void>;\n\n\t/**\n\t * Remove the blob.\n\t * @param id The id of the blob to remove in urn format.\n\t * @returns A promise that resolves when the blob has been removed.\n\t * @throws Not found error if the blob cannot be found.\n\t */\n\tremove(id: string): Promise<void>;\n\n\t/**\n\t * Remove all blobs from the storage.\n\t * @returns A promise that resolves when all blobs have been removed.\n\t */\n\tempty(): Promise<void>;\n\n\t/**\n\t * Query all the blob storage entries which match the conditions.\n\t * @param conditions The conditions to match for the entries.\n\t * @param orderBy The order for the results, defaults to created.\n\t * @param orderByDirection The direction for the order, defaults to descending.\n\t * @param cursor The cursor to request the next page of entries.\n\t * @param limit The suggested number of entries to return in each chunk, in some scenarios can return a different amount.\n\t * @returns All the entries for the storage matching the conditions,\n\t * and a cursor which can be used to request more entities.\n\t */\n\tquery(\n\t\tconditions?: EntityCondition<IBlobStorageEntry>,\n\t\torderBy?: keyof Pick<IBlobStorageEntry, \"dateCreated\" | \"dateModified\">,\n\t\torderByDirection?: SortDirection,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IBlobStorageEntryList;\n\t\tcursor?: string;\n\t}>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IBlobStorageConnector.js","sourceRoot":"","sources":["../../../src/models/IBlobStorageConnector.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface describing an blob storage connector.\n */\nexport interface IBlobStorageConnector extends IComponent {\n\t/**\n\t * Set the blob.\n\t * @param blob The data for the blob.\n\t * @returns The id of the stored blob in urn format.\n\t */\n\tset(blob: Uint8Array): Promise<string>;\n\n\t/**\n\t * Get the blob.\n\t * @param id The id of the blob to get in urn format.\n\t * @returns The data for the blob if it can be found or undefined.\n\t */\n\tget(id: string): Promise<Uint8Array | undefined>;\n\n\t/**\n\t * Remove the blob.\n\t * @param id The id of the blob to remove in urn format.\n\t * @returns True if the blob was found.\n\t */\n\tremove(id: string): Promise<boolean>;\n\n\t/**\n\t * Remove all blobs from the storage.\n\t * @returns Nothing.\n\t */\n\tempty(): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"IBlobStorageConnector.js","sourceRoot":"","sources":["../../../src/models/IBlobStorageConnector.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface describing a blob storage connector.\n */\nexport interface IBlobStorageConnector extends IComponent {\n\t/**\n\t * Set the blob.\n\t * @param blob The data for the blob.\n\t * @returns The id of the stored blob in urn format.\n\t */\n\tset(blob: Uint8Array): Promise<string>;\n\n\t/**\n\t * Get the blob.\n\t * @param id The id of the blob to get in urn format.\n\t * @returns The data for the blob if it can be found or undefined.\n\t */\n\tget(id: string): Promise<Uint8Array | undefined>;\n\n\t/**\n\t * Remove the blob.\n\t * @param id The id of the blob to remove in urn format.\n\t * @returns True if the blob was found.\n\t */\n\tremove(id: string): Promise<boolean>;\n\n\t/**\n\t * Remove all blobs from the storage.\n\t * @returns A promise that resolves when all blobs have been removed.\n\t */\n\tempty(): Promise<void>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IBlobStorageEntryList.js","sourceRoot":"","sources":["../../../src/models/IBlobStorageEntryList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { BlobStorageContexts } from \"./blobStorageContexts.js\";\nimport type { IBlobStorageEntry } from \"./IBlobStorageEntry.js\";\n\n/**\n * Interface describing an blob storage entry list.\n */\nexport interface IBlobStorageEntryList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.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 SchemaOrgTypes.ItemList;\n\n\t/**\n\t * The list of entries.\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IBlobStorageEntry[];\n}\n"]}
1
+ {"version":3,"file":"IBlobStorageEntryList.js","sourceRoot":"","sources":["../../../src/models/IBlobStorageEntryList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { BlobStorageContexts } from \"./blobStorageContexts.js\";\nimport type { IBlobStorageEntry } from \"./IBlobStorageEntry.js\";\n\n/**\n * Interface describing a blob storage entry list.\n */\nexport interface IBlobStorageEntryList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.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 SchemaOrgTypes.ItemList;\n\n\t/**\n\t * The list of entries.\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IBlobStorageEntry[];\n}\n"]}
@@ -5,7 +5,7 @@ import type { BlobStorageCompressionType } from "./blobStorageCompressionType.js
5
5
  import type { IBlobStorageEntry } from "./IBlobStorageEntry.js";
6
6
  import type { IBlobStorageEntryList } from "./IBlobStorageEntryList.js";
7
7
  /**
8
- * Interface describing an blob storage component.
8
+ * Interface describing a blob storage component.
9
9
  */
10
10
  export interface IBlobStorageComponent extends IComponent {
11
11
  /**
@@ -48,20 +48,20 @@ export interface IBlobStorageComponent extends IComponent {
48
48
  * @param encodingFormat Mime type for the blob, will be detected if left undefined.
49
49
  * @param fileExtension Extension for the blob, will be detected if left undefined.
50
50
  * @param metadata Data for the custom metadata as JSON-LD.
51
- * @returns Nothing.
51
+ * @returns A promise that resolves when the blob metadata has been updated.
52
52
  * @throws Not found error if the blob cannot be found.
53
53
  */
54
54
  update(id: string, encodingFormat?: string, fileExtension?: string, metadata?: IJsonLdNodeObject): Promise<void>;
55
55
  /**
56
56
  * Remove the blob.
57
57
  * @param id The id of the blob to remove in urn format.
58
- * @returns Nothing.
58
+ * @returns A promise that resolves when the blob has been removed.
59
59
  * @throws Not found error if the blob cannot be found.
60
60
  */
61
61
  remove(id: string): Promise<void>;
62
62
  /**
63
63
  * Remove all blobs from the storage.
64
- * @returns Nothing.
64
+ * @returns A promise that resolves when all blobs have been removed.
65
65
  */
66
66
  empty(): Promise<void>;
67
67
  /**
@@ -1,6 +1,6 @@
1
1
  import type { IComponent } from "@twin.org/core";
2
2
  /**
3
- * Interface describing an blob storage connector.
3
+ * Interface describing a blob storage connector.
4
4
  */
5
5
  export interface IBlobStorageConnector extends IComponent {
6
6
  /**
@@ -23,7 +23,7 @@ export interface IBlobStorageConnector extends IComponent {
23
23
  remove(id: string): Promise<boolean>;
24
24
  /**
25
25
  * Remove all blobs from the storage.
26
- * @returns Nothing.
26
+ * @returns A promise that resolves when all blobs have been removed.
27
27
  */
28
28
  empty(): Promise<void>;
29
29
  }
@@ -3,7 +3,7 @@ import type { SchemaOrgContexts, SchemaOrgTypes } from "@twin.org/standards-sche
3
3
  import type { BlobStorageContexts } from "./blobStorageContexts.js";
4
4
  import type { IBlobStorageEntry } from "./IBlobStorageEntry.js";
5
5
  /**
6
- * Interface describing an blob storage entry list.
6
+ * Interface describing a blob storage entry list.
7
7
  */
8
8
  export interface IBlobStorageEntryList {
9
9
  /**
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.16](https://github.com/iotaledger/twin-blob-storage/compare/blob-storage-models-v0.0.3-next.15...blob-storage-models-v0.0.3-next.16) (2026-06-18)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **blob-storage-models:** Synchronize repo versions
9
+
10
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-blob-storage/compare/blob-storage-models-v0.0.3-next.14...blob-storage-models-v0.0.3-next.15) (2026-06-15)
11
+
12
+
13
+ ### Miscellaneous Chores
14
+
15
+ * **blob-storage-models:** Synchronize repo versions
16
+
3
17
  ## [0.0.3-next.14](https://github.com/iotaledger/twin-blob-storage/compare/blob-storage-models-v0.0.3-next.13...blob-storage-models-v0.0.3-next.14) (2026-06-11)
4
18
 
5
19
 
@@ -1,6 +1,6 @@
1
1
  # Interface: IBlobStorageComponent
2
2
 
3
- Interface describing an blob storage component.
3
+ Interface describing a blob storage component.
4
4
 
5
5
  ## Extends
6
6
 
@@ -160,7 +160,7 @@ Data for the custom metadata as JSON-LD.
160
160
 
161
161
  `Promise`\<`void`\>
162
162
 
163
- Nothing.
163
+ A promise that resolves when the blob metadata has been updated.
164
164
 
165
165
  #### Throws
166
166
 
@@ -186,7 +186,7 @@ The id of the blob to remove in urn format.
186
186
 
187
187
  `Promise`\<`void`\>
188
188
 
189
- Nothing.
189
+ A promise that resolves when the blob has been removed.
190
190
 
191
191
  #### Throws
192
192
 
@@ -204,7 +204,7 @@ Remove all blobs from the storage.
204
204
 
205
205
  `Promise`\<`void`\>
206
206
 
207
- Nothing.
207
+ A promise that resolves when all blobs have been removed.
208
208
 
209
209
  ***
210
210
 
@@ -1,6 +1,6 @@
1
1
  # Interface: IBlobStorageConnector
2
2
 
3
- Interface describing an blob storage connector.
3
+ Interface describing a blob storage connector.
4
4
 
5
5
  ## Extends
6
6
 
@@ -84,4 +84,4 @@ Remove all blobs from the storage.
84
84
 
85
85
  `Promise`\<`void`\>
86
86
 
87
- Nothing.
87
+ A promise that resolves when all blobs have been removed.
@@ -1,6 +1,6 @@
1
1
  # Interface: IBlobStorageEntryList
2
2
 
3
- Interface describing an blob storage entry list.
3
+ Interface describing a blob storage entry list.
4
4
 
5
5
  ## Properties
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/blob-storage-models",
3
- "version": "0.0.3-next.14",
3
+ "version": "0.0.3-next.16",
4
4
  "description": "Defines shared contracts, schemas, and interfaces for blob content, metadata, and connector behaviour.",
5
5
  "repository": {
6
6
  "type": "git",