@regulaforensics/face-sdk 7.2.429-beta → 7.2.433-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 (173) 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 +162 -12
  10. package/examples/capacitor/package.json +4 -4
  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 +1327 -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/README.md +1 -1
  29. package/examples/ionic/angular.json +3 -3
  30. package/examples/ionic/config.xml +2 -4
  31. package/examples/ionic/index.ts +17 -0
  32. package/examples/ionic/package-lock.json +68 -42
  33. package/examples/ionic/package.json +2 -2
  34. package/examples/ionic/src/images/portrait.png +0 -0
  35. package/examples/ionic/src/main.css +6 -60
  36. package/examples/ionic/src/main.html +1 -1
  37. package/examples/ionic/src/{main.tsx → main.ts} +97 -52
  38. package/examples/ionic/tsconfig.json +2 -3
  39. package/examples/react_native/README.md +0 -1
  40. package/examples/react_native/app.config.ts +1 -1
  41. package/examples/react_native/index.tsx +7 -49
  42. package/examples/react_native/package-lock.json +597 -594
  43. package/examples/react_native/package.json +9 -9
  44. package/examples/react_native/src/main.css +6 -60
  45. package/examples/react_native/src/main.html +1 -1
  46. package/examples/react_native/src/main.tsx +77 -54
  47. package/ios/RFSWJSONConstructor.h +1 -0
  48. package/ios/RFSWJSONConstructor.m +14 -5
  49. package/ios/RFSWMain.m +0 -30
  50. package/package.json +1 -1
  51. package/plugin.xml +2 -2
  52. package/www/capacitor/customization/customization_fonts.js +1 -1
  53. package/www/capacitor/customization/customization_images.js +1 -1
  54. package/www/capacitor/customization/font.js +0 -8
  55. package/www/capacitor/detect_faces/detect_face_result.js +0 -12
  56. package/www/capacitor/detect_faces/detect_faces_attribute_result.js +0 -9
  57. package/www/capacitor/detect_faces/detect_faces_backend_exception.js +0 -7
  58. package/www/capacitor/detect_faces/detect_faces_config.js +0 -34
  59. package/www/capacitor/detect_faces/detect_faces_exception.js +0 -8
  60. package/www/capacitor/detect_faces/detect_faces_request.js +0 -22
  61. package/www/capacitor/detect_faces/detect_faces_response.js +0 -9
  62. package/www/capacitor/face_capture/face_capture_config.js +0 -37
  63. package/www/capacitor/face_capture/face_capture_exception.js +0 -7
  64. package/www/capacitor/face_capture/face_capture_image.js +0 -8
  65. package/www/capacitor/face_capture/face_capture_response.js +0 -7
  66. package/www/capacitor/image_params/output_image_crop.js +0 -23
  67. package/www/capacitor/image_params/output_image_params.js +0 -19
  68. package/www/capacitor/image_params/point.js +0 -7
  69. package/www/capacitor/image_params/rect.js +0 -9
  70. package/www/capacitor/image_params/size.js +0 -12
  71. package/www/capacitor/image_quality/image_quality_characteristic.js +0 -22
  72. package/www/capacitor/image_quality/image_quality_range.js +0 -7
  73. package/www/capacitor/image_quality/image_quality_result.js +0 -10
  74. package/www/capacitor/index.js +0 -48
  75. package/www/capacitor/init/face_sdk_version.js +0 -8
  76. package/www/capacitor/init/init_config.js +0 -19
  77. package/www/capacitor/init/init_exception.js +0 -8
  78. package/www/capacitor/init/license_exception.js +0 -7
  79. package/www/capacitor/internal/bridge.js +1 -20
  80. package/www/capacitor/liveness/liveness_backend_exception.js +0 -7
  81. package/www/capacitor/liveness/liveness_config.js +0 -43
  82. package/www/capacitor/liveness/liveness_exception.js +0 -8
  83. package/www/capacitor/liveness/liveness_notification.js +0 -7
  84. package/www/capacitor/liveness/liveness_response.js +0 -11
  85. package/www/capacitor/match_faces/compared_face.js +0 -9
  86. package/www/capacitor/match_faces/compared_faces_pair.js +0 -10
  87. package/www/capacitor/match_faces/compared_faces_split.js +0 -7
  88. package/www/capacitor/match_faces/match_faces_backend_exception.js +0 -7
  89. package/www/capacitor/match_faces/match_faces_config.js +0 -19
  90. package/www/capacitor/match_faces/match_faces_detection.js +0 -9
  91. package/www/capacitor/match_faces/match_faces_detection_face.js +0 -11
  92. package/www/capacitor/match_faces/match_faces_exception.js +0 -8
  93. package/www/capacitor/match_faces/match_faces_image.js +0 -9
  94. package/www/capacitor/match_faces/match_faces_request.js +0 -27
  95. package/www/capacitor/match_faces/match_faces_response.js +0 -9
  96. package/www/capacitor/person_database/edit_group_persons_request.js +0 -15
  97. package/www/capacitor/person_database/image_upload.js +0 -17
  98. package/www/capacitor/person_database/pageable_item_list.js +0 -8
  99. package/www/capacitor/person_database/person.js +0 -13
  100. package/www/capacitor/person_database/person_group.js +0 -11
  101. package/www/capacitor/person_database/person_image.js +0 -13
  102. package/www/capacitor/person_database/search_person.js +0 -14
  103. package/www/capacitor/person_database/search_person_detection.js +0 -9
  104. package/www/capacitor/person_database/search_person_image.js +0 -15
  105. package/www/capacitor/person_database/search_person_request.js +0 -29
  106. package/www/cordova.js +6 -753
  107. package/www/react-native/customization/customization_fonts.js +1 -1
  108. package/www/react-native/customization/customization_images.js +1 -1
  109. package/www/react-native/customization/font.js +0 -8
  110. package/www/react-native/detect_faces/detect_face_result.js +0 -12
  111. package/www/react-native/detect_faces/detect_faces_attribute_result.js +0 -9
  112. package/www/react-native/detect_faces/detect_faces_backend_exception.js +0 -7
  113. package/www/react-native/detect_faces/detect_faces_config.js +0 -34
  114. package/www/react-native/detect_faces/detect_faces_exception.js +0 -8
  115. package/www/react-native/detect_faces/detect_faces_request.js +0 -22
  116. package/www/react-native/detect_faces/detect_faces_response.js +0 -9
  117. package/www/react-native/face_capture/face_capture_config.js +0 -37
  118. package/www/react-native/face_capture/face_capture_exception.js +0 -7
  119. package/www/react-native/face_capture/face_capture_image.js +0 -8
  120. package/www/react-native/face_capture/face_capture_response.js +0 -7
  121. package/www/react-native/image_params/output_image_crop.js +0 -23
  122. package/www/react-native/image_params/output_image_params.js +0 -19
  123. package/www/react-native/image_params/point.js +0 -7
  124. package/www/react-native/image_params/rect.js +0 -9
  125. package/www/react-native/image_params/size.js +0 -12
  126. package/www/react-native/image_quality/image_quality_characteristic.js +0 -22
  127. package/www/react-native/image_quality/image_quality_range.js +0 -7
  128. package/www/react-native/image_quality/image_quality_result.js +0 -10
  129. package/www/react-native/index.js +0 -48
  130. package/www/react-native/init/face_sdk_version.js +0 -8
  131. package/www/react-native/init/init_config.js +0 -19
  132. package/www/react-native/init/init_exception.js +0 -8
  133. package/www/react-native/init/license_exception.js +0 -7
  134. package/www/react-native/internal/bridge.js +1 -20
  135. package/www/react-native/liveness/liveness_backend_exception.js +0 -7
  136. package/www/react-native/liveness/liveness_config.js +0 -43
  137. package/www/react-native/liveness/liveness_exception.js +0 -8
  138. package/www/react-native/liveness/liveness_notification.js +0 -7
  139. package/www/react-native/liveness/liveness_response.js +0 -11
  140. package/www/react-native/match_faces/compared_face.js +0 -9
  141. package/www/react-native/match_faces/compared_faces_pair.js +0 -10
  142. package/www/react-native/match_faces/compared_faces_split.js +0 -7
  143. package/www/react-native/match_faces/match_faces_backend_exception.js +0 -7
  144. package/www/react-native/match_faces/match_faces_config.js +0 -19
  145. package/www/react-native/match_faces/match_faces_detection.js +0 -9
  146. package/www/react-native/match_faces/match_faces_detection_face.js +0 -11
  147. package/www/react-native/match_faces/match_faces_exception.js +0 -8
  148. package/www/react-native/match_faces/match_faces_image.js +0 -9
  149. package/www/react-native/match_faces/match_faces_request.js +0 -27
  150. package/www/react-native/match_faces/match_faces_response.js +0 -9
  151. package/www/react-native/person_database/edit_group_persons_request.js +0 -15
  152. package/www/react-native/person_database/image_upload.js +0 -17
  153. package/www/react-native/person_database/pageable_item_list.js +0 -8
  154. package/www/react-native/person_database/person.js +0 -13
  155. package/www/react-native/person_database/person_group.js +0 -11
  156. package/www/react-native/person_database/person_image.js +0 -13
  157. package/www/react-native/person_database/search_person.js +0 -14
  158. package/www/react-native/person_database/search_person_detection.js +0 -9
  159. package/www/react-native/person_database/search_person_image.js +0 -15
  160. package/www/react-native/person_database/search_person_request.js +0 -29
  161. package/www/types/index.d.ts +0 -12
  162. package/www/types/match_faces/match_faces_config.d.ts +0 -2
  163. package/www/types/person_database/search_person_request.d.ts +0 -4
  164. package/examples/capacitor/index.tsx +0 -53
  165. package/examples/ionic/index.tsx +0 -68
  166. package/test/json.tsx +0 -375
  167. package/test/package-lock.json +0 -584
  168. package/test/package.json +0 -9
  169. package/test/test.tsx +0 -61
  170. package/test/utils.tsx +0 -38
  171. /package/examples/{ionic → cordova/www}/images/portrait.png +0 -0
  172. /package/examples/ionic/{assets → src/assets}/.gitkeep +0 -0
  173. /package/examples/ionic/{images → src/images}/icon.png +0 -0
@@ -11,13 +11,6 @@ export class FaceCaptureException {
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 FaceCaptureErrorCode = {
@@ -13,14 +13,6 @@ export class FaceCaptureImage {
13
13
 
14
14
  return result
15
15
  }
16
-
17
- toJson() {
18
- return {
19
- "imageType": this.imageType,
20
- "image": this.image,
21
- "tag": this.tag,
22
- }
23
- }
24
16
  }
25
17
 
26
18
  export const ImageType = {
@@ -14,11 +14,4 @@ export class FaceCaptureResponse {
14
14
 
15
15
  return result
16
16
  }
17
-
18
- toJson() {
19
- return {
20
- "image": this.image?.toJson(),
21
- "error": this.error?.toJson(),
22
- }
23
- }
24
17
  }
@@ -1,5 +1,3 @@
1
- import { Size } from './size'
2
-
3
1
  export class OutputImageCrop {
4
2
  type
5
3
  size
@@ -12,27 +10,6 @@ export class OutputImageCrop {
12
10
  this.padColor = params?.padColor
13
11
  this.returnOriginalRect = params?.returnOriginalRect ?? false
14
12
  }
15
-
16
- static fromJson(jsonObject) {
17
- if (jsonObject == null) return null
18
- return new OutputImageCrop(
19
- jsonObject["type"],
20
- {
21
- size: Size.fromJson(jsonObject["size"]),
22
- padColor: jsonObject["padColor"],
23
- returnOriginalRect: jsonObject["returnOriginalRect"],
24
- }
25
- )
26
- }
27
-
28
- toJson() {
29
- return {
30
- "type": this.type,
31
- "size": this.size?.toJson(),
32
- "padColor": this.padColor,
33
- "returnOriginalRect": this.returnOriginalRect,
34
- }
35
- }
36
13
  }
37
14
 
38
15
  export const OutputImageCropAspectRatio = {
@@ -1,5 +1,3 @@
1
- import { OutputImageCrop } from './output_image_crop'
2
-
3
1
  export class OutputImageParams {
4
2
  crop
5
3
  backgroundColor
@@ -8,21 +6,4 @@ export class OutputImageParams {
8
6
  this.crop = params?.crop
9
7
  this.backgroundColor = params?.backgroundColor
10
8
  }
11
-
12
- static fromJson(jsonObject) {
13
- if (jsonObject == null) return null
14
- const result = new OutputImageParams()
15
-
16
- result.crop = OutputImageCrop.fromJson(jsonObject["crop"])
17
- result.backgroundColor = jsonObject["backgroundColor"]
18
-
19
- return result
20
- }
21
-
22
- toJson() {
23
- return {
24
- "crop": this.crop?.toJson(),
25
- "backgroundColor": this.backgroundColor,
26
- }
27
- }
28
9
  }
@@ -11,11 +11,4 @@ export class Point {
11
11
 
12
12
  return result
13
13
  }
14
-
15
- toJson() {
16
- return {
17
- "x": this.x,
18
- "y": this.y,
19
- }
20
- }
21
14
  }
@@ -15,13 +15,4 @@ export class Rect {
15
15
 
16
16
  return result
17
17
  }
18
-
19
- toJson() {
20
- return {
21
- "left": this.left,
22
- "top": this.top,
23
- "right": this.right,
24
- "bottom": this.bottom,
25
- }
26
- }
27
18
  }
@@ -6,16 +6,4 @@ export class Size {
6
6
  this.width = width
7
7
  this.height = height
8
8
  }
9
-
10
- static fromJson(jsonObject) {
11
- if (jsonObject == null) return null
12
- return new Size(jsonObject["width"], jsonObject["height"])
13
- }
14
-
15
- toJson() {
16
- return {
17
- "width": this.width,
18
- "height": this.height,
19
- }
20
- }
21
9
  }
@@ -23,26 +23,4 @@ export class ImageQualityCharacteristic {
23
23
  this.customRange = ImageQualityRange.withValue(value)
24
24
  return this
25
25
  }
26
-
27
- static fromJson(jsonObject) {
28
- if (jsonObject == null) return null
29
-
30
- return ImageQualityCharacteristic._create(
31
- jsonObject["characteristicName"],
32
- {
33
- recommended: ImageQualityRange.fromJson(jsonObject["recommendedRange"]),
34
- custom: ImageQualityRange.fromJson(jsonObject["customRange"]),
35
- color: jsonObject["color"],
36
- }
37
- )
38
- }
39
-
40
- toJson() {
41
- return {
42
- "characteristicName": this.characteristicName,
43
- "recommendedRange": this.recommendedRange?.toJson(),
44
- "customRange": this.customRange?.toJson(),
45
- "color": this.color,
46
- }
47
- }
48
26
  }
@@ -23,11 +23,4 @@ export class ImageQualityRange {
23
23
 
24
24
  return result
25
25
  }
26
-
27
- toJson() {
28
- return {
29
- "min": this.min,
30
- "max": this.max,
31
- }
32
- }
33
26
  }
@@ -19,16 +19,6 @@ export class ImageQualityResult {
19
19
 
20
20
  return result
21
21
  }
22
-
23
- toJson() {
24
- return {
25
- "group": this.group,
26
- "name": this.name,
27
- "status": this.status,
28
- "value": this.value,
29
- "range": this.range?.toJson(),
30
- }
31
- }
32
22
  }
33
23
 
34
24
  export const ImageQualityGroupName = {
@@ -105,27 +105,6 @@ export class FaceSDK {
105
105
  this._setServiceUrl(val)
106
106
  }
107
107
 
108
- get tenant() { return this._tenant }
109
- _tenant = null
110
- set tenant(val) {
111
- this._tenant = val;
112
- this._setTenant(val);
113
- }
114
-
115
- get env() { return this._env }
116
- _env = null
117
- set env(val) {
118
- this._env = val;
119
- this._setEnv(val);
120
- }
121
-
122
- get locale() { return this._locale }
123
- _locale = null
124
- set locale(val) {
125
- this._locale = val;
126
- this._setLocale(val);
127
- }
128
-
129
108
  get localizationDictionary() { return this._localizationDictionary }
130
109
  _localizationDictionary
131
110
  set localizationDictionary(val) {
@@ -217,9 +196,6 @@ export class FaceSDK {
217
196
  async _onInit() {
218
197
  this._version = await this._getVersion()
219
198
  this._serviceUrl = await this._getServiceUrl()
220
- this._tenant = await this._getTenant();
221
- this._env = await this._getEnv();
222
- this._locale = await this._getLocale();
223
199
  }
224
200
 
225
201
  async _getVersion() {
@@ -235,30 +211,6 @@ export class FaceSDK {
235
211
  exec("setServiceUrl", [url])
236
212
  }
237
213
 
238
- async _getTenant() {
239
- return await exec("getTenant", []);
240
- }
241
-
242
- _setTenant(tenant) {
243
- exec("setTenant", [tenant]);
244
- }
245
-
246
- async _getEnv() {
247
- return await exec("getEnv", []);
248
- }
249
-
250
- _setEnv(env) {
251
- exec("setEnv", [env]);
252
- }
253
-
254
- async _getLocale() {
255
- return await exec("getLocale", []);
256
- }
257
-
258
- _setLocale(locale) {
259
- exec("setLocale", [locale]);
260
- }
261
-
262
214
  _setLocalizationDictionary(dictionary) {
263
215
  exec("setLocalizationDictionary", [dictionary])
264
216
  }
@@ -13,12 +13,4 @@ export class FaceSDKVersion {
13
13
 
14
14
  return result
15
15
  }
16
-
17
- toJson() {
18
- return {
19
- "api": this.api,
20
- "core": this.core,
21
- "coreMode": this.coreMode,
22
- }
23
- }
24
16
  }
@@ -14,23 +14,4 @@ export class InitConfig {
14
14
  this.licenseUpdate = params?.licenseUpdate
15
15
  this.useBleDevice = false
16
16
  }
17
-
18
- static fromJson(jsonObject) {
19
- if (jsonObject == null) return null
20
- const result = new InitConfig()
21
-
22
- result.license = jsonObject["license"]
23
- result.licenseUpdate = jsonObject["licenseUpdate"]
24
- result.useBleDevice = jsonObject["useBleDevice"]
25
-
26
- return result
27
- }
28
-
29
- toJson() {
30
- return {
31
- "license": this.license,
32
- "licenseUpdate": this.licenseUpdate,
33
- "useBleDevice": this.useBleDevice,
34
- }
35
- }
36
17
  }
@@ -15,14 +15,6 @@ export class InitException {
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 InitErrorCode = {
@@ -11,13 +11,6 @@ export class LicenseException {
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 LicensingResultCode = {
@@ -37,23 +37,4 @@ export function _setLivenessNotificationCompletion(completion) {
37
37
 
38
38
  export function _setCameraSwitchCallback(completion) {
39
39
  _setEvent("cameraSwitchEvent", completion)
40
- }
41
-
42
- export function dateToString(date) {
43
- if (date == null) return null
44
- const fmt = new Intl.DateTimeFormat('en', {
45
- year: 'numeric',
46
- month: '2-digit',
47
- day: '2-digit',
48
- hour: '2-digit',
49
- minute: '2-digit',
50
- second: '2-digit',
51
- fractionalSecondDigits: 3,
52
- hour12: false
53
- });
54
-
55
- const parts = fmt.formatToParts(date);
56
- const get = (t) => parts.find(p => p.type === t)?.value ?? '';
57
-
58
- return `${get('year')}-${get('month')}-${get('day')} ${get('hour')}:${get('minute')}:${get('second')}.${get('fractionalSecond')}`;
59
- }
40
+ }
@@ -11,13 +11,6 @@ export class LivenessBackendException {
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 LivenessBackendErrorCode = {
@@ -35,49 +35,6 @@ export class LivenessConfig {
35
35
  this.skipStep = params?.skipStep ?? []
36
36
  this.metadata = params?.metadata
37
37
  }
38
-
39
- static fromJson(jsonObject) {
40
- if (jsonObject == null) return null
41
- const result = new LivenessConfig()
42
-
43
- result.copyright = jsonObject["copyright"]
44
- result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"]
45
- result.closeButtonEnabled = jsonObject["closeButtonEnabled"]
46
- result.torchButtonEnabled = jsonObject["torchButtonEnabled"]
47
- result.vibrateOnSteps = jsonObject["vibrateOnSteps"]
48
- result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"]
49
- result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
50
- result.screenOrientation = jsonObject["screenOrientation"]
51
- result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
52
- result.attemptsCount = jsonObject["attemptsCount"]
53
- result.recordingProcess = jsonObject["recordingProcess"]
54
- result.livenessType = jsonObject["livenessType"]
55
- result.tag = jsonObject["tag"]
56
- result.skipStep = jsonObject["skipStep"]
57
- result.metadata = jsonObject["metadata"]
58
-
59
- return result
60
- }
61
-
62
- toJson() {
63
- return {
64
- "copyright": this.copyright,
65
- "cameraSwitchEnabled": this.cameraSwitchEnabled,
66
- "closeButtonEnabled": this.closeButtonEnabled,
67
- "torchButtonEnabled": this.torchButtonEnabled,
68
- "vibrateOnSteps": this.vibrateOnSteps,
69
- "cameraPositionAndroid": this.cameraPositionAndroid,
70
- "cameraPositionIOS": this.cameraPositionIOS,
71
- "screenOrientation": this.screenOrientation,
72
- "locationTrackingEnabled": this.locationTrackingEnabled,
73
- "attemptsCount": this.attemptsCount,
74
- "recordingProcess": this.recordingProcess,
75
- "livenessType": this.livenessType,
76
- "tag": this.tag,
77
- "skipStep": this.skipStep,
78
- "metadata": this.metadata,
79
- }
80
- }
81
38
  }
82
39
 
83
40
  export const RecordingProcess = {
@@ -15,14 +15,6 @@ export class LivenessException {
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 LivenessErrorCode = {
@@ -13,13 +13,6 @@ export class LivenessNotification {
13
13
 
14
14
  return result
15
15
  }
16
-
17
- toJson() {
18
- return {
19
- "status": this.status,
20
- "response": this.response?.toJson(),
21
- }
22
- }
23
16
  }
24
17
 
25
18
  export const LivenessProcessStatus = {
@@ -22,17 +22,6 @@ export class LivenessResponse {
22
22
 
23
23
  return result
24
24
  }
25
-
26
- toJson() {
27
- return {
28
- "image": this.image,
29
- "liveness": this.liveness,
30
- "tag": this.tag,
31
- "transactionId": this.transactionId,
32
- "estimatedAge": this.estimatedAge,
33
- "error": this.error?.toJson(),
34
- }
35
- }
36
25
  }
37
26
 
38
27
  export const LivenessStatus = {
@@ -18,13 +18,4 @@ export class ComparedFace {
18
18
 
19
19
  return result
20
20
  }
21
-
22
- toJson() {
23
- return {
24
- "imageIndex": this.imageIndex,
25
- "image": this.image?.toJson(),
26
- "faceIndex": this.faceIndex,
27
- "face": this.face?.toJson(),
28
- }
29
- }
30
21
  }
@@ -20,14 +20,4 @@ export class ComparedFacesPair {
20
20
 
21
21
  return result
22
22
  }
23
-
24
- toJson() {
25
- return {
26
- "first": this.first?.toJson(),
27
- "second": this.second?.toJson(),
28
- "similarity": this.similarity,
29
- "score": this.score,
30
- "error": this.error?.toJson(),
31
- }
32
- }
33
23
  }
@@ -19,11 +19,4 @@ export class ComparedFacesSplit {
19
19
 
20
20
  return result
21
21
  }
22
-
23
- toJson() {
24
- return {
25
- "matchedFaces": this.matchedFaces?.map(e => e.toJson()),
26
- "unmatchedFaces": this.unmatchedFaces?.map(e => e.toJson()),
27
- }
28
- }
29
22
  }
@@ -11,11 +11,4 @@ export class MatchFacesBackendException {
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
  }
@@ -1,27 +1,8 @@
1
1
  export class MatchFacesConfig {
2
2
  processingMode
3
- locationTrackingEnabled
4
3
 
5
4
  constructor(params) {
6
5
  this.processingMode = params?.processingMode ?? ProcessingMode.ONLINE
7
- this.locationTrackingEnabled = params?.locationTrackingEnabled ?? true
8
- }
9
-
10
- static fromJson(jsonObject) {
11
- if (jsonObject == null) return null
12
- const result = new MatchFacesConfig()
13
-
14
- result.processingMode = jsonObject["processingMode"]
15
- result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
16
-
17
- return result
18
- }
19
-
20
- toJson() {
21
- return {
22
- "processingMode": this.processingMode,
23
- "locationTrackingEnabled": this.locationTrackingEnabled,
24
- }
25
6
  }
26
7
  }
27
8
 
@@ -22,13 +22,4 @@ export class MatchFacesDetection {
22
22
 
23
23
  return result
24
24
  }
25
-
26
- toJson() {
27
- return {
28
- "imageIndex": this.imageIndex,
29
- "image": this.image?.toJson(),
30
- "faces": this.faces?.map(e => e.toJson()),
31
- "error": this.error?.toJson(),
32
- }
33
- }
34
25
  }
@@ -25,15 +25,4 @@ export class MatchFacesDetectionFace {
25
25
 
26
26
  return result
27
27
  }
28
-
29
- toJson() {
30
- return {
31
- "faceIndex": this.faceIndex,
32
- "landmarks": this.landmarks?.map(e => e.toJson()),
33
- "faceRect": this.faceRect?.toJson(),
34
- "rotationAngle": this.rotationAngle,
35
- "originalRect": this.originalRect?.toJson(),
36
- "crop": this.crop,
37
- }
38
- }
39
28
  }
@@ -15,14 +15,6 @@ export class MatchFacesException {
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 MatchFacesErrorCode = {
@@ -22,13 +22,4 @@ export class MatchFacesImage {
22
22
 
23
23
  return result
24
24
  }
25
-
26
- toJson() {
27
- return {
28
- "image": this.image,
29
- "imageType": this.imageType,
30
- "detectAll": this.detectAll,
31
- "identifier": this.identifier,
32
- }
33
- }
34
25
  }
@@ -1,6 +1,3 @@
1
- import { OutputImageParams } from '../image_params/output_image_params'
2
- import { MatchFacesImage } from './match_faces_image'
3
-
4
1
  export class MatchFacesRequest {
5
2
  images
6
3
  outputImageParams
@@ -13,28 +10,4 @@ export class MatchFacesRequest {
13
10
  this.tag = params?.tag
14
11
  this.metadata = params?.metadata
15
12
  }
16
-
17
- static fromJson(jsonObject) {
18
- if (jsonObject == null) return null
19
-
20
- const images = []
21
- for (const item of jsonObject["images"]) {
22
- images.push(MatchFacesImage.fromJson(item))
23
- }
24
-
25
- return new MatchFacesRequest(images, {
26
- outputImageParams: OutputImageParams.fromJson(jsonObject["outputImageParams"]),
27
- tag: jsonObject["tag"],
28
- metadata: jsonObject["metadata"],
29
- })
30
- }
31
-
32
- toJson() {
33
- return {
34
- "images": this.images?.map(e => e.toJson()),
35
- "outputImageParams": this.outputImageParams?.toJson(),
36
- "tag": this.tag,
37
- "metadata": this.metadata,
38
- }
39
- }
40
13
  }