gbc-kyc-kit 1.7.5 → 1.7.7
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/README.md +3 -0
- package/dist/gbc-kyc-kit.es.js +50 -28
- package/dist/gbc-kyc-kit.umd.js +28 -28
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -144,6 +144,8 @@ Props Available:
|
|
|
144
144
|
- mode: string 'dark' || 'light' default is 'light'
|
|
145
145
|
- inProduction: string default is prd
|
|
146
146
|
- countryCodeAllowed: array of string
|
|
147
|
+
- dataLiveness: function to get response
|
|
148
|
+
- faceMatch: base64 to compare with Liveness, if it's null, just will validate Liveness else will validate Liveness first and then face match.
|
|
147
149
|
|
|
148
150
|
```js
|
|
149
151
|
|
|
@@ -175,6 +177,7 @@ useEffect(() => {
|
|
|
175
177
|
authorize={getAccessToken}
|
|
176
178
|
dataLiveness={getDataLiveness}
|
|
177
179
|
inProduction="prd"
|
|
180
|
+
faceMatch={base64Image}
|
|
178
181
|
/>
|
|
179
182
|
```
|
|
180
183
|
|
package/dist/gbc-kyc-kit.es.js
CHANGED
|
@@ -18843,12 +18843,12 @@ const BlackListController = (clientId, authorize, eventId, inProduction, country
|
|
|
18843
18843
|
setIsLoading(false);
|
|
18844
18844
|
};
|
|
18845
18845
|
const schema = create({
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
18846
|
+
first_name: create$1().required("Este campo es requerido."),
|
|
18847
|
+
second_name: create$1(),
|
|
18848
|
+
first_last_name: create$1().required("Este campo es requerido."),
|
|
18849
|
+
second_last_name: create$1(),
|
|
18850
18850
|
country: create$1().nullable(),
|
|
18851
|
-
|
|
18851
|
+
birth_date: create$1().nullable()
|
|
18852
18852
|
}).required();
|
|
18853
18853
|
const {
|
|
18854
18854
|
control: controlDoc,
|
|
@@ -18861,15 +18861,22 @@ const BlackListController = (clientId, authorize, eventId, inProduction, country
|
|
|
18861
18861
|
resolver: o(schema),
|
|
18862
18862
|
mode: "onBlur",
|
|
18863
18863
|
defaultValues: {
|
|
18864
|
-
|
|
18865
|
-
|
|
18866
|
-
|
|
18867
|
-
|
|
18864
|
+
first_name: "",
|
|
18865
|
+
second_name: "",
|
|
18866
|
+
first_last_name: "",
|
|
18867
|
+
second_last_name: "",
|
|
18868
18868
|
country: "",
|
|
18869
|
-
|
|
18869
|
+
birth_date: ""
|
|
18870
18870
|
}
|
|
18871
18871
|
});
|
|
18872
18872
|
const onSendSubmitDocument = async (data2) => {
|
|
18873
|
+
const {
|
|
18874
|
+
first_name,
|
|
18875
|
+
second_name,
|
|
18876
|
+
first_last_name,
|
|
18877
|
+
second_last_name,
|
|
18878
|
+
birth_date
|
|
18879
|
+
} = data2;
|
|
18873
18880
|
setIsLoading(true);
|
|
18874
18881
|
try {
|
|
18875
18882
|
const res = await authorize();
|
|
@@ -18883,12 +18890,12 @@ const BlackListController = (clientId, authorize, eventId, inProduction, country
|
|
|
18883
18890
|
customHeaders,
|
|
18884
18891
|
inProduction,
|
|
18885
18892
|
bodyParams: {
|
|
18886
|
-
|
|
18887
|
-
|
|
18888
|
-
|
|
18889
|
-
|
|
18893
|
+
first_name,
|
|
18894
|
+
second_name,
|
|
18895
|
+
first_last_name,
|
|
18896
|
+
second_last_name,
|
|
18890
18897
|
country: select,
|
|
18891
|
-
|
|
18898
|
+
birth_date: Date.parse(birth_date)
|
|
18892
18899
|
}
|
|
18893
18900
|
};
|
|
18894
18901
|
setDataReq(parseReq.bodyParams);
|
|
@@ -18897,10 +18904,21 @@ const BlackListController = (clientId, authorize, eventId, inProduction, country
|
|
|
18897
18904
|
const {
|
|
18898
18905
|
match: match2,
|
|
18899
18906
|
message: message2,
|
|
18900
|
-
status: status2
|
|
18907
|
+
status: status2,
|
|
18908
|
+
payload
|
|
18901
18909
|
} = res2.data.data;
|
|
18910
|
+
const dataToRegisterBlackList = {
|
|
18911
|
+
request_match: match2,
|
|
18912
|
+
request_payload: payload,
|
|
18913
|
+
first_name,
|
|
18914
|
+
second_name,
|
|
18915
|
+
first_last_name,
|
|
18916
|
+
second_last_name,
|
|
18917
|
+
country: select,
|
|
18918
|
+
date_birth: Date.parse(birth_date)
|
|
18919
|
+
};
|
|
18902
18920
|
saveDataToDB({
|
|
18903
|
-
data:
|
|
18921
|
+
data: dataToRegisterBlackList,
|
|
18904
18922
|
component: "blacklist",
|
|
18905
18923
|
eventId,
|
|
18906
18924
|
source: source2,
|
|
@@ -23781,43 +23799,43 @@ function BlackList({
|
|
|
23781
23799
|
children: "Ingrese al menos el primer nombre y apellido de la persona a consultar."
|
|
23782
23800
|
}), /* @__PURE__ */ jsx(CustomInputForm, {
|
|
23783
23801
|
type: "text",
|
|
23784
|
-
name: "
|
|
23802
|
+
name: "first_name",
|
|
23785
23803
|
placeholder: "Primer nombre",
|
|
23786
23804
|
icon: icon && icon,
|
|
23787
23805
|
control: controlDoc,
|
|
23788
|
-
error: errorsDoc.
|
|
23806
|
+
error: errorsDoc.first_name
|
|
23789
23807
|
}), /* @__PURE__ */ jsx(CustomInputForm, {
|
|
23790
23808
|
type: "text",
|
|
23791
|
-
name: "
|
|
23809
|
+
name: "second_name",
|
|
23792
23810
|
label: "Segundo nombre",
|
|
23793
23811
|
placeholder: "Segundo nombre",
|
|
23794
23812
|
icon: icon && icon,
|
|
23795
23813
|
control: controlDoc,
|
|
23796
|
-
error: errorsDoc.
|
|
23814
|
+
error: errorsDoc.second_name
|
|
23797
23815
|
}), /* @__PURE__ */ jsx(CustomInputForm, {
|
|
23798
23816
|
type: "text",
|
|
23799
|
-
name: "
|
|
23817
|
+
name: "first_last_name",
|
|
23800
23818
|
label: "Primer apellido",
|
|
23801
23819
|
placeholder: "Primer apellido",
|
|
23802
23820
|
icon: icon && icon,
|
|
23803
23821
|
control: controlDoc,
|
|
23804
|
-
error: errorsDoc.
|
|
23822
|
+
error: errorsDoc.first_last_name
|
|
23805
23823
|
}), /* @__PURE__ */ jsx(CustomInputForm, {
|
|
23806
23824
|
type: "text",
|
|
23807
|
-
name: "
|
|
23825
|
+
name: "second_last_name",
|
|
23808
23826
|
label: "Segundo apellido",
|
|
23809
23827
|
placeholder: "Segundo apellido",
|
|
23810
23828
|
icon: icon && icon,
|
|
23811
23829
|
control: controlDoc,
|
|
23812
|
-
error: errorsDoc.
|
|
23830
|
+
error: errorsDoc.second_last_name
|
|
23813
23831
|
}), /* @__PURE__ */ jsx(CustomInputForm, {
|
|
23814
23832
|
type: "date",
|
|
23815
|
-
name: "
|
|
23833
|
+
name: "birth_date",
|
|
23816
23834
|
label: "Fecha de nacimiento",
|
|
23817
23835
|
placeholder: "Fecha de nacimiento",
|
|
23818
23836
|
icon: icon && icon,
|
|
23819
23837
|
control: controlDoc,
|
|
23820
|
-
error: errorsDoc.
|
|
23838
|
+
error: errorsDoc.birth_date
|
|
23821
23839
|
}), /* @__PURE__ */ jsx(CustomInputForm, {
|
|
23822
23840
|
type: "country",
|
|
23823
23841
|
name: "country",
|
|
@@ -24242,7 +24260,11 @@ const FaceMatchController = (dataFaceMatch, clientId, eventId, source2, authoriz
|
|
|
24242
24260
|
const res2 = await fetchFaceMatch(picBase64, url, inProduction, customHeaders);
|
|
24243
24261
|
res2 && await dataFaceMatch(res2.data);
|
|
24244
24262
|
saveDataToDB({
|
|
24245
|
-
data:
|
|
24263
|
+
data: {
|
|
24264
|
+
first_image: url,
|
|
24265
|
+
second_image: picBase64,
|
|
24266
|
+
similarity: res2.data.similarity
|
|
24267
|
+
},
|
|
24246
24268
|
component: "facematch",
|
|
24247
24269
|
eventId,
|
|
24248
24270
|
source: source2,
|