@raytio/decrypt-helper 6.3.3 → 6.3.4
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.
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
let verifiersPromise;
|
|
11
11
|
export function resolveVerificationDetails([details], envConfig) {
|
|
12
|
-
var _a, _b, _c
|
|
12
|
+
var _a, _b, _c;
|
|
13
13
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14
14
|
if (!details)
|
|
15
15
|
return undefined;
|
|
@@ -21,7 +21,7 @@ export function resolveVerificationDetails([details], envConfig) {
|
|
|
21
21
|
verifier_id: (_a = verifiers[details.verifierNId]) === null || _a === void 0 ? void 0 : _a.name,
|
|
22
22
|
verifier_service_id: (_b = verifiers[details.serviceProviderNId]) === null || _b === void 0 ? void 0 : _b.name,
|
|
23
23
|
verifier_source_id: (_c = verifiers[details.dataSourceNId]) === null || _c === void 0 ? void 0 : _c.name,
|
|
24
|
-
date:
|
|
24
|
+
date: details.date ? new Date(details.date).toISOString() : undefined,
|
|
25
25
|
};
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -26,6 +26,7 @@ const byPriority = (schema) => ([a], [b]) => {
|
|
|
26
26
|
};
|
|
27
27
|
export function formatOutput(profileObjects, allSchemas, realVers, apiToken, envConfig) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const locale = process.env.PDF_LANGUAGE || process.env.DATE_FORMAT || "en-NZ";
|
|
29
30
|
const PODetails = profileObjects.reduce((accumulatorPromiseOuter, PO) => __awaiter(this, void 0, void 0, function* () {
|
|
30
31
|
var _a;
|
|
31
32
|
const accumulatorOuter = yield accumulatorPromiseOuter;
|
|
@@ -39,14 +40,15 @@ export function formatOutput(profileObjects, allSchemas, realVers, apiToken, env
|
|
|
39
40
|
const existing = accumulatorOuter[schemaName] || [];
|
|
40
41
|
const poProperties = Object.entries(realProperties).sort(byPriority(schema));
|
|
41
42
|
const reducedProperties = yield poProperties.reduce((accumulatorPromiseInner, [key, value]) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
var _b, _c;
|
|
43
|
+
var _b, _c, _d;
|
|
43
44
|
const accumulatorInner = yield accumulatorPromiseInner;
|
|
44
45
|
assertSafeProperty(key);
|
|
45
46
|
const prettyValue = typeof value === "string"
|
|
46
47
|
? yield maybeGetLookupValue(schema, key, value, apiToken)
|
|
47
48
|
: undefined;
|
|
49
|
+
const schemaField = Object.values(schema.properties || {}).find((f) => f.$prop.split(" <=> ")[0] === (key === null || key === void 0 ? void 0 : key.split(" <=> ")[0]));
|
|
48
50
|
const POInfo = {
|
|
49
|
-
title: ((_c = (_b = schema.
|
|
51
|
+
title: ((_d = (_c = (_b = schema === null || schema === void 0 ? void 0 : schema.i18n) === null || _b === void 0 ? void 0 : _b[locale]) === null || _c === void 0 ? void 0 : _c[key]) === null || _d === void 0 ? void 0 : _d.title) || (schemaField === null || schemaField === void 0 ? void 0 : schemaField.title) || key,
|
|
50
52
|
value,
|
|
51
53
|
verification: versionDetails.fieldVerifications[key] ||
|
|
52
54
|
FieldVerification.NotVerified,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raytio/decrypt-helper",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.4",
|
|
4
4
|
"author": "Raytio",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A helper to decrypt data shared by Raytio users",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@aws-amplify/auth": "3.4.25",
|
|
26
|
-
"@raytio/core": "^11.
|
|
26
|
+
"@raytio/core": "^11.4.1",
|
|
27
27
|
"@raytio/maxcryptor": "^3.1.0",
|
|
28
28
|
"@raytio/types": "^7.3.0",
|
|
29
29
|
"aws-sdk": "^2.754.0",
|