@twin.org/document-management-service 0.0.2-next.3 → 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 +15 -24
- package/dist/types/index.d.ts +5 -5
- package/dist/types/models/IDocumentManagementStorageServiceConstructorOptions.d.ts +1 -1
- package/docs/changelog.md +48 -0
- package/docs/open-api/spec.json +86 -106
- package/docs/reference/classes/DocumentManagementService.md +28 -86
- package/locales/en.json +1 -2
- package/package.json +27 -9
- package/dist/cjs/index.cjs +0 -1233
- package/dist/esm/index.mjs +0 -1222
package/docs/open-api/spec.json
CHANGED
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"exampleResponse": {
|
|
84
84
|
"value": {
|
|
85
85
|
"name": "GeneralError",
|
|
86
|
-
"message": "
|
|
86
|
+
"message": "errorMessage",
|
|
87
87
|
"properties": {
|
|
88
88
|
"foo": "bar"
|
|
89
89
|
}
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"exampleResponse": {
|
|
105
105
|
"value": {
|
|
106
106
|
"name": "UnauthorizedError",
|
|
107
|
-
"message": "
|
|
107
|
+
"message": "errorMessage"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"exampleResponse": {
|
|
123
123
|
"value": {
|
|
124
124
|
"name": "InternalServerError",
|
|
125
|
-
"message": "
|
|
125
|
+
"message": "errorMessage"
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -158,15 +158,12 @@
|
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
|
-
"name": "
|
|
161
|
+
"name": "limit",
|
|
162
162
|
"description": "The number of documents to return.",
|
|
163
163
|
"in": "query",
|
|
164
164
|
"required": false,
|
|
165
165
|
"schema": {
|
|
166
|
-
"type":
|
|
167
|
-
"number",
|
|
168
|
-
"string"
|
|
169
|
-
]
|
|
166
|
+
"type": "string"
|
|
170
167
|
}
|
|
171
168
|
},
|
|
172
169
|
{
|
|
@@ -246,7 +243,7 @@
|
|
|
246
243
|
"blobHash": "sha256:E3Duqrp6bHojSx+CzDttAToAiP1eFkCDAPBbKLABVGM=",
|
|
247
244
|
"blobStorageId": "blob:memory:1370eeaaba7a6c7a234b1f82cc3b6d013a0088fd5e16408300f05b28b0015463",
|
|
248
245
|
"dateCreated": "2024-08-22T04:13:20.000Z",
|
|
249
|
-
"
|
|
246
|
+
"organizationIdentity": "did:entity-storage:0x0101010101010101010101010101010101010101010101010101010101010101",
|
|
250
247
|
"userIdentity": "did:entity-storage:0x0404040404040404040404040404040404040404040404040404040404040404"
|
|
251
248
|
}
|
|
252
249
|
}
|
|
@@ -270,7 +267,7 @@
|
|
|
270
267
|
"exampleResponse": {
|
|
271
268
|
"value": {
|
|
272
269
|
"name": "GeneralError",
|
|
273
|
-
"message": "
|
|
270
|
+
"message": "errorMessage",
|
|
274
271
|
"properties": {
|
|
275
272
|
"foo": "bar"
|
|
276
273
|
}
|
|
@@ -291,7 +288,7 @@
|
|
|
291
288
|
"exampleResponse": {
|
|
292
289
|
"value": {
|
|
293
290
|
"name": "UnauthorizedError",
|
|
294
|
-
"message": "
|
|
291
|
+
"message": "errorMessage"
|
|
295
292
|
}
|
|
296
293
|
}
|
|
297
294
|
}
|
|
@@ -309,7 +306,7 @@
|
|
|
309
306
|
"exampleResponse": {
|
|
310
307
|
"value": {
|
|
311
308
|
"name": "InternalServerError",
|
|
312
|
-
"message": "
|
|
309
|
+
"message": "errorMessage"
|
|
313
310
|
}
|
|
314
311
|
}
|
|
315
312
|
}
|
|
@@ -382,7 +379,7 @@
|
|
|
382
379
|
"exampleResponse": {
|
|
383
380
|
"value": {
|
|
384
381
|
"name": "GeneralError",
|
|
385
|
-
"message": "
|
|
382
|
+
"message": "errorMessage",
|
|
386
383
|
"properties": {
|
|
387
384
|
"foo": "bar"
|
|
388
385
|
}
|
|
@@ -403,7 +400,7 @@
|
|
|
403
400
|
"exampleResponse": {
|
|
404
401
|
"value": {
|
|
405
402
|
"name": "UnauthorizedError",
|
|
406
|
-
"message": "
|
|
403
|
+
"message": "errorMessage"
|
|
407
404
|
}
|
|
408
405
|
}
|
|
409
406
|
}
|
|
@@ -421,7 +418,7 @@
|
|
|
421
418
|
"exampleResponse": {
|
|
422
419
|
"value": {
|
|
423
420
|
"name": "InternalServerError",
|
|
424
|
-
"message": "
|
|
421
|
+
"message": "errorMessage"
|
|
425
422
|
}
|
|
426
423
|
}
|
|
427
424
|
}
|
|
@@ -515,15 +512,12 @@
|
|
|
515
512
|
}
|
|
516
513
|
},
|
|
517
514
|
{
|
|
518
|
-
"name": "
|
|
519
|
-
"description": "
|
|
515
|
+
"name": "limit",
|
|
516
|
+
"description": "PLimit the number of items to return, defaults to 1 so only most recent is returned.",
|
|
520
517
|
"in": "query",
|
|
521
518
|
"required": false,
|
|
522
519
|
"schema": {
|
|
523
|
-
"type":
|
|
524
|
-
"number",
|
|
525
|
-
"string"
|
|
526
|
-
]
|
|
520
|
+
"type": "string"
|
|
527
521
|
}
|
|
528
522
|
},
|
|
529
523
|
{
|
|
@@ -588,7 +582,7 @@
|
|
|
588
582
|
"@type": "DigitalDocument",
|
|
589
583
|
"name": "myfile.pdf"
|
|
590
584
|
},
|
|
591
|
-
"
|
|
585
|
+
"organizationIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
|
|
592
586
|
"userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
|
|
593
587
|
}
|
|
594
588
|
]
|
|
@@ -630,7 +624,7 @@
|
|
|
630
624
|
"@type": "DigitalDocument",
|
|
631
625
|
"name": "myfile.pdf"
|
|
632
626
|
},
|
|
633
|
-
"
|
|
627
|
+
"organizationIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
|
|
634
628
|
"userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
|
|
635
629
|
}
|
|
636
630
|
]
|
|
@@ -651,7 +645,7 @@
|
|
|
651
645
|
"exampleResponse": {
|
|
652
646
|
"value": {
|
|
653
647
|
"name": "GeneralError",
|
|
654
|
-
"message": "
|
|
648
|
+
"message": "errorMessage",
|
|
655
649
|
"properties": {
|
|
656
650
|
"foo": "bar"
|
|
657
651
|
}
|
|
@@ -672,7 +666,7 @@
|
|
|
672
666
|
"exampleResponse": {
|
|
673
667
|
"value": {
|
|
674
668
|
"name": "UnauthorizedError",
|
|
675
|
-
"message": "
|
|
669
|
+
"message": "errorMessage"
|
|
676
670
|
}
|
|
677
671
|
}
|
|
678
672
|
}
|
|
@@ -690,7 +684,7 @@
|
|
|
690
684
|
"exampleResponse": {
|
|
691
685
|
"value": {
|
|
692
686
|
"name": "NotFoundError",
|
|
693
|
-
"message": "
|
|
687
|
+
"message": "errorMessage",
|
|
694
688
|
"properties": {
|
|
695
689
|
"notFoundId": "1"
|
|
696
690
|
}
|
|
@@ -711,7 +705,7 @@
|
|
|
711
705
|
"exampleResponse": {
|
|
712
706
|
"value": {
|
|
713
707
|
"name": "InternalServerError",
|
|
714
|
-
"message": "
|
|
708
|
+
"message": "errorMessage"
|
|
715
709
|
}
|
|
716
710
|
}
|
|
717
711
|
}
|
|
@@ -787,7 +781,7 @@
|
|
|
787
781
|
"@type": "DigitalDocument",
|
|
788
782
|
"name": "myfile.pdf"
|
|
789
783
|
},
|
|
790
|
-
"
|
|
784
|
+
"organizationIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
|
|
791
785
|
"userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
|
|
792
786
|
}
|
|
793
787
|
}
|
|
@@ -819,7 +813,7 @@
|
|
|
819
813
|
"@type": "DigitalDocument",
|
|
820
814
|
"name": "myfile.pdf"
|
|
821
815
|
},
|
|
822
|
-
"
|
|
816
|
+
"organizationIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363",
|
|
823
817
|
"userIdentity": "did:entity-storage:0x6363636363636363636363636363636363636363636363636363636363636363"
|
|
824
818
|
}
|
|
825
819
|
}
|
|
@@ -838,7 +832,7 @@
|
|
|
838
832
|
"exampleResponse": {
|
|
839
833
|
"value": {
|
|
840
834
|
"name": "GeneralError",
|
|
841
|
-
"message": "
|
|
835
|
+
"message": "errorMessage",
|
|
842
836
|
"properties": {
|
|
843
837
|
"foo": "bar"
|
|
844
838
|
}
|
|
@@ -859,7 +853,7 @@
|
|
|
859
853
|
"exampleResponse": {
|
|
860
854
|
"value": {
|
|
861
855
|
"name": "UnauthorizedError",
|
|
862
|
-
"message": "
|
|
856
|
+
"message": "errorMessage"
|
|
863
857
|
}
|
|
864
858
|
}
|
|
865
859
|
}
|
|
@@ -877,7 +871,7 @@
|
|
|
877
871
|
"exampleResponse": {
|
|
878
872
|
"value": {
|
|
879
873
|
"name": "NotFoundError",
|
|
880
|
-
"message": "
|
|
874
|
+
"message": "errorMessage",
|
|
881
875
|
"properties": {
|
|
882
876
|
"notFoundId": "1"
|
|
883
877
|
}
|
|
@@ -898,7 +892,7 @@
|
|
|
898
892
|
"exampleResponse": {
|
|
899
893
|
"value": {
|
|
900
894
|
"name": "InternalServerError",
|
|
901
|
-
"message": "
|
|
895
|
+
"message": "errorMessage"
|
|
902
896
|
}
|
|
903
897
|
}
|
|
904
898
|
}
|
|
@@ -957,7 +951,7 @@
|
|
|
957
951
|
"exampleResponse": {
|
|
958
952
|
"value": {
|
|
959
953
|
"name": "GeneralError",
|
|
960
|
-
"message": "
|
|
954
|
+
"message": "errorMessage",
|
|
961
955
|
"properties": {
|
|
962
956
|
"foo": "bar"
|
|
963
957
|
}
|
|
@@ -978,7 +972,7 @@
|
|
|
978
972
|
"exampleResponse": {
|
|
979
973
|
"value": {
|
|
980
974
|
"name": "UnauthorizedError",
|
|
981
|
-
"message": "
|
|
975
|
+
"message": "errorMessage"
|
|
982
976
|
}
|
|
983
977
|
}
|
|
984
978
|
}
|
|
@@ -996,7 +990,7 @@
|
|
|
996
990
|
"exampleResponse": {
|
|
997
991
|
"value": {
|
|
998
992
|
"name": "NotFoundError",
|
|
999
|
-
"message": "
|
|
993
|
+
"message": "errorMessage",
|
|
1000
994
|
"properties": {
|
|
1001
995
|
"notFoundId": "1"
|
|
1002
996
|
}
|
|
@@ -1017,7 +1011,7 @@
|
|
|
1017
1011
|
"exampleResponse": {
|
|
1018
1012
|
"value": {
|
|
1019
1013
|
"name": "InternalServerError",
|
|
1020
|
-
"message": "
|
|
1014
|
+
"message": "errorMessage"
|
|
1021
1015
|
}
|
|
1022
1016
|
}
|
|
1023
1017
|
}
|
|
@@ -1036,9 +1030,6 @@
|
|
|
1036
1030
|
"@context": {
|
|
1037
1031
|
"type": "array",
|
|
1038
1032
|
"minItems": 3,
|
|
1039
|
-
"items": {
|
|
1040
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
1041
|
-
},
|
|
1042
1033
|
"description": "JSON-LD Context.",
|
|
1043
1034
|
"prefixItems": [
|
|
1044
1035
|
{
|
|
@@ -1053,7 +1044,10 @@
|
|
|
1053
1044
|
"type": "string",
|
|
1054
1045
|
"const": "https://schema.org"
|
|
1055
1046
|
}
|
|
1056
|
-
]
|
|
1047
|
+
],
|
|
1048
|
+
"items": {
|
|
1049
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
1050
|
+
}
|
|
1057
1051
|
},
|
|
1058
1052
|
"type": {
|
|
1059
1053
|
"type": "string",
|
|
@@ -1115,9 +1109,9 @@
|
|
|
1115
1109
|
"type": "string",
|
|
1116
1110
|
"description": "The date/time of when the document was deleted, as we never actually remove items."
|
|
1117
1111
|
},
|
|
1118
|
-
"
|
|
1112
|
+
"organizationIdentity": {
|
|
1119
1113
|
"type": "string",
|
|
1120
|
-
"description": "The
|
|
1114
|
+
"description": "The organization which added the document to the graph."
|
|
1121
1115
|
},
|
|
1122
1116
|
"userIdentity": {
|
|
1123
1117
|
"type": "string",
|
|
@@ -1133,9 +1127,7 @@
|
|
|
1133
1127
|
"documentRevision",
|
|
1134
1128
|
"blobStorageId",
|
|
1135
1129
|
"blobHash",
|
|
1136
|
-
"dateCreated"
|
|
1137
|
-
"nodeIdentity",
|
|
1138
|
-
"userIdentity"
|
|
1130
|
+
"dateCreated"
|
|
1139
1131
|
],
|
|
1140
1132
|
"additionalProperties": false,
|
|
1141
1133
|
"description": "Interface describing a document."
|
|
@@ -1146,9 +1138,6 @@
|
|
|
1146
1138
|
"@context": {
|
|
1147
1139
|
"type": "array",
|
|
1148
1140
|
"minItems": 3,
|
|
1149
|
-
"items": {
|
|
1150
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
1151
|
-
},
|
|
1152
1141
|
"description": "JSON-LD Context.",
|
|
1153
1142
|
"prefixItems": [
|
|
1154
1143
|
{
|
|
@@ -1163,7 +1152,10 @@
|
|
|
1163
1152
|
"type": "string",
|
|
1164
1153
|
"const": "https://schema.twindev.org/common/"
|
|
1165
1154
|
}
|
|
1166
|
-
]
|
|
1155
|
+
],
|
|
1156
|
+
"items": {
|
|
1157
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
1158
|
+
}
|
|
1167
1159
|
},
|
|
1168
1160
|
"type": {
|
|
1169
1161
|
"type": "string",
|
|
@@ -1172,23 +1164,17 @@
|
|
|
1172
1164
|
},
|
|
1173
1165
|
"itemListElement": {
|
|
1174
1166
|
"type": "array",
|
|
1175
|
-
"items":
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
"$ref": "#/components/schemas/Document"
|
|
1180
|
-
}
|
|
1181
|
-
]
|
|
1167
|
+
"items": {
|
|
1168
|
+
"$ref": "#/components/schemas/Document"
|
|
1169
|
+
},
|
|
1170
|
+
"description": "The list of documents."
|
|
1182
1171
|
},
|
|
1183
1172
|
"edges": {
|
|
1184
1173
|
"type": "array",
|
|
1185
|
-
"items":
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
"type": "string"
|
|
1190
|
-
}
|
|
1191
|
-
]
|
|
1174
|
+
"items": {
|
|
1175
|
+
"type": "string"
|
|
1176
|
+
},
|
|
1177
|
+
"description": "The ids of the other vertices which are connected to the document."
|
|
1192
1178
|
},
|
|
1193
1179
|
"nextItem": {
|
|
1194
1180
|
"type": "string",
|
|
@@ -1226,28 +1212,25 @@
|
|
|
1226
1212
|
},
|
|
1227
1213
|
"auditableItemGraphEdges": {
|
|
1228
1214
|
"type": "array",
|
|
1229
|
-
"items":
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
"properties": {
|
|
1235
|
-
"targetId": {
|
|
1236
|
-
"type": "string"
|
|
1237
|
-
},
|
|
1238
|
-
"addAlias": {
|
|
1239
|
-
"type": "boolean"
|
|
1240
|
-
},
|
|
1241
|
-
"aliasAnnotationObject": {
|
|
1242
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
1243
|
-
}
|
|
1215
|
+
"items": {
|
|
1216
|
+
"type": "object",
|
|
1217
|
+
"properties": {
|
|
1218
|
+
"targetId": {
|
|
1219
|
+
"type": "string"
|
|
1244
1220
|
},
|
|
1245
|
-
"
|
|
1246
|
-
"
|
|
1247
|
-
|
|
1248
|
-
"
|
|
1249
|
-
|
|
1250
|
-
|
|
1221
|
+
"addAlias": {
|
|
1222
|
+
"type": "boolean"
|
|
1223
|
+
},
|
|
1224
|
+
"aliasAnnotationObject": {
|
|
1225
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
"required": [
|
|
1229
|
+
"targetId"
|
|
1230
|
+
],
|
|
1231
|
+
"additionalProperties": false
|
|
1232
|
+
},
|
|
1233
|
+
"description": "The auditable item graph vertices to connect the document to."
|
|
1251
1234
|
},
|
|
1252
1235
|
"createAttestation": {
|
|
1253
1236
|
"type": "boolean",
|
|
@@ -1281,28 +1264,25 @@
|
|
|
1281
1264
|
},
|
|
1282
1265
|
"auditableItemGraphEdges": {
|
|
1283
1266
|
"type": "array",
|
|
1284
|
-
"items":
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
"properties": {
|
|
1290
|
-
"targetId": {
|
|
1291
|
-
"type": "string"
|
|
1292
|
-
},
|
|
1293
|
-
"addAlias": {
|
|
1294
|
-
"type": "boolean"
|
|
1295
|
-
},
|
|
1296
|
-
"aliasAnnotationObject": {
|
|
1297
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
1298
|
-
}
|
|
1267
|
+
"items": {
|
|
1268
|
+
"type": "object",
|
|
1269
|
+
"properties": {
|
|
1270
|
+
"targetId": {
|
|
1271
|
+
"type": "string"
|
|
1299
1272
|
},
|
|
1300
|
-
"
|
|
1301
|
-
"
|
|
1302
|
-
|
|
1303
|
-
"
|
|
1304
|
-
|
|
1305
|
-
|
|
1273
|
+
"addAlias": {
|
|
1274
|
+
"type": "boolean"
|
|
1275
|
+
},
|
|
1276
|
+
"aliasAnnotationObject": {
|
|
1277
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
"required": [
|
|
1281
|
+
"targetId"
|
|
1282
|
+
],
|
|
1283
|
+
"additionalProperties": false
|
|
1284
|
+
},
|
|
1285
|
+
"description": "The auditable item graph vertices to connect the document to."
|
|
1306
1286
|
}
|
|
1307
1287
|
},
|
|
1308
1288
|
"additionalProperties": false,
|
|
@@ -30,19 +30,33 @@ The options for the service.
|
|
|
30
30
|
|
|
31
31
|
### CLASS\_NAME
|
|
32
32
|
|
|
33
|
-
> `readonly` **CLASS\_NAME**: `string`
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
35
35
|
Runtime name for the class.
|
|
36
36
|
|
|
37
|
+
## Methods
|
|
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
|
+
|
|
37
51
|
#### Implementation of
|
|
38
52
|
|
|
39
|
-
`IDocumentManagementComponent.
|
|
53
|
+
`IDocumentManagementComponent.className`
|
|
40
54
|
|
|
41
|
-
|
|
55
|
+
***
|
|
42
56
|
|
|
43
57
|
### create()
|
|
44
58
|
|
|
45
|
-
> **create**(`documentId`, `documentIdFormat`, `documentCode`, `blob`, `annotationObject?`, `auditableItemGraphEdges?`, `options
|
|
59
|
+
> **create**(`documentId`, `documentIdFormat`, `documentCode`, `blob`, `annotationObject?`, `auditableItemGraphEdges?`, `options?`): `Promise`\<`string`\>
|
|
46
60
|
|
|
47
61
|
Store a document as an auditable item graph vertex and add its content to blob storage.
|
|
48
62
|
If the document id already exists and the blob data is different a new revision will be created.
|
|
@@ -60,7 +74,7 @@ The document id to create.
|
|
|
60
74
|
|
|
61
75
|
The format of the document identifier.
|
|
62
76
|
|
|
63
|
-
`
|
|
77
|
+
`string` | `undefined`
|
|
64
78
|
|
|
65
79
|
##### documentCode
|
|
66
80
|
|
|
@@ -108,18 +122,6 @@ Flag to add the document id as an alias to the aig vertex, defaults to true.
|
|
|
108
122
|
|
|
109
123
|
Annotation object for the alias.
|
|
110
124
|
|
|
111
|
-
##### userIdentity?
|
|
112
|
-
|
|
113
|
-
`string`
|
|
114
|
-
|
|
115
|
-
The identity to perform the auditable item graph operation with.
|
|
116
|
-
|
|
117
|
-
##### nodeIdentity?
|
|
118
|
-
|
|
119
|
-
`string`
|
|
120
|
-
|
|
121
|
-
The node identity to use for vault operations.
|
|
122
|
-
|
|
123
125
|
#### Returns
|
|
124
126
|
|
|
125
127
|
`Promise`\<`string`\>
|
|
@@ -134,7 +136,7 @@ The auditable item graph vertex created for the document including its revision.
|
|
|
134
136
|
|
|
135
137
|
### update()
|
|
136
138
|
|
|
137
|
-
> **update**(`auditableItemGraphDocumentId`, `blob?`, `annotationObject?`, `auditableItemGraphEdges
|
|
139
|
+
> **update**(`auditableItemGraphDocumentId`, `blob?`, `annotationObject?`, `auditableItemGraphEdges?`): `Promise`\<`void`\>
|
|
138
140
|
|
|
139
141
|
Update a document as an auditable item graph vertex and add its content to blob storage.
|
|
140
142
|
If the blob data is different a new revision will be created.
|
|
@@ -166,18 +168,6 @@ Additional information to associate with the document.
|
|
|
166
168
|
|
|
167
169
|
The auditable item graph vertices to connect the document to, if undefined retains current connections.
|
|
168
170
|
|
|
169
|
-
##### userIdentity?
|
|
170
|
-
|
|
171
|
-
`string`
|
|
172
|
-
|
|
173
|
-
The identity to perform the auditable item graph operation with.
|
|
174
|
-
|
|
175
|
-
##### nodeIdentity?
|
|
176
|
-
|
|
177
|
-
`string`
|
|
178
|
-
|
|
179
|
-
The node identity to use for vault operations.
|
|
180
|
-
|
|
181
171
|
#### Returns
|
|
182
172
|
|
|
183
173
|
`Promise`\<`void`\>
|
|
@@ -192,7 +182,7 @@ Nothing.
|
|
|
192
182
|
|
|
193
183
|
### get()
|
|
194
184
|
|
|
195
|
-
> **get**(`auditableItemGraphDocumentId`, `options?`, `cursor?`, `
|
|
185
|
+
> **get**(`auditableItemGraphDocumentId`, `options?`, `cursor?`, `limit?`): `Promise`\<`IDocumentList`\>
|
|
196
186
|
|
|
197
187
|
Get a document using it's auditable item graph vertex id and optional revision.
|
|
198
188
|
|
|
@@ -250,23 +240,11 @@ By default extraction will auto detect the mime type of the document, this can b
|
|
|
250
240
|
|
|
251
241
|
The cursor to get the next chunk of revisions.
|
|
252
242
|
|
|
253
|
-
#####
|
|
243
|
+
##### limit?
|
|
254
244
|
|
|
255
245
|
`number`
|
|
256
246
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
##### userIdentity?
|
|
260
|
-
|
|
261
|
-
`string`
|
|
262
|
-
|
|
263
|
-
The identity to perform the auditable item graph operation with.
|
|
264
|
-
|
|
265
|
-
##### nodeIdentity?
|
|
266
|
-
|
|
267
|
-
`string`
|
|
268
|
-
|
|
269
|
-
The node identity to use for vault operations.
|
|
247
|
+
Limit the number of items to return, defaults to 1 so only most recent is returned.
|
|
270
248
|
|
|
271
249
|
#### Returns
|
|
272
250
|
|
|
@@ -282,7 +260,7 @@ The documents and revisions if requested, ordered by revision descending, cursor
|
|
|
282
260
|
|
|
283
261
|
### getRevision()
|
|
284
262
|
|
|
285
|
-
> **getRevision**(`auditableItemGraphDocumentId`, `revision`, `options
|
|
263
|
+
> **getRevision**(`auditableItemGraphDocumentId`, `revision`, `options?`): `Promise`\<`IDocument`\>
|
|
286
264
|
|
|
287
265
|
Get a document revision using it's auditable item graph vertex id.
|
|
288
266
|
|
|
@@ -334,18 +312,6 @@ If provided will extract data from the document using the specified rule group i
|
|
|
334
312
|
|
|
335
313
|
By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
336
314
|
|
|
337
|
-
##### userIdentity?
|
|
338
|
-
|
|
339
|
-
`string`
|
|
340
|
-
|
|
341
|
-
The identity to perform the auditable item graph operation with.
|
|
342
|
-
|
|
343
|
-
##### nodeIdentity?
|
|
344
|
-
|
|
345
|
-
`string`
|
|
346
|
-
|
|
347
|
-
The node identity to use for vault operations.
|
|
348
|
-
|
|
349
315
|
#### Returns
|
|
350
316
|
|
|
351
317
|
`Promise`\<`IDocument`\>
|
|
@@ -360,7 +326,7 @@ The documents and revisions if requested, ordered by revision descending, cursor
|
|
|
360
326
|
|
|
361
327
|
### removeRevision()
|
|
362
328
|
|
|
363
|
-
> **removeRevision**(`auditableItemGraphDocumentId`, `revision
|
|
329
|
+
> **removeRevision**(`auditableItemGraphDocumentId`, `revision`): `Promise`\<`void`\>
|
|
364
330
|
|
|
365
331
|
Remove an auditable item graph vertex using it's id.
|
|
366
332
|
The document dateDeleted will be set, but can still be queried with the includeRemoved flag.
|
|
@@ -379,18 +345,6 @@ The auditable item graph vertex id which contains the document.
|
|
|
379
345
|
|
|
380
346
|
The revision of the document to remove.
|
|
381
347
|
|
|
382
|
-
##### userIdentity?
|
|
383
|
-
|
|
384
|
-
`string`
|
|
385
|
-
|
|
386
|
-
The identity to perform the auditable item graph operation with.
|
|
387
|
-
|
|
388
|
-
##### nodeIdentity?
|
|
389
|
-
|
|
390
|
-
`string`
|
|
391
|
-
|
|
392
|
-
The node identity to use for vault operations.
|
|
393
|
-
|
|
394
348
|
#### Returns
|
|
395
349
|
|
|
396
350
|
`Promise`\<`void`\>
|
|
@@ -405,7 +359,7 @@ Nothing.
|
|
|
405
359
|
|
|
406
360
|
### query()
|
|
407
361
|
|
|
408
|
-
> **query**(`documentId`, `cursor?`, `
|
|
362
|
+
> **query**(`documentId`, `cursor?`, `limit?`): `Promise`\<`IAuditableItemGraphVertexList`\>
|
|
409
363
|
|
|
410
364
|
Find all the document with a specific id.
|
|
411
365
|
|
|
@@ -423,23 +377,11 @@ The document id to find in the graph.
|
|
|
423
377
|
|
|
424
378
|
The cursor to get the next chunk of documents.
|
|
425
379
|
|
|
426
|
-
#####
|
|
380
|
+
##### limit?
|
|
427
381
|
|
|
428
382
|
`number`
|
|
429
383
|
|
|
430
|
-
The
|
|
431
|
-
|
|
432
|
-
##### userIdentity?
|
|
433
|
-
|
|
434
|
-
`string`
|
|
435
|
-
|
|
436
|
-
The identity to perform the auditable item graph operation with.
|
|
437
|
-
|
|
438
|
-
##### nodeIdentity?
|
|
439
|
-
|
|
440
|
-
`string`
|
|
441
|
-
|
|
442
|
-
The node identity to use for vault operations.
|
|
384
|
+
The limit to get the next chunk of documents.
|
|
443
385
|
|
|
444
386
|
#### Returns
|
|
445
387
|
|
package/locales/en.json
CHANGED
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
"updateFailed": "Failed to update document",
|
|
6
6
|
"getFailed": "Failed to get document",
|
|
7
7
|
"getRevisionFailed": "Failed to get document revision",
|
|
8
|
-
"removeRevision": "Failed to remove document revision",
|
|
9
8
|
"queryFailed": "Failed to query document",
|
|
10
9
|
"documentRevisionNone": "There are no revisions in the document",
|
|
11
10
|
"documentRevisionNotFound": "There is no revision number \"{notFoundId}\" in the document",
|
|
12
|
-
"
|
|
11
|
+
"removeRevisionFailed": "Failed to remove document revision"
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
}
|