@regulaforensics/face-sdk 8.3.1174-rc → 8.3.1176-nightly
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/RNFaceSDK.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +91 -0
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +106 -3
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +39 -1
- package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +0 -1
- package/examples/capacitor/README.md +1 -1
- package/examples/capacitor/package.json +2 -2
- package/examples/capacitor/scripts/android.sh +3 -1
- package/examples/capacitor/scripts/ios.sh +3 -1
- package/examples/capacitor/scripts/setup.sh +2 -0
- package/examples/ionic/README.md +1 -1
- package/examples/ionic/config.xml +0 -2
- package/examples/ionic/index.tsx +1 -1
- package/examples/ionic/package-lock.json +2360 -1733
- package/examples/ionic/package.json +21 -25
- package/examples/ionic/scripts/android.sh +4 -1
- package/examples/ionic/scripts/ios.sh +4 -1
- package/examples/ionic/scripts/setup.sh +2 -0
- package/examples/ionic/tsconfig.json +1 -1
- package/examples/react_native/README.md +1 -1
- package/examples/react_native/package.json +2 -2
- package/examples/react_native/scripts/android.sh +5 -5
- package/examples/react_native/scripts/ios.sh +5 -5
- package/examples/react_native/scripts/setup.sh +2 -0
- package/ios/Config.swift +107 -1
- package/ios/Decoder.swift +71 -3
- package/ios/Main.swift +24 -4
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +135 -57
- package/test/package-lock.json +2 -5
- package/test/test.tsx +183 -60
- package/www/capacitor/customization/customization_images.js +48 -0
- package/www/capacitor/customization/font.js +3 -3
- package/www/capacitor/detect_faces/detect_faces_config.js +5 -5
- package/www/capacitor/detect_faces/detect_faces_request.js +2 -2
- package/www/capacitor/face_capture/face_capture_config.js +14 -14
- package/www/capacitor/image_params/output_image_crop.js +4 -4
- package/www/capacitor/image_params/output_image_params.js +3 -3
- package/www/capacitor/image_quality/image_quality_characteristic.js +4 -4
- package/www/capacitor/image_quality/image_quality_group.js +2 -2
- package/www/capacitor/index.js +153 -32
- package/www/capacitor/init/init_config.js +2 -2
- package/www/capacitor/internal/bridge.js +2 -2
- package/www/capacitor/internal/cordova.js +2 -2
- package/www/capacitor/liveness/enrollment_config.js +102 -0
- package/www/capacitor/liveness/enrollment_request.js +39 -0
- package/www/capacitor/liveness/enrollment_response.js +26 -0
- package/www/capacitor/liveness/error_response.js +21 -0
- package/www/capacitor/liveness/liveness_config.js +18 -17
- package/www/capacitor/liveness/liveness_exception.js +7 -5
- package/www/capacitor/liveness/liveness_notification.js +2 -0
- package/www/capacitor/liveness/verification_config.js +98 -0
- package/www/capacitor/liveness/verification_response.js +27 -0
- package/www/capacitor/liveness/verify_match_response.js +21 -0
- package/www/capacitor/match_faces/match_faces_config.js +3 -3
- package/www/capacitor/match_faces/match_faces_image.js +2 -2
- package/www/capacitor/match_faces/match_faces_request.js +4 -4
- package/www/capacitor/person_database/edit_group_persons_request.js +3 -3
- package/www/capacitor/person_database/person_database.js +4 -4
- package/www/capacitor/person_database/search_person_request.js +7 -7
- package/www/cordova.js +703 -173
- package/www/react-native/customization/customization_images.js +48 -0
- package/www/react-native/customization/font.js +3 -3
- package/www/react-native/detect_faces/detect_faces_config.js +5 -5
- package/www/react-native/detect_faces/detect_faces_request.js +2 -2
- package/www/react-native/face_capture/face_capture_config.js +14 -14
- package/www/react-native/image_params/output_image_crop.js +4 -4
- package/www/react-native/image_params/output_image_params.js +3 -3
- package/www/react-native/image_quality/image_quality_characteristic.js +4 -4
- package/www/react-native/image_quality/image_quality_group.js +2 -2
- package/www/react-native/index.js +153 -32
- package/www/react-native/init/init_config.js +2 -2
- package/www/react-native/internal/bridge.js +2 -2
- package/www/react-native/liveness/enrollment_config.js +102 -0
- package/www/react-native/liveness/enrollment_request.js +39 -0
- package/www/react-native/liveness/enrollment_response.js +26 -0
- package/www/react-native/liveness/error_response.js +21 -0
- package/www/react-native/liveness/liveness_config.js +18 -17
- package/www/react-native/liveness/liveness_exception.js +7 -5
- package/www/react-native/liveness/liveness_notification.js +2 -0
- package/www/react-native/liveness/verification_config.js +98 -0
- package/www/react-native/liveness/verification_response.js +27 -0
- package/www/react-native/liveness/verify_match_response.js +21 -0
- package/www/react-native/match_faces/match_faces_config.js +3 -3
- package/www/react-native/match_faces/match_faces_image.js +2 -2
- package/www/react-native/match_faces/match_faces_request.js +4 -4
- package/www/react-native/person_database/edit_group_persons_request.js +3 -3
- package/www/react-native/person_database/person_database.js +4 -4
- package/www/react-native/person_database/search_person_request.js +7 -7
- package/www/types/customization/customization_images.d.ts +6 -0
- package/www/types/customization/font.d.ts +1 -1
- package/www/types/detect_faces/detect_faces_config.d.ts +1 -1
- package/www/types/detect_faces/detect_faces_request.d.ts +1 -1
- package/www/types/face_capture/face_capture_config.d.ts +1 -1
- package/www/types/image_params/output_image_crop.d.ts +1 -1
- package/www/types/image_params/output_image_params.d.ts +1 -1
- package/www/types/image_quality/image_quality_group.d.ts +1 -1
- package/www/types/index.d.ts +137 -15
- package/www/types/init/init_config.d.ts +1 -1
- package/www/types/liveness/enrollment_config.d.ts +97 -0
- package/www/types/liveness/enrollment_request.d.ts +24 -0
- package/www/types/liveness/enrollment_response.d.ts +9 -0
- package/www/types/liveness/error_response.d.ts +6 -0
- package/www/types/liveness/liveness_config.d.ts +2 -1
- package/www/types/liveness/liveness_exception.d.ts +32 -2
- package/www/types/liveness/liveness_notification.d.ts +2 -0
- package/www/types/liveness/verification_config.d.ts +95 -0
- package/www/types/liveness/verification_response.d.ts +10 -0
- package/www/types/liveness/verify_match_response.d.ts +6 -0
- package/www/types/match_faces/match_faces_config.d.ts +1 -1
- package/www/types/match_faces/match_faces_image.d.ts +1 -1
- package/www/types/match_faces/match_faces_request.d.ts +1 -1
- package/www/types/person_database/edit_group_persons_request.d.ts +1 -1
- package/www/types/person_database/person_database.d.ts +2 -2
- package/www/types/person_database/search_person_request.d.ts +1 -1
package/www/types/index.d.ts
CHANGED
|
@@ -5,7 +5,16 @@ import { CustomizationImages } from './customization/customization_images'
|
|
|
5
5
|
import { Customization, CustomButtonTappedCompletion } from './customization/customization'
|
|
6
6
|
import { Font } from './customization/font'
|
|
7
7
|
import { ScreenOrientation } from './customization/screen_orientation'
|
|
8
|
-
export {
|
|
8
|
+
export {
|
|
9
|
+
CameraPosition,
|
|
10
|
+
CustomizationColors,
|
|
11
|
+
CustomizationFonts,
|
|
12
|
+
CustomizationImages,
|
|
13
|
+
Customization,
|
|
14
|
+
CustomButtonTappedCompletion,
|
|
15
|
+
Font,
|
|
16
|
+
ScreenOrientation,
|
|
17
|
+
}
|
|
9
18
|
|
|
10
19
|
import { FaceSDKVersion } from './init/face_sdk_version'
|
|
11
20
|
import { InitConfig } from './init/init_config'
|
|
@@ -13,7 +22,14 @@ import { InitException } from './init/init_exception'
|
|
|
13
22
|
import { InitErrorCode } from './init/init_exception'
|
|
14
23
|
import { LicenseException } from './init/license_exception'
|
|
15
24
|
import { LicensingResultCode } from './init/license_exception'
|
|
16
|
-
export {
|
|
25
|
+
export {
|
|
26
|
+
FaceSDKVersion,
|
|
27
|
+
InitConfig,
|
|
28
|
+
InitException,
|
|
29
|
+
InitErrorCode,
|
|
30
|
+
LicenseException,
|
|
31
|
+
LicensingResultCode,
|
|
32
|
+
}
|
|
17
33
|
|
|
18
34
|
import { DetectFaceResult } from './detect_faces/detect_face_result'
|
|
19
35
|
import { DetectFacesAttributeResult } from './detect_faces/detect_faces_attribute_result'
|
|
@@ -24,34 +40,96 @@ import { DetectFacesException, DetectFacesErrorCode } from './detect_faces/detec
|
|
|
24
40
|
import { DetectFacesRequest } from './detect_faces/detect_faces_request'
|
|
25
41
|
import { DetectFacesResponse } from './detect_faces/detect_faces_response'
|
|
26
42
|
import { DetectFacesScenario } from './detect_faces/detect_faces_scenario'
|
|
27
|
-
export {
|
|
43
|
+
export {
|
|
44
|
+
DetectFaceResult,
|
|
45
|
+
DetectFacesAttributeResult,
|
|
46
|
+
DetectFacesAttribute,
|
|
47
|
+
DetectFacesBackendException,
|
|
48
|
+
DetectFacesBackendErrorCode,
|
|
49
|
+
DetectFacesConfig,
|
|
50
|
+
DetectFacesException,
|
|
51
|
+
DetectFacesErrorCode,
|
|
52
|
+
DetectFacesRequest,
|
|
53
|
+
DetectFacesResponse,
|
|
54
|
+
DetectFacesScenario,
|
|
55
|
+
}
|
|
28
56
|
|
|
29
57
|
import { FaceCaptureConfig } from './face_capture/face_capture_config'
|
|
30
58
|
import { FaceCaptureException, FaceCaptureErrorCode } from './face_capture/face_capture_exception'
|
|
31
59
|
import { FaceCaptureImage, ImageType } from './face_capture/face_capture_image'
|
|
32
60
|
import { FaceCaptureResponse } from './face_capture/face_capture_response'
|
|
33
|
-
export {
|
|
61
|
+
export {
|
|
62
|
+
FaceCaptureConfig,
|
|
63
|
+
FaceCaptureException,
|
|
64
|
+
FaceCaptureErrorCode,
|
|
65
|
+
FaceCaptureImage,
|
|
66
|
+
ImageType,
|
|
67
|
+
FaceCaptureResponse,
|
|
68
|
+
}
|
|
34
69
|
|
|
35
70
|
import { OutputImageCrop, OutputImageCropAspectRatio } from './image_params/output_image_crop'
|
|
36
71
|
import { OutputImageParams } from './image_params/output_image_params'
|
|
37
72
|
import { Point } from './image_params/point'
|
|
38
73
|
import { Rect } from './image_params/rect'
|
|
39
74
|
import { Size } from './image_params/size'
|
|
40
|
-
export {
|
|
75
|
+
export {
|
|
76
|
+
OutputImageCrop,
|
|
77
|
+
OutputImageCropAspectRatio,
|
|
78
|
+
OutputImageParams,
|
|
79
|
+
Point,
|
|
80
|
+
Rect,
|
|
81
|
+
Size,
|
|
82
|
+
}
|
|
41
83
|
|
|
42
84
|
import { ImageQualityCharacteristicName } from './image_quality/image_quality_characteristic_name'
|
|
43
85
|
import { ImageQualityCharacteristic } from './image_quality/image_quality_characteristic'
|
|
44
86
|
import { ImageQualityGroup } from './image_quality/image_quality_group'
|
|
45
87
|
import { ImageQualityRange } from './image_quality/image_quality_range'
|
|
46
88
|
import { ImageQualityResult, ImageQualityGroupName, ImageQualityResultStatus } from './image_quality/image_quality_result'
|
|
47
|
-
export {
|
|
89
|
+
export {
|
|
90
|
+
ImageQualityCharacteristicName,
|
|
91
|
+
ImageQualityCharacteristic,
|
|
92
|
+
ImageQualityGroup,
|
|
93
|
+
ImageQualityRange,
|
|
94
|
+
ImageQualityResult,
|
|
95
|
+
ImageQualityGroupName,
|
|
96
|
+
ImageQualityResultStatus,
|
|
97
|
+
}
|
|
48
98
|
|
|
49
|
-
import { LivenessBackendException, LivenessBackendErrorCode } from './liveness/liveness_backend_exception'
|
|
50
99
|
import { LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep } from './liveness/liveness_config'
|
|
100
|
+
import { EnrollmentConfig } from './liveness/enrollment_config'
|
|
101
|
+
import { EnrollmentRequest } from './liveness/enrollment_request'
|
|
102
|
+
import { VerificationConfig } from './liveness/verification_config'
|
|
103
|
+
import { LivenessBackendException, LivenessBackendErrorCode } from './liveness/liveness_backend_exception'
|
|
51
104
|
import { LivenessException, LivenessErrorCode } from './liveness/liveness_exception'
|
|
52
|
-
import { LivenessNotification, LivenessProcessStatus, LivenessNotificationCompletion } from './liveness/liveness_notification'
|
|
53
105
|
import { LivenessResponse, LivenessStatus } from './liveness/liveness_response'
|
|
54
|
-
|
|
106
|
+
import { LivenessNotification, LivenessProcessStatus, LivenessNotificationCompletion } from './liveness/liveness_notification'
|
|
107
|
+
import { ErrorResponse } from './liveness/error_response'
|
|
108
|
+
import { EnrollmentResponse } from './liveness/enrollment_response'
|
|
109
|
+
import { VerifyMatchResponse } from './liveness/verify_match_response'
|
|
110
|
+
import { VerificationResponse } from './liveness/verification_response'
|
|
111
|
+
export {
|
|
112
|
+
LivenessBackendException,
|
|
113
|
+
LivenessBackendErrorCode,
|
|
114
|
+
LivenessConfig,
|
|
115
|
+
RecordingProcess,
|
|
116
|
+
LivenessType,
|
|
117
|
+
LivenessSkipStep,
|
|
118
|
+
LivenessException,
|
|
119
|
+
LivenessErrorCode,
|
|
120
|
+
LivenessNotification,
|
|
121
|
+
LivenessProcessStatus,
|
|
122
|
+
LivenessNotificationCompletion,
|
|
123
|
+
LivenessResponse,
|
|
124
|
+
LivenessStatus,
|
|
125
|
+
// EnrollmentConfig,
|
|
126
|
+
// EnrollmentRequest,
|
|
127
|
+
// VerificationConfig,
|
|
128
|
+
// ErrorResponse,
|
|
129
|
+
// EnrollmentResponse,
|
|
130
|
+
// VerifyMatchResponse,
|
|
131
|
+
// VerificationResponse,
|
|
132
|
+
}
|
|
55
133
|
|
|
56
134
|
import { ComparedFace } from './match_faces/compared_face'
|
|
57
135
|
import { ComparedFacesPair } from './match_faces/compared_faces_pair'
|
|
@@ -64,7 +142,21 @@ import { MatchFacesException, MatchFacesErrorCode } from './match_faces/match_fa
|
|
|
64
142
|
import { MatchFacesImage } from './match_faces/match_faces_image'
|
|
65
143
|
import { MatchFacesRequest } from './match_faces/match_faces_request'
|
|
66
144
|
import { MatchFacesResponse } from './match_faces/match_faces_response'
|
|
67
|
-
export {
|
|
145
|
+
export {
|
|
146
|
+
ComparedFace,
|
|
147
|
+
ComparedFacesPair,
|
|
148
|
+
ComparedFacesSplit,
|
|
149
|
+
MatchFacesBackendException,
|
|
150
|
+
MatchFacesConfig,
|
|
151
|
+
ProcessingMode,
|
|
152
|
+
MatchFacesDetectionFace,
|
|
153
|
+
MatchFacesDetection,
|
|
154
|
+
MatchFacesException,
|
|
155
|
+
MatchFacesErrorCode,
|
|
156
|
+
MatchFacesImage,
|
|
157
|
+
MatchFacesRequest,
|
|
158
|
+
MatchFacesResponse,
|
|
159
|
+
}
|
|
68
160
|
|
|
69
161
|
import { EditGroupPersonsRequest } from './person_database/edit_group_persons_request'
|
|
70
162
|
import { ImageUpload } from './person_database/image_upload'
|
|
@@ -77,7 +169,19 @@ import { SearchPersonDetection } from './person_database/search_person_detection
|
|
|
77
169
|
import { SearchPersonImage } from './person_database/search_person_image'
|
|
78
170
|
import { SearchPersonRequest } from './person_database/search_person_request'
|
|
79
171
|
import { SearchPerson } from './person_database/search_person'
|
|
80
|
-
export {
|
|
172
|
+
export {
|
|
173
|
+
EditGroupPersonsRequest,
|
|
174
|
+
ImageUpload,
|
|
175
|
+
PageableItemList,
|
|
176
|
+
PersonDatabase,
|
|
177
|
+
PersonGroup,
|
|
178
|
+
PersonImage,
|
|
179
|
+
Person,
|
|
180
|
+
SearchPersonDetection,
|
|
181
|
+
SearchPersonImage,
|
|
182
|
+
SearchPersonRequest,
|
|
183
|
+
SearchPerson,
|
|
184
|
+
}
|
|
81
185
|
|
|
82
186
|
/**
|
|
83
187
|
* Entry point of the Regula Face SDK.
|
|
@@ -151,7 +255,7 @@ export class FaceSDK {
|
|
|
151
255
|
* and a nullable {@link InitException}.
|
|
152
256
|
*/
|
|
153
257
|
initialize(
|
|
154
|
-
|
|
258
|
+
options?: {
|
|
155
259
|
config?: InitConfig
|
|
156
260
|
}
|
|
157
261
|
): Promise<[boolean, InitException | null]>
|
|
@@ -163,7 +267,7 @@ export class FaceSDK {
|
|
|
163
267
|
deinitialize(): void
|
|
164
268
|
|
|
165
269
|
startFaceCapture(
|
|
166
|
-
|
|
270
|
+
options?: {
|
|
167
271
|
config?: FaceCaptureConfig,
|
|
168
272
|
cameraSwitchCallback?: CameraSwitchCallback,
|
|
169
273
|
}
|
|
@@ -172,18 +276,36 @@ export class FaceSDK {
|
|
|
172
276
|
stopFaceCapture(): void
|
|
173
277
|
|
|
174
278
|
startLiveness(
|
|
175
|
-
|
|
279
|
+
options?: {
|
|
176
280
|
config?: LivenessConfig,
|
|
177
281
|
notificationCompletion?: LivenessNotificationCompletion,
|
|
178
282
|
cameraSwitchCallback?: CameraSwitchCallback,
|
|
179
283
|
}
|
|
180
284
|
): Promise<LivenessResponse>
|
|
181
285
|
|
|
286
|
+
// startEnrollment(
|
|
287
|
+
// config: EnrollmentConfig,
|
|
288
|
+
// options?: {
|
|
289
|
+
// notificationCompletion?: LivenessNotificationCompletion,
|
|
290
|
+
// cameraSwitchCallback?: CameraSwitchCallback,
|
|
291
|
+
// }
|
|
292
|
+
// ): Promise<[LivenessResponse, EnrollmentResponse | null]>
|
|
293
|
+
|
|
294
|
+
// startVerification(
|
|
295
|
+
// config: VerificationConfig,
|
|
296
|
+
// options?: {
|
|
297
|
+
// notificationCompletion?: LivenessNotificationCompletion,
|
|
298
|
+
// cameraSwitchCallback?: CameraSwitchCallback,
|
|
299
|
+
// }
|
|
300
|
+
// ): Promise<[LivenessResponse, VerificationResponse | null]>
|
|
301
|
+
|
|
302
|
+
// enrollWithTrustedPhoto(request: EnrollmentRequest): Promise<EnrollmentResponse>
|
|
303
|
+
|
|
182
304
|
stopLiveness(): void
|
|
183
305
|
|
|
184
306
|
matchFaces(
|
|
185
307
|
request: MatchFacesRequest,
|
|
186
|
-
|
|
308
|
+
options?: {
|
|
187
309
|
config?: MatchFacesConfig
|
|
188
310
|
}
|
|
189
311
|
): Promise<MatchFacesResponse>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { CameraPosition } from '../customization/camera_position'
|
|
2
|
+
import { ScreenOrientation } from '../customization/screen_orientation'
|
|
3
|
+
import { RecordingProcess, LivenessType, LivenessSkipStep } from './liveness_config'
|
|
4
|
+
|
|
5
|
+
export interface EnrollmentConfig {
|
|
6
|
+
/**
|
|
7
|
+
* Defines, whether the logo is visible on the bottom of Liveness UI screens. Defaults to `true`.
|
|
8
|
+
*/
|
|
9
|
+
copyright?: boolean
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Defines, whether the camera's toolbar switch camera button is available on the Liveness UI. Defaults to `false`.
|
|
13
|
+
* When set to `true` the CameraToolbarView will contain a button to change current `cameraPosition`.
|
|
14
|
+
* Only for livenessType = {@link LivenessType.PASSIVE}.
|
|
15
|
+
*/
|
|
16
|
+
cameraSwitchEnabled?: boolean
|
|
17
|
+
|
|
18
|
+
closeButtonEnabled?: boolean
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Defines, whether the camera's toolbar torch button is available on the Liveness UI. Defaults to `true`.
|
|
22
|
+
* When set to `false` the CameraToolbarView won't contain a button to toggle camera's flashlight.
|
|
23
|
+
* Only for livenessType = {@link LivenessType.PASSIVE}.
|
|
24
|
+
*/
|
|
25
|
+
torchButtonEnabled?: boolean
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Enables vibration during Liveness processing. Defaults to `true`.
|
|
29
|
+
*/
|
|
30
|
+
vibrateOnSteps?: boolean
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Android only.
|
|
34
|
+
*/
|
|
35
|
+
cameraPositionAndroid?: number
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* IOS only.
|
|
39
|
+
*/
|
|
40
|
+
cameraPositionIOS?: CameraPosition
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Allows you to specify an orientation of the camera view controller.
|
|
44
|
+
*/
|
|
45
|
+
screenOrientation?: Array<ScreenOrientation>
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Defines whether the liveness request sends a location of a device. Defaults to `true`.
|
|
49
|
+
* When set to `true` the liveness request to web service will contain the `location`
|
|
50
|
+
* object within the json `metadata` object.
|
|
51
|
+
* The location is used only when permissions are granted and the location is available.
|
|
52
|
+
*/
|
|
53
|
+
locationTrackingEnabled?: boolean
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Prevents screenshots and screen recording while FaceCapture camera screen is displayed.
|
|
57
|
+
* Defaults to `false`.
|
|
58
|
+
*/
|
|
59
|
+
preventScreenRecording?: boolean
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The number of attempts to pass the Liveness before completing with error. Defaults to `0`.
|
|
63
|
+
* When set to `0` the Liveness will always ask to retry on error.
|
|
64
|
+
*/
|
|
65
|
+
attemptsCount?: number
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Defines whether the liveness recording video of processing.
|
|
69
|
+
* Defaults to {@link RecordingProcess.ASYNCHRONOUS_UPLOAD}.
|
|
70
|
+
*/
|
|
71
|
+
recordingProcess?: RecordingProcess
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Defines whether the liveness processing type. Defaults to {@link LivenessType.ACTIVE}.
|
|
75
|
+
*/
|
|
76
|
+
livenessType?: LivenessType
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Defines tag that can be used in Liveness processing. Defaults to `null`.
|
|
80
|
+
*/
|
|
81
|
+
tag?: string
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Defines which steps of the user interface can be omitted. See {@link LivenessSkipStep} enum for details.
|
|
85
|
+
*/
|
|
86
|
+
skipStep?: Array<LivenessSkipStep>
|
|
87
|
+
|
|
88
|
+
metadata?: Record<string, any>
|
|
89
|
+
|
|
90
|
+
externalId: string
|
|
91
|
+
|
|
92
|
+
groupId?: string
|
|
93
|
+
|
|
94
|
+
checkDuplicatesEnabled?: boolean
|
|
95
|
+
|
|
96
|
+
duplicatesThreshold?: number
|
|
97
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class EnrollmentRequest {
|
|
2
|
+
readonly externalId: string
|
|
3
|
+
readonly groupId?: string
|
|
4
|
+
readonly trustedImage?: string
|
|
5
|
+
readonly trustedImageUrl?: string
|
|
6
|
+
|
|
7
|
+
static withImage(
|
|
8
|
+
externalId: string,
|
|
9
|
+
trustedImage: string,
|
|
10
|
+
options?: {
|
|
11
|
+
groupId?: string
|
|
12
|
+
}
|
|
13
|
+
): EnrollmentRequest;
|
|
14
|
+
|
|
15
|
+
static withImageUrl(
|
|
16
|
+
externalId: string,
|
|
17
|
+
trustedImageUrl: string,
|
|
18
|
+
options?: {
|
|
19
|
+
groupId?: string
|
|
20
|
+
}
|
|
21
|
+
): EnrollmentRequest;
|
|
22
|
+
|
|
23
|
+
private constructor()
|
|
24
|
+
}
|
|
@@ -91,7 +91,7 @@ export class LivenessConfig {
|
|
|
91
91
|
metadata?: Record<string, any>
|
|
92
92
|
|
|
93
93
|
constructor(
|
|
94
|
-
|
|
94
|
+
options?: {
|
|
95
95
|
copyright?: boolean
|
|
96
96
|
cameraSwitchEnabled?: boolean
|
|
97
97
|
closeButtonEnabled?: boolean
|
|
@@ -121,6 +121,7 @@ export enum RecordingProcess {
|
|
|
121
121
|
export enum LivenessType {
|
|
122
122
|
ACTIVE,
|
|
123
123
|
PASSIVE,
|
|
124
|
+
PASSIVE_WITH_BLINK,
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
export enum LivenessSkipStep {
|
|
@@ -9,18 +9,48 @@ export class LivenessException {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export enum LivenessErrorCode {
|
|
12
|
+
/** FaceSDK Core is not initialized. */
|
|
12
13
|
NOT_INITIALIZED,
|
|
14
|
+
/** There is no valid license on the service. */
|
|
13
15
|
NO_LICENSE,
|
|
16
|
+
/** Liveness API call failed due to networking error or backend internal error. */
|
|
14
17
|
API_CALL_FAILED,
|
|
18
|
+
/** Failed when Core could not start new session. */
|
|
15
19
|
SESSION_START_FAILED,
|
|
20
|
+
/** User cancelled liveness processing. */
|
|
16
21
|
CANCELLED,
|
|
22
|
+
/** Processing finished by timeout. */
|
|
17
23
|
PROCESSING_TIMEOUT,
|
|
24
|
+
/** Processing failed. */
|
|
18
25
|
PROCESSING_FAILED,
|
|
26
|
+
/** Failed when Core cannot recognize frame. */
|
|
19
27
|
PROCESSING_FRAME_FAILED,
|
|
28
|
+
/** Client application did enter the background, liveness process interrupted. */
|
|
20
29
|
APPLICATION_INACTIVE,
|
|
30
|
+
/** Processing finished by bad face quality. */
|
|
31
|
+
BAD_FACE_QUALITY,
|
|
32
|
+
/** Processing finished by bad frame size. */
|
|
33
|
+
BAD_FRAME_SIZE,
|
|
34
|
+
/** Device has no available camera. */
|
|
35
|
+
CAMERA_NOT_AVAILABLE,
|
|
36
|
+
/** Application does not have camera permission. */
|
|
37
|
+
CAMERA_NO_PERMISSION,
|
|
38
|
+
/**
|
|
39
|
+
* Application context is null.
|
|
40
|
+
*
|
|
41
|
+
* Android only.
|
|
42
|
+
*/
|
|
21
43
|
CONTEXT_IS_NULL,
|
|
44
|
+
/**
|
|
45
|
+
* Liveness process already in progress.
|
|
46
|
+
*
|
|
47
|
+
* Android only.
|
|
48
|
+
*/
|
|
22
49
|
IN_PROGRESS_ALREADY,
|
|
50
|
+
/**
|
|
51
|
+
* The camera on the current device doesn't support zoom change.
|
|
52
|
+
*
|
|
53
|
+
* Android only.
|
|
54
|
+
*/
|
|
23
55
|
ZOOM_NOT_SUPPORTED,
|
|
24
|
-
CAMERA_NO_PERMISSION,
|
|
25
|
-
CAMERA_NOT_AVAILABLE,
|
|
26
56
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { CameraPosition } from '../customization/camera_position'
|
|
2
|
+
import { ScreenOrientation } from '../customization/screen_orientation'
|
|
3
|
+
import { RecordingProcess, LivenessType, LivenessSkipStep } from './liveness_config'
|
|
4
|
+
|
|
5
|
+
export interface VerificationConfig {
|
|
6
|
+
/**
|
|
7
|
+
* Defines, whether the logo is visible on the bottom of Liveness UI screens. Defaults to `true`.
|
|
8
|
+
*/
|
|
9
|
+
copyright?: boolean
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Defines, whether the camera's toolbar switch camera button is available on the Liveness UI. Defaults to `false`.
|
|
13
|
+
* When set to `true` the CameraToolbarView will contain a button to change current `cameraPosition`.
|
|
14
|
+
* Only for livenessType = {@link LivenessType.PASSIVE}.
|
|
15
|
+
*/
|
|
16
|
+
cameraSwitchEnabled?: boolean
|
|
17
|
+
|
|
18
|
+
closeButtonEnabled?: boolean
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Defines, whether the camera's toolbar torch button is available on the Liveness UI. Defaults to `true`.
|
|
22
|
+
* When set to `false` the CameraToolbarView won't contain a button to toggle camera's flashlight.
|
|
23
|
+
* Only for livenessType = {@link LivenessType.PASSIVE}.
|
|
24
|
+
*/
|
|
25
|
+
torchButtonEnabled?: boolean
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Enables vibration during Liveness processing. Defaults to `true`.
|
|
29
|
+
*/
|
|
30
|
+
vibrateOnSteps?: boolean
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Android only.
|
|
34
|
+
*/
|
|
35
|
+
cameraPositionAndroid?: number
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* IOS only.
|
|
39
|
+
*/
|
|
40
|
+
cameraPositionIOS?: CameraPosition
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Allows you to specify an orientation of the camera view controller.
|
|
44
|
+
*/
|
|
45
|
+
screenOrientation?: Array<ScreenOrientation>
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Defines whether the liveness request sends a location of a device. Defaults to `true`.
|
|
49
|
+
* When set to `true` the liveness request to web service will contain the `location`
|
|
50
|
+
* object within the json `metadata` object.
|
|
51
|
+
* The location is used only when permissions are granted and the location is available.
|
|
52
|
+
*/
|
|
53
|
+
locationTrackingEnabled?: boolean
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Prevents screenshots and screen recording while FaceCapture camera screen is displayed.
|
|
57
|
+
* Defaults to `false`.
|
|
58
|
+
*/
|
|
59
|
+
preventScreenRecording?: boolean
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The number of attempts to pass the Liveness before completing with error. Defaults to `0`.
|
|
63
|
+
* When set to `0` the Liveness will always ask to retry on error.
|
|
64
|
+
*/
|
|
65
|
+
attemptsCount?: number
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Defines whether the liveness recording video of processing.
|
|
69
|
+
* Defaults to {@link RecordingProcess.ASYNCHRONOUS_UPLOAD}.
|
|
70
|
+
*/
|
|
71
|
+
recordingProcess?: RecordingProcess
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Defines whether the liveness processing type. Defaults to {@link LivenessType.ACTIVE}.
|
|
75
|
+
*/
|
|
76
|
+
livenessType?: LivenessType
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Defines tag that can be used in Liveness processing. Defaults to `null`.
|
|
80
|
+
*/
|
|
81
|
+
tag?: string
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Defines which steps of the user interface can be omitted. See {@link LivenessSkipStep} enum for details.
|
|
85
|
+
*/
|
|
86
|
+
skipStep?: Array<LivenessSkipStep>
|
|
87
|
+
|
|
88
|
+
metadata?: Record<string, any>
|
|
89
|
+
|
|
90
|
+
personId: string
|
|
91
|
+
|
|
92
|
+
groupId?: string
|
|
93
|
+
|
|
94
|
+
threshold?: number
|
|
95
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VerifyMatchResponse } from './verify_match_response'
|
|
2
|
+
import { ErrorResponse } from './error_response'
|
|
3
|
+
|
|
4
|
+
export class VerificationResponse {
|
|
5
|
+
readonly passed: boolean
|
|
6
|
+
readonly match?: VerifyMatchResponse
|
|
7
|
+
readonly error?: ErrorResponse
|
|
8
|
+
|
|
9
|
+
private constructor()
|
|
10
|
+
}
|
|
@@ -13,7 +13,7 @@ import { SearchPerson } from './search_person'
|
|
|
13
13
|
export class PersonDatabase {
|
|
14
14
|
createPerson(
|
|
15
15
|
name: string,
|
|
16
|
-
|
|
16
|
+
options?: {
|
|
17
17
|
groupIds?: string[],
|
|
18
18
|
metadata?: any,
|
|
19
19
|
}
|
|
@@ -50,7 +50,7 @@ export class PersonDatabase {
|
|
|
50
50
|
|
|
51
51
|
createGroup(
|
|
52
52
|
name: string,
|
|
53
|
-
|
|
53
|
+
options?: {
|
|
54
54
|
metadata?: any,
|
|
55
55
|
}
|
|
56
56
|
): Promise<[PersonGroup | null, string | null]>
|