gbc-kyc-kit 3.0.12 → 3.0.14
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 +38 -42
- package/dist/gbc-kyc-kit.umd.js +51 -51
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/gbc-kyc-kit.es.js
CHANGED
|
@@ -18129,32 +18129,28 @@ Q.loading = (t2, e2) => H(t2, S("default", { isLoading: true, autoClose: false,
|
|
|
18129
18129
|
B.delete(t2.containerId || t2), 0 === B.size && v$1.off(0).off(1).off(5);
|
|
18130
18130
|
});
|
|
18131
18131
|
function ErrorHandler(error) {
|
|
18132
|
-
var _a
|
|
18132
|
+
var _a;
|
|
18133
18133
|
let message = "Error interno de la App, consultar con soporte.";
|
|
18134
18134
|
const {
|
|
18135
18135
|
code
|
|
18136
|
-
} =
|
|
18137
|
-
code: "400"
|
|
18138
|
-
};
|
|
18136
|
+
} = error == null ? void 0 : error.response.data;
|
|
18139
18137
|
const {
|
|
18140
18138
|
status
|
|
18141
|
-
} = (
|
|
18142
|
-
status: "Error desconocido"
|
|
18143
|
-
};
|
|
18139
|
+
} = (_a = error.response) == null ? void 0 : _a.status;
|
|
18144
18140
|
if (code === "A1050") {
|
|
18145
|
-
console.log(error
|
|
18141
|
+
console.log(error.response.data.message);
|
|
18146
18142
|
message = "No se pudo procesar la consulta, por favor contacte con soporte.";
|
|
18147
18143
|
} else if (code === 22007) {
|
|
18148
|
-
console.log(error
|
|
18144
|
+
console.log(error.response.data.message);
|
|
18149
18145
|
message = "Documento no reconocido";
|
|
18150
18146
|
} else if (code === 504) {
|
|
18151
|
-
console.log(error
|
|
18147
|
+
console.log(error.response.data.message);
|
|
18152
18148
|
message = "M\xE1ximo de consultas, por favor contacte con soporte.";
|
|
18153
18149
|
} else if (code === "020") {
|
|
18154
|
-
console.log(error
|
|
18155
|
-
message = error
|
|
18150
|
+
console.log(error.response.data.message);
|
|
18151
|
+
message = error.response.data.message;
|
|
18156
18152
|
} else if (status === "429") {
|
|
18157
|
-
console.log(error
|
|
18153
|
+
console.log(error.response.data);
|
|
18158
18154
|
}
|
|
18159
18155
|
console.log(code, "code", message, "message");
|
|
18160
18156
|
Q.error(message, {
|
|
@@ -18265,6 +18261,7 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
|
|
|
18265
18261
|
const [csvFile, setCsvFile] = useState(null);
|
|
18266
18262
|
const fileInputRef = useRef(null);
|
|
18267
18263
|
const [batchData, setBatchData] = useState({});
|
|
18264
|
+
console.log(inProduction);
|
|
18268
18265
|
useEffect(() => {
|
|
18269
18266
|
var _a;
|
|
18270
18267
|
if (countryCodeAllowed && (geolocation == null ? void 0 : geolocation.data_connection.isocode)) {
|
|
@@ -18317,8 +18314,9 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
|
|
|
18317
18314
|
birth_date: ""
|
|
18318
18315
|
}
|
|
18319
18316
|
});
|
|
18317
|
+
console.log(errorsDoc);
|
|
18320
18318
|
const onSendSubmitDocument = async (data2) => {
|
|
18321
|
-
var _a, _b
|
|
18319
|
+
var _a, _b;
|
|
18322
18320
|
const {
|
|
18323
18321
|
first_name,
|
|
18324
18322
|
second_name,
|
|
@@ -18331,7 +18329,8 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
|
|
|
18331
18329
|
const res = await authorize();
|
|
18332
18330
|
const customHeaders = {
|
|
18333
18331
|
client_id: clientId,
|
|
18334
|
-
access_token: res
|
|
18332
|
+
access_token: res,
|
|
18333
|
+
Authorization: "Bearer WGpKbGFSNlJXV29hVnFqVjlIbA=="
|
|
18335
18334
|
};
|
|
18336
18335
|
const parseReq = {
|
|
18337
18336
|
method: "POST",
|
|
@@ -18402,7 +18401,7 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
|
|
|
18402
18401
|
clientId,
|
|
18403
18402
|
geolocation
|
|
18404
18403
|
});
|
|
18405
|
-
if (
|
|
18404
|
+
if (error.response.data.message) {
|
|
18406
18405
|
message2 = error.response.data;
|
|
18407
18406
|
} else if (status2 === 500) {
|
|
18408
18407
|
message2 = "Error de consulta - Verificar con el proveedor";
|
|
@@ -18422,7 +18421,6 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
|
|
|
18422
18421
|
handleSubmit: handleSubmitCsv
|
|
18423
18422
|
} = useForm();
|
|
18424
18423
|
const onSubmitCsv = async () => {
|
|
18425
|
-
var _a;
|
|
18426
18424
|
setIsLoading(true);
|
|
18427
18425
|
try {
|
|
18428
18426
|
const res = await authorize();
|
|
@@ -18479,10 +18477,7 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
|
|
|
18479
18477
|
const {
|
|
18480
18478
|
status: status2,
|
|
18481
18479
|
data: data2
|
|
18482
|
-
} =
|
|
18483
|
-
status: "Error desconocido",
|
|
18484
|
-
data: {}
|
|
18485
|
-
};
|
|
18480
|
+
} = error.response;
|
|
18486
18481
|
await saveDataToDB({
|
|
18487
18482
|
data: {
|
|
18488
18483
|
csvFile,
|
|
@@ -39424,7 +39419,7 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39424
39419
|
handleSubmit: simpleHandleSubmit
|
|
39425
39420
|
} = useForm();
|
|
39426
39421
|
const onSendSubmitDocument = async () => {
|
|
39427
|
-
var _a
|
|
39422
|
+
var _a;
|
|
39428
39423
|
setIsLoading(true);
|
|
39429
39424
|
try {
|
|
39430
39425
|
const res = await authorize();
|
|
@@ -39434,11 +39429,10 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39434
39429
|
};
|
|
39435
39430
|
const parseReq = {
|
|
39436
39431
|
method: "POST",
|
|
39437
|
-
path: "api/v1/
|
|
39432
|
+
path: "api/v1/kyc-kit/document/recognition",
|
|
39438
39433
|
inProduction,
|
|
39439
39434
|
customHeaders,
|
|
39440
|
-
bodyParams: base64
|
|
39441
|
-
service: "services"
|
|
39435
|
+
bodyParams: base64
|
|
39442
39436
|
};
|
|
39443
39437
|
try {
|
|
39444
39438
|
const res2 = await request2(parseReq);
|
|
@@ -39469,9 +39463,7 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39469
39463
|
let message2 = "";
|
|
39470
39464
|
const {
|
|
39471
39465
|
status: status2
|
|
39472
|
-
} =
|
|
39473
|
-
status: "Error desconocido"
|
|
39474
|
-
};
|
|
39466
|
+
} = error.response;
|
|
39475
39467
|
const data2 = await saveDataToDB({
|
|
39476
39468
|
data: {
|
|
39477
39469
|
first_image: base64.firstImage,
|
|
@@ -39489,9 +39481,9 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39489
39481
|
...error,
|
|
39490
39482
|
countAttempts: data2.count_try
|
|
39491
39483
|
});
|
|
39492
|
-
if (
|
|
39484
|
+
if (error.response.data.code === "020" && data2.count_try > 3)
|
|
39493
39485
|
setUploadDocumentByPhone(true);
|
|
39494
|
-
if ((
|
|
39486
|
+
if ((_a = error.response.data) == null ? void 0 : _a.message) {
|
|
39495
39487
|
message2 = error.response.data.message;
|
|
39496
39488
|
} else if (status2 === 500) {
|
|
39497
39489
|
message2 = {
|
|
@@ -39988,8 +39980,11 @@ function SideDocsSelector({
|
|
|
39988
39980
|
return;
|
|
39989
39981
|
const [track] = streamRef.current.getVideoTracks();
|
|
39990
39982
|
const capabilities = (_a = track.getCapabilities) == null ? void 0 : _a.call(track);
|
|
39991
|
-
(_b = track.getSettings) == null ? void 0 : _b.call(track);
|
|
39983
|
+
const settings = (_b = track.getSettings) == null ? void 0 : _b.call(track);
|
|
39984
|
+
console.log("focus capabilities:", capabilities);
|
|
39985
|
+
console.log("focus settings:", settings);
|
|
39992
39986
|
if (!capabilities || !capabilities.focusMode) {
|
|
39987
|
+
console.warn("No se puede acceder a las capacidades de enfoque");
|
|
39993
39988
|
return;
|
|
39994
39989
|
}
|
|
39995
39990
|
try {
|
|
@@ -40049,6 +40044,7 @@ function SideDocsSelector({
|
|
|
40049
40044
|
const handleSwitchCamera = () => {
|
|
40050
40045
|
setCurrentCameraIndex((prevIndex) => (prevIndex + 1) % cameras.length);
|
|
40051
40046
|
};
|
|
40047
|
+
console.log("Activate Camera: ", activateCamera, "Distinto de HideCapture Button: ", !hideCaptureButton, "Distinto de Upload document By Phone: ", !uploadDocumentByPhone, "Cantidad de cameras: ", cameras.length);
|
|
40052
40048
|
return /* @__PURE__ */ jsxs(Box$1, {
|
|
40053
40049
|
sx: {
|
|
40054
40050
|
width: "100%"
|
|
@@ -40748,6 +40744,8 @@ function DocumentReader({
|
|
|
40748
40744
|
uploadDocumentByPhone,
|
|
40749
40745
|
setUploadDocumentByPhone
|
|
40750
40746
|
} = DocumentReaderController(dataDocument, clientId, authorize, eventId, source2, inProduction, countryCodeAllowed, validateVpn, successMessage, dualModeRequired);
|
|
40747
|
+
console.log(isLoading, countryCodeAllowed, countryCode);
|
|
40748
|
+
console.log(isLoading, countryCodeAllowed !== null, !countryCode);
|
|
40751
40749
|
return /* @__PURE__ */ jsxs("div", {
|
|
40752
40750
|
className: `kit-gbc ${mode} without-shadow ocr`,
|
|
40753
40751
|
children: [/* @__PURE__ */ jsx$1(k$2, {
|
|
@@ -40878,13 +40876,14 @@ const FaceMatchController = (dataFaceMatch, clientId, eventId, source2, authoriz
|
|
|
40878
40876
|
handleSubmit: simpleHandleSubmit
|
|
40879
40877
|
} = useForm();
|
|
40880
40878
|
const onSendSubmitSelfie = async () => {
|
|
40881
|
-
var _a, _b
|
|
40879
|
+
var _a, _b;
|
|
40882
40880
|
setIsLoading(true);
|
|
40883
40881
|
try {
|
|
40884
40882
|
const res = await authorize();
|
|
40885
40883
|
const customHeaders = {
|
|
40886
40884
|
client_id: clientId,
|
|
40887
|
-
access_token: res
|
|
40885
|
+
access_token: res,
|
|
40886
|
+
Authorization: "Bearer WGpKbGFSNlJXV29hVnFqVjlIbA=="
|
|
40888
40887
|
};
|
|
40889
40888
|
try {
|
|
40890
40889
|
const res2 = await fetchFaceMatch(picBase64, url, inProduction, customHeaders);
|
|
@@ -40912,14 +40911,12 @@ const FaceMatchController = (dataFaceMatch, clientId, eventId, source2, authoriz
|
|
|
40912
40911
|
let message2 = "";
|
|
40913
40912
|
const {
|
|
40914
40913
|
status: status2
|
|
40915
|
-
} =
|
|
40916
|
-
status: "Error desconocido"
|
|
40917
|
-
};
|
|
40914
|
+
} = error.response;
|
|
40918
40915
|
await saveDataToDB({
|
|
40919
40916
|
data: {
|
|
40920
40917
|
first_image: url,
|
|
40921
40918
|
second_image: picBase64,
|
|
40922
|
-
similarity: ((
|
|
40919
|
+
similarity: ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.similarity) ? res.data.similarity : null,
|
|
40923
40920
|
status_code: status2
|
|
40924
40921
|
},
|
|
40925
40922
|
component: "facematch",
|
|
@@ -40929,7 +40926,7 @@ const FaceMatchController = (dataFaceMatch, clientId, eventId, source2, authoriz
|
|
|
40929
40926
|
clientId,
|
|
40930
40927
|
geolocation
|
|
40931
40928
|
});
|
|
40932
|
-
if ((
|
|
40929
|
+
if ((_b = error.response.data) == null ? void 0 : _b.message) {
|
|
40933
40930
|
message2 = error.response.data.message;
|
|
40934
40931
|
} else if (status2 === 500) {
|
|
40935
40932
|
message2 = {
|
|
@@ -41191,12 +41188,13 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
41191
41188
|
setIsLoading(false);
|
|
41192
41189
|
};
|
|
41193
41190
|
useEffect(() => {
|
|
41191
|
+
console.log(data2, "dataaaaa");
|
|
41194
41192
|
if (!lib$1(data2)) {
|
|
41193
|
+
console.log(data2);
|
|
41195
41194
|
onSendSubmitLiveness();
|
|
41196
41195
|
}
|
|
41197
41196
|
}, [data2]);
|
|
41198
41197
|
const onSendSubmitLiveness = async () => {
|
|
41199
|
-
var _a;
|
|
41200
41198
|
try {
|
|
41201
41199
|
const customHeaders = {
|
|
41202
41200
|
client_id: clientId,
|
|
@@ -41225,9 +41223,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
41225
41223
|
let message2 = "";
|
|
41226
41224
|
const {
|
|
41227
41225
|
status: status2
|
|
41228
|
-
} =
|
|
41229
|
-
status: "Error desconocido"
|
|
41230
|
-
};
|
|
41226
|
+
} = error.response;
|
|
41231
41227
|
saveDataToDB({
|
|
41232
41228
|
data: {
|
|
41233
41229
|
similarity: 0,
|