@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.
Files changed (118) hide show
  1. package/RNFaceSDK.podspec +2 -2
  2. package/android/build.gradle +2 -2
  3. package/android/cordova.gradle +2 -2
  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/README.md +1 -1
  9. package/examples/capacitor/package.json +2 -2
  10. package/examples/capacitor/scripts/android.sh +3 -1
  11. package/examples/capacitor/scripts/ios.sh +3 -1
  12. package/examples/capacitor/scripts/setup.sh +2 -0
  13. package/examples/ionic/README.md +1 -1
  14. package/examples/ionic/config.xml +0 -2
  15. package/examples/ionic/index.tsx +1 -1
  16. package/examples/ionic/package-lock.json +2360 -1733
  17. package/examples/ionic/package.json +21 -25
  18. package/examples/ionic/scripts/android.sh +4 -1
  19. package/examples/ionic/scripts/ios.sh +4 -1
  20. package/examples/ionic/scripts/setup.sh +2 -0
  21. package/examples/ionic/tsconfig.json +1 -1
  22. package/examples/react_native/README.md +1 -1
  23. package/examples/react_native/package.json +2 -2
  24. package/examples/react_native/scripts/android.sh +5 -5
  25. package/examples/react_native/scripts/ios.sh +5 -5
  26. package/examples/react_native/scripts/setup.sh +2 -0
  27. package/ios/Config.swift +107 -1
  28. package/ios/Decoder.swift +71 -3
  29. package/ios/Main.swift +24 -4
  30. package/package.json +1 -1
  31. package/plugin.xml +2 -2
  32. package/test/json.tsx +135 -57
  33. package/test/package-lock.json +2 -5
  34. package/test/test.tsx +183 -60
  35. package/www/capacitor/customization/customization_images.js +48 -0
  36. package/www/capacitor/customization/font.js +3 -3
  37. package/www/capacitor/detect_faces/detect_faces_config.js +5 -5
  38. package/www/capacitor/detect_faces/detect_faces_request.js +2 -2
  39. package/www/capacitor/face_capture/face_capture_config.js +14 -14
  40. package/www/capacitor/image_params/output_image_crop.js +4 -4
  41. package/www/capacitor/image_params/output_image_params.js +3 -3
  42. package/www/capacitor/image_quality/image_quality_characteristic.js +4 -4
  43. package/www/capacitor/image_quality/image_quality_group.js +2 -2
  44. package/www/capacitor/index.js +153 -32
  45. package/www/capacitor/init/init_config.js +2 -2
  46. package/www/capacitor/internal/bridge.js +2 -2
  47. package/www/capacitor/internal/cordova.js +2 -2
  48. package/www/capacitor/liveness/enrollment_config.js +102 -0
  49. package/www/capacitor/liveness/enrollment_request.js +39 -0
  50. package/www/capacitor/liveness/enrollment_response.js +26 -0
  51. package/www/capacitor/liveness/error_response.js +21 -0
  52. package/www/capacitor/liveness/liveness_config.js +18 -17
  53. package/www/capacitor/liveness/liveness_exception.js +7 -5
  54. package/www/capacitor/liveness/liveness_notification.js +2 -0
  55. package/www/capacitor/liveness/verification_config.js +98 -0
  56. package/www/capacitor/liveness/verification_response.js +27 -0
  57. package/www/capacitor/liveness/verify_match_response.js +21 -0
  58. package/www/capacitor/match_faces/match_faces_config.js +3 -3
  59. package/www/capacitor/match_faces/match_faces_image.js +2 -2
  60. package/www/capacitor/match_faces/match_faces_request.js +4 -4
  61. package/www/capacitor/person_database/edit_group_persons_request.js +3 -3
  62. package/www/capacitor/person_database/person_database.js +4 -4
  63. package/www/capacitor/person_database/search_person_request.js +7 -7
  64. package/www/cordova.js +703 -173
  65. package/www/react-native/customization/customization_images.js +48 -0
  66. package/www/react-native/customization/font.js +3 -3
  67. package/www/react-native/detect_faces/detect_faces_config.js +5 -5
  68. package/www/react-native/detect_faces/detect_faces_request.js +2 -2
  69. package/www/react-native/face_capture/face_capture_config.js +14 -14
  70. package/www/react-native/image_params/output_image_crop.js +4 -4
  71. package/www/react-native/image_params/output_image_params.js +3 -3
  72. package/www/react-native/image_quality/image_quality_characteristic.js +4 -4
  73. package/www/react-native/image_quality/image_quality_group.js +2 -2
  74. package/www/react-native/index.js +153 -32
  75. package/www/react-native/init/init_config.js +2 -2
  76. package/www/react-native/internal/bridge.js +2 -2
  77. package/www/react-native/liveness/enrollment_config.js +102 -0
  78. package/www/react-native/liveness/enrollment_request.js +39 -0
  79. package/www/react-native/liveness/enrollment_response.js +26 -0
  80. package/www/react-native/liveness/error_response.js +21 -0
  81. package/www/react-native/liveness/liveness_config.js +18 -17
  82. package/www/react-native/liveness/liveness_exception.js +7 -5
  83. package/www/react-native/liveness/liveness_notification.js +2 -0
  84. package/www/react-native/liveness/verification_config.js +98 -0
  85. package/www/react-native/liveness/verification_response.js +27 -0
  86. package/www/react-native/liveness/verify_match_response.js +21 -0
  87. package/www/react-native/match_faces/match_faces_config.js +3 -3
  88. package/www/react-native/match_faces/match_faces_image.js +2 -2
  89. package/www/react-native/match_faces/match_faces_request.js +4 -4
  90. package/www/react-native/person_database/edit_group_persons_request.js +3 -3
  91. package/www/react-native/person_database/person_database.js +4 -4
  92. package/www/react-native/person_database/search_person_request.js +7 -7
  93. package/www/types/customization/customization_images.d.ts +6 -0
  94. package/www/types/customization/font.d.ts +1 -1
  95. package/www/types/detect_faces/detect_faces_config.d.ts +1 -1
  96. package/www/types/detect_faces/detect_faces_request.d.ts +1 -1
  97. package/www/types/face_capture/face_capture_config.d.ts +1 -1
  98. package/www/types/image_params/output_image_crop.d.ts +1 -1
  99. package/www/types/image_params/output_image_params.d.ts +1 -1
  100. package/www/types/image_quality/image_quality_group.d.ts +1 -1
  101. package/www/types/index.d.ts +137 -15
  102. package/www/types/init/init_config.d.ts +1 -1
  103. package/www/types/liveness/enrollment_config.d.ts +97 -0
  104. package/www/types/liveness/enrollment_request.d.ts +24 -0
  105. package/www/types/liveness/enrollment_response.d.ts +9 -0
  106. package/www/types/liveness/error_response.d.ts +6 -0
  107. package/www/types/liveness/liveness_config.d.ts +2 -1
  108. package/www/types/liveness/liveness_exception.d.ts +32 -2
  109. package/www/types/liveness/liveness_notification.d.ts +2 -0
  110. package/www/types/liveness/verification_config.d.ts +95 -0
  111. package/www/types/liveness/verification_response.d.ts +10 -0
  112. package/www/types/liveness/verify_match_response.d.ts +6 -0
  113. package/www/types/match_faces/match_faces_config.d.ts +1 -1
  114. package/www/types/match_faces/match_faces_image.d.ts +1 -1
  115. package/www/types/match_faces/match_faces_request.d.ts +1 -1
  116. package/www/types/person_database/edit_group_persons_request.d.ts +1 -1
  117. package/www/types/person_database/person_database.d.ts +2 -2
  118. package/www/types/person_database/search_person_request.d.ts +1 -1
@@ -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 { CameraPosition, CustomizationColors, CustomizationFonts, CustomizationImages, Customization, CustomButtonTappedCompletion, Font, ScreenOrientation }
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 { FaceSDKVersion, InitConfig, InitException, InitErrorCode, LicenseException, LicensingResultCode }
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 { DetectFaceResult, DetectFacesAttributeResult, DetectFacesAttribute, DetectFacesBackendException, DetectFacesBackendErrorCode, DetectFacesConfig, DetectFacesException, DetectFacesErrorCode, DetectFacesRequest, DetectFacesResponse, DetectFacesScenario }
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 { FaceCaptureConfig, FaceCaptureException, FaceCaptureErrorCode, FaceCaptureImage, ImageType, FaceCaptureResponse }
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 { OutputImageCrop, OutputImageCropAspectRatio, OutputImageParams, Point, Rect, Size }
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 { ImageQualityCharacteristicName, ImageQualityCharacteristic, ImageQualityGroup, ImageQualityRange, ImageQualityResult, ImageQualityGroupName, ImageQualityResultStatus }
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
- export { LivenessBackendException, LivenessBackendErrorCode, LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep, LivenessException, LivenessErrorCode, LivenessNotification, LivenessProcessStatus, LivenessNotificationCompletion, LivenessResponse, LivenessStatus }
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 { ComparedFace, ComparedFacesPair, ComparedFacesSplit, MatchFacesBackendException, MatchFacesConfig, ProcessingMode, MatchFacesDetectionFace, MatchFacesDetection, MatchFacesException, MatchFacesErrorCode, MatchFacesImage, MatchFacesRequest, MatchFacesResponse }
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 { EditGroupPersonsRequest, ImageUpload, PageableItemList, PersonDatabase, PersonGroup, PersonImage, Person, SearchPersonDetection, SearchPersonImage, SearchPersonRequest, SearchPerson }
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
- params?: {
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
- params?: {
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
- params?: {
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
- params?: {
308
+ options?: {
187
309
  config?: MatchFacesConfig
188
310
  }
189
311
  ): Promise<MatchFacesResponse>
@@ -16,7 +16,7 @@ export class InitConfig {
16
16
  */
17
17
  constructor(
18
18
  license: string,
19
- params?: {
19
+ options?: {
20
20
  licenseUpdate?: boolean
21
21
  })
22
22
  }
@@ -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
+ }
@@ -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
+ }
@@ -91,7 +91,7 @@ export class LivenessConfig {
91
91
  metadata?: Record<string, any>
92
92
 
93
93
  constructor(
94
- params?: {
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
  }
@@ -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
+ }
@@ -3,7 +3,7 @@ export class MatchFacesConfig {
3
3
  locationTrackingEnabled: boolean
4
4
 
5
5
  constructor(
6
- params?: {
6
+ options?: {
7
7
  processingMode?: ProcessingMode
8
8
  locationTrackingEnabled?: boolean
9
9
  }
@@ -27,7 +27,7 @@ export class MatchFacesImage {
27
27
  constructor(
28
28
  image: string,
29
29
  imageType: ImageType,
30
- params?: {
30
+ options?: {
31
31
  detectAll?: boolean
32
32
  }
33
33
  )
@@ -25,7 +25,7 @@ export class MatchFacesRequest {
25
25
 
26
26
  constructor(
27
27
  images: Array<MatchFacesImage>,
28
- params?: {
28
+ options?: {
29
29
  outputImageParams?: OutputImageParams
30
30
  tag?: string
31
31
  metadata?: Record<string, any>
@@ -1,6 +1,6 @@
1
1
  export class EditGroupPersonsRequest {
2
2
  constructor(
3
- params: {
3
+ options: {
4
4
  personIdsToAdd?: string[],
5
5
  personIdsToRemove?: string[],
6
6
  }
@@ -13,7 +13,7 @@ import { SearchPerson } from './search_person'
13
13
  export class PersonDatabase {
14
14
  createPerson(
15
15
  name: string,
16
- params?: {
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
- params?: {
53
+ options?: {
54
54
  metadata?: any,
55
55
  }
56
56
  ): Promise<[PersonGroup | null, string | null]>
@@ -31,7 +31,7 @@ export class SearchPersonRequest {
31
31
 
32
32
  constructor(
33
33
  image: ImageUpload,
34
- params?: {
34
+ options?: {
35
35
  groupIdsForSearch?: string[],
36
36
  threshold?: number,
37
37
  limit?: number,