@twin.org/blob-storage-models 0.0.3-next.1 → 0.0.3-next.2

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.
@@ -13,14 +13,14 @@ export class BlobStorageDataTypes {
13
13
  * Register all the data types.
14
14
  */
15
15
  static registerTypes() {
16
- DataTypeHandlerFactory.register(`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.Entry}`, () => ({
17
- context: BlobStorageContexts.ContextRoot,
16
+ DataTypeHandlerFactory.register(`${BlobStorageContexts.Namespace}${BlobStorageTypes.Entry}`, () => ({
17
+ namespace: BlobStorageContexts.Namespace,
18
18
  type: BlobStorageTypes.Entry,
19
19
  defaultValue: {},
20
20
  jsonSchema: async () => BlobStorageEntrySchema
21
21
  }));
22
- DataTypeHandlerFactory.register(`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.CompressionType}`, () => ({
23
- context: BlobStorageContexts.ContextRoot,
22
+ DataTypeHandlerFactory.register(`${BlobStorageContexts.Namespace}${BlobStorageTypes.CompressionType}`, () => ({
23
+ namespace: BlobStorageContexts.Namespace,
24
24
  type: BlobStorageTypes.CompressionType,
25
25
  defaultValue: {},
26
26
  jsonSchema: async () => BlobStorageCompressionTypeSchema
@@ -1 +1 @@
1
- {"version":3,"file":"blobStorageDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/blobStorageDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChH,OAAO,sBAAsB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5F;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAChC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,mBAAmB,CAAC,WAAW,GAAG,gBAAgB,CAAC,KAAK,EAAE,EAC7D,GAAG,EAAE,CAAC,CAAC;YACN,OAAO,EAAE,mBAAmB,CAAC,WAAW;YACxC,IAAI,EAAE,gBAAgB,CAAC,KAAK;YAC5B,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,sBAAqC;SAC7D,CAAC,CACF,CAAC;QAEF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,mBAAmB,CAAC,WAAW,GAAG,gBAAgB,CAAC,eAAe,EAAE,EACvE,GAAG,EAAE,CAAC,CAAC;YACN,OAAO,EAAE,mBAAmB,CAAC,WAAW;YACxC,IAAI,EAAE,gBAAgB,CAAC,eAAe;YACtC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,gCAA+C;SACvE,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory, type IJsonSchema } from \"@twin.org/data-core\";\nimport { BlobStorageContexts } from \"../models/blobStorageContexts.js\";\nimport { BlobStorageTypes } from \"../models/blobStorageTypes.js\";\nimport BlobStorageCompressionTypeSchema from \"../schemas/BlobStorageCompressionType.json\" with { type: \"json\" };\nimport BlobStorageEntrySchema from \"../schemas/BlobStorageEntry.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for blob storage.\n */\nexport class BlobStorageDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.Entry}`,\n\t\t\t() => ({\n\t\t\t\tcontext: BlobStorageContexts.ContextRoot,\n\t\t\t\ttype: BlobStorageTypes.Entry,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => BlobStorageEntrySchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.CompressionType}`,\n\t\t\t() => ({\n\t\t\t\tcontext: BlobStorageContexts.ContextRoot,\n\t\t\t\ttype: BlobStorageTypes.CompressionType,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => BlobStorageCompressionTypeSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"blobStorageDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/blobStorageDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChH,OAAO,sBAAsB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5F;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAChC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,mBAAmB,CAAC,SAAS,GAAG,gBAAgB,CAAC,KAAK,EAAE,EAC3D,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,mBAAmB,CAAC,SAAS;YACxC,IAAI,EAAE,gBAAgB,CAAC,KAAK;YAC5B,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,sBAAqC;SAC7D,CAAC,CACF,CAAC;QAEF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,mBAAmB,CAAC,SAAS,GAAG,gBAAgB,CAAC,eAAe,EAAE,EACrE,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,mBAAmB,CAAC,SAAS;YACxC,IAAI,EAAE,gBAAgB,CAAC,eAAe;YACtC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,gCAA+C;SACvE,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory, type IJsonSchema } from \"@twin.org/data-core\";\nimport { BlobStorageContexts } from \"../models/blobStorageContexts.js\";\nimport { BlobStorageTypes } from \"../models/blobStorageTypes.js\";\nimport BlobStorageCompressionTypeSchema from \"../schemas/BlobStorageCompressionType.json\" with { type: \"json\" };\nimport BlobStorageEntrySchema from \"../schemas/BlobStorageEntry.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for blob storage.\n */\nexport class BlobStorageDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${BlobStorageContexts.Namespace}${BlobStorageTypes.Entry}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: BlobStorageContexts.Namespace,\n\t\t\t\ttype: BlobStorageTypes.Entry,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => BlobStorageEntrySchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${BlobStorageContexts.Namespace}${BlobStorageTypes.CompressionType}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: BlobStorageContexts.Namespace,\n\t\t\t\ttype: BlobStorageTypes.CompressionType,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => BlobStorageCompressionTypeSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
@@ -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.ContextRoot,\n\t\ttypeof BlobStorageContexts.ContextRootCommon,\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.Namespace,\n\t\ttypeof BlobStorageContexts.NamespaceCommon,\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 +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.ContextRoot,\n\t\ttypeof BlobStorageContexts.ContextRoot,\n\t\ttypeof BlobStorageContexts.ContextRootCommon,\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\t/**\n\t * The cursor to get the next chunk of entries.\n\t */\n\t[SchemaOrgTypes.NextItem]?: string;\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 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.Namespace,\n\t\ttypeof BlobStorageContexts.Namespace,\n\t\ttypeof BlobStorageContexts.NamespaceCommon,\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\t/**\n\t * The cursor to get the next chunk of entries.\n\t */\n\t[SchemaOrgTypes.NextItem]?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IBlobStorageGetContentRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IBlobStorageGetContentRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to get the content from blob storage.\n */\nexport interface IBlobStorageGetContentRequest {\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the blob to get in urn format.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The query parameters.\n\t */\n\tquery?: {\n\t\t/**\n\t\t * If the content should be decompressed, if it was compressed when stored, defaults to true.\n\t\t * @default true\n\t\t */\n\t\tdecompress?: boolean | string;\n\n\t\t/**\n\t\t * Use a different vault key id for decryption, if not provided the default vault key id will be used.\n\t\t * @default undefined\n\t\t */\n\t\toverrideVaultKeyId?: string;\n\n\t\t/**\n\t\t * Set the download flag which should prompt the browser to save the file.\n\t\t * Otherwise the browser should show the content inside the page.\n\t\t * @default false\n\t\t */\n\t\tdownload?: boolean | string;\n\n\t\t/**\n\t\t * Set the filename to use when a download is triggered.\n\t\t * A filename will be generated if not provided.\n\t\t */\n\t\tfilename?: string;\n\t};\n}\n"]}
1
+ {"version":3,"file":"IBlobStorageGetContentRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IBlobStorageGetContentRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to get the content from blob storage.\n */\nexport interface IBlobStorageGetContentRequest {\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the blob to get in urn format.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The query parameters.\n\t */\n\tquery?: {\n\t\t/**\n\t\t * If the content should be decompressed, if it was compressed when stored, defaults to true.\n\t\t * @default true\n\t\t */\n\t\tdecompress?: string;\n\n\t\t/**\n\t\t * Use a different vault key id for decryption, if not provided the default vault key id will be used.\n\t\t * @default undefined\n\t\t */\n\t\toverrideVaultKeyId?: string;\n\n\t\t/**\n\t\t * Set the download flag which should prompt the browser to save the file.\n\t\t * Otherwise the browser should show the content inside the page.\n\t\t * @default false\n\t\t */\n\t\tdownload?: string;\n\n\t\t/**\n\t\t * Set the filename to use when a download is triggered.\n\t\t * A filename will be generated if not provided.\n\t\t */\n\t\tfilename?: string;\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IBlobStorageGetRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IBlobStorageGetRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Request to get an entry from blob storage.\n */\nexport interface IBlobStorageGetRequest {\n\t/**\n\t * The headers which can be used to determine the response data type.\n\t */\n\theaders?: {\n\t\t[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;\n\t};\n\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the blob to get in urn format.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The query parameters.\n\t */\n\tquery?: {\n\t\t/**\n\t\t * Include the content in the response, otherwise only metadata is returned.\n\t\t * @default false\n\t\t */\n\t\tincludeContent?: boolean | string;\n\n\t\t/**\n\t\t * If the content should be decompressed, if it was compressed when stored, defaults to true.\n\t\t * @default true\n\t\t */\n\t\tdecompress?: boolean | string;\n\n\t\t/**\n\t\t * Use a different vault key id for decryption, if not provided the default vault key id will be used.\n\t\t * @default undefined\n\t\t */\n\t\toverrideVaultKeyId?: string;\n\t};\n}\n"]}
1
+ {"version":3,"file":"IBlobStorageGetRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IBlobStorageGetRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Request to get an entry from blob storage.\n */\nexport interface IBlobStorageGetRequest {\n\t/**\n\t * The headers which can be used to determine the response data type.\n\t */\n\theaders?: {\n\t\t[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;\n\t};\n\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the blob to get in urn format.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The query parameters.\n\t */\n\tquery?: {\n\t\t/**\n\t\t * Include the content in the response, otherwise only metadata is returned.\n\t\t * @default false\n\t\t */\n\t\tincludeContent?: string;\n\n\t\t/**\n\t\t * If the content should be decompressed, if it was compressed when stored, defaults to true.\n\t\t * @default true\n\t\t */\n\t\tdecompress?: string;\n\n\t\t/**\n\t\t * Use a different vault key id for decryption, if not provided the default vault key id will be used.\n\t\t * @default undefined\n\t\t */\n\t\toverrideVaultKeyId?: string;\n\t};\n}\n"]}
@@ -8,10 +8,10 @@ export const BlobStorageContexts = {
8
8
  /**
9
9
  * The context root for the blob storage types.
10
10
  */
11
- ContextRoot: "https://schema.twindev.org/blob-storage/",
11
+ Namespace: "https://schema.twindev.org/blob-storage/",
12
12
  /**
13
13
  * The context root for the common types.
14
14
  */
15
- ContextRootCommon: "https://schema.twindev.org/common/"
15
+ NamespaceCommon: "https://schema.twindev.org/common/"
16
16
  };
17
17
  //# sourceMappingURL=blobStorageContexts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"blobStorageContexts.js","sourceRoot":"","sources":["../../../src/models/blobStorageContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC;;OAEG;IACH,WAAW,EAAE,0CAA0C;IAEvD;;OAEG;IACH,iBAAiB,EAAE,oCAAoC;CAC9C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of blob storage data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const BlobStorageContexts = {\n\t/**\n\t * The context root for the blob storage types.\n\t */\n\tContextRoot: \"https://schema.twindev.org/blob-storage/\",\n\n\t/**\n\t * The context root for the common types.\n\t */\n\tContextRootCommon: \"https://schema.twindev.org/common/\"\n} as const;\n\n/**\n * The contexts of blob storage data.\n */\nexport type BlobStorageContexts = (typeof BlobStorageContexts)[keyof typeof BlobStorageContexts];\n"]}
1
+ {"version":3,"file":"blobStorageContexts.js","sourceRoot":"","sources":["../../../src/models/blobStorageContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC;;OAEG;IACH,SAAS,EAAE,0CAA0C;IAErD;;OAEG;IACH,eAAe,EAAE,oCAAoC;CAC5C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of blob storage data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const BlobStorageContexts = {\n\t/**\n\t * The context root for the blob storage types.\n\t */\n\tNamespace: \"https://schema.twindev.org/blob-storage/\",\n\n\t/**\n\t * The context root for the common types.\n\t */\n\tNamespaceCommon: \"https://schema.twindev.org/common/\"\n} as const;\n\n/**\n * The contexts of blob storage data.\n */\nexport type BlobStorageContexts = (typeof BlobStorageContexts)[keyof typeof BlobStorageContexts];\n"]}
@@ -10,8 +10,8 @@ export interface IBlobStorageEntry {
10
10
  * JSON-LD Context.
11
11
  */
12
12
  "@context": [
13
- typeof BlobStorageContexts.ContextRoot,
14
- typeof BlobStorageContexts.ContextRootCommon,
13
+ typeof BlobStorageContexts.Namespace,
14
+ typeof BlobStorageContexts.NamespaceCommon,
15
15
  ...IJsonLdContextDefinitionElement[]
16
16
  ];
17
17
  /**
@@ -10,9 +10,9 @@ export interface IBlobStorageEntryList {
10
10
  * JSON-LD Context.
11
11
  */
12
12
  "@context": [
13
- typeof SchemaOrgContexts.ContextRoot,
14
- typeof BlobStorageContexts.ContextRoot,
15
- typeof BlobStorageContexts.ContextRootCommon,
13
+ typeof SchemaOrgContexts.Namespace,
14
+ typeof BlobStorageContexts.Namespace,
15
+ typeof BlobStorageContexts.NamespaceCommon,
16
16
  ...IJsonLdContextDefinitionElement[]
17
17
  ];
18
18
  /**
@@ -19,7 +19,7 @@ export interface IBlobStorageGetContentRequest {
19
19
  * If the content should be decompressed, if it was compressed when stored, defaults to true.
20
20
  * @default true
21
21
  */
22
- decompress?: boolean | string;
22
+ decompress?: string;
23
23
  /**
24
24
  * Use a different vault key id for decryption, if not provided the default vault key id will be used.
25
25
  * @default undefined
@@ -30,7 +30,7 @@ export interface IBlobStorageGetContentRequest {
30
30
  * Otherwise the browser should show the content inside the page.
31
31
  * @default false
32
32
  */
33
- download?: boolean | string;
33
+ download?: string;
34
34
  /**
35
35
  * Set the filename to use when a download is triggered.
36
36
  * A filename will be generated if not provided.
@@ -26,12 +26,12 @@ export interface IBlobStorageGetRequest {
26
26
  * Include the content in the response, otherwise only metadata is returned.
27
27
  * @default false
28
28
  */
29
- includeContent?: boolean | string;
29
+ includeContent?: string;
30
30
  /**
31
31
  * If the content should be decompressed, if it was compressed when stored, defaults to true.
32
32
  * @default true
33
33
  */
34
- decompress?: boolean | string;
34
+ decompress?: string;
35
35
  /**
36
36
  * Use a different vault key id for decryption, if not provided the default vault key id will be used.
37
37
  * @default undefined
@@ -5,11 +5,11 @@ export declare const BlobStorageContexts: {
5
5
  /**
6
6
  * The context root for the blob storage types.
7
7
  */
8
- readonly ContextRoot: "https://schema.twindev.org/blob-storage/";
8
+ readonly Namespace: "https://schema.twindev.org/blob-storage/";
9
9
  /**
10
10
  * The context root for the common types.
11
11
  */
12
- readonly ContextRootCommon: "https://schema.twindev.org/common/";
12
+ readonly NamespaceCommon: "https://schema.twindev.org/common/";
13
13
  };
14
14
  /**
15
15
  * The contexts of blob storage data.
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @twin.org/blob-storage-models - Changelog
2
2
 
3
+ ## [0.0.3-next.2](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.3-next.1...blob-storage-models-v0.0.3-next.2) (2026-01-14)
4
+
5
+
6
+ ### Features
7
+
8
+ * update contexts and namespaces ([#32](https://github.com/twinfoundation/blob-storage/issues/32)) ([187ed36](https://github.com/twinfoundation/blob-storage/commit/187ed36a7d83062665f70689ec5e2b2f553a592e))
9
+
3
10
  ## [0.0.3-next.1](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.3-next.0...blob-storage-models-v0.0.3-next.1) (2025-11-11)
4
11
 
5
12
 
@@ -26,7 +26,7 @@ The query parameters.
26
26
 
27
27
  #### decompress?
28
28
 
29
- > `optional` **decompress**: `string` \| `boolean`
29
+ > `optional` **decompress**: `string`
30
30
 
31
31
  If the content should be decompressed, if it was compressed when stored, defaults to true.
32
32
 
@@ -50,7 +50,7 @@ undefined
50
50
 
51
51
  #### download?
52
52
 
53
- > `optional` **download**: `string` \| `boolean`
53
+ > `optional` **download**: `string`
54
54
 
55
55
  Set the download flag which should prompt the browser to save the file.
56
56
  Otherwise the browser should show the content inside the page.
@@ -38,7 +38,7 @@ The query parameters.
38
38
 
39
39
  #### includeContent?
40
40
 
41
- > `optional` **includeContent**: `string` \| `boolean`
41
+ > `optional` **includeContent**: `string`
42
42
 
43
43
  Include the content in the response, otherwise only metadata is returned.
44
44
 
@@ -50,7 +50,7 @@ false
50
50
 
51
51
  #### decompress?
52
52
 
53
- > `optional` **decompress**: `string` \| `boolean`
53
+ > `optional` **decompress**: `string`
54
54
 
55
55
  If the content should be decompressed, if it was compressed when stored, defaults to true.
56
56
 
@@ -6,14 +6,14 @@ The contexts of blob storage data.
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### ContextRoot
9
+ ### Namespace
10
10
 
11
- > `readonly` **ContextRoot**: `"https://schema.twindev.org/blob-storage/"` = `"https://schema.twindev.org/blob-storage/"`
11
+ > `readonly` **Namespace**: `"https://schema.twindev.org/blob-storage/"` = `"https://schema.twindev.org/blob-storage/"`
12
12
 
13
13
  The context root for the blob storage types.
14
14
 
15
- ### ContextRootCommon
15
+ ### NamespaceCommon
16
16
 
17
- > `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
17
+ > `readonly` **NamespaceCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
18
18
 
19
19
  The context root for the common types.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/blob-storage-models",
3
- "version": "0.0.3-next.1",
3
+ "version": "0.0.3-next.2",
4
4
  "description": "Models which define the structure of the blob storage contracts and connectors",
5
5
  "repository": {
6
6
  "type": "git",