@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
package/test/json.tsx CHANGED
@@ -2,10 +2,11 @@ var img1 = 'data1'
2
2
  var img2 = 'data2'
3
3
  var img3 = 'data3'
4
4
 
5
- export var customJson = {"test1": true, "test2": 1, "test3": "test"}
5
+ var customJson = {"test1": true, "test2": 1, "test3": "test"};
6
+
7
+ var font1 = {"name": "AppleSDGothicNeo-Thin", "size": 10, "style": 2};
8
+ var font2 = {"name": "Copperplate-Light", "size": 20, "style": 1};
6
9
 
7
- export var font1 = {"name": "AppleSDGothicNeo-Thin", "size": 10, "style": 2}
8
- export var font2 = {"name": "Copperplate-Light", "size": 20, "style": 1}
9
10
  export var customizationColors = {
10
11
  "100": 0xff000000,
11
12
  "101": 0xff000001,
@@ -33,7 +34,7 @@ export var customizationColors = {
33
34
  "401": 0xff000023,
34
35
  "402": 0xff000024,
35
36
  "500": 0xff000025,
36
- }
37
+ };
37
38
  export var customizationFonts = {
38
39
  "100": font1,
39
40
  "101": font2,
@@ -45,7 +46,7 @@ export var customizationFonts = {
45
46
  "302": font2,
46
47
  "303": font1,
47
48
  "400": font2,
48
- }
49
+ };
49
50
  export var customizationImages = {
50
51
  "onboardingScreenCloseButton": img1,
51
52
  "onboardingScreenIllumination": img2,
@@ -59,63 +60,69 @@ export var customizationImages = {
59
60
  "retryScreenHintEnvironment": img1,
60
61
  "retryScreenHintSubject": img2,
61
62
  "retryScreenHintGeo": img3,
63
+ "retryScreenHintBadSelfieQuality": img1,
64
+ "retryScreenHintCleanLens": img2,
65
+ "retryScreenHintAddIllumination": img3,
66
+ "retryScreenHintChangeBackground": img1,
67
+ "retryScreenHintFaceOcclusions": img2,
68
+ "retryScreenHintCovering": img3,
62
69
  "processingScreenCloseButton": img1,
63
70
  "successScreenImage": img2,
64
- }
71
+ };
65
72
  export var customization = {
66
73
  "colors": customizationColors,
67
74
  "fonts": customizationFonts,
68
75
  "images": customizationImages,
69
76
  "uiCustomizationLayer": customJson
70
- }
77
+ };
71
78
 
72
79
  export var point = {
73
80
  "x": 0,
74
81
  "y": 1,
75
- }
82
+ };
76
83
  export var rect = {
77
84
  "left": 0,
78
85
  "top": 1,
79
86
  "right": 2,
80
87
  "bottom": 3,
81
- }
88
+ };
82
89
  export var size = {
83
90
  "width": 68,
84
91
  "height": 91,
85
- }
92
+ };
86
93
  export var outputImageCrop = {
87
94
  "type": 0,
88
95
  "size": size,
89
96
  "padColor": 0xff000000,
90
97
  "returnOriginalRect": true
91
- }
98
+ };
92
99
  export var outputImageParams = {
93
100
  "crop": outputImageCrop,
94
101
  "backgroundColor": 0xff000000,
95
- }
102
+ };
96
103
 
97
104
  export var imageQualityRange = {
98
105
  "min": 0.45,
99
106
  "max": 0.55,
100
- }
107
+ };
101
108
  export var imageQualityResult = {
102
109
  "group": 1,
103
110
  "name": "ImageWidth",
104
111
  "status": 0,
105
112
  "value": 0.5,
106
113
  "range": imageQualityRange,
107
- }
114
+ };
108
115
  export var imageQualityCharacteristic = {
109
116
  "characteristicName": "FaceMidPointHorizontalPosition",
110
117
  "recommendedRange": imageQualityRange,
111
- }
118
+ };
112
119
 
113
120
  export var detectFacesAttributeResult = {
114
121
  "attribute": "Age",
115
122
  "confidence": 0.5,
116
123
  "value": "test",
117
124
  "range": imageQualityRange,
118
- }
125
+ };
119
126
  export var detectFaceResult = {
120
127
  "quality": [imageQualityResult, imageQualityResult, imageQualityResult],
121
128
  "crop": img1,
@@ -128,7 +135,7 @@ export var detectFaceResult = {
128
135
  "faceRect": rect,
129
136
  "originalRect": rect,
130
137
  "isQualityCompliant": false,
131
- }
138
+ };
132
139
  export var detectFacesConfig = {
133
140
  "attributes": ["Age", "EyeRight", "EyeLeft"],
134
141
  "customQuality": [
@@ -138,28 +145,28 @@ export var detectFacesConfig = {
138
145
  ],
139
146
  "outputImageParams": outputImageParams,
140
147
  "onlyCentralFace": true,
141
- }
148
+ };
142
149
  export var detectFacesRequest = {
143
150
  "tag": "test",
144
- // "scenario": "CropCentralFace",
151
+ "scenario": "CropCentralFace",
145
152
  "image": img1,
146
- "configuration": detectFacesConfig,
147
- }
153
+ // "configuration": detectFacesConfig,
154
+ };
148
155
  export var detectFacesBackendException = {
149
156
  "code": 2,
150
157
  "message": "test",
151
- }
158
+ };
152
159
  export var detectFacesException = {
153
160
  "code": 0,
154
161
  "message": "In process already.",
155
162
  "underlyingError": detectFacesBackendException
156
- }
163
+ };
157
164
  export var detectFacesResponse = {
158
165
  "detection": detectFaceResult,
159
166
  "allDetections": [detectFaceResult, detectFaceResult, detectFaceResult],
160
167
  "scenario": "CropCentralFace",
161
168
  "error": detectFacesException,
162
- }
169
+ };
163
170
 
164
171
  export var faceCaptureConfig = {
165
172
  "copyright": true,
@@ -175,40 +182,40 @@ export var faceCaptureConfig = {
175
182
  "screenOrientation": [0, 1],
176
183
  "timeout": 0.5,
177
184
  "holdStillDuration": 1.5,
178
- }
185
+ };
179
186
  export var faceCaptureImage = {
180
187
  "image": img1,
181
188
  "imageType": 1,
182
189
  "tag": "test",
183
- }
190
+ };
184
191
  export var faceCaptureException = {
185
192
  "code": 0,
186
193
  "message": "Cancelled by user.",
187
- }
194
+ };
188
195
  export var faceCaptureResponse = {
189
196
  "image": faceCaptureImage,
190
197
  "error": faceCaptureException,
191
- }
198
+ };
192
199
 
193
200
  export var faceSDKVersion = {
194
201
  "api": "test1",
195
202
  "core": "test2",
196
203
  "coreMode": "test3",
197
- }
204
+ };
198
205
  export var initConfig = {
199
206
  "license": img1,
200
207
  "licenseUpdate": true,
201
208
  "useBleDevice": false,
202
- }
209
+ };
203
210
  export var licenseException = {
204
211
  "code": 0,
205
212
  "message": "",
206
- }
213
+ };
207
214
  export var initException = {
208
215
  "code": 0,
209
216
  "message": "In process already.",
210
217
  "underlyingError": licenseException
211
- }
218
+ };
212
219
 
213
220
  export var livenessConfig = {
214
221
  "copyright": true,
@@ -227,16 +234,69 @@ export var livenessConfig = {
227
234
  "tag": "test",
228
235
  "skipStep": [0, 1],
229
236
  "metadata": customJson,
230
- }
237
+ };
238
+ export var enrollmentConfig = {
239
+ "copyright": true,
240
+ "cameraSwitchEnabled": false,
241
+ "closeButtonEnabled": true,
242
+ "torchButtonEnabled": false,
243
+ "vibrateOnSteps": true,
244
+ "cameraPositionAndroid": -1,
245
+ "cameraPositionIOS": 1,
246
+ "screenOrientation": [0, 1],
247
+ "locationTrackingEnabled": true,
248
+ "preventScreenRecording": false,
249
+ "attemptsCount": 2,
250
+ "recordingProcess": 0,
251
+ "livenessType": 1,
252
+ "tag": "test",
253
+ "skipStep": [0, 1],
254
+ "metadata": customJson,
255
+ "externalId": "test0",
256
+ "groupId": "test1",
257
+ "checkDuplicatesEnabled": true,
258
+ "duplicatesThreshold": 0.5,
259
+ };
260
+ export var verificationConfig = {
261
+ "copyright": true,
262
+ "cameraSwitchEnabled": false,
263
+ "closeButtonEnabled": true,
264
+ "torchButtonEnabled": false,
265
+ "vibrateOnSteps": true,
266
+ "cameraPositionAndroid": -1,
267
+ "cameraPositionIOS": 1,
268
+ "screenOrientation": [0, 1],
269
+ "locationTrackingEnabled": true,
270
+ "preventScreenRecording": false,
271
+ "attemptsCount": 2,
272
+ "recordingProcess": 0,
273
+ "livenessType": 1,
274
+ "tag": "test",
275
+ "skipStep": [0, 1],
276
+ "metadata": customJson,
277
+ "personId": "test0",
278
+ "groupId": "test1",
279
+ "threshold": 0.5,
280
+ };
281
+ export var enrollmentRequest = {
282
+ "externalId": "test0",
283
+ "groupId": "test1",
284
+ "trustedImage": img1,
285
+ };
286
+ export var enrollmentRequest2 = {
287
+ "externalId": "test0",
288
+ "groupId": "test1",
289
+ "trustedImageUrl": "test2",
290
+ };
231
291
  export var livenessBackendException = {
232
292
  "code": 200,
233
293
  "message": "No license",
234
- }
294
+ };
235
295
  export var livenessException = {
236
296
  "code": 0,
237
297
  "message": "FaceSDK Core is not initialized",
238
298
  "underlyingError": livenessBackendException
239
- }
299
+ };
240
300
  export var livenessResponse = {
241
301
  "image": img1,
242
302
  "liveness": 0,
@@ -244,28 +304,46 @@ export var livenessResponse = {
244
304
  "transactionId": "test1",
245
305
  "estimatedAge": 1,
246
306
  "error": livenessException,
247
- }
307
+ };
248
308
  export var livenessNotification = {
249
309
  "status": 0,
250
310
  "response": livenessResponse,
251
- }
311
+ };
312
+ export var errorResponse = {
313
+ "code": 0,
314
+ "message": "test0",
315
+ };
316
+ export var enrollmentResponse = {
317
+ "personId": "test0",
318
+ "externalId": "test1",
319
+ "error": errorResponse,
320
+ };
321
+ export var verifyMatchResponse = {
322
+ "passed": true,
323
+ "similarity": 0.5,
324
+ };
325
+ export var verificationResponse = {
326
+ "passed": true,
327
+ "match": verifyMatchResponse,
328
+ "error": errorResponse,
329
+ };
252
330
 
253
331
  export var matchFacesConfig = {
254
332
  "processingMode": 0,
255
333
  "locationTrackingEnabled": false,
256
- }
334
+ };
257
335
  export var matchFacesImage = {
258
336
  "image": img1,
259
337
  "imageType": 1,
260
338
  "detectAll": true,
261
339
  "identifier": "test"
262
- }
340
+ };
263
341
  export var matchFacesRequest = {
264
342
  "images": [matchFacesImage, matchFacesImage, matchFacesImage],
265
343
  "outputImageParams": outputImageParams,
266
344
  "tag": "test",
267
345
  "metadata": customJson,
268
- }
346
+ };
269
347
  export var matchFacesDetectionFace = {
270
348
  "faceIndex": 0,
271
349
  "landmarks": [point, point, point],
@@ -273,13 +351,13 @@ export var matchFacesDetectionFace = {
273
351
  "rotationAngle": 0.5,
274
352
  "originalRect": rect,
275
353
  "crop": img1,
276
- }
277
- export var matchFacesBackendException = {"code": 0, "message": "Image is empty."}
354
+ };
355
+ export var matchFacesBackendException = {"code": 0, "message": "Image is empty."};
278
356
  export var matchFacesException = {
279
357
  "code": 0,
280
358
  "message": "Image is empty.",
281
359
  "underlyingError": matchFacesBackendException,
282
- }
360
+ };
283
361
  export var matchFacesDetection = {
284
362
  "imageIndex": 0,
285
363
  "image": matchFacesImage,
@@ -289,36 +367,36 @@ export var matchFacesDetection = {
289
367
  matchFacesDetectionFace
290
368
  ],
291
369
  "error": matchFacesException,
292
- }
370
+ };
293
371
  export var comparedFace = {
294
372
  "imageIndex": 0,
295
373
  "image": matchFacesImage,
296
374
  "faceIndex": 1,
297
375
  "face": matchFacesDetectionFace,
298
- }
376
+ };
299
377
  export var comparedFacesPair = {
300
378
  "first": comparedFace,
301
379
  "second": comparedFace,
302
380
  "similarity": 0.5,
303
381
  "score": 1.5,
304
382
  "error": matchFacesException,
305
- }
383
+ };
306
384
  export var matchFacesResponse = {
307
385
  "results": [comparedFacesPair, comparedFacesPair, comparedFacesPair],
308
386
  "detections": [matchFacesDetection, matchFacesDetection, matchFacesDetection],
309
387
  "tag": "test",
310
388
  "error": matchFacesException,
311
- }
389
+ };
312
390
  export var comparedFacesSplit = {
313
391
  "matchedFaces": [comparedFacesPair, comparedFacesPair, comparedFacesPair],
314
392
  "unmatchedFaces": [comparedFacesPair, comparedFacesPair, comparedFacesPair],
315
- }
393
+ };
316
394
 
317
395
  export var editGroupPersonsRequest = {
318
396
  "personIdsToAdd": ["test1", "test2", "test3"],
319
397
  "personIdsToRemove": ["test4", "test5", "test6"],
320
- }
321
- export var imageUpload = {"imageData": img1}
398
+ };
399
+ export var imageUpload = {"imageData": img1};
322
400
  export var person = {
323
401
  "name": "test1",
324
402
  "updatedAt": "1969-07-20 20:18:04.000",
@@ -326,13 +404,13 @@ export var person = {
326
404
  "id": "test3",
327
405
  "metadata": customJson,
328
406
  "createdAt": "1969-07-20 20:18:05.000",
329
- }
407
+ };
330
408
  export var personGroup = {
331
409
  "name": "test1",
332
410
  "id": "test3",
333
411
  "metadata": customJson,
334
412
  "createdAt": "1969-07-20 20:18:04.000",
335
- }
413
+ };
336
414
  export var personImage = {
337
415
  "path": "test",
338
416
  "url": "test1",
@@ -340,13 +418,13 @@ export var personImage = {
340
418
  "id": "test3",
341
419
  "metadata": customJson,
342
420
  "createdAt": "1969-07-20 20:18:04.000",
343
- }
421
+ };
344
422
  export var searchPersonDetection = {
345
423
  "landmarks": [point, point, point],
346
424
  "rect": rect,
347
425
  "crop": img1,
348
426
  "rotationAngle": 0.5,
349
- }
427
+ };
350
428
  export var searchPersonImage = {
351
429
  "similarity": 0.5,
352
430
  "distance": 1.5,
@@ -356,7 +434,7 @@ export var searchPersonImage = {
356
434
  "id": "test3",
357
435
  "metadata": customJson,
358
436
  "createdAt": "1969-07-20 20:18:04.000",
359
- }
437
+ };
360
438
  export var searchPerson = {
361
439
  "images": [searchPersonImage, searchPersonImage, searchPersonImage],
362
440
  "detection": searchPersonDetection,
@@ -366,7 +444,7 @@ export var searchPerson = {
366
444
  "id": "test3",
367
445
  "metadata": customJson,
368
446
  "createdAt": "1969-07-20 20:18:05.000",
369
- }
447
+ };
370
448
  export var searchPersonRequest = {
371
449
  "imageUpload": imageUpload,
372
450
  "groupIdsForSearch": ["test1", "test2", "test3"],
@@ -375,4 +453,4 @@ export var searchPersonRequest = {
375
453
  "tag": "test",
376
454
  "detectAll": true,
377
455
  "outputImageParams": outputImageParams,
378
- }
456
+ };
@@ -13,12 +13,9 @@
13
13
  },
14
14
  "..": {
15
15
  "name": "@regulaforensics/face-sdk",
16
- "version": "8.3.1174-rc",
16
+ "version": "1.0.0",
17
17
  "dev": true,
18
- "license": "commercial",
19
- "dependencies": {
20
- "@expo/config-plugins": "^10.0.0"
21
- }
18
+ "license": "commercial"
22
19
  },
23
20
  "node_modules/@esbuild/aix-ppc64": {
24
21
  "version": "0.25.9",