@twin.org/blob-storage-service 0.0.1-next.9 → 0.0.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 +472 -97
- package/dist/esm/index.mjs +475 -101
- package/dist/types/blobStorageRoutes.d.ts +10 -2
- package/dist/types/blobStorageService.d.ts +46 -28
- package/dist/types/entities/blobStorageEntry.d.ts +55 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/models/IBlobStorageServiceConfig.d.ts +1 -2
- package/dist/types/models/IBlobStorageServiceConstructorOptions.d.ts +19 -0
- package/docs/changelog.md +161 -1
- package/docs/open-api/spec.json +1230 -1853
- package/docs/reference/classes/BlobStorageEntry.md +109 -0
- package/docs/reference/classes/BlobStorageService.md +170 -55
- 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 +1 -7
- package/docs/reference/interfaces/IBlobStorageServiceConstructorOptions.md +33 -0
- package/locales/en.json +2 -1
- package/package.json +15 -13
- package/dist/types/entities/blobMetadata.d.ts +0 -30
- package/docs/reference/classes/BlobMetadata.md +0 -61
|
@@ -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.1
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "Blob storage contract implementation and REST endpoint definitions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,26 +14,28 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/api-models": "
|
|
18
|
-
"@twin.org/blob-storage-models": "0.0.1
|
|
19
|
-
"@twin.org/core": "
|
|
20
|
-
"@twin.org/
|
|
21
|
-
"@twin.org/
|
|
22
|
-
"@twin.org/entity
|
|
23
|
-
"@twin.org/
|
|
24
|
-
"@twin.org/
|
|
25
|
-
"@twin.org/
|
|
17
|
+
"@twin.org/api-models": "^0.0.1",
|
|
18
|
+
"@twin.org/blob-storage-models": "^0.0.1",
|
|
19
|
+
"@twin.org/core": "^0.0.1",
|
|
20
|
+
"@twin.org/crypto": "^0.0.1",
|
|
21
|
+
"@twin.org/data-json-ld": "^0.0.1",
|
|
22
|
+
"@twin.org/entity": "^0.0.1",
|
|
23
|
+
"@twin.org/entity-storage-models": "^0.0.1",
|
|
24
|
+
"@twin.org/nameof": "^0.0.1",
|
|
25
|
+
"@twin.org/standards-schema-org": "^0.0.1",
|
|
26
|
+
"@twin.org/vault-models": "^0.0.1",
|
|
27
|
+
"@twin.org/web": "^0.0.1"
|
|
26
28
|
},
|
|
27
29
|
"main": "./dist/cjs/index.cjs",
|
|
28
30
|
"module": "./dist/esm/index.mjs",
|
|
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.
|