@twin.org/blob-storage-models 0.0.1-next.34 → 0.0.1-next.36
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.
- package/dist/cjs/index.cjs +52 -1
- package/dist/esm/index.mjs +52 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/IBlobStorageComponent.d.ts +21 -4
- package/dist/types/models/IBlobStorageEntry.d.ts +9 -0
- package/dist/types/models/api/IBlobStorageCreateRequest.d.ts +15 -0
- package/dist/types/models/api/IBlobStorageGetContentRequest.d.ts +11 -1
- package/dist/types/models/api/IBlobStorageGetRequest.d.ts +11 -1
- package/dist/types/models/blobStorageCompressionType.d.ts +17 -0
- package/dist/types/models/blobStorageTypes.d.ts +4 -0
- package/docs/changelog.md +14 -0
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IBlobStorageComponent.md +42 -4
- package/docs/reference/interfaces/IBlobStorageCreateRequest.md +30 -0
- package/docs/reference/interfaces/IBlobStorageEntry.md +16 -0
- package/docs/reference/interfaces/IBlobStorageGetContentRequest.md +25 -1
- package/docs/reference/interfaces/IBlobStorageGetRequest.md +25 -1
- package/docs/reference/type-aliases/BlobStorageCompressionType.md +5 -0
- package/docs/reference/variables/BlobStorageCompressionType.md +19 -0
- package/docs/reference/variables/BlobStorageTypes.md +6 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -30,7 +30,26 @@ const BlobStorageTypes = {
|
|
|
30
30
|
/**
|
|
31
31
|
* Represents blob storage entry.
|
|
32
32
|
*/
|
|
33
|
-
Entry: "BlobStorageEntry"
|
|
33
|
+
Entry: "BlobStorageEntry",
|
|
34
|
+
/**
|
|
35
|
+
* Represents blob storage entry compression.
|
|
36
|
+
*/
|
|
37
|
+
CompressionType: "BlobStorageCompressionType"
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var $schema$1 = "https://json-schema.org/draft/2020-12/schema";
|
|
41
|
+
var $id$1 = "https://schema.twindev.org/blob-storage/BlobStorageCompressionType";
|
|
42
|
+
var description$1 = "The types of compression for blob storage data.";
|
|
43
|
+
var type$1 = "string";
|
|
44
|
+
var BlobStorageCompressionTypeSchema = {
|
|
45
|
+
$schema: $schema$1,
|
|
46
|
+
$id: $id$1,
|
|
47
|
+
description: description$1,
|
|
48
|
+
type: type$1,
|
|
49
|
+
"enum": [
|
|
50
|
+
"gzip",
|
|
51
|
+
"deflate"
|
|
52
|
+
]
|
|
34
53
|
};
|
|
35
54
|
|
|
36
55
|
var $schema = "https://json-schema.org/draft/2020-12/schema";
|
|
@@ -85,6 +104,14 @@ var properties = {
|
|
|
85
104
|
type: "string",
|
|
86
105
|
description: "The mime type for the blob."
|
|
87
106
|
},
|
|
107
|
+
isEncrypted: {
|
|
108
|
+
type: "boolean",
|
|
109
|
+
description: "Indicates if the blob is encrypted."
|
|
110
|
+
},
|
|
111
|
+
compression: {
|
|
112
|
+
$ref: "https://schema.twindev.org/blob-storage/BlobStorageCompressionType",
|
|
113
|
+
description: "The type of compression used for the blob, if not set it is not stored with compression."
|
|
114
|
+
},
|
|
88
115
|
fileExtension: {
|
|
89
116
|
type: "string",
|
|
90
117
|
description: "The extension."
|
|
@@ -133,6 +160,12 @@ class BlobStorageDataTypes {
|
|
|
133
160
|
defaultValue: {},
|
|
134
161
|
jsonSchema: async () => BlobStorageEntrySchema
|
|
135
162
|
}));
|
|
163
|
+
dataCore.DataTypeHandlerFactory.register(`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.CompressionType}`, () => ({
|
|
164
|
+
context: BlobStorageContexts.ContextRoot,
|
|
165
|
+
type: BlobStorageTypes.CompressionType,
|
|
166
|
+
defaultValue: {},
|
|
167
|
+
jsonSchema: async () => BlobStorageCompressionTypeSchema
|
|
168
|
+
}));
|
|
136
169
|
}
|
|
137
170
|
}
|
|
138
171
|
|
|
@@ -144,6 +177,24 @@ class BlobStorageDataTypes {
|
|
|
144
177
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
145
178
|
const BlobStorageConnectorFactory = core.Factory.createFactory("blob-storage");
|
|
146
179
|
|
|
180
|
+
// Copyright 2024 IOTA Stiftung.
|
|
181
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
182
|
+
/**
|
|
183
|
+
* The types of compression for blob storage data.
|
|
184
|
+
*/
|
|
185
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
186
|
+
const BlobStorageCompressionType = {
|
|
187
|
+
/**
|
|
188
|
+
* Gzip.
|
|
189
|
+
*/
|
|
190
|
+
Gzip: "gzip",
|
|
191
|
+
/**
|
|
192
|
+
* Deflate.
|
|
193
|
+
*/
|
|
194
|
+
Deflate: "deflate"
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
exports.BlobStorageCompressionType = BlobStorageCompressionType;
|
|
147
198
|
exports.BlobStorageConnectorFactory = BlobStorageConnectorFactory;
|
|
148
199
|
exports.BlobStorageContexts = BlobStorageContexts;
|
|
149
200
|
exports.BlobStorageDataTypes = BlobStorageDataTypes;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -28,7 +28,26 @@ const BlobStorageTypes = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Represents blob storage entry.
|
|
30
30
|
*/
|
|
31
|
-
Entry: "BlobStorageEntry"
|
|
31
|
+
Entry: "BlobStorageEntry",
|
|
32
|
+
/**
|
|
33
|
+
* Represents blob storage entry compression.
|
|
34
|
+
*/
|
|
35
|
+
CompressionType: "BlobStorageCompressionType"
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var $schema$1 = "https://json-schema.org/draft/2020-12/schema";
|
|
39
|
+
var $id$1 = "https://schema.twindev.org/blob-storage/BlobStorageCompressionType";
|
|
40
|
+
var description$1 = "The types of compression for blob storage data.";
|
|
41
|
+
var type$1 = "string";
|
|
42
|
+
var BlobStorageCompressionTypeSchema = {
|
|
43
|
+
$schema: $schema$1,
|
|
44
|
+
$id: $id$1,
|
|
45
|
+
description: description$1,
|
|
46
|
+
type: type$1,
|
|
47
|
+
"enum": [
|
|
48
|
+
"gzip",
|
|
49
|
+
"deflate"
|
|
50
|
+
]
|
|
32
51
|
};
|
|
33
52
|
|
|
34
53
|
var $schema = "https://json-schema.org/draft/2020-12/schema";
|
|
@@ -83,6 +102,14 @@ var properties = {
|
|
|
83
102
|
type: "string",
|
|
84
103
|
description: "The mime type for the blob."
|
|
85
104
|
},
|
|
105
|
+
isEncrypted: {
|
|
106
|
+
type: "boolean",
|
|
107
|
+
description: "Indicates if the blob is encrypted."
|
|
108
|
+
},
|
|
109
|
+
compression: {
|
|
110
|
+
$ref: "https://schema.twindev.org/blob-storage/BlobStorageCompressionType",
|
|
111
|
+
description: "The type of compression used for the blob, if not set it is not stored with compression."
|
|
112
|
+
},
|
|
86
113
|
fileExtension: {
|
|
87
114
|
type: "string",
|
|
88
115
|
description: "The extension."
|
|
@@ -131,6 +158,12 @@ class BlobStorageDataTypes {
|
|
|
131
158
|
defaultValue: {},
|
|
132
159
|
jsonSchema: async () => BlobStorageEntrySchema
|
|
133
160
|
}));
|
|
161
|
+
DataTypeHandlerFactory.register(`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.CompressionType}`, () => ({
|
|
162
|
+
context: BlobStorageContexts.ContextRoot,
|
|
163
|
+
type: BlobStorageTypes.CompressionType,
|
|
164
|
+
defaultValue: {},
|
|
165
|
+
jsonSchema: async () => BlobStorageCompressionTypeSchema
|
|
166
|
+
}));
|
|
134
167
|
}
|
|
135
168
|
}
|
|
136
169
|
|
|
@@ -142,4 +175,21 @@ class BlobStorageDataTypes {
|
|
|
142
175
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
143
176
|
const BlobStorageConnectorFactory = Factory.createFactory("blob-storage");
|
|
144
177
|
|
|
145
|
-
|
|
178
|
+
// Copyright 2024 IOTA Stiftung.
|
|
179
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
180
|
+
/**
|
|
181
|
+
* The types of compression for blob storage data.
|
|
182
|
+
*/
|
|
183
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
184
|
+
const BlobStorageCompressionType = {
|
|
185
|
+
/**
|
|
186
|
+
* Gzip.
|
|
187
|
+
*/
|
|
188
|
+
Gzip: "gzip",
|
|
189
|
+
/**
|
|
190
|
+
* Deflate.
|
|
191
|
+
*/
|
|
192
|
+
Deflate: "deflate"
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export { BlobStorageCompressionType, BlobStorageConnectorFactory, BlobStorageContexts, BlobStorageDataTypes, BlobStorageTypes };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./models/api/IBlobStorageListRequest";
|
|
|
9
9
|
export * from "./models/api/IBlobStorageListResponse";
|
|
10
10
|
export * from "./models/api/IBlobStorageRemoveRequest";
|
|
11
11
|
export * from "./models/api/IBlobStorageUpdateRequest";
|
|
12
|
+
export * from "./models/blobStorageCompressionType";
|
|
12
13
|
export * from "./models/blobStorageContexts";
|
|
13
14
|
export * from "./models/blobStorageTypes";
|
|
14
15
|
export * from "./models/IBlobStorageComponent";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
2
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
3
|
import type { EntityCondition, SortDirection } from "@twin.org/entity";
|
|
4
|
+
import type { BlobStorageCompressionType } from "./blobStorageCompressionType";
|
|
4
5
|
import type { IBlobStorageEntry } from "./IBlobStorageEntry";
|
|
5
6
|
import type { IBlobStorageEntryList } from "./IBlobStorageEntryList";
|
|
6
7
|
/**
|
|
@@ -13,22 +14,38 @@ export interface IBlobStorageComponent extends IComponent {
|
|
|
13
14
|
* @param encodingFormat Mime type for the blob, will be detected if left undefined.
|
|
14
15
|
* @param fileExtension Extension for the blob, will be detected if left undefined.
|
|
15
16
|
* @param metadata Data for the custom metadata as JSON-LD.
|
|
16
|
-
* @param
|
|
17
|
+
* @param options Optional options for the creation of the blob.
|
|
18
|
+
* @param options.disableEncryption Disables encryption if enabled by default.
|
|
19
|
+
* @param options.overrideVaultKeyId Use a different vault key id for encryption, if not provided the default vault key id will be used.
|
|
20
|
+
* @param options.compress Optional compression type to use for the blob, defaults to no compression.
|
|
21
|
+
* @param options.namespace The namespace to use for storing, defaults to component configured namespace.
|
|
17
22
|
* @param userIdentity The user identity to use with storage operations.
|
|
18
23
|
* @param nodeIdentity The node identity to use with storage operations.
|
|
19
24
|
* @returns The id of the stored blob in urn format.
|
|
20
25
|
*/
|
|
21
|
-
create(blob: string, encodingFormat?: string, fileExtension?: string, metadata?: IJsonLdNodeObject,
|
|
26
|
+
create(blob: string, encodingFormat?: string, fileExtension?: string, metadata?: IJsonLdNodeObject, options?: {
|
|
27
|
+
disableEncryption?: boolean;
|
|
28
|
+
overrideVaultKeyId?: string;
|
|
29
|
+
compress?: BlobStorageCompressionType;
|
|
30
|
+
namespace?: string;
|
|
31
|
+
}, userIdentity?: string, nodeIdentity?: string): Promise<string>;
|
|
22
32
|
/**
|
|
23
33
|
* Get the blob and metadata.
|
|
24
34
|
* @param id The id of the blob to get in urn format.
|
|
25
|
-
* @param
|
|
35
|
+
* @param options Optional options for the retrieval of the blob.
|
|
36
|
+
* @param options.includeContent Include the content, or just get the metadata.
|
|
37
|
+
* @param options.overrideVaultKeyId Use a different vault key id for decryption, if not provided the default vault key id will be used.
|
|
38
|
+
* @param options.decompress If the content should be decompressed, if it was compressed when stored, defaults to true.
|
|
26
39
|
* @param userIdentity The user identity to use with storage operations.
|
|
27
40
|
* @param nodeIdentity The node identity to use with storage operations.
|
|
28
41
|
* @returns The data and metadata for the blob if it can be found.
|
|
29
42
|
* @throws Not found error if the blob cannot be found.
|
|
30
43
|
*/
|
|
31
|
-
get(id: string,
|
|
44
|
+
get(id: string, options?: {
|
|
45
|
+
includeContent?: boolean;
|
|
46
|
+
decompress?: boolean;
|
|
47
|
+
overrideVaultKeyId?: string;
|
|
48
|
+
}, userIdentity?: string, nodeIdentity?: string): Promise<IBlobStorageEntry>;
|
|
32
49
|
/**
|
|
33
50
|
* Update the blob with metadata.
|
|
34
51
|
* @param id The id of the blob metadata to update.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { BlobStorageCompressionType } from "./blobStorageCompressionType";
|
|
2
3
|
import type { BlobStorageContexts } from "./blobStorageContexts";
|
|
3
4
|
import type { BlobStorageTypes } from "./blobStorageTypes";
|
|
4
5
|
/**
|
|
@@ -41,6 +42,14 @@ export interface IBlobStorageEntry {
|
|
|
41
42
|
* The mime type for the blob.
|
|
42
43
|
*/
|
|
43
44
|
encodingFormat?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Indicates if the blob is encrypted.
|
|
47
|
+
*/
|
|
48
|
+
isEncrypted?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The type of compression used for the blob, if not set it is not stored with compression.
|
|
51
|
+
*/
|
|
52
|
+
compression?: BlobStorageCompressionType;
|
|
44
53
|
/**
|
|
45
54
|
* The extension.
|
|
46
55
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { BlobStorageCompressionType } from "../blobStorageCompressionType";
|
|
2
3
|
/**
|
|
3
4
|
* Request to create an entry in blob storage.
|
|
4
5
|
*/
|
|
@@ -23,6 +24,20 @@ export interface IBlobStorageCreateRequest {
|
|
|
23
24
|
* Custom metadata to associate with the blob as JSON-LD.
|
|
24
25
|
*/
|
|
25
26
|
metadata?: IJsonLdNodeObject;
|
|
27
|
+
/**
|
|
28
|
+
* Disables encryption if enabled by default.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
disableEncryption?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Optional compression type to use for the blob, defaults to no compression.
|
|
34
|
+
*/
|
|
35
|
+
compress?: BlobStorageCompressionType;
|
|
36
|
+
/**
|
|
37
|
+
* Use a different vault key id for encryption, if not provided the default vault key id will be used.
|
|
38
|
+
* @default undefined
|
|
39
|
+
*/
|
|
40
|
+
overrideVaultKeyId?: string;
|
|
26
41
|
/**
|
|
27
42
|
* The namespace to store the data in, defaults to component configured namespace.
|
|
28
43
|
*/
|
|
@@ -15,12 +15,22 @@ export interface IBlobStorageGetContentRequest {
|
|
|
15
15
|
* The query parameters.
|
|
16
16
|
*/
|
|
17
17
|
query?: {
|
|
18
|
+
/**
|
|
19
|
+
* If the content should be decompressed, if it was compressed when stored, defaults to true.
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
decompress?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Use a different vault key id for decryption, if not provided the default vault key id will be used.
|
|
25
|
+
* @default undefined
|
|
26
|
+
*/
|
|
27
|
+
overrideVaultKeyId?: string;
|
|
18
28
|
/**
|
|
19
29
|
* Set the download flag which should prompt the browser to save the file.
|
|
20
30
|
* Otherwise the browser should show the content inside the page.
|
|
21
31
|
* @default false
|
|
22
32
|
*/
|
|
23
|
-
download?:
|
|
33
|
+
download?: string;
|
|
24
34
|
/**
|
|
25
35
|
* Set the filename to use when a download is triggered.
|
|
26
36
|
* A filename will be generated if not provided.
|
|
@@ -26,6 +26,16 @@ export interface IBlobStorageGetRequest {
|
|
|
26
26
|
* Include the content in the response, otherwise only metadata is returned.
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
|
-
includeContent?:
|
|
29
|
+
includeContent?: string;
|
|
30
|
+
/**
|
|
31
|
+
* If the content should be decompressed, if it was compressed when stored, defaults to true.
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
decompress?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Use a different vault key id for decryption, if not provided the default vault key id will be used.
|
|
37
|
+
* @default undefined
|
|
38
|
+
*/
|
|
39
|
+
overrideVaultKeyId?: string;
|
|
30
40
|
};
|
|
31
41
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The types of compression for blob storage data.
|
|
3
|
+
*/
|
|
4
|
+
export declare const BlobStorageCompressionType: {
|
|
5
|
+
/**
|
|
6
|
+
* Gzip.
|
|
7
|
+
*/
|
|
8
|
+
readonly Gzip: "gzip";
|
|
9
|
+
/**
|
|
10
|
+
* Deflate.
|
|
11
|
+
*/
|
|
12
|
+
readonly Deflate: "deflate";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The types of compression for blob storage data.
|
|
16
|
+
*/
|
|
17
|
+
export type BlobStorageCompressionType = (typeof BlobStorageCompressionType)[keyof typeof BlobStorageCompressionType];
|
|
@@ -6,6 +6,10 @@ export declare const BlobStorageTypes: {
|
|
|
6
6
|
* Represents blob storage entry.
|
|
7
7
|
*/
|
|
8
8
|
readonly Entry: "BlobStorageEntry";
|
|
9
|
+
/**
|
|
10
|
+
* Represents blob storage entry compression.
|
|
11
|
+
*/
|
|
12
|
+
readonly CompressionType: "BlobStorageCompressionType";
|
|
9
13
|
};
|
|
10
14
|
/**
|
|
11
15
|
* The types of blob storage data.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @twin.org/blob-storage-models - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.36](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.1-next.35...blob-storage-models-v0.0.1-next.36) (2025-06-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add compression support ([67d239b](https://github.com/twinfoundation/blob-storage/commit/67d239bca8321bd90bf4ff93167c564130309730))
|
|
9
|
+
|
|
10
|
+
## [0.0.1-next.35](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.1-next.34...blob-storage-models-v0.0.1-next.35) (2025-06-17)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* additional encryption options on per item basis ([4b95a65](https://github.com/twinfoundation/blob-storage/commit/4b95a656d19e3b571cea905e36f29b679b13e1e8))
|
|
16
|
+
|
|
3
17
|
## [0.0.1-next.34](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.1-next.33...blob-storage-models-v0.0.1-next.34) (2025-06-12)
|
|
4
18
|
|
|
5
19
|
|
package/docs/reference/index.md
CHANGED
|
@@ -22,11 +22,13 @@
|
|
|
22
22
|
|
|
23
23
|
## Type Aliases
|
|
24
24
|
|
|
25
|
+
- [BlobStorageCompressionType](type-aliases/BlobStorageCompressionType.md)
|
|
25
26
|
- [BlobStorageContexts](type-aliases/BlobStorageContexts.md)
|
|
26
27
|
- [BlobStorageTypes](type-aliases/BlobStorageTypes.md)
|
|
27
28
|
|
|
28
29
|
## Variables
|
|
29
30
|
|
|
30
31
|
- [BlobStorageConnectorFactory](variables/BlobStorageConnectorFactory.md)
|
|
32
|
+
- [BlobStorageCompressionType](variables/BlobStorageCompressionType.md)
|
|
31
33
|
- [BlobStorageContexts](variables/BlobStorageContexts.md)
|
|
32
34
|
- [BlobStorageTypes](variables/BlobStorageTypes.md)
|
|
@@ -10,7 +10,7 @@ Interface describing an blob storage component.
|
|
|
10
10
|
|
|
11
11
|
### create()
|
|
12
12
|
|
|
13
|
-
> **create**(`blob`, `encodingFormat?`, `fileExtension?`, `metadata?`, `
|
|
13
|
+
> **create**(`blob`, `encodingFormat?`, `fileExtension?`, `metadata?`, `options?`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`string`\>
|
|
14
14
|
|
|
15
15
|
Create the blob with some metadata.
|
|
16
16
|
|
|
@@ -40,7 +40,29 @@ Extension for the blob, will be detected if left undefined.
|
|
|
40
40
|
|
|
41
41
|
Data for the custom metadata as JSON-LD.
|
|
42
42
|
|
|
43
|
-
#####
|
|
43
|
+
##### options?
|
|
44
|
+
|
|
45
|
+
Optional options for the creation of the blob.
|
|
46
|
+
|
|
47
|
+
###### disableEncryption?
|
|
48
|
+
|
|
49
|
+
`boolean`
|
|
50
|
+
|
|
51
|
+
Disables encryption if enabled by default.
|
|
52
|
+
|
|
53
|
+
###### overrideVaultKeyId?
|
|
54
|
+
|
|
55
|
+
`string`
|
|
56
|
+
|
|
57
|
+
Use a different vault key id for encryption, if not provided the default vault key id will be used.
|
|
58
|
+
|
|
59
|
+
###### compress?
|
|
60
|
+
|
|
61
|
+
[`BlobStorageCompressionType`](../type-aliases/BlobStorageCompressionType.md)
|
|
62
|
+
|
|
63
|
+
Optional compression type to use for the blob, defaults to no compression.
|
|
64
|
+
|
|
65
|
+
###### namespace?
|
|
44
66
|
|
|
45
67
|
`string`
|
|
46
68
|
|
|
@@ -68,7 +90,7 @@ The id of the stored blob in urn format.
|
|
|
68
90
|
|
|
69
91
|
### get()
|
|
70
92
|
|
|
71
|
-
> **get**(`id`, `
|
|
93
|
+
> **get**(`id`, `options?`, `userIdentity?`, `nodeIdentity?`): `Promise`\<[`IBlobStorageEntry`](IBlobStorageEntry.md)\>
|
|
72
94
|
|
|
73
95
|
Get the blob and metadata.
|
|
74
96
|
|
|
@@ -80,12 +102,28 @@ Get the blob and metadata.
|
|
|
80
102
|
|
|
81
103
|
The id of the blob to get in urn format.
|
|
82
104
|
|
|
83
|
-
#####
|
|
105
|
+
##### options?
|
|
106
|
+
|
|
107
|
+
Optional options for the retrieval of the blob.
|
|
108
|
+
|
|
109
|
+
###### includeContent?
|
|
84
110
|
|
|
85
111
|
`boolean`
|
|
86
112
|
|
|
87
113
|
Include the content, or just get the metadata.
|
|
88
114
|
|
|
115
|
+
###### decompress?
|
|
116
|
+
|
|
117
|
+
`boolean`
|
|
118
|
+
|
|
119
|
+
If the content should be decompressed, if it was compressed when stored, defaults to true.
|
|
120
|
+
|
|
121
|
+
###### overrideVaultKeyId?
|
|
122
|
+
|
|
123
|
+
`string`
|
|
124
|
+
|
|
125
|
+
Use a different vault key id for decryption, if not provided the default vault key id will be used.
|
|
126
|
+
|
|
89
127
|
##### userIdentity?
|
|
90
128
|
|
|
91
129
|
`string`
|
|
@@ -34,6 +34,36 @@ The extension of the blob, will be detected if left undefined.
|
|
|
34
34
|
|
|
35
35
|
Custom metadata to associate with the blob as JSON-LD.
|
|
36
36
|
|
|
37
|
+
#### disableEncryption?
|
|
38
|
+
|
|
39
|
+
> `optional` **disableEncryption**: `boolean`
|
|
40
|
+
|
|
41
|
+
Disables encryption if enabled by default.
|
|
42
|
+
|
|
43
|
+
##### Default
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
false
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### compress?
|
|
50
|
+
|
|
51
|
+
> `optional` **compress**: [`BlobStorageCompressionType`](../type-aliases/BlobStorageCompressionType.md)
|
|
52
|
+
|
|
53
|
+
Optional compression type to use for the blob, defaults to no compression.
|
|
54
|
+
|
|
55
|
+
#### overrideVaultKeyId?
|
|
56
|
+
|
|
57
|
+
> `optional` **overrideVaultKeyId**: `string`
|
|
58
|
+
|
|
59
|
+
Use a different vault key id for encryption, if not provided the default vault key id will be used.
|
|
60
|
+
|
|
61
|
+
##### Default
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
undefined
|
|
65
|
+
```
|
|
66
|
+
|
|
37
67
|
#### namespace?
|
|
38
68
|
|
|
39
69
|
> `optional` **namespace**: `string`
|
|
@@ -68,6 +68,22 @@ The mime type for the blob.
|
|
|
68
68
|
|
|
69
69
|
***
|
|
70
70
|
|
|
71
|
+
### isEncrypted?
|
|
72
|
+
|
|
73
|
+
> `optional` **isEncrypted**: `boolean`
|
|
74
|
+
|
|
75
|
+
Indicates if the blob is encrypted.
|
|
76
|
+
|
|
77
|
+
***
|
|
78
|
+
|
|
79
|
+
### compression?
|
|
80
|
+
|
|
81
|
+
> `optional` **compression**: [`BlobStorageCompressionType`](../type-aliases/BlobStorageCompressionType.md)
|
|
82
|
+
|
|
83
|
+
The type of compression used for the blob, if not set it is not stored with compression.
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
71
87
|
### fileExtension?
|
|
72
88
|
|
|
73
89
|
> `optional` **fileExtension**: `string`
|
|
@@ -24,9 +24,33 @@ The id of the blob to get in urn format.
|
|
|
24
24
|
|
|
25
25
|
The query parameters.
|
|
26
26
|
|
|
27
|
+
#### decompress?
|
|
28
|
+
|
|
29
|
+
> `optional` **decompress**: `string`
|
|
30
|
+
|
|
31
|
+
If the content should be decompressed, if it was compressed when stored, defaults to true.
|
|
32
|
+
|
|
33
|
+
##### Default
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
true
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### overrideVaultKeyId?
|
|
40
|
+
|
|
41
|
+
> `optional` **overrideVaultKeyId**: `string`
|
|
42
|
+
|
|
43
|
+
Use a different vault key id for decryption, if not provided the default vault key id will be used.
|
|
44
|
+
|
|
45
|
+
##### Default
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
undefined
|
|
49
|
+
```
|
|
50
|
+
|
|
27
51
|
#### download?
|
|
28
52
|
|
|
29
|
-
> `optional` **download**: `
|
|
53
|
+
> `optional` **download**: `string`
|
|
30
54
|
|
|
31
55
|
Set the download flag which should prompt the browser to save the file.
|
|
32
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**: `
|
|
41
|
+
> `optional` **includeContent**: `string`
|
|
42
42
|
|
|
43
43
|
Include the content in the response, otherwise only metadata is returned.
|
|
44
44
|
|
|
@@ -47,3 +47,27 @@ Include the content in the response, otherwise only metadata is returned.
|
|
|
47
47
|
```ts
|
|
48
48
|
false
|
|
49
49
|
```
|
|
50
|
+
|
|
51
|
+
#### decompress?
|
|
52
|
+
|
|
53
|
+
> `optional` **decompress**: `string`
|
|
54
|
+
|
|
55
|
+
If the content should be decompressed, if it was compressed when stored, defaults to true.
|
|
56
|
+
|
|
57
|
+
##### Default
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
true
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
#### overrideVaultKeyId?
|
|
64
|
+
|
|
65
|
+
> `optional` **overrideVaultKeyId**: `string`
|
|
66
|
+
|
|
67
|
+
Use a different vault key id for decryption, if not provided the default vault key id will be used.
|
|
68
|
+
|
|
69
|
+
##### Default
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
undefined
|
|
73
|
+
```
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: BlobStorageCompressionType
|
|
2
|
+
|
|
3
|
+
> **BlobStorageCompressionType** = *typeof* [`BlobStorageCompressionType`](../variables/BlobStorageCompressionType.md)\[keyof *typeof* [`BlobStorageCompressionType`](../variables/BlobStorageCompressionType.md)\]
|
|
4
|
+
|
|
5
|
+
The types of compression for blob storage data.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: BlobStorageCompressionType
|
|
2
|
+
|
|
3
|
+
> `const` **BlobStorageCompressionType**: `object`
|
|
4
|
+
|
|
5
|
+
The types of compression for blob storage data.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### Gzip
|
|
10
|
+
|
|
11
|
+
> `readonly` **Gzip**: `"gzip"` = `"gzip"`
|
|
12
|
+
|
|
13
|
+
Gzip.
|
|
14
|
+
|
|
15
|
+
### Deflate
|
|
16
|
+
|
|
17
|
+
> `readonly` **Deflate**: `"deflate"` = `"deflate"`
|
|
18
|
+
|
|
19
|
+
Deflate.
|
|
@@ -11,3 +11,9 @@ The types of blob storage data.
|
|
|
11
11
|
> `readonly` **Entry**: `"BlobStorageEntry"` = `"BlobStorageEntry"`
|
|
12
12
|
|
|
13
13
|
Represents blob storage entry.
|
|
14
|
+
|
|
15
|
+
### CompressionType
|
|
16
|
+
|
|
17
|
+
> `readonly` **CompressionType**: `"BlobStorageCompressionType"` = `"BlobStorageCompressionType"`
|
|
18
|
+
|
|
19
|
+
Represents blob storage entry compression.
|