gbc-kyc-kit 1.7.3 → 1.7.5
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 +8 -0
- package/dist/gbc-kyc-kit.es.js +9 -7
- package/dist/gbc-kyc-kit.umd.js +38 -38
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -146,6 +146,13 @@ Props Available:
|
|
|
146
146
|
- countryCodeAllowed: array of string
|
|
147
147
|
|
|
148
148
|
```js
|
|
149
|
+
|
|
150
|
+
const getDataLiveness = async (info) => {
|
|
151
|
+
if (info) {
|
|
152
|
+
console.log(info.data);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
// This component return data and you can get it with getDataLiveness function.
|
|
149
156
|
const listener = (event) => {
|
|
150
157
|
console.log(event)
|
|
151
158
|
if (event.detail) {
|
|
@@ -166,6 +173,7 @@ useEffect(() => {
|
|
|
166
173
|
<LivenessCheck
|
|
167
174
|
clientId={clientId}
|
|
168
175
|
authorize={getAccessToken}
|
|
176
|
+
dataLiveness={getDataLiveness}
|
|
169
177
|
inProduction="prd"
|
|
170
178
|
/>
|
|
171
179
|
```
|
package/dist/gbc-kyc-kit.es.js
CHANGED
|
@@ -24858,7 +24858,7 @@ FaceMatch.propTypes = {
|
|
|
24858
24858
|
eventId: propTypes.exports.PropTypes.string,
|
|
24859
24859
|
source: propTypes.exports.PropTypes.string
|
|
24860
24860
|
};
|
|
24861
|
-
const LivenessController = (clientId, eventId, source2, inProduction, countryCodeAllowed, faceMatch) => {
|
|
24861
|
+
const LivenessController = (clientId, eventId, source2, inProduction, countryCodeAllowed, faceMatch, dataLiveness) => {
|
|
24862
24862
|
const [isLoading, setIsLoading] = useState(false);
|
|
24863
24863
|
const [token2, setToken] = useState("");
|
|
24864
24864
|
const [status, setStatus] = useState(clientId === void 0 ? "CLIENTID" : token2 === void 0 ? "TOKEN" : "");
|
|
@@ -24911,9 +24911,9 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
24911
24911
|
setMessage("");
|
|
24912
24912
|
setIsLoading(false);
|
|
24913
24913
|
};
|
|
24914
|
-
const wrapAndSaveData =
|
|
24914
|
+
const wrapAndSaveData = () => {
|
|
24915
24915
|
try {
|
|
24916
|
-
|
|
24916
|
+
saveDataToDB({
|
|
24917
24917
|
data: {
|
|
24918
24918
|
selfie: `data:image/jpeg;base64,${data2.images[0]}`,
|
|
24919
24919
|
similarity: faceMatch ? similarity : null
|
|
@@ -24923,7 +24923,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
24923
24923
|
source: source2,
|
|
24924
24924
|
inProduction,
|
|
24925
24925
|
clientId
|
|
24926
|
-
});
|
|
24926
|
+
}).then((res) => dataLiveness(res));
|
|
24927
24927
|
} catch (errorSavingData) {
|
|
24928
24928
|
console.log(errorSavingData);
|
|
24929
24929
|
return errorSavingData;
|
|
@@ -26125,7 +26125,8 @@ function LivenessCheck({
|
|
|
26125
26125
|
authorize,
|
|
26126
26126
|
inProduction,
|
|
26127
26127
|
countryCodeAllowed,
|
|
26128
|
-
faceMatch
|
|
26128
|
+
faceMatch,
|
|
26129
|
+
dataLiveness
|
|
26129
26130
|
}) {
|
|
26130
26131
|
const {
|
|
26131
26132
|
status,
|
|
@@ -26135,7 +26136,7 @@ function LivenessCheck({
|
|
|
26135
26136
|
message,
|
|
26136
26137
|
countryCode,
|
|
26137
26138
|
setToken
|
|
26138
|
-
} = LivenessController(clientId, eventId, source2, inProduction, countryCodeAllowed, faceMatch);
|
|
26139
|
+
} = LivenessController(clientId, eventId, source2, inProduction, countryCodeAllowed, faceMatch, dataLiveness);
|
|
26139
26140
|
useEffect(() => {
|
|
26140
26141
|
const component = document.getElementsByTagName("face-liveness")[0];
|
|
26141
26142
|
if (component) {
|
|
@@ -26193,7 +26194,8 @@ LivenessCheck.propTypes = {
|
|
|
26193
26194
|
countryCodeAllowed: propTypes.exports.PropTypes.array,
|
|
26194
26195
|
eventId: propTypes.exports.PropTypes.string,
|
|
26195
26196
|
source: propTypes.exports.PropTypes.string,
|
|
26196
|
-
faceMatch: propTypes.exports.PropTypes.string
|
|
26197
|
+
faceMatch: propTypes.exports.PropTypes.string,
|
|
26198
|
+
dataLiveness: propTypes.exports.PropTypes.func.isRequired
|
|
26197
26199
|
};
|
|
26198
26200
|
var bootstrap_min = "";
|
|
26199
26201
|
var bootstrap_bundle_min = { exports: {} };
|