@regulaforensics/face-sdk 7.2.415-beta → 7.2.421-beta

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 (170) hide show
  1. package/README.md +3 -2
  2. package/RNFaceSDK.podspec +2 -2
  3. package/android/build.gradle +2 -2
  4. package/android/cordova.gradle +2 -2
  5. package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +0 -2
  6. package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +0 -18
  7. package/examples/capacitor/android/app/src/main/AndroidManifest.xml +2 -2
  8. package/examples/capacitor/index.html +7 -2
  9. package/examples/capacitor/package-lock.json +3 -17
  10. package/examples/capacitor/package.json +3 -3
  11. package/examples/capacitor/scripts/setup.sh +2 -4
  12. package/examples/capacitor/src/main.css +6 -60
  13. package/examples/capacitor/src/main.html +1 -1
  14. package/examples/capacitor/src/main.tsx +87 -51
  15. package/examples/cordova/.vscode/launch.json +28 -0
  16. package/examples/cordova/README.md +25 -0
  17. package/examples/cordova/config.xml +26 -0
  18. package/examples/cordova/package-lock.json +1313 -0
  19. package/examples/cordova/package.json +30 -0
  20. package/examples/cordova/scripts/android.sh +8 -0
  21. package/examples/cordova/scripts/ios.sh +8 -0
  22. package/examples/cordova/scripts/setup.sh +8 -0
  23. package/examples/cordova/www/images/logo.png +0 -0
  24. package/examples/cordova/www/index.html +21 -0
  25. package/examples/cordova/www/src/main.css +83 -0
  26. package/examples/cordova/www/src/main.html +25 -0
  27. package/examples/cordova/www/src/main.js +152 -0
  28. package/examples/ionic/angular.json +3 -3
  29. package/examples/ionic/config.xml +1 -1
  30. package/examples/ionic/index.ts +17 -0
  31. package/examples/ionic/package-lock.json +765 -851
  32. package/examples/ionic/package.json +3 -3
  33. package/examples/ionic/src/images/portrait.png +0 -0
  34. package/examples/ionic/src/main.css +6 -60
  35. package/examples/ionic/src/main.html +1 -1
  36. package/examples/ionic/src/{main.tsx → main.ts} +97 -52
  37. package/examples/ionic/tsconfig.json +2 -3
  38. package/examples/react_native/index.tsx +7 -49
  39. package/examples/react_native/package-lock.json +621 -618
  40. package/examples/react_native/package.json +9 -9
  41. package/examples/react_native/src/main.css +6 -60
  42. package/examples/react_native/src/main.html +1 -1
  43. package/examples/react_native/src/main.tsx +79 -54
  44. package/ios/RFSWJSONConstructor.h +1 -0
  45. package/ios/RFSWJSONConstructor.m +14 -5
  46. package/ios/RFSWMain.m +0 -30
  47. package/package.json +1 -1
  48. package/plugin.xml +2 -2
  49. package/www/capacitor/customization/customization_fonts.js +1 -1
  50. package/www/capacitor/customization/customization_images.js +1 -1
  51. package/www/capacitor/customization/font.js +0 -8
  52. package/www/capacitor/detect_faces/detect_face_result.js +0 -12
  53. package/www/capacitor/detect_faces/detect_faces_attribute_result.js +0 -9
  54. package/www/capacitor/detect_faces/detect_faces_backend_exception.js +0 -7
  55. package/www/capacitor/detect_faces/detect_faces_config.js +0 -34
  56. package/www/capacitor/detect_faces/detect_faces_exception.js +0 -8
  57. package/www/capacitor/detect_faces/detect_faces_request.js +0 -22
  58. package/www/capacitor/detect_faces/detect_faces_response.js +0 -9
  59. package/www/capacitor/face_capture/face_capture_config.js +0 -37
  60. package/www/capacitor/face_capture/face_capture_exception.js +0 -7
  61. package/www/capacitor/face_capture/face_capture_image.js +0 -8
  62. package/www/capacitor/face_capture/face_capture_response.js +0 -7
  63. package/www/capacitor/image_params/output_image_crop.js +0 -23
  64. package/www/capacitor/image_params/output_image_params.js +0 -19
  65. package/www/capacitor/image_params/point.js +0 -7
  66. package/www/capacitor/image_params/rect.js +0 -9
  67. package/www/capacitor/image_params/size.js +0 -12
  68. package/www/capacitor/image_quality/image_quality_characteristic.js +0 -22
  69. package/www/capacitor/image_quality/image_quality_range.js +0 -7
  70. package/www/capacitor/image_quality/image_quality_result.js +0 -10
  71. package/www/capacitor/index.js +0 -48
  72. package/www/capacitor/init/face_sdk_version.js +0 -8
  73. package/www/capacitor/init/init_config.js +0 -19
  74. package/www/capacitor/init/init_exception.js +0 -8
  75. package/www/capacitor/init/license_exception.js +0 -7
  76. package/www/capacitor/internal/bridge.js +1 -20
  77. package/www/capacitor/liveness/liveness_backend_exception.js +0 -7
  78. package/www/capacitor/liveness/liveness_config.js +0 -43
  79. package/www/capacitor/liveness/liveness_exception.js +0 -8
  80. package/www/capacitor/liveness/liveness_notification.js +0 -7
  81. package/www/capacitor/liveness/liveness_response.js +0 -11
  82. package/www/capacitor/match_faces/compared_face.js +0 -9
  83. package/www/capacitor/match_faces/compared_faces_pair.js +0 -10
  84. package/www/capacitor/match_faces/compared_faces_split.js +0 -7
  85. package/www/capacitor/match_faces/match_faces_backend_exception.js +0 -7
  86. package/www/capacitor/match_faces/match_faces_config.js +0 -19
  87. package/www/capacitor/match_faces/match_faces_detection.js +0 -9
  88. package/www/capacitor/match_faces/match_faces_detection_face.js +0 -11
  89. package/www/capacitor/match_faces/match_faces_exception.js +0 -8
  90. package/www/capacitor/match_faces/match_faces_image.js +0 -9
  91. package/www/capacitor/match_faces/match_faces_request.js +0 -27
  92. package/www/capacitor/match_faces/match_faces_response.js +0 -9
  93. package/www/capacitor/person_database/edit_group_persons_request.js +0 -15
  94. package/www/capacitor/person_database/image_upload.js +0 -17
  95. package/www/capacitor/person_database/pageable_item_list.js +0 -8
  96. package/www/capacitor/person_database/person.js +0 -13
  97. package/www/capacitor/person_database/person_group.js +0 -11
  98. package/www/capacitor/person_database/person_image.js +0 -13
  99. package/www/capacitor/person_database/search_person.js +0 -14
  100. package/www/capacitor/person_database/search_person_detection.js +0 -9
  101. package/www/capacitor/person_database/search_person_image.js +0 -15
  102. package/www/capacitor/person_database/search_person_request.js +0 -29
  103. package/www/cordova.js +6 -753
  104. package/www/react-native/customization/customization_fonts.js +1 -1
  105. package/www/react-native/customization/customization_images.js +1 -1
  106. package/www/react-native/customization/font.js +0 -8
  107. package/www/react-native/detect_faces/detect_face_result.js +0 -12
  108. package/www/react-native/detect_faces/detect_faces_attribute_result.js +0 -9
  109. package/www/react-native/detect_faces/detect_faces_backend_exception.js +0 -7
  110. package/www/react-native/detect_faces/detect_faces_config.js +0 -34
  111. package/www/react-native/detect_faces/detect_faces_exception.js +0 -8
  112. package/www/react-native/detect_faces/detect_faces_request.js +0 -22
  113. package/www/react-native/detect_faces/detect_faces_response.js +0 -9
  114. package/www/react-native/face_capture/face_capture_config.js +0 -37
  115. package/www/react-native/face_capture/face_capture_exception.js +0 -7
  116. package/www/react-native/face_capture/face_capture_image.js +0 -8
  117. package/www/react-native/face_capture/face_capture_response.js +0 -7
  118. package/www/react-native/image_params/output_image_crop.js +0 -23
  119. package/www/react-native/image_params/output_image_params.js +0 -19
  120. package/www/react-native/image_params/point.js +0 -7
  121. package/www/react-native/image_params/rect.js +0 -9
  122. package/www/react-native/image_params/size.js +0 -12
  123. package/www/react-native/image_quality/image_quality_characteristic.js +0 -22
  124. package/www/react-native/image_quality/image_quality_range.js +0 -7
  125. package/www/react-native/image_quality/image_quality_result.js +0 -10
  126. package/www/react-native/index.js +0 -48
  127. package/www/react-native/init/face_sdk_version.js +0 -8
  128. package/www/react-native/init/init_config.js +0 -19
  129. package/www/react-native/init/init_exception.js +0 -8
  130. package/www/react-native/init/license_exception.js +0 -7
  131. package/www/react-native/internal/bridge.js +1 -20
  132. package/www/react-native/liveness/liveness_backend_exception.js +0 -7
  133. package/www/react-native/liveness/liveness_config.js +0 -43
  134. package/www/react-native/liveness/liveness_exception.js +0 -8
  135. package/www/react-native/liveness/liveness_notification.js +0 -7
  136. package/www/react-native/liveness/liveness_response.js +0 -11
  137. package/www/react-native/match_faces/compared_face.js +0 -9
  138. package/www/react-native/match_faces/compared_faces_pair.js +0 -10
  139. package/www/react-native/match_faces/compared_faces_split.js +0 -7
  140. package/www/react-native/match_faces/match_faces_backend_exception.js +0 -7
  141. package/www/react-native/match_faces/match_faces_config.js +0 -19
  142. package/www/react-native/match_faces/match_faces_detection.js +0 -9
  143. package/www/react-native/match_faces/match_faces_detection_face.js +0 -11
  144. package/www/react-native/match_faces/match_faces_exception.js +0 -8
  145. package/www/react-native/match_faces/match_faces_image.js +0 -9
  146. package/www/react-native/match_faces/match_faces_request.js +0 -27
  147. package/www/react-native/match_faces/match_faces_response.js +0 -9
  148. package/www/react-native/person_database/edit_group_persons_request.js +0 -15
  149. package/www/react-native/person_database/image_upload.js +0 -17
  150. package/www/react-native/person_database/pageable_item_list.js +0 -8
  151. package/www/react-native/person_database/person.js +0 -13
  152. package/www/react-native/person_database/person_group.js +0 -11
  153. package/www/react-native/person_database/person_image.js +0 -13
  154. package/www/react-native/person_database/search_person.js +0 -14
  155. package/www/react-native/person_database/search_person_detection.js +0 -9
  156. package/www/react-native/person_database/search_person_image.js +0 -15
  157. package/www/react-native/person_database/search_person_request.js +0 -29
  158. package/www/types/index.d.ts +0 -12
  159. package/www/types/match_faces/match_faces_config.d.ts +0 -2
  160. package/www/types/person_database/search_person_request.d.ts +0 -4
  161. package/examples/capacitor/index.tsx +0 -53
  162. package/examples/ionic/index.tsx +0 -68
  163. package/test/json.tsx +0 -375
  164. package/test/package-lock.json +0 -584
  165. package/test/package.json +0 -9
  166. package/test/test.tsx +0 -61
  167. package/test/utils.tsx +0 -38
  168. /package/examples/{ionic → cordova/www}/images/portrait.png +0 -0
  169. /package/examples/ionic/{assets → src/assets}/.gitkeep +0 -0
  170. /package/examples/ionic/{images → src/images}/icon.png +0 -0
@@ -8,19 +8,19 @@
8
8
  "start": "expo start"
9
9
  },
10
10
  "dependencies": {
11
- "@regulaforensics/face-sdk": "7.2.415-beta",
12
- "@regulaforensics/face-core-basic": "7.1.240-nightly",
13
- "react-native": "0.79.5",
11
+ "@regulaforensics/face-sdk": "7.2.421-beta",
12
+ "@regulaforensics/face-core-basic": "7.1.202",
13
+ "react-native": "0.79.2",
14
14
  "react-native-fs": "2.20.0",
15
15
  "react-native-image-picker": "8.2.1",
16
- "react-native-webview": "13.15.0",
17
- "@react-native/metro-config": "0.79.5",
16
+ "react-native-webview": "13.13.5",
17
+ "@react-native/metro-config": "0.79.2",
18
18
  "react": "19.1.0",
19
- "@types/react": "19.1.8",
20
- "expo": "53.0.20",
21
- "expo-dev-client": "5.2.4",
19
+ "@types/react": "19.1.4",
20
+ "expo": "53.0.9",
21
+ "expo-dev-client": "5.1.8",
22
22
  "expo-custom-assets": "1.4.1",
23
- "expo-build-properties": "0.14.8",
23
+ "expo-build-properties": "0.14.6",
24
24
  "typescript": "5.8.3"
25
25
  }
26
26
  }
@@ -1,19 +1,15 @@
1
1
  html,
2
2
  body {
3
- margin: 0;
4
- width: 100%;
3
+ width: 99%;
5
4
  height: 99vh;
6
5
  display: flex;
7
- overflow: hidden;
8
6
  flex-direction: column;
9
7
  }
10
8
 
11
- /* Prevent text selection */
12
- * {
13
- user-select: none !important;
14
- -webkit-user-select: none !important;
15
- -webkit-user-drag: none !important;
16
- -webkit-touch-callout: none !important;
9
+ .page {
10
+ height: 100%;
11
+ display: flex;
12
+ flex-direction: column;
17
13
  }
18
14
 
19
15
  .column {
@@ -56,14 +52,10 @@ body {
56
52
  margin-top: 13px;
57
53
  }
58
54
 
59
- .scroll {
60
- flex-grow: 1;
61
- overflow-y: auto;
62
- }
63
-
64
55
  .no-scroll {
65
56
  flex-grow: 1;
66
57
  overflow-y: hidden;
58
+ overflow-x: hidden;
67
59
  }
68
60
 
69
61
  .button {
@@ -75,7 +67,6 @@ body {
75
67
  color: white;
76
68
  border: none;
77
69
  padding: 10px 20px;
78
- justify-content: center;
79
70
  font-size: 16px;
80
71
  border-radius: 100px;
81
72
  cursor: pointer;
@@ -89,49 +80,4 @@ body {
89
80
  .button:active {
90
81
  position: relative;
91
82
  top: 1px;
92
- }
93
-
94
- .text-button {
95
- background: none;
96
- border: none;
97
- color: #2196f3;
98
- font-size: 20px;
99
- font-weight: bold;
100
- padding: 5px;
101
- }
102
-
103
- .text-button:active {
104
- position: relative;
105
- top: 1px;
106
- }
107
-
108
- .radio {
109
- align-items: baseline;
110
- padding: 15px;
111
- }
112
-
113
- input[type="checkbox"] {
114
- width: 20px;
115
- height: 20px;
116
- border: 2px solid black;
117
- background-color: white;
118
- display: inline-block;
119
- position: relative;
120
- cursor: pointer;
121
- }
122
-
123
- .progress-bar {
124
- width: 75%;
125
- padding: 3px;
126
- margin-top: 40px;
127
- background-color: #eee;
128
- border-radius: 8px;
129
- box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
130
- }
131
-
132
- #progress {
133
- width: 0%;
134
- height: 20px;
135
- background-color: #4285F4;
136
- border-radius: 5px;
137
83
  }
@@ -1,4 +1,4 @@
1
- <div class="column" style="height: 100%">
1
+ <div class="page">
2
2
  <div class="column header">
3
3
  <span id="status">Loading...</span>
4
4
  <div class="column divider"></div>
@@ -1,19 +1,13 @@
1
+ import { document } from '../index'
2
+ import * as RNFS from 'react-native-fs'
3
+ import { Alert, Platform } from 'react-native'
4
+ import { launchImageLibrary } from 'react-native-image-picker'
1
5
  import { FaceSDK, MatchFacesRequest, MatchFacesImage, InitConfig, LivenessSkipStep, ImageType, LivenessStatus, LivenessConfig } from '@regulaforensics/face-sdk'
2
- import { loadAssetIfExists, chooseOption, pickImage } from '../index'
3
-
4
- var faceSdk = FaceSDK.instance
5
- var image1: MatchFacesImage | null
6
- var image2: MatchFacesImage | null
7
6
 
8
7
  async function init() {
9
- if (!await initializeReader()) return
8
+ if (!await initialize()) return
10
9
  setStatus("Ready")
11
- }
12
-
13
- async function startFaceCapture(position: number) {
14
- var image = (await faceSdk.startFaceCapture()).image
15
- if (image == null) return
16
- setImage("data:image/png;base64," + image.image, image.imageType, position)
10
+ FaceSDK.instance.serviceUrl = 'http://localhost:41101/'
17
11
  }
18
12
 
19
13
  async function startLiveness() {
@@ -25,8 +19,9 @@ async function startLiveness() {
25
19
  console.log("LivenessStatus: " + notification.status)
26
20
  }
27
21
  })
22
+ console.log("response", { ...response, image: null })
28
23
  if (response.image == null) return
29
- setImage("data:image/png;base64," + response.image, ImageType.LIVE, 1)
24
+ setImage(response.image, ImageType.LIVE, 1)
30
25
  setLivenessStatus(response.liveness == LivenessStatus.PASSED ? "passed" : "unknown")
31
26
  }
32
27
 
@@ -46,34 +41,18 @@ async function matchFaces() {
46
41
  setStatus("Ready")
47
42
  }
48
43
 
49
- async function getImage(position: number) {
50
- var source = await chooseOption()
51
- if (source == null) return
52
- if (source) startFaceCapture(position)
53
- else {
54
- var image = await pickImage()
55
- if (image == null) return
56
- setImage(image, ImageType.PRINTED, position)
57
- }
58
- }
59
-
60
- function setImage(base64: string, type: number, position: number) {
44
+ function clearResults() {
45
+ setStatus("Ready")
61
46
  setSimilarityStatus("null")
62
- var mfImage = new MatchFacesImage(base64, type)
63
- if (position == 1) {
64
- image1 = mfImage
65
- setUiImage1(base64)
66
- setLivenessStatus("null")
67
- }
68
- if (position == 2) {
69
- image2 = mfImage
70
- setUiImage2(base64)
71
- }
47
+ setLivenessStatus("null")
48
+ resetImages()
49
+ image1 = null
50
+ image2 = null
72
51
  }
73
52
 
74
53
  // If 'regula.license' exists, init using license(enables offline match)
75
54
  // otherwise init without license.
76
- async function initializeReader() {
55
+ async function initialize() {
77
56
  setStatus("Initializing...")
78
57
 
79
58
  var license = await loadAssetIfExists("regula.license")
@@ -81,36 +60,82 @@ async function initializeReader() {
81
60
  if (license != null) config = new InitConfig(license)
82
61
  var [success, error] = await faceSdk.initialize({ config: config })
83
62
 
84
- if (error != null) {
63
+ if (!success && error != null) {
85
64
  setStatus(error.message)
86
65
  console.log(error.code + ": " + error.message)
87
66
  }
88
67
  return success
89
68
  }
90
69
 
91
- // --------------------------------------------------------------------------------------------------------------------
70
+ function setImage(base64: string, type: number, position: number) {
71
+ setSimilarityStatus("null")
72
+ var mfImage = new MatchFacesImage(base64, type)
73
+ if (position == 1) {
74
+ image1 = mfImage
75
+ setUiImage1("data:image/png;base64," + base64)
76
+ setLivenessStatus("null")
77
+ }
78
+ if (position == 2) {
79
+ image2 = mfImage
80
+ setUiImage2("data:image/png;base64," + base64)
81
+ }
82
+ }
83
+
84
+ async function useCamera(position: number) {
85
+ var response = await faceSdk.startFaceCapture()
86
+ if (response.image == null) return
87
+ var image = response.image
88
+ setImage(image.image, image.imageType, position)
89
+ }
92
90
 
93
- export function main() {
94
- document.getElementById("first-image")!.onclick = () => getImage(1)
95
- document.getElementById("second-image")!.onclick = () => getImage(2)
96
- document.getElementById("match-faces")!.onclick = () => matchFaces()
97
- document.getElementById("start-liveness")!.onclick = () => startLiveness()
98
- document.getElementById("clear-results")!.onclick = () => clearResults()
91
+ function useGallery(position: number) {
92
+ launchImageLibrary({
93
+ mediaType: 'photo',
94
+ selectionLimit: 1,
95
+ includeBase64: true
96
+ }, (response: any) => {
97
+ if (response.assets == null) return
98
+ setImage(response.assets[0].base64!, ImageType.PRINTED, position)
99
+ })
100
+ }
99
101
 
100
- init()
102
+ function pickImage(position: number) {
103
+ Alert.alert("Select option", "", [
104
+ { text: "Use gallery", onPress: () => useGallery(position) },
105
+ { text: "Use camera", onPress: () => useCamera(position) }
106
+ ], { cancelable: true })
107
+ }
108
+
109
+ async function loadAssetIfExists(path: string): Promise<string | null> {
110
+ if (Platform.OS === 'ios') path = RNFS.MainBundlePath + "/" + path
111
+ var readFile = Platform.OS === 'ios' ? RNFS.readFile : RNFS.readFileRes
112
+ try {
113
+ return await readFile(path, 'base64')
114
+ } catch {
115
+ return null
116
+ }
101
117
  }
102
118
 
103
- var setStatus = (data: string) => document.getElementById("status")!.innerHTML = data
104
- var setLivenessStatus = (data: string) => document.getElementById("liveness-status")!.innerHTML = data
105
- var setSimilarityStatus = (data: string) => document.getElementById("similarity-status")!.innerHTML = data
119
+ var faceSdk = FaceSDK.instance
120
+ var image1: MatchFacesImage | null
121
+ var image2: MatchFacesImage | null
122
+
123
+ var setStatus = (data: string) => document.getElementById("status").innerHTML = data
124
+ var setLivenessStatus = (data: string) => document.getElementById("liveness-status").innerHTML = data
125
+ var setSimilarityStatus = (data: string) => document.getElementById("similarity-status").innerHTML = data
106
126
  var setUiImage1 = (data: string) => (document.getElementById("first-image") as HTMLImageElement).src = data
107
127
  var setUiImage2 = (data: string) => (document.getElementById("second-image") as HTMLImageElement).src = data
108
- var clearResults = () => {
109
- setStatus("Ready")
110
- setSimilarityStatus("null")
111
- setLivenessStatus("null")
128
+ var resetImages = () => {
112
129
  setUiImage1("images/portrait.png")
113
130
  setUiImage2("images/portrait.png")
114
- image1 = null
115
- image2 = null
131
+ }
132
+
133
+ export function onload() {
134
+ document.getElementById("first-image").onclick = () => pickImage(1)
135
+ document.getElementById("second-image").onclick = () => pickImage(2)
136
+ document.getElementById("match-faces").onclick = () => matchFaces()
137
+ document.getElementById("start-liveness").onclick = () => startLiveness()
138
+ document.getElementById("clear-results").onclick = () => clearResults()
139
+
140
+ init()
116
141
  }
@@ -52,6 +52,7 @@
52
52
  +(RFSImageQualityCharacteristic* _Nonnull)imageQualityCharacteristicFromJSON:(id _Nonnull)input;
53
53
  +(NSDictionary<NSString*, id>* _Nonnull)generateImageQualityCharacteristic:(RFSImageQualityCharacteristic* _Nonnull)input;
54
54
 
55
+ +(RFSFaceSDKVersion* _Nonnull)faceSDKVersionFromJSON:(id _Nonnull)input;
55
56
  +(NSDictionary<NSString*, id>* _Nonnull)generateFaceSDKVersion:(RFSFaceSDKVersion* _Nonnull)input;
56
57
 
57
58
  +(RFSInitializationConfiguration* _Nonnull)initConfigFromJSON:(id _Nonnull)input;
@@ -203,7 +203,17 @@
203
203
  return result;
204
204
  }
205
205
 
206
- // No fromJSON and no tests for FaceSDKVersion because of its implementation.
206
+ +(id)faceSDKVersionFromJSON:(NSDictionary*)input {
207
+ if (!input || [input isEqual:[NSNull null]]) return nil;
208
+ RFSFaceSDKVersion* result = [RFSFaceSDKVersion new];
209
+
210
+ [result setValue:input[@"api"] forKey:@"api"];
211
+ [result setValue:input[@"core"] forKey:@"core"];
212
+ [result setValue:input[@"coreMode"] forKey:@"coreMode"];
213
+
214
+ return result;
215
+ }
216
+
207
217
  +(id)generateFaceSDKVersion:(RFSFaceSDKVersion*)input {
208
218
  if (!input) return [NSNull null];
209
219
  NSMutableDictionary* result = @{}.mutableCopy;
@@ -281,9 +291,9 @@
281
291
 
282
292
  +(id)livenessResponseFromJSON:(NSDictionary*)input {
283
293
  RFSLivenessResponse* result = [RFSLivenessResponse alloc];
284
- SEL sel = NSSelectorFromString(@"initWithTag:transactionId:estimatedAge:status:image:error:");
294
+ SEL sel = NSSelectorFromString(@"initWithTag:transactionId:estimatedAge:status:normalImage:scaledImage:error:");
285
295
  IMP imp = [result methodForSelector:sel];
286
- void (*func)(id, SEL, id, id, id, NSInteger, id, id) = (void *)imp;
296
+ void (*func)(id, SEL, id, id, id, NSInteger, id, id, id) = (void *)imp;
287
297
  func(result,
288
298
  sel,
289
299
  input[@"tag"],
@@ -291,6 +301,7 @@
291
301
  input[@"estimatedAge"],
292
302
  [input[@"liveness"] integerValue],
293
303
  [self imageWithBase64:input[@"image"]],
304
+ [self imageWithBase64:input[@"image"]],
294
305
  nil);
295
306
  return result;
296
307
  }
@@ -882,7 +893,6 @@
882
893
  imageUpload:[self imageUploadFromJSON:input[@"imageUpload"]]];
883
894
  result.threshold = input[@"threshold"];
884
895
  result.limit = input[@"limit"];
885
- result.tag = input[@"tag"];
886
896
  if (input[@"detectAll"] && ![input[@"detectAll"] isEqual:[NSNull null]]) result.detectAll = [input[@"detectAll"] boolValue];
887
897
  result.outputImageParams = [self outputImageParamsFromJSON:input[@"outputImageParams"]];
888
898
  return result;
@@ -896,7 +906,6 @@
896
906
  }.mutableCopy;
897
907
  if (input.threshold) result[@"threshold"] = input.threshold;
898
908
  if (input.limit) result[@"limit"] = input.limit;
899
- if (input.tag) result[@"tag"] = input.tag;
900
909
  if (input.groupIdsForSearch) result[@"groupIdsForSearch"] = input.groupIdsForSearch;
901
910
  if (input.outputImageParams) result[@"outputImageParams"] = [self generateOutputImageParams:input.outputImageParams];
902
911
  return result;
package/ios/RFSWMain.m CHANGED
@@ -9,12 +9,6 @@
9
9
  @"getVersion": ^{ [self getVersion :callback]; },
10
10
  @"getServiceUrl": ^{ [self getServiceUrl :callback]; },
11
11
  @"setServiceUrl": ^{ [self setServiceUrl :args[0] :callback]; },
12
- @"getTenant": ^{ [self getTenant :callback]; },
13
- @"setTenant": ^{ [self setTenant :args[0]]; },
14
- @"getEnv": ^{ [self getEnv :callback]; },
15
- @"setEnv": ^{ [self setEnv :args[0]]; },
16
- @"getLocale": ^{ [self getLocale :callback]; },
17
- @"setLocale": ^{ [self setLocale :args[0]]; },
18
12
  @"setLocalizationDictionary": ^{ [self setLocalizationDictionary :args[0]]; },
19
13
  @"setRequestHeaders": ^{ [self setRequestHeaders :args[0]]; },
20
14
  @"setCustomization": ^{ [self setCustomization :args[0]]; },
@@ -70,30 +64,6 @@ static NSDictionary* headers;
70
64
  callback(@"");
71
65
  }
72
66
 
73
- +(void)getTenant:(RFSWCallback)callback {
74
- callback([RFSFaceSDK.service tenant]);
75
- }
76
-
77
- +(void)setTenant:(NSString*)tag {
78
- [RFSFaceSDK.service setTenant:tag];
79
- }
80
-
81
- +(void)getEnv:(RFSWCallback)callback {
82
- callback([RFSFaceSDK.service env]);
83
- }
84
-
85
- +(void)setEnv:(NSString*)tag {
86
- [RFSFaceSDK.service setEnv:tag];
87
- }
88
-
89
- +(void)getLocale:(RFSWCallback)callback {
90
- callback([RFSFaceSDK.service languageLocaleCode]);
91
- }
92
-
93
- +(void)setLocale:(NSString*)locale {
94
- [RFSFaceSDK.service setLanguageLocaleCode:locale];
95
- }
96
-
97
67
  +(void)setLocalizationDictionary:(NSDictionary*)dictionary {
98
68
  RFSFaceSDK.service.localizationHandler = ^NSString* (NSString* localizationKey) {
99
69
  if (dictionary[localizationKey]) return dictionary[localizationKey];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/face-sdk",
3
- "version": "7.2.415-beta",
3
+ "version": "7.2.421-beta",
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.2.415-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/face-sdk" version="7.2.421-beta" 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>
@@ -29,7 +29,7 @@
29
29
  <source url="https://github.com/CocoaPods/Specs.git" />
30
30
  </config>
31
31
  <pods>
32
- <pod name="FaceSDKNightly" spec="7.1.3008" />
32
+ <pod name="FaceSDK" spec="7.1.2940" />
33
33
  </pods>
34
34
  </podspec>
35
35
  </platform>
@@ -101,6 +101,6 @@ export class CustomizationFonts {
101
101
  }
102
102
 
103
103
  _apply() {
104
- this._set(this.toJson())
104
+ this._set(toJson())
105
105
  }
106
106
  }
@@ -124,6 +124,6 @@ export class CustomizationImages {
124
124
  }
125
125
 
126
126
  _apply() {
127
- this._set(this.toJson())
127
+ this._set(toJson())
128
128
  }
129
129
  }
@@ -19,14 +19,6 @@ export class Font {
19
19
 
20
20
  return result
21
21
  }
22
-
23
- toJson() {
24
- return {
25
- "name": this.name,
26
- "size": this.size,
27
- "style": this.style,
28
- }
29
- }
30
22
  }
31
23
 
32
24
  export const FontStyle = {
@@ -35,16 +35,4 @@ export class DetectFaceResult {
35
35
 
36
36
  return result
37
37
  }
38
-
39
- toJson() {
40
- return {
41
- "quality": this.quality?.map(e => e.toJson()),
42
- "crop": this.crop,
43
- "attributes": this.attributes?.map(e => e.toJson()),
44
- "landmarks": this.landmarks?.map(e => e.toJson()),
45
- "faceRect": this.faceRect?.toJson(),
46
- "originalRect": this.originalRect?.toJson(),
47
- "isQualityCompliant": this.isQualityCompliant,
48
- }
49
- }
50
38
  }
@@ -17,13 +17,4 @@ export class DetectFacesAttributeResult {
17
17
 
18
18
  return result
19
19
  }
20
-
21
- toJson() {
22
- return {
23
- "attribute": this.attribute,
24
- "value": this.value,
25
- "range": this.range?.toJson(),
26
- "confidence": this.confidence,
27
- }
28
- }
29
20
  }
@@ -11,13 +11,6 @@ export class DetectFacesBackendException {
11
11
 
12
12
  return result
13
13
  }
14
-
15
- toJson() {
16
- return {
17
- "code": this.code,
18
- "message": this.message,
19
- }
20
- }
21
14
  }
22
15
 
23
16
  export const DetectFacesBackendErrorCode = {
@@ -1,6 +1,3 @@
1
- import { ImageQualityCharacteristic } from '../image_quality/image_quality_characteristic'
2
- import { OutputImageParams } from '../image_params/output_image_params'
3
-
4
1
  export class DetectFacesConfig {
5
2
  attributes
6
3
  customQuality
@@ -14,35 +11,4 @@ export class DetectFacesConfig {
14
11
  this.outputImageParams = params?.outputImageParams
15
12
  this.onlyCentralFace = params?.onlyCentralFace ?? this.onlyCentralFace
16
13
  }
17
-
18
- static fromJson(jsonObject) {
19
- if (jsonObject == null) return null
20
- const result = new DetectFacesConfig()
21
-
22
- if (jsonObject["attributes"] != null) {
23
- result.attributes = []
24
- for (const item of jsonObject["attributes"]) {
25
- result.attributes.push(item)
26
- }
27
- }
28
- if (jsonObject["customQuality"] != null) {
29
- result.customQuality = []
30
- for (const item of jsonObject["customQuality"]) {
31
- result.customQuality.push(ImageQualityCharacteristic.fromJson(item))
32
- }
33
- }
34
- result.outputImageParams = OutputImageParams.fromJson(jsonObject["outputImageParams"])
35
- result.onlyCentralFace = jsonObject["onlyCentralFace"]
36
-
37
- return result
38
- }
39
-
40
- toJson() {
41
- return {
42
- "attributes": this.attributes?.map(e => e),
43
- "customQuality": this.customQuality?.map(e => e.toJson()),
44
- "outputImageParams": this.outputImageParams?.toJson(),
45
- "onlyCentralFace": this.onlyCentralFace,
46
- }
47
- }
48
14
  }
@@ -15,14 +15,6 @@ export class DetectFacesException {
15
15
 
16
16
  return result
17
17
  }
18
-
19
- toJson() {
20
- return {
21
- "code": this.code,
22
- "message": this.message,
23
- "underlyingError": this.underlyingError?.toJson(),
24
- }
25
- }
26
18
  }
27
19
 
28
20
  export const DetectFacesErrorCode = {
@@ -1,5 +1,4 @@
1
1
  import { DetectFacesScenario } from './detect_faces_scenario'
2
- import { DetectFacesConfig } from './detect_faces_config'
3
2
 
4
3
  export class DetectFacesRequest {
5
4
  image
@@ -67,25 +66,4 @@ export class DetectFacesRequest {
67
66
  result.scenario = DetectFacesScenario.ATTRIBUTES_ALL
68
67
  return result
69
68
  }
70
-
71
- static fromJson(jsonObject) {
72
- if (jsonObject == null) return null
73
- const result = new DetectFacesRequest()
74
-
75
- result.tag = jsonObject["tag"]
76
- result.scenario = jsonObject["scenario"]
77
- result.image = jsonObject["image"]
78
- result.configuration = DetectFacesConfig.fromJson(jsonObject["configuration"])
79
-
80
- return result
81
- }
82
-
83
- toJson() {
84
- return {
85
- "tag": this.tag,
86
- "scenario": this.scenario,
87
- "image": this.image,
88
- "configuration": this.configuration?.toJson(),
89
- }
90
- }
91
69
  }
@@ -21,13 +21,4 @@ export class DetectFacesResponse {
21
21
 
22
22
  return result
23
23
  }
24
-
25
- toJson() {
26
- return {
27
- "detection": this.detection?.toJson(),
28
- "allDetections": this.allDetections?.map(e => e.toJson()),
29
- "scenario": this.scenario,
30
- "error": this.error?.toJson(),
31
- }
32
- }
33
24
  }
@@ -29,41 +29,4 @@ export class FaceCaptureConfig {
29
29
  this.timeout = params?.timeout
30
30
  this.holdStillDuration = params?.holdStillDuration
31
31
  }
32
-
33
- static fromJson(jsonObject) {
34
- if (jsonObject == null) return null
35
- const result = new FaceCaptureConfig()
36
-
37
- result.copyright = jsonObject["copyright"]
38
- result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"]
39
- result.closeButtonEnabled = jsonObject["closeButtonEnabled"]
40
- result.torchButtonEnabled = jsonObject["torchButtonEnabled"]
41
- result.vibrateOnSteps = jsonObject["vibrateOnSteps"]
42
- result.detectOcclusion = jsonObject["detectOcclusion"]
43
- result.showFaceAnimation = jsonObject["showFaceAnimation"]
44
- result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"]
45
- result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
46
- result.screenOrientation = jsonObject["screenOrientation"]
47
- result.timeout = jsonObject["timeout"]
48
- result.holdStillDuration = jsonObject["holdStillDuration"]
49
-
50
- return result
51
- }
52
-
53
- toJson() {
54
- return {
55
- "copyright": this.copyright,
56
- "cameraSwitchEnabled": this.cameraSwitchEnabled,
57
- "closeButtonEnabled": this.closeButtonEnabled,
58
- "torchButtonEnabled": this.torchButtonEnabled,
59
- "vibrateOnSteps": this.vibrateOnSteps,
60
- "detectOcclusion": this.detectOcclusion,
61
- "showFaceAnimation": this.showFaceAnimation,
62
- "cameraPositionAndroid": this.cameraPositionAndroid,
63
- "cameraPositionIOS": this.cameraPositionIOS,
64
- "screenOrientation": this.screenOrientation,
65
- "timeout": this.timeout,
66
- "holdStillDuration": this.holdStillDuration,
67
- }
68
- }
69
32
  }