@hexar/biometric-identity-sdk-react-native 1.0.36 → 1.1.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfilePictureCapture.d.ts","sourceRoot":"","sources":["../../src/components/ProfilePictureCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AASxE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAmC,cAAc,EAAsB,MAAM,oCAAoC,CAAC;AAGzJ,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,IAAI,CAAC;IAC7D,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"ProfilePictureCapture.d.ts","sourceRoot":"","sources":["../../src/components/ProfilePictureCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AASxE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAmC,cAAc,EAAsB,MAAM,oCAAoC,CAAC;AAGzJ,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,IAAI,CAAC;IAC7D,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAmMtE,CAAC;AAuCF,eAAe,qBAAqB,CAAC"}
|
|
@@ -61,8 +61,7 @@ const ProfilePictureCapture = ({ onComplete, onError, onCancel, theme, language,
|
|
|
61
61
|
throw new Error('VALIDATION_ERROR');
|
|
62
62
|
}
|
|
63
63
|
const backendClient = sdk.backendClient;
|
|
64
|
-
const
|
|
65
|
-
const apiKey = backendClient.config.apiKey;
|
|
64
|
+
const config = backendClient.config;
|
|
66
65
|
const requestBody = {
|
|
67
66
|
session_id: sessionId,
|
|
68
67
|
video_frames: videoResult.frames,
|
|
@@ -73,19 +72,17 @@ const ProfilePictureCapture = ({ onComplete, onError, onCancel, theme, language,
|
|
|
73
72
|
sessionId,
|
|
74
73
|
framesCount: videoResult.frames.length,
|
|
75
74
|
duration: videoResult.duration,
|
|
76
|
-
apiEndpoint,
|
|
75
|
+
endpoint: config.apiEndpoint,
|
|
77
76
|
});
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
const response = await fetch(fullUrl, {
|
|
77
|
+
const url = `${config.apiEndpoint}/profile/validate-face`;
|
|
78
|
+
const response = await fetch(url, {
|
|
81
79
|
method: 'POST',
|
|
82
80
|
headers: {
|
|
83
81
|
'Content-Type': 'application/json',
|
|
84
|
-
'X-API-Key': apiKey,
|
|
82
|
+
'X-API-Key': config.apiKey,
|
|
85
83
|
},
|
|
86
84
|
body: JSON.stringify(requestBody),
|
|
87
85
|
});
|
|
88
|
-
biometric_identity_sdk_core_1.logger.info('Backend response received', { status: response.status, ok: response.ok });
|
|
89
86
|
if (!response.ok) {
|
|
90
87
|
const errorData = await response.json().catch(() => ({}));
|
|
91
88
|
biometric_identity_sdk_core_1.logger.error('Backend validation failed', { status: response.status, error: errorData });
|
package/package.json
CHANGED
|
@@ -60,9 +60,8 @@ export const ProfilePictureCapture: React.FC<ProfilePictureCaptureProps> = ({
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
const backendClient = (sdk as any).backendClient;
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
const config = backendClient.config;
|
|
64
|
+
|
|
66
65
|
const requestBody = {
|
|
67
66
|
session_id: sessionId,
|
|
68
67
|
video_frames: videoResult.frames,
|
|
@@ -74,23 +73,20 @@ export const ProfilePictureCapture: React.FC<ProfilePictureCaptureProps> = ({
|
|
|
74
73
|
sessionId,
|
|
75
74
|
framesCount: videoResult.frames.length,
|
|
76
75
|
duration: videoResult.duration,
|
|
77
|
-
apiEndpoint,
|
|
76
|
+
endpoint: config.apiEndpoint,
|
|
78
77
|
});
|
|
79
78
|
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const response = await fetch(fullUrl, {
|
|
79
|
+
const url = `${config.apiEndpoint}/profile/validate-face`;
|
|
80
|
+
|
|
81
|
+
const response = await fetch(url, {
|
|
84
82
|
method: 'POST',
|
|
85
83
|
headers: {
|
|
86
84
|
'Content-Type': 'application/json',
|
|
87
|
-
'X-API-Key': apiKey,
|
|
85
|
+
'X-API-Key': config.apiKey,
|
|
88
86
|
},
|
|
89
87
|
body: JSON.stringify(requestBody),
|
|
90
88
|
});
|
|
91
89
|
|
|
92
|
-
logger.info('Backend response received', { status: response.status, ok: response.ok });
|
|
93
|
-
|
|
94
90
|
if (!response.ok) {
|
|
95
91
|
const errorData = await response.json().catch(() => ({}));
|
|
96
92
|
logger.error('Backend validation failed', { status: response.status, error: errorData });
|