@ha_tecno/live-id-sdk 2.17.1 → 2.17.2
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/lib/commonjs/components/Gabarito/gabarito.js +1 -1
- package/lib/commonjs/components/Gabarito/gabarito.js.map +1 -1
- package/lib/commonjs/components/HACaptureInstructions/HACaptureInstructions.js +1 -1
- package/lib/commonjs/components/HACaptureInstructions/HACaptureInstructions.js.map +1 -1
- package/lib/commonjs/components/HACaptureInstructions/data.js +2 -2
- package/lib/commonjs/components/HACaptureInstructions/data.js.map +1 -1
- package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js +3 -3
- package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js.map +1 -1
- package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/styles.js.map +1 -1
- package/lib/commonjs/components/HACarouselCalibration/HAPagination/styles.js +0 -1
- package/lib/commonjs/components/HACarouselCalibration/HAPagination/styles.js.map +1 -1
- package/lib/commonjs/components/HARecordButton/HARecordButton.js +1 -1
- package/lib/commonjs/components/HARecordButton/HARecordButton.js.map +1 -1
- package/lib/commonjs/components/HARecordInstructions/HARecordInstructions.js +3 -3
- package/lib/commonjs/components/HARecordInstructions/HARecordInstructions.js.map +1 -1
- package/lib/commonjs/components/index.js +10 -10
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/screens/FingerAuth/FingerAuth.js +14 -4
- package/lib/commonjs/screens/FingerAuth/FingerAuth.js.map +1 -1
- package/lib/commonjs/screens/FingerRegister/FingerRegister.js +14 -4
- package/lib/commonjs/screens/FingerRegister/FingerRegister.js.map +1 -1
- package/lib/commonjs/screens/LifeCertificate/LifeCertificate.js +12 -2
- package/lib/commonjs/screens/LifeCertificate/LifeCertificate.js.map +1 -1
- package/lib/commonjs/screens/RegisterOperations/registerOperationPointsBiometrics.js +26 -29
- package/lib/commonjs/screens/RegisterOperations/registerOperationPointsBiometrics.js.map +1 -1
- package/lib/commonjs/screens/RegisterOperations/styles.js +2 -11
- package/lib/commonjs/screens/RegisterOperations/styles.js.map +1 -1
- package/lib/commonjs/services/services.js +5 -3
- package/lib/commonjs/services/services.js.map +1 -1
- package/lib/commonjs/store/modules/operationPoints/slice.js +17 -17
- package/lib/commonjs/store/modules/operationPoints/slice.js.map +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/components/Gabarito/gabarito.js +2 -2
- package/lib/module/components/Gabarito/gabarito.js.map +1 -1
- package/lib/module/components/HAButton/HAButton.js +1 -1
- package/lib/module/components/HAButton/HAButton.js.map +1 -1
- package/lib/module/components/HAButton/styles.js +1 -1
- package/lib/module/components/HAButton/styles.js.map +1 -1
- package/lib/module/components/HACaptureInstructions/HACaptureInstructions.js +2 -2
- package/lib/module/components/HACaptureInstructions/HACaptureInstructions.js.map +1 -1
- package/lib/module/components/HACaptureInstructions/HACard/HACard.js +1 -1
- package/lib/module/components/HACaptureInstructions/HACard/HACard.js.map +1 -1
- package/lib/module/components/HACaptureInstructions/HACard/styles.js +1 -1
- package/lib/module/components/HACaptureInstructions/HACard/styles.js.map +1 -1
- package/lib/module/components/HACaptureInstructions/data.js +2 -2
- package/lib/module/components/HACaptureInstructions/data.js.map +1 -1
- package/lib/module/components/HACaptureInstructions/style.js +1 -1
- package/lib/module/components/HACaptureInstructions/style.js.map +1 -1
- package/lib/module/components/HACarouselCalibration/HACarouselCalibration.js.map +1 -1
- package/lib/module/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js +4 -4
- package/lib/module/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js.map +1 -1
- package/lib/module/components/HACarouselCalibration/HACarouselItem/styles.js +1 -2
- package/lib/module/components/HACarouselCalibration/HACarouselItem/styles.js.map +1 -1
- package/lib/module/components/HACarouselCalibration/HAPagination/styles.js +0 -1
- package/lib/module/components/HACarouselCalibration/HAPagination/styles.js.map +1 -1
- package/lib/module/components/HARecordButton/HARecordButton.js +1 -1
- package/lib/module/components/HARecordButton/HARecordButton.js.map +1 -1
- package/lib/module/components/HARecordInstructions/HARecordInstructions.js +4 -4
- package/lib/module/components/HARecordInstructions/HARecordInstructions.js.map +1 -1
- package/lib/module/components/HARecordInstructions/styles.js +1 -1
- package/lib/module/components/HARecordInstructions/styles.js.map +1 -1
- package/lib/module/components/Toast/Toast.js +1 -1
- package/lib/module/components/Toast/Toast.js.map +1 -1
- package/lib/module/components/index.js +11 -11
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/FingerAuth/FingerAuth.js +17 -6
- package/lib/module/screens/FingerAuth/FingerAuth.js.map +1 -1
- package/lib/module/screens/FingerRegister/FingerRegister.js +16 -5
- package/lib/module/screens/FingerRegister/FingerRegister.js.map +1 -1
- package/lib/module/screens/LifeCertificate/LifeCertificate.js +13 -3
- package/lib/module/screens/LifeCertificate/LifeCertificate.js.map +1 -1
- package/lib/module/screens/RegisterOperations/registerOperationPointsBiometrics.js +28 -30
- package/lib/module/screens/RegisterOperations/registerOperationPointsBiometrics.js.map +1 -1
- package/lib/module/screens/RegisterOperations/styles.js +3 -12
- package/lib/module/screens/RegisterOperations/styles.js.map +1 -1
- package/lib/module/services/services.js +5 -3
- package/lib/module/services/services.js.map +1 -1
- package/lib/module/store/modules/operationPoints/slice.js +17 -17
- package/lib/module/store/modules/operationPoints/slice.js.map +1 -1
- package/lib/module/theme/theme.js +1 -1
- package/lib/module/theme/theme.js.map +1 -1
- package/lib/module/utils/hooks/useIsForeground.js +1 -1
- package/lib/module/utils/hooks/useIsForeground.js.map +1 -1
- package/lib/module/utils/index.js +2 -2
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/utils.js +1 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/src/components/HACarouselCalibration/HACarouselItem/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/HACarouselCalibration/HAPagination/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +11 -11
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/FingerAuth/FingerAuth.d.ts.map +1 -1
- package/lib/typescript/src/screens/FingerRegister/FingerRegister.d.ts.map +1 -1
- package/lib/typescript/src/screens/LifeCertificate/LifeCertificate.d.ts.map +1 -1
- package/lib/typescript/src/screens/RegisterOperations/registerOperationPointsBiometrics.d.ts.map +1 -1
- package/lib/typescript/src/screens/RegisterOperations/styles.d.ts +2 -8
- package/lib/typescript/src/screens/RegisterOperations/styles.d.ts.map +1 -1
- package/lib/typescript/src/services/services.d.ts +2 -2
- package/lib/typescript/src/services/services.d.ts.map +1 -1
- package/lib/typescript/src/services/types.d.ts +1 -0
- package/lib/typescript/src/services/types.d.ts.map +1 -1
- package/lib/typescript/src/store/modules/operationPoints/selectors.d.ts +2 -1
- package/lib/typescript/src/store/modules/operationPoints/selectors.d.ts.map +1 -1
- package/lib/typescript/src/store/modules/operationPoints/slice.d.ts.map +1 -1
- package/lib/typescript/src/store/modules/operationPoints/types.d.ts +4 -1
- package/lib/typescript/src/store/modules/operationPoints/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +2 -2
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/utils.d.ts +1 -1
- package/package.json +3 -3
- package/src/@types/declarations.d.ts +2 -0
- package/src/components/Gabarito/gabarito.tsx +2 -2
- package/src/components/HAButton/HAButton.tsx +1 -1
- package/src/components/HAButton/styles.ts +1 -1
- package/src/components/HACaptureInstructions/HACaptureInstructions.tsx +2 -2
- package/src/components/HACaptureInstructions/HACard/HACard.tsx +1 -1
- package/src/components/HACaptureInstructions/HACard/styles.ts +1 -1
- package/src/components/HACaptureInstructions/data.ts +2 -2
- package/src/components/HACaptureInstructions/style.ts +1 -1
- package/src/components/HACarouselCalibration/HACarouselCalibration.tsx +1 -1
- package/src/components/HACarouselCalibration/HACarouselItem/HACarouselItem.tsx +4 -4
- package/src/components/HACarouselCalibration/HACarouselItem/styles.ts +1 -3
- package/src/components/HACarouselCalibration/HAPagination/styles.ts +0 -1
- package/src/components/HARecordButton/HARecordButton.tsx +1 -1
- package/src/components/HARecordInstructions/HARecordInstructions.tsx +6 -6
- package/src/components/HARecordInstructions/styles.ts +1 -1
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/index.ts +20 -20
- package/src/index.tsx +9 -9
- package/src/screens/FingerAuth/FingerAuth.tsx +19 -6
- package/src/screens/FingerRegister/FingerRegister.tsx +17 -5
- package/src/screens/LifeCertificate/LifeCertificate.tsx +14 -3
- package/src/screens/RegisterOperations/registerOperationPointsBiometrics.tsx +25 -28
- package/src/screens/RegisterOperations/styles.ts +3 -12
- package/src/services/services.ts +11 -9
- package/src/services/types.ts +1 -0
- package/src/store/modules/operationPoints/slice.ts +24 -24
- package/src/store/modules/operationPoints/types.ts +9 -1
- package/src/theme/theme.ts +1 -1
- package/src/utils/hooks/useIsForeground.ts +1 -1
- package/src/utils/index.ts +2 -2
- package/src/utils/utils.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Platform, StyleSheet } from "react-native";
|
|
2
2
|
|
|
3
3
|
export const styles = StyleSheet.create({
|
|
4
4
|
root: { flex: 1 },
|
|
@@ -31,22 +31,13 @@ export const styles = StyleSheet.create({
|
|
|
31
31
|
},
|
|
32
32
|
containerContent: { position: "absolute", alignSelf: "center", bottom: 20 },
|
|
33
33
|
marginTabSelector: {
|
|
34
|
+
alignSelf: "center",
|
|
35
|
+
width: "100%",
|
|
34
36
|
marginHorizontal: Platform.select({
|
|
35
37
|
ios: 100,
|
|
36
38
|
android: 80
|
|
37
39
|
})
|
|
38
40
|
},
|
|
39
|
-
containerRuler: {
|
|
40
|
-
paddingTop: 30
|
|
41
|
-
},
|
|
42
|
-
textStyleRuler: {
|
|
43
|
-
color: "#FFB200",
|
|
44
|
-
fontSize: Platform.select({
|
|
45
|
-
ios: 14,
|
|
46
|
-
android: 12
|
|
47
|
-
}),
|
|
48
|
-
fontWeight: "bold"
|
|
49
|
-
},
|
|
50
41
|
containerButton: {
|
|
51
42
|
marginTop: 20,
|
|
52
43
|
alignSelf: "center"
|
package/src/services/services.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
2
|
import { Platform } from "react-native";
|
|
3
|
+
import DeviceInfo from "react-native-device-info";
|
|
3
4
|
import uuid from "react-native-uuid";
|
|
4
5
|
import type {
|
|
6
|
+
AuthFingerResponse,
|
|
7
|
+
AuthFingerType,
|
|
5
8
|
GetConfigApiResponse,
|
|
6
9
|
LifeCertificateResponse,
|
|
7
10
|
LifeCertificateType,
|
|
8
|
-
RegisterFingerResponse,
|
|
9
11
|
RegisterFingerImagesType,
|
|
10
|
-
|
|
11
|
-
AuthFingerResponse,
|
|
12
|
-
SendImagesForRegisterOperationPointsType,
|
|
12
|
+
RegisterFingerResponse,
|
|
13
13
|
SendImagesForRegisterOperationPointsResponse,
|
|
14
|
-
|
|
15
|
-
SendVideoForRegisterOperationPointsResponse
|
|
14
|
+
SendImagesForRegisterOperationPointsType,
|
|
15
|
+
SendVideoForRegisterOperationPointsResponse,
|
|
16
|
+
SendVideoForRegisterOperationPointsType
|
|
16
17
|
} from "./types";
|
|
17
|
-
import DeviceInfo from "react-native-device-info";
|
|
18
18
|
|
|
19
19
|
const API_URL = "https://api.liveid.app.br";
|
|
20
20
|
const TOKEN =
|
|
@@ -161,7 +161,8 @@ export const sendImagesForRegisterOperationPoints = async ({
|
|
|
161
161
|
zoom,
|
|
162
162
|
zoomMax,
|
|
163
163
|
zoomMin,
|
|
164
|
-
zoomScaleZeroToOne
|
|
164
|
+
zoomScaleZeroToOne,
|
|
165
|
+
step
|
|
165
166
|
}: SendImagesForRegisterOperationPointsType): Promise<SendImagesForRegisterOperationPointsResponse> => {
|
|
166
167
|
try {
|
|
167
168
|
const { data } = await axiosInstance.post(
|
|
@@ -177,7 +178,8 @@ export const sendImagesForRegisterOperationPoints = async ({
|
|
|
177
178
|
zoomMin,
|
|
178
179
|
zoomMax,
|
|
179
180
|
zoomScaleZeroToOne,
|
|
180
|
-
operationalSystem: Platform.OS
|
|
181
|
+
operationalSystem: Platform.OS,
|
|
182
|
+
step
|
|
181
183
|
},
|
|
182
184
|
{
|
|
183
185
|
headers: {
|
package/src/services/types.ts
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
+
import { Platform } from "react-native";
|
|
2
|
+
import { getModel } from "react-native-device-info";
|
|
1
3
|
import { create } from "zustand";
|
|
4
|
+
import {
|
|
5
|
+
getConfigOperationPoints,
|
|
6
|
+
sendImagesForRegisterOperationPoints,
|
|
7
|
+
sendVideoForRegisterOperationPoints
|
|
8
|
+
} from "../../../services";
|
|
9
|
+
import { scale0to1, scale0to1Inverse } from "../../../utils";
|
|
2
10
|
import {
|
|
3
11
|
ExposureMapOperationPoints,
|
|
12
|
+
ExposureMapOperationPointsLifeCertificate,
|
|
4
13
|
InitialState,
|
|
5
14
|
OperationPointsState,
|
|
6
15
|
SendImagesBase64Payload,
|
|
7
16
|
SetImageBase64Payload,
|
|
8
17
|
sendVideosLifeCertificatePayload
|
|
9
18
|
} from "./types";
|
|
10
|
-
import { Platform } from "react-native";
|
|
11
|
-
import {
|
|
12
|
-
getConfigOperationPoints,
|
|
13
|
-
sendImagesForRegisterOperationPoints,
|
|
14
|
-
sendVideoForRegisterOperationPoints
|
|
15
|
-
} from "../../../services";
|
|
16
|
-
import { getModel } from "react-native-device-info";
|
|
17
|
-
import { scale0to1, scale0to1Inverse } from "../../../utils";
|
|
18
19
|
|
|
19
20
|
const initialState: InitialState = {
|
|
20
21
|
state: {
|
|
21
22
|
loading: "idle",
|
|
23
|
+
step: 1,
|
|
22
24
|
hasConfigOperationPointsBiometrics: "idle",
|
|
23
25
|
hasConfigOperationPointsLifeCertificate: "idle",
|
|
24
26
|
base64Images: [],
|
|
25
|
-
exposureScaleZeroToOneBiometrics:
|
|
27
|
+
exposureScaleZeroToOneBiometrics: 0.5,
|
|
26
28
|
exposureScaleZeroToOneLifeCertificate: Platform.OS === "android" ? 0.12 : 0.3,
|
|
27
29
|
registered: false,
|
|
28
30
|
exposure: 0,
|
|
@@ -76,24 +78,20 @@ const setImageBase64 = (imageBase64: SetImageBase64Payload) => {
|
|
|
76
78
|
const changeExposureBiometrics = () => {
|
|
77
79
|
resetState();
|
|
78
80
|
const exposureMap: ExposureMapOperationPoints = {
|
|
79
|
-
0.
|
|
80
|
-
0.
|
|
81
|
-
0.
|
|
82
|
-
0.
|
|
83
|
-
0.
|
|
84
|
-
0.5: Platform.OS === "android" ? 0.65 : 0.6,
|
|
85
|
-
0.65: 0.8,
|
|
86
|
-
0.6: 0.7,
|
|
87
|
-
0.7: 0.3,
|
|
88
|
-
0.8: 0.12
|
|
81
|
+
0.5: 0.45,
|
|
82
|
+
0.45: 0.55,
|
|
83
|
+
0.55: 0.4,
|
|
84
|
+
0.4: 0.6,
|
|
85
|
+
0.6: 0.5
|
|
89
86
|
};
|
|
90
87
|
slice.setState((state) => {
|
|
91
|
-
const { exposureScaleZeroToOneBiometrics } = state.state;
|
|
88
|
+
const { exposureScaleZeroToOneBiometrics, step } = state.state;
|
|
92
89
|
return {
|
|
93
90
|
state: {
|
|
94
91
|
...state.state,
|
|
95
92
|
exposureScaleZeroToOneBiometrics:
|
|
96
|
-
exposureMap[exposureScaleZeroToOneBiometrics] || exposureScaleZeroToOneBiometrics
|
|
93
|
+
exposureMap[exposureScaleZeroToOneBiometrics] || exposureScaleZeroToOneBiometrics,
|
|
94
|
+
step: step < 5 ? step + 1 : 5
|
|
97
95
|
}
|
|
98
96
|
};
|
|
99
97
|
});
|
|
@@ -101,7 +99,7 @@ const changeExposureBiometrics = () => {
|
|
|
101
99
|
|
|
102
100
|
const changeExposureLifeCertificate = () => {
|
|
103
101
|
resetState();
|
|
104
|
-
const exposureMap:
|
|
102
|
+
const exposureMap: ExposureMapOperationPointsLifeCertificate = {
|
|
105
103
|
0.12: 0.2,
|
|
106
104
|
0.2: 0.35,
|
|
107
105
|
0.3: 0.4,
|
|
@@ -166,7 +164,8 @@ const sendImagesBase64 = async ({
|
|
|
166
164
|
exposureMax,
|
|
167
165
|
exposureMin,
|
|
168
166
|
zoomMax,
|
|
169
|
-
zoomMin
|
|
167
|
+
zoomMin,
|
|
168
|
+
step
|
|
170
169
|
}: SendImagesBase64Payload) => {
|
|
171
170
|
loadingPending();
|
|
172
171
|
const deviceModel = getModel();
|
|
@@ -183,7 +182,8 @@ const sendImagesBase64 = async ({
|
|
|
183
182
|
zoom,
|
|
184
183
|
zoomMin,
|
|
185
184
|
zoomMax,
|
|
186
|
-
zoomScaleZeroToOne
|
|
185
|
+
zoomScaleZeroToOne,
|
|
186
|
+
step
|
|
187
187
|
});
|
|
188
188
|
slice.setState((state) => ({
|
|
189
189
|
state: {
|
|
@@ -4,8 +4,10 @@ type ScaleZeroToOneIOS = 0.3 | 0.4 | 0.5 | 0.6 | 0.7;
|
|
|
4
4
|
type StatusConfigOperationPoints = "empty" | "notEmpty" | "idle";
|
|
5
5
|
|
|
6
6
|
type State = {
|
|
7
|
-
|
|
7
|
+
//0.4 | 0.45 | 0.5 | 0.55 | 0.6
|
|
8
|
+
exposureScaleZeroToOneBiometrics: 0.4 | 0.45 | 0.5 | 0.55 | 0.6;
|
|
8
9
|
exposureScaleZeroToOneLifeCertificate: ScaleZeroToOneIOS | ScaleZeroToOneAndroid;
|
|
10
|
+
step: number;
|
|
9
11
|
loading: "idle" | "pending" | "succeeded" | "failed";
|
|
10
12
|
hasConfigOperationPointsBiometrics: StatusConfigOperationPoints;
|
|
11
13
|
hasConfigOperationPointsLifeCertificate: StatusConfigOperationPoints;
|
|
@@ -50,6 +52,11 @@ export type ExposureMapOperationPoints = Record<
|
|
|
50
52
|
State["exposureScaleZeroToOneBiometrics"]
|
|
51
53
|
>;
|
|
52
54
|
|
|
55
|
+
export type ExposureMapOperationPointsLifeCertificate = Record<
|
|
56
|
+
State["exposureScaleZeroToOneLifeCertificate"],
|
|
57
|
+
State["exposureScaleZeroToOneLifeCertificate"]
|
|
58
|
+
>;
|
|
59
|
+
|
|
53
60
|
export type SetImageBase64Payload = string;
|
|
54
61
|
|
|
55
62
|
export type SendImagesBase64Payload = {
|
|
@@ -59,6 +66,7 @@ export type SendImagesBase64Payload = {
|
|
|
59
66
|
exposureMax: number;
|
|
60
67
|
zoomMin: number;
|
|
61
68
|
zoomMax: number;
|
|
69
|
+
step: number;
|
|
62
70
|
};
|
|
63
71
|
|
|
64
72
|
export type sendVideosLifeCertificatePayload = {
|
package/src/theme/theme.ts
CHANGED
package/src/utils/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import getConfigCamera from "./getConfigCamera";
|
|
2
|
-
import { randomHeartRate, filteredFingers, scale0to1, scale0to1Inverse } from "./utils";
|
|
3
2
|
import { useIsForeground } from "./hooks/useIsForeground";
|
|
3
|
+
import { filteredFingers, randomHeartRate, scale0to1, scale0to1Inverse } from "./utils";
|
|
4
4
|
|
|
5
|
-
export {
|
|
5
|
+
export { filteredFingers, getConfigCamera, randomHeartRate, scale0to1, scale0to1Inverse, useIsForeground };
|
package/src/utils/utils.ts
CHANGED
|
@@ -19,4 +19,4 @@ const scale0to1Inverse = (scaledValue: number, min: number, max: number) => {
|
|
|
19
19
|
return scaledValue * (max - min) + min;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export {
|
|
22
|
+
export { filteredFingers, randomHeartRate, scale0to1, scale0to1Inverse };
|