@twin.org/blob-storage-service 0.0.1-next.9 → 0.0.2-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/cjs/index.cjs +476 -160
- package/dist/esm/index.mjs +479 -164
- package/dist/types/blobStorageRoutes.d.ts +10 -2
- package/dist/types/blobStorageService.d.ts +46 -35
- package/dist/types/entities/blobStorageEntry.d.ts +51 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/models/IBlobStorageServiceConfig.d.ts +3 -8
- package/dist/types/models/IBlobStorageServiceConstructorOptions.d.ts +19 -0
- package/docs/changelog.md +190 -1
- package/docs/open-api/spec.json +1231 -1853
- package/docs/reference/classes/BlobStorageEntry.md +101 -0
- package/docs/reference/classes/BlobStorageService.md +158 -69
- package/docs/reference/functions/blobStorageCreate.md +9 -3
- package/docs/reference/functions/blobStorageGet.md +9 -3
- package/docs/reference/functions/blobStorageGetContent.md +9 -3
- package/docs/reference/functions/blobStorageList.md +31 -0
- package/docs/reference/functions/blobStorageRemove.md +9 -3
- package/docs/reference/functions/blobStorageUpdate.md +9 -3
- package/docs/reference/functions/generateRestRoutesBlobStorage.md +15 -7
- package/docs/reference/index.md +3 -1
- package/docs/reference/interfaces/IBlobStorageServiceConfig.md +4 -18
- package/docs/reference/interfaces/IBlobStorageServiceConstructorOptions.md +33 -0
- package/locales/en.json +2 -1
- package/package.json +7 -5
- package/dist/types/entities/blobMetadata.d.ts +0 -30
- package/docs/reference/classes/BlobMetadata.md +0 -61
|
@@ -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
|
|
|
@@ -27,16 +21,8 @@ Defaults to the first entry in the factory if not provided.
|
|
|
27
21
|
|
|
28
22
|
***
|
|
29
23
|
|
|
30
|
-
###
|
|
31
|
-
|
|
32
|
-
> `optional` **includeNodeIdentity**: `boolean`
|
|
33
|
-
|
|
34
|
-
Include the node identity when performing storage operations, defaults to true.
|
|
35
|
-
|
|
36
|
-
***
|
|
37
|
-
|
|
38
|
-
### includeUserIdentity?
|
|
24
|
+
### partitionPerUser?
|
|
39
25
|
|
|
40
|
-
> `optional` **
|
|
26
|
+
> `optional` **partitionPerUser**: `boolean`
|
|
41
27
|
|
|
42
|
-
Include the user identity when performing storage operations, defaults to
|
|
28
|
+
Include the user identity when performing storage operations, allow partitioning per user, defaults to false.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Interface: IBlobStorageServiceConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the Blob Storage Service constructor.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### entryEntityStorageType?
|
|
8
|
+
|
|
9
|
+
> `optional` **entryEntityStorageType**: `string`
|
|
10
|
+
|
|
11
|
+
The type of the storage connector for the metadata.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
blob-storage-entry
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### vaultConnectorType?
|
|
22
|
+
|
|
23
|
+
> `optional` **vaultConnectorType**: `string`
|
|
24
|
+
|
|
25
|
+
The type of the vault connector for encryption.
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### config?
|
|
30
|
+
|
|
31
|
+
> `optional` **config**: [`IBlobStorageServiceConfig`](IBlobStorageServiceConfig.md)
|
|
32
|
+
|
|
33
|
+
The configuration for the service.
|
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.
|
|
3
|
+
"version": "0.0.2-next.1",
|
|
4
4
|
"description": "Blob storage contract implementation and REST endpoint definitions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,12 +15,14 @@
|
|
|
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.2-next.1",
|
|
19
19
|
"@twin.org/core": "next",
|
|
20
|
+
"@twin.org/crypto": "next",
|
|
20
21
|
"@twin.org/data-json-ld": "next",
|
|
21
22
|
"@twin.org/entity": "next",
|
|
22
23
|
"@twin.org/entity-storage-models": "next",
|
|
23
24
|
"@twin.org/nameof": "next",
|
|
25
|
+
"@twin.org/standards-schema-org": "next",
|
|
24
26
|
"@twin.org/vault-models": "next",
|
|
25
27
|
"@twin.org/web": "next"
|
|
26
28
|
},
|
|
@@ -29,11 +31,11 @@
|
|
|
29
31
|
"types": "./dist/types/index.d.ts",
|
|
30
32
|
"exports": {
|
|
31
33
|
".": {
|
|
34
|
+
"types": "./dist/types/index.d.ts",
|
|
32
35
|
"require": "./dist/cjs/index.cjs",
|
|
33
|
-
"import": "./dist/esm/index.mjs"
|
|
34
|
-
"types": "./dist/types/index.d.ts"
|
|
36
|
+
"import": "./dist/esm/index.mjs"
|
|
35
37
|
},
|
|
36
|
-
"./locales": "./locales"
|
|
38
|
+
"./locales/*.json": "./locales/*.json"
|
|
37
39
|
},
|
|
38
40
|
"files": [
|
|
39
41
|
"dist/cjs",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
-
/**
|
|
3
|
-
* Class representing metadata for the blob storage.
|
|
4
|
-
*/
|
|
5
|
-
export declare class BlobMetadata {
|
|
6
|
-
/**
|
|
7
|
-
* The id for the blob.
|
|
8
|
-
*/
|
|
9
|
-
id: string;
|
|
10
|
-
/**
|
|
11
|
-
* The mime type for the blob.
|
|
12
|
-
*/
|
|
13
|
-
mimeType?: string;
|
|
14
|
-
/**
|
|
15
|
-
* The extension.
|
|
16
|
-
*/
|
|
17
|
-
extension?: string;
|
|
18
|
-
/**
|
|
19
|
-
* The metadata for the blob as JSON-LD.
|
|
20
|
-
*/
|
|
21
|
-
metadata?: IJsonLdNodeObject;
|
|
22
|
-
/**
|
|
23
|
-
* The user identity that created the blob.
|
|
24
|
-
*/
|
|
25
|
-
userIdentity?: string;
|
|
26
|
-
/**
|
|
27
|
-
* The node identity that created the blob.
|
|
28
|
-
*/
|
|
29
|
-
nodeIdentity?: string;
|
|
30
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Class: BlobMetadata
|
|
2
|
-
|
|
3
|
-
Class representing metadata for the blob storage.
|
|
4
|
-
|
|
5
|
-
## Constructors
|
|
6
|
-
|
|
7
|
-
### new BlobMetadata()
|
|
8
|
-
|
|
9
|
-
> **new BlobMetadata**(): [`BlobMetadata`](BlobMetadata.md)
|
|
10
|
-
|
|
11
|
-
#### Returns
|
|
12
|
-
|
|
13
|
-
[`BlobMetadata`](BlobMetadata.md)
|
|
14
|
-
|
|
15
|
-
## Properties
|
|
16
|
-
|
|
17
|
-
### id
|
|
18
|
-
|
|
19
|
-
> **id**: `string`
|
|
20
|
-
|
|
21
|
-
The id for the blob.
|
|
22
|
-
|
|
23
|
-
***
|
|
24
|
-
|
|
25
|
-
### mimeType?
|
|
26
|
-
|
|
27
|
-
> `optional` **mimeType**: `string`
|
|
28
|
-
|
|
29
|
-
The mime type for the blob.
|
|
30
|
-
|
|
31
|
-
***
|
|
32
|
-
|
|
33
|
-
### extension?
|
|
34
|
-
|
|
35
|
-
> `optional` **extension**: `string`
|
|
36
|
-
|
|
37
|
-
The extension.
|
|
38
|
-
|
|
39
|
-
***
|
|
40
|
-
|
|
41
|
-
### metadata?
|
|
42
|
-
|
|
43
|
-
> `optional` **metadata**: `IJsonLdNodeObject`
|
|
44
|
-
|
|
45
|
-
The metadata for the blob as JSON-LD.
|
|
46
|
-
|
|
47
|
-
***
|
|
48
|
-
|
|
49
|
-
### userIdentity?
|
|
50
|
-
|
|
51
|
-
> `optional` **userIdentity**: `string`
|
|
52
|
-
|
|
53
|
-
The user identity that created the blob.
|
|
54
|
-
|
|
55
|
-
***
|
|
56
|
-
|
|
57
|
-
### nodeIdentity?
|
|
58
|
-
|
|
59
|
-
> `optional` **nodeIdentity**: `string`
|
|
60
|
-
|
|
61
|
-
The node identity that created the blob.
|