@twin.org/document-management-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.
@@ -28,14 +28,6 @@ The options for the service.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### NAMESPACE
32
-
33
- > `readonly` `static` **NAMESPACE**: `string` = `"documents"`
34
-
35
- The namespace supported by the document management service.
36
-
37
- ***
38
-
39
31
  ### CLASS\_NAME
40
32
 
41
33
  > `readonly` **CLASS\_NAME**: `string`
@@ -240,6 +232,18 @@ Flag to include the attestation information for the document, defaults to false.
240
232
 
241
233
  Flag to include deleted documents, defaults to false.
242
234
 
235
+ ###### extractRuleGroupId?
236
+
237
+ `string`
238
+
239
+ If provided will extract data from the document using the specified rule group id.
240
+
241
+ ###### extractMimeType?
242
+
243
+ `string`
244
+
245
+ By default extraction will auto detect the mime type of the document, this can be used to override the detection.
246
+
243
247
  ##### cursor?
244
248
 
245
249
  `string`
@@ -276,6 +280,84 @@ The documents and revisions if requested, ordered by revision descending, cursor
276
280
 
277
281
  ***
278
282
 
283
+ ### getRevision()
284
+
285
+ > **getRevision**(`auditableItemGraphDocumentId`, `revision`, `options?`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`IDocument`\>
286
+
287
+ Get a document revision using it's auditable item graph vertex id.
288
+
289
+ #### Parameters
290
+
291
+ ##### auditableItemGraphDocumentId
292
+
293
+ `string`
294
+
295
+ The auditable item graph vertex id which contains the document.
296
+
297
+ ##### revision
298
+
299
+ `number`
300
+
301
+ The revision id for the document.
302
+
303
+ ##### options?
304
+
305
+ Additional options for the get operation.
306
+
307
+ ###### includeBlobStorageMetadata?
308
+
309
+ `boolean`
310
+
311
+ Flag to include the blob storage metadata for the document, defaults to false.
312
+
313
+ ###### includeBlobStorageData?
314
+
315
+ `boolean`
316
+
317
+ Flag to include the blob storage data for the document, defaults to false.
318
+
319
+ ###### includeAttestation?
320
+
321
+ `boolean`
322
+
323
+ Flag to include the attestation information for the document, defaults to false.
324
+
325
+ ###### extractRuleGroupId?
326
+
327
+ `string`
328
+
329
+ If provided will extract data from the document using the specified rule group id.
330
+
331
+ ###### extractMimeType?
332
+
333
+ `string`
334
+
335
+ By default extraction will auto detect the mime type of the document, this can be used to override the detection.
336
+
337
+ ##### userIdentity?
338
+
339
+ `string`
340
+
341
+ The identity to perform the auditable item graph operation with.
342
+
343
+ ##### nodeIdentity?
344
+
345
+ `string`
346
+
347
+ The node identity to use for vault operations.
348
+
349
+ #### Returns
350
+
351
+ `Promise`\<`IDocument`\>
352
+
353
+ The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
354
+
355
+ #### Implementation of
356
+
357
+ `IDocumentManagementComponent.getRevision`
358
+
359
+ ***
360
+
279
361
  ### removeRevision()
280
362
 
281
363
  > **removeRevision**(`auditableItemGraphDocumentId`, `revision`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`void`\>
@@ -0,0 +1,31 @@
1
+ # Function: documentManagementGetRevision()
2
+
3
+ > **documentManagementGetRevision**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IDocumentManagementGetRevisionResponse`\>
4
+
5
+ Get the document revision from the auditable item graph vertex.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IDocumentManagementGetRevisionRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`IDocumentManagementGetRevisionResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **documentManagementUpdate**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
4
 
5
- UPdate the document from the auditable item graph vertex.
5
+ Update the document from the auditable item graph vertex.
6
6
 
7
7
  ## Parameters
8
8
 
@@ -19,6 +19,7 @@
19
19
  - [generateRestRoutesDocumentManagement](functions/generateRestRoutesDocumentManagement.md)
20
20
  - [documentManagementCreate](functions/documentManagementCreate.md)
21
21
  - [documentManagementGet](functions/documentManagementGet.md)
22
+ - [documentManagementGetRevision](functions/documentManagementGetRevision.md)
22
23
  - [documentManagementUpdate](functions/documentManagementUpdate.md)
23
24
  - [documentManagementRemove](functions/documentManagementRemove.md)
24
25
  - [documentManagementQuery](functions/documentManagementQuery.md)
@@ -46,6 +46,20 @@ attestation
46
46
 
47
47
  ***
48
48
 
49
+ ### dataProcessingComponentType?
50
+
51
+ > `optional` **dataProcessingComponentType**: `string`
52
+
53
+ The type of the data processing component.
54
+
55
+ #### Default
56
+
57
+ ```ts
58
+ data-processing
59
+ ```
60
+
61
+ ***
62
+
49
63
  ### config?
50
64
 
51
65
  > `optional` **config**: [`IDocumentManagementServiceConfig`](IDocumentManagementServiceConfig.md)
package/locales/en.json CHANGED
@@ -4,10 +4,11 @@
4
4
  "createFailed": "Failed to create document",
5
5
  "updateFailed": "Failed to update document",
6
6
  "getFailed": "Failed to get document",
7
+ "getRevisionFailed": "Failed to get document revision",
7
8
  "removeRevision": "Failed to remove document revision",
8
9
  "queryFailed": "Failed to query document",
9
10
  "documentRevisionNone": "There are no revisions in the document",
10
- "documentRevisionNotFound": "There is no revision number \"{revision}\" in the document",
11
+ "documentRevisionNotFound": "There is no revision number \"{notFoundId}\" in the document",
11
12
  "namespaceMismatch": "The namespace in the urn \"{id}\" does not match the namespace of the Document Management component \"{namespace}\""
12
13
  }
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/document-management-service",
3
- "version": "0.0.1-next.9",
3
+ "version": "0.0.2-next.1",
4
4
  "description": "Document management contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,7 +21,8 @@
21
21
  "@twin.org/core": "next",
22
22
  "@twin.org/crypto": "next",
23
23
  "@twin.org/data-json-ld": "next",
24
- "@twin.org/document-management-models": "0.0.1-next.9",
24
+ "@twin.org/data-processing-models": "next",
25
+ "@twin.org/document-management-models": "0.0.2-next.1",
25
26
  "@twin.org/entity": "next",
26
27
  "@twin.org/entity-storage-models": "next",
27
28
  "@twin.org/nameof": "next",