gbc-kyc-kit 3.0.13 → 3.0.15
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 +41 -44
- package/dist/gbc-kyc-kit.umd.js +52 -52
- 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();
|
|
@@ -18476,14 +18474,10 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
|
|
|
18476
18474
|
});
|
|
18477
18475
|
} catch (error) {
|
|
18478
18476
|
let message2 = "Error interno de la aplicai\xF3n";
|
|
18479
|
-
console.log(error);
|
|
18480
18477
|
const {
|
|
18481
18478
|
status: status2,
|
|
18482
18479
|
data: data2
|
|
18483
|
-
} =
|
|
18484
|
-
status: "Error desconocido",
|
|
18485
|
-
data: {}
|
|
18486
|
-
};
|
|
18480
|
+
} = error.response;
|
|
18487
18481
|
await saveDataToDB({
|
|
18488
18482
|
data: {
|
|
18489
18483
|
csvFile,
|
|
@@ -39425,7 +39419,7 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39425
39419
|
handleSubmit: simpleHandleSubmit
|
|
39426
39420
|
} = useForm();
|
|
39427
39421
|
const onSendSubmitDocument = async () => {
|
|
39428
|
-
var _a
|
|
39422
|
+
var _a;
|
|
39429
39423
|
setIsLoading(true);
|
|
39430
39424
|
try {
|
|
39431
39425
|
const res = await authorize();
|
|
@@ -39435,11 +39429,10 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39435
39429
|
};
|
|
39436
39430
|
const parseReq = {
|
|
39437
39431
|
method: "POST",
|
|
39438
|
-
path: "api/v1/
|
|
39432
|
+
path: "api/v1/kyc-kit/document/recognition",
|
|
39439
39433
|
inProduction,
|
|
39440
39434
|
customHeaders,
|
|
39441
|
-
bodyParams: base64
|
|
39442
|
-
service: "services"
|
|
39435
|
+
bodyParams: base64
|
|
39443
39436
|
};
|
|
39444
39437
|
try {
|
|
39445
39438
|
const res2 = await request2(parseReq);
|
|
@@ -39470,9 +39463,7 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39470
39463
|
let message2 = "";
|
|
39471
39464
|
const {
|
|
39472
39465
|
status: status2
|
|
39473
|
-
} =
|
|
39474
|
-
status: "Error desconocido"
|
|
39475
|
-
};
|
|
39466
|
+
} = error.response;
|
|
39476
39467
|
const data2 = await saveDataToDB({
|
|
39477
39468
|
data: {
|
|
39478
39469
|
first_image: base64.firstImage,
|
|
@@ -39490,9 +39481,9 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39490
39481
|
...error,
|
|
39491
39482
|
countAttempts: data2.count_try
|
|
39492
39483
|
});
|
|
39493
|
-
if (
|
|
39484
|
+
if (error.response.data.code === "020" && data2.count_try > 3)
|
|
39494
39485
|
setUploadDocumentByPhone(true);
|
|
39495
|
-
if ((
|
|
39486
|
+
if ((_a = error.response.data) == null ? void 0 : _a.message) {
|
|
39496
39487
|
message2 = error.response.data.message;
|
|
39497
39488
|
} else if (status2 === 500) {
|
|
39498
39489
|
message2 = {
|
|
@@ -39989,8 +39980,11 @@ function SideDocsSelector({
|
|
|
39989
39980
|
return;
|
|
39990
39981
|
const [track] = streamRef.current.getVideoTracks();
|
|
39991
39982
|
const capabilities = (_a = track.getCapabilities) == null ? void 0 : _a.call(track);
|
|
39992
|
-
(_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);
|
|
39993
39986
|
if (!capabilities || !capabilities.focusMode) {
|
|
39987
|
+
console.warn("No se puede acceder a las capacidades de enfoque");
|
|
39994
39988
|
return;
|
|
39995
39989
|
}
|
|
39996
39990
|
try {
|
|
@@ -40050,6 +40044,7 @@ function SideDocsSelector({
|
|
|
40050
40044
|
const handleSwitchCamera = () => {
|
|
40051
40045
|
setCurrentCameraIndex((prevIndex) => (prevIndex + 1) % cameras.length);
|
|
40052
40046
|
};
|
|
40047
|
+
console.log("Activate Camera: ", activateCamera, "Distinto de HideCapture Button: ", !hideCaptureButton, "Distinto de Upload document By Phone: ", !uploadDocumentByPhone, "Cantidad de cameras: ", cameras.length);
|
|
40053
40048
|
return /* @__PURE__ */ jsxs(Box$1, {
|
|
40054
40049
|
sx: {
|
|
40055
40050
|
width: "100%"
|
|
@@ -40749,6 +40744,8 @@ function DocumentReader({
|
|
|
40749
40744
|
uploadDocumentByPhone,
|
|
40750
40745
|
setUploadDocumentByPhone
|
|
40751
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);
|
|
40752
40749
|
return /* @__PURE__ */ jsxs("div", {
|
|
40753
40750
|
className: `kit-gbc ${mode} without-shadow ocr`,
|
|
40754
40751
|
children: [/* @__PURE__ */ jsx$1(k$2, {
|
|
@@ -40879,13 +40876,14 @@ const FaceMatchController = (dataFaceMatch, clientId, eventId, source2, authoriz
|
|
|
40879
40876
|
handleSubmit: simpleHandleSubmit
|
|
40880
40877
|
} = useForm();
|
|
40881
40878
|
const onSendSubmitSelfie = async () => {
|
|
40882
|
-
var _a, _b
|
|
40879
|
+
var _a, _b;
|
|
40883
40880
|
setIsLoading(true);
|
|
40884
40881
|
try {
|
|
40885
40882
|
const res = await authorize();
|
|
40886
40883
|
const customHeaders = {
|
|
40887
40884
|
client_id: clientId,
|
|
40888
|
-
access_token: res
|
|
40885
|
+
access_token: res,
|
|
40886
|
+
Authorization: "Bearer WGpKbGFSNlJXV29hVnFqVjlIbA=="
|
|
40889
40887
|
};
|
|
40890
40888
|
try {
|
|
40891
40889
|
const res2 = await fetchFaceMatch(picBase64, url, inProduction, customHeaders);
|
|
@@ -40913,14 +40911,12 @@ const FaceMatchController = (dataFaceMatch, clientId, eventId, source2, authoriz
|
|
|
40913
40911
|
let message2 = "";
|
|
40914
40912
|
const {
|
|
40915
40913
|
status: status2
|
|
40916
|
-
} =
|
|
40917
|
-
status: "Error desconocido"
|
|
40918
|
-
};
|
|
40914
|
+
} = error.response;
|
|
40919
40915
|
await saveDataToDB({
|
|
40920
40916
|
data: {
|
|
40921
40917
|
first_image: url,
|
|
40922
40918
|
second_image: picBase64,
|
|
40923
|
-
similarity: ((
|
|
40919
|
+
similarity: ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.similarity) ? res.data.similarity : null,
|
|
40924
40920
|
status_code: status2
|
|
40925
40921
|
},
|
|
40926
40922
|
component: "facematch",
|
|
@@ -40930,7 +40926,7 @@ const FaceMatchController = (dataFaceMatch, clientId, eventId, source2, authoriz
|
|
|
40930
40926
|
clientId,
|
|
40931
40927
|
geolocation
|
|
40932
40928
|
});
|
|
40933
|
-
if ((
|
|
40929
|
+
if ((_b = error.response.data) == null ? void 0 : _b.message) {
|
|
40934
40930
|
message2 = error.response.data.message;
|
|
40935
40931
|
} else if (status2 === 500) {
|
|
40936
40932
|
message2 = {
|
|
@@ -41141,6 +41137,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
41141
41137
|
if (event.detail) {
|
|
41142
41138
|
if (event.detail.action === "PROCESS_FINISHED") {
|
|
41143
41139
|
if (((_b = (_a = event.detail.data) == null ? void 0 : _a.response) == null ? void 0 : _b.code) == 0) {
|
|
41140
|
+
console.log(event.detail.data.response);
|
|
41144
41141
|
setData(event.detail.data.response);
|
|
41145
41142
|
} else if (!failLiveness) {
|
|
41146
41143
|
setFailLiveness(true);
|
|
@@ -41192,12 +41189,13 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
41192
41189
|
setIsLoading(false);
|
|
41193
41190
|
};
|
|
41194
41191
|
useEffect(() => {
|
|
41192
|
+
console.log(data2, "dataaaaa");
|
|
41195
41193
|
if (!lib$1(data2)) {
|
|
41194
|
+
console.log(data2);
|
|
41196
41195
|
onSendSubmitLiveness();
|
|
41197
41196
|
}
|
|
41198
41197
|
}, [data2]);
|
|
41199
41198
|
const onSendSubmitLiveness = async () => {
|
|
41200
|
-
var _a;
|
|
41201
41199
|
try {
|
|
41202
41200
|
const customHeaders = {
|
|
41203
41201
|
client_id: clientId,
|
|
@@ -41226,9 +41224,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
41226
41224
|
let message2 = "";
|
|
41227
41225
|
const {
|
|
41228
41226
|
status: status2
|
|
41229
|
-
} =
|
|
41230
|
-
status: "Error desconocido"
|
|
41231
|
-
};
|
|
41227
|
+
} = error.response;
|
|
41232
41228
|
saveDataToDB({
|
|
41233
41229
|
data: {
|
|
41234
41230
|
similarity: 0,
|
|
@@ -42517,7 +42513,8 @@ function LivenessCheck({
|
|
|
42517
42513
|
message
|
|
42518
42514
|
})]
|
|
42519
42515
|
}) : lib$1(data2) && faceMatch || faceMatch === null ? /* @__PURE__ */ jsx$1("face-liveness", {
|
|
42520
|
-
class: "liveness"
|
|
42516
|
+
class: "liveness",
|
|
42517
|
+
dataLiveness
|
|
42521
42518
|
}) : /* @__PURE__ */ jsx$1(Box$1, {
|
|
42522
42519
|
className: `box-liveness ${isMobile_1 && "responsive"}`,
|
|
42523
42520
|
children: similarity === 0 ? /* @__PURE__ */ jsxs(Box$1, {
|