@3sixty/document-management-models 0.0.0-stage → 0.20.0-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/LICENSE +201 -0
- package/README.md +24 -2
- package/dist/es/compiled/validators.js +600 -0
- package/dist/es/compiled/validators.js.map +1 -0
- package/dist/es/dataTypes/documentManagementDataTypes.js +59 -0
- package/dist/es/dataTypes/documentManagementDataTypes.js.map +1 -0
- package/dist/es/index.js +25 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IDocument.js +2 -0
- package/dist/es/models/IDocument.js.map +1 -0
- package/dist/es/models/IDocumentAttestation.js +2 -0
- package/dist/es/models/IDocumentAttestation.js.map +1 -0
- package/dist/es/models/IDocumentBase.js +2 -0
- package/dist/es/models/IDocumentBase.js.map +1 -0
- package/dist/es/models/IDocumentHydrated.js +2 -0
- package/dist/es/models/IDocumentHydrated.js.map +1 -0
- package/dist/es/models/IDocumentList.js +2 -0
- package/dist/es/models/IDocumentList.js.map +1 -0
- package/dist/es/models/IDocumentManagementComponent.js +2 -0
- package/dist/es/models/IDocumentManagementComponent.js.map +1 -0
- package/dist/es/models/IDocumentManagementEdgeEntry.js +2 -0
- package/dist/es/models/IDocumentManagementEdgeEntry.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementCreateRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementCreateRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetResponse.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetResponse.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionResponse.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionResponse.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementQueryRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementQueryRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementQueryResponse.js +2 -0
- package/dist/es/models/api/IDocumentManagementQueryResponse.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementRemoveRequest.js +4 -0
- package/dist/es/models/api/IDocumentManagementRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementUpdatePartialRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementUpdatePartialRequest.js.map +1 -0
- package/dist/es/models/documentContexts.js +33 -0
- package/dist/es/models/documentContexts.js.map +1 -0
- package/dist/es/models/documentManagementMetricIds.js +29 -0
- package/dist/es/models/documentManagementMetricIds.js.map +1 -0
- package/dist/es/models/documentManagementMetrics.js +36 -0
- package/dist/es/models/documentManagementMetrics.js.map +1 -0
- package/dist/es/models/documentTypes.js +25 -0
- package/dist/es/models/documentTypes.js.map +1 -0
- package/dist/es/schemas/Document.json +86 -0
- package/dist/es/schemas/DocumentAttestation.json +60 -0
- package/dist/es/schemas/DocumentBase.json +29 -0
- package/dist/es/schemas/DocumentHydrated.json +25 -0
- package/dist/es/schemas/DocumentList.json +51 -0
- package/dist/types/compiled/validators.d.ts +21 -0
- package/dist/types/dataTypes/documentManagementDataTypes.d.ts +9 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/models/IDocument.d.ts +72 -0
- package/dist/types/models/IDocumentAttestation.d.ts +46 -0
- package/dist/types/models/IDocumentBase.d.ts +27 -0
- package/dist/types/models/IDocumentHydrated.d.ts +23 -0
- package/dist/types/models/IDocumentList.d.ts +32 -0
- package/dist/types/models/IDocumentManagementComponent.d.ts +123 -0
- package/dist/types/models/IDocumentManagementEdgeEntry.d.ts +18 -0
- package/dist/types/models/api/IDocumentManagementCreateRequest.d.ts +42 -0
- package/dist/types/models/api/IDocumentManagementGetRequest.d.ts +68 -0
- package/dist/types/models/api/IDocumentManagementGetResponse.d.ts +18 -0
- package/dist/types/models/api/IDocumentManagementGetRevisionRequest.d.ts +53 -0
- package/dist/types/models/api/IDocumentManagementGetRevisionResponse.d.ts +17 -0
- package/dist/types/models/api/IDocumentManagementQueryRequest.d.ts +29 -0
- package/dist/types/models/api/IDocumentManagementQueryResponse.d.ts +18 -0
- package/dist/types/models/api/IDocumentManagementRemoveRequest.d.ts +18 -0
- package/dist/types/models/api/IDocumentManagementUpdatePartialRequest.d.ts +61 -0
- package/dist/types/models/documentContexts.d.ts +33 -0
- package/dist/types/models/documentManagementMetricIds.d.ts +29 -0
- package/dist/types/models/documentManagementMetrics.d.ts +5 -0
- package/dist/types/models/documentTypes.d.ts +25 -0
- package/docs/changelog.md +9 -0
- package/docs/examples.md +23 -0
- package/docs/reference/classes/DocumentManagementDataTypes.md +25 -0
- package/docs/reference/index.md +42 -0
- package/docs/reference/interfaces/IDocument.md +155 -0
- package/docs/reference/interfaces/IDocumentAttestation.md +59 -0
- package/docs/reference/interfaces/IDocumentBase.md +39 -0
- package/docs/reference/interfaces/IDocumentHydrated.md +223 -0
- package/docs/reference/interfaces/IDocumentList.md +35 -0
- package/docs/reference/interfaces/IDocumentManagementComponent.md +348 -0
- package/docs/reference/interfaces/IDocumentManagementCreateRequest.md +53 -0
- package/docs/reference/interfaces/IDocumentManagementEdgeEntry.md +27 -0
- package/docs/reference/interfaces/IDocumentManagementGetRequest.md +127 -0
- package/docs/reference/interfaces/IDocumentManagementGetResponse.md +27 -0
- package/docs/reference/interfaces/IDocumentManagementGetRevisionRequest.md +91 -0
- package/docs/reference/interfaces/IDocumentManagementGetRevisionResponse.md +23 -0
- package/docs/reference/interfaces/IDocumentManagementQueryRequest.md +41 -0
- package/docs/reference/interfaces/IDocumentManagementQueryResponse.md +27 -0
- package/docs/reference/interfaces/IDocumentManagementRemoveRequest.md +23 -0
- package/docs/reference/interfaces/IDocumentManagementUpdatePartialRequest.md +80 -0
- package/docs/reference/type-aliases/DocumentContexts.md +5 -0
- package/docs/reference/type-aliases/DocumentManagementMetricIds.md +5 -0
- package/docs/reference/type-aliases/DocumentTypes.md +5 -0
- package/docs/reference/variables/CompiledDocument.md +5 -0
- package/docs/reference/variables/CompiledDocumentAttestation.md +5 -0
- package/docs/reference/variables/CompiledDocumentBase.md +5 -0
- package/docs/reference/variables/CompiledDocumentHydrated.md +5 -0
- package/docs/reference/variables/CompiledDocumentList.md +5 -0
- package/docs/reference/variables/DocumentContexts.md +43 -0
- package/docs/reference/variables/DocumentManagementMetricIds.md +37 -0
- package/docs/reference/variables/DocumentManagementMetrics.md +5 -0
- package/docs/reference/variables/DocumentTypes.md +31 -0
- package/locales/en.json +3 -0
- package/package.json +63 -5
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Interface: IDocumentAttestation
|
|
2
|
+
|
|
3
|
+
Interface describing a document attestation.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### @context {#context}
|
|
8
|
+
|
|
9
|
+
> **@context**: \[`"https://schema.org"`, `"https://schema.3sixty.global/documents/"`, `"https://schema.3sixty.global/common/"`\]
|
|
10
|
+
|
|
11
|
+
JSON-LD Context.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### type {#type}
|
|
16
|
+
|
|
17
|
+
> **type**: `"DocumentAttestation"`
|
|
18
|
+
|
|
19
|
+
JSON-LD Type.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### documentId {#documentid}
|
|
24
|
+
|
|
25
|
+
> **documentId**: `string`
|
|
26
|
+
|
|
27
|
+
The id of the document.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### documentCode {#documentcode}
|
|
32
|
+
|
|
33
|
+
> **documentCode**: `UneceDocumentCodeList`
|
|
34
|
+
|
|
35
|
+
The code for the document type.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### documentRevision {#documentrevision}
|
|
40
|
+
|
|
41
|
+
> **documentRevision**: `number`
|
|
42
|
+
|
|
43
|
+
The revision of the document as a 0 based index.
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### dateCreated {#datecreated}
|
|
48
|
+
|
|
49
|
+
> **dateCreated**: `string`
|
|
50
|
+
|
|
51
|
+
The date/time of when the document was created.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### integrity {#integrity}
|
|
56
|
+
|
|
57
|
+
> **integrity**: `string`
|
|
58
|
+
|
|
59
|
+
The integrity of the document being attested.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Interface: IDocumentBase
|
|
2
|
+
|
|
3
|
+
Interface describing a document base.
|
|
4
|
+
|
|
5
|
+
## Extended by
|
|
6
|
+
|
|
7
|
+
- [`IDocument`](IDocument.md)
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### documentId {#documentid}
|
|
12
|
+
|
|
13
|
+
> **documentId**: `string`
|
|
14
|
+
|
|
15
|
+
The id of the document.
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### documentIdFormat? {#documentidformat}
|
|
20
|
+
|
|
21
|
+
> `optional` **documentIdFormat?**: `string`
|
|
22
|
+
|
|
23
|
+
The format of the document id.
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### documentCode {#documentcode}
|
|
28
|
+
|
|
29
|
+
> **documentCode**: `UneceDocumentCodeList`
|
|
30
|
+
|
|
31
|
+
The code for the document type.
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### annotationObject? {#annotationobject}
|
|
36
|
+
|
|
37
|
+
> `optional` **annotationObject?**: `IJsonLdNodeObject`
|
|
38
|
+
|
|
39
|
+
Additional annotation information for the document.
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Interface: IDocumentHydrated
|
|
2
|
+
|
|
3
|
+
Interface describing a hydrated document which includes additional information that can be optionally requested when retrieving a document.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- [`IDocument`](IDocument.md)
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### @context {#context}
|
|
12
|
+
|
|
13
|
+
> **@context**: \[`"https://schema.org"`, `"https://schema.3sixty.global/documents/"`, `"https://schema.3sixty.global/common/"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
14
|
+
|
|
15
|
+
JSON-LD Context.
|
|
16
|
+
|
|
17
|
+
#### Inherited from
|
|
18
|
+
|
|
19
|
+
[`IDocument`](IDocument.md).[`@context`](IDocument.md#context)
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### type {#type}
|
|
24
|
+
|
|
25
|
+
> **type**: `"Document"`
|
|
26
|
+
|
|
27
|
+
JSON-LD Type.
|
|
28
|
+
|
|
29
|
+
#### Inherited from
|
|
30
|
+
|
|
31
|
+
[`IDocument`](IDocument.md).[`type`](IDocument.md#type)
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### id {#id}
|
|
36
|
+
|
|
37
|
+
> **id**: `string`
|
|
38
|
+
|
|
39
|
+
The full id of the document.
|
|
40
|
+
|
|
41
|
+
#### Inherited from
|
|
42
|
+
|
|
43
|
+
[`IDocument`](IDocument.md).[`id`](IDocument.md#id)
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### documentRevision {#documentrevision}
|
|
48
|
+
|
|
49
|
+
> **documentRevision**: `number`
|
|
50
|
+
|
|
51
|
+
The revision of the document as a 0 based index.
|
|
52
|
+
|
|
53
|
+
#### Inherited from
|
|
54
|
+
|
|
55
|
+
[`IDocument`](IDocument.md).[`documentRevision`](IDocument.md#documentrevision)
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
59
|
+
### blobStorageId {#blobstorageid}
|
|
60
|
+
|
|
61
|
+
> **blobStorageId**: `string`
|
|
62
|
+
|
|
63
|
+
The blob storage id for the document.
|
|
64
|
+
|
|
65
|
+
#### Inherited from
|
|
66
|
+
|
|
67
|
+
[`IDocument`](IDocument.md).[`blobStorageId`](IDocument.md#blobstorageid)
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### integrity {#integrity}
|
|
72
|
+
|
|
73
|
+
> **integrity**: `string`
|
|
74
|
+
|
|
75
|
+
The integrity of the blob data.
|
|
76
|
+
|
|
77
|
+
#### Inherited from
|
|
78
|
+
|
|
79
|
+
[`IDocument`](IDocument.md).[`integrity`](IDocument.md#integrity)
|
|
80
|
+
|
|
81
|
+
***
|
|
82
|
+
|
|
83
|
+
### attestationId? {#attestationid}
|
|
84
|
+
|
|
85
|
+
> `optional` **attestationId?**: `string`
|
|
86
|
+
|
|
87
|
+
The attestation for the document if one was created.
|
|
88
|
+
|
|
89
|
+
#### Inherited from
|
|
90
|
+
|
|
91
|
+
[`IDocument`](IDocument.md).[`attestationId`](IDocument.md#attestationid)
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
95
|
+
### dateCreated {#datecreated}
|
|
96
|
+
|
|
97
|
+
> **dateCreated**: `string`
|
|
98
|
+
|
|
99
|
+
The date/time of when the document was created.
|
|
100
|
+
|
|
101
|
+
#### Inherited from
|
|
102
|
+
|
|
103
|
+
[`IDocument`](IDocument.md).[`dateCreated`](IDocument.md#datecreated)
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
107
|
+
### dateModified? {#datemodified}
|
|
108
|
+
|
|
109
|
+
> `optional` **dateModified?**: `string`
|
|
110
|
+
|
|
111
|
+
The date/time of when the document was modified.
|
|
112
|
+
|
|
113
|
+
#### Inherited from
|
|
114
|
+
|
|
115
|
+
[`IDocument`](IDocument.md).[`dateModified`](IDocument.md#datemodified)
|
|
116
|
+
|
|
117
|
+
***
|
|
118
|
+
|
|
119
|
+
### dateDeleted? {#datedeleted}
|
|
120
|
+
|
|
121
|
+
> `optional` **dateDeleted?**: `string`
|
|
122
|
+
|
|
123
|
+
The date/time of when the document was deleted, as we never actually remove items.
|
|
124
|
+
|
|
125
|
+
#### Inherited from
|
|
126
|
+
|
|
127
|
+
[`IDocument`](IDocument.md).[`dateDeleted`](IDocument.md#datedeleted)
|
|
128
|
+
|
|
129
|
+
***
|
|
130
|
+
|
|
131
|
+
### organizationIdentity? {#organizationidentity}
|
|
132
|
+
|
|
133
|
+
> `optional` **organizationIdentity?**: `string`
|
|
134
|
+
|
|
135
|
+
The organization which added the document to the graph.
|
|
136
|
+
|
|
137
|
+
#### Inherited from
|
|
138
|
+
|
|
139
|
+
[`IDocument`](IDocument.md).[`organizationIdentity`](IDocument.md#organizationidentity)
|
|
140
|
+
|
|
141
|
+
***
|
|
142
|
+
|
|
143
|
+
### userIdentity? {#useridentity}
|
|
144
|
+
|
|
145
|
+
> `optional` **userIdentity?**: `string`
|
|
146
|
+
|
|
147
|
+
The user who added the document to the graph.
|
|
148
|
+
|
|
149
|
+
#### Inherited from
|
|
150
|
+
|
|
151
|
+
[`IDocument`](IDocument.md).[`userIdentity`](IDocument.md#useridentity)
|
|
152
|
+
|
|
153
|
+
***
|
|
154
|
+
|
|
155
|
+
### documentId {#documentid}
|
|
156
|
+
|
|
157
|
+
> **documentId**: `string`
|
|
158
|
+
|
|
159
|
+
The id of the document.
|
|
160
|
+
|
|
161
|
+
#### Inherited from
|
|
162
|
+
|
|
163
|
+
[`IDocument`](IDocument.md).[`documentId`](IDocument.md#documentid)
|
|
164
|
+
|
|
165
|
+
***
|
|
166
|
+
|
|
167
|
+
### documentIdFormat? {#documentidformat}
|
|
168
|
+
|
|
169
|
+
> `optional` **documentIdFormat?**: `string`
|
|
170
|
+
|
|
171
|
+
The format of the document id.
|
|
172
|
+
|
|
173
|
+
#### Inherited from
|
|
174
|
+
|
|
175
|
+
[`IDocument`](IDocument.md).[`documentIdFormat`](IDocument.md#documentidformat)
|
|
176
|
+
|
|
177
|
+
***
|
|
178
|
+
|
|
179
|
+
### documentCode {#documentcode}
|
|
180
|
+
|
|
181
|
+
> **documentCode**: `UneceDocumentCodeList`
|
|
182
|
+
|
|
183
|
+
The code for the document type.
|
|
184
|
+
|
|
185
|
+
#### Inherited from
|
|
186
|
+
|
|
187
|
+
[`IDocument`](IDocument.md).[`documentCode`](IDocument.md#documentcode)
|
|
188
|
+
|
|
189
|
+
***
|
|
190
|
+
|
|
191
|
+
### annotationObject? {#annotationobject}
|
|
192
|
+
|
|
193
|
+
> `optional` **annotationObject?**: `IJsonLdNodeObject`
|
|
194
|
+
|
|
195
|
+
Additional annotation information for the document.
|
|
196
|
+
|
|
197
|
+
#### Inherited from
|
|
198
|
+
|
|
199
|
+
[`IDocument`](IDocument.md).[`annotationObject`](IDocument.md#annotationobject)
|
|
200
|
+
|
|
201
|
+
***
|
|
202
|
+
|
|
203
|
+
### blobStorageEntry? {#blobstorageentry}
|
|
204
|
+
|
|
205
|
+
> `optional` **blobStorageEntry?**: `IBlobStorageEntry`
|
|
206
|
+
|
|
207
|
+
The additional JSON-LD for blob storage if it was requested.
|
|
208
|
+
|
|
209
|
+
***
|
|
210
|
+
|
|
211
|
+
### extractedData? {#extracteddata}
|
|
212
|
+
|
|
213
|
+
> `optional` **extractedData?**: `unknown`
|
|
214
|
+
|
|
215
|
+
The data extracted from the document using data extraction services.
|
|
216
|
+
|
|
217
|
+
***
|
|
218
|
+
|
|
219
|
+
### attestationInformation? {#attestationinformation}
|
|
220
|
+
|
|
221
|
+
> `optional` **attestationInformation?**: `IAttestationInformation`
|
|
222
|
+
|
|
223
|
+
The additional JSON-LD for attestation storage if it was requested.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Interface: IDocumentList
|
|
2
|
+
|
|
3
|
+
Interface describing a list of document entries.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### @context {#context}
|
|
8
|
+
|
|
9
|
+
> **@context**: \[`"https://schema.org"`, `"https://schema.3sixty.global/documents/"`, `"https://schema.3sixty.global/common/"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
10
|
+
|
|
11
|
+
JSON-LD Context.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### type {#type}
|
|
16
|
+
|
|
17
|
+
> **type**: `"ItemList"`
|
|
18
|
+
|
|
19
|
+
JSON-LD Type.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### itemListElement {#itemlistelement}
|
|
24
|
+
|
|
25
|
+
> **itemListElement**: [`IDocumentHydrated`](IDocumentHydrated.md)[]
|
|
26
|
+
|
|
27
|
+
The list of documents.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### edges? {#edges}
|
|
32
|
+
|
|
33
|
+
> `optional` **edges?**: `string`[]
|
|
34
|
+
|
|
35
|
+
The ids of the other vertices which are connected to the document.
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
# Interface: IDocumentManagementComponent
|
|
2
|
+
|
|
3
|
+
Interface describing a document management contract.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### create() {#create}
|
|
12
|
+
|
|
13
|
+
> **create**(`document`, `blob`, `auditableItemGraphEdges?`, `options?`): `Promise`\<`string`\>
|
|
14
|
+
|
|
15
|
+
Create a document as an auditable item graph vertex and add its content to blob storage.
|
|
16
|
+
If the document id already exists and the blob data is different a new revision will be created.
|
|
17
|
+
For any other changes the current revision will be updated.
|
|
18
|
+
|
|
19
|
+
#### Parameters
|
|
20
|
+
|
|
21
|
+
##### document
|
|
22
|
+
|
|
23
|
+
[`IDocumentBase`](IDocumentBase.md)
|
|
24
|
+
|
|
25
|
+
The document base properties.
|
|
26
|
+
|
|
27
|
+
##### blob
|
|
28
|
+
|
|
29
|
+
`string` \| `Uint8Array`\<`ArrayBufferLike`\>
|
|
30
|
+
|
|
31
|
+
The data to create the document with as bytes, or an existing blob storage entry id.
|
|
32
|
+
|
|
33
|
+
##### auditableItemGraphEdges?
|
|
34
|
+
|
|
35
|
+
[`IDocumentManagementEdgeEntry`](IDocumentManagementEdgeEntry.md)[]
|
|
36
|
+
|
|
37
|
+
The auditable item graph vertices to connect the document to.
|
|
38
|
+
|
|
39
|
+
##### options?
|
|
40
|
+
|
|
41
|
+
Additional options for the set operation.
|
|
42
|
+
|
|
43
|
+
###### includeAttestation?
|
|
44
|
+
|
|
45
|
+
`boolean`
|
|
46
|
+
|
|
47
|
+
Flag to create an attestation for the document, defaults to false.
|
|
48
|
+
|
|
49
|
+
###### includeAlias?
|
|
50
|
+
|
|
51
|
+
`boolean`
|
|
52
|
+
|
|
53
|
+
Flag to add the document id as an alias to the aig vertex, defaults to true.
|
|
54
|
+
|
|
55
|
+
###### aliasAnnotationObject?
|
|
56
|
+
|
|
57
|
+
`IJsonLdNodeObject`
|
|
58
|
+
|
|
59
|
+
Annotation object for the alias.
|
|
60
|
+
|
|
61
|
+
#### Returns
|
|
62
|
+
|
|
63
|
+
`Promise`\<`string`\>
|
|
64
|
+
|
|
65
|
+
The auditable item graph vertex created for the document including its revision.
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### updatePartial() {#updatepartial}
|
|
70
|
+
|
|
71
|
+
> **updatePartial**(`auditableItemGraphDocumentId`, `document?`, `blob?`, `auditableItemGraphEdges?`, `options?`): `Promise`\<`void`\>
|
|
72
|
+
|
|
73
|
+
Update a document as an auditable item graph vertex and add its content to blob storage.
|
|
74
|
+
If the blob data is different a new revision will be created.
|
|
75
|
+
For any other changes the current revision will be updated.
|
|
76
|
+
|
|
77
|
+
#### Parameters
|
|
78
|
+
|
|
79
|
+
##### auditableItemGraphDocumentId
|
|
80
|
+
|
|
81
|
+
`string`
|
|
82
|
+
|
|
83
|
+
The auditable item graph vertex id which contains the document.
|
|
84
|
+
|
|
85
|
+
##### document?
|
|
86
|
+
|
|
87
|
+
`Partial`\<`Pick`\<[`IDocumentBase`](IDocumentBase.md), `"documentCode"` \| `"annotationObject"` \| `"documentIdFormat"`\>\>
|
|
88
|
+
|
|
89
|
+
The document base properties to update. annotationObject, documentIdFormat and documentCode are applied in-place to the current revision.
|
|
90
|
+
|
|
91
|
+
##### blob?
|
|
92
|
+
|
|
93
|
+
`string` \| `Uint8Array`\<`ArrayBufferLike`\>
|
|
94
|
+
|
|
95
|
+
The data to update the document with as bytes, or an existing blob storage entry id.
|
|
96
|
+
|
|
97
|
+
##### auditableItemGraphEdges?
|
|
98
|
+
|
|
99
|
+
Explicit edge delta to apply. If undefined, existing connections
|
|
100
|
+
are retained unchanged. Use `add` to create new connections and `remove` to disconnect existing
|
|
101
|
+
ones by their target vertex id. To update alias metadata on an already-connected vertex, include
|
|
102
|
+
it in `add` with the updated `aliasAnnotationObject` - AIG's alias patch is an upsert, so the
|
|
103
|
+
alias is updated in place without creating a duplicate back-edge.
|
|
104
|
+
|
|
105
|
+
###### add?
|
|
106
|
+
|
|
107
|
+
[`IDocumentManagementEdgeEntry`](IDocumentManagementEdgeEntry.md)[]
|
|
108
|
+
|
|
109
|
+
Connections to add; each creates a back-edge on the connected vertex.
|
|
110
|
+
|
|
111
|
+
###### remove?
|
|
112
|
+
|
|
113
|
+
`string`[]
|
|
114
|
+
|
|
115
|
+
Target vertex IDs to disconnect; their back-edges are removed.
|
|
116
|
+
|
|
117
|
+
##### options?
|
|
118
|
+
|
|
119
|
+
Additional options for the update operation.
|
|
120
|
+
|
|
121
|
+
###### includeAttestation?
|
|
122
|
+
|
|
123
|
+
`boolean`
|
|
124
|
+
|
|
125
|
+
Set to true to start attesting the document (even if originally created without attestation), or false to remove the existing attestation. Omit (undefined) to leave attestation state unchanged.
|
|
126
|
+
|
|
127
|
+
###### includeAlias?
|
|
128
|
+
|
|
129
|
+
`boolean`
|
|
130
|
+
|
|
131
|
+
Set to true to add the document id as an alias on the aig vertex, or false to remove it. Omit to leave alias state unchanged.
|
|
132
|
+
|
|
133
|
+
###### aliasAnnotationObject?
|
|
134
|
+
|
|
135
|
+
`IJsonLdNodeObject`
|
|
136
|
+
|
|
137
|
+
Annotation object for the alias when adding.
|
|
138
|
+
|
|
139
|
+
#### Returns
|
|
140
|
+
|
|
141
|
+
`Promise`\<`void`\>
|
|
142
|
+
|
|
143
|
+
A promise that resolves when the document has been updated.
|
|
144
|
+
|
|
145
|
+
***
|
|
146
|
+
|
|
147
|
+
### get() {#get}
|
|
148
|
+
|
|
149
|
+
> **get**(`auditableItemGraphDocumentId`, `options?`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: [`IDocumentList`](IDocumentList.md); `cursor?`: `string`; \}\>
|
|
150
|
+
|
|
151
|
+
Get a document using it's auditable item graph vertex id and optional revision.
|
|
152
|
+
|
|
153
|
+
#### Parameters
|
|
154
|
+
|
|
155
|
+
##### auditableItemGraphDocumentId
|
|
156
|
+
|
|
157
|
+
`string`
|
|
158
|
+
|
|
159
|
+
The auditable item graph vertex id which contains the document.
|
|
160
|
+
|
|
161
|
+
##### options?
|
|
162
|
+
|
|
163
|
+
Additional options for the get operation.
|
|
164
|
+
|
|
165
|
+
###### includeBlobStorageMetadata?
|
|
166
|
+
|
|
167
|
+
`boolean`
|
|
168
|
+
|
|
169
|
+
Flag to include the blob storage metadata for the document, defaults to false.
|
|
170
|
+
|
|
171
|
+
###### includeBlobStorageData?
|
|
172
|
+
|
|
173
|
+
`boolean`
|
|
174
|
+
|
|
175
|
+
Flag to include the blob storage data for the document, defaults to false.
|
|
176
|
+
|
|
177
|
+
###### includeAttestation?
|
|
178
|
+
|
|
179
|
+
`boolean`
|
|
180
|
+
|
|
181
|
+
Flag to include the attestation information for the document, defaults to false.
|
|
182
|
+
|
|
183
|
+
###### includeRemoved?
|
|
184
|
+
|
|
185
|
+
`boolean`
|
|
186
|
+
|
|
187
|
+
Flag to include deleted documents, defaults to false.
|
|
188
|
+
|
|
189
|
+
###### includeDeletedEdges?
|
|
190
|
+
|
|
191
|
+
`boolean`
|
|
192
|
+
|
|
193
|
+
Flag to include soft-deleted edges in the response, defaults to false.
|
|
194
|
+
|
|
195
|
+
###### extractRuleGroupId?
|
|
196
|
+
|
|
197
|
+
`string`
|
|
198
|
+
|
|
199
|
+
If provided will extract data from the document using the specified rule group id.
|
|
200
|
+
|
|
201
|
+
###### extractMimeType?
|
|
202
|
+
|
|
203
|
+
`string`
|
|
204
|
+
|
|
205
|
+
By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
206
|
+
|
|
207
|
+
##### cursor?
|
|
208
|
+
|
|
209
|
+
`string`
|
|
210
|
+
|
|
211
|
+
The cursor to get the next chunk of revisions.
|
|
212
|
+
|
|
213
|
+
##### limit?
|
|
214
|
+
|
|
215
|
+
`number`
|
|
216
|
+
|
|
217
|
+
Limit the number of items to return, defaults to 1 so only most recent is returned.
|
|
218
|
+
|
|
219
|
+
#### Returns
|
|
220
|
+
|
|
221
|
+
`Promise`\<\{ `entries`: [`IDocumentList`](IDocumentList.md); `cursor?`: `string`; \}\>
|
|
222
|
+
|
|
223
|
+
The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
224
|
+
|
|
225
|
+
***
|
|
226
|
+
|
|
227
|
+
### getRevision() {#getrevision}
|
|
228
|
+
|
|
229
|
+
> **getRevision**(`auditableItemGraphDocumentId`, `revision`, `options?`): `Promise`\<[`IDocumentHydrated`](IDocumentHydrated.md)\>
|
|
230
|
+
|
|
231
|
+
Get a document revision using it's auditable item graph vertex id.
|
|
232
|
+
|
|
233
|
+
#### Parameters
|
|
234
|
+
|
|
235
|
+
##### auditableItemGraphDocumentId
|
|
236
|
+
|
|
237
|
+
`string`
|
|
238
|
+
|
|
239
|
+
The auditable item graph vertex id which contains the document.
|
|
240
|
+
|
|
241
|
+
##### revision
|
|
242
|
+
|
|
243
|
+
`number`
|
|
244
|
+
|
|
245
|
+
The revision id of the document to get.
|
|
246
|
+
|
|
247
|
+
##### options?
|
|
248
|
+
|
|
249
|
+
Additional options for the get operation.
|
|
250
|
+
|
|
251
|
+
###### includeBlobStorageMetadata?
|
|
252
|
+
|
|
253
|
+
`boolean`
|
|
254
|
+
|
|
255
|
+
Flag to include the blob storage metadata for the document, defaults to false.
|
|
256
|
+
|
|
257
|
+
###### includeBlobStorageData?
|
|
258
|
+
|
|
259
|
+
`boolean`
|
|
260
|
+
|
|
261
|
+
Flag to include the blob storage data for the document, defaults to false.
|
|
262
|
+
|
|
263
|
+
###### includeAttestation?
|
|
264
|
+
|
|
265
|
+
`boolean`
|
|
266
|
+
|
|
267
|
+
Flag to include the attestation information for the document, defaults to false.
|
|
268
|
+
|
|
269
|
+
###### extractRuleGroupId?
|
|
270
|
+
|
|
271
|
+
`string`
|
|
272
|
+
|
|
273
|
+
If provided will extract data from the document using the specified rule group id.
|
|
274
|
+
|
|
275
|
+
###### extractMimeType?
|
|
276
|
+
|
|
277
|
+
`string`
|
|
278
|
+
|
|
279
|
+
By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
280
|
+
|
|
281
|
+
#### Returns
|
|
282
|
+
|
|
283
|
+
`Promise`\<[`IDocumentHydrated`](IDocumentHydrated.md)\>
|
|
284
|
+
|
|
285
|
+
The document for the specified revision.
|
|
286
|
+
|
|
287
|
+
***
|
|
288
|
+
|
|
289
|
+
### removeRevision() {#removerevision}
|
|
290
|
+
|
|
291
|
+
> **removeRevision**(`auditableItemGraphDocumentId`, `revision`): `Promise`\<`void`\>
|
|
292
|
+
|
|
293
|
+
Remove an auditable item graph vertex using it's id.
|
|
294
|
+
The document dateDeleted will be set, but can still be queried with the includeRemoved flag.
|
|
295
|
+
|
|
296
|
+
#### Parameters
|
|
297
|
+
|
|
298
|
+
##### auditableItemGraphDocumentId
|
|
299
|
+
|
|
300
|
+
`string`
|
|
301
|
+
|
|
302
|
+
The auditable item graph vertex id which contains the document.
|
|
303
|
+
|
|
304
|
+
##### revision
|
|
305
|
+
|
|
306
|
+
`number`
|
|
307
|
+
|
|
308
|
+
The revision of the document to remove.
|
|
309
|
+
|
|
310
|
+
#### Returns
|
|
311
|
+
|
|
312
|
+
`Promise`\<`void`\>
|
|
313
|
+
|
|
314
|
+
A promise that resolves when the revision has been removed.
|
|
315
|
+
|
|
316
|
+
***
|
|
317
|
+
|
|
318
|
+
### query() {#query}
|
|
319
|
+
|
|
320
|
+
> **query**(`documentId`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: `IAuditableItemGraphVertexList`; `cursor?`: `string`; \}\>
|
|
321
|
+
|
|
322
|
+
Find all the document with a specific id.
|
|
323
|
+
|
|
324
|
+
#### Parameters
|
|
325
|
+
|
|
326
|
+
##### documentId
|
|
327
|
+
|
|
328
|
+
`string`
|
|
329
|
+
|
|
330
|
+
The document id to find in the graph.
|
|
331
|
+
|
|
332
|
+
##### cursor?
|
|
333
|
+
|
|
334
|
+
`string`
|
|
335
|
+
|
|
336
|
+
The cursor to get the next chunk of documents.
|
|
337
|
+
|
|
338
|
+
##### limit?
|
|
339
|
+
|
|
340
|
+
`number`
|
|
341
|
+
|
|
342
|
+
The limit to get the next chunk of documents.
|
|
343
|
+
|
|
344
|
+
#### Returns
|
|
345
|
+
|
|
346
|
+
`Promise`\<\{ `entries`: `IAuditableItemGraphVertexList`; `cursor?`: `string`; \}\>
|
|
347
|
+
|
|
348
|
+
The graph vertices that contain documents referencing the specified document id.
|