@regulaforensics/face-sdk 8.4.1336-rc → 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 (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 +2 -5
  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
package/ios/Config.swift CHANGED
@@ -107,111 +107,107 @@ public extension LivenessConfiguration {
107
107
  }
108
108
  }
109
109
 
110
- public extension EnrollmentConfiguration {
111
- static func decode2(_ it: [String: Any]) -> Self {
112
- return Self.init({ builder in
113
- for (k, v) in it {
114
- switch k {
115
- case("copyright"): builder.isCopyright = v as! Bool
116
- case("cameraSwitchEnabled"): builder.isCameraSwitchButtonEnabled = v as! Bool
117
- case("closeButtonEnabled"): builder.isCloseButtonEnabled = v as! Bool
118
- case("torchButtonEnabled"): builder.isTorchButtonEnabled = v as! Bool
119
- case("vibrateOnSteps"): builder.vibrateOnSteps = v as! Bool
120
- case("cameraPositionIOS"): builder.cameraPosition = CameraPosition(rawValue: v as! Int)!
121
- case("attemptsCount"): builder.attemptsCount = v as! Int
122
- case("locationTrackingEnabled"): builder.isLocationTrackingEnabled = v as! Bool
123
- case("preventScreenRecording"): builder.isPreventScreenRecordingEnable = v as! Bool
124
- case("recordingProcess"): builder.recordingProcess = RecordingProcess(rawValue: v as! Int)!
125
- case("livenessType"): builder.livenessType = LivenessType(rawValue: v as! Int)!
126
- case("screenOrientation"): builder.screenOrientation = RFSScreenOrientation.decode(v)
127
- case("tag"): builder.tag = v as? String
128
- case("externalId"): builder.externalId = v as! String
129
- case("groupId"): builder.groupId = v as? String
130
- case("checkDuplicatesEnabled"): builder.checkDuplicatesEnabled = v as? NSNumber
131
- case("duplicatesThreshold"): builder.duplicatesThreshold = v as? NSNumber
132
- case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
133
- case("metadata"): builder.metadata = v as! [String: Any]
134
- default: break
135
- }
136
- }
137
- })
138
- }
139
- func encode2() -> [String: Any?] {
140
- return [
141
- "copyright": self.isCopyright,
142
- "cameraSwitchEnabled": self.isCameraSwitchButtonEnabled,
143
- "closeButtonEnabled": self.isCloseButtonEnabled,
144
- "torchButtonEnabled": self.isTorchButtonEnabled,
145
- "vibrateOnSteps": self.vibrateOnSteps,
146
- "cameraPositionIOS": self.cameraPosition.rawValue,
147
- "attemptsCount": self.attemptsCount,
148
- "locationTrackingEnabled": self.isLocationTrackingEnabled,
149
- "preventScreenRecording": self.isPreventScreenRecordingEnable,
150
- "recordingProcess": self.recordingProcess.rawValue,
151
- "livenessType": self.livenessType.rawValue,
152
- "screenOrientation": self.screenOrientation.encode(),
153
- "tag": self.tag,
154
- "externalId": self.externalId,
155
- "groupId": self.groupId,
156
- "checkDuplicatesEnabled": self.checkDuplicatesEnabled,
157
- "duplicatesThreshold": self.duplicatesThreshold,
158
- "skipStep": self.stepSkippingMask.encode(),
159
- "metadata": self.metadata,
160
- ]
161
- }
162
- }
110
+ public extension EnrollmentConfiguration {
111
+ static func decode2(_ it: [String: Any]) -> Self {
112
+ return Self.init({ builder in
113
+ for (k, v) in it {
114
+ switch k {
115
+ case("copyright"): builder.isCopyright = v as! Bool
116
+ case("cameraSwitchEnabled"): builder.isCameraSwitchButtonEnabled = v as! Bool
117
+ case("closeButtonEnabled"): builder.isCloseButtonEnabled = v as! Bool
118
+ case("torchButtonEnabled"): builder.isTorchButtonEnabled = v as! Bool
119
+ case("vibrateOnSteps"): builder.vibrateOnSteps = v as! Bool
120
+ case("cameraPositionIOS"): builder.cameraPosition = CameraPosition(rawValue: v as! Int)!
121
+ case("attemptsCount"): builder.attemptsCount = v as! Int
122
+ case("locationTrackingEnabled"): builder.isLocationTrackingEnabled = v as! Bool
123
+ case("preventScreenRecording"): builder.isPreventScreenRecordingEnable = v as! Bool
124
+ case("recordingProcess"): builder.recordingProcess = RecordingProcess(rawValue: v as! Int)!
125
+ case("livenessType"): builder.livenessType = LivenessType(rawValue: v as! Int)!
126
+ case("screenOrientation"): builder.screenOrientation = RFSScreenOrientation.decode(v)
127
+ case("tag"): builder.tag = v as? String
128
+ case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
129
+ case("metadata"): builder.metadata = v as! [String: Any]
130
+ case("person"): builder.person = PersonDatabase.Person.decode(v as! [String: Any])!
131
+ case("searchFilter"): builder.searchFilter = SearchPersonFilter.decode(v as! [String: Any])
132
+ default: break
133
+ }
134
+ }
135
+ })
136
+ }
137
+ func encode2() -> [String: Any?] {
138
+ return [
139
+ "copyright": self.isCopyright,
140
+ "cameraSwitchEnabled": self.isCameraSwitchButtonEnabled,
141
+ "closeButtonEnabled": self.isCloseButtonEnabled,
142
+ "torchButtonEnabled": self.isTorchButtonEnabled,
143
+ "vibrateOnSteps": self.vibrateOnSteps,
144
+ "cameraPositionIOS": self.cameraPosition.rawValue,
145
+ "attemptsCount": self.attemptsCount,
146
+ "locationTrackingEnabled": self.isLocationTrackingEnabled,
147
+ "preventScreenRecording": self.isPreventScreenRecordingEnable,
148
+ "recordingProcess": self.recordingProcess.rawValue,
149
+ "livenessType": self.livenessType.rawValue,
150
+ "screenOrientation": self.screenOrientation.encode(),
151
+ "tag": self.tag,
152
+ "skipStep": self.stepSkippingMask.encode(),
153
+ "metadata": self.metadata,
154
+ "person": self.person.encode(),
155
+ "searchFilter": self.searchFilter.encode(),
156
+ ]
157
+ }
158
+ }
163
159
 
164
- public extension VerificationConfiguration {
165
- static func decode2(_ it: [String: Any]) -> Self {
166
- return Self.init({ builder in
167
- for (k, v) in it {
168
- switch k {
169
- case("copyright"): builder.isCopyright = v as! Bool
170
- case("cameraSwitchEnabled"): builder.isCameraSwitchButtonEnabled = v as! Bool
171
- case("closeButtonEnabled"): builder.isCloseButtonEnabled = v as! Bool
172
- case("torchButtonEnabled"): builder.isTorchButtonEnabled = v as! Bool
173
- case("vibrateOnSteps"): builder.vibrateOnSteps = v as! Bool
174
- case("cameraPositionIOS"): builder.cameraPosition = CameraPosition(rawValue: v as! Int)!
175
- case("attemptsCount"): builder.attemptsCount = v as! Int
176
- case("locationTrackingEnabled"): builder.isLocationTrackingEnabled = v as! Bool
177
- case("preventScreenRecording"): builder.isPreventScreenRecordingEnable = v as! Bool
178
- case("recordingProcess"): builder.recordingProcess = RecordingProcess(rawValue: v as! Int)!
179
- case("livenessType"): builder.livenessType = LivenessType(rawValue: v as! Int)!
180
- case("screenOrientation"): builder.screenOrientation = RFSScreenOrientation.decode(v)
181
- case("tag"): builder.tag = v as? String
182
- case("personId"): builder.personId = v as! String
183
- case("groupId"): builder.groupId = v as? String
184
- case("threshold"): builder.threshold = v as? NSNumber
185
- case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
186
- case("metadata"): builder.metadata = v as! [String: Any]
187
- default: break
188
- }
189
- }
190
- })
191
- }
192
- func encode2() -> [String: Any?] {
193
- return [
194
- "copyright": self.isCopyright,
195
- "cameraSwitchEnabled": self.isCameraSwitchButtonEnabled,
196
- "closeButtonEnabled": self.isCloseButtonEnabled,
197
- "torchButtonEnabled": self.isTorchButtonEnabled,
198
- "vibrateOnSteps": self.vibrateOnSteps,
199
- "cameraPositionIOS": self.cameraPosition.rawValue,
200
- "attemptsCount": self.attemptsCount,
201
- "locationTrackingEnabled": self.isLocationTrackingEnabled,
202
- "preventScreenRecording": self.isPreventScreenRecordingEnable,
203
- "recordingProcess": self.recordingProcess.rawValue,
204
- "livenessType": self.livenessType.rawValue,
205
- "screenOrientation": self.screenOrientation.encode(),
206
- "tag": self.tag,
207
- "personId": self.personId,
208
- "groupId": self.groupId,
209
- "threshold": self.threshold,
210
- "skipStep": self.stepSkippingMask.encode(),
211
- "metadata": self.metadata,
212
- ]
213
- }
214
- }
160
+ public extension VerificationConfiguration {
161
+ static func decode2(_ it: [String: Any]) -> Self {
162
+ return Self.init({ builder in
163
+ for (k, v) in it {
164
+ switch k {
165
+ case("copyright"): builder.isCopyright = v as! Bool
166
+ case("cameraSwitchEnabled"): builder.isCameraSwitchButtonEnabled = v as! Bool
167
+ case("closeButtonEnabled"): builder.isCloseButtonEnabled = v as! Bool
168
+ case("torchButtonEnabled"): builder.isTorchButtonEnabled = v as! Bool
169
+ case("vibrateOnSteps"): builder.vibrateOnSteps = v as! Bool
170
+ case("cameraPositionIOS"): builder.cameraPosition = CameraPosition(rawValue: v as! Int)!
171
+ case("attemptsCount"): builder.attemptsCount = v as! Int
172
+ case("locationTrackingEnabled"): builder.isLocationTrackingEnabled = v as! Bool
173
+ case("preventScreenRecording"): builder.isPreventScreenRecordingEnable = v as! Bool
174
+ case("recordingProcess"): builder.recordingProcess = RecordingProcess(rawValue: v as! Int)!
175
+ case("livenessType"): builder.livenessType = LivenessType(rawValue: v as! Int)!
176
+ case("screenOrientation"): builder.screenOrientation = RFSScreenOrientation.decode(v)
177
+ case("tag"): builder.tag = v as? String
178
+ case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
179
+ case("metadata"): builder.metadata = v as! [String: Any]
180
+ case("personId"): builder.personId = v as! String
181
+ case("externalId"): builder.externalId = v as? String
182
+ case("threshold"): builder.threshold = v as? NSNumber
183
+ default: break
184
+ }
185
+ }
186
+ })
187
+ }
188
+ func encode2() -> [String: Any?] {
189
+ return [
190
+ "copyright": self.isCopyright,
191
+ "cameraSwitchEnabled": self.isCameraSwitchButtonEnabled,
192
+ "closeButtonEnabled": self.isCloseButtonEnabled,
193
+ "torchButtonEnabled": self.isTorchButtonEnabled,
194
+ "vibrateOnSteps": self.vibrateOnSteps,
195
+ "cameraPositionIOS": self.cameraPosition.rawValue,
196
+ "attemptsCount": self.attemptsCount,
197
+ "locationTrackingEnabled": self.isLocationTrackingEnabled,
198
+ "preventScreenRecording": self.isPreventScreenRecordingEnable,
199
+ "recordingProcess": self.recordingProcess.rawValue,
200
+ "livenessType": self.livenessType.rawValue,
201
+ "screenOrientation": self.screenOrientation.encode(),
202
+ "tag": self.tag,
203
+ "skipStep": self.stepSkippingMask.encode(),
204
+ "metadata": self.metadata,
205
+ "personId": self.personId,
206
+ "externalId": self.externalId,
207
+ "threshold": self.threshold,
208
+ ]
209
+ }
210
+ }
215
211
 
216
212
  public extension MatchFacesConfiguration {
217
213
  static func decode(_ it: Any?) -> Self? {
package/ios/Decoder.swift CHANGED
@@ -144,73 +144,57 @@ func generateLivenessNotification(_ status: LivenessProcessStatus, _ result: Liv
144
144
  ]
145
145
  }
146
146
 
147
- public extension ErrorResponse {
148
- static func decode(_ it: Any?) -> ErrorResponse? {
149
- guard let it = it as? [String: Any] else { return nil }
150
- let result = ErrorResponse.emptyInit() as ErrorResponse
151
- result.setValue(it["code"] as Any?, forKey: "code")
152
- result.setValue(it["message"] as Any?, forKey: "message")
153
- return result
154
- }
155
- func encode() -> [String: Any?] {
156
- return [
157
- "code": self.code,
158
- "message": self.message,
159
- ]
160
- }
161
- }
162
-
163
147
  public extension EnrollmentResponse {
164
148
  static func decode(_ it: Any?) -> EnrollmentResponse? {
165
149
  guard let it = it as? [String: Any] else { return nil }
166
150
  let result = EnrollmentResponse.emptyInit() as EnrollmentResponse
167
- result.setValue(ErrorResponse.decode(it["error"]), forKey: "error")
168
- result.setValue(it["personId"] as Any?, forKey: "personId")
169
- result.setValue(it["externalId"] as Any?, forKey: "externalId")
170
- return result
171
- }
172
- func encode() -> [String: Any?] {
173
- return [
174
- "error": self.error?.encode(),
175
- "personId": self.personId,
176
- "externalId": self.externalId,
177
- ]
178
- }
179
- }
180
-
181
- public extension VerifyMatchResponse {
182
- static func decode(_ it: Any?) -> VerifyMatchResponse? {
183
- guard let it = it as? [String: Any] else { return nil }
184
- let result = VerifyMatchResponse.emptyInit() as VerifyMatchResponse
185
- result.setValue(it["passed"] as Any?, forKey: "passed")
186
- result.setValue(it["similarity"] as Any?, forKey: "similarity")
151
+ result.setValue(it["enrolled"] as Any?, forKey: "enrolled")
152
+ result.setValue(PersonDatabase.Person.decode(it["person"] as Any?), forKey: "person")
153
+ result.setValue((it["searchPersons"] as? [[String: Any]])?.compactMap { PersonDatabase.SearchPerson.decode2($0) }, forKey: "searchPersons")
187
154
  return result
188
155
  }
189
156
  func encode() -> [String: Any?] {
190
157
  return [
191
- "passed": self.passed,
192
- "similarity": self.similarity,
193
- ]
194
- }
195
- }
196
-
197
- public extension VerificationResponse {
198
- static func decode(_ it: Any?) -> VerificationResponse? {
199
- guard let it = it as? [String: Any] else { return nil }
200
- let result = VerificationResponse.emptyInit() as VerificationResponse
201
- result.setValue(VerifyMatchResponse.decode(it["match"]), forKey: "match")
202
- result.setValue(ErrorResponse.decode(it["error"]), forKey: "error")
203
- result.setValue(it["passed"] as Any?, forKey: "passed")
204
- return result
205
- }
206
- func encode() -> [String: Any?] {
207
- return [
208
- "match": self.match?.encode(),
209
- "error": self.error?.encode(),
210
- "passed": self.passed,
211
- ]
212
- }
213
- }
158
+ "enrolled": self.enrolled,
159
+ "person": self.person?.encode(),
160
+ "searchPersons": self.searchPersons?.map { $0.encode2() },
161
+ ]
162
+ }
163
+ }
164
+
165
+ public extension VerificationMatchResponse {
166
+ static func decode(_ it: Any?) -> VerificationMatchResponse? {
167
+ guard let it = it as? [String: Any] else { return nil }
168
+ let result = VerificationMatchResponse.emptyInit() as VerificationMatchResponse
169
+ result.setValue(it["verified"] as Any?, forKey: "verified")
170
+ result.setValue(it["similarity"] as Any?, forKey: "similarity")
171
+ return result
172
+ }
173
+ func encode() -> [String: Any?] {
174
+ return [
175
+ "verified": self.verified,
176
+ "similarity": self.similarity == nil ? 0.0 : self.similarity,
177
+ ]
178
+ }
179
+ }
180
+
181
+ public extension VerificationResponse {
182
+ static func decode(_ it: Any?) -> VerificationResponse? {
183
+ guard let it = it as? [String: Any] else { return nil }
184
+ let result = VerificationResponse.emptyInit() as VerificationResponse
185
+ result.setValue(it["verified"] as Any?, forKey: "verified")
186
+ result.setValue(PersonDatabase.Person.decode(it["person"]), forKey: "person")
187
+ result.setValue(VerificationMatchResponse.decode(it["match"]), forKey: "match")
188
+ return result
189
+ }
190
+ func encode() -> [String: Any?] {
191
+ return [
192
+ "verified": self.verified,
193
+ "person": self.person?.encode(),
194
+ "match": self.match?.encode(),
195
+ ]
196
+ }
197
+ }
214
198
 
215
199
  // MARK: - MatchFacesRequest
216
200
 
@@ -770,8 +754,8 @@ public extension Date {
770
754
  df.dateFormat = "yyyy-MM-dd HH:mm:ss.SSS"
771
755
  return df
772
756
  }
773
- static func decode(_ it: Any?) -> Date {
774
- let it = it as! String
757
+ static func decode(_ it: Any?) -> Date? {
758
+ guard let it = it as? String else { return nil }
775
759
  return formatter().date(from: it)!
776
760
  }
777
761
  func encode() -> String { return Date.formatter().string(from: self) }
@@ -788,8 +772,8 @@ public extension URL {
788
772
  }
789
773
 
790
774
  public extension PersonDatabase.Person {
791
- static func decode(_ it: Any?) -> PersonDatabase.Person {
792
- let it = it as! [String: Any]
775
+ static func decode(_ it: Any?) -> PersonDatabase.Person? {
776
+ guard let it = it as? [String: Any] else { return nil }
793
777
  let result = PersonDatabase.Person.emptyInit() as PersonDatabase.Person
794
778
  result.setValue(Date.decode(it["updatedAt"]), forKey: "updatedAt")
795
779
  result.setValue(Date.decode(it["createdAt"]), forKey: "createdAt")
@@ -797,9 +781,13 @@ public extension PersonDatabase.Person {
797
781
  result.setValue(it["groups"] as Any?, forKey: "groups")
798
782
  result.setValue(it["id"] as Any?, forKey: "itemId")
799
783
  result.setValue((it["metadata"] as Any?) ?? NSNull(), forKey: "mutableMetadata")
784
+ result.setValue(it["externalId"] as Any?, forKey: "externalId")
785
+ result.setValue(Date.decode(it["expireAt"]), forKey: "expireAt")
786
+ result.setValue(it["ttl"] as Any?, forKey: "ttl")
800
787
  return result
801
788
  }
802
- func encode() -> [String: Any?] {
789
+ func encode() -> [String: Any?]? {
790
+ if (self.itemId == nil) { return nil }
803
791
  return [
804
792
  "updatedAt": self.updatedAt.encode(),
805
793
  "createdAt": self.createdAt.encode(),
@@ -807,6 +795,9 @@ public extension PersonDatabase.Person {
807
795
  "groups": self.groups,
808
796
  "id": self.itemId,
809
797
  "metadata": self.metadata,
798
+ "externalId": self.externalId,
799
+ "expireAt": self.expireAt?.encode(),
800
+ "ttl": self.ttl,
810
801
  ]
811
802
  }
812
803
  func update(_ it: [String: Any?]) -> Self {
@@ -985,6 +976,9 @@ public extension PersonDatabase.SearchPerson {
985
976
  result.setValue((it["metadata"] as Any?) ?? NSNull(), forKey: "mutableMetadata")
986
977
  result.setValue((it["images"] as? [Any])?.map { PersonDatabase.SearchPersonImage.decode2($0) }, forKey: "images")
987
978
  result.setValue(PersonDatabase.SearchPersonDetection.decode(it["detection"]), forKey: "detection")
979
+ result.setValue(it["externalId"] as Any?, forKey: "externalId")
980
+ result.setValue(Date.decode(it["expireAt"]), forKey: "expireAt")
981
+ result.setValue(it["ttl"] as Any?, forKey: "ttl")
988
982
  return result
989
983
  }
990
984
  func encode2() -> [String: Any?] {
@@ -997,6 +991,33 @@ public extension PersonDatabase.SearchPerson {
997
991
  "groups": self.groups,
998
992
  "id": self.itemId,
999
993
  "metadata": self.metadata,
994
+ "externalId": self.externalId,
995
+ "expireAt": self.expireAt?.encode(),
996
+ "ttl": self.ttl,
997
+ ]
998
+ }
999
+ }
1000
+
1001
+ public extension SearchPersonFilter {
1002
+ static func decode(_ it: Any?) -> Self {
1003
+ let it = it as! [String: Any]
1004
+ let result = Self()
1005
+ result.groups = it["groups"] as! [String]
1006
+ result.threshold = CGFloat(it["threshold"] as! Float)
1007
+ result.limit = it["limit"] as! Int
1008
+ result.setValue(it["fieldName"] as Any?, forKey: "fieldName")
1009
+ result.setValue(it["fieldValues"] as Any?, forKey: "fieldValues")
1010
+ result.setValue(it["exclude"] as Any?, forKey: "exclude")
1011
+ return result
1012
+ }
1013
+ func encode() -> [String: Any?] {
1014
+ return [
1015
+ "groups": self.groups,
1016
+ "threshold": self.threshold,
1017
+ "limit": self.limit,
1018
+ "fieldName": self.fieldName,
1019
+ "fieldValues": self.fieldValues,
1020
+ "exclude": self.exclude,
1000
1021
  ]
1001
1022
  }
1002
1023
  }
package/ios/Utils.swift CHANGED
@@ -1,3 +1,6 @@
1
+ import Foundation
2
+ import UIKit
3
+
1
4
  public typealias Callback = (Any?) -> Void
2
5
 
3
6
  var args: [Any?] = []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/face-sdk",
3
- "version": "8.4.1336-rc",
3
+ "version": "8.4.1343-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="8.4.1336-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/face-sdk" version="8.4.1343-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>
@@ -18,7 +18,7 @@
18
18
  <preference name="SwiftVersion" value="5" />
19
19
  </config-file>
20
20
  <source-file src="ios/CDVFaceSDK.swift" />
21
- <source-file src="ios/Main.swift" />
21
+ <source-file src="ios/Implementation.swift" />
22
22
  <source-file src="ios/Decoder.swift" />
23
23
  <source-file src="ios/Config.swift" />
24
24
  <source-file src="ios/Utils.swift" />
@@ -27,7 +27,7 @@
27
27
  <source url="https://github.com/regulaforensics/podspecs.git" />
28
28
  </config>
29
29
  <pods>
30
- <pod name="FaceSDKStage" spec="9.8.4815" />
30
+ <pod name="FaceSDKNightly" spec="9.9.4841" />
31
31
  </pods>
32
32
  </podspec>
33
33
  </platform>
@@ -39,10 +39,10 @@
39
39
  </feature>
40
40
  </config-file>
41
41
  <framework src="android/cordova.gradle" custom="true" type="gradleReference" />
42
- <source-file src="android/CDVFaceSDK.kt" target-dir="java/com.regula.plugin.facesdk" />
43
- <source-file src="android/src/main/java/com/regula/plugin/facesdk/Main.kt" target-dir="java/com.regula.plugin.facesdk" />
44
- <source-file src="android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt" target-dir="java/com.regula.plugin.facesdk" />
45
- <source-file src="android/src/main/java/com/regula/plugin/facesdk/Config.kt" target-dir="java/com.regula.plugin.facesdk" />
46
- <source-file src="android/src/main/java/com/regula/plugin/facesdk/Utils.kt" target-dir="java/com.regula.plugin.facesdk" />
42
+ <source-file src="android/CDVFaceSDK.kt" target-dir="kotlin/com.regula.plugin.facesdk" />
43
+ <source-file src="android/src/main/kotlin/com/regula/plugin/facesdk/Implementation.kt" target-dir="kotlin/com.regula.plugin.facesdk" />
44
+ <source-file src="android/src/main/kotlin/com/regula/plugin/facesdk/JSONConstructor.kt" target-dir="kotlin/com.regula.plugin.facesdk" />
45
+ <source-file src="android/src/main/kotlin/com/regula/plugin/facesdk/Config.kt" target-dir="kotlin/com.regula.plugin.facesdk" />
46
+ <source-file src="android/src/main/kotlin/com/regula/plugin/facesdk/Utils.kt" target-dir="kotlin/com.regula.plugin.facesdk" />
47
47
  </platform>
48
48
  </plugin>