@twin.org/document-management-service 0.0.2-next.4 → 0.0.3-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/es/documentManagementRoutes.js +584 -0
- package/dist/es/documentManagementRoutes.js.map +1 -0
- package/dist/es/documentManagementService.js +622 -0
- package/dist/es/documentManagementService.js.map +1 -0
- package/dist/es/index.js +8 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IDocumentManagementServiceConfig.js +4 -0
- package/dist/es/models/IDocumentManagementServiceConfig.js.map +1 -0
- package/dist/es/models/IDocumentManagementStorageServiceConstructorOptions.js +2 -0
- package/dist/es/models/IDocumentManagementStorageServiceConstructorOptions.js.map +1 -0
- package/dist/es/restEntryPoints.js +10 -0
- package/dist/es/restEntryPoints.js.map +1 -0
- package/dist/types/documentManagementService.d.ts +12 -21
- package/dist/types/index.d.ts +5 -5
- package/dist/types/models/IDocumentManagementStorageServiceConstructorOptions.d.ts +1 -1
- package/docs/changelog.md +34 -0
- package/docs/open-api/spec.json +60 -74
- package/docs/reference/classes/DocumentManagementService.md +25 -79
- package/package.json +7 -8
- package/dist/cjs/index.cjs +0 -1233
- package/dist/esm/index.mjs +0 -1222
|
@@ -36,9 +36,27 @@ Runtime name for the class.
|
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
+
### className()
|
|
40
|
+
|
|
41
|
+
> **className**(): `string`
|
|
42
|
+
|
|
43
|
+
Returns the class name of the component.
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The class name of the component.
|
|
50
|
+
|
|
51
|
+
#### Implementation of
|
|
52
|
+
|
|
53
|
+
`IDocumentManagementComponent.className`
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
39
57
|
### create()
|
|
40
58
|
|
|
41
|
-
> **create**(`documentId`, `documentIdFormat`, `documentCode`, `blob`, `annotationObject?`, `auditableItemGraphEdges?`, `options
|
|
59
|
+
> **create**(`documentId`, `documentIdFormat`, `documentCode`, `blob`, `annotationObject?`, `auditableItemGraphEdges?`, `options?`): `Promise`\<`string`\>
|
|
42
60
|
|
|
43
61
|
Store a document as an auditable item graph vertex and add its content to blob storage.
|
|
44
62
|
If the document id already exists and the blob data is different a new revision will be created.
|
|
@@ -56,7 +74,7 @@ The document id to create.
|
|
|
56
74
|
|
|
57
75
|
The format of the document identifier.
|
|
58
76
|
|
|
59
|
-
`
|
|
77
|
+
`string` | `undefined`
|
|
60
78
|
|
|
61
79
|
##### documentCode
|
|
62
80
|
|
|
@@ -104,18 +122,6 @@ Flag to add the document id as an alias to the aig vertex, defaults to true.
|
|
|
104
122
|
|
|
105
123
|
Annotation object for the alias.
|
|
106
124
|
|
|
107
|
-
##### userIdentity?
|
|
108
|
-
|
|
109
|
-
`string`
|
|
110
|
-
|
|
111
|
-
The identity to perform the auditable item graph operation with.
|
|
112
|
-
|
|
113
|
-
##### nodeIdentity?
|
|
114
|
-
|
|
115
|
-
`string`
|
|
116
|
-
|
|
117
|
-
The node identity to use for vault operations.
|
|
118
|
-
|
|
119
125
|
#### Returns
|
|
120
126
|
|
|
121
127
|
`Promise`\<`string`\>
|
|
@@ -130,7 +136,7 @@ The auditable item graph vertex created for the document including its revision.
|
|
|
130
136
|
|
|
131
137
|
### update()
|
|
132
138
|
|
|
133
|
-
> **update**(`auditableItemGraphDocumentId`, `blob?`, `annotationObject?`, `auditableItemGraphEdges
|
|
139
|
+
> **update**(`auditableItemGraphDocumentId`, `blob?`, `annotationObject?`, `auditableItemGraphEdges?`): `Promise`\<`void`\>
|
|
134
140
|
|
|
135
141
|
Update a document as an auditable item graph vertex and add its content to blob storage.
|
|
136
142
|
If the blob data is different a new revision will be created.
|
|
@@ -162,18 +168,6 @@ Additional information to associate with the document.
|
|
|
162
168
|
|
|
163
169
|
The auditable item graph vertices to connect the document to, if undefined retains current connections.
|
|
164
170
|
|
|
165
|
-
##### userIdentity?
|
|
166
|
-
|
|
167
|
-
`string`
|
|
168
|
-
|
|
169
|
-
The identity to perform the auditable item graph operation with.
|
|
170
|
-
|
|
171
|
-
##### nodeIdentity?
|
|
172
|
-
|
|
173
|
-
`string`
|
|
174
|
-
|
|
175
|
-
The node identity to use for vault operations.
|
|
176
|
-
|
|
177
171
|
#### Returns
|
|
178
172
|
|
|
179
173
|
`Promise`\<`void`\>
|
|
@@ -188,7 +182,7 @@ Nothing.
|
|
|
188
182
|
|
|
189
183
|
### get()
|
|
190
184
|
|
|
191
|
-
> **get**(`auditableItemGraphDocumentId`, `options?`, `cursor?`, `limit
|
|
185
|
+
> **get**(`auditableItemGraphDocumentId`, `options?`, `cursor?`, `limit?`): `Promise`\<`IDocumentList`\>
|
|
192
186
|
|
|
193
187
|
Get a document using it's auditable item graph vertex id and optional revision.
|
|
194
188
|
|
|
@@ -252,18 +246,6 @@ The cursor to get the next chunk of revisions.
|
|
|
252
246
|
|
|
253
247
|
Limit the number of items to return, defaults to 1 so only most recent is returned.
|
|
254
248
|
|
|
255
|
-
##### userIdentity?
|
|
256
|
-
|
|
257
|
-
`string`
|
|
258
|
-
|
|
259
|
-
The identity to perform the auditable item graph operation with.
|
|
260
|
-
|
|
261
|
-
##### nodeIdentity?
|
|
262
|
-
|
|
263
|
-
`string`
|
|
264
|
-
|
|
265
|
-
The node identity to use for vault operations.
|
|
266
|
-
|
|
267
249
|
#### Returns
|
|
268
250
|
|
|
269
251
|
`Promise`\<`IDocumentList`\>
|
|
@@ -278,7 +260,7 @@ The documents and revisions if requested, ordered by revision descending, cursor
|
|
|
278
260
|
|
|
279
261
|
### getRevision()
|
|
280
262
|
|
|
281
|
-
> **getRevision**(`auditableItemGraphDocumentId`, `revision`, `options
|
|
263
|
+
> **getRevision**(`auditableItemGraphDocumentId`, `revision`, `options?`): `Promise`\<`IDocument`\>
|
|
282
264
|
|
|
283
265
|
Get a document revision using it's auditable item graph vertex id.
|
|
284
266
|
|
|
@@ -330,18 +312,6 @@ If provided will extract data from the document using the specified rule group i
|
|
|
330
312
|
|
|
331
313
|
By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
332
314
|
|
|
333
|
-
##### userIdentity?
|
|
334
|
-
|
|
335
|
-
`string`
|
|
336
|
-
|
|
337
|
-
The identity to perform the auditable item graph operation with.
|
|
338
|
-
|
|
339
|
-
##### nodeIdentity?
|
|
340
|
-
|
|
341
|
-
`string`
|
|
342
|
-
|
|
343
|
-
The node identity to use for vault operations.
|
|
344
|
-
|
|
345
315
|
#### Returns
|
|
346
316
|
|
|
347
317
|
`Promise`\<`IDocument`\>
|
|
@@ -356,7 +326,7 @@ The documents and revisions if requested, ordered by revision descending, cursor
|
|
|
356
326
|
|
|
357
327
|
### removeRevision()
|
|
358
328
|
|
|
359
|
-
> **removeRevision**(`auditableItemGraphDocumentId`, `revision
|
|
329
|
+
> **removeRevision**(`auditableItemGraphDocumentId`, `revision`): `Promise`\<`void`\>
|
|
360
330
|
|
|
361
331
|
Remove an auditable item graph vertex using it's id.
|
|
362
332
|
The document dateDeleted will be set, but can still be queried with the includeRemoved flag.
|
|
@@ -375,18 +345,6 @@ The auditable item graph vertex id which contains the document.
|
|
|
375
345
|
|
|
376
346
|
The revision of the document to remove.
|
|
377
347
|
|
|
378
|
-
##### userIdentity?
|
|
379
|
-
|
|
380
|
-
`string`
|
|
381
|
-
|
|
382
|
-
The identity to perform the auditable item graph operation with.
|
|
383
|
-
|
|
384
|
-
##### nodeIdentity?
|
|
385
|
-
|
|
386
|
-
`string`
|
|
387
|
-
|
|
388
|
-
The node identity to use for vault operations.
|
|
389
|
-
|
|
390
348
|
#### Returns
|
|
391
349
|
|
|
392
350
|
`Promise`\<`void`\>
|
|
@@ -401,7 +359,7 @@ Nothing.
|
|
|
401
359
|
|
|
402
360
|
### query()
|
|
403
361
|
|
|
404
|
-
> **query**(`documentId`, `cursor?`, `limit
|
|
362
|
+
> **query**(`documentId`, `cursor?`, `limit?`): `Promise`\<`IAuditableItemGraphVertexList`\>
|
|
405
363
|
|
|
406
364
|
Find all the document with a specific id.
|
|
407
365
|
|
|
@@ -425,18 +383,6 @@ The cursor to get the next chunk of documents.
|
|
|
425
383
|
|
|
426
384
|
The limit to get the next chunk of documents.
|
|
427
385
|
|
|
428
|
-
##### userIdentity?
|
|
429
|
-
|
|
430
|
-
`string`
|
|
431
|
-
|
|
432
|
-
The identity to perform the auditable item graph operation with.
|
|
433
|
-
|
|
434
|
-
##### nodeIdentity?
|
|
435
|
-
|
|
436
|
-
`string`
|
|
437
|
-
|
|
438
|
-
The node identity to use for vault operations.
|
|
439
|
-
|
|
440
386
|
#### Returns
|
|
441
387
|
|
|
442
388
|
`Promise`\<`IAuditableItemGraphVertexList`\>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/document-management-service",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-next.1",
|
|
4
4
|
"description": "Document management contract implementation and REST endpoint definitions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
"@twin.org/attestation-models": "next",
|
|
19
19
|
"@twin.org/auditable-item-graph-models": "next",
|
|
20
20
|
"@twin.org/blob-storage-models": "next",
|
|
21
|
+
"@twin.org/context": "next",
|
|
21
22
|
"@twin.org/core": "next",
|
|
22
23
|
"@twin.org/crypto": "next",
|
|
23
24
|
"@twin.org/data-json-ld": "next",
|
|
24
25
|
"@twin.org/data-processing-models": "next",
|
|
25
|
-
"@twin.org/document-management-models": "0.0.
|
|
26
|
+
"@twin.org/document-management-models": "0.0.3-next.1",
|
|
26
27
|
"@twin.org/entity": "next",
|
|
27
28
|
"@twin.org/entity-storage-models": "next",
|
|
28
29
|
"@twin.org/nameof": "next",
|
|
@@ -30,20 +31,18 @@
|
|
|
30
31
|
"@twin.org/standards-unece": "next",
|
|
31
32
|
"@twin.org/web": "next"
|
|
32
33
|
},
|
|
33
|
-
"main": "./dist/
|
|
34
|
-
"module": "./dist/esm/index.mjs",
|
|
34
|
+
"main": "./dist/es/index.js",
|
|
35
35
|
"types": "./dist/types/index.d.ts",
|
|
36
36
|
"exports": {
|
|
37
37
|
".": {
|
|
38
38
|
"types": "./dist/types/index.d.ts",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
39
|
+
"import": "./dist/es/index.js",
|
|
40
|
+
"default": "./dist/es/index.js"
|
|
41
41
|
},
|
|
42
42
|
"./locales/*.json": "./locales/*.json"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
|
-
"dist/
|
|
46
|
-
"dist/esm",
|
|
45
|
+
"dist/es",
|
|
47
46
|
"dist/types",
|
|
48
47
|
"locales",
|
|
49
48
|
"docs"
|