@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.
Files changed (53) hide show
  1. package/README.md +1 -1
  2. package/RNFaceSDK.podspec +2 -2
  3. package/android/CVDFaceSDK.kt +22 -8
  4. package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +7 -1
  5. package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +2 -0
  6. package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +2 -7
  7. package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiModule.kt +16 -6
  8. package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +1 -1
  9. package/examples/capacitor/README.md +1 -1
  10. package/examples/capacitor/android/app/capacitor.build.gradle +5 -4
  11. package/examples/capacitor/android/capacitor.settings.gradle +3 -0
  12. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  13. package/examples/capacitor/android/variables.gradle +12 -12
  14. package/examples/capacitor/ios/App/Podfile +3 -0
  15. package/examples/capacitor/ios/App/Podfile.lock +72 -0
  16. package/examples/capacitor/package-lock.json +11336 -0
  17. package/examples/capacitor/package.json +16 -18
  18. package/examples/capacitor/scripts/setup.sh +2 -0
  19. package/examples/capacitor/src/pages/Home.tsx +16 -12
  20. package/examples/cordova/README.md +1 -1
  21. package/examples/cordova/package-lock.json +1373 -0
  22. package/examples/cordova/package.json +1 -1
  23. package/examples/cordova/scripts/setup.sh +5 -1
  24. package/examples/ionic/README.md +1 -1
  25. package/examples/ionic/package-lock.json +15761 -0
  26. package/examples/ionic/package.json +1 -1
  27. package/examples/ionic/scripts/setup.sh +5 -1
  28. package/examples/ionic/src/app/home/home.page.ts +11 -11
  29. package/examples/react-native/Gemfile.lock +23 -21
  30. package/examples/react-native/ios/Podfile +2 -0
  31. package/examples/react-native/ios/Podfile.lock +471 -424
  32. package/examples/react-native/package-lock.json +615 -702
  33. package/examples/react-native/package.json +6 -6
  34. package/examples/react-native/scripts/android.sh +4 -0
  35. package/examples/react-native/scripts/ios.sh +4 -0
  36. package/ios/RFSWJSONConstructor.m +13 -15
  37. package/ios/RFSWMain.m +1 -1
  38. package/package.json +1 -1
  39. package/plugin.xml +3 -3
  40. package/www/capacitor/detect_faces/detect_faces_request.js +2 -0
  41. package/www/capacitor/image_quality/image_quality_characteristic.js +2 -0
  42. package/www/capacitor/image_quality/image_quality_group.js +1 -0
  43. package/www/capacitor/internal/bridge.js +8 -7
  44. package/www/capacitor/person_database/person_database.js +1 -1
  45. package/www/cordova.js +84 -75
  46. package/www/react-native/detect_faces/detect_faces_request.js +2 -0
  47. package/www/react-native/image_quality/image_quality_characteristic.js +2 -0
  48. package/www/react-native/image_quality/image_quality_group.js +1 -0
  49. package/www/react-native/internal/bridge.js +8 -7
  50. package/www/react-native/person_database/person_database.js +1 -1
  51. package/www/types/person_database/person_database.d.ts +1 -1
  52. package/.gitlab/report.yaml +0 -75
  53. 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.196-nightly",
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.6",
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.6",
29
- "@react-native/eslint-config": "0.76.6",
30
- "@react-native/metro-config": "0.76.6",
31
- "@react-native/typescript-config": "0.76.6",
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
@@ -3,6 +3,10 @@ set -e
3
3
 
4
4
  if [[ $npm_config_o || $npm_config_open ]]; then
5
5
  open ios/FaceSDK.xcworkspace
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-ios
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
- @"updatedAt":[self generateDate:input.updatedAt],
767
- @"createdAt":[self generateDate:input.createdAt]
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
- @"createdAt":[self generateDate:input.createdAt]
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 :(NSDictionary*)metadata :(NSArray<NSString*>*)groupIds :(RFSWCallback)callback {
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.196-nightly",
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.196-nightly" xmlns="http://apache.org/cordova/ns/plugins/1.0">
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="12.0" />
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://cdn.cocoapods.org/" />
29
+ <source url="https://github.com/CocoaPods/Specs.git" />
30
30
  </config>
31
31
  <pods>
32
32
  <pod name="FaceSDKNightly" spec="7.1.2555" />
@@ -1,3 +1,5 @@
1
+ import { DetectFacesScenario } from './detect_faces_scenario'
2
+
1
3
  export class DetectFacesRequest {
2
4
  image
3
5
  configuration
@@ -1,3 +1,5 @@
1
+ import { ImageQualityRange } from './image_quality_range'
2
+
1
3
  export class ImageQualityCharacteristic {
2
4
  characteristicName
3
5
  recommendedRange
@@ -1,3 +1,4 @@
1
+ import { ImageQualityCharacteristicName } from './image_quality_characteristic_name'
1
2
  import { ImageQualityCharacteristic } from './image_quality_characteristic'
2
3
  import { ImageQualityRange } from './image_quality_range'
3
4
 
@@ -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 (completion != null)
14
- eventManager.addListener(id, completion)
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", (json) => {
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
- completion(transactionId, success)
27
+ func(transactionId, success)
27
28
  })
28
29
  }
29
30
 
30
31
  export function _setLivenessNotificationCompletion(completion) {
31
- _setEvent("livenessNotificationEvent", (json) => {
32
+ _setEvent("livenessNotificationEvent", completion, func => json => {
32
33
  var livenessNotification = LivenessNotification.fromJson(JSON.parse(json))
33
- completion(livenessNotification)
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, PersonImage.fromJson)
41
+ return this._itemResponseFromJson(response, data => data)
42
42
  }
43
43
 
44
44
  async getPersonImages(personId) {