@3sixty/document-management-service 0.0.0-stage → 0.20.0-next.0
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/documentManagementRoutes.js +609 -0
- package/dist/es/documentManagementRoutes.js.map +1 -0
- package/dist/es/documentManagementService.js +967 -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 +13 -0
- package/dist/es/restEntryPoints.js.map +1 -0
- package/dist/types/documentManagementRoutes.d.ts +62 -0
- package/dist/types/documentManagementService.d.ts +147 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/models/IDocumentManagementServiceConfig.d.ts +9 -0
- package/dist/types/models/IDocumentManagementStorageServiceConstructorOptions.d.ts +34 -0
- package/dist/types/restEntryPoints.d.ts +5 -0
- package/docs/changelog.md +0 -0
- package/docs/examples.md +121 -0
- package/docs/open-api/spec.json +1387 -0
- package/docs/reference/classes/DocumentManagementService.md +464 -0
- package/docs/reference/functions/documentManagementCreate.md +37 -0
- package/docs/reference/functions/documentManagementGet.md +31 -0
- package/docs/reference/functions/documentManagementGetRevision.md +31 -0
- package/docs/reference/functions/documentManagementQuery.md +31 -0
- package/docs/reference/functions/documentManagementRemove.md +31 -0
- package/docs/reference/functions/documentManagementUpdatePartial.md +31 -0
- package/docs/reference/functions/generateRestRoutesDocumentManagement.md +25 -0
- package/docs/reference/index.md +25 -0
- package/docs/reference/interfaces/IDocumentManagementServiceConfig.md +11 -0
- package/docs/reference/interfaces/IDocumentManagementServiceConstructorOptions.md +75 -0
- package/docs/reference/variables/restEntryPoints.md +5 -0
- package/docs/reference/variables/tagsDocumentManagement.md +5 -0
- package/locales/en.json +22 -0
- package/package.json +68 -5
|
@@ -0,0 +1,1387 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "3Sixty - Test Endpoints",
|
|
5
|
+
"description": "REST API for 3Sixty - Test Endpoints.",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
"license": {
|
|
8
|
+
"name": "Apache 2.0 License",
|
|
9
|
+
"url": "https://opensource.org/licenses/Apache-2.0"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"servers": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://localhost"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tags": [
|
|
18
|
+
{
|
|
19
|
+
"name": "Document Management",
|
|
20
|
+
"description": "Endpoints which are modelled to access a document management contract."
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"paths": {
|
|
24
|
+
"/document-management": {
|
|
25
|
+
"post": {
|
|
26
|
+
"operationId": "DocumentManagementSet",
|
|
27
|
+
"summary": "Store a document in an auditable item graph vertex and add its content to blob storage.",
|
|
28
|
+
"tags": [
|
|
29
|
+
"Document Management"
|
|
30
|
+
],
|
|
31
|
+
"security": [
|
|
32
|
+
{
|
|
33
|
+
"jwtBearerAuthScheme": []
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"requestBody": {
|
|
37
|
+
"description": "Request to create a document as an auditable item graph vertex.",
|
|
38
|
+
"required": true,
|
|
39
|
+
"content": {
|
|
40
|
+
"application/json": {
|
|
41
|
+
"schema": {
|
|
42
|
+
"$ref": "#/components/schemas/DocumentManagementCreateRequest"
|
|
43
|
+
},
|
|
44
|
+
"examples": {
|
|
45
|
+
"DocumentManagementCreateRequestExample": {
|
|
46
|
+
"value": {
|
|
47
|
+
"document": {
|
|
48
|
+
"documentId": "2721000",
|
|
49
|
+
"documentIdFormat": "bol",
|
|
50
|
+
"documentCode": "unece:DocumentCodeList#705",
|
|
51
|
+
"annotationObject": {
|
|
52
|
+
"@context": "https://schema.org",
|
|
53
|
+
"@type": "DigitalDocument",
|
|
54
|
+
"name": "myfile.pdf"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"blob": "SGVsbG8gV29ybGQ=",
|
|
58
|
+
"options": {
|
|
59
|
+
"includeAttestation": true
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"responses": {
|
|
68
|
+
"201": {
|
|
69
|
+
"description": "The rest request ended in created response.",
|
|
70
|
+
"headers": {
|
|
71
|
+
"location": {
|
|
72
|
+
"schema": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"description": "e.g. aig%3A123456"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"400": {
|
|
80
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
81
|
+
"content": {
|
|
82
|
+
"application/json": {
|
|
83
|
+
"schema": {
|
|
84
|
+
"$ref": "#/components/schemas/Error"
|
|
85
|
+
},
|
|
86
|
+
"examples": {
|
|
87
|
+
"exampleResponse": {
|
|
88
|
+
"value": {
|
|
89
|
+
"name": "GeneralError",
|
|
90
|
+
"message": "errorMessage",
|
|
91
|
+
"properties": {
|
|
92
|
+
"foo": "bar"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"401": {
|
|
101
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
102
|
+
"content": {
|
|
103
|
+
"application/json": {
|
|
104
|
+
"schema": {
|
|
105
|
+
"$ref": "#/components/schemas/Error"
|
|
106
|
+
},
|
|
107
|
+
"examples": {
|
|
108
|
+
"exampleResponse": {
|
|
109
|
+
"value": {
|
|
110
|
+
"name": "UnauthorizedError",
|
|
111
|
+
"message": "errorMessage"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"500": {
|
|
119
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
120
|
+
"content": {
|
|
121
|
+
"application/json": {
|
|
122
|
+
"schema": {
|
|
123
|
+
"$ref": "#/components/schemas/Error"
|
|
124
|
+
},
|
|
125
|
+
"examples": {
|
|
126
|
+
"exampleResponse": {
|
|
127
|
+
"value": {
|
|
128
|
+
"name": "InternalServerError",
|
|
129
|
+
"message": "errorMessage"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"get": {
|
|
139
|
+
"operationId": "DocumentManagementQuery",
|
|
140
|
+
"summary": "Query the items from an auditable item graph vertex",
|
|
141
|
+
"tags": [
|
|
142
|
+
"Document Management"
|
|
143
|
+
],
|
|
144
|
+
"parameters": [
|
|
145
|
+
{
|
|
146
|
+
"name": "documentId",
|
|
147
|
+
"description": "The id of the document id we are trying to find.",
|
|
148
|
+
"in": "query",
|
|
149
|
+
"required": false,
|
|
150
|
+
"schema": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"example": "2721000"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "cursor",
|
|
157
|
+
"description": "The cursor to get the next chunk of documents.",
|
|
158
|
+
"in": "query",
|
|
159
|
+
"required": false,
|
|
160
|
+
"schema": {
|
|
161
|
+
"type": "string"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "limit",
|
|
166
|
+
"description": "The number of documents to return.",
|
|
167
|
+
"in": "query",
|
|
168
|
+
"required": false,
|
|
169
|
+
"schema": {
|
|
170
|
+
"type": "string"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "accept",
|
|
175
|
+
"in": "header",
|
|
176
|
+
"required": true,
|
|
177
|
+
"schema": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
},
|
|
180
|
+
"style": "simple"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"security": [
|
|
184
|
+
{
|
|
185
|
+
"jwtBearerAuthScheme": []
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"responses": {
|
|
189
|
+
"200": {
|
|
190
|
+
"description": "Response to query the documents from an auditable item graph vertex.",
|
|
191
|
+
"content": {
|
|
192
|
+
"application/json": {
|
|
193
|
+
"schema": {
|
|
194
|
+
"$ref": "https://schema.3sixty.global/aig/AuditableItemGraphVertexList"
|
|
195
|
+
},
|
|
196
|
+
"examples": {
|
|
197
|
+
"DocumentManagementQueryResponseExample": {
|
|
198
|
+
"value": {
|
|
199
|
+
"@context": [
|
|
200
|
+
"https://schema.org",
|
|
201
|
+
"https://schema.3sixty.global/aig/"
|
|
202
|
+
],
|
|
203
|
+
"type": [
|
|
204
|
+
"ItemList",
|
|
205
|
+
"AuditableItemGraphVertexList"
|
|
206
|
+
],
|
|
207
|
+
"itemListElement": [
|
|
208
|
+
{
|
|
209
|
+
"@context": [
|
|
210
|
+
"https://schema.3sixty.global/aig/",
|
|
211
|
+
"https://schema.3sixty.global/common/"
|
|
212
|
+
],
|
|
213
|
+
"id": "aig:c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7",
|
|
214
|
+
"type": "AuditableItemGraphVertex",
|
|
215
|
+
"dateCreated": "2024-08-22T04:13:20.000Z",
|
|
216
|
+
"aliases": [
|
|
217
|
+
{
|
|
218
|
+
"@context": [
|
|
219
|
+
"https://schema.3sixty.global/aig/"
|
|
220
|
+
],
|
|
221
|
+
"id": "test-id-0",
|
|
222
|
+
"type": "AuditableItemGraphAlias",
|
|
223
|
+
"dateCreated": "2024-08-22T04:13:20.000Z"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"resources": [
|
|
227
|
+
{
|
|
228
|
+
"@context": "https://schema.3sixty.global/aig/",
|
|
229
|
+
"type": "AuditableItemGraphResource",
|
|
230
|
+
"dateCreated": "2024-08-22T04:13:20.000Z",
|
|
231
|
+
"resourceObject": {
|
|
232
|
+
"@context": [
|
|
233
|
+
"https://schema.3sixty.global/documents/",
|
|
234
|
+
"https://schema.3sixty.global/common/",
|
|
235
|
+
"https://schema.org"
|
|
236
|
+
],
|
|
237
|
+
"type": "Document",
|
|
238
|
+
"id": "test-id-0:0",
|
|
239
|
+
"documentId": "test-id-0",
|
|
240
|
+
"documentCode": "unece:DocumentCodeList#705",
|
|
241
|
+
"documentRevision": 0,
|
|
242
|
+
"annotationObject": {
|
|
243
|
+
"@context": "https://schema.org",
|
|
244
|
+
"type": "DigitalDocument",
|
|
245
|
+
"name": "bill-of-lading"
|
|
246
|
+
},
|
|
247
|
+
"integrity": "sha256-E3Duqrp6bHojSx+CzDttAToAiP1eFkCDAPBbKLABVGM=",
|
|
248
|
+
"blobStorageId": "blob:memory:1370eeaaba7a6c7a234b1f82cc3b6d013a0088fd5e16408300f05b28b0015463",
|
|
249
|
+
"dateCreated": "2024-08-22T04:13:20.000Z",
|
|
250
|
+
"organizationIdentity": "did:entity-storage:0x0101010101010101010101010101010101010101010101010101010101010101",
|
|
251
|
+
"userIdentity": "did:entity-storage:0x0404040404040404040404040404040404040404040404040404040404040404"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"400": {
|
|
264
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
265
|
+
"content": {
|
|
266
|
+
"application/json": {
|
|
267
|
+
"schema": {
|
|
268
|
+
"$ref": "#/components/schemas/Error"
|
|
269
|
+
},
|
|
270
|
+
"examples": {
|
|
271
|
+
"exampleResponse": {
|
|
272
|
+
"value": {
|
|
273
|
+
"name": "GeneralError",
|
|
274
|
+
"message": "errorMessage",
|
|
275
|
+
"properties": {
|
|
276
|
+
"foo": "bar"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"401": {
|
|
285
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
286
|
+
"content": {
|
|
287
|
+
"application/json": {
|
|
288
|
+
"schema": {
|
|
289
|
+
"$ref": "#/components/schemas/Error"
|
|
290
|
+
},
|
|
291
|
+
"examples": {
|
|
292
|
+
"exampleResponse": {
|
|
293
|
+
"value": {
|
|
294
|
+
"name": "UnauthorizedError",
|
|
295
|
+
"message": "errorMessage"
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"500": {
|
|
303
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
304
|
+
"content": {
|
|
305
|
+
"application/json": {
|
|
306
|
+
"schema": {
|
|
307
|
+
"$ref": "#/components/schemas/Error"
|
|
308
|
+
},
|
|
309
|
+
"examples": {
|
|
310
|
+
"exampleResponse": {
|
|
311
|
+
"value": {
|
|
312
|
+
"name": "InternalServerError",
|
|
313
|
+
"message": "errorMessage"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"/document-management/{auditableItemGraphDocumentId}": {
|
|
324
|
+
"patch": {
|
|
325
|
+
"operationId": "DocumentManagementUpdatePartial",
|
|
326
|
+
"summary": "Partially update a document in an auditable item graph vertex and add its content to blob storage.",
|
|
327
|
+
"tags": [
|
|
328
|
+
"Document Management"
|
|
329
|
+
],
|
|
330
|
+
"parameters": [
|
|
331
|
+
{
|
|
332
|
+
"name": "auditableItemGraphDocumentId",
|
|
333
|
+
"description": "The full id of the document to update.",
|
|
334
|
+
"in": "path",
|
|
335
|
+
"required": true,
|
|
336
|
+
"schema": {
|
|
337
|
+
"type": "string"
|
|
338
|
+
},
|
|
339
|
+
"style": "simple",
|
|
340
|
+
"example": "aig:123456"
|
|
341
|
+
}
|
|
342
|
+
],
|
|
343
|
+
"security": [
|
|
344
|
+
{
|
|
345
|
+
"jwtBearerAuthScheme": []
|
|
346
|
+
}
|
|
347
|
+
],
|
|
348
|
+
"requestBody": {
|
|
349
|
+
"description": "Request to partially update a document as an auditable item graph vertex.",
|
|
350
|
+
"required": true,
|
|
351
|
+
"content": {
|
|
352
|
+
"application/json": {
|
|
353
|
+
"schema": {
|
|
354
|
+
"$ref": "#/components/schemas/DocumentManagementUpdatePartialRequest"
|
|
355
|
+
},
|
|
356
|
+
"examples": {
|
|
357
|
+
"DocumentManagementUpdatePartialRequestExample": {
|
|
358
|
+
"value": {
|
|
359
|
+
"document": {
|
|
360
|
+
"annotationObject": {
|
|
361
|
+
"@context": "https://schema.org",
|
|
362
|
+
"@type": "DigitalDocument",
|
|
363
|
+
"name": "myfile.pdf"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"blob": "SGVsbG8gV29ybGQ="
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"responses": {
|
|
374
|
+
"204": {
|
|
375
|
+
"description": "The rest request ended in success with no data."
|
|
376
|
+
},
|
|
377
|
+
"400": {
|
|
378
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
379
|
+
"content": {
|
|
380
|
+
"application/json": {
|
|
381
|
+
"schema": {
|
|
382
|
+
"$ref": "#/components/schemas/Error"
|
|
383
|
+
},
|
|
384
|
+
"examples": {
|
|
385
|
+
"exampleResponse": {
|
|
386
|
+
"value": {
|
|
387
|
+
"name": "GeneralError",
|
|
388
|
+
"message": "errorMessage",
|
|
389
|
+
"properties": {
|
|
390
|
+
"foo": "bar"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"401": {
|
|
399
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
400
|
+
"content": {
|
|
401
|
+
"application/json": {
|
|
402
|
+
"schema": {
|
|
403
|
+
"$ref": "#/components/schemas/Error"
|
|
404
|
+
},
|
|
405
|
+
"examples": {
|
|
406
|
+
"exampleResponse": {
|
|
407
|
+
"value": {
|
|
408
|
+
"name": "UnauthorizedError",
|
|
409
|
+
"message": "errorMessage"
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"500": {
|
|
417
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
418
|
+
"content": {
|
|
419
|
+
"application/json": {
|
|
420
|
+
"schema": {
|
|
421
|
+
"$ref": "#/components/schemas/Error"
|
|
422
|
+
},
|
|
423
|
+
"examples": {
|
|
424
|
+
"exampleResponse": {
|
|
425
|
+
"value": {
|
|
426
|
+
"name": "InternalServerError",
|
|
427
|
+
"message": "errorMessage"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"get": {
|
|
437
|
+
"operationId": "DocumentManagementGet",
|
|
438
|
+
"summary": "Get the data for a document from document management",
|
|
439
|
+
"tags": [
|
|
440
|
+
"Document Management"
|
|
441
|
+
],
|
|
442
|
+
"parameters": [
|
|
443
|
+
{
|
|
444
|
+
"name": "auditableItemGraphDocumentId",
|
|
445
|
+
"description": "The full id of the document to get.",
|
|
446
|
+
"in": "path",
|
|
447
|
+
"required": true,
|
|
448
|
+
"schema": {
|
|
449
|
+
"type": "string"
|
|
450
|
+
},
|
|
451
|
+
"style": "simple",
|
|
452
|
+
"example": "aig:123456"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"name": "includeBlobStorageMetadata",
|
|
456
|
+
"description": "Include the blob storage metadata in the response.",
|
|
457
|
+
"in": "query",
|
|
458
|
+
"required": false,
|
|
459
|
+
"schema": {
|
|
460
|
+
"type": "string"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"name": "includeBlobStorageData",
|
|
465
|
+
"description": "Include the blob storage data in the response.",
|
|
466
|
+
"in": "query",
|
|
467
|
+
"required": false,
|
|
468
|
+
"schema": {
|
|
469
|
+
"type": "string"
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"name": "includeAttestation",
|
|
474
|
+
"description": "Include the attestation information in the response.",
|
|
475
|
+
"in": "query",
|
|
476
|
+
"required": false,
|
|
477
|
+
"schema": {
|
|
478
|
+
"type": "string"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "includeRemoved",
|
|
483
|
+
"description": "Include deleted documents in the response.",
|
|
484
|
+
"in": "query",
|
|
485
|
+
"required": false,
|
|
486
|
+
"schema": {
|
|
487
|
+
"type": "string"
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "includeDeletedEdges",
|
|
492
|
+
"description": "Include soft-deleted edges in the response.",
|
|
493
|
+
"in": "query",
|
|
494
|
+
"required": false,
|
|
495
|
+
"schema": {
|
|
496
|
+
"type": "string"
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"name": "extractRuleGroupId",
|
|
501
|
+
"description": "If provided will extract data from the document using the specified rule group id.",
|
|
502
|
+
"in": "query",
|
|
503
|
+
"required": false,
|
|
504
|
+
"schema": {
|
|
505
|
+
"type": "string"
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "extractMimeType",
|
|
510
|
+
"description": "By default extraction will auto detect the mime type of the document, this can be used to override the detection.",
|
|
511
|
+
"in": "query",
|
|
512
|
+
"required": false,
|
|
513
|
+
"schema": {
|
|
514
|
+
"type": "string"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "limit",
|
|
519
|
+
"description": "Limit the number of items to return, defaults to 1 so only most recent is returned.",
|
|
520
|
+
"in": "query",
|
|
521
|
+
"required": false,
|
|
522
|
+
"schema": {
|
|
523
|
+
"type": "string"
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"name": "cursor",
|
|
528
|
+
"description": "The cursor to get the next chunk of revisions.",
|
|
529
|
+
"in": "query",
|
|
530
|
+
"required": false,
|
|
531
|
+
"schema": {
|
|
532
|
+
"type": "string"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "accept",
|
|
537
|
+
"in": "header",
|
|
538
|
+
"required": true,
|
|
539
|
+
"schema": {
|
|
540
|
+
"type": "string"
|
|
541
|
+
},
|
|
542
|
+
"style": "simple"
|
|
543
|
+
}
|
|
544
|
+
],
|
|
545
|
+
"security": [
|
|
546
|
+
{
|
|
547
|
+
"jwtBearerAuthScheme": []
|
|
548
|
+
}
|
|
549
|
+
],
|
|
550
|
+
"responses": {
|
|
551
|
+
"200": {
|
|
552
|
+
"description": "Response to get a document and optionally revisions from an auditable item graph vertex.",
|
|
553
|
+
"content": {
|
|
554
|
+
"application/json": {
|
|
555
|
+
"schema": {
|
|
556
|
+
"$ref": "#/components/schemas/DocumentList"
|
|
557
|
+
},
|
|
558
|
+
"examples": {
|
|
559
|
+
"DocumentManagementGetResponseExample": {
|
|
560
|
+
"value": {
|
|
561
|
+
"@context": [
|
|
562
|
+
"https://schema.org",
|
|
563
|
+
"https://schema.3sixty.global/documents/",
|
|
564
|
+
"https://schema.3sixty.global/common/"
|
|
565
|
+
],
|
|
566
|
+
"type": "ItemList",
|
|
567
|
+
"itemListElement": [
|
|
568
|
+
{
|
|
569
|
+
"@context": [
|
|
570
|
+
"https://schema.org",
|
|
571
|
+
"https://schema.3sixty.global/documents/",
|
|
572
|
+
"https://schema.3sixty.global/common/"
|
|
573
|
+
],
|
|
574
|
+
"type": "Document",
|
|
575
|
+
"id": "2721000:0",
|
|
576
|
+
"documentId": "2721000",
|
|
577
|
+
"documentIdFormat": "bol",
|
|
578
|
+
"documentCode": "unece:DocumentCodeList#705",
|
|
579
|
+
"documentRevision": 0,
|
|
580
|
+
"blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
|
|
581
|
+
"integrity": "sha256-123456",
|
|
582
|
+
"dateCreated": "2024-01-01T00:00:00Z",
|
|
583
|
+
"annotationObject": {
|
|
584
|
+
"@context": "https://schema.org",
|
|
585
|
+
"@type": "DigitalDocument",
|
|
586
|
+
"name": "myfile.pdf"
|
|
587
|
+
},
|
|
588
|
+
"organizationIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
|
|
589
|
+
"userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
"application/ld+json": {
|
|
597
|
+
"schema": {
|
|
598
|
+
"$ref": "#/components/schemas/DocumentList"
|
|
599
|
+
},
|
|
600
|
+
"examples": {
|
|
601
|
+
"DocumentManagementGetResponseExample": {
|
|
602
|
+
"value": {
|
|
603
|
+
"@context": [
|
|
604
|
+
"https://schema.org",
|
|
605
|
+
"https://schema.3sixty.global/documents/",
|
|
606
|
+
"https://schema.3sixty.global/common/"
|
|
607
|
+
],
|
|
608
|
+
"type": "ItemList",
|
|
609
|
+
"itemListElement": [
|
|
610
|
+
{
|
|
611
|
+
"@context": [
|
|
612
|
+
"https://schema.org",
|
|
613
|
+
"https://schema.3sixty.global/documents/",
|
|
614
|
+
"https://schema.3sixty.global/common/"
|
|
615
|
+
],
|
|
616
|
+
"type": "Document",
|
|
617
|
+
"id": "2721000:0",
|
|
618
|
+
"documentId": "2721000",
|
|
619
|
+
"documentIdFormat": "bol",
|
|
620
|
+
"documentCode": "unece:DocumentCodeList#705",
|
|
621
|
+
"documentRevision": 0,
|
|
622
|
+
"blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
|
|
623
|
+
"integrity": "sha256-123456",
|
|
624
|
+
"dateCreated": "2024-01-01T00:00:00Z",
|
|
625
|
+
"annotationObject": {
|
|
626
|
+
"@context": "https://schema.org",
|
|
627
|
+
"@type": "DigitalDocument",
|
|
628
|
+
"name": "myfile.pdf"
|
|
629
|
+
},
|
|
630
|
+
"organizationIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
|
|
631
|
+
"userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"400": {
|
|
641
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
642
|
+
"content": {
|
|
643
|
+
"application/json": {
|
|
644
|
+
"schema": {
|
|
645
|
+
"$ref": "#/components/schemas/Error"
|
|
646
|
+
},
|
|
647
|
+
"examples": {
|
|
648
|
+
"exampleResponse": {
|
|
649
|
+
"value": {
|
|
650
|
+
"name": "GeneralError",
|
|
651
|
+
"message": "errorMessage",
|
|
652
|
+
"properties": {
|
|
653
|
+
"foo": "bar"
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
"401": {
|
|
662
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
663
|
+
"content": {
|
|
664
|
+
"application/json": {
|
|
665
|
+
"schema": {
|
|
666
|
+
"$ref": "#/components/schemas/Error"
|
|
667
|
+
},
|
|
668
|
+
"examples": {
|
|
669
|
+
"exampleResponse": {
|
|
670
|
+
"value": {
|
|
671
|
+
"name": "UnauthorizedError",
|
|
672
|
+
"message": "errorMessage"
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
"404": {
|
|
680
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
681
|
+
"content": {
|
|
682
|
+
"application/json": {
|
|
683
|
+
"schema": {
|
|
684
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
685
|
+
},
|
|
686
|
+
"examples": {
|
|
687
|
+
"exampleResponse": {
|
|
688
|
+
"value": {
|
|
689
|
+
"name": "NotFoundError",
|
|
690
|
+
"message": "errorMessage",
|
|
691
|
+
"properties": {
|
|
692
|
+
"notFoundId": "1"
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
"500": {
|
|
701
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
702
|
+
"content": {
|
|
703
|
+
"application/json": {
|
|
704
|
+
"schema": {
|
|
705
|
+
"$ref": "#/components/schemas/Error"
|
|
706
|
+
},
|
|
707
|
+
"examples": {
|
|
708
|
+
"exampleResponse": {
|
|
709
|
+
"value": {
|
|
710
|
+
"name": "InternalServerError",
|
|
711
|
+
"message": "errorMessage"
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
"/document-management/{auditableItemGraphDocumentId}/{revision}": {
|
|
722
|
+
"get": {
|
|
723
|
+
"operationId": "DocumentManagementGetRevision",
|
|
724
|
+
"summary": "Get the data for a document revision from document management",
|
|
725
|
+
"tags": [
|
|
726
|
+
"Document Management"
|
|
727
|
+
],
|
|
728
|
+
"parameters": [
|
|
729
|
+
{
|
|
730
|
+
"name": "auditableItemGraphDocumentId",
|
|
731
|
+
"description": "",
|
|
732
|
+
"in": "path",
|
|
733
|
+
"required": true,
|
|
734
|
+
"schema": {
|
|
735
|
+
"type": "string"
|
|
736
|
+
},
|
|
737
|
+
"style": "simple",
|
|
738
|
+
"example": "aig:123456"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"name": "revision",
|
|
742
|
+
"description": "",
|
|
743
|
+
"in": "path",
|
|
744
|
+
"required": true,
|
|
745
|
+
"schema": {
|
|
746
|
+
"type": "string"
|
|
747
|
+
},
|
|
748
|
+
"style": "simple",
|
|
749
|
+
"example": "1"
|
|
750
|
+
}
|
|
751
|
+
],
|
|
752
|
+
"security": [
|
|
753
|
+
{
|
|
754
|
+
"jwtBearerAuthScheme": []
|
|
755
|
+
}
|
|
756
|
+
],
|
|
757
|
+
"responses": {
|
|
758
|
+
"200": {
|
|
759
|
+
"description": "Response to get a document revision from an auditable item graph vertex.",
|
|
760
|
+
"content": {
|
|
761
|
+
"application/json": {
|
|
762
|
+
"schema": {
|
|
763
|
+
"$ref": "#/components/schemas/Document"
|
|
764
|
+
},
|
|
765
|
+
"examples": {
|
|
766
|
+
"DocumentManagementGetRevisionResponseExample": {
|
|
767
|
+
"value": {
|
|
768
|
+
"@context": [
|
|
769
|
+
"https://schema.org",
|
|
770
|
+
"https://schema.3sixty.global/documents/",
|
|
771
|
+
"https://schema.3sixty.global/common/"
|
|
772
|
+
],
|
|
773
|
+
"type": "Document",
|
|
774
|
+
"id": "2721000:0",
|
|
775
|
+
"documentId": "2721000",
|
|
776
|
+
"documentIdFormat": "bol",
|
|
777
|
+
"documentCode": "unece:DocumentCodeList#705",
|
|
778
|
+
"documentRevision": 1,
|
|
779
|
+
"blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
|
|
780
|
+
"integrity": "sha256-123456",
|
|
781
|
+
"dateCreated": "2024-01-01T00:00:00Z",
|
|
782
|
+
"annotationObject": {
|
|
783
|
+
"@context": "https://schema.org",
|
|
784
|
+
"@type": "DigitalDocument",
|
|
785
|
+
"name": "myfile.pdf"
|
|
786
|
+
},
|
|
787
|
+
"organizationIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
|
|
788
|
+
"userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
"application/ld+json": {
|
|
794
|
+
"schema": {
|
|
795
|
+
"$ref": "#/components/schemas/Document"
|
|
796
|
+
},
|
|
797
|
+
"examples": {
|
|
798
|
+
"DocumentManagementGetRevisionResponseExample": {
|
|
799
|
+
"value": {
|
|
800
|
+
"@context": [
|
|
801
|
+
"https://schema.org",
|
|
802
|
+
"https://schema.3sixty.global/documents/",
|
|
803
|
+
"https://schema.3sixty.global/common/"
|
|
804
|
+
],
|
|
805
|
+
"type": "Document",
|
|
806
|
+
"id": "2721000:0",
|
|
807
|
+
"documentId": "2721000",
|
|
808
|
+
"documentIdFormat": "bol",
|
|
809
|
+
"documentCode": "unece:DocumentCodeList#705",
|
|
810
|
+
"documentRevision": 1,
|
|
811
|
+
"blobStorageId": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
|
|
812
|
+
"integrity": "sha256-123456",
|
|
813
|
+
"dateCreated": "2024-01-01T00:00:00Z",
|
|
814
|
+
"annotationObject": {
|
|
815
|
+
"@context": "https://schema.org",
|
|
816
|
+
"@type": "DigitalDocument",
|
|
817
|
+
"name": "myfile.pdf"
|
|
818
|
+
},
|
|
819
|
+
"organizationIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
|
|
820
|
+
"userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
"400": {
|
|
828
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
829
|
+
"content": {
|
|
830
|
+
"application/json": {
|
|
831
|
+
"schema": {
|
|
832
|
+
"$ref": "#/components/schemas/Error"
|
|
833
|
+
},
|
|
834
|
+
"examples": {
|
|
835
|
+
"exampleResponse": {
|
|
836
|
+
"value": {
|
|
837
|
+
"name": "GeneralError",
|
|
838
|
+
"message": "errorMessage",
|
|
839
|
+
"properties": {
|
|
840
|
+
"foo": "bar"
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
"401": {
|
|
849
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
850
|
+
"content": {
|
|
851
|
+
"application/json": {
|
|
852
|
+
"schema": {
|
|
853
|
+
"$ref": "#/components/schemas/Error"
|
|
854
|
+
},
|
|
855
|
+
"examples": {
|
|
856
|
+
"exampleResponse": {
|
|
857
|
+
"value": {
|
|
858
|
+
"name": "UnauthorizedError",
|
|
859
|
+
"message": "errorMessage"
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
"404": {
|
|
867
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
868
|
+
"content": {
|
|
869
|
+
"application/json": {
|
|
870
|
+
"schema": {
|
|
871
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
872
|
+
},
|
|
873
|
+
"examples": {
|
|
874
|
+
"exampleResponse": {
|
|
875
|
+
"value": {
|
|
876
|
+
"name": "NotFoundError",
|
|
877
|
+
"message": "errorMessage",
|
|
878
|
+
"properties": {
|
|
879
|
+
"notFoundId": "1"
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
"500": {
|
|
888
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
889
|
+
"content": {
|
|
890
|
+
"application/json": {
|
|
891
|
+
"schema": {
|
|
892
|
+
"$ref": "#/components/schemas/Error"
|
|
893
|
+
},
|
|
894
|
+
"examples": {
|
|
895
|
+
"exampleResponse": {
|
|
896
|
+
"value": {
|
|
897
|
+
"name": "InternalServerError",
|
|
898
|
+
"message": "errorMessage"
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
"delete": {
|
|
908
|
+
"operationId": "DocumentManagementRemove",
|
|
909
|
+
"summary": "Remove an document from an auditable item graph vertex",
|
|
910
|
+
"tags": [
|
|
911
|
+
"Document Management"
|
|
912
|
+
],
|
|
913
|
+
"parameters": [
|
|
914
|
+
{
|
|
915
|
+
"name": "auditableItemGraphDocumentId",
|
|
916
|
+
"description": "The id of the auditable item graph vertex to remove the revision from.",
|
|
917
|
+
"in": "path",
|
|
918
|
+
"required": true,
|
|
919
|
+
"schema": {
|
|
920
|
+
"type": "string"
|
|
921
|
+
},
|
|
922
|
+
"style": "simple",
|
|
923
|
+
"example": "aig:1234"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "revision",
|
|
927
|
+
"description": "The revision of the document to remove.",
|
|
928
|
+
"in": "path",
|
|
929
|
+
"required": true,
|
|
930
|
+
"schema": {
|
|
931
|
+
"type": "string"
|
|
932
|
+
},
|
|
933
|
+
"style": "simple",
|
|
934
|
+
"example": "1"
|
|
935
|
+
}
|
|
936
|
+
],
|
|
937
|
+
"security": [
|
|
938
|
+
{
|
|
939
|
+
"jwtBearerAuthScheme": []
|
|
940
|
+
}
|
|
941
|
+
],
|
|
942
|
+
"responses": {
|
|
943
|
+
"204": {
|
|
944
|
+
"description": "The rest request ended in success with no data."
|
|
945
|
+
},
|
|
946
|
+
"400": {
|
|
947
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
948
|
+
"content": {
|
|
949
|
+
"application/json": {
|
|
950
|
+
"schema": {
|
|
951
|
+
"$ref": "#/components/schemas/Error"
|
|
952
|
+
},
|
|
953
|
+
"examples": {
|
|
954
|
+
"exampleResponse": {
|
|
955
|
+
"value": {
|
|
956
|
+
"name": "GeneralError",
|
|
957
|
+
"message": "errorMessage",
|
|
958
|
+
"properties": {
|
|
959
|
+
"foo": "bar"
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
"401": {
|
|
968
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
969
|
+
"content": {
|
|
970
|
+
"application/json": {
|
|
971
|
+
"schema": {
|
|
972
|
+
"$ref": "#/components/schemas/Error"
|
|
973
|
+
},
|
|
974
|
+
"examples": {
|
|
975
|
+
"exampleResponse": {
|
|
976
|
+
"value": {
|
|
977
|
+
"name": "UnauthorizedError",
|
|
978
|
+
"message": "errorMessage"
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
"404": {
|
|
986
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
987
|
+
"content": {
|
|
988
|
+
"application/json": {
|
|
989
|
+
"schema": {
|
|
990
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
991
|
+
},
|
|
992
|
+
"examples": {
|
|
993
|
+
"exampleResponse": {
|
|
994
|
+
"value": {
|
|
995
|
+
"name": "NotFoundError",
|
|
996
|
+
"message": "errorMessage",
|
|
997
|
+
"properties": {
|
|
998
|
+
"notFoundId": "1"
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
"500": {
|
|
1007
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
1008
|
+
"content": {
|
|
1009
|
+
"application/json": {
|
|
1010
|
+
"schema": {
|
|
1011
|
+
"$ref": "#/components/schemas/Error"
|
|
1012
|
+
},
|
|
1013
|
+
"examples": {
|
|
1014
|
+
"exampleResponse": {
|
|
1015
|
+
"value": {
|
|
1016
|
+
"name": "InternalServerError",
|
|
1017
|
+
"message": "errorMessage"
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
"components": {
|
|
1029
|
+
"schemas": {
|
|
1030
|
+
"Document": {
|
|
1031
|
+
"description": "Interface describing a document.",
|
|
1032
|
+
"type": "object",
|
|
1033
|
+
"properties": {
|
|
1034
|
+
"@context": {
|
|
1035
|
+
"type": "array",
|
|
1036
|
+
"prefixItems": [
|
|
1037
|
+
{
|
|
1038
|
+
"const": "https://schema.org"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"const": "https://schema.3sixty.global/documents/"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"const": "https://schema.3sixty.global/common/"
|
|
1045
|
+
}
|
|
1046
|
+
],
|
|
1047
|
+
"items": {
|
|
1048
|
+
"$ref": "https://schema.3sixty.global/json-ld/JsonLdContextDefinitionElement"
|
|
1049
|
+
},
|
|
1050
|
+
"minItems": 3,
|
|
1051
|
+
"description": "JSON-LD Context."
|
|
1052
|
+
},
|
|
1053
|
+
"type": {
|
|
1054
|
+
"const": "Document",
|
|
1055
|
+
"description": "JSON-LD Type."
|
|
1056
|
+
},
|
|
1057
|
+
"id": {
|
|
1058
|
+
"type": "string",
|
|
1059
|
+
"description": "The full id of the document."
|
|
1060
|
+
},
|
|
1061
|
+
"documentRevision": {
|
|
1062
|
+
"type": "number",
|
|
1063
|
+
"description": "The revision of the document as a 0 based index."
|
|
1064
|
+
},
|
|
1065
|
+
"blobStorageId": {
|
|
1066
|
+
"type": "string",
|
|
1067
|
+
"description": "The blob storage id for the document."
|
|
1068
|
+
},
|
|
1069
|
+
"integrity": {
|
|
1070
|
+
"type": "string",
|
|
1071
|
+
"description": "The integrity of the blob data."
|
|
1072
|
+
},
|
|
1073
|
+
"attestationId": {
|
|
1074
|
+
"type": "string",
|
|
1075
|
+
"description": "The attestation for the document if one was created."
|
|
1076
|
+
},
|
|
1077
|
+
"dateCreated": {
|
|
1078
|
+
"type": "string",
|
|
1079
|
+
"description": "The date/time of when the document was created."
|
|
1080
|
+
},
|
|
1081
|
+
"dateModified": {
|
|
1082
|
+
"type": "string",
|
|
1083
|
+
"description": "The date/time of when the document was modified."
|
|
1084
|
+
},
|
|
1085
|
+
"dateDeleted": {
|
|
1086
|
+
"type": "string",
|
|
1087
|
+
"description": "The date/time of when the document was deleted, as we never actually remove items."
|
|
1088
|
+
},
|
|
1089
|
+
"organizationIdentity": {
|
|
1090
|
+
"type": "string",
|
|
1091
|
+
"description": "The organization which added the document to the graph."
|
|
1092
|
+
},
|
|
1093
|
+
"userIdentity": {
|
|
1094
|
+
"type": "string",
|
|
1095
|
+
"description": "The user who added the document to the graph."
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
"required": [
|
|
1099
|
+
"@context",
|
|
1100
|
+
"type",
|
|
1101
|
+
"id",
|
|
1102
|
+
"documentRevision",
|
|
1103
|
+
"blobStorageId",
|
|
1104
|
+
"integrity",
|
|
1105
|
+
"dateCreated"
|
|
1106
|
+
],
|
|
1107
|
+
"allOf": [
|
|
1108
|
+
{
|
|
1109
|
+
"$ref": "#/components/schemas/DocumentBase"
|
|
1110
|
+
}
|
|
1111
|
+
]
|
|
1112
|
+
},
|
|
1113
|
+
"DocumentBase": {
|
|
1114
|
+
"description": "Interface describing a document base.",
|
|
1115
|
+
"type": "object",
|
|
1116
|
+
"properties": {
|
|
1117
|
+
"documentId": {
|
|
1118
|
+
"type": "string",
|
|
1119
|
+
"description": "The id of the document."
|
|
1120
|
+
},
|
|
1121
|
+
"documentIdFormat": {
|
|
1122
|
+
"type": "string",
|
|
1123
|
+
"description": "The format of the document id."
|
|
1124
|
+
},
|
|
1125
|
+
"documentCode": {
|
|
1126
|
+
"$ref": "https://schema.3sixty.global/unece/UneceDocumentCodeList"
|
|
1127
|
+
},
|
|
1128
|
+
"annotationObject": {
|
|
1129
|
+
"$ref": "https://schema.3sixty.global/json-ld/JsonLdNodeObject"
|
|
1130
|
+
}
|
|
1131
|
+
},
|
|
1132
|
+
"required": [
|
|
1133
|
+
"documentId",
|
|
1134
|
+
"documentCode"
|
|
1135
|
+
]
|
|
1136
|
+
},
|
|
1137
|
+
"DocumentHydrated": {
|
|
1138
|
+
"description": "Interface describing a hydrated document which includes additional information that can be optionally requested when retrieving a document.",
|
|
1139
|
+
"type": "object",
|
|
1140
|
+
"properties": {
|
|
1141
|
+
"blobStorageEntry": {
|
|
1142
|
+
"$ref": "https://schema.3sixty.global/blob-storage/BlobStorageEntry"
|
|
1143
|
+
},
|
|
1144
|
+
"extractedData": {
|
|
1145
|
+
"description": "The data extracted from the document using data extraction services."
|
|
1146
|
+
},
|
|
1147
|
+
"attestationInformation": {
|
|
1148
|
+
"$ref": "https://schema.3sixty.global/attestation/AttestationInformation"
|
|
1149
|
+
}
|
|
1150
|
+
},
|
|
1151
|
+
"allOf": [
|
|
1152
|
+
{
|
|
1153
|
+
"$ref": "#/components/schemas/Document"
|
|
1154
|
+
}
|
|
1155
|
+
]
|
|
1156
|
+
},
|
|
1157
|
+
"DocumentList": {
|
|
1158
|
+
"description": "Interface describing a list of document entries.",
|
|
1159
|
+
"type": "object",
|
|
1160
|
+
"properties": {
|
|
1161
|
+
"@context": {
|
|
1162
|
+
"type": "array",
|
|
1163
|
+
"prefixItems": [
|
|
1164
|
+
{
|
|
1165
|
+
"const": "https://schema.org"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
"const": "https://schema.3sixty.global/documents/"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"const": "https://schema.3sixty.global/common/"
|
|
1172
|
+
}
|
|
1173
|
+
],
|
|
1174
|
+
"items": {
|
|
1175
|
+
"$ref": "https://schema.3sixty.global/json-ld/JsonLdContextDefinitionElement"
|
|
1176
|
+
},
|
|
1177
|
+
"minItems": 3,
|
|
1178
|
+
"description": "JSON-LD Context."
|
|
1179
|
+
},
|
|
1180
|
+
"type": {
|
|
1181
|
+
"const": "ItemList",
|
|
1182
|
+
"description": "JSON-LD Type."
|
|
1183
|
+
},
|
|
1184
|
+
"itemListElement": {
|
|
1185
|
+
"type": "array",
|
|
1186
|
+
"items": {
|
|
1187
|
+
"$ref": "#/components/schemas/DocumentHydrated"
|
|
1188
|
+
},
|
|
1189
|
+
"description": "The list of documents."
|
|
1190
|
+
},
|
|
1191
|
+
"edges": {
|
|
1192
|
+
"type": "array",
|
|
1193
|
+
"items": {
|
|
1194
|
+
"type": "string"
|
|
1195
|
+
},
|
|
1196
|
+
"description": "The ids of the other vertices which are connected to the document."
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
"required": [
|
|
1200
|
+
"@context",
|
|
1201
|
+
"type",
|
|
1202
|
+
"itemListElement"
|
|
1203
|
+
]
|
|
1204
|
+
},
|
|
1205
|
+
"DocumentManagementCreateRequest": {
|
|
1206
|
+
"type": "object",
|
|
1207
|
+
"properties": {
|
|
1208
|
+
"document": {
|
|
1209
|
+
"$ref": "#/components/schemas/DocumentBase"
|
|
1210
|
+
},
|
|
1211
|
+
"blob": {
|
|
1212
|
+
"type": "string",
|
|
1213
|
+
"description": "The data to create the document with, either as base64-encoded content or an existing blob storage entry id."
|
|
1214
|
+
},
|
|
1215
|
+
"auditableItemGraphEdges": {
|
|
1216
|
+
"type": "array",
|
|
1217
|
+
"items": {
|
|
1218
|
+
"$ref": "#/components/schemas/DocumentManagementEdgeEntry"
|
|
1219
|
+
},
|
|
1220
|
+
"description": "The auditable item graph vertices to connect the document to."
|
|
1221
|
+
},
|
|
1222
|
+
"options": {
|
|
1223
|
+
"type": "object",
|
|
1224
|
+
"properties": {
|
|
1225
|
+
"includeAttestation": {
|
|
1226
|
+
"type": "boolean",
|
|
1227
|
+
"description": "Flag to create an attestation for the document, defaults to false."
|
|
1228
|
+
},
|
|
1229
|
+
"includeAlias": {
|
|
1230
|
+
"type": "boolean",
|
|
1231
|
+
"description": "Flag to add the document id as an alias to the aig vertex, defaults to true."
|
|
1232
|
+
},
|
|
1233
|
+
"aliasAnnotationObject": {
|
|
1234
|
+
"$ref": "https://schema.3sixty.global/json-ld/JsonLdNodeObject"
|
|
1235
|
+
}
|
|
1236
|
+
},
|
|
1237
|
+
"description": "Additional options for the create operation."
|
|
1238
|
+
}
|
|
1239
|
+
},
|
|
1240
|
+
"required": [
|
|
1241
|
+
"document",
|
|
1242
|
+
"blob"
|
|
1243
|
+
],
|
|
1244
|
+
"description": "The body parameters."
|
|
1245
|
+
},
|
|
1246
|
+
"DocumentManagementEdgeEntry": {
|
|
1247
|
+
"description": "A single edge entry used when connecting a document to an AIG vertex.",
|
|
1248
|
+
"type": "object",
|
|
1249
|
+
"properties": {
|
|
1250
|
+
"targetId": {
|
|
1251
|
+
"type": "string",
|
|
1252
|
+
"description": "The target AIG vertex id to connect to."
|
|
1253
|
+
},
|
|
1254
|
+
"includeAlias": {
|
|
1255
|
+
"type": "boolean",
|
|
1256
|
+
"description": "Whether to add the document id as an alias on the connected vertex, defaults to false."
|
|
1257
|
+
},
|
|
1258
|
+
"aliasAnnotationObject": {
|
|
1259
|
+
"$ref": "https://schema.3sixty.global/json-ld/JsonLdNodeObject"
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
"required": [
|
|
1263
|
+
"targetId"
|
|
1264
|
+
]
|
|
1265
|
+
},
|
|
1266
|
+
"DocumentManagementUpdatePartialRequest": {
|
|
1267
|
+
"type": "object",
|
|
1268
|
+
"properties": {
|
|
1269
|
+
"document": {
|
|
1270
|
+
"description": "The document base properties to update. annotationObject, documentIdFormat and documentCode are applied in-place to the current revision.",
|
|
1271
|
+
"type": "object",
|
|
1272
|
+
"properties": {
|
|
1273
|
+
"documentIdFormat": {
|
|
1274
|
+
"type": "string",
|
|
1275
|
+
"description": "The format of the document id."
|
|
1276
|
+
},
|
|
1277
|
+
"documentCode": {
|
|
1278
|
+
"$ref": "https://schema.3sixty.global/unece/UneceDocumentCodeList"
|
|
1279
|
+
},
|
|
1280
|
+
"annotationObject": {
|
|
1281
|
+
"$ref": "https://schema.3sixty.global/json-ld/JsonLdNodeObject"
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
},
|
|
1285
|
+
"blob": {
|
|
1286
|
+
"type": "string",
|
|
1287
|
+
"description": "The data to update the document with, either as base64-encoded content or an existing blob storage entry id."
|
|
1288
|
+
},
|
|
1289
|
+
"auditableItemGraphEdges": {
|
|
1290
|
+
"type": "object",
|
|
1291
|
+
"properties": {
|
|
1292
|
+
"add": {
|
|
1293
|
+
"type": "array",
|
|
1294
|
+
"items": {
|
|
1295
|
+
"$ref": "#/components/schemas/DocumentManagementEdgeEntry"
|
|
1296
|
+
},
|
|
1297
|
+
"description": "Connections to add; each entry creates a back-edge on the connected vertex."
|
|
1298
|
+
},
|
|
1299
|
+
"remove": {
|
|
1300
|
+
"type": "array",
|
|
1301
|
+
"items": {
|
|
1302
|
+
"type": "string"
|
|
1303
|
+
},
|
|
1304
|
+
"description": "Target vertex IDs to disconnect; their back-edges are removed."
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
"description": "Explicit edge delta to apply. Use `add` to create new connections and `remove` to\ndisconnect existing ones by their target vertex id."
|
|
1308
|
+
},
|
|
1309
|
+
"options": {
|
|
1310
|
+
"type": "object",
|
|
1311
|
+
"properties": {
|
|
1312
|
+
"includeAttestation": {
|
|
1313
|
+
"type": "boolean",
|
|
1314
|
+
"description": "Set to true to start attesting the document (even if originally created without attestation), or false to remove the existing attestation. Omit to leave attestation state unchanged."
|
|
1315
|
+
},
|
|
1316
|
+
"includeAlias": {
|
|
1317
|
+
"type": "boolean",
|
|
1318
|
+
"description": "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."
|
|
1319
|
+
},
|
|
1320
|
+
"aliasAnnotationObject": {
|
|
1321
|
+
"$ref": "https://schema.3sixty.global/json-ld/JsonLdNodeObject"
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
"description": "Additional options for the update operation."
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
"description": "The body parameters."
|
|
1328
|
+
},
|
|
1329
|
+
"Error": {
|
|
1330
|
+
"description": "Model to describe serialized error.",
|
|
1331
|
+
"type": "object",
|
|
1332
|
+
"properties": {
|
|
1333
|
+
"name": {
|
|
1334
|
+
"type": "string",
|
|
1335
|
+
"description": "The name for the error."
|
|
1336
|
+
},
|
|
1337
|
+
"message": {
|
|
1338
|
+
"type": "string",
|
|
1339
|
+
"description": "The message for the error as an i18n key."
|
|
1340
|
+
},
|
|
1341
|
+
"source": {
|
|
1342
|
+
"type": "string",
|
|
1343
|
+
"description": "The source of the error."
|
|
1344
|
+
},
|
|
1345
|
+
"properties": {
|
|
1346
|
+
"type": "object",
|
|
1347
|
+
"additionalProperties": {},
|
|
1348
|
+
"description": "Any additional information for the error."
|
|
1349
|
+
},
|
|
1350
|
+
"stack": {
|
|
1351
|
+
"type": "string",
|
|
1352
|
+
"description": "The stack trace for the error."
|
|
1353
|
+
},
|
|
1354
|
+
"cause": {
|
|
1355
|
+
"$ref": "#/components/schemas/Error"
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
"required": [
|
|
1359
|
+
"name",
|
|
1360
|
+
"message"
|
|
1361
|
+
]
|
|
1362
|
+
},
|
|
1363
|
+
"NotFoundResponse": {
|
|
1364
|
+
"type": "object",
|
|
1365
|
+
"properties": {
|
|
1366
|
+
"notFoundId": {
|
|
1367
|
+
"type": "string",
|
|
1368
|
+
"description": "The id if the item that was not found."
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
"allOf": [
|
|
1372
|
+
{
|
|
1373
|
+
"$ref": "#/components/schemas/Error"
|
|
1374
|
+
}
|
|
1375
|
+
],
|
|
1376
|
+
"description": "The body which contains the error."
|
|
1377
|
+
}
|
|
1378
|
+
},
|
|
1379
|
+
"securitySchemes": {
|
|
1380
|
+
"jwtBearerAuthScheme": {
|
|
1381
|
+
"type": "http",
|
|
1382
|
+
"scheme": "bearer",
|
|
1383
|
+
"bearerFormat": "JWT"
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
}
|