@regulaforensics/face-sdk 7.2.380-rc → 7.2.404-beta
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/build.gradle +1 -1
- package/android/cordova.gradle +1 -1
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +2 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +18 -0
- 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 +0 -1
- package/ios/RFSWJSONConstructor.m +5 -14
- package/ios/RFSWMain.m +30 -0
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +375 -0
- package/test/package-lock.json +584 -0
- package/test/package.json +9 -0
- package/test/test.tsx +61 -0
- package/test/utils.tsx +38 -0
- package/www/capacitor/customization/customization_fonts.js +1 -1
- package/www/capacitor/customization/customization_images.js +1 -1
- package/www/capacitor/customization/font.js +8 -0
- package/www/capacitor/detect_faces/detect_face_result.js +12 -0
- package/www/capacitor/detect_faces/detect_faces_attribute_result.js +9 -0
- package/www/capacitor/detect_faces/detect_faces_backend_exception.js +7 -0
- package/www/capacitor/detect_faces/detect_faces_config.js +34 -0
- package/www/capacitor/detect_faces/detect_faces_exception.js +8 -0
- package/www/capacitor/detect_faces/detect_faces_request.js +22 -0
- package/www/capacitor/detect_faces/detect_faces_response.js +9 -0
- package/www/capacitor/face_capture/face_capture_config.js +37 -0
- package/www/capacitor/face_capture/face_capture_exception.js +7 -0
- package/www/capacitor/face_capture/face_capture_image.js +8 -0
- package/www/capacitor/face_capture/face_capture_response.js +7 -0
- package/www/capacitor/image_params/output_image_crop.js +23 -0
- package/www/capacitor/image_params/output_image_params.js +19 -0
- package/www/capacitor/image_params/point.js +7 -0
- package/www/capacitor/image_params/rect.js +9 -0
- package/www/capacitor/image_params/size.js +12 -0
- package/www/capacitor/image_quality/image_quality_characteristic.js +22 -0
- package/www/capacitor/image_quality/image_quality_range.js +7 -0
- package/www/capacitor/image_quality/image_quality_result.js +10 -0
- package/www/capacitor/index.js +48 -0
- package/www/capacitor/init/face_sdk_version.js +8 -0
- package/www/capacitor/init/init_config.js +19 -0
- package/www/capacitor/init/init_exception.js +8 -0
- package/www/capacitor/init/license_exception.js +7 -0
- package/www/capacitor/internal/bridge.js +20 -1
- package/www/capacitor/liveness/liveness_backend_exception.js +7 -0
- package/www/capacitor/liveness/liveness_config.js +43 -0
- package/www/capacitor/liveness/liveness_exception.js +8 -0
- package/www/capacitor/liveness/liveness_notification.js +7 -0
- package/www/capacitor/liveness/liveness_response.js +11 -0
- package/www/capacitor/match_faces/compared_face.js +9 -0
- package/www/capacitor/match_faces/compared_faces_pair.js +10 -0
- package/www/capacitor/match_faces/compared_faces_split.js +7 -0
- package/www/capacitor/match_faces/match_faces_backend_exception.js +7 -0
- package/www/capacitor/match_faces/match_faces_config.js +19 -0
- package/www/capacitor/match_faces/match_faces_detection.js +9 -0
- package/www/capacitor/match_faces/match_faces_detection_face.js +11 -0
- package/www/capacitor/match_faces/match_faces_exception.js +8 -0
- package/www/capacitor/match_faces/match_faces_image.js +9 -0
- package/www/capacitor/match_faces/match_faces_request.js +27 -0
- package/www/capacitor/match_faces/match_faces_response.js +9 -0
- package/www/capacitor/person_database/edit_group_persons_request.js +15 -0
- package/www/capacitor/person_database/image_upload.js +17 -0
- package/www/capacitor/person_database/pageable_item_list.js +8 -0
- package/www/capacitor/person_database/person.js +13 -0
- package/www/capacitor/person_database/person_group.js +11 -0
- package/www/capacitor/person_database/person_image.js +13 -0
- package/www/capacitor/person_database/search_person.js +14 -0
- package/www/capacitor/person_database/search_person_detection.js +9 -0
- package/www/capacitor/person_database/search_person_image.js +15 -0
- package/www/capacitor/person_database/search_person_request.js +29 -0
- package/www/cordova.js +753 -6
- 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 +8 -0
- package/www/react-native/detect_faces/detect_face_result.js +12 -0
- package/www/react-native/detect_faces/detect_faces_attribute_result.js +9 -0
- package/www/react-native/detect_faces/detect_faces_backend_exception.js +7 -0
- package/www/react-native/detect_faces/detect_faces_config.js +34 -0
- package/www/react-native/detect_faces/detect_faces_exception.js +8 -0
- package/www/react-native/detect_faces/detect_faces_request.js +22 -0
- package/www/react-native/detect_faces/detect_faces_response.js +9 -0
- package/www/react-native/face_capture/face_capture_config.js +37 -0
- package/www/react-native/face_capture/face_capture_exception.js +7 -0
- package/www/react-native/face_capture/face_capture_image.js +8 -0
- package/www/react-native/face_capture/face_capture_response.js +7 -0
- package/www/react-native/image_params/output_image_crop.js +23 -0
- package/www/react-native/image_params/output_image_params.js +19 -0
- package/www/react-native/image_params/point.js +7 -0
- package/www/react-native/image_params/rect.js +9 -0
- package/www/react-native/image_params/size.js +12 -0
- package/www/react-native/image_quality/image_quality_characteristic.js +22 -0
- package/www/react-native/image_quality/image_quality_range.js +7 -0
- package/www/react-native/image_quality/image_quality_result.js +10 -0
- package/www/react-native/index.js +48 -0
- package/www/react-native/init/face_sdk_version.js +8 -0
- package/www/react-native/init/init_config.js +19 -0
- package/www/react-native/init/init_exception.js +8 -0
- package/www/react-native/init/license_exception.js +7 -0
- package/www/react-native/internal/bridge.js +20 -1
- package/www/react-native/liveness/liveness_backend_exception.js +7 -0
- package/www/react-native/liveness/liveness_config.js +43 -0
- package/www/react-native/liveness/liveness_exception.js +8 -0
- package/www/react-native/liveness/liveness_notification.js +7 -0
- package/www/react-native/liveness/liveness_response.js +11 -0
- package/www/react-native/match_faces/compared_face.js +9 -0
- package/www/react-native/match_faces/compared_faces_pair.js +10 -0
- package/www/react-native/match_faces/compared_faces_split.js +7 -0
- package/www/react-native/match_faces/match_faces_backend_exception.js +7 -0
- package/www/react-native/match_faces/match_faces_config.js +19 -0
- package/www/react-native/match_faces/match_faces_detection.js +9 -0
- package/www/react-native/match_faces/match_faces_detection_face.js +11 -0
- package/www/react-native/match_faces/match_faces_exception.js +8 -0
- package/www/react-native/match_faces/match_faces_image.js +9 -0
- package/www/react-native/match_faces/match_faces_request.js +27 -0
- package/www/react-native/match_faces/match_faces_response.js +9 -0
- package/www/react-native/person_database/edit_group_persons_request.js +15 -0
- package/www/react-native/person_database/image_upload.js +17 -0
- package/www/react-native/person_database/pageable_item_list.js +8 -0
- package/www/react-native/person_database/person.js +13 -0
- package/www/react-native/person_database/person_group.js +11 -0
- package/www/react-native/person_database/person_image.js +13 -0
- package/www/react-native/person_database/search_person.js +14 -0
- package/www/react-native/person_database/search_person_detection.js +9 -0
- package/www/react-native/person_database/search_person_image.js +15 -0
- package/www/react-native/person_database/search_person_request.js +29 -0
- package/www/types/index.d.ts +12 -0
- package/www/types/match_faces/match_faces_config.d.ts +2 -0
- package/www/types/person_database/search_person_request.d.ts +4 -0
package/RNFaceSDK.podspec
CHANGED
|
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
|
|
|
5
5
|
|
|
6
6
|
Pod::Spec.new do |s|
|
|
7
7
|
s.name = 'RNFaceSDK'
|
|
8
|
-
s.version = '7.2.
|
|
8
|
+
s.version = '7.2.404-beta'
|
|
9
9
|
s.summary = package['description']
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
|
|
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.ios.deployment_target = '13.0'
|
|
17
17
|
s.source_files = 'ios/**/*.{h,m}'
|
|
18
18
|
s.exclude_files = [ 'ios/CVDFaceSDK.h', 'ios/CVDFaceSDK.m' ]
|
|
19
|
-
s.dependency 'FaceSDKStage', '7.2.
|
|
19
|
+
s.dependency 'FaceSDKStage', '7.2.3006'
|
|
20
20
|
s.dependency 'React'
|
|
21
21
|
end
|
package/android/build.gradle
CHANGED
|
@@ -41,7 +41,7 @@ dependencies {
|
|
|
41
41
|
//noinspection GradleDynamicVersion
|
|
42
42
|
implementation 'com.facebook.react:react-native:+'
|
|
43
43
|
//noinspection GradleDependency
|
|
44
|
-
implementation('com.regula.face:api:7.2.
|
|
44
|
+
implementation('com.regula.face:api:7.2.3946'){
|
|
45
45
|
transitive = true
|
|
46
46
|
}
|
|
47
47
|
}
|
package/android/cordova.gradle
CHANGED
|
@@ -833,6 +833,7 @@ fun searchPersonRequestFromJSON(it: JSONObject) = object : SearchPersonRequest()
|
|
|
833
833
|
groupIdsForSearch = it.getJSONArrayOrNull("groupIdsForSearch").toArray()
|
|
834
834
|
threshold = it.getDoubleOrNull("threshold")?.toFloat()
|
|
835
835
|
limit = it.getIntOrNull("limit")
|
|
836
|
+
tag = it.getStringOrNull("tag")
|
|
836
837
|
imageUpload = imageUploadFromJSON(it.getJSONObjectOrNull("imageUpload"))
|
|
837
838
|
isDetectAll = it.optBoolean("detectAll", false)
|
|
838
839
|
outputImageParams = outputImageParamsFromJSON(it.getJSONObjectOrNull("outputImageParams"))
|
|
@@ -843,6 +844,7 @@ fun generateSearchPersonRequest(it: SearchPersonRequest) = mapOf(
|
|
|
843
844
|
"groupIdsForSearch" to it.groupIdsForSearch.toJson(),
|
|
844
845
|
"threshold" to it.threshold,
|
|
845
846
|
"limit" to it.limit,
|
|
847
|
+
"tag" to it.tag,
|
|
846
848
|
"imageUpload" to generateImageUpload(it.imageUpload),
|
|
847
849
|
"detectAll" to it.isDetectAll,
|
|
848
850
|
"outputImageParams" to generateOutputImageParams(it.outputImageParams)
|
|
@@ -30,6 +30,12 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
|
|
|
30
30
|
"getVersion" -> getVersion(callback)
|
|
31
31
|
"getServiceUrl" -> getServiceUrl(callback)
|
|
32
32
|
"setServiceUrl" -> setServiceUrl(argsNullable(0))
|
|
33
|
+
"getTenant" -> getTenant(callback)
|
|
34
|
+
"setTenant" -> setTenant(argsNullable(0))
|
|
35
|
+
"getEnv" -> getEnv(callback)
|
|
36
|
+
"setEnv" -> setEnv(argsNullable(0))
|
|
37
|
+
"getLocale" -> getLocale(callback)
|
|
38
|
+
"setLocale" -> setLocale(argsNullable(0))
|
|
33
39
|
"setLocalizationDictionary" -> setLocalizationDictionary(args(0))
|
|
34
40
|
"setRequestHeaders" -> setRequestHeaders(args(0))
|
|
35
41
|
"setCustomization" -> setCustomization(args(0))
|
|
@@ -81,6 +87,18 @@ fun getServiceUrl(callback: Callback) = callback(Instance().serviceUrl)
|
|
|
81
87
|
|
|
82
88
|
fun setServiceUrl(url: String?) = url.let { Instance().serviceUrl = it }
|
|
83
89
|
|
|
90
|
+
fun getTenant(callback: Callback) = callback(Instance().tenant)
|
|
91
|
+
|
|
92
|
+
fun setTenant(tag: String?) = tag.let { Instance().tenant = it }
|
|
93
|
+
|
|
94
|
+
fun getEnv(callback: Callback) = callback(Instance().env)
|
|
95
|
+
|
|
96
|
+
fun setEnv(tag: String?) = tag.let { Instance().env = it }
|
|
97
|
+
|
|
98
|
+
fun getLocale(callback: Callback) = callback(Instance().locale)
|
|
99
|
+
|
|
100
|
+
fun setLocale(locale: String?) = locale.let { Instance().locale = it }
|
|
101
|
+
|
|
84
102
|
fun setLocalizationDictionary(dictionary: JSONObject) {
|
|
85
103
|
localizationCallbacks = LocalizationCallbacks { if (dictionary.has(it)) dictionary.getString(it) else null }
|
|
86
104
|
Instance().setLocalizationCallback(localizationCallbacks!!)
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/face-sdk": "7.2.
|
|
10
|
-
"@regulaforensics/face-core-basic": "7.2.
|
|
9
|
+
"@regulaforensics/face-sdk": "7.2.404-beta",
|
|
10
|
+
"@regulaforensics/face-core-basic": "7.2.238-rc",
|
|
11
11
|
"@awesome-cordova-plugins/file": "6.6.0",
|
|
12
12
|
"@awesome-cordova-plugins/camera": "6.6.0",
|
|
13
13
|
"cordova-plugin-file": "8.1.3",
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/face-sdk": "7.2.
|
|
10
|
-
"@regulaforensics/face-core-basic": "7.2.
|
|
9
|
+
"@regulaforensics/face-sdk": "7.2.404-beta",
|
|
10
|
+
"@regulaforensics/face-core-basic": "7.2.238-rc",
|
|
11
11
|
"cordova-ios": "7.1.1",
|
|
12
12
|
"cordova-android": "13.0.0",
|
|
13
13
|
"cordova-plugin-file": "8.1.3",
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/face-sdk": "7.2.
|
|
10
|
-
"@regulaforensics/face-core-basic": "7.2.
|
|
9
|
+
"@regulaforensics/face-sdk": "7.2.404-beta",
|
|
10
|
+
"@regulaforensics/face-core-basic": "7.2.238-rc",
|
|
11
11
|
"@awesome-cordova-plugins/file": "6.16.0",
|
|
12
12
|
"@awesome-cordova-plugins/camera": "6.16.0",
|
|
13
13
|
"@awesome-cordova-plugins/dialogs": "6.16.0",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"start": "expo start"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@regulaforensics/face-sdk": "7.2.
|
|
12
|
-
"@regulaforensics/face-core-basic": "7.2.
|
|
11
|
+
"@regulaforensics/face-sdk": "7.2.404-beta",
|
|
12
|
+
"@regulaforensics/face-core-basic": "7.2.238-rc",
|
|
13
13
|
"react-native": "0.79.2",
|
|
14
14
|
"react-native-fs": "2.20.0",
|
|
15
15
|
"react-native-image-picker": "8.2.1",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
+(RFSImageQualityCharacteristic* _Nonnull)imageQualityCharacteristicFromJSON:(id _Nonnull)input;
|
|
53
53
|
+(NSDictionary<NSString*, id>* _Nonnull)generateImageQualityCharacteristic:(RFSImageQualityCharacteristic* _Nonnull)input;
|
|
54
54
|
|
|
55
|
-
+(RFSFaceSDKVersion* _Nonnull)faceSDKVersionFromJSON:(id _Nonnull)input;
|
|
56
55
|
+(NSDictionary<NSString*, id>* _Nonnull)generateFaceSDKVersion:(RFSFaceSDKVersion* _Nonnull)input;
|
|
57
56
|
|
|
58
57
|
+(RFSInitializationConfiguration* _Nonnull)initConfigFromJSON:(id _Nonnull)input;
|
|
@@ -203,17 +203,7 @@
|
|
|
203
203
|
return result;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
if (!input || [input isEqual:[NSNull null]]) return nil;
|
|
208
|
-
RFSFaceSDKVersion* result = [RFSFaceSDKVersion new];
|
|
209
|
-
|
|
210
|
-
[result setValue:input[@"api"] forKey:@"api"];
|
|
211
|
-
[result setValue:input[@"core"] forKey:@"core"];
|
|
212
|
-
[result setValue:input[@"coreMode"] forKey:@"coreMode"];
|
|
213
|
-
|
|
214
|
-
return result;
|
|
215
|
-
}
|
|
216
|
-
|
|
206
|
+
// No fromJSON and no tests for FaceSDKVersion because of its implementation.
|
|
217
207
|
+(id)generateFaceSDKVersion:(RFSFaceSDKVersion*)input {
|
|
218
208
|
if (!input) return [NSNull null];
|
|
219
209
|
NSMutableDictionary* result = @{}.mutableCopy;
|
|
@@ -291,9 +281,9 @@
|
|
|
291
281
|
|
|
292
282
|
+(id)livenessResponseFromJSON:(NSDictionary*)input {
|
|
293
283
|
RFSLivenessResponse* result = [RFSLivenessResponse alloc];
|
|
294
|
-
SEL sel = NSSelectorFromString(@"initWithTag:transactionId:estimatedAge:status:
|
|
284
|
+
SEL sel = NSSelectorFromString(@"initWithTag:transactionId:estimatedAge:status:image:error:");
|
|
295
285
|
IMP imp = [result methodForSelector:sel];
|
|
296
|
-
void (*func)(id, SEL, id, id, id, NSInteger, id, id
|
|
286
|
+
void (*func)(id, SEL, id, id, id, NSInteger, id, id) = (void *)imp;
|
|
297
287
|
func(result,
|
|
298
288
|
sel,
|
|
299
289
|
input[@"tag"],
|
|
@@ -301,7 +291,6 @@
|
|
|
301
291
|
input[@"estimatedAge"],
|
|
302
292
|
[input[@"liveness"] integerValue],
|
|
303
293
|
[self imageWithBase64:input[@"image"]],
|
|
304
|
-
[self imageWithBase64:input[@"image"]],
|
|
305
294
|
nil);
|
|
306
295
|
return result;
|
|
307
296
|
}
|
|
@@ -893,6 +882,7 @@
|
|
|
893
882
|
imageUpload:[self imageUploadFromJSON:input[@"imageUpload"]]];
|
|
894
883
|
result.threshold = input[@"threshold"];
|
|
895
884
|
result.limit = input[@"limit"];
|
|
885
|
+
result.tag = input[@"tag"];
|
|
896
886
|
if (input[@"detectAll"] && ![input[@"detectAll"] isEqual:[NSNull null]]) result.detectAll = [input[@"detectAll"] boolValue];
|
|
897
887
|
result.outputImageParams = [self outputImageParamsFromJSON:input[@"outputImageParams"]];
|
|
898
888
|
return result;
|
|
@@ -906,6 +896,7 @@
|
|
|
906
896
|
}.mutableCopy;
|
|
907
897
|
if (input.threshold) result[@"threshold"] = input.threshold;
|
|
908
898
|
if (input.limit) result[@"limit"] = input.limit;
|
|
899
|
+
if (input.tag) result[@"tag"] = input.tag;
|
|
909
900
|
if (input.groupIdsForSearch) result[@"groupIdsForSearch"] = input.groupIdsForSearch;
|
|
910
901
|
if (input.outputImageParams) result[@"outputImageParams"] = [self generateOutputImageParams:input.outputImageParams];
|
|
911
902
|
return result;
|
package/ios/RFSWMain.m
CHANGED
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
@"getVersion": ^{ [self getVersion :callback]; },
|
|
10
10
|
@"getServiceUrl": ^{ [self getServiceUrl :callback]; },
|
|
11
11
|
@"setServiceUrl": ^{ [self setServiceUrl :args[0] :callback]; },
|
|
12
|
+
@"getTenant": ^{ [self getTenant :callback]; },
|
|
13
|
+
@"setTenant": ^{ [self setTenant :args[0]]; },
|
|
14
|
+
@"getEnv": ^{ [self getEnv :callback]; },
|
|
15
|
+
@"setEnv": ^{ [self setEnv :args[0]]; },
|
|
16
|
+
@"getLocale": ^{ [self getLocale :callback]; },
|
|
17
|
+
@"setLocale": ^{ [self setLocale :args[0]]; },
|
|
12
18
|
@"setLocalizationDictionary": ^{ [self setLocalizationDictionary :args[0]]; },
|
|
13
19
|
@"setRequestHeaders": ^{ [self setRequestHeaders :args[0]]; },
|
|
14
20
|
@"setCustomization": ^{ [self setCustomization :args[0]]; },
|
|
@@ -64,6 +70,30 @@ static NSDictionary* headers;
|
|
|
64
70
|
callback(@"");
|
|
65
71
|
}
|
|
66
72
|
|
|
73
|
+
+(void)getTenant:(RFSWCallback)callback {
|
|
74
|
+
callback([RFSFaceSDK.service tenant]);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
+(void)setTenant:(NSString*)tag {
|
|
78
|
+
[RFSFaceSDK.service setTenant:tag];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
+(void)getEnv:(RFSWCallback)callback {
|
|
82
|
+
callback([RFSFaceSDK.service env]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
+(void)setEnv:(NSString*)tag {
|
|
86
|
+
[RFSFaceSDK.service setEnv:tag];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
+(void)getLocale:(RFSWCallback)callback {
|
|
90
|
+
callback([RFSFaceSDK.service languageLocaleCode]);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
+(void)setLocale:(NSString*)locale {
|
|
94
|
+
[RFSFaceSDK.service setLanguageLocaleCode:locale];
|
|
95
|
+
}
|
|
96
|
+
|
|
67
97
|
+(void)setLocalizationDictionary:(NSDictionary*)dictionary {
|
|
68
98
|
RFSFaceSDK.service.localizationHandler = ^NSString* (NSString* localizationKey) {
|
|
69
99
|
if (dictionary[localizationKey]) return dictionary[localizationKey];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/face-sdk",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.404-beta",
|
|
4
4
|
"description": "This is an npm module for Regula Face SDK. It allows you to easily compaire faces using your phone's camera.",
|
|
5
5
|
"main": "www/react-native/index.js",
|
|
6
6
|
"module": "www/capacitor/index.js",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/face-sdk" version="7.2.
|
|
2
|
+
<plugin id="@regulaforensics/face-sdk" version="7.2.404-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>FaceSDK</name>
|
|
4
4
|
<description>Cordova plugin for Regula Face SDK</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<source url="https://github.com/CocoaPods/Specs.git" />
|
|
30
30
|
</config>
|
|
31
31
|
<pods>
|
|
32
|
-
<pod name="FaceSDKStage" spec="7.2.
|
|
32
|
+
<pod name="FaceSDKStage" spec="7.2.3006" />
|
|
33
33
|
</pods>
|
|
34
34
|
</podspec>
|
|
35
35
|
</platform>
|
package/test/json.tsx
ADDED
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
var img1 = 'data1'
|
|
2
|
+
var img2 = 'data2'
|
|
3
|
+
var img3 = 'data3'
|
|
4
|
+
|
|
5
|
+
export var customJson = {"test1": true, "test2": 1, "test3": "test"}
|
|
6
|
+
|
|
7
|
+
export var font1 = {"name": "AppleSDGothicNeo-Thin", "size": 10, "style": 2}
|
|
8
|
+
export var font2 = {"name": "Copperplate-Light", "size": 20, "style": 1}
|
|
9
|
+
export var customizationColors = {
|
|
10
|
+
"100": 0xff000000,
|
|
11
|
+
"101": 0xff000001,
|
|
12
|
+
"102": 0xff000002,
|
|
13
|
+
"103": 0xff000003,
|
|
14
|
+
"104": 0xff000004,
|
|
15
|
+
"105": 0xff000005,
|
|
16
|
+
"200": 0xff000006,
|
|
17
|
+
"201": 0xff000007,
|
|
18
|
+
"202": 0xff000008,
|
|
19
|
+
"203": 0xff000009,
|
|
20
|
+
"204": 0xff000010,
|
|
21
|
+
"205": 0xff000011,
|
|
22
|
+
"206": 0xff000012,
|
|
23
|
+
"207": 0xff000013,
|
|
24
|
+
"208": 0xff000014,
|
|
25
|
+
"209": 0xff000015,
|
|
26
|
+
"300": 0xff000016,
|
|
27
|
+
"301": 0xff000017,
|
|
28
|
+
"302": 0xff000018,
|
|
29
|
+
"303": 0xff000019,
|
|
30
|
+
"304": 0xff000020,
|
|
31
|
+
"305": 0xff000021,
|
|
32
|
+
"400": 0xff000022,
|
|
33
|
+
"401": 0xff000023,
|
|
34
|
+
"402": 0xff000024,
|
|
35
|
+
"500": 0xff000025,
|
|
36
|
+
}
|
|
37
|
+
export var customizationFonts = {
|
|
38
|
+
"100": font1,
|
|
39
|
+
"101": font2,
|
|
40
|
+
"102": font1,
|
|
41
|
+
"103": font2,
|
|
42
|
+
"200": font1,
|
|
43
|
+
"300": font2,
|
|
44
|
+
"301": font1,
|
|
45
|
+
"302": font2,
|
|
46
|
+
"303": font1,
|
|
47
|
+
"400": font2,
|
|
48
|
+
}
|
|
49
|
+
export var customizationImages = {
|
|
50
|
+
"100": img1,
|
|
51
|
+
"101": img2,
|
|
52
|
+
"102": img3,
|
|
53
|
+
"103": img1,
|
|
54
|
+
"200": img2,
|
|
55
|
+
"201": img3,
|
|
56
|
+
"202": img1,
|
|
57
|
+
"203": img2,
|
|
58
|
+
"300": img3,
|
|
59
|
+
"301": img1,
|
|
60
|
+
"302": img2,
|
|
61
|
+
"400": img3,
|
|
62
|
+
"500": img1,
|
|
63
|
+
}
|
|
64
|
+
export var customization = {
|
|
65
|
+
"colors": customizationColors,
|
|
66
|
+
"fonts": customizationFonts,
|
|
67
|
+
"images": customizationImages,
|
|
68
|
+
"uiCustomizationLayer": customJson
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export var point = {
|
|
72
|
+
"x": 0,
|
|
73
|
+
"y": 1,
|
|
74
|
+
}
|
|
75
|
+
export var rect = {
|
|
76
|
+
"left": 0,
|
|
77
|
+
"top": 1,
|
|
78
|
+
"right": 2,
|
|
79
|
+
"bottom": 3,
|
|
80
|
+
}
|
|
81
|
+
export var size = {
|
|
82
|
+
"width": 68,
|
|
83
|
+
"height": 91,
|
|
84
|
+
}
|
|
85
|
+
export var outputImageCrop = {
|
|
86
|
+
"type": 0,
|
|
87
|
+
"size": size,
|
|
88
|
+
"padColor": 0xff000000,
|
|
89
|
+
"returnOriginalRect": true
|
|
90
|
+
}
|
|
91
|
+
export var outputImageParams = {
|
|
92
|
+
"crop": outputImageCrop,
|
|
93
|
+
"backgroundColor": 0xff000000,
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export var imageQualityRange = {
|
|
97
|
+
"min": 0.45,
|
|
98
|
+
"max": 0.55,
|
|
99
|
+
}
|
|
100
|
+
export var imageQualityResult = {
|
|
101
|
+
"group": 1,
|
|
102
|
+
"name": "ImageWidth",
|
|
103
|
+
"status": 0,
|
|
104
|
+
"value": 0.5,
|
|
105
|
+
"range": imageQualityRange,
|
|
106
|
+
}
|
|
107
|
+
export var imageQualityCharacteristic = {
|
|
108
|
+
"characteristicName": "FaceMidPointHorizontalPosition",
|
|
109
|
+
"recommendedRange": imageQualityRange,
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export var detectFacesAttributeResult = {
|
|
113
|
+
"attribute": "Age",
|
|
114
|
+
"confidence": 0.5,
|
|
115
|
+
"value": "test",
|
|
116
|
+
"range": imageQualityRange,
|
|
117
|
+
}
|
|
118
|
+
export var detectFaceResult = {
|
|
119
|
+
"quality": [imageQualityResult, imageQualityResult, imageQualityResult],
|
|
120
|
+
"crop": img1,
|
|
121
|
+
"attributes": [
|
|
122
|
+
detectFacesAttributeResult,
|
|
123
|
+
detectFacesAttributeResult,
|
|
124
|
+
detectFacesAttributeResult
|
|
125
|
+
],
|
|
126
|
+
"landmarks": [point, point, point],
|
|
127
|
+
"faceRect": rect,
|
|
128
|
+
"originalRect": rect,
|
|
129
|
+
"isQualityCompliant": false,
|
|
130
|
+
}
|
|
131
|
+
export var detectFacesConfig = {
|
|
132
|
+
"attributes": ["Age", "EyeRight", "EyeLeft"],
|
|
133
|
+
"customQuality": [
|
|
134
|
+
imageQualityCharacteristic,
|
|
135
|
+
imageQualityCharacteristic,
|
|
136
|
+
imageQualityCharacteristic
|
|
137
|
+
],
|
|
138
|
+
"outputImageParams": outputImageParams,
|
|
139
|
+
"onlyCentralFace": true,
|
|
140
|
+
}
|
|
141
|
+
export var detectFacesRequest = {
|
|
142
|
+
"tag": "test",
|
|
143
|
+
// "scenario": "CropCentralFace",
|
|
144
|
+
"image": img1,
|
|
145
|
+
"configuration": detectFacesConfig,
|
|
146
|
+
}
|
|
147
|
+
export var detectFacesBackendException = {
|
|
148
|
+
"code": 2,
|
|
149
|
+
"message": "test",
|
|
150
|
+
}
|
|
151
|
+
export var detectFacesException = {
|
|
152
|
+
"code": 0,
|
|
153
|
+
"message": "In process already.",
|
|
154
|
+
"underlyingError": detectFacesBackendException
|
|
155
|
+
}
|
|
156
|
+
export var detectFacesResponse = {
|
|
157
|
+
"detection": detectFaceResult,
|
|
158
|
+
"allDetections": [detectFaceResult, detectFaceResult, detectFaceResult],
|
|
159
|
+
"scenario": "CropCentralFace",
|
|
160
|
+
"error": detectFacesException,
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export var faceCaptureConfig = {
|
|
164
|
+
"copyright": true,
|
|
165
|
+
"cameraSwitchEnabled": false,
|
|
166
|
+
"closeButtonEnabled": true,
|
|
167
|
+
"torchButtonEnabled": false,
|
|
168
|
+
"vibrateOnSteps": true,
|
|
169
|
+
"detectOcclusion": false,
|
|
170
|
+
"showFaceAnimation": true,
|
|
171
|
+
"cameraPositionAndroid": 0,
|
|
172
|
+
"cameraPositionIOS": 1,
|
|
173
|
+
"screenOrientation": [0, 1],
|
|
174
|
+
"timeout": 0.5,
|
|
175
|
+
"holdStillDuration": 1.5,
|
|
176
|
+
}
|
|
177
|
+
export var faceCaptureImage = {
|
|
178
|
+
"image": img1,
|
|
179
|
+
"imageType": 1,
|
|
180
|
+
"tag": "test",
|
|
181
|
+
}
|
|
182
|
+
export var faceCaptureException = {
|
|
183
|
+
"code": 0,
|
|
184
|
+
"message": "Cancelled by user.",
|
|
185
|
+
}
|
|
186
|
+
export var faceCaptureResponse = {
|
|
187
|
+
"image": faceCaptureImage,
|
|
188
|
+
"error": faceCaptureException,
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export var faceSDKVersion = {
|
|
192
|
+
"api": "test1",
|
|
193
|
+
"core": "test2",
|
|
194
|
+
"coreMode": "test3",
|
|
195
|
+
}
|
|
196
|
+
export var initConfig = {
|
|
197
|
+
"license": img1,
|
|
198
|
+
"licenseUpdate": true,
|
|
199
|
+
"useBleDevice": false,
|
|
200
|
+
}
|
|
201
|
+
export var licenseException = {
|
|
202
|
+
"code": 0,
|
|
203
|
+
"message": "",
|
|
204
|
+
}
|
|
205
|
+
export var initException = {
|
|
206
|
+
"code": 0,
|
|
207
|
+
"message": "In process already.",
|
|
208
|
+
"underlyingError": licenseException
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export var livenessConfig = {
|
|
212
|
+
"copyright": true,
|
|
213
|
+
"cameraSwitchEnabled": false,
|
|
214
|
+
"closeButtonEnabled": true,
|
|
215
|
+
"torchButtonEnabled": false,
|
|
216
|
+
"vibrateOnSteps": true,
|
|
217
|
+
"cameraPositionAndroid": -1,
|
|
218
|
+
"cameraPositionIOS": 1,
|
|
219
|
+
"screenOrientation": [0, 1],
|
|
220
|
+
"locationTrackingEnabled": true,
|
|
221
|
+
"attemptsCount": 2,
|
|
222
|
+
"recordingProcess": 0,
|
|
223
|
+
"livenessType": 1,
|
|
224
|
+
"tag": "test",
|
|
225
|
+
"skipStep": [0, 1],
|
|
226
|
+
"metadata": customJson,
|
|
227
|
+
}
|
|
228
|
+
export var livenessBackendException = {
|
|
229
|
+
"code": 200,
|
|
230
|
+
"message": "No license",
|
|
231
|
+
}
|
|
232
|
+
export var livenessException = {
|
|
233
|
+
"code": 0,
|
|
234
|
+
"message": "FaceSDK Core is not initialized",
|
|
235
|
+
"underlyingError": livenessBackendException
|
|
236
|
+
}
|
|
237
|
+
export var livenessResponse = {
|
|
238
|
+
"image": img1,
|
|
239
|
+
"liveness": 0,
|
|
240
|
+
"tag": "test",
|
|
241
|
+
"transactionId": "test1",
|
|
242
|
+
"estimatedAge": 1,
|
|
243
|
+
"error": livenessException,
|
|
244
|
+
}
|
|
245
|
+
export var livenessNotification = {
|
|
246
|
+
"status": 0,
|
|
247
|
+
"response": livenessResponse,
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export var matchFacesConfig = {
|
|
251
|
+
"processingMode": 0,
|
|
252
|
+
"locationTrackingEnabled": false,
|
|
253
|
+
}
|
|
254
|
+
export var matchFacesImage = {
|
|
255
|
+
"image": img1,
|
|
256
|
+
"imageType": 1,
|
|
257
|
+
"detectAll": true,
|
|
258
|
+
"identifier": "test"
|
|
259
|
+
}
|
|
260
|
+
export var matchFacesRequest = {
|
|
261
|
+
"images": [matchFacesImage, matchFacesImage, matchFacesImage],
|
|
262
|
+
"outputImageParams": outputImageParams,
|
|
263
|
+
"tag": "test",
|
|
264
|
+
"metadata": customJson,
|
|
265
|
+
}
|
|
266
|
+
export var matchFacesDetectionFace = {
|
|
267
|
+
"faceIndex": 0,
|
|
268
|
+
"landmarks": [point, point, point],
|
|
269
|
+
"faceRect": rect,
|
|
270
|
+
"rotationAngle": 0.5,
|
|
271
|
+
"originalRect": rect,
|
|
272
|
+
"crop": img1,
|
|
273
|
+
}
|
|
274
|
+
export var matchFacesBackendException = {"code": 0, "message": "Image is empty."}
|
|
275
|
+
export var matchFacesException = {
|
|
276
|
+
"code": 0,
|
|
277
|
+
"message": "Image is empty.",
|
|
278
|
+
"underlyingError": matchFacesBackendException,
|
|
279
|
+
}
|
|
280
|
+
export var matchFacesDetection = {
|
|
281
|
+
"imageIndex": 0,
|
|
282
|
+
"image": matchFacesImage,
|
|
283
|
+
"faces": [
|
|
284
|
+
matchFacesDetectionFace,
|
|
285
|
+
matchFacesDetectionFace,
|
|
286
|
+
matchFacesDetectionFace
|
|
287
|
+
],
|
|
288
|
+
"error": matchFacesException,
|
|
289
|
+
}
|
|
290
|
+
export var comparedFace = {
|
|
291
|
+
"imageIndex": 0,
|
|
292
|
+
"image": matchFacesImage,
|
|
293
|
+
"faceIndex": 1,
|
|
294
|
+
"face": matchFacesDetectionFace,
|
|
295
|
+
}
|
|
296
|
+
export var comparedFacesPair = {
|
|
297
|
+
"first": comparedFace,
|
|
298
|
+
"second": comparedFace,
|
|
299
|
+
"similarity": 0.5,
|
|
300
|
+
"score": 1.5,
|
|
301
|
+
"error": matchFacesException,
|
|
302
|
+
}
|
|
303
|
+
export var matchFacesResponse = {
|
|
304
|
+
"results": [comparedFacesPair, comparedFacesPair, comparedFacesPair],
|
|
305
|
+
"detections": [matchFacesDetection, matchFacesDetection, matchFacesDetection],
|
|
306
|
+
"tag": "test",
|
|
307
|
+
"error": matchFacesException,
|
|
308
|
+
}
|
|
309
|
+
export var comparedFacesSplit = {
|
|
310
|
+
"matchedFaces": [comparedFacesPair, comparedFacesPair, comparedFacesPair],
|
|
311
|
+
"unmatchedFaces": [comparedFacesPair, comparedFacesPair, comparedFacesPair],
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export var editGroupPersonsRequest = {
|
|
315
|
+
"personIdsToAdd": ["test1", "test2", "test3"],
|
|
316
|
+
"personIdsToRemove": ["test4", "test5", "test6"],
|
|
317
|
+
}
|
|
318
|
+
export var imageUpload = {"imageData": img1}
|
|
319
|
+
export var person = {
|
|
320
|
+
"name": "test1",
|
|
321
|
+
"updatedAt": "1969-07-20 20:18:04.000",
|
|
322
|
+
"groups": ["test1", "test2", "test3"],
|
|
323
|
+
"id": "test3",
|
|
324
|
+
"metadata": customJson,
|
|
325
|
+
"createdAt": "1969-07-20 20:18:05.000",
|
|
326
|
+
}
|
|
327
|
+
export var personGroup = {
|
|
328
|
+
"name": "test1",
|
|
329
|
+
"id": "test3",
|
|
330
|
+
"metadata": customJson,
|
|
331
|
+
"createdAt": "1969-07-20 20:18:04.000",
|
|
332
|
+
}
|
|
333
|
+
export var personImage = {
|
|
334
|
+
"path": "test",
|
|
335
|
+
"url": "test1",
|
|
336
|
+
"contentType": "test2",
|
|
337
|
+
"id": "test3",
|
|
338
|
+
"metadata": customJson,
|
|
339
|
+
"createdAt": "1969-07-20 20:18:04.000",
|
|
340
|
+
}
|
|
341
|
+
export var searchPersonDetection = {
|
|
342
|
+
"landmarks": [point, point, point],
|
|
343
|
+
"rect": rect,
|
|
344
|
+
"crop": img1,
|
|
345
|
+
"rotationAngle": 0.5,
|
|
346
|
+
}
|
|
347
|
+
export var searchPersonImage = {
|
|
348
|
+
"similarity": 0.5,
|
|
349
|
+
"distance": 1.5,
|
|
350
|
+
"path": "test",
|
|
351
|
+
"url": "test1",
|
|
352
|
+
"contentType": "test2",
|
|
353
|
+
"id": "test3",
|
|
354
|
+
"metadata": customJson,
|
|
355
|
+
"createdAt": "1969-07-20 20:18:04.000",
|
|
356
|
+
}
|
|
357
|
+
export var searchPerson = {
|
|
358
|
+
"images": [searchPersonImage, searchPersonImage, searchPersonImage],
|
|
359
|
+
"detection": searchPersonDetection,
|
|
360
|
+
"name": "test1",
|
|
361
|
+
"updatedAt": "1969-07-20 20:18:04.000",
|
|
362
|
+
"groups": ["test1", "test2", "test3"],
|
|
363
|
+
"id": "test3",
|
|
364
|
+
"metadata": customJson,
|
|
365
|
+
"createdAt": "1969-07-20 20:18:05.000",
|
|
366
|
+
}
|
|
367
|
+
export var searchPersonRequest = {
|
|
368
|
+
"imageUpload": imageUpload,
|
|
369
|
+
"groupIdsForSearch": ["test1", "test2", "test3"],
|
|
370
|
+
"threshold": 0.5,
|
|
371
|
+
"limit": 1,
|
|
372
|
+
"tag": "test",
|
|
373
|
+
"detectAll": true,
|
|
374
|
+
"outputImageParams": outputImageParams,
|
|
375
|
+
}
|