@regulaforensics/face-sdk 8.4.1338-nightly → 8.4.1344-rc

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 (58) 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 → 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 +8 -8
  16. package/test/json.tsx +73 -61
  17. package/test/package-lock.json +5 -2
  18. package/test/test.tsx +8 -11
  19. package/www/capacitor/index.js +4 -11
  20. package/www/capacitor/liveness/enrollment_config.js +10 -16
  21. package/www/capacitor/liveness/enrollment_response.js +14 -10
  22. package/www/capacitor/liveness/liveness_exception.js +3 -3
  23. package/www/capacitor/liveness/verification_config.js +16 -4
  24. package/www/capacitor/liveness/{verify_match_response.js → verification_match_response.js} +5 -5
  25. package/www/capacitor/liveness/verification_response.js +9 -9
  26. package/www/capacitor/person_database/person.js +16 -7
  27. package/www/capacitor/person_database/search_person.js +9 -0
  28. package/www/capacitor/person_database/search_person_filter.js +44 -0
  29. package/www/cordova.js +238 -245
  30. package/www/react-native/index.js +4 -11
  31. package/www/react-native/liveness/enrollment_config.js +10 -16
  32. package/www/react-native/liveness/enrollment_response.js +14 -10
  33. package/www/react-native/liveness/liveness_exception.js +3 -3
  34. package/www/react-native/liveness/verification_config.js +16 -4
  35. package/www/react-native/liveness/{verify_match_response.js → verification_match_response.js} +5 -5
  36. package/www/react-native/liveness/verification_response.js +9 -9
  37. package/www/react-native/person_database/person.js +16 -7
  38. package/www/react-native/person_database/search_person.js +9 -0
  39. package/www/react-native/person_database/search_person_filter.js +44 -0
  40. package/www/types/index.d.ts +4 -8
  41. package/www/types/liveness/enrollment_config.d.ts +4 -6
  42. package/www/types/liveness/enrollment_response.d.ts +5 -4
  43. package/www/types/liveness/liveness_exception.d.ts +2 -2
  44. package/www/types/liveness/verification_config.d.ts +49 -5
  45. package/www/types/liveness/verification_match_response.d.ts +6 -0
  46. package/www/types/liveness/verification_response.d.ts +5 -5
  47. package/www/types/person_database/person.d.ts +12 -8
  48. package/www/types/person_database/search_person.d.ts +6 -0
  49. package/www/types/person_database/search_person_filter.d.ts +16 -0
  50. package/www/capacitor/liveness/enrollment_request.js +0 -39
  51. package/www/capacitor/liveness/error_response.js +0 -21
  52. package/www/react-native/liveness/enrollment_request.js +0 -39
  53. package/www/react-native/liveness/error_response.js +0 -21
  54. package/www/types/liveness/enrollment_request.d.ts +0 -24
  55. package/www/types/liveness/error_response.d.ts +0 -6
  56. package/www/types/liveness/verify_match_response.d.ts +0 -6
  57. /package/android/src/main/{java → kotlin}/com/regula/plugin/facesdk/RNFaceApiModule.kt +0 -0
  58. /package/ios/{Main.swift → Implementation.swift} +0 -0
@@ -11,6 +11,9 @@ export class SearchPerson {
11
11
  id
12
12
  metadata
13
13
  createdAt
14
+ externalId
15
+ expireAt
16
+ ttl
14
17
 
15
18
  static fromJson(jsonObject) {
16
19
  if (jsonObject == null) return null
@@ -26,6 +29,9 @@ export class SearchPerson {
26
29
  result.id = jsonObject["id"]
27
30
  result.metadata = jsonObject["metadata"]
28
31
  result.createdAt = new Date(jsonObject["createdAt"])
32
+ result.externalId = jsonObject["externalId"]
33
+ result.expireAt = new Date(jsonObject["expireAt"])
34
+ result.ttl = jsonObject["ttl"]
29
35
 
30
36
  return result
31
37
  }
@@ -40,6 +46,9 @@ export class SearchPerson {
40
46
  "id": this.id,
41
47
  "metadata": this.metadata,
42
48
  "createdAt": dateToString(this.createdAt),
49
+ "externalId": this.externalId,
50
+ "expireAt": dateToString(this.expireAt),
51
+ "ttl": this.ttl,
43
52
  }
44
53
  }
45
54
  }
@@ -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
+ }