@regulaforensics/face-sdk 8.4.1338-nightly → 8.4.1343-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 (57) hide show
  1. package/RNFaceSDK.podspec +1 -1
  2. package/android/build.gradle +1 -1
  3. package/android/cordova.gradle +1 -1
  4. package/android/src/main/{java → kotlin}/com/regula/plugin/facesdk/Config.kt +94 -90
  5. package/android/src/main/{java/com/regula/plugin/facesdk/Main.kt → kotlin/com/regula/plugin/facesdk/Implementation.kt} +63 -41
  6. package/android/src/main/{java → kotlin}/com/regula/plugin/facesdk/JSONConstructor.kt +123 -75
  7. package/android/src/main/{java → kotlin}/com/regula/plugin/facesdk/Utils.kt +18 -2
  8. package/examples/capacitor/package.json +2 -2
  9. package/examples/ionic/package.json +2 -2
  10. package/examples/react_native/package.json +2 -2
  11. package/ios/Config.swift +100 -104
  12. package/ios/Decoder.swift +85 -64
  13. package/ios/Utils.swift +3 -0
  14. package/package.json +1 -1
  15. package/plugin.xml +7 -7
  16. package/test/json.tsx +73 -61
  17. package/test/test.tsx +8 -11
  18. package/www/capacitor/index.js +4 -11
  19. package/www/capacitor/liveness/enrollment_config.js +10 -16
  20. package/www/capacitor/liveness/enrollment_response.js +14 -10
  21. package/www/capacitor/liveness/liveness_exception.js +3 -3
  22. package/www/capacitor/liveness/verification_config.js +16 -4
  23. package/www/capacitor/liveness/{verify_match_response.js → verification_match_response.js} +5 -5
  24. package/www/capacitor/liveness/verification_response.js +9 -9
  25. package/www/capacitor/person_database/person.js +16 -7
  26. package/www/capacitor/person_database/search_person.js +9 -0
  27. package/www/capacitor/person_database/search_person_filter.js +44 -0
  28. package/www/cordova.js +238 -245
  29. package/www/react-native/index.js +4 -11
  30. package/www/react-native/liveness/enrollment_config.js +10 -16
  31. package/www/react-native/liveness/enrollment_response.js +14 -10
  32. package/www/react-native/liveness/liveness_exception.js +3 -3
  33. package/www/react-native/liveness/verification_config.js +16 -4
  34. package/www/react-native/liveness/{verify_match_response.js → verification_match_response.js} +5 -5
  35. package/www/react-native/liveness/verification_response.js +9 -9
  36. package/www/react-native/person_database/person.js +16 -7
  37. package/www/react-native/person_database/search_person.js +9 -0
  38. package/www/react-native/person_database/search_person_filter.js +44 -0
  39. package/www/types/index.d.ts +4 -8
  40. package/www/types/liveness/enrollment_config.d.ts +4 -6
  41. package/www/types/liveness/enrollment_response.d.ts +5 -4
  42. package/www/types/liveness/liveness_exception.d.ts +2 -2
  43. package/www/types/liveness/verification_config.d.ts +49 -5
  44. package/www/types/liveness/verification_match_response.d.ts +6 -0
  45. package/www/types/liveness/verification_response.d.ts +5 -5
  46. package/www/types/person_database/person.d.ts +12 -8
  47. package/www/types/person_database/search_person.d.ts +6 -0
  48. package/www/types/person_database/search_person_filter.d.ts +16 -0
  49. package/www/capacitor/liveness/enrollment_request.js +0 -39
  50. package/www/capacitor/liveness/error_response.js +0 -21
  51. package/www/react-native/liveness/enrollment_request.js +0 -39
  52. package/www/react-native/liveness/error_response.js +0 -21
  53. package/www/types/liveness/enrollment_request.d.ts +0 -24
  54. package/www/types/liveness/error_response.d.ts +0 -6
  55. package/www/types/liveness/verify_match_response.d.ts +0 -6
  56. /package/android/src/main/{java → kotlin}/com/regula/plugin/facesdk/RNFaceApiModule.kt +0 -0
  57. /package/ios/{Main.swift → Implementation.swift} +0 -0
@@ -0,0 +1,44 @@
1
+ export class SearchPersonFilter {
2
+ groups
3
+ threshold
4
+ limit
5
+ fieldName
6
+ fieldValues
7
+ exclude
8
+
9
+ constructor(options) {
10
+ this.groups = options?.groups ?? []
11
+ this.threshold = options?.threshold ?? 0
12
+ this.limit = options?.limit ?? 1
13
+ }
14
+
15
+ filterField(fieldName, fieldValues, options) {
16
+ this.fieldName = fieldName
17
+ this.fieldValues = fieldValues
18
+ this.exclude = options?.exclude ?? false
19
+ }
20
+
21
+ static fromJson(jsonObject) {
22
+ if (jsonObject == null) return null
23
+ var result = new SearchPersonFilter({
24
+ groups: jsonObject["groups"],
25
+ threshold: jsonObject["threshold"],
26
+ limit: jsonObject["limit"]
27
+ })
28
+ result.fieldName = jsonObject["fieldName"];
29
+ result.fieldValues = jsonObject["fieldValues"];
30
+ result.exclude = jsonObject["exclude"];
31
+ return result
32
+ }
33
+
34
+ toJson() {
35
+ return {
36
+ "groups": this.groups,
37
+ "threshold": this.threshold,
38
+ "limit": this.limit,
39
+ "fieldName": this.fieldName,
40
+ "fieldValues": this.fieldValues,
41
+ "exclude": this.exclude,
42
+ }
43
+ }
44
+ }