@twin.org/document-management-service 0.0.3-next.14 → 0.0.3-next.16
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 +14 -13
- package/dist/es/documentManagementRoutes.js.map +1 -1
- package/dist/es/documentManagementService.js +292 -175
- package/dist/es/documentManagementService.js.map +1 -1
- package/dist/es/models/IDocumentManagementStorageServiceConstructorOptions.js.map +1 -1
- package/dist/types/documentManagementRoutes.d.ts +2 -2
- package/dist/types/documentManagementService.d.ts +19 -12
- package/dist/types/models/IDocumentManagementStorageServiceConstructorOptions.d.ts +4 -0
- package/docs/changelog.md +28 -0
- package/docs/open-api/spec.json +54 -40
- package/docs/reference/classes/DocumentManagementService.md +42 -6
- package/docs/reference/functions/{documentManagementUpdate.md → documentManagementUpdatePartial.md} +3 -3
- package/docs/reference/index.md +1 -1
- package/docs/reference/interfaces/IDocumentManagementServiceConstructorOptions.md +8 -0
- package/locales/en.json +2 -0
- package/package.json +5 -4
|
@@ -54,6 +54,22 @@ The class name of the component.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
+
### start() {#start}
|
|
58
|
+
|
|
59
|
+
> **start**(): `Promise`\<`void`\>
|
|
60
|
+
|
|
61
|
+
Register all document management metrics with the telemetry component.
|
|
62
|
+
|
|
63
|
+
#### Returns
|
|
64
|
+
|
|
65
|
+
`Promise`\<`void`\>
|
|
66
|
+
|
|
67
|
+
#### Implementation of
|
|
68
|
+
|
|
69
|
+
`IDocumentManagementComponent.start`
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
57
73
|
### create() {#create}
|
|
58
74
|
|
|
59
75
|
> **create**(`documentId`, `documentIdFormat`, `documentCode`, `blob`, `annotationObject?`, `auditableItemGraphEdges?`, `options?`): `Promise`\<`string`\>
|
|
@@ -96,7 +112,7 @@ Additional information to associate with the document.
|
|
|
96
112
|
|
|
97
113
|
##### auditableItemGraphEdges?
|
|
98
114
|
|
|
99
|
-
`
|
|
115
|
+
`IDocumentManagementEdgeEntry`[]
|
|
100
116
|
|
|
101
117
|
The auditable item graph vertices to connect the document to.
|
|
102
118
|
|
|
@@ -134,9 +150,9 @@ The auditable item graph vertex created for the document including its revision.
|
|
|
134
150
|
|
|
135
151
|
***
|
|
136
152
|
|
|
137
|
-
###
|
|
153
|
+
### updatePartial() {#updatepartial}
|
|
138
154
|
|
|
139
|
-
> **
|
|
155
|
+
> **updatePartial**(`auditableItemGraphDocumentId`, `blob?`, `annotationObject?`, `auditableItemGraphEdges?`): `Promise`\<`void`\>
|
|
140
156
|
|
|
141
157
|
Update a document as an auditable item graph vertex and add its content to blob storage.
|
|
142
158
|
If the blob data is different a new revision will be created.
|
|
@@ -164,9 +180,23 @@ Additional information to associate with the document.
|
|
|
164
180
|
|
|
165
181
|
##### auditableItemGraphEdges?
|
|
166
182
|
|
|
167
|
-
|
|
183
|
+
Explicit edge delta to apply. If undefined, existing connections
|
|
184
|
+
are retained unchanged. Use `add` to create new connections and `remove` to disconnect existing
|
|
185
|
+
ones by their target vertex id. To update alias metadata on an already-connected vertex, include
|
|
186
|
+
it in `add` with the updated `aliasAnnotationObject` — AIG's alias patch is an upsert, so the
|
|
187
|
+
alias is updated in place without creating a duplicate back-edge.
|
|
188
|
+
|
|
189
|
+
###### add?
|
|
190
|
+
|
|
191
|
+
`IDocumentManagementEdgeEntry`[]
|
|
192
|
+
|
|
193
|
+
Connections to add; each creates a back-edge on the connected vertex.
|
|
194
|
+
|
|
195
|
+
###### remove?
|
|
168
196
|
|
|
169
|
-
|
|
197
|
+
`string`[]
|
|
198
|
+
|
|
199
|
+
Target vertex IDs to disconnect; their back-edges are removed.
|
|
170
200
|
|
|
171
201
|
#### Returns
|
|
172
202
|
|
|
@@ -176,7 +206,7 @@ Nothing.
|
|
|
176
206
|
|
|
177
207
|
#### Implementation of
|
|
178
208
|
|
|
179
|
-
`IDocumentManagementComponent.
|
|
209
|
+
`IDocumentManagementComponent.updatePartial`
|
|
180
210
|
|
|
181
211
|
***
|
|
182
212
|
|
|
@@ -222,6 +252,12 @@ Flag to include the attestation information for the document, defaults to false.
|
|
|
222
252
|
|
|
223
253
|
Flag to include deleted documents, defaults to false.
|
|
224
254
|
|
|
255
|
+
###### includeDeletedEdges?
|
|
256
|
+
|
|
257
|
+
`boolean`
|
|
258
|
+
|
|
259
|
+
Flag to include soft-deleted edges in the response, defaults to false.
|
|
260
|
+
|
|
225
261
|
###### extractRuleGroupId?
|
|
226
262
|
|
|
227
263
|
`string`
|
package/docs/reference/functions/{documentManagementUpdate.md → documentManagementUpdatePartial.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Function:
|
|
1
|
+
# Function: documentManagementUpdatePartial()
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **documentManagementUpdatePartial**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
|
|
4
4
|
|
|
5
5
|
Update the document from the auditable item graph vertex.
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ The name of the component to use in the routes.
|
|
|
20
20
|
|
|
21
21
|
### request
|
|
22
22
|
|
|
23
|
-
`
|
|
23
|
+
`IDocumentManagementUpdatePartialRequest`
|
|
24
24
|
|
|
25
25
|
The request.
|
|
26
26
|
|
package/docs/reference/index.md
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
- [documentManagementCreate](functions/documentManagementCreate.md)
|
|
21
21
|
- [documentManagementGet](functions/documentManagementGet.md)
|
|
22
22
|
- [documentManagementGetRevision](functions/documentManagementGetRevision.md)
|
|
23
|
-
- [
|
|
23
|
+
- [documentManagementUpdatePartial](functions/documentManagementUpdatePartial.md)
|
|
24
24
|
- [documentManagementRemove](functions/documentManagementRemove.md)
|
|
25
25
|
- [documentManagementQuery](functions/documentManagementQuery.md)
|
|
@@ -60,6 +60,14 @@ data-processing
|
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
63
|
+
### telemetryComponentType? {#telemetrycomponenttype}
|
|
64
|
+
|
|
65
|
+
> `optional` **telemetryComponentType?**: `string`
|
|
66
|
+
|
|
67
|
+
The type of the telemetry component used for event metrics.
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
63
71
|
### config? {#config}
|
|
64
72
|
|
|
65
73
|
> `optional` **config?**: [`IDocumentManagementServiceConfig`](IDocumentManagementServiceConfig.md)
|
package/locales/en.json
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
"error": {
|
|
3
3
|
"documentManagementService": {
|
|
4
4
|
"createFailed": "Failed to create document",
|
|
5
|
+
"connectedVertexNotFound": "The connected vertex \"{notFoundId}\" does not exist",
|
|
5
6
|
"updateFailed": "Failed to update document",
|
|
6
7
|
"getFailed": "Failed to get document",
|
|
7
8
|
"getRevisionFailed": "Failed to get document revision",
|
|
8
9
|
"queryFailed": "Failed to query document",
|
|
9
10
|
"documentRevisionNone": "There are no revisions in the document",
|
|
10
11
|
"documentRevisionNotFound": "There is no revision number \"{notFoundId}\" in the document",
|
|
12
|
+
"documentRevisionMissingId": "Revision {revision} was found but has no resolvable resource id — possible data integrity issue",
|
|
11
13
|
"removeRevisionFailed": "Failed to remove document revision"
|
|
12
14
|
}
|
|
13
15
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/document-management-service",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.16",
|
|
4
4
|
"description": "Service-side document lifecycle operations and REST route generation for server integrations.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/iotaledger/document-management.git",
|
|
7
|
+
"url": "git+https://github.com/iotaledger/twin-document-management.git",
|
|
8
8
|
"directory": "packages/document-management-service"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
"@twin.org/crypto": "next",
|
|
24
24
|
"@twin.org/data-json-ld": "next",
|
|
25
25
|
"@twin.org/data-processing-models": "next",
|
|
26
|
-
"@twin.org/document-management-models": "0.0.3-next.
|
|
26
|
+
"@twin.org/document-management-models": "0.0.3-next.16",
|
|
27
27
|
"@twin.org/entity": "next",
|
|
28
28
|
"@twin.org/entity-storage-models": "next",
|
|
29
29
|
"@twin.org/nameof": "next",
|
|
30
30
|
"@twin.org/standards-schema-org": "next",
|
|
31
31
|
"@twin.org/standards-unece": "next",
|
|
32
|
+
"@twin.org/telemetry-models": "next",
|
|
32
33
|
"@twin.org/web": "next"
|
|
33
34
|
},
|
|
34
35
|
"main": "./dist/es/index.js",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"business-logic"
|
|
64
65
|
],
|
|
65
66
|
"bugs": {
|
|
66
|
-
"url": "git+https://github.com/iotaledger/document-management/issues"
|
|
67
|
+
"url": "git+https://github.com/iotaledger/twin-document-management/issues"
|
|
67
68
|
},
|
|
68
69
|
"homepage": "https://twindev.org"
|
|
69
70
|
}
|