@twin.org/blob-storage-service 0.0.2-next.4 → 0.0.3-next.1
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/es/blobStorageRoutes.js +528 -0
- package/dist/es/blobStorageRoutes.js.map +1 -0
- package/dist/es/blobStorageService.js +359 -0
- package/dist/es/blobStorageService.js.map +1 -0
- package/dist/es/entities/blobStorageEntry.js +96 -0
- package/dist/es/entities/blobStorageEntry.js.map +1 -0
- package/dist/es/index.js +10 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IBlobStorageServiceConfig.js +4 -0
- package/dist/es/models/IBlobStorageServiceConfig.js.map +1 -0
- package/dist/es/models/IBlobStorageServiceConstructorOptions.js +2 -0
- package/dist/es/models/IBlobStorageServiceConstructorOptions.js.map +1 -0
- package/dist/es/restEntryPoints.js +15 -0
- package/dist/es/restEntryPoints.js.map +1 -0
- package/dist/es/schema.js +11 -0
- package/dist/es/schema.js.map +1 -0
- package/dist/types/blobStorageService.d.ts +14 -16
- package/dist/types/entities/blobStorageEntry.d.ts +0 -4
- package/dist/types/index.d.ts +7 -7
- package/dist/types/models/IBlobStorageServiceConfig.d.ts +0 -4
- package/dist/types/models/IBlobStorageServiceConstructorOptions.d.ts +1 -1
- package/docs/changelog.md +49 -0
- package/docs/open-api/spec.json +38 -497
- package/docs/reference/classes/BlobStorageEntry.md +0 -8
- package/docs/reference/classes/BlobStorageService.md +24 -52
- package/docs/reference/interfaces/IBlobStorageServiceConfig.md +0 -8
- package/locales/en.json +3 -1
- package/package.json +12 -9
- package/dist/cjs/index.cjs +0 -1084
- package/dist/esm/index.mjs +0 -1072
|
@@ -30,19 +30,33 @@ The options for the service.
|
|
|
30
30
|
|
|
31
31
|
### CLASS\_NAME
|
|
32
32
|
|
|
33
|
-
> `readonly` **CLASS\_NAME**: `string`
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
35
35
|
Runtime name for the class.
|
|
36
36
|
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className()
|
|
40
|
+
|
|
41
|
+
> **className**(): `string`
|
|
42
|
+
|
|
43
|
+
Returns the class name of the component.
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The class name of the component.
|
|
50
|
+
|
|
37
51
|
#### Implementation of
|
|
38
52
|
|
|
39
|
-
`IBlobStorageComponent.
|
|
53
|
+
`IBlobStorageComponent.className`
|
|
40
54
|
|
|
41
|
-
|
|
55
|
+
***
|
|
42
56
|
|
|
43
57
|
### create()
|
|
44
58
|
|
|
45
|
-
> **create**(`blob`, `encodingFormat?`, `fileExtension?`, `metadata?`, `options
|
|
59
|
+
> **create**(`blob`, `encodingFormat?`, `fileExtension?`, `metadata?`, `options?`): `Promise`\<`string`\>
|
|
46
60
|
|
|
47
61
|
Create the blob with some metadata.
|
|
48
62
|
|
|
@@ -92,7 +106,7 @@ Use a different vault key id for encryption, if not provided the default vault k
|
|
|
92
106
|
|
|
93
107
|
`BlobStorageCompressionType`
|
|
94
108
|
|
|
95
|
-
Optional compression type to use for the blob, defaults to no compression
|
|
109
|
+
Optional compression type to use for the blob, defaults to no compression.
|
|
96
110
|
|
|
97
111
|
###### namespace?
|
|
98
112
|
|
|
@@ -100,18 +114,6 @@ Optional compression type to use for the blob, defaults to no compression.*
|
|
|
100
114
|
|
|
101
115
|
The namespace to use for storing, defaults to component configured namespace.
|
|
102
116
|
|
|
103
|
-
##### userIdentity?
|
|
104
|
-
|
|
105
|
-
`string`
|
|
106
|
-
|
|
107
|
-
The user identity to use with storage operations.
|
|
108
|
-
|
|
109
|
-
##### nodeIdentity?
|
|
110
|
-
|
|
111
|
-
`string`
|
|
112
|
-
|
|
113
|
-
The node identity to use with storage operations.
|
|
114
|
-
|
|
115
117
|
#### Returns
|
|
116
118
|
|
|
117
119
|
`Promise`\<`string`\>
|
|
@@ -126,7 +128,7 @@ The id of the stored blob in urn format.
|
|
|
126
128
|
|
|
127
129
|
### get()
|
|
128
130
|
|
|
129
|
-
> **get**(`id`, `options
|
|
131
|
+
> **get**(`id`, `options?`): `Promise`\<`IBlobStorageEntry`\>
|
|
130
132
|
|
|
131
133
|
Get the blob entry.
|
|
132
134
|
|
|
@@ -160,18 +162,6 @@ If the content should be decompressed, if it was compressed when stored, default
|
|
|
160
162
|
|
|
161
163
|
Use a different vault key id for decryption, if not provided the default vault key id will be used.
|
|
162
164
|
|
|
163
|
-
##### userIdentity?
|
|
164
|
-
|
|
165
|
-
`string`
|
|
166
|
-
|
|
167
|
-
The user identity to use with storage operations.
|
|
168
|
-
|
|
169
|
-
##### nodeIdentity?
|
|
170
|
-
|
|
171
|
-
`string`
|
|
172
|
-
|
|
173
|
-
The node identity to use with storage operations.
|
|
174
|
-
|
|
175
165
|
#### Returns
|
|
176
166
|
|
|
177
167
|
`Promise`\<`IBlobStorageEntry`\>
|
|
@@ -190,7 +180,7 @@ Not found error if the blob cannot be found.
|
|
|
190
180
|
|
|
191
181
|
### update()
|
|
192
182
|
|
|
193
|
-
> **update**(`id`, `encodingFormat?`, `fileExtension?`, `metadata
|
|
183
|
+
> **update**(`id`, `encodingFormat?`, `fileExtension?`, `metadata?`): `Promise`\<`void`\>
|
|
194
184
|
|
|
195
185
|
Update the blob with metadata.
|
|
196
186
|
|
|
@@ -220,12 +210,6 @@ Extension for the blob, will be detected if left undefined.
|
|
|
220
210
|
|
|
221
211
|
Data for the custom metadata as JSON-LD.
|
|
222
212
|
|
|
223
|
-
##### userIdentity?
|
|
224
|
-
|
|
225
|
-
`string`
|
|
226
|
-
|
|
227
|
-
The user identity to use with storage operations.
|
|
228
|
-
|
|
229
213
|
#### Returns
|
|
230
214
|
|
|
231
215
|
`Promise`\<`void`\>
|
|
@@ -244,7 +228,7 @@ Not found error if the blob cannot be found.
|
|
|
244
228
|
|
|
245
229
|
### remove()
|
|
246
230
|
|
|
247
|
-
> **remove**(`id
|
|
231
|
+
> **remove**(`id`): `Promise`\<`void`\>
|
|
248
232
|
|
|
249
233
|
Remove the blob.
|
|
250
234
|
|
|
@@ -256,12 +240,6 @@ Remove the blob.
|
|
|
256
240
|
|
|
257
241
|
The id of the blob to remove in urn format.
|
|
258
242
|
|
|
259
|
-
##### userIdentity?
|
|
260
|
-
|
|
261
|
-
`string`
|
|
262
|
-
|
|
263
|
-
The user identity to use with storage operations.
|
|
264
|
-
|
|
265
243
|
#### Returns
|
|
266
244
|
|
|
267
245
|
`Promise`\<`void`\>
|
|
@@ -276,7 +254,7 @@ Nothing.
|
|
|
276
254
|
|
|
277
255
|
### query()
|
|
278
256
|
|
|
279
|
-
> **query**(`conditions?`, `orderBy?`, `orderByDirection?`, `cursor?`, `
|
|
257
|
+
> **query**(`conditions?`, `orderBy?`, `orderByDirection?`, `cursor?`, `limit?`): `Promise`\<`IBlobStorageEntryList`\>
|
|
280
258
|
|
|
281
259
|
Query all the blob storage entries which match the conditions.
|
|
282
260
|
|
|
@@ -306,18 +284,12 @@ The direction for the order, defaults to descending.
|
|
|
306
284
|
|
|
307
285
|
The cursor to request the next page of entries.
|
|
308
286
|
|
|
309
|
-
#####
|
|
287
|
+
##### limit?
|
|
310
288
|
|
|
311
289
|
`number`
|
|
312
290
|
|
|
313
291
|
The suggested number of entries to return in each chunk, in some scenarios can return a different amount.
|
|
314
292
|
|
|
315
|
-
##### userIdentity?
|
|
316
|
-
|
|
317
|
-
`string`
|
|
318
|
-
|
|
319
|
-
The user identity to use with storage operations.
|
|
320
|
-
|
|
321
293
|
#### Returns
|
|
322
294
|
|
|
323
295
|
`Promise`\<`IBlobStorageEntryList`\>
|
|
@@ -18,11 +18,3 @@ The name of the vault key to use for encryption, if not configured no encryption
|
|
|
18
18
|
|
|
19
19
|
The namespace of the default storage connector to use.
|
|
20
20
|
Defaults to the first entry in the factory if not provided.
|
|
21
|
-
|
|
22
|
-
***
|
|
23
|
-
|
|
24
|
-
### partitionPerUser?
|
|
25
|
-
|
|
26
|
-
> `optional` **partitionPerUser**: `boolean`
|
|
27
|
-
|
|
28
|
-
Include the user identity when performing storage operations, allow partitioning per user, defaults to false.
|
package/locales/en.json
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
"updateFailed": "There was a problem updating the blob",
|
|
8
8
|
"removeFailed": "There was a problem removing the blob",
|
|
9
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
|
+
"vaultConnectorNotConfigured": "The vault connector is not configured, but encryption/decryption was requested.",
|
|
11
|
+
"blobNotFound": "The blob with id \"{notFoundId}\" was not found",
|
|
12
|
+
"entityNotFound": "The entity with id \"{notFoundId}\" was not found"
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/blob-storage-service",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-next.1",
|
|
4
4
|
"description": "Blob storage contract implementation and REST endpoint definitions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/api-models": "next",
|
|
18
|
-
"@twin.org/blob-storage-models": "0.0.
|
|
18
|
+
"@twin.org/blob-storage-models": "0.0.3-next.1",
|
|
19
|
+
"@twin.org/context": "next",
|
|
19
20
|
"@twin.org/core": "next",
|
|
20
21
|
"@twin.org/crypto": "next",
|
|
21
22
|
"@twin.org/data-json-ld": "next",
|
|
@@ -26,20 +27,18 @@
|
|
|
26
27
|
"@twin.org/vault-models": "next",
|
|
27
28
|
"@twin.org/web": "next"
|
|
28
29
|
},
|
|
29
|
-
"main": "./dist/
|
|
30
|
-
"module": "./dist/esm/index.mjs",
|
|
30
|
+
"main": "./dist/es/index.js",
|
|
31
31
|
"types": "./dist/types/index.d.ts",
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
34
|
"types": "./dist/types/index.d.ts",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
35
|
+
"import": "./dist/es/index.js",
|
|
36
|
+
"default": "./dist/es/index.js"
|
|
37
37
|
},
|
|
38
38
|
"./locales/*.json": "./locales/*.json"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
|
-
"dist/
|
|
42
|
-
"dist/esm",
|
|
41
|
+
"dist/es",
|
|
43
42
|
"dist/types",
|
|
44
43
|
"locales",
|
|
45
44
|
"docs"
|
|
@@ -58,5 +57,9 @@
|
|
|
58
57
|
"service",
|
|
59
58
|
"microservice",
|
|
60
59
|
"business-logic"
|
|
61
|
-
]
|
|
60
|
+
],
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "git+https://github.com/twinfoundation/blob-storage/issues"
|
|
63
|
+
},
|
|
64
|
+
"homepage": "https://twindev.org"
|
|
62
65
|
}
|