@riocrypto/common-server 1.0.2854 → 1.0.2855
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import mongoose, { HydratedDocument } from "mongoose";
|
|
2
|
-
import { ComplianceSessionStatus } from "@riocrypto/common";
|
|
2
|
+
import { ComplianceFailedDocument, ComplianceSessionStatus } from "@riocrypto/common";
|
|
3
3
|
interface ComplianceSessionAttrs {
|
|
4
4
|
id: string;
|
|
5
5
|
userId: string;
|
|
@@ -13,6 +13,7 @@ interface ComplianceSessionAttrs {
|
|
|
13
13
|
startedByName?: string;
|
|
14
14
|
ruleSetId?: string;
|
|
15
15
|
ruleSetName?: string;
|
|
16
|
+
failedDocuments?: ComplianceFailedDocument[];
|
|
16
17
|
}
|
|
17
18
|
interface ComplianceSessionDoc extends mongoose.Document {
|
|
18
19
|
id: string;
|
|
@@ -27,6 +28,7 @@ interface ComplianceSessionDoc extends mongoose.Document {
|
|
|
27
28
|
startedByName?: string;
|
|
28
29
|
ruleSetId?: string;
|
|
29
30
|
ruleSetName?: string;
|
|
31
|
+
failedDocuments?: ComplianceFailedDocument[];
|
|
30
32
|
}
|
|
31
33
|
interface ComplianceSessionModel extends mongoose.Model<ComplianceSessionDoc> {
|
|
32
34
|
build(attrs: ComplianceSessionAttrs): HydratedDocument<ComplianceSessionDoc>;
|
|
@@ -59,6 +59,21 @@ const buildComplianceSession = (mongoose) => {
|
|
|
59
59
|
type: String,
|
|
60
60
|
required: false,
|
|
61
61
|
},
|
|
62
|
+
// Documents that could not be OCR'd / parsed during
|
|
63
|
+
// pre-processing (e.g. password-protected PDFs). Optional so
|
|
64
|
+
// older session documents still load. Defaults to an empty
|
|
65
|
+
// array so consumers can treat it as always-present.
|
|
66
|
+
failedDocuments: {
|
|
67
|
+
type: [
|
|
68
|
+
{
|
|
69
|
+
_id: false,
|
|
70
|
+
fileName: { type: String, required: true },
|
|
71
|
+
reason: { type: String, required: true },
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
required: false,
|
|
75
|
+
default: [],
|
|
76
|
+
},
|
|
62
77
|
}, {
|
|
63
78
|
toJSON: {
|
|
64
79
|
transform(doc, ret) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2855",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/secret-manager": "^5.6.0",
|
|
29
29
|
"@google-cloud/storage": "^7.19.0",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.10.3",
|
|
31
|
-
"@riocrypto/common": "1.0.
|
|
31
|
+
"@riocrypto/common": "1.0.2656",
|
|
32
32
|
"@slack/web-api": "^7.15.0",
|
|
33
33
|
"@types/express": "^4.17.25",
|
|
34
34
|
"axios": "1.16.0",
|