@regulaforensics/face-sdk 7.2.404-beta → 7.2.408-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 +2 -2
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +0 -2
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +0 -18
- package/examples/capacitor/package.json +2 -2
- package/examples/cordova/package.json +2 -2
- package/examples/ionic/package.json +2 -2
- package/examples/react_native/package.json +2 -2
- package/ios/RFSWJSONConstructor.h +1 -0
- package/ios/RFSWJSONConstructor.m +14 -5
- package/ios/RFSWMain.m +0 -30
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/www/capacitor/customization/customization_fonts.js +1 -1
- package/www/capacitor/customization/customization_images.js +1 -1
- package/www/capacitor/customization/font.js +0 -8
- package/www/capacitor/detect_faces/detect_face_result.js +0 -12
- package/www/capacitor/detect_faces/detect_faces_attribute_result.js +0 -9
- package/www/capacitor/detect_faces/detect_faces_backend_exception.js +0 -7
- package/www/capacitor/detect_faces/detect_faces_config.js +0 -34
- package/www/capacitor/detect_faces/detect_faces_exception.js +0 -8
- package/www/capacitor/detect_faces/detect_faces_request.js +0 -22
- package/www/capacitor/detect_faces/detect_faces_response.js +0 -9
- package/www/capacitor/face_capture/face_capture_config.js +0 -37
- package/www/capacitor/face_capture/face_capture_exception.js +0 -7
- package/www/capacitor/face_capture/face_capture_image.js +0 -8
- package/www/capacitor/face_capture/face_capture_response.js +0 -7
- package/www/capacitor/image_params/output_image_crop.js +0 -23
- package/www/capacitor/image_params/output_image_params.js +0 -19
- package/www/capacitor/image_params/point.js +0 -7
- package/www/capacitor/image_params/rect.js +0 -9
- package/www/capacitor/image_params/size.js +0 -12
- package/www/capacitor/image_quality/image_quality_characteristic.js +0 -22
- package/www/capacitor/image_quality/image_quality_range.js +0 -7
- package/www/capacitor/image_quality/image_quality_result.js +0 -10
- package/www/capacitor/index.js +0 -48
- package/www/capacitor/init/face_sdk_version.js +0 -8
- package/www/capacitor/init/init_config.js +0 -19
- package/www/capacitor/init/init_exception.js +0 -8
- package/www/capacitor/init/license_exception.js +0 -7
- package/www/capacitor/internal/bridge.js +1 -20
- package/www/capacitor/liveness/liveness_backend_exception.js +0 -7
- package/www/capacitor/liveness/liveness_config.js +0 -43
- package/www/capacitor/liveness/liveness_exception.js +0 -8
- package/www/capacitor/liveness/liveness_notification.js +0 -7
- package/www/capacitor/liveness/liveness_response.js +0 -11
- package/www/capacitor/match_faces/compared_face.js +0 -9
- package/www/capacitor/match_faces/compared_faces_pair.js +0 -10
- package/www/capacitor/match_faces/compared_faces_split.js +0 -7
- package/www/capacitor/match_faces/match_faces_backend_exception.js +0 -7
- package/www/capacitor/match_faces/match_faces_config.js +0 -19
- package/www/capacitor/match_faces/match_faces_detection.js +0 -9
- package/www/capacitor/match_faces/match_faces_detection_face.js +0 -11
- package/www/capacitor/match_faces/match_faces_exception.js +0 -8
- package/www/capacitor/match_faces/match_faces_image.js +0 -9
- package/www/capacitor/match_faces/match_faces_request.js +0 -27
- package/www/capacitor/match_faces/match_faces_response.js +0 -9
- package/www/capacitor/person_database/edit_group_persons_request.js +0 -15
- package/www/capacitor/person_database/image_upload.js +0 -17
- package/www/capacitor/person_database/pageable_item_list.js +0 -8
- package/www/capacitor/person_database/person.js +0 -13
- package/www/capacitor/person_database/person_group.js +0 -11
- package/www/capacitor/person_database/person_image.js +0 -13
- package/www/capacitor/person_database/search_person.js +0 -14
- package/www/capacitor/person_database/search_person_detection.js +0 -9
- package/www/capacitor/person_database/search_person_image.js +0 -15
- package/www/capacitor/person_database/search_person_request.js +0 -29
- package/www/cordova.js +6 -753
- package/www/react-native/customization/customization_fonts.js +1 -1
- package/www/react-native/customization/customization_images.js +1 -1
- package/www/react-native/customization/font.js +0 -8
- package/www/react-native/detect_faces/detect_face_result.js +0 -12
- package/www/react-native/detect_faces/detect_faces_attribute_result.js +0 -9
- package/www/react-native/detect_faces/detect_faces_backend_exception.js +0 -7
- package/www/react-native/detect_faces/detect_faces_config.js +0 -34
- package/www/react-native/detect_faces/detect_faces_exception.js +0 -8
- package/www/react-native/detect_faces/detect_faces_request.js +0 -22
- package/www/react-native/detect_faces/detect_faces_response.js +0 -9
- package/www/react-native/face_capture/face_capture_config.js +0 -37
- package/www/react-native/face_capture/face_capture_exception.js +0 -7
- package/www/react-native/face_capture/face_capture_image.js +0 -8
- package/www/react-native/face_capture/face_capture_response.js +0 -7
- package/www/react-native/image_params/output_image_crop.js +0 -23
- package/www/react-native/image_params/output_image_params.js +0 -19
- package/www/react-native/image_params/point.js +0 -7
- package/www/react-native/image_params/rect.js +0 -9
- package/www/react-native/image_params/size.js +0 -12
- package/www/react-native/image_quality/image_quality_characteristic.js +0 -22
- package/www/react-native/image_quality/image_quality_range.js +0 -7
- package/www/react-native/image_quality/image_quality_result.js +0 -10
- package/www/react-native/index.js +0 -48
- package/www/react-native/init/face_sdk_version.js +0 -8
- package/www/react-native/init/init_config.js +0 -19
- package/www/react-native/init/init_exception.js +0 -8
- package/www/react-native/init/license_exception.js +0 -7
- package/www/react-native/internal/bridge.js +1 -20
- package/www/react-native/liveness/liveness_backend_exception.js +0 -7
- package/www/react-native/liveness/liveness_config.js +0 -43
- package/www/react-native/liveness/liveness_exception.js +0 -8
- package/www/react-native/liveness/liveness_notification.js +0 -7
- package/www/react-native/liveness/liveness_response.js +0 -11
- package/www/react-native/match_faces/compared_face.js +0 -9
- package/www/react-native/match_faces/compared_faces_pair.js +0 -10
- package/www/react-native/match_faces/compared_faces_split.js +0 -7
- package/www/react-native/match_faces/match_faces_backend_exception.js +0 -7
- package/www/react-native/match_faces/match_faces_config.js +0 -19
- package/www/react-native/match_faces/match_faces_detection.js +0 -9
- package/www/react-native/match_faces/match_faces_detection_face.js +0 -11
- package/www/react-native/match_faces/match_faces_exception.js +0 -8
- package/www/react-native/match_faces/match_faces_image.js +0 -9
- package/www/react-native/match_faces/match_faces_request.js +0 -27
- package/www/react-native/match_faces/match_faces_response.js +0 -9
- package/www/react-native/person_database/edit_group_persons_request.js +0 -15
- package/www/react-native/person_database/image_upload.js +0 -17
- package/www/react-native/person_database/pageable_item_list.js +0 -8
- package/www/react-native/person_database/person.js +0 -13
- package/www/react-native/person_database/person_group.js +0 -11
- package/www/react-native/person_database/person_image.js +0 -13
- package/www/react-native/person_database/search_person.js +0 -14
- package/www/react-native/person_database/search_person_detection.js +0 -9
- package/www/react-native/person_database/search_person_image.js +0 -15
- package/www/react-native/person_database/search_person_request.js +0 -29
- package/www/types/index.d.ts +0 -12
- package/www/types/match_faces/match_faces_config.d.ts +0 -2
- package/www/types/person_database/search_person_request.d.ts +0 -4
- package/test/json.tsx +0 -375
- package/test/package-lock.json +0 -584
- package/test/package.json +0 -9
- package/test/test.tsx +0 -61
- package/test/utils.tsx +0 -38
|
@@ -35,16 +35,4 @@ export class DetectFaceResult {
|
|
|
35
35
|
|
|
36
36
|
return result
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
toJson() {
|
|
40
|
-
return {
|
|
41
|
-
"quality": this.quality?.map(e => e.toJson()),
|
|
42
|
-
"crop": this.crop,
|
|
43
|
-
"attributes": this.attributes?.map(e => e.toJson()),
|
|
44
|
-
"landmarks": this.landmarks?.map(e => e.toJson()),
|
|
45
|
-
"faceRect": this.faceRect?.toJson(),
|
|
46
|
-
"originalRect": this.originalRect?.toJson(),
|
|
47
|
-
"isQualityCompliant": this.isQualityCompliant,
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
38
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { ImageQualityCharacteristic } from '../image_quality/image_quality_characteristic'
|
|
2
|
-
import { OutputImageParams } from '../image_params/output_image_params'
|
|
3
|
-
|
|
4
1
|
export class DetectFacesConfig {
|
|
5
2
|
attributes
|
|
6
3
|
customQuality
|
|
@@ -14,35 +11,4 @@ export class DetectFacesConfig {
|
|
|
14
11
|
this.outputImageParams = params?.outputImageParams
|
|
15
12
|
this.onlyCentralFace = params?.onlyCentralFace ?? this.onlyCentralFace
|
|
16
13
|
}
|
|
17
|
-
|
|
18
|
-
static fromJson(jsonObject) {
|
|
19
|
-
if (jsonObject == null) return null
|
|
20
|
-
const result = new DetectFacesConfig()
|
|
21
|
-
|
|
22
|
-
if (jsonObject["attributes"] != null) {
|
|
23
|
-
result.attributes = []
|
|
24
|
-
for (const item of jsonObject["attributes"]) {
|
|
25
|
-
result.attributes.push(item)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (jsonObject["customQuality"] != null) {
|
|
29
|
-
result.customQuality = []
|
|
30
|
-
for (const item of jsonObject["customQuality"]) {
|
|
31
|
-
result.customQuality.push(ImageQualityCharacteristic.fromJson(item))
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
result.outputImageParams = OutputImageParams.fromJson(jsonObject["outputImageParams"])
|
|
35
|
-
result.onlyCentralFace = jsonObject["onlyCentralFace"]
|
|
36
|
-
|
|
37
|
-
return result
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
toJson() {
|
|
41
|
-
return {
|
|
42
|
-
"attributes": this.attributes?.map(e => e),
|
|
43
|
-
"customQuality": this.customQuality?.map(e => e.toJson()),
|
|
44
|
-
"outputImageParams": this.outputImageParams?.toJson(),
|
|
45
|
-
"onlyCentralFace": this.onlyCentralFace,
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
14
|
}
|
|
@@ -15,14 +15,6 @@ export class DetectFacesException {
|
|
|
15
15
|
|
|
16
16
|
return result
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
toJson() {
|
|
20
|
-
return {
|
|
21
|
-
"code": this.code,
|
|
22
|
-
"message": this.message,
|
|
23
|
-
"underlyingError": this.underlyingError?.toJson(),
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
18
|
}
|
|
27
19
|
|
|
28
20
|
export const DetectFacesErrorCode = {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DetectFacesScenario } from './detect_faces_scenario'
|
|
2
|
-
import { DetectFacesConfig } from './detect_faces_config'
|
|
3
2
|
|
|
4
3
|
export class DetectFacesRequest {
|
|
5
4
|
image
|
|
@@ -67,25 +66,4 @@ export class DetectFacesRequest {
|
|
|
67
66
|
result.scenario = DetectFacesScenario.ATTRIBUTES_ALL
|
|
68
67
|
return result
|
|
69
68
|
}
|
|
70
|
-
|
|
71
|
-
static fromJson(jsonObject) {
|
|
72
|
-
if (jsonObject == null) return null
|
|
73
|
-
const result = new DetectFacesRequest()
|
|
74
|
-
|
|
75
|
-
result.tag = jsonObject["tag"]
|
|
76
|
-
result.scenario = jsonObject["scenario"]
|
|
77
|
-
result.image = jsonObject["image"]
|
|
78
|
-
result.configuration = DetectFacesConfig.fromJson(jsonObject["configuration"])
|
|
79
|
-
|
|
80
|
-
return result
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
toJson() {
|
|
84
|
-
return {
|
|
85
|
-
"tag": this.tag,
|
|
86
|
-
"scenario": this.scenario,
|
|
87
|
-
"image": this.image,
|
|
88
|
-
"configuration": this.configuration?.toJson(),
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
69
|
}
|
|
@@ -21,13 +21,4 @@ export class DetectFacesResponse {
|
|
|
21
21
|
|
|
22
22
|
return result
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
toJson() {
|
|
26
|
-
return {
|
|
27
|
-
"detection": this.detection?.toJson(),
|
|
28
|
-
"allDetections": this.allDetections?.map(e => e.toJson()),
|
|
29
|
-
"scenario": this.scenario,
|
|
30
|
-
"error": this.error?.toJson(),
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
24
|
}
|
|
@@ -29,41 +29,4 @@ export class FaceCaptureConfig {
|
|
|
29
29
|
this.timeout = params?.timeout
|
|
30
30
|
this.holdStillDuration = params?.holdStillDuration
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
static fromJson(jsonObject) {
|
|
34
|
-
if (jsonObject == null) return null
|
|
35
|
-
const result = new FaceCaptureConfig()
|
|
36
|
-
|
|
37
|
-
result.copyright = jsonObject["copyright"]
|
|
38
|
-
result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"]
|
|
39
|
-
result.closeButtonEnabled = jsonObject["closeButtonEnabled"]
|
|
40
|
-
result.torchButtonEnabled = jsonObject["torchButtonEnabled"]
|
|
41
|
-
result.vibrateOnSteps = jsonObject["vibrateOnSteps"]
|
|
42
|
-
result.detectOcclusion = jsonObject["detectOcclusion"]
|
|
43
|
-
result.showFaceAnimation = jsonObject["showFaceAnimation"]
|
|
44
|
-
result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"]
|
|
45
|
-
result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
|
|
46
|
-
result.screenOrientation = jsonObject["screenOrientation"]
|
|
47
|
-
result.timeout = jsonObject["timeout"]
|
|
48
|
-
result.holdStillDuration = jsonObject["holdStillDuration"]
|
|
49
|
-
|
|
50
|
-
return result
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
toJson() {
|
|
54
|
-
return {
|
|
55
|
-
"copyright": this.copyright,
|
|
56
|
-
"cameraSwitchEnabled": this.cameraSwitchEnabled,
|
|
57
|
-
"closeButtonEnabled": this.closeButtonEnabled,
|
|
58
|
-
"torchButtonEnabled": this.torchButtonEnabled,
|
|
59
|
-
"vibrateOnSteps": this.vibrateOnSteps,
|
|
60
|
-
"detectOcclusion": this.detectOcclusion,
|
|
61
|
-
"showFaceAnimation": this.showFaceAnimation,
|
|
62
|
-
"cameraPositionAndroid": this.cameraPositionAndroid,
|
|
63
|
-
"cameraPositionIOS": this.cameraPositionIOS,
|
|
64
|
-
"screenOrientation": this.screenOrientation,
|
|
65
|
-
"timeout": this.timeout,
|
|
66
|
-
"holdStillDuration": this.holdStillDuration,
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
32
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Size } from './size'
|
|
2
|
-
|
|
3
1
|
export class OutputImageCrop {
|
|
4
2
|
type
|
|
5
3
|
size
|
|
@@ -12,27 +10,6 @@ export class OutputImageCrop {
|
|
|
12
10
|
this.padColor = params?.padColor
|
|
13
11
|
this.returnOriginalRect = params?.returnOriginalRect ?? false
|
|
14
12
|
}
|
|
15
|
-
|
|
16
|
-
static fromJson(jsonObject) {
|
|
17
|
-
if (jsonObject == null) return null
|
|
18
|
-
return new OutputImageCrop(
|
|
19
|
-
jsonObject["type"],
|
|
20
|
-
{
|
|
21
|
-
size: Size.fromJson(jsonObject["size"]),
|
|
22
|
-
padColor: jsonObject["padColor"],
|
|
23
|
-
returnOriginalRect: jsonObject["returnOriginalRect"],
|
|
24
|
-
}
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
toJson() {
|
|
29
|
-
return {
|
|
30
|
-
"type": this.type,
|
|
31
|
-
"size": this.size?.toJson(),
|
|
32
|
-
"padColor": this.padColor,
|
|
33
|
-
"returnOriginalRect": this.returnOriginalRect,
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
13
|
}
|
|
37
14
|
|
|
38
15
|
export const OutputImageCropAspectRatio = {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { OutputImageCrop } from './output_image_crop'
|
|
2
|
-
|
|
3
1
|
export class OutputImageParams {
|
|
4
2
|
crop
|
|
5
3
|
backgroundColor
|
|
@@ -8,21 +6,4 @@ export class OutputImageParams {
|
|
|
8
6
|
this.crop = params?.crop
|
|
9
7
|
this.backgroundColor = params?.backgroundColor
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
static fromJson(jsonObject) {
|
|
13
|
-
if (jsonObject == null) return null
|
|
14
|
-
const result = new OutputImageParams()
|
|
15
|
-
|
|
16
|
-
result.crop = OutputImageCrop.fromJson(jsonObject["crop"])
|
|
17
|
-
result.backgroundColor = jsonObject["backgroundColor"]
|
|
18
|
-
|
|
19
|
-
return result
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
toJson() {
|
|
23
|
-
return {
|
|
24
|
-
"crop": this.crop?.toJson(),
|
|
25
|
-
"backgroundColor": this.backgroundColor,
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
9
|
}
|
|
@@ -6,16 +6,4 @@ export class Size {
|
|
|
6
6
|
this.width = width
|
|
7
7
|
this.height = height
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
static fromJson(jsonObject) {
|
|
11
|
-
if (jsonObject == null) return null
|
|
12
|
-
return new Size(jsonObject["width"], jsonObject["height"])
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
toJson() {
|
|
16
|
-
return {
|
|
17
|
-
"width": this.width,
|
|
18
|
-
"height": this.height,
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
9
|
}
|
|
@@ -23,26 +23,4 @@ export class ImageQualityCharacteristic {
|
|
|
23
23
|
this.customRange = ImageQualityRange.withValue(value)
|
|
24
24
|
return this
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
static fromJson(jsonObject) {
|
|
28
|
-
if (jsonObject == null) return null
|
|
29
|
-
|
|
30
|
-
return ImageQualityCharacteristic._create(
|
|
31
|
-
jsonObject["characteristicName"],
|
|
32
|
-
{
|
|
33
|
-
recommended: ImageQualityRange.fromJson(jsonObject["recommendedRange"]),
|
|
34
|
-
custom: ImageQualityRange.fromJson(jsonObject["customRange"]),
|
|
35
|
-
color: jsonObject["color"],
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
toJson() {
|
|
41
|
-
return {
|
|
42
|
-
"characteristicName": this.characteristicName,
|
|
43
|
-
"recommendedRange": this.recommendedRange?.toJson(),
|
|
44
|
-
"customRange": this.customRange?.toJson(),
|
|
45
|
-
"color": this.color,
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
26
|
}
|
|
@@ -19,16 +19,6 @@ export class ImageQualityResult {
|
|
|
19
19
|
|
|
20
20
|
return result
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
toJson() {
|
|
24
|
-
return {
|
|
25
|
-
"group": this.group,
|
|
26
|
-
"name": this.name,
|
|
27
|
-
"status": this.status,
|
|
28
|
-
"value": this.value,
|
|
29
|
-
"range": this.range?.toJson(),
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
22
|
}
|
|
33
23
|
|
|
34
24
|
export const ImageQualityGroupName = {
|
|
@@ -105,27 +105,6 @@ export class FaceSDK {
|
|
|
105
105
|
this._setServiceUrl(val)
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
get tenant() { return this._tenant }
|
|
109
|
-
_tenant = null
|
|
110
|
-
set tenant(val) {
|
|
111
|
-
this._tenant = val;
|
|
112
|
-
this._setTenant(val);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
get env() { return this._env }
|
|
116
|
-
_env = null
|
|
117
|
-
set env(val) {
|
|
118
|
-
this._env = val;
|
|
119
|
-
this._setEnv(val);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
get locale() { return this._locale }
|
|
123
|
-
_locale = null
|
|
124
|
-
set locale(val) {
|
|
125
|
-
this._locale = val;
|
|
126
|
-
this._setLocale(val);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
108
|
get localizationDictionary() { return this._localizationDictionary }
|
|
130
109
|
_localizationDictionary
|
|
131
110
|
set localizationDictionary(val) {
|
|
@@ -217,9 +196,6 @@ export class FaceSDK {
|
|
|
217
196
|
async _onInit() {
|
|
218
197
|
this._version = await this._getVersion()
|
|
219
198
|
this._serviceUrl = await this._getServiceUrl()
|
|
220
|
-
this._tenant = await this._getTenant();
|
|
221
|
-
this._env = await this._getEnv();
|
|
222
|
-
this._locale = await this._getLocale();
|
|
223
199
|
}
|
|
224
200
|
|
|
225
201
|
async _getVersion() {
|
|
@@ -235,30 +211,6 @@ export class FaceSDK {
|
|
|
235
211
|
exec("setServiceUrl", [url])
|
|
236
212
|
}
|
|
237
213
|
|
|
238
|
-
async _getTenant() {
|
|
239
|
-
return await exec("getTenant", []);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
_setTenant(tenant) {
|
|
243
|
-
exec("setTenant", [tenant]);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
async _getEnv() {
|
|
247
|
-
return await exec("getEnv", []);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
_setEnv(env) {
|
|
251
|
-
exec("setEnv", [env]);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
async _getLocale() {
|
|
255
|
-
return await exec("getLocale", []);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
_setLocale(locale) {
|
|
259
|
-
exec("setLocale", [locale]);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
214
|
_setLocalizationDictionary(dictionary) {
|
|
263
215
|
exec("setLocalizationDictionary", [dictionary])
|
|
264
216
|
}
|
|
@@ -14,23 +14,4 @@ export class InitConfig {
|
|
|
14
14
|
this.licenseUpdate = params?.licenseUpdate
|
|
15
15
|
this.useBleDevice = false
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
static fromJson(jsonObject) {
|
|
19
|
-
if (jsonObject == null) return null
|
|
20
|
-
const result = new InitConfig()
|
|
21
|
-
|
|
22
|
-
result.license = jsonObject["license"]
|
|
23
|
-
result.licenseUpdate = jsonObject["licenseUpdate"]
|
|
24
|
-
result.useBleDevice = jsonObject["useBleDevice"]
|
|
25
|
-
|
|
26
|
-
return result
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
toJson() {
|
|
30
|
-
return {
|
|
31
|
-
"license": this.license,
|
|
32
|
-
"licenseUpdate": this.licenseUpdate,
|
|
33
|
-
"useBleDevice": this.useBleDevice,
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
17
|
}
|
|
@@ -37,23 +37,4 @@ export function _setLivenessNotificationCompletion(completion) {
|
|
|
37
37
|
|
|
38
38
|
export function _setCameraSwitchCallback(completion) {
|
|
39
39
|
_setEvent("cameraSwitchEvent", completion)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function dateToString(date) {
|
|
43
|
-
if (date == null) return null
|
|
44
|
-
const fmt = new Intl.DateTimeFormat('en', {
|
|
45
|
-
year: 'numeric',
|
|
46
|
-
month: '2-digit',
|
|
47
|
-
day: '2-digit',
|
|
48
|
-
hour: '2-digit',
|
|
49
|
-
minute: '2-digit',
|
|
50
|
-
second: '2-digit',
|
|
51
|
-
fractionalSecondDigits: 3,
|
|
52
|
-
hour12: false
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
const parts = fmt.formatToParts(date);
|
|
56
|
-
const get = (t) => parts.find(p => p.type === t)?.value ?? '';
|
|
57
|
-
|
|
58
|
-
return `${get('year')}-${get('month')}-${get('day')} ${get('hour')}:${get('minute')}:${get('second')}.${get('fractionalSecond')}`;
|
|
59
|
-
}
|
|
40
|
+
}
|
|
@@ -35,49 +35,6 @@ export class LivenessConfig {
|
|
|
35
35
|
this.skipStep = params?.skipStep ?? []
|
|
36
36
|
this.metadata = params?.metadata
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
static fromJson(jsonObject) {
|
|
40
|
-
if (jsonObject == null) return null
|
|
41
|
-
const result = new LivenessConfig()
|
|
42
|
-
|
|
43
|
-
result.copyright = jsonObject["copyright"]
|
|
44
|
-
result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"]
|
|
45
|
-
result.closeButtonEnabled = jsonObject["closeButtonEnabled"]
|
|
46
|
-
result.torchButtonEnabled = jsonObject["torchButtonEnabled"]
|
|
47
|
-
result.vibrateOnSteps = jsonObject["vibrateOnSteps"]
|
|
48
|
-
result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"]
|
|
49
|
-
result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
|
|
50
|
-
result.screenOrientation = jsonObject["screenOrientation"]
|
|
51
|
-
result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
|
|
52
|
-
result.attemptsCount = jsonObject["attemptsCount"]
|
|
53
|
-
result.recordingProcess = jsonObject["recordingProcess"]
|
|
54
|
-
result.livenessType = jsonObject["livenessType"]
|
|
55
|
-
result.tag = jsonObject["tag"]
|
|
56
|
-
result.skipStep = jsonObject["skipStep"]
|
|
57
|
-
result.metadata = jsonObject["metadata"]
|
|
58
|
-
|
|
59
|
-
return result
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
toJson() {
|
|
63
|
-
return {
|
|
64
|
-
"copyright": this.copyright,
|
|
65
|
-
"cameraSwitchEnabled": this.cameraSwitchEnabled,
|
|
66
|
-
"closeButtonEnabled": this.closeButtonEnabled,
|
|
67
|
-
"torchButtonEnabled": this.torchButtonEnabled,
|
|
68
|
-
"vibrateOnSteps": this.vibrateOnSteps,
|
|
69
|
-
"cameraPositionAndroid": this.cameraPositionAndroid,
|
|
70
|
-
"cameraPositionIOS": this.cameraPositionIOS,
|
|
71
|
-
"screenOrientation": this.screenOrientation,
|
|
72
|
-
"locationTrackingEnabled": this.locationTrackingEnabled,
|
|
73
|
-
"attemptsCount": this.attemptsCount,
|
|
74
|
-
"recordingProcess": this.recordingProcess,
|
|
75
|
-
"livenessType": this.livenessType,
|
|
76
|
-
"tag": this.tag,
|
|
77
|
-
"skipStep": this.skipStep,
|
|
78
|
-
"metadata": this.metadata,
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
38
|
}
|
|
82
39
|
|
|
83
40
|
export const RecordingProcess = {
|