@twin.org/blob-storage-models 0.0.1-next.25 → 0.0.1-next.27
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 +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/types/models/IBlobStorageComponent.d.ts +10 -10
- package/dist/types/models/IBlobStorageEntry.d.ts +2 -2
- package/dist/types/models/api/IBlobStorageCreateRequest.d.ts +2 -2
- package/dist/types/models/api/IBlobStorageGetRequest.d.ts +1 -1
- package/dist/types/models/api/IBlobStorageUpdateRequest.d.ts +2 -2
- package/docs/changelog.md +1 -1
- package/docs/reference/interfaces/IBlobStorageComponent.md +12 -12
- package/docs/reference/interfaces/IBlobStorageCreateRequest.md +3 -3
- package/docs/reference/interfaces/IBlobStorageEntry.md +3 -3
- package/docs/reference/interfaces/IBlobStorageGetRequest.md +1 -1
- package/docs/reference/interfaces/IBlobStorageUpdateRequest.md +3 -3
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -81,9 +81,9 @@ var properties = {
|
|
|
81
81
|
type: "string",
|
|
82
82
|
description: "The extension."
|
|
83
83
|
},
|
|
84
|
-
|
|
84
|
+
metadata: {
|
|
85
85
|
$ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
|
|
86
|
-
description: "The
|
|
86
|
+
description: "The metadata for the blob as JSON-LD."
|
|
87
87
|
},
|
|
88
88
|
blob: {
|
|
89
89
|
type: "string",
|
package/dist/esm/index.mjs
CHANGED
|
@@ -79,9 +79,9 @@ var properties = {
|
|
|
79
79
|
type: "string",
|
|
80
80
|
description: "The extension."
|
|
81
81
|
},
|
|
82
|
-
|
|
82
|
+
metadata: {
|
|
83
83
|
$ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
|
|
84
|
-
description: "The
|
|
84
|
+
description: "The metadata for the blob as JSON-LD."
|
|
85
85
|
},
|
|
86
86
|
blob: {
|
|
87
87
|
type: "string",
|
|
@@ -8,39 +8,39 @@ import type { IBlobStorageEntryList } from "./IBlobStorageEntryList";
|
|
|
8
8
|
*/
|
|
9
9
|
export interface IBlobStorageComponent extends IComponent {
|
|
10
10
|
/**
|
|
11
|
-
* Create the blob with some
|
|
11
|
+
* Create the blob with some metadata.
|
|
12
12
|
* @param blob The data for the blob in base64 format.
|
|
13
13
|
* @param encodingFormat Mime type for the blob, will be detected if left undefined.
|
|
14
14
|
* @param fileExtension Extension for the blob, will be detected if left undefined.
|
|
15
|
-
* @param
|
|
15
|
+
* @param metadata Data for the custom metadata as JSON-LD.
|
|
16
16
|
* @param namespace The namespace to use for storing, defaults to component configured namespace.
|
|
17
17
|
* @param userIdentity The user identity to use with storage operations.
|
|
18
18
|
* @param nodeIdentity The node identity to use with storage operations.
|
|
19
19
|
* @returns The id of the stored blob in urn format.
|
|
20
20
|
*/
|
|
21
|
-
create(blob: string, encodingFormat?: string, fileExtension?: string,
|
|
21
|
+
create(blob: string, encodingFormat?: string, fileExtension?: string, metadata?: IJsonLdNodeObject, namespace?: string, userIdentity?: string, nodeIdentity?: string): Promise<string>;
|
|
22
22
|
/**
|
|
23
|
-
* Get the blob and
|
|
23
|
+
* Get the blob and metadata.
|
|
24
24
|
* @param id The id of the blob to get in urn format.
|
|
25
|
-
* @param includeContent Include the content, or just get the
|
|
25
|
+
* @param includeContent Include the content, or just get the metadata.
|
|
26
26
|
* @param userIdentity The user identity to use with storage operations.
|
|
27
27
|
* @param nodeIdentity The node identity to use with storage operations.
|
|
28
|
-
* @returns The data and
|
|
28
|
+
* @returns The data and metadata for the blob if it can be found.
|
|
29
29
|
* @throws Not found error if the blob cannot be found.
|
|
30
30
|
*/
|
|
31
31
|
get(id: string, includeContent: boolean, userIdentity?: string, nodeIdentity?: string): Promise<IBlobStorageEntry>;
|
|
32
32
|
/**
|
|
33
|
-
* Update the blob with
|
|
34
|
-
* @param id The id of the blob
|
|
33
|
+
* Update the blob with metadata.
|
|
34
|
+
* @param id The id of the blob metadata to update.
|
|
35
35
|
* @param encodingFormat Mime type for the blob, will be detected if left undefined.
|
|
36
36
|
* @param fileExtension Extension for the blob, will be detected if left undefined.
|
|
37
|
-
* @param
|
|
37
|
+
* @param metadata Data for the custom metadata as JSON-LD.
|
|
38
38
|
* @param userIdentity The user identity to use with storage operations.
|
|
39
39
|
* @param nodeIdentity The node identity to use with storage operations.
|
|
40
40
|
* @returns Nothing.
|
|
41
41
|
* @throws Not found error if the blob cannot be found.
|
|
42
42
|
*/
|
|
43
|
-
update(id: string, encodingFormat?: string, fileExtension?: string,
|
|
43
|
+
update(id: string, encodingFormat?: string, fileExtension?: string, metadata?: IJsonLdNodeObject, userIdentity?: string, nodeIdentity?: string): Promise<void>;
|
|
44
44
|
/**
|
|
45
45
|
* Remove the blob.
|
|
46
46
|
* @param id The id of the blob to remove in urn format.
|
|
@@ -45,9 +45,9 @@ export interface IBlobStorageEntry {
|
|
|
45
45
|
*/
|
|
46
46
|
fileExtension?: string;
|
|
47
47
|
/**
|
|
48
|
-
* The
|
|
48
|
+
* The metadata for the blob as JSON-LD.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
metadata?: IJsonLdNodeObject;
|
|
51
51
|
/**
|
|
52
52
|
* The blob in base64 format, included if the includeContent flag was set in the request.
|
|
53
53
|
*/
|
|
@@ -20,9 +20,9 @@ export interface IBlobStorageCreateRequest {
|
|
|
20
20
|
*/
|
|
21
21
|
fileExtension?: string;
|
|
22
22
|
/**
|
|
23
|
-
* Custom
|
|
23
|
+
* Custom metadata to associate with the blob as JSON-LD.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
metadata?: IJsonLdNodeObject;
|
|
26
26
|
/**
|
|
27
27
|
* The namespace to store the data in, defaults to component configured namespace.
|
|
28
28
|
*/
|
|
@@ -23,7 +23,7 @@ export interface IBlobStorageGetRequest {
|
|
|
23
23
|
*/
|
|
24
24
|
query?: {
|
|
25
25
|
/**
|
|
26
|
-
* Include the content in the response, otherwise only
|
|
26
|
+
* Include the content in the response, otherwise only metadata is returned.
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
29
|
includeContent?: boolean;
|
|
@@ -25,8 +25,8 @@ export interface IBlobStorageUpdateRequest {
|
|
|
25
25
|
*/
|
|
26
26
|
fileExtension?: string;
|
|
27
27
|
/**
|
|
28
|
-
* Custom
|
|
28
|
+
* Custom metadata to associate with the blob as JSON-LD.
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
metadata?: IJsonLdNodeObject;
|
|
31
31
|
};
|
|
32
32
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -10,9 +10,9 @@ Interface describing an blob storage component.
|
|
|
10
10
|
|
|
11
11
|
### create()
|
|
12
12
|
|
|
13
|
-
> **create**(`blob`, `encodingFormat`?, `fileExtension`?, `
|
|
13
|
+
> **create**(`blob`, `encodingFormat`?, `fileExtension`?, `metadata`?, `namespace`?, `userIdentity`?, `nodeIdentity`?): `Promise`\<`string`\>
|
|
14
14
|
|
|
15
|
-
Create the blob with some
|
|
15
|
+
Create the blob with some metadata.
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
@@ -34,11 +34,11 @@ Mime type for the blob, will be detected if left undefined.
|
|
|
34
34
|
|
|
35
35
|
Extension for the blob, will be detected if left undefined.
|
|
36
36
|
|
|
37
|
-
#####
|
|
37
|
+
##### metadata?
|
|
38
38
|
|
|
39
39
|
`IJsonLdNodeObject`
|
|
40
40
|
|
|
41
|
-
Data for the custom
|
|
41
|
+
Data for the custom metadata as JSON-LD.
|
|
42
42
|
|
|
43
43
|
##### namespace?
|
|
44
44
|
|
|
@@ -70,7 +70,7 @@ The id of the stored blob in urn format.
|
|
|
70
70
|
|
|
71
71
|
> **get**(`id`, `includeContent`, `userIdentity`?, `nodeIdentity`?): `Promise`\<[`IBlobStorageEntry`](IBlobStorageEntry.md)\>
|
|
72
72
|
|
|
73
|
-
Get the blob and
|
|
73
|
+
Get the blob and metadata.
|
|
74
74
|
|
|
75
75
|
#### Parameters
|
|
76
76
|
|
|
@@ -84,7 +84,7 @@ The id of the blob to get in urn format.
|
|
|
84
84
|
|
|
85
85
|
`boolean`
|
|
86
86
|
|
|
87
|
-
Include the content, or just get the
|
|
87
|
+
Include the content, or just get the metadata.
|
|
88
88
|
|
|
89
89
|
##### userIdentity?
|
|
90
90
|
|
|
@@ -102,7 +102,7 @@ The node identity to use with storage operations.
|
|
|
102
102
|
|
|
103
103
|
`Promise`\<[`IBlobStorageEntry`](IBlobStorageEntry.md)\>
|
|
104
104
|
|
|
105
|
-
The data and
|
|
105
|
+
The data and metadata for the blob if it can be found.
|
|
106
106
|
|
|
107
107
|
#### Throws
|
|
108
108
|
|
|
@@ -112,9 +112,9 @@ Not found error if the blob cannot be found.
|
|
|
112
112
|
|
|
113
113
|
### update()
|
|
114
114
|
|
|
115
|
-
> **update**(`id`, `encodingFormat`?, `fileExtension`?, `
|
|
115
|
+
> **update**(`id`, `encodingFormat`?, `fileExtension`?, `metadata`?, `userIdentity`?, `nodeIdentity`?): `Promise`\<`void`\>
|
|
116
116
|
|
|
117
|
-
Update the blob with
|
|
117
|
+
Update the blob with metadata.
|
|
118
118
|
|
|
119
119
|
#### Parameters
|
|
120
120
|
|
|
@@ -122,7 +122,7 @@ Update the blob with annotation.
|
|
|
122
122
|
|
|
123
123
|
`string`
|
|
124
124
|
|
|
125
|
-
The id of the blob
|
|
125
|
+
The id of the blob metadata to update.
|
|
126
126
|
|
|
127
127
|
##### encodingFormat?
|
|
128
128
|
|
|
@@ -136,11 +136,11 @@ Mime type for the blob, will be detected if left undefined.
|
|
|
136
136
|
|
|
137
137
|
Extension for the blob, will be detected if left undefined.
|
|
138
138
|
|
|
139
|
-
#####
|
|
139
|
+
##### metadata?
|
|
140
140
|
|
|
141
141
|
`IJsonLdNodeObject`
|
|
142
142
|
|
|
143
|
-
Data for the custom
|
|
143
|
+
Data for the custom metadata as JSON-LD.
|
|
144
144
|
|
|
145
145
|
##### userIdentity?
|
|
146
146
|
|
|
@@ -28,11 +28,11 @@ The mime type of the blob, will be detected if left undefined.
|
|
|
28
28
|
|
|
29
29
|
The extension of the blob, will be detected if left undefined.
|
|
30
30
|
|
|
31
|
-
####
|
|
31
|
+
#### metadata?
|
|
32
32
|
|
|
33
|
-
> `optional` **
|
|
33
|
+
> `optional` **metadata**: `IJsonLdNodeObject`
|
|
34
34
|
|
|
35
|
-
Custom
|
|
35
|
+
Custom metadata to associate with the blob as JSON-LD.
|
|
36
36
|
|
|
37
37
|
#### namespace?
|
|
38
38
|
|
|
@@ -76,11 +76,11 @@ The extension.
|
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
79
|
-
###
|
|
79
|
+
### metadata?
|
|
80
80
|
|
|
81
|
-
> `optional` **
|
|
81
|
+
> `optional` **metadata**: `IJsonLdNodeObject`
|
|
82
82
|
|
|
83
|
-
The
|
|
83
|
+
The metadata for the blob as JSON-LD.
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
@@ -36,8 +36,8 @@ The mime type of the blob, will be detected if left undefined.
|
|
|
36
36
|
|
|
37
37
|
The extension of the blob, will be detected if left undefined.
|
|
38
38
|
|
|
39
|
-
####
|
|
39
|
+
#### metadata?
|
|
40
40
|
|
|
41
|
-
> `optional` **
|
|
41
|
+
> `optional` **metadata**: `IJsonLdNodeObject`
|
|
42
42
|
|
|
43
|
-
Custom
|
|
43
|
+
Custom metadata to associate with the blob as JSON-LD.
|