gbc-kyc-kit 3.4.8 → 3.4.9
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/gbc-kyc-kit.es.js +42 -40
- package/dist/gbc-kyc-kit.umd.js +35 -35
- package/package.json +2 -2
package/dist/gbc-kyc-kit.es.js
CHANGED
|
@@ -38766,8 +38766,8 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
38766
38766
|
};
|
|
38767
38767
|
const data2 = await saveDataToDB({
|
|
38768
38768
|
data: {
|
|
38769
|
-
first_image: base64.firstImage,
|
|
38770
|
-
second_image:
|
|
38769
|
+
first_image: (base64 == null ? void 0 : base64.firstImage) || "",
|
|
38770
|
+
second_image: (base64 == null ? void 0 : base64.secondImage) || "",
|
|
38771
38771
|
status_code: status2
|
|
38772
38772
|
},
|
|
38773
38773
|
component: "ocr",
|
|
@@ -42669,7 +42669,7 @@ const V2OcrComponent = ({
|
|
|
42669
42669
|
});
|
|
42670
42670
|
};
|
|
42671
42671
|
const name = "gbc-kyc-kit";
|
|
42672
|
-
const version = "3.4.
|
|
42672
|
+
const version = "3.4.9";
|
|
42673
42673
|
const description = "Componentes para el desarrollo de un Onboarding";
|
|
42674
42674
|
const license = "MIT";
|
|
42675
42675
|
const author = "Global Bridge Connections";
|
|
@@ -42740,7 +42740,7 @@ const dependencies = {
|
|
|
42740
42740
|
"comma-separated-values": "^3.6.4",
|
|
42741
42741
|
eslint: "^8.18.0",
|
|
42742
42742
|
"eslint-plugin-react": "^7.30.1",
|
|
42743
|
-
"gbc-kyc-kit": "^3.4.
|
|
42743
|
+
"gbc-kyc-kit": "^3.4.8",
|
|
42744
42744
|
"image-compressor.js": "^1.1.4",
|
|
42745
42745
|
"image-js": "^0.37.0",
|
|
42746
42746
|
"is-empty": "^1.2.0",
|
|
@@ -44944,6 +44944,7 @@ const LivenessController = (dataLiveness, clientId, authorize, eventId, source2,
|
|
|
44944
44944
|
async function getDataLiveness(sessionId, inProduction2, clientId2, dataLiveness2, facematch) {
|
|
44945
44945
|
var _a, _b, _c;
|
|
44946
44946
|
const accessToken2 = await authorize();
|
|
44947
|
+
let selfie = null;
|
|
44947
44948
|
const customHeaders = {
|
|
44948
44949
|
client_id: clientId2,
|
|
44949
44950
|
access_token: accessToken2
|
|
@@ -44952,10 +44953,46 @@ const LivenessController = (dataLiveness, clientId, authorize, eventId, source2,
|
|
|
44952
44953
|
try {
|
|
44953
44954
|
const data22 = await getDataLivenessService(sessionId, inProduction2, clientId2, accessToken2);
|
|
44954
44955
|
livenessImage = (_c = (_b = (_a = data22.liveness_checks) == null ? void 0 : _a[0]) == null ? void 0 : _b.reference_image) != null ? _c : null;
|
|
44956
|
+
if (facematch && livenessImage) {
|
|
44957
|
+
try {
|
|
44958
|
+
const dataFaceMatch = await fetchFaceMatch(facematch, livenessImage, inProduction2, customHeaders);
|
|
44959
|
+
selfie = dataFaceMatch.similarity.toFixed(2);
|
|
44960
|
+
await saveDataToDB({
|
|
44961
|
+
data: {
|
|
44962
|
+
first_image: facematch,
|
|
44963
|
+
second_image: livenessImage,
|
|
44964
|
+
similarity: selfie,
|
|
44965
|
+
status_code: 200
|
|
44966
|
+
},
|
|
44967
|
+
component: "facematch",
|
|
44968
|
+
eventId,
|
|
44969
|
+
source: source2,
|
|
44970
|
+
inProduction: inProduction2,
|
|
44971
|
+
clientId: clientId2,
|
|
44972
|
+
geolocation
|
|
44973
|
+
});
|
|
44974
|
+
} catch (error2) {
|
|
44975
|
+
console.log(error2);
|
|
44976
|
+
await saveDataToDB({
|
|
44977
|
+
data: {
|
|
44978
|
+
first_image: facematch,
|
|
44979
|
+
second_image: livenessImage,
|
|
44980
|
+
similarity: 0,
|
|
44981
|
+
status_code: 500
|
|
44982
|
+
},
|
|
44983
|
+
component: "facematch",
|
|
44984
|
+
eventId,
|
|
44985
|
+
source: source2,
|
|
44986
|
+
inProduction: inProduction2,
|
|
44987
|
+
clientId: clientId2,
|
|
44988
|
+
geolocation
|
|
44989
|
+
});
|
|
44990
|
+
}
|
|
44991
|
+
}
|
|
44955
44992
|
const livenessRes = await saveDataToDB({
|
|
44956
44993
|
data: {
|
|
44957
44994
|
selfie: livenessImage,
|
|
44958
|
-
similarity:
|
|
44995
|
+
similarity: selfie,
|
|
44959
44996
|
face_result_code: livenessImage ? 0 : 500
|
|
44960
44997
|
},
|
|
44961
44998
|
component: "liveness",
|
|
@@ -44984,41 +45021,6 @@ const LivenessController = (dataLiveness, clientId, authorize, eventId, source2,
|
|
|
44984
45021
|
dataLiveness2(livenessRes);
|
|
44985
45022
|
return;
|
|
44986
45023
|
}
|
|
44987
|
-
if (facematch && livenessImage) {
|
|
44988
|
-
try {
|
|
44989
|
-
const dataFaceMatch = await fetchFaceMatch(facematch, livenessImage, inProduction2, customHeaders);
|
|
44990
|
-
await saveDataToDB({
|
|
44991
|
-
data: {
|
|
44992
|
-
first_image: facematch,
|
|
44993
|
-
second_image: livenessImage,
|
|
44994
|
-
similarity: dataFaceMatch.similarity.toFixed(2),
|
|
44995
|
-
status_code: 200
|
|
44996
|
-
},
|
|
44997
|
-
component: "facematch",
|
|
44998
|
-
eventId,
|
|
44999
|
-
source: source2,
|
|
45000
|
-
inProduction: inProduction2,
|
|
45001
|
-
clientId: clientId2,
|
|
45002
|
-
geolocation
|
|
45003
|
-
});
|
|
45004
|
-
} catch (error2) {
|
|
45005
|
-
console.log(error2);
|
|
45006
|
-
await saveDataToDB({
|
|
45007
|
-
data: {
|
|
45008
|
-
first_image: facematch,
|
|
45009
|
-
second_image: livenessImage,
|
|
45010
|
-
similarity: 0,
|
|
45011
|
-
status_code: 500
|
|
45012
|
-
},
|
|
45013
|
-
component: "facematch",
|
|
45014
|
-
eventId,
|
|
45015
|
-
source: source2,
|
|
45016
|
-
inProduction: inProduction2,
|
|
45017
|
-
clientId: clientId2,
|
|
45018
|
-
geolocation
|
|
45019
|
-
});
|
|
45020
|
-
}
|
|
45021
|
-
}
|
|
45022
45024
|
}
|
|
45023
45025
|
return {
|
|
45024
45026
|
status,
|