@regulaforensics/face-sdk 7.1.196-nightly → 7.1.201-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.
- package/README.md +1 -1
- package/RNFaceSDK.podspec +2 -2
- package/android/CVDFaceSDK.kt +22 -8
- package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +7 -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 +2 -7
- package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiModule.kt +16 -6
- package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +1 -1
- package/examples/capacitor/README.md +1 -1
- package/examples/capacitor/android/app/capacitor.build.gradle +5 -4
- package/examples/capacitor/android/capacitor.settings.gradle +3 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/examples/capacitor/android/variables.gradle +12 -12
- package/examples/capacitor/ios/App/Podfile +3 -0
- package/examples/capacitor/ios/App/Podfile.lock +72 -0
- package/examples/capacitor/package-lock.json +11336 -0
- package/examples/capacitor/package.json +16 -18
- package/examples/capacitor/scripts/setup.sh +2 -0
- package/examples/capacitor/src/pages/Home.tsx +16 -12
- package/examples/cordova/README.md +1 -1
- package/examples/cordova/package-lock.json +1373 -0
- package/examples/cordova/package.json +1 -1
- package/examples/cordova/scripts/setup.sh +5 -1
- package/examples/ionic/README.md +1 -1
- package/examples/ionic/package-lock.json +15761 -0
- package/examples/ionic/package.json +1 -1
- package/examples/ionic/scripts/setup.sh +5 -1
- package/examples/ionic/src/app/home/home.page.ts +11 -11
- package/examples/react-native/Gemfile.lock +23 -21
- package/examples/react-native/ios/Podfile +2 -0
- package/examples/react-native/ios/Podfile.lock +471 -424
- package/examples/react-native/package-lock.json +615 -702
- package/examples/react-native/package.json +6 -6
- package/examples/react-native/scripts/android.sh +4 -0
- package/examples/react-native/scripts/ios.sh +4 -0
- package/ios/RFSWJSONConstructor.m +13 -15
- package/ios/RFSWMain.m +1 -1
- package/package.json +1 -1
- package/plugin.xml +3 -3
- package/www/capacitor/detect_faces/detect_faces_request.js +2 -0
- package/www/capacitor/image_quality/image_quality_characteristic.js +2 -0
- package/www/capacitor/image_quality/image_quality_group.js +1 -0
- package/www/capacitor/internal/bridge.js +8 -7
- package/www/capacitor/person_database/person_database.js +1 -1
- package/www/cordova.js +84 -75
- package/www/react-native/detect_faces/detect_faces_request.js +2 -0
- package/www/react-native/image_quality/image_quality_characteristic.js +2 -0
- package/www/react-native/image_quality/image_quality_group.js +1 -0
- package/www/react-native/internal/bridge.js +8 -7
- package/www/react-native/person_database/person_database.js +1 -1
- package/www/types/person_database/person_database.d.ts +1 -1
- package/.gitlab/report.yaml +0 -75
- package/.gitlab-ci.yml +0 -49
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"test": "jest"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@regulaforensics/face-sdk": "7.1.
|
|
14
|
+
"@regulaforensics/face-sdk": "7.1.201-nightly",
|
|
15
15
|
"@regulaforensics/face-core-basic": "7.1.114-nightly",
|
|
16
16
|
"react": "18.3.1",
|
|
17
|
-
"react-native": "0.76.
|
|
17
|
+
"react-native": "0.76.9",
|
|
18
18
|
"react-native-fs": "2.20.0",
|
|
19
19
|
"react-native-image-picker": "7.2.3"
|
|
20
20
|
},
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"@react-native-community/cli": "15.1.3",
|
|
26
26
|
"@react-native-community/cli-platform-android": "15.1.3",
|
|
27
27
|
"@react-native-community/cli-platform-ios": "15.1.3",
|
|
28
|
-
"@react-native/babel-preset": "0.76.
|
|
29
|
-
"@react-native/eslint-config": "0.76.
|
|
30
|
-
"@react-native/metro-config": "0.76.
|
|
31
|
-
"@react-native/typescript-config": "0.76.
|
|
28
|
+
"@react-native/babel-preset": "0.76.9",
|
|
29
|
+
"@react-native/eslint-config": "0.76.9",
|
|
30
|
+
"@react-native/metro-config": "0.76.9",
|
|
31
|
+
"@react-native/typescript-config": "0.76.9",
|
|
32
32
|
"@types/react": "^18.2.6",
|
|
33
33
|
"@types/react-test-renderer": "^18.0.0",
|
|
34
34
|
"babel-jest": "^29.7.0",
|
|
@@ -3,6 +3,10 @@ set -e
|
|
|
3
3
|
|
|
4
4
|
if [[ $npm_config_o || $npm_config_open ]]; then
|
|
5
5
|
studio android || open -a 'Android Studio' android
|
|
6
|
+
# check if metro is already running
|
|
7
|
+
if ! pgrep -f "react-native start" > /dev/null; then
|
|
8
|
+
npm start
|
|
9
|
+
fi
|
|
6
10
|
else
|
|
7
11
|
react-native run-android
|
|
8
12
|
fi
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
|
|
312
312
|
+(id)matchFacesImageFromJSON:(NSDictionary*)input {
|
|
313
313
|
bool detectAll = false;
|
|
314
|
-
if (input[@"detectAll"]) detectAll = input[@"detectAll"];
|
|
314
|
+
if (input[@"detectAll"]) detectAll = [input[@"detectAll"] boolValue];
|
|
315
315
|
RFSMatchFacesImage* result = [[RFSMatchFacesImage alloc] initWithImage:[self imageWithBase64:input[@"image"]]
|
|
316
316
|
imageType:[input[@"imageType"] integerValue]
|
|
317
317
|
detectAll:detectAll];
|
|
@@ -762,10 +762,9 @@
|
|
|
762
762
|
|
|
763
763
|
+(id)generatePerson:(RFSPerson*)input {
|
|
764
764
|
if (!input) return [NSNull null];
|
|
765
|
-
NSMutableDictionary* result = @{
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
}.mutableCopy;
|
|
765
|
+
NSMutableDictionary* result = @{}.mutableCopy;
|
|
766
|
+
if (input.updatedAt) result[@"updatedAt"] = [self generateDate:input.updatedAt];
|
|
767
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
769
768
|
if (input.name) result[@"name"] = input.name;
|
|
770
769
|
if (input.groups) result[@"groups"] = input.groups;
|
|
771
770
|
if (input.itemId) result[@"id"] = input.itemId;
|
|
@@ -807,9 +806,9 @@
|
|
|
807
806
|
+(id)generatePersonImage:(RFSPersonImage*)input {
|
|
808
807
|
if (!input) return [NSNull null];
|
|
809
808
|
NSMutableDictionary* result = @{
|
|
810
|
-
@"url":[self generateUrl:input.url]
|
|
811
|
-
@"createdAt":[self generateDate:input.createdAt]
|
|
809
|
+
@"url":[self generateUrl:input.url]
|
|
812
810
|
}.mutableCopy;
|
|
811
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
813
812
|
if (input.path) result[@"path"] = input.path;
|
|
814
813
|
if (input.contentType) result[@"contentType"] = input.contentType;
|
|
815
814
|
if (input.itemId) result[@"id"] = input.itemId;
|
|
@@ -843,9 +842,8 @@
|
|
|
843
842
|
|
|
844
843
|
+(id)generatePersonGroup:(RFSPersonGroup*)input {
|
|
845
844
|
if (!input) return [NSNull null];
|
|
846
|
-
NSMutableDictionary* result = @{
|
|
847
|
-
|
|
848
|
-
}.mutableCopy;
|
|
845
|
+
NSMutableDictionary* result = @{}.mutableCopy;
|
|
846
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
849
847
|
if (input.name) result[@"name"] = input.name;
|
|
850
848
|
if (input.itemId) result[@"id"] = input.itemId;
|
|
851
849
|
if (input.metadata) result[@"metadata"] = input.metadata;
|
|
@@ -876,7 +874,7 @@
|
|
|
876
874
|
imageUpload:[self imageUploadFromJSON:input[@"imageUpload"]]];
|
|
877
875
|
result.threshold = input[@"threshold"];
|
|
878
876
|
result.limit = input[@"limit"];
|
|
879
|
-
if (input[@"detectAll"] && ![input[@"detectAll"] isEqual:[NSNull null]]) result.detectAll = input[@"detectAll"];
|
|
877
|
+
if (input[@"detectAll"] && ![input[@"detectAll"] isEqual:[NSNull null]]) result.detectAll = [input[@"detectAll"] boolValue];
|
|
880
878
|
result.outputImageParams = [self outputImageParamsFromJSON:input[@"outputImageParams"]];
|
|
881
879
|
return result;
|
|
882
880
|
}
|
|
@@ -934,9 +932,9 @@
|
|
|
934
932
|
|
|
935
933
|
+(id)generateSearchPersonImage:(RFSSearchPersonImage*)input {
|
|
936
934
|
NSMutableDictionary* result = @{
|
|
937
|
-
@"url":[self generateUrl:input.url]
|
|
938
|
-
@"createdAt":[self generateDate:input.createdAt]
|
|
935
|
+
@"url":[self generateUrl:input.url]
|
|
939
936
|
}.mutableCopy;
|
|
937
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
940
938
|
if (input.path) result[@"similarity"] = input.similarity;
|
|
941
939
|
if (input.path) result[@"distance"] = input.distance;
|
|
942
940
|
if (input.path) result[@"path"] = input.path;
|
|
@@ -964,9 +962,9 @@
|
|
|
964
962
|
NSMutableDictionary* result = @{
|
|
965
963
|
@"detection":[self generateSearchPersonDetection:input.detection],
|
|
966
964
|
@"images":[self generateArray:input.images :@selector(generateSearchPersonImage:)],
|
|
967
|
-
@"updatedAt":[self generateDate:input.updatedAt],
|
|
968
|
-
@"createdAt":[self generateDate:input.createdAt]
|
|
969
965
|
}.mutableCopy;
|
|
966
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
967
|
+
if (input.updatedAt) result[@"updatedAt"] = [self generateDate:input.updatedAt];
|
|
970
968
|
if (input.name) result[@"name"] = input.name;
|
|
971
969
|
if (input.groups) result[@"groups"] = input.groups;
|
|
972
970
|
if (input.itemId) result[@"id"] = input.itemId;
|
package/ios/RFSWMain.m
CHANGED
|
@@ -153,7 +153,7 @@ static UIViewController*(^rootViewController)(void) = ^UIViewController*(){
|
|
|
153
153
|
completion:[self detectFacesCompletion:callback]];
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
+(void)createPerson:(NSString*)name :(
|
|
156
|
+
+(void)createPerson:(NSString*)name :(NSArray<NSString*>*)groupIds :(NSDictionary*)metadata :(RFSWCallback)callback {
|
|
157
157
|
[RFSFaceSDK.service.personDatabase createPersonWithName:name
|
|
158
158
|
metadata:metadata
|
|
159
159
|
groupIds:groupIds
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/face-sdk",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.201-nightly",
|
|
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.1.
|
|
2
|
+
<plugin id="@regulaforensics/face-sdk" version="7.1.201-nightly" 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>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<feature name="FaceSDK">
|
|
15
15
|
<param name="ios-package" value="CVDFaceSDK" />
|
|
16
16
|
</feature>
|
|
17
|
-
<preference name="deployment-target" value="
|
|
17
|
+
<preference name="deployment-target" value="13.0" />
|
|
18
18
|
</config-file>
|
|
19
19
|
<header-file src="ios/CVDFaceSDK.h" />
|
|
20
20
|
<source-file src="ios/CVDFaceSDK.m" />
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<source-file src="ios/RFSWConfig.m" />
|
|
27
27
|
<podspec>
|
|
28
28
|
<config>
|
|
29
|
-
<source url="https://
|
|
29
|
+
<source url="https://github.com/CocoaPods/Specs.git" />
|
|
30
30
|
</config>
|
|
31
31
|
<pods>
|
|
32
32
|
<pod name="FaceSDKNightly" spec="7.1.2555" />
|
|
@@ -8,10 +8,11 @@ export async function exec(name, params) {
|
|
|
8
8
|
return RNFaceSDK.exec(name, params)
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
function _setEvent(id, completion) {
|
|
11
|
+
function _setEvent(id, completion, fromJson) {
|
|
12
12
|
eventManager.removeAllListeners(id)
|
|
13
|
-
if
|
|
14
|
-
|
|
13
|
+
// if no fromJson provided, just call completion
|
|
14
|
+
if (fromJson == undefined) fromJson = func => func
|
|
15
|
+
if (completion != undefined) eventManager.addListener(id, fromJson(completion))
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export function _setCustomButtonTappedCompletion(completion) {
|
|
@@ -19,18 +20,18 @@ export function _setCustomButtonTappedCompletion(completion) {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export function _setVideoEncoderCompletion(completion) {
|
|
22
|
-
_setEvent("video_encoder_completion",
|
|
23
|
+
_setEvent("video_encoder_completion", completion, func => json => {
|
|
23
24
|
var jsonObject = JSON.parse(json)
|
|
24
25
|
var transactionId = jsonObject["transactionId"]
|
|
25
26
|
var success = jsonObject["success"]
|
|
26
|
-
|
|
27
|
+
func(transactionId, success)
|
|
27
28
|
})
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
export function _setLivenessNotificationCompletion(completion) {
|
|
31
|
-
_setEvent("livenessNotificationEvent",
|
|
32
|
+
_setEvent("livenessNotificationEvent", completion, func => json => {
|
|
32
33
|
var livenessNotification = LivenessNotification.fromJson(JSON.parse(json))
|
|
33
|
-
|
|
34
|
+
func(livenessNotification)
|
|
34
35
|
})
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -38,7 +38,7 @@ export class PersonDatabase {
|
|
|
38
38
|
|
|
39
39
|
async getPersonImage(personId, imageId) {
|
|
40
40
|
var response = await exec("getPersonImage", [personId, imageId])
|
|
41
|
-
return this._itemResponseFromJson(response,
|
|
41
|
+
return this._itemResponseFromJson(response, data => data)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
async getPersonImages(personId) {
|