@regulaforensics/face-sdk 8.3.1107-rc → 8.3.1112-rc
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 +1 -1
- package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +0 -91
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +3 -106
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +1 -39
- package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +1 -0
- package/app.plugin.js +42 -0
- package/examples/capacitor/ios/App/Podfile +2 -1
- package/examples/capacitor/package.json +1 -1
- package/examples/ionic/package-lock.json +465 -472
- package/examples/ionic/package.json +13 -12
- package/examples/react_native/app.config.ts +1 -0
- package/examples/react_native/package-lock.json +11 -11
- package/examples/react_native/package.json +1 -1
- package/ios/Config.swift +1 -109
- package/ios/Decoder.swift +3 -71
- package/ios/Main.swift +4 -24
- package/package.json +4 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +57 -134
- package/test/package-lock.json +5 -2
- package/test/test.tsx +60 -68
- package/www/capacitor/customization/customization_images.js +0 -40
- package/www/capacitor/index.js +12 -33
- package/www/capacitor/liveness/liveness_config.js +0 -1
- package/www/capacitor/liveness/liveness_exception.js +5 -6
- package/www/capacitor/liveness/liveness_notification.js +0 -2
- package/www/cordova.js +106 -606
- package/www/react-native/customization/customization_images.js +0 -40
- package/www/react-native/index.js +12 -33
- package/www/react-native/liveness/liveness_config.js +0 -1
- package/www/react-native/liveness/liveness_exception.js +5 -6
- package/www/react-native/liveness/liveness_notification.js +0 -2
- package/www/types/customization/customization_images.d.ts +0 -5
- package/www/types/index.d.ts +3 -28
- package/www/types/liveness/liveness_config.d.ts +0 -1
- package/www/types/liveness/liveness_exception.d.ts +0 -1
- package/www/types/liveness/liveness_notification.d.ts +0 -2
- package/www/capacitor/liveness/enrollment_config.js +0 -102
- package/www/capacitor/liveness/enrollment_request.js +0 -34
- package/www/capacitor/liveness/enrollment_response.js +0 -26
- package/www/capacitor/liveness/error_response.js +0 -21
- package/www/capacitor/liveness/verification_config.js +0 -98
- package/www/capacitor/liveness/verification_response.js +0 -27
- package/www/capacitor/liveness/verify_match_response.js +0 -21
- package/www/react-native/liveness/enrollment_config.js +0 -102
- package/www/react-native/liveness/enrollment_request.js +0 -34
- package/www/react-native/liveness/enrollment_response.js +0 -26
- package/www/react-native/liveness/error_response.js +0 -21
- package/www/react-native/liveness/verification_config.js +0 -98
- package/www/react-native/liveness/verification_response.js +0 -27
- package/www/react-native/liveness/verify_match_response.js +0 -21
- package/www/types/liveness/enrollment_config.d.ts +0 -97
- package/www/types/liveness/enrollment_request.d.ts +0 -6
- package/www/types/liveness/enrollment_response.d.ts +0 -9
- package/www/types/liveness/error_response.d.ts +0 -6
- package/www/types/liveness/verification_config.d.ts +0 -95
- package/www/types/liveness/verification_response.d.ts +0 -10
- package/www/types/liveness/verify_match_response.d.ts +0 -6
|
@@ -73,36 +73,6 @@ export class CustomizationImages {
|
|
|
73
73
|
this._set({ "retryScreenHintGeo": val })
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
_retryScreenHintBadSelfieQuality
|
|
77
|
-
set retryScreenHintBadSelfieQuality(val) {
|
|
78
|
-
this._retryScreenHintBadSelfieQuality = val
|
|
79
|
-
this._set({ "retryScreenHintBadSelfieQuality": val })
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
_retryScreenHintCleanLens
|
|
83
|
-
set retryScreenHintCleanLens(val) {
|
|
84
|
-
this._retryScreenHintCleanLens = val
|
|
85
|
-
this._set({ "retryScreenHintCleanLens": val })
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
_retryScreenHintAddIllumination
|
|
89
|
-
set retryScreenHintAddIllumination(val) {
|
|
90
|
-
this._retryScreenHintAddIllumination = val
|
|
91
|
-
this._set({ "retryScreenHintAddIllumination": val })
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
_retryScreenHintChangeBackground
|
|
95
|
-
set retryScreenHintChangeBackground(val) {
|
|
96
|
-
this._retryScreenHintChangeBackground = val
|
|
97
|
-
this._set({ "retryScreenHintChangeBackground": val })
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
_retryScreenHintFaceOcclusions
|
|
101
|
-
set retryScreenHintFaceOcclusions(val) {
|
|
102
|
-
this._retryScreenHintFaceOcclusions = val
|
|
103
|
-
this._set({ "retryScreenHintFaceOcclusions": val })
|
|
104
|
-
}
|
|
105
|
-
|
|
106
76
|
_processingScreenCloseButton
|
|
107
77
|
set processingScreenCloseButton(val) {
|
|
108
78
|
this._processingScreenCloseButton = val
|
|
@@ -130,11 +100,6 @@ export class CustomizationImages {
|
|
|
130
100
|
result._retryScreenHintEnvironment = jsonObject["retryScreenHintEnvironment"]
|
|
131
101
|
result._retryScreenHintSubject = jsonObject["retryScreenHintSubject"]
|
|
132
102
|
result._retryScreenHintGeo = jsonObject["retryScreenHintGeo"]
|
|
133
|
-
result._retryScreenHintBadSelfieQuality = jsonObject["retryScreenHintBadSelfieQuality"]
|
|
134
|
-
result._retryScreenHintCleanLens = jsonObject["retryScreenHintCleanLens"]
|
|
135
|
-
result._retryScreenHintAddIllumination = jsonObject["retryScreenHintAddIllumination"]
|
|
136
|
-
result._retryScreenHintChangeBackground = jsonObject["retryScreenHintChangeBackground"]
|
|
137
|
-
result._retryScreenHintFaceOcclusions = jsonObject["retryScreenHintFaceOcclusions"]
|
|
138
103
|
result._processingScreenCloseButton = jsonObject["processingScreenCloseButton"]
|
|
139
104
|
result._successScreenImage = jsonObject["successScreenImage"]
|
|
140
105
|
|
|
@@ -155,11 +120,6 @@ export class CustomizationImages {
|
|
|
155
120
|
"retryScreenHintEnvironment": this._retryScreenHintEnvironment,
|
|
156
121
|
"retryScreenHintSubject": this._retryScreenHintSubject,
|
|
157
122
|
"retryScreenHintGeo": this._retryScreenHintGeo,
|
|
158
|
-
"retryScreenHintBadSelfieQuality": this._retryScreenHintBadSelfieQuality,
|
|
159
|
-
"retryScreenHintCleanLens": this._retryScreenHintCleanLens,
|
|
160
|
-
"retryScreenHintAddIllumination": this._retryScreenHintAddIllumination,
|
|
161
|
-
"retryScreenHintChangeBackground": this._retryScreenHintChangeBackground,
|
|
162
|
-
"retryScreenHintFaceOcclusions": this._retryScreenHintFaceOcclusions,
|
|
163
123
|
"processingScreenCloseButton": this._processingScreenCloseButton,
|
|
164
124
|
"successScreenImage": this._successScreenImage,
|
|
165
125
|
}
|
|
@@ -7,6 +7,7 @@ import { CustomizationImages } from './customization/customization_images'
|
|
|
7
7
|
import { Customization } from './customization/customization'
|
|
8
8
|
import { Font } from './customization/font'
|
|
9
9
|
import { ScreenOrientation } from './customization/screen_orientation'
|
|
10
|
+
|
|
10
11
|
export { CameraPosition, CustomizationColors, CustomizationFonts, CustomizationImages, Customization, Font, ScreenOrientation }
|
|
11
12
|
|
|
12
13
|
import { FaceSDKVersion } from './init/face_sdk_version'
|
|
@@ -15,6 +16,7 @@ import { InitException } from './init/init_exception'
|
|
|
15
16
|
import { InitErrorCode } from './init/init_exception'
|
|
16
17
|
import { LicenseException } from './init/license_exception'
|
|
17
18
|
import { LicensingResultCode } from './init/license_exception'
|
|
19
|
+
|
|
18
20
|
export { FaceSDKVersion, InitConfig, InitException, InitErrorCode, LicenseException, LicensingResultCode }
|
|
19
21
|
|
|
20
22
|
import { DetectFaceResult } from './detect_faces/detect_face_result'
|
|
@@ -26,12 +28,14 @@ import { DetectFacesException, DetectFacesErrorCode } from './detect_faces/detec
|
|
|
26
28
|
import { DetectFacesRequest } from './detect_faces/detect_faces_request'
|
|
27
29
|
import { DetectFacesResponse } from './detect_faces/detect_faces_response'
|
|
28
30
|
import { DetectFacesScenario } from './detect_faces/detect_faces_scenario'
|
|
31
|
+
|
|
29
32
|
export { DetectFaceResult, DetectFacesAttributeResult, DetectFacesAttribute, DetectFacesBackendException, DetectFacesBackendErrorCode, DetectFacesConfig, DetectFacesException, DetectFacesErrorCode, DetectFacesRequest, DetectFacesResponse, DetectFacesScenario }
|
|
30
33
|
|
|
31
34
|
import { FaceCaptureConfig } from './face_capture/face_capture_config'
|
|
32
35
|
import { FaceCaptureException, FaceCaptureErrorCode } from './face_capture/face_capture_exception'
|
|
33
36
|
import { FaceCaptureImage, ImageType } from './face_capture/face_capture_image'
|
|
34
37
|
import { FaceCaptureResponse } from './face_capture/face_capture_response'
|
|
38
|
+
|
|
35
39
|
export { FaceCaptureConfig, FaceCaptureException, FaceCaptureErrorCode, FaceCaptureImage, ImageType, FaceCaptureResponse }
|
|
36
40
|
|
|
37
41
|
import { OutputImageCrop, OutputImageCropAspectRatio } from './image_params/output_image_crop'
|
|
@@ -39,6 +43,7 @@ import { OutputImageParams } from './image_params/output_image_params'
|
|
|
39
43
|
import { Point } from './image_params/point'
|
|
40
44
|
import { Rect } from './image_params/rect'
|
|
41
45
|
import { Size } from './image_params/size'
|
|
46
|
+
|
|
42
47
|
export { OutputImageCrop, OutputImageCropAspectRatio, OutputImageParams, Point, Rect, Size }
|
|
43
48
|
|
|
44
49
|
import { ImageQualityCharacteristicName } from './image_quality/image_quality_characteristic_name'
|
|
@@ -46,21 +51,16 @@ import { ImageQualityCharacteristic } from './image_quality/image_quality_charac
|
|
|
46
51
|
import { ImageQualityGroup } from './image_quality/image_quality_group'
|
|
47
52
|
import { ImageQualityRange } from './image_quality/image_quality_range'
|
|
48
53
|
import { ImageQualityResult, ImageQualityGroupName, ImageQualityResultStatus } from './image_quality/image_quality_result'
|
|
54
|
+
|
|
49
55
|
export { ImageQualityCharacteristicName, ImageQualityCharacteristic, ImageQualityGroup, ImageQualityRange, ImageQualityResult, ImageQualityGroupName, ImageQualityResultStatus }
|
|
50
56
|
|
|
51
|
-
import { LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep } from './liveness/liveness_config'
|
|
52
|
-
import { EnrollmentConfig } from './liveness/enrollment_config'
|
|
53
|
-
import { EnrollmentRequest } from './liveness/enrollment_request'
|
|
54
|
-
import { VerificationConfig } from './liveness/verification_config'
|
|
55
57
|
import { LivenessBackendException, LivenessBackendErrorCode } from './liveness/liveness_backend_exception'
|
|
58
|
+
import { LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep } from './liveness/liveness_config'
|
|
56
59
|
import { LivenessException, LivenessErrorCode } from './liveness/liveness_exception'
|
|
57
|
-
import { LivenessResponse, LivenessStatus } from './liveness/liveness_response'
|
|
58
60
|
import { LivenessNotification, LivenessProcessStatus } from './liveness/liveness_notification'
|
|
59
|
-
import {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
import { VerificationResponse } from './liveness/verification_response'
|
|
63
|
-
export { LivenessBackendException, LivenessBackendErrorCode, LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep, LivenessException, LivenessErrorCode, LivenessNotification, LivenessProcessStatus, LivenessResponse, LivenessStatus, EnrollmentConfig, EnrollmentRequest, VerificationConfig, ErrorResponse, EnrollmentResponse, VerifyMatchResponse, VerificationResponse }
|
|
61
|
+
import { LivenessResponse, LivenessStatus } from './liveness/liveness_response'
|
|
62
|
+
|
|
63
|
+
export { LivenessBackendException, LivenessBackendErrorCode, LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep, LivenessException, LivenessErrorCode, LivenessNotification, LivenessProcessStatus, LivenessResponse, LivenessStatus }
|
|
64
64
|
|
|
65
65
|
import { ComparedFace } from './match_faces/compared_face'
|
|
66
66
|
import { ComparedFacesPair } from './match_faces/compared_faces_pair'
|
|
@@ -73,6 +73,7 @@ import { MatchFacesException, MatchFacesErrorCode } from './match_faces/match_fa
|
|
|
73
73
|
import { MatchFacesImage } from './match_faces/match_faces_image'
|
|
74
74
|
import { MatchFacesRequest } from './match_faces/match_faces_request'
|
|
75
75
|
import { MatchFacesResponse } from './match_faces/match_faces_response'
|
|
76
|
+
|
|
76
77
|
export { ComparedFace, ComparedFacesPair, ComparedFacesSplit, MatchFacesBackendException, MatchFacesConfig, ProcessingMode, MatchFacesDetectionFace, MatchFacesDetection, MatchFacesException, MatchFacesErrorCode, MatchFacesImage, MatchFacesRequest, MatchFacesResponse }
|
|
77
78
|
|
|
78
79
|
import { EditGroupPersonsRequest } from './person_database/edit_group_persons_request'
|
|
@@ -86,6 +87,7 @@ import { SearchPersonDetection } from './person_database/search_person_detection
|
|
|
86
87
|
import { SearchPersonImage } from './person_database/search_person_image'
|
|
87
88
|
import { SearchPersonRequest } from './person_database/search_person_request'
|
|
88
89
|
import { SearchPerson } from './person_database/search_person'
|
|
90
|
+
|
|
89
91
|
export { EditGroupPersonsRequest, ImageUpload, PageableItemList, PersonDatabase, PersonGroup, PersonImage, Person, SearchPersonDetection, SearchPersonImage, SearchPersonRequest, SearchPerson }
|
|
90
92
|
|
|
91
93
|
|
|
@@ -193,29 +195,6 @@ export class FaceSDK {
|
|
|
193
195
|
return LivenessResponse.fromJson(JSON.parse(response))
|
|
194
196
|
}
|
|
195
197
|
|
|
196
|
-
async startEnrollment(params) {
|
|
197
|
-
_setCameraSwitchCallback(params?.cameraSwitchCallback)
|
|
198
|
-
_setLivenessNotificationCompletion(params?.notificationCompletion)
|
|
199
|
-
var response = JSON.parse(await exec("startEnrollment", [params.config]))
|
|
200
|
-
var lr = LivenessResponse.fromJson(response["livenessResponse"]);
|
|
201
|
-
var er = EnrollmentResponse.fromJson(response["enrollmentResponse"]);
|
|
202
|
-
return [lr, er];
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
async startVerification(params) {
|
|
206
|
-
_setCameraSwitchCallback(params?.cameraSwitchCallback)
|
|
207
|
-
_setLivenessNotificationCompletion(params?.notificationCompletion)
|
|
208
|
-
var response = JSON.parse(await exec("startVerification", [params.config]))
|
|
209
|
-
var lr = LivenessResponse.fromJson(response["livenessResponse"]);
|
|
210
|
-
var er = VerificationResponse.fromJson(response["verificationResponse"]);
|
|
211
|
-
return [lr, er];
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
async enrollWithTrustedPhoto(request) {
|
|
215
|
-
var response = await exec("enrollWithTrustedPhoto", [request])
|
|
216
|
-
return EnrollmentResponse.fromJson(JSON.parse(response));
|
|
217
|
-
}
|
|
218
|
-
|
|
219
198
|
stopLiveness() {
|
|
220
199
|
exec("stopLiveness", [])
|
|
221
200
|
}
|
|
@@ -35,10 +35,9 @@ export const LivenessErrorCode = {
|
|
|
35
35
|
PROCESSING_FAILED: 6,
|
|
36
36
|
PROCESSING_FRAME_FAILED: 7,
|
|
37
37
|
APPLICATION_INACTIVE: 8,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
CAMERA_NOT_AVAILABLE: 14,
|
|
38
|
+
CONTEXT_IS_NULL: 9,
|
|
39
|
+
IN_PROGRESS_ALREADY: 10,
|
|
40
|
+
ZOOM_NOT_SUPPORTED: 11,
|
|
41
|
+
CAMERA_NO_PERMISSION: 12,
|
|
42
|
+
CAMERA_NOT_AVAILABLE: 13,
|
|
44
43
|
}
|
|
@@ -11,11 +11,6 @@ export class CustomizationImages {
|
|
|
11
11
|
set retryScreenHintEnvironment(val: string)
|
|
12
12
|
set retryScreenHintSubject(val: string)
|
|
13
13
|
set retryScreenHintGeo(val: string)
|
|
14
|
-
set retryScreenHintBadSelfieQuality(val: string)
|
|
15
|
-
set retryScreenHintCleanLens(val: string)
|
|
16
|
-
set retryScreenHintAddIllumination(val: string)
|
|
17
|
-
set retryScreenHintChangeBackground(val: string)
|
|
18
|
-
set retryScreenHintFaceOcclusions(val: string)
|
|
19
14
|
set processingScreenCloseButton(val: string)
|
|
20
15
|
set successScreenImage(val: string)
|
|
21
16
|
|
package/www/types/index.d.ts
CHANGED
|
@@ -46,19 +46,12 @@ import { ImageQualityRange } from './image_quality/image_quality_range'
|
|
|
46
46
|
import { ImageQualityResult, ImageQualityGroupName, ImageQualityResultStatus } from './image_quality/image_quality_result'
|
|
47
47
|
export { ImageQualityCharacteristicName, ImageQualityCharacteristic, ImageQualityGroup, ImageQualityRange, ImageQualityResult, ImageQualityGroupName, ImageQualityResultStatus }
|
|
48
48
|
|
|
49
|
-
import { LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep } from './liveness/liveness_config'
|
|
50
|
-
import { EnrollmentConfig } from './liveness/enrollment_config'
|
|
51
|
-
import { EnrollmentRequest } from './liveness/enrollment_request'
|
|
52
|
-
import { VerificationConfig } from './liveness/verification_config'
|
|
53
49
|
import { LivenessBackendException, LivenessBackendErrorCode } from './liveness/liveness_backend_exception'
|
|
50
|
+
import { LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep } from './liveness/liveness_config'
|
|
54
51
|
import { LivenessException, LivenessErrorCode } from './liveness/liveness_exception'
|
|
55
|
-
import { LivenessResponse, LivenessStatus } from './liveness/liveness_response'
|
|
56
52
|
import { LivenessNotification, LivenessProcessStatus, LivenessNotificationCompletion } from './liveness/liveness_notification'
|
|
57
|
-
import {
|
|
58
|
-
|
|
59
|
-
import { VerifyMatchResponse } from './liveness/verify_match_response'
|
|
60
|
-
import { VerificationResponse } from './liveness/verification_response'
|
|
61
|
-
export { LivenessBackendException, LivenessBackendErrorCode, LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep, LivenessException, LivenessErrorCode, LivenessNotification, LivenessProcessStatus, LivenessNotificationCompletion, LivenessResponse, LivenessStatus, EnrollmentConfig, EnrollmentRequest, VerificationConfig, ErrorResponse, EnrollmentResponse, VerifyMatchResponse, VerificationResponse }
|
|
53
|
+
import { LivenessResponse, LivenessStatus } from './liveness/liveness_response'
|
|
54
|
+
export { LivenessBackendException, LivenessBackendErrorCode, LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep, LivenessException, LivenessErrorCode, LivenessNotification, LivenessProcessStatus, LivenessNotificationCompletion, LivenessResponse, LivenessStatus }
|
|
62
55
|
|
|
63
56
|
import { ComparedFace } from './match_faces/compared_face'
|
|
64
57
|
import { ComparedFacesPair } from './match_faces/compared_faces_pair'
|
|
@@ -186,24 +179,6 @@ export class FaceSDK {
|
|
|
186
179
|
}
|
|
187
180
|
): Promise<LivenessResponse>
|
|
188
181
|
|
|
189
|
-
startEnrollment(
|
|
190
|
-
config: EnrollmentConfig,
|
|
191
|
-
params?: {
|
|
192
|
-
notificationCompletion?: LivenessNotificationCompletion,
|
|
193
|
-
cameraSwitchCallback?: CameraSwitchCallback,
|
|
194
|
-
}
|
|
195
|
-
): Promise<[LivenessResponse, EnrollmentResponse | null]>
|
|
196
|
-
|
|
197
|
-
startVerification(
|
|
198
|
-
config: VerificationConfig,
|
|
199
|
-
params?: {
|
|
200
|
-
notificationCompletion?: LivenessNotificationCompletion,
|
|
201
|
-
cameraSwitchCallback?: CameraSwitchCallback,
|
|
202
|
-
}
|
|
203
|
-
): Promise<[LivenessResponse, VerificationResponse | null]>
|
|
204
|
-
|
|
205
|
-
enrollWithTrustedPhoto(request: EnrollmentRequest): Promise<EnrollmentResponse>
|
|
206
|
-
|
|
207
182
|
stopLiveness(): void
|
|
208
183
|
|
|
209
184
|
matchFaces(
|
|
@@ -1,102 +0,0 @@
|
|
|
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 class EnrollmentConfig {
|
|
6
|
-
copyright
|
|
7
|
-
cameraSwitchEnabled
|
|
8
|
-
closeButtonEnabled
|
|
9
|
-
torchButtonEnabled
|
|
10
|
-
vibrateOnSteps
|
|
11
|
-
cameraPositionIOS
|
|
12
|
-
cameraPositionAndroid
|
|
13
|
-
screenOrientation
|
|
14
|
-
locationTrackingEnabled
|
|
15
|
-
preventScreenRecording
|
|
16
|
-
attemptsCount
|
|
17
|
-
recordingProcess
|
|
18
|
-
livenessType
|
|
19
|
-
tag
|
|
20
|
-
skipStep
|
|
21
|
-
metadata
|
|
22
|
-
externalId
|
|
23
|
-
groupId
|
|
24
|
-
checkDuplicatesEnabled
|
|
25
|
-
duplicatesThreshold
|
|
26
|
-
|
|
27
|
-
constructor(params) {
|
|
28
|
-
this.copyright = params?.copyright ?? true
|
|
29
|
-
this.cameraSwitchEnabled = params?.cameraSwitchEnabled ?? false
|
|
30
|
-
this.closeButtonEnabled = params?.closeButtonEnabled ?? true
|
|
31
|
-
this.torchButtonEnabled = params?.torchButtonEnabled ?? true
|
|
32
|
-
this.vibrateOnSteps = params?.vibrateOnSteps ?? true
|
|
33
|
-
this.cameraPositionIOS = params?.cameraPositionIOS ?? CameraPosition.FRONT
|
|
34
|
-
this.cameraPositionAndroid = params?.cameraPositionAndroid
|
|
35
|
-
this.screenOrientation = params?.screenOrientation ?? [ScreenOrientation.PORTRAIT]
|
|
36
|
-
this.locationTrackingEnabled = params?.locationTrackingEnabled ?? true
|
|
37
|
-
this.preventScreenRecording = params?.preventScreenRecording ?? false
|
|
38
|
-
this.attemptsCount = params?.attemptsCount ?? 0
|
|
39
|
-
this.recordingProcess = params?.recordingProcess ?? RecordingProcess.ASYNCHRONOUS_UPLOAD
|
|
40
|
-
this.livenessType = params?.livenessType ?? LivenessType.ACTIVE
|
|
41
|
-
this.tag = params?.tag
|
|
42
|
-
this.skipStep = params?.skipStep ?? []
|
|
43
|
-
this.metadata = params?.metadata
|
|
44
|
-
this.externalId = params?.externalId
|
|
45
|
-
this.groupId = params?.groupId
|
|
46
|
-
this.checkDuplicatesEnabled = params?.checkDuplicatesEnabled
|
|
47
|
-
this.duplicatesThreshold = params?.duplicatesThreshold
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static fromJson(jsonObject) {
|
|
51
|
-
if (jsonObject == null) return null
|
|
52
|
-
const result = new EnrollmentConfig()
|
|
53
|
-
|
|
54
|
-
result.copyright = jsonObject["copyright"]
|
|
55
|
-
result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"]
|
|
56
|
-
result.closeButtonEnabled = jsonObject["closeButtonEnabled"]
|
|
57
|
-
result.torchButtonEnabled = jsonObject["torchButtonEnabled"]
|
|
58
|
-
result.vibrateOnSteps = jsonObject["vibrateOnSteps"]
|
|
59
|
-
result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"]
|
|
60
|
-
result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
|
|
61
|
-
result.screenOrientation = jsonObject["screenOrientation"]
|
|
62
|
-
result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
|
|
63
|
-
result.preventScreenRecording = jsonObject["preventScreenRecording"]
|
|
64
|
-
result.attemptsCount = jsonObject["attemptsCount"]
|
|
65
|
-
result.recordingProcess = jsonObject["recordingProcess"]
|
|
66
|
-
result.livenessType = jsonObject["livenessType"]
|
|
67
|
-
result.tag = jsonObject["tag"]
|
|
68
|
-
result.skipStep = jsonObject["skipStep"]
|
|
69
|
-
result.metadata = jsonObject["metadata"]
|
|
70
|
-
result.externalId = jsonObject["externalId"]
|
|
71
|
-
result.groupId = jsonObject["groupId"]
|
|
72
|
-
result.checkDuplicatesEnabled = jsonObject["checkDuplicatesEnabled"]
|
|
73
|
-
result.duplicatesThreshold = jsonObject["duplicatesThreshold"]
|
|
74
|
-
|
|
75
|
-
return result
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
toJson() {
|
|
79
|
-
return {
|
|
80
|
-
"copyright": this.copyright,
|
|
81
|
-
"cameraSwitchEnabled": this.cameraSwitchEnabled,
|
|
82
|
-
"closeButtonEnabled": this.closeButtonEnabled,
|
|
83
|
-
"torchButtonEnabled": this.torchButtonEnabled,
|
|
84
|
-
"vibrateOnSteps": this.vibrateOnSteps,
|
|
85
|
-
"cameraPositionAndroid": this.cameraPositionAndroid,
|
|
86
|
-
"cameraPositionIOS": this.cameraPositionIOS,
|
|
87
|
-
"screenOrientation": this.screenOrientation,
|
|
88
|
-
"locationTrackingEnabled": this.locationTrackingEnabled,
|
|
89
|
-
"preventScreenRecording": this.preventScreenRecording,
|
|
90
|
-
"attemptsCount": this.attemptsCount,
|
|
91
|
-
"recordingProcess": this.recordingProcess,
|
|
92
|
-
"livenessType": this.livenessType,
|
|
93
|
-
"tag": this.tag,
|
|
94
|
-
"skipStep": this.skipStep,
|
|
95
|
-
"metadata": this.metadata,
|
|
96
|
-
"externalId": this.externalId,
|
|
97
|
-
"groupId": this.groupId,
|
|
98
|
-
"checkDuplicatesEnabled": this.checkDuplicatesEnabled,
|
|
99
|
-
"duplicatesThreshold": this.duplicatesThreshold,
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export class EnrollmentRequest {
|
|
2
|
-
externalId
|
|
3
|
-
groupId
|
|
4
|
-
trustedImage
|
|
5
|
-
trustedImageUrl
|
|
6
|
-
|
|
7
|
-
constructor(params) {
|
|
8
|
-
this.externalId = params?.externalId
|
|
9
|
-
this.groupId = params?.groupId
|
|
10
|
-
this.trustedImage = params?.trustedImage
|
|
11
|
-
this.trustedImageUrl = params?.trustedImageUrl
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
static fromJson(jsonObject) {
|
|
15
|
-
if (jsonObject == null) return null
|
|
16
|
-
const result = new EnrollmentRequest()
|
|
17
|
-
|
|
18
|
-
result.externalId = jsonObject["externalId"]
|
|
19
|
-
result.groupId = jsonObject["groupId"]
|
|
20
|
-
result.trustedImage = jsonObject["trustedImage"]
|
|
21
|
-
result.trustedImageUrl = jsonObject["trustedImageUrl"]
|
|
22
|
-
|
|
23
|
-
return result
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
toJson() {
|
|
27
|
-
return {
|
|
28
|
-
"externalId": this.externalId,
|
|
29
|
-
"groupId": this.groupId,
|
|
30
|
-
"trustedImage": this.trustedImage,
|
|
31
|
-
"trustedImageUrl": this.trustedImageUrl,
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ErrorResponse } from './error_response'
|
|
2
|
-
|
|
3
|
-
export class EnrollmentResponse {
|
|
4
|
-
personId
|
|
5
|
-
externalId
|
|
6
|
-
error
|
|
7
|
-
|
|
8
|
-
static fromJson(jsonObject) {
|
|
9
|
-
if (jsonObject == null) return null
|
|
10
|
-
const result = new EnrollmentResponse()
|
|
11
|
-
|
|
12
|
-
result.personId = jsonObject["personId"]
|
|
13
|
-
result.externalId = jsonObject["externalId"]
|
|
14
|
-
result.error = ErrorResponse.fromJson(jsonObject["error"])
|
|
15
|
-
|
|
16
|
-
return result
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
toJson() {
|
|
20
|
-
return {
|
|
21
|
-
"personId": this.personId,
|
|
22
|
-
"externalId": this.externalId,
|
|
23
|
-
"error": this.error?.toJson(),
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export class ErrorResponse {
|
|
2
|
-
code
|
|
3
|
-
message
|
|
4
|
-
|
|
5
|
-
static fromJson(jsonObject) {
|
|
6
|
-
if (jsonObject == null) return null
|
|
7
|
-
const result = new ErrorResponse()
|
|
8
|
-
|
|
9
|
-
result.code = jsonObject["code"]
|
|
10
|
-
result.message = jsonObject["message"]
|
|
11
|
-
|
|
12
|
-
return result
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
toJson() {
|
|
16
|
-
return {
|
|
17
|
-
"code": this.code,
|
|
18
|
-
"message": this.message,
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
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 class VerificationConfig {
|
|
6
|
-
copyright
|
|
7
|
-
cameraSwitchEnabled
|
|
8
|
-
closeButtonEnabled
|
|
9
|
-
torchButtonEnabled
|
|
10
|
-
vibrateOnSteps
|
|
11
|
-
cameraPositionIOS
|
|
12
|
-
cameraPositionAndroid
|
|
13
|
-
screenOrientation
|
|
14
|
-
locationTrackingEnabled
|
|
15
|
-
preventScreenRecording
|
|
16
|
-
attemptsCount
|
|
17
|
-
recordingProcess
|
|
18
|
-
livenessType
|
|
19
|
-
tag
|
|
20
|
-
skipStep
|
|
21
|
-
metadata
|
|
22
|
-
personId
|
|
23
|
-
groupId
|
|
24
|
-
threshold
|
|
25
|
-
|
|
26
|
-
constructor(params) {
|
|
27
|
-
this.copyright = params?.copyright ?? true
|
|
28
|
-
this.cameraSwitchEnabled = params?.cameraSwitchEnabled ?? false
|
|
29
|
-
this.closeButtonEnabled = params?.closeButtonEnabled ?? true
|
|
30
|
-
this.torchButtonEnabled = params?.torchButtonEnabled ?? true
|
|
31
|
-
this.vibrateOnSteps = params?.vibrateOnSteps ?? true
|
|
32
|
-
this.cameraPositionIOS = params?.cameraPositionIOS ?? CameraPosition.FRONT
|
|
33
|
-
this.cameraPositionAndroid = params?.cameraPositionAndroid
|
|
34
|
-
this.screenOrientation = params?.screenOrientation ?? [ScreenOrientation.PORTRAIT]
|
|
35
|
-
this.locationTrackingEnabled = params?.locationTrackingEnabled ?? true
|
|
36
|
-
this.preventScreenRecording = params?.preventScreenRecording ?? false
|
|
37
|
-
this.attemptsCount = params?.attemptsCount ?? 0
|
|
38
|
-
this.recordingProcess = params?.recordingProcess ?? RecordingProcess.ASYNCHRONOUS_UPLOAD
|
|
39
|
-
this.livenessType = params?.livenessType ?? LivenessType.ACTIVE
|
|
40
|
-
this.tag = params?.tag
|
|
41
|
-
this.skipStep = params?.skipStep ?? []
|
|
42
|
-
this.metadata = params?.metadata
|
|
43
|
-
this.personId = params?.personId
|
|
44
|
-
this.groupId = params?.groupId
|
|
45
|
-
this.threshold = params?.threshold
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
static fromJson(jsonObject) {
|
|
49
|
-
if (jsonObject == null) return null
|
|
50
|
-
const result = new VerificationConfig()
|
|
51
|
-
|
|
52
|
-
result.copyright = jsonObject["copyright"]
|
|
53
|
-
result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"]
|
|
54
|
-
result.closeButtonEnabled = jsonObject["closeButtonEnabled"]
|
|
55
|
-
result.torchButtonEnabled = jsonObject["torchButtonEnabled"]
|
|
56
|
-
result.vibrateOnSteps = jsonObject["vibrateOnSteps"]
|
|
57
|
-
result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"]
|
|
58
|
-
result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
|
|
59
|
-
result.screenOrientation = jsonObject["screenOrientation"]
|
|
60
|
-
result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
|
|
61
|
-
result.preventScreenRecording = jsonObject["preventScreenRecording"]
|
|
62
|
-
result.attemptsCount = jsonObject["attemptsCount"]
|
|
63
|
-
result.recordingProcess = jsonObject["recordingProcess"]
|
|
64
|
-
result.livenessType = jsonObject["livenessType"]
|
|
65
|
-
result.tag = jsonObject["tag"]
|
|
66
|
-
result.skipStep = jsonObject["skipStep"]
|
|
67
|
-
result.metadata = jsonObject["metadata"]
|
|
68
|
-
result.personId = jsonObject["personId"]
|
|
69
|
-
result.groupId = jsonObject["groupId"]
|
|
70
|
-
result.threshold = jsonObject["threshold"]
|
|
71
|
-
|
|
72
|
-
return result
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
toJson() {
|
|
76
|
-
return {
|
|
77
|
-
"copyright": this.copyright,
|
|
78
|
-
"cameraSwitchEnabled": this.cameraSwitchEnabled,
|
|
79
|
-
"closeButtonEnabled": this.closeButtonEnabled,
|
|
80
|
-
"torchButtonEnabled": this.torchButtonEnabled,
|
|
81
|
-
"vibrateOnSteps": this.vibrateOnSteps,
|
|
82
|
-
"cameraPositionAndroid": this.cameraPositionAndroid,
|
|
83
|
-
"cameraPositionIOS": this.cameraPositionIOS,
|
|
84
|
-
"screenOrientation": this.screenOrientation,
|
|
85
|
-
"locationTrackingEnabled": this.locationTrackingEnabled,
|
|
86
|
-
"preventScreenRecording": this.preventScreenRecording,
|
|
87
|
-
"attemptsCount": this.attemptsCount,
|
|
88
|
-
"recordingProcess": this.recordingProcess,
|
|
89
|
-
"livenessType": this.livenessType,
|
|
90
|
-
"tag": this.tag,
|
|
91
|
-
"skipStep": this.skipStep,
|
|
92
|
-
"metadata": this.metadata,
|
|
93
|
-
"personId": this.personId,
|
|
94
|
-
"groupId": this.groupId,
|
|
95
|
-
"threshold": this.threshold,
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { VerifyMatchResponse } from './verify_match_response'
|
|
2
|
-
import { ErrorResponse } from './error_response'
|
|
3
|
-
|
|
4
|
-
export class VerificationResponse {
|
|
5
|
-
passed
|
|
6
|
-
match
|
|
7
|
-
error
|
|
8
|
-
|
|
9
|
-
static fromJson(jsonObject) {
|
|
10
|
-
if (jsonObject == null) return null
|
|
11
|
-
const result = new VerificationResponse()
|
|
12
|
-
|
|
13
|
-
result.passed = jsonObject["passed"]
|
|
14
|
-
result.match = VerifyMatchResponse.fromJson(jsonObject["match"])
|
|
15
|
-
result.error = ErrorResponse.fromJson(jsonObject["error"])
|
|
16
|
-
|
|
17
|
-
return result
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
toJson() {
|
|
21
|
-
return {
|
|
22
|
-
"passed": this.passed,
|
|
23
|
-
"match": this.match?.toJson(),
|
|
24
|
-
"error": this.error?.toJson(),
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export class VerifyMatchResponse {
|
|
2
|
-
passed
|
|
3
|
-
similarity
|
|
4
|
-
|
|
5
|
-
static fromJson(jsonObject) {
|
|
6
|
-
if (jsonObject == null) return null
|
|
7
|
-
const result = new VerifyMatchResponse()
|
|
8
|
-
|
|
9
|
-
result.passed = jsonObject["passed"]
|
|
10
|
-
result.similarity = jsonObject["similarity"]
|
|
11
|
-
|
|
12
|
-
return result
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
toJson() {
|
|
16
|
-
return {
|
|
17
|
-
"passed": this.passed,
|
|
18
|
-
"similarity": this.similarity,
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|