@regulaforensics/face-sdk 8.3.1100-rc → 8.3.1107-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.
Files changed (61) hide show
  1. package/RNFaceSDK.podspec +2 -2
  2. package/android/build.gradle +1 -1
  3. package/android/cordova.gradle +1 -1
  4. package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +91 -0
  5. package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +106 -3
  6. package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +39 -1
  7. package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +0 -1
  8. package/examples/capacitor/package-lock.json +227 -221
  9. package/examples/capacitor/package.json +4 -1
  10. package/examples/capacitor/scripts/android.sh +1 -1
  11. package/examples/ionic/package-lock.json +1579 -2369
  12. package/examples/ionic/package.json +15 -12
  13. package/examples/ionic/scripts/android.sh +1 -1
  14. package/examples/react_native/package-lock.json +138 -169
  15. package/examples/react_native/package.json +3 -2
  16. package/examples/react_native/scripts/android.sh +1 -1
  17. package/ios/Config.swift +109 -1
  18. package/ios/Decoder.swift +71 -3
  19. package/ios/Main.swift +24 -4
  20. package/package.json +1 -1
  21. package/plugin.xml +2 -2
  22. package/test/json.tsx +134 -57
  23. package/test/package-lock.json +1 -1
  24. package/test/test.tsx +68 -60
  25. package/www/capacitor/customization/customization_images.js +40 -0
  26. package/www/capacitor/index.js +33 -12
  27. package/www/capacitor/liveness/enrollment_config.js +102 -0
  28. package/www/capacitor/liveness/enrollment_request.js +34 -0
  29. package/www/capacitor/liveness/enrollment_response.js +26 -0
  30. package/www/capacitor/liveness/error_response.js +21 -0
  31. package/www/capacitor/liveness/liveness_config.js +1 -0
  32. package/www/capacitor/liveness/liveness_exception.js +6 -5
  33. package/www/capacitor/liveness/liveness_notification.js +2 -0
  34. package/www/capacitor/liveness/verification_config.js +98 -0
  35. package/www/capacitor/liveness/verification_response.js +27 -0
  36. package/www/capacitor/liveness/verify_match_response.js +21 -0
  37. package/www/cordova.js +595 -80
  38. package/www/react-native/customization/customization_images.js +40 -0
  39. package/www/react-native/index.js +33 -12
  40. package/www/react-native/liveness/enrollment_config.js +102 -0
  41. package/www/react-native/liveness/enrollment_request.js +34 -0
  42. package/www/react-native/liveness/enrollment_response.js +26 -0
  43. package/www/react-native/liveness/error_response.js +21 -0
  44. package/www/react-native/liveness/liveness_config.js +1 -0
  45. package/www/react-native/liveness/liveness_exception.js +6 -5
  46. package/www/react-native/liveness/liveness_notification.js +2 -0
  47. package/www/react-native/liveness/verification_config.js +98 -0
  48. package/www/react-native/liveness/verification_response.js +27 -0
  49. package/www/react-native/liveness/verify_match_response.js +21 -0
  50. package/www/types/customization/customization_images.d.ts +5 -0
  51. package/www/types/index.d.ts +28 -3
  52. package/www/types/liveness/enrollment_config.d.ts +97 -0
  53. package/www/types/liveness/enrollment_request.d.ts +6 -0
  54. package/www/types/liveness/enrollment_response.d.ts +9 -0
  55. package/www/types/liveness/error_response.d.ts +6 -0
  56. package/www/types/liveness/liveness_config.d.ts +1 -0
  57. package/www/types/liveness/liveness_exception.d.ts +1 -0
  58. package/www/types/liveness/liveness_notification.d.ts +2 -0
  59. package/www/types/liveness/verification_config.d.ts +95 -0
  60. package/www/types/liveness/verification_response.d.ts +10 -0
  61. package/www/types/liveness/verify_match_response.d.ts +6 -0
@@ -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,6 @@
1
+ export interface EnrollmentRequest {
2
+ externalId: string
3
+ groupId?: string
4
+ trustedImage?: string
5
+ trustedImageUrl?: string
6
+ }
@@ -0,0 +1,9 @@
1
+ import { ErrorResponse } from './error_response'
2
+
3
+ export class EnrollmentResponse {
4
+ readonly personId?: string
5
+ readonly externalId?: string
6
+ readonly error?: ErrorResponse
7
+
8
+ private constructor()
9
+ }
@@ -0,0 +1,6 @@
1
+ export class ErrorResponse {
2
+ readonly code: number
3
+ readonly message: string
4
+
5
+ private constructor()
6
+ }
@@ -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 {
@@ -18,6 +18,7 @@ export enum LivenessErrorCode {
18
18
  PROCESSING_FAILED,
19
19
  PROCESSING_FRAME_FAILED,
20
20
  APPLICATION_INACTIVE,
21
+ BAD_FACE_QUALITY,
21
22
  CONTEXT_IS_NULL,
22
23
  IN_PROGRESS_ALREADY,
23
24
  ZOOM_NOT_SUPPORTED,
@@ -26,6 +26,8 @@ export enum LivenessProcessStatus {
26
26
  FAILED,
27
27
  RETRY,
28
28
  SUCCESS,
29
+ BLINK,
30
+ BAD_FACE_QUALITY,
29
31
  }
30
32
 
31
33
  export type LivenessNotificationCompletion = (notification: LivenessNotification) => void
@@ -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
+ }
@@ -0,0 +1,6 @@
1
+ export class VerifyMatchResponse {
2
+ readonly passed?: boolean
3
+ readonly similarity?: number
4
+
5
+ private constructor()
6
+ }