@twin.org/blob-storage-service 0.0.1-next.8 → 0.0.1-next.9

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.
@@ -21,10 +21,10 @@
21
21
  }
22
22
  ],
23
23
  "paths": {
24
- "/blob": {
24
+ "/blob-storage": {
25
25
  "post": {
26
26
  "operationId": "blobStorageCreate",
27
- "summary": "Create a blob in to storage",
27
+ "summary": "Create an entry in blob storage",
28
28
  "tags": [
29
29
  "Blob Storage"
30
30
  ],
@@ -42,7 +42,7 @@
42
42
  "$ref": "#/components/schemas/BlobStorageCreateRequest"
43
43
  },
44
44
  "examples": {
45
- "blobStorageCreateExample": {
45
+ "blobStorageCreateRequestExample": {
46
46
  "value": {
47
47
  "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==",
48
48
  "metadata": {
@@ -128,10 +128,10 @@
128
128
  }
129
129
  }
130
130
  },
131
- "/blob/{id}": {
131
+ "/blob-storage/{id}": {
132
132
  "get": {
133
133
  "operationId": "blobStorageGet",
134
- "summary": "Get the blob metadata from storage",
134
+ "summary": "Get the metadata for an item from blob storage",
135
135
  "tags": [
136
136
  "Blob Storage"
137
137
  ],
@@ -268,7 +268,7 @@
268
268
  },
269
269
  "put": {
270
270
  "operationId": "blobStorageUpdate",
271
- "summary": "Update a blob metadata in storage",
271
+ "summary": "Update the metadata for an item in blob storage",
272
272
  "tags": [
273
273
  "Blob Storage"
274
274
  ],
@@ -299,7 +299,7 @@
299
299
  "$ref": "#/components/schemas/BlobStorageUpdateRequest"
300
300
  },
301
301
  "examples": {
302
- "blobStorageUpdateExample": {
302
+ "blobStorageUpdateRequestExample": {
303
303
  "value": {
304
304
  "metadata": {
305
305
  "@context": "http://schema.org/",
@@ -377,7 +377,7 @@
377
377
  },
378
378
  "delete": {
379
379
  "operationId": "blobStorageRemove",
380
- "summary": "Remove the blob from storage",
380
+ "summary": "Remove an item from blob storage",
381
381
  "tags": [
382
382
  "Blob Storage"
383
383
  ],
@@ -484,10 +484,10 @@
484
484
  }
485
485
  }
486
486
  },
487
- "/blob/{id}/content": {
487
+ "/blob-storage/{id}/content": {
488
488
  "get": {
489
489
  "operationId": "blobStorageGetContent",
490
- "summary": "Get the blob from storage",
490
+ "summary": "Get the content for an item in blob storage",
491
491
  "tags": [
492
492
  "Blob Storage"
493
493
  ],
@@ -43,3 +43,19 @@ The extension.
43
43
  > `optional` **metadata**: `IJsonLdNodeObject`
44
44
 
45
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.
@@ -60,7 +60,7 @@ Runtime name for the class.
60
60
 
61
61
  ### create()
62
62
 
63
- > **create**(`blob`, `mimeType`?, `extension`?, `metadata`?, `namespace`?, `nodeIdentity`?): `Promise`\<`string`\>
63
+ > **create**(`blob`, `mimeType`?, `extension`?, `metadata`?, `namespace`?, `userIdentity`?, `nodeIdentity`?): `Promise`\<`string`\>
64
64
 
65
65
  Create the blob with some metadata.
66
66
 
@@ -86,9 +86,13 @@ Data for the custom metadata as JSON-LD.
86
86
 
87
87
  The namespace to use for storing, defaults to component configured namespace.
88
88
 
89
+ • **userIdentity?**: `string`
90
+
91
+ The user identity to use with storage operations.
92
+
89
93
  • **nodeIdentity?**: `string`
90
94
 
91
- The node identity which controls the vault key.
95
+ The node identity to use with storage operations.
92
96
 
93
97
  #### Returns
94
98
 
@@ -104,7 +108,7 @@ The id of the stored blob in urn format.
104
108
 
105
109
  ### get()
106
110
 
107
- > **get**(`id`, `includeContent`, `nodeIdentity`?): `Promise`\<`object`\>
111
+ > **get**(`id`, `includeContent`, `userIdentity`?, `nodeIdentity`?): `Promise`\<`object`\>
108
112
 
109
113
  Get the blob and metadata.
110
114
 
@@ -118,9 +122,13 @@ The id of the blob to get in urn format.
118
122
 
119
123
  Include the content, or just get the metadata.
120
124
 
125
+ • **userIdentity?**: `string`
126
+
127
+ The user identity to use with storage operations.
128
+
121
129
  • **nodeIdentity?**: `string`
122
130
 
123
- The node identity which controls the vault key.
131
+ The node identity to use with storage operations.
124
132
 
125
133
  #### Returns
126
134
 
@@ -156,7 +164,7 @@ Not found error if the blob cannot be found.
156
164
 
157
165
  ### update()
158
166
 
159
- > **update**(`id`, `mimeType`?, `extension`?, `metadata`?): `Promise`\<`void`\>
167
+ > **update**(`id`, `mimeType`?, `extension`?, `metadata`?, `userIdentity`?, `nodeIdentity`?): `Promise`\<`void`\>
160
168
 
161
169
  Update the blob with metadata.
162
170
 
@@ -178,6 +186,14 @@ Extension for the blob, will be detected if left undefined.
178
186
 
179
187
  Data for the custom metadata as JSON-LD.
180
188
 
189
+ • **userIdentity?**: `string`
190
+
191
+ The user identity to use with storage operations.
192
+
193
+ • **nodeIdentity?**: `string`
194
+
195
+ The node identity to use with storage operations.
196
+
181
197
  #### Returns
182
198
 
183
199
  `Promise`\<`void`\>
@@ -196,7 +212,7 @@ Not found error if the blob cannot be found.
196
212
 
197
213
  ### remove()
198
214
 
199
- > **remove**(`id`): `Promise`\<`void`\>
215
+ > **remove**(`id`, `userIdentity`?, `nodeIdentity`?): `Promise`\<`void`\>
200
216
 
201
217
  Remove the blob.
202
218
 
@@ -206,6 +222,14 @@ Remove the blob.
206
222
 
207
223
  The id of the blob to remove in urn format.
208
224
 
225
+ • **userIdentity?**: `string`
226
+
227
+ The user identity to use with storage operations.
228
+
229
+ • **nodeIdentity?**: `string`
230
+
231
+ The node identity to use with storage operations.
232
+
209
233
  #### Returns
210
234
 
211
235
  `Promise`\<`void`\>
@@ -1,6 +1,6 @@
1
1
  # Function: generateRestRoutesBlobStorage()
2
2
 
3
- > **generateRestRoutesBlobStorage**(`baseRouteName`, `componentName`): `IRestRoute`[]
3
+ > **generateRestRoutesBlobStorage**(`baseRouteName`, `componentName`, `options`?): `IRestRoute`[]
4
4
 
5
5
  The REST routes for blob storage.
6
6
 
@@ -14,6 +14,18 @@ Prefix to prepend to the paths.
14
14
 
15
15
  The name of the component to use in the routes stored in the ComponentFactory.
16
16
 
17
+ • **options?**
18
+
19
+ Additional options for the routes.
20
+
21
+ • **options.typeName?**: `string`
22
+
23
+ Optional type name to use in the routes, defaults to Blob Storage.
24
+
25
+ • **options.tagName?**: `string`
26
+
27
+ Optional name to use in OpenAPI spec for tag.
28
+
17
29
  ## Returns
18
30
 
19
31
  `IRestRoute`[]
@@ -24,3 +24,19 @@ blob-storage.
24
24
 
25
25
  The namespace of the default storage connector to use.
26
26
  Defaults to the first entry in the factory if not provided.
27
+
28
+ ***
29
+
30
+ ### includeNodeIdentity?
31
+
32
+ > `optional` **includeNodeIdentity**: `boolean`
33
+
34
+ Include the node identity when performing storage operations, defaults to true.
35
+
36
+ ***
37
+
38
+ ### includeUserIdentity?
39
+
40
+ > `optional` **includeUserIdentity**: `boolean`
41
+
42
+ Include the user identity when performing storage operations, defaults to true.
@@ -1,3 +1,7 @@
1
1
  # Variable: restEntryPoints
2
2
 
3
3
  > `const` **restEntryPoints**: `IRestRouteEntryPoint`[]
4
+
5
+ These are dummy entry points for the blob storage service.
6
+ In reality your application would create its own entry points based on the
7
+ blob types it wants to store, using a custom defaultBaseRoute.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/blob-storage-service",
3
- "version": "0.0.1-next.8",
3
+ "version": "0.0.1-next.9",
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.8",
18
+ "@twin.org/blob-storage-models": "0.0.1-next.9",
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/data-json-ld": "next",
21
21
  "@twin.org/entity": "next",