@twin.org/blob-storage-service 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 +95 -31
- package/dist/esm/index.mjs +97 -33
- package/dist/types/blobStorageService.d.ts +21 -5
- package/dist/types/entities/blobStorageEntry.d.ts +9 -0
- package/dist/types/models/IBlobStorageServiceConfig.d.ts +1 -2
- package/dist/types/models/IBlobStorageServiceConstructorOptions.d.ts +1 -1
- package/docs/changelog.md +32 -0
- package/docs/open-api/spec.json +72 -956
- package/docs/reference/classes/BlobStorageEntry.md +16 -0
- package/docs/reference/classes/BlobStorageService.md +42 -4
- package/docs/reference/interfaces/IBlobStorageServiceConfig.md +1 -7
- package/docs/reference/interfaces/IBlobStorageServiceConstructorOptions.md +1 -1
- package/locales/en.json +2 -1
- package/package.json +2 -2
|
@@ -78,6 +78,22 @@ The metadata for the blob as JSON-LD.
|
|
|
78
78
|
|
|
79
79
|
***
|
|
80
80
|
|
|
81
|
+
### isEncrypted
|
|
82
|
+
|
|
83
|
+
> **isEncrypted**: `boolean`
|
|
84
|
+
|
|
85
|
+
Is the entry encrypted.
|
|
86
|
+
|
|
87
|
+
***
|
|
88
|
+
|
|
89
|
+
### compression?
|
|
90
|
+
|
|
91
|
+
> `optional` **compression**: `BlobStorageCompressionType`
|
|
92
|
+
|
|
93
|
+
Is the entry compressed.
|
|
94
|
+
|
|
95
|
+
***
|
|
96
|
+
|
|
81
97
|
### userIdentity?
|
|
82
98
|
|
|
83
99
|
> `optional` **userIdentity**: `string`
|
|
@@ -50,7 +50,7 @@ Runtime name for the class.
|
|
|
50
50
|
|
|
51
51
|
### create()
|
|
52
52
|
|
|
53
|
-
> **create**(`blob`, `encodingFormat?`, `fileExtension?`, `metadata?`, `
|
|
53
|
+
> **create**(`blob`, `encodingFormat?`, `fileExtension?`, `metadata?`, `options?`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`string`\>
|
|
54
54
|
|
|
55
55
|
Create the blob with some metadata.
|
|
56
56
|
|
|
@@ -80,7 +80,29 @@ Extension for the blob, will be detected if left undefined.
|
|
|
80
80
|
|
|
81
81
|
Data for the custom metadata as JSON-LD.
|
|
82
82
|
|
|
83
|
-
#####
|
|
83
|
+
##### options?
|
|
84
|
+
|
|
85
|
+
Optional options for the creation of the blob.
|
|
86
|
+
|
|
87
|
+
###### disableEncryption?
|
|
88
|
+
|
|
89
|
+
`boolean`
|
|
90
|
+
|
|
91
|
+
Disables encryption if enabled by default.
|
|
92
|
+
|
|
93
|
+
###### overrideVaultKeyId?
|
|
94
|
+
|
|
95
|
+
`string`
|
|
96
|
+
|
|
97
|
+
Use a different vault key id for encryption, if not provided the default vault key id will be used.
|
|
98
|
+
|
|
99
|
+
###### compress?
|
|
100
|
+
|
|
101
|
+
`BlobStorageCompressionType`
|
|
102
|
+
|
|
103
|
+
Optional compression type to use for the blob, defaults to no compression.*
|
|
104
|
+
|
|
105
|
+
###### namespace?
|
|
84
106
|
|
|
85
107
|
`string`
|
|
86
108
|
|
|
@@ -112,7 +134,7 @@ The id of the stored blob in urn format.
|
|
|
112
134
|
|
|
113
135
|
### get()
|
|
114
136
|
|
|
115
|
-
> **get**(`id`, `
|
|
137
|
+
> **get**(`id`, `options?`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`IBlobStorageEntry`\>
|
|
116
138
|
|
|
117
139
|
Get the blob entry.
|
|
118
140
|
|
|
@@ -124,12 +146,28 @@ Get the blob entry.
|
|
|
124
146
|
|
|
125
147
|
The id of the blob to get in urn format.
|
|
126
148
|
|
|
127
|
-
#####
|
|
149
|
+
##### options?
|
|
150
|
+
|
|
151
|
+
Optional options for the retrieval of the blob.
|
|
152
|
+
|
|
153
|
+
###### includeContent?
|
|
128
154
|
|
|
129
155
|
`boolean`
|
|
130
156
|
|
|
131
157
|
Include the content, or just get the metadata.
|
|
132
158
|
|
|
159
|
+
###### decompress?
|
|
160
|
+
|
|
161
|
+
`boolean`
|
|
162
|
+
|
|
163
|
+
If the content should be decompressed, if it was compressed when stored, defaults to true.
|
|
164
|
+
|
|
165
|
+
###### overrideVaultKeyId?
|
|
166
|
+
|
|
167
|
+
`string`
|
|
168
|
+
|
|
169
|
+
Use a different vault key id for decryption, if not provided the default vault key id will be used.
|
|
170
|
+
|
|
133
171
|
##### userIdentity?
|
|
134
172
|
|
|
135
173
|
`string`
|
|
@@ -8,13 +8,7 @@ Configuration for the blob storage service.
|
|
|
8
8
|
|
|
9
9
|
> `optional` **vaultKeyId**: `string`
|
|
10
10
|
|
|
11
|
-
The name of the vault key to use for encryption if
|
|
12
|
-
|
|
13
|
-
#### Default
|
|
14
|
-
|
|
15
|
-
```ts
|
|
16
|
-
blob-storage.
|
|
17
|
-
```
|
|
11
|
+
The name of the vault key to use for encryption, if not configured no encryption will happen.
|
|
18
12
|
|
|
19
13
|
***
|
|
20
14
|
|
package/locales/en.json
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
"getFailed": "There was a problem getting the blob",
|
|
7
7
|
"updateFailed": "There was a problem updating the blob",
|
|
8
8
|
"removeFailed": "There was a problem removing the blob",
|
|
9
|
-
"namespaceMismatch": "The namespace in the urn \"{id}\" does not match the namespace of the blob storage service \"{namespace}\""
|
|
9
|
+
"namespaceMismatch": "The namespace in the urn \"{id}\" does not match the namespace of the blob storage service \"{namespace}\"",
|
|
10
|
+
"vaultConnectorNotConfigured": "The vault connector is not configured, but encryption/decryption was requested."
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/blob-storage-service",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.36",
|
|
4
4
|
"description": "Blob storage contract implementation and REST endpoint definitions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/api-models": "next",
|
|
18
|
-
"@twin.org/blob-storage-models": "0.0.1-next.
|
|
18
|
+
"@twin.org/blob-storage-models": "0.0.1-next.36",
|
|
19
19
|
"@twin.org/core": "next",
|
|
20
20
|
"@twin.org/crypto": "next",
|
|
21
21
|
"@twin.org/data-json-ld": "next",
|