@regulaforensics/face-sdk 7.2.404-beta → 7.2.408-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 (129) hide show
  1. package/RNFaceSDK.podspec +2 -2
  2. package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +0 -2
  3. package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +0 -18
  4. package/examples/capacitor/package.json +2 -2
  5. package/examples/cordova/package.json +2 -2
  6. package/examples/ionic/package.json +2 -2
  7. package/examples/react_native/package.json +2 -2
  8. package/ios/RFSWJSONConstructor.h +1 -0
  9. package/ios/RFSWJSONConstructor.m +14 -5
  10. package/ios/RFSWMain.m +0 -30
  11. package/package.json +1 -1
  12. package/plugin.xml +2 -2
  13. package/www/capacitor/customization/customization_fonts.js +1 -1
  14. package/www/capacitor/customization/customization_images.js +1 -1
  15. package/www/capacitor/customization/font.js +0 -8
  16. package/www/capacitor/detect_faces/detect_face_result.js +0 -12
  17. package/www/capacitor/detect_faces/detect_faces_attribute_result.js +0 -9
  18. package/www/capacitor/detect_faces/detect_faces_backend_exception.js +0 -7
  19. package/www/capacitor/detect_faces/detect_faces_config.js +0 -34
  20. package/www/capacitor/detect_faces/detect_faces_exception.js +0 -8
  21. package/www/capacitor/detect_faces/detect_faces_request.js +0 -22
  22. package/www/capacitor/detect_faces/detect_faces_response.js +0 -9
  23. package/www/capacitor/face_capture/face_capture_config.js +0 -37
  24. package/www/capacitor/face_capture/face_capture_exception.js +0 -7
  25. package/www/capacitor/face_capture/face_capture_image.js +0 -8
  26. package/www/capacitor/face_capture/face_capture_response.js +0 -7
  27. package/www/capacitor/image_params/output_image_crop.js +0 -23
  28. package/www/capacitor/image_params/output_image_params.js +0 -19
  29. package/www/capacitor/image_params/point.js +0 -7
  30. package/www/capacitor/image_params/rect.js +0 -9
  31. package/www/capacitor/image_params/size.js +0 -12
  32. package/www/capacitor/image_quality/image_quality_characteristic.js +0 -22
  33. package/www/capacitor/image_quality/image_quality_range.js +0 -7
  34. package/www/capacitor/image_quality/image_quality_result.js +0 -10
  35. package/www/capacitor/index.js +0 -48
  36. package/www/capacitor/init/face_sdk_version.js +0 -8
  37. package/www/capacitor/init/init_config.js +0 -19
  38. package/www/capacitor/init/init_exception.js +0 -8
  39. package/www/capacitor/init/license_exception.js +0 -7
  40. package/www/capacitor/internal/bridge.js +1 -20
  41. package/www/capacitor/liveness/liveness_backend_exception.js +0 -7
  42. package/www/capacitor/liveness/liveness_config.js +0 -43
  43. package/www/capacitor/liveness/liveness_exception.js +0 -8
  44. package/www/capacitor/liveness/liveness_notification.js +0 -7
  45. package/www/capacitor/liveness/liveness_response.js +0 -11
  46. package/www/capacitor/match_faces/compared_face.js +0 -9
  47. package/www/capacitor/match_faces/compared_faces_pair.js +0 -10
  48. package/www/capacitor/match_faces/compared_faces_split.js +0 -7
  49. package/www/capacitor/match_faces/match_faces_backend_exception.js +0 -7
  50. package/www/capacitor/match_faces/match_faces_config.js +0 -19
  51. package/www/capacitor/match_faces/match_faces_detection.js +0 -9
  52. package/www/capacitor/match_faces/match_faces_detection_face.js +0 -11
  53. package/www/capacitor/match_faces/match_faces_exception.js +0 -8
  54. package/www/capacitor/match_faces/match_faces_image.js +0 -9
  55. package/www/capacitor/match_faces/match_faces_request.js +0 -27
  56. package/www/capacitor/match_faces/match_faces_response.js +0 -9
  57. package/www/capacitor/person_database/edit_group_persons_request.js +0 -15
  58. package/www/capacitor/person_database/image_upload.js +0 -17
  59. package/www/capacitor/person_database/pageable_item_list.js +0 -8
  60. package/www/capacitor/person_database/person.js +0 -13
  61. package/www/capacitor/person_database/person_group.js +0 -11
  62. package/www/capacitor/person_database/person_image.js +0 -13
  63. package/www/capacitor/person_database/search_person.js +0 -14
  64. package/www/capacitor/person_database/search_person_detection.js +0 -9
  65. package/www/capacitor/person_database/search_person_image.js +0 -15
  66. package/www/capacitor/person_database/search_person_request.js +0 -29
  67. package/www/cordova.js +6 -753
  68. package/www/react-native/customization/customization_fonts.js +1 -1
  69. package/www/react-native/customization/customization_images.js +1 -1
  70. package/www/react-native/customization/font.js +0 -8
  71. package/www/react-native/detect_faces/detect_face_result.js +0 -12
  72. package/www/react-native/detect_faces/detect_faces_attribute_result.js +0 -9
  73. package/www/react-native/detect_faces/detect_faces_backend_exception.js +0 -7
  74. package/www/react-native/detect_faces/detect_faces_config.js +0 -34
  75. package/www/react-native/detect_faces/detect_faces_exception.js +0 -8
  76. package/www/react-native/detect_faces/detect_faces_request.js +0 -22
  77. package/www/react-native/detect_faces/detect_faces_response.js +0 -9
  78. package/www/react-native/face_capture/face_capture_config.js +0 -37
  79. package/www/react-native/face_capture/face_capture_exception.js +0 -7
  80. package/www/react-native/face_capture/face_capture_image.js +0 -8
  81. package/www/react-native/face_capture/face_capture_response.js +0 -7
  82. package/www/react-native/image_params/output_image_crop.js +0 -23
  83. package/www/react-native/image_params/output_image_params.js +0 -19
  84. package/www/react-native/image_params/point.js +0 -7
  85. package/www/react-native/image_params/rect.js +0 -9
  86. package/www/react-native/image_params/size.js +0 -12
  87. package/www/react-native/image_quality/image_quality_characteristic.js +0 -22
  88. package/www/react-native/image_quality/image_quality_range.js +0 -7
  89. package/www/react-native/image_quality/image_quality_result.js +0 -10
  90. package/www/react-native/index.js +0 -48
  91. package/www/react-native/init/face_sdk_version.js +0 -8
  92. package/www/react-native/init/init_config.js +0 -19
  93. package/www/react-native/init/init_exception.js +0 -8
  94. package/www/react-native/init/license_exception.js +0 -7
  95. package/www/react-native/internal/bridge.js +1 -20
  96. package/www/react-native/liveness/liveness_backend_exception.js +0 -7
  97. package/www/react-native/liveness/liveness_config.js +0 -43
  98. package/www/react-native/liveness/liveness_exception.js +0 -8
  99. package/www/react-native/liveness/liveness_notification.js +0 -7
  100. package/www/react-native/liveness/liveness_response.js +0 -11
  101. package/www/react-native/match_faces/compared_face.js +0 -9
  102. package/www/react-native/match_faces/compared_faces_pair.js +0 -10
  103. package/www/react-native/match_faces/compared_faces_split.js +0 -7
  104. package/www/react-native/match_faces/match_faces_backend_exception.js +0 -7
  105. package/www/react-native/match_faces/match_faces_config.js +0 -19
  106. package/www/react-native/match_faces/match_faces_detection.js +0 -9
  107. package/www/react-native/match_faces/match_faces_detection_face.js +0 -11
  108. package/www/react-native/match_faces/match_faces_exception.js +0 -8
  109. package/www/react-native/match_faces/match_faces_image.js +0 -9
  110. package/www/react-native/match_faces/match_faces_request.js +0 -27
  111. package/www/react-native/match_faces/match_faces_response.js +0 -9
  112. package/www/react-native/person_database/edit_group_persons_request.js +0 -15
  113. package/www/react-native/person_database/image_upload.js +0 -17
  114. package/www/react-native/person_database/pageable_item_list.js +0 -8
  115. package/www/react-native/person_database/person.js +0 -13
  116. package/www/react-native/person_database/person_group.js +0 -11
  117. package/www/react-native/person_database/person_image.js +0 -13
  118. package/www/react-native/person_database/search_person.js +0 -14
  119. package/www/react-native/person_database/search_person_detection.js +0 -9
  120. package/www/react-native/person_database/search_person_image.js +0 -15
  121. package/www/react-native/person_database/search_person_request.js +0 -29
  122. package/www/types/index.d.ts +0 -12
  123. package/www/types/match_faces/match_faces_config.d.ts +0 -2
  124. package/www/types/person_database/search_person_request.d.ts +0 -4
  125. package/test/json.tsx +0 -375
  126. package/test/package-lock.json +0 -584
  127. package/test/package.json +0 -9
  128. package/test/test.tsx +0 -61
  129. package/test/utils.tsx +0 -38
package/RNFaceSDK.podspec CHANGED
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
5
5
 
6
6
  Pod::Spec.new do |s|
7
7
  s.name = 'RNFaceSDK'
8
- s.version = '7.2.404-beta'
8
+ s.version = '7.2.408-rc'
9
9
  s.summary = package['description']
10
10
  s.license = package['license']
11
11
 
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
16
16
  s.ios.deployment_target = '13.0'
17
17
  s.source_files = 'ios/**/*.{h,m}'
18
18
  s.exclude_files = [ 'ios/CVDFaceSDK.h', 'ios/CVDFaceSDK.m' ]
19
- s.dependency 'FaceSDKStage', '7.2.3006'
19
+ s.dependency 'FaceSDKStage', '7.2.3010'
20
20
  s.dependency 'React'
21
21
  end
@@ -833,7 +833,6 @@ fun searchPersonRequestFromJSON(it: JSONObject) = object : SearchPersonRequest()
833
833
  groupIdsForSearch = it.getJSONArrayOrNull("groupIdsForSearch").toArray()
834
834
  threshold = it.getDoubleOrNull("threshold")?.toFloat()
835
835
  limit = it.getIntOrNull("limit")
836
- tag = it.getStringOrNull("tag")
837
836
  imageUpload = imageUploadFromJSON(it.getJSONObjectOrNull("imageUpload"))
838
837
  isDetectAll = it.optBoolean("detectAll", false)
839
838
  outputImageParams = outputImageParamsFromJSON(it.getJSONObjectOrNull("outputImageParams"))
@@ -844,7 +843,6 @@ fun generateSearchPersonRequest(it: SearchPersonRequest) = mapOf(
844
843
  "groupIdsForSearch" to it.groupIdsForSearch.toJson(),
845
844
  "threshold" to it.threshold,
846
845
  "limit" to it.limit,
847
- "tag" to it.tag,
848
846
  "imageUpload" to generateImageUpload(it.imageUpload),
849
847
  "detectAll" to it.isDetectAll,
850
848
  "outputImageParams" to generateOutputImageParams(it.outputImageParams)
@@ -30,12 +30,6 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
30
30
  "getVersion" -> getVersion(callback)
31
31
  "getServiceUrl" -> getServiceUrl(callback)
32
32
  "setServiceUrl" -> setServiceUrl(argsNullable(0))
33
- "getTenant" -> getTenant(callback)
34
- "setTenant" -> setTenant(argsNullable(0))
35
- "getEnv" -> getEnv(callback)
36
- "setEnv" -> setEnv(argsNullable(0))
37
- "getLocale" -> getLocale(callback)
38
- "setLocale" -> setLocale(argsNullable(0))
39
33
  "setLocalizationDictionary" -> setLocalizationDictionary(args(0))
40
34
  "setRequestHeaders" -> setRequestHeaders(args(0))
41
35
  "setCustomization" -> setCustomization(args(0))
@@ -87,18 +81,6 @@ fun getServiceUrl(callback: Callback) = callback(Instance().serviceUrl)
87
81
 
88
82
  fun setServiceUrl(url: String?) = url.let { Instance().serviceUrl = it }
89
83
 
90
- fun getTenant(callback: Callback) = callback(Instance().tenant)
91
-
92
- fun setTenant(tag: String?) = tag.let { Instance().tenant = it }
93
-
94
- fun getEnv(callback: Callback) = callback(Instance().env)
95
-
96
- fun setEnv(tag: String?) = tag.let { Instance().env = it }
97
-
98
- fun getLocale(callback: Callback) = callback(Instance().locale)
99
-
100
- fun setLocale(locale: String?) = locale.let { Instance().locale = it }
101
-
102
84
  fun setLocalizationDictionary(dictionary: JSONObject) {
103
85
  localizationCallbacks = LocalizationCallbacks { if (dictionary.has(it)) dictionary.getString(it) else null }
104
86
  Instance().setLocalizationCallback(localizationCallbacks!!)
@@ -6,8 +6,8 @@
6
6
  "android": "scripts/android.sh"
7
7
  },
8
8
  "dependencies": {
9
- "@regulaforensics/face-sdk": "7.2.404-beta",
10
- "@regulaforensics/face-core-basic": "7.2.238-rc",
9
+ "@regulaforensics/face-sdk": "7.2.408-rc",
10
+ "@regulaforensics/face-core-basic": "7.2.241-rc",
11
11
  "@awesome-cordova-plugins/file": "6.6.0",
12
12
  "@awesome-cordova-plugins/camera": "6.6.0",
13
13
  "cordova-plugin-file": "8.1.3",
@@ -6,8 +6,8 @@
6
6
  "android": "scripts/android.sh"
7
7
  },
8
8
  "dependencies": {
9
- "@regulaforensics/face-sdk": "7.2.404-beta",
10
- "@regulaforensics/face-core-basic": "7.2.238-rc",
9
+ "@regulaforensics/face-sdk": "7.2.408-rc",
10
+ "@regulaforensics/face-core-basic": "7.2.241-rc",
11
11
  "cordova-ios": "7.1.1",
12
12
  "cordova-android": "13.0.0",
13
13
  "cordova-plugin-file": "8.1.3",
@@ -6,8 +6,8 @@
6
6
  "android": "scripts/android.sh"
7
7
  },
8
8
  "dependencies": {
9
- "@regulaforensics/face-sdk": "7.2.404-beta",
10
- "@regulaforensics/face-core-basic": "7.2.238-rc",
9
+ "@regulaforensics/face-sdk": "7.2.408-rc",
10
+ "@regulaforensics/face-core-basic": "7.2.241-rc",
11
11
  "@awesome-cordova-plugins/file": "6.16.0",
12
12
  "@awesome-cordova-plugins/camera": "6.16.0",
13
13
  "@awesome-cordova-plugins/dialogs": "6.16.0",
@@ -8,8 +8,8 @@
8
8
  "start": "expo start"
9
9
  },
10
10
  "dependencies": {
11
- "@regulaforensics/face-sdk": "7.2.404-beta",
12
- "@regulaforensics/face-core-basic": "7.2.238-rc",
11
+ "@regulaforensics/face-sdk": "7.2.408-rc",
12
+ "@regulaforensics/face-core-basic": "7.2.241-rc",
13
13
  "react-native": "0.79.2",
14
14
  "react-native-fs": "2.20.0",
15
15
  "react-native-image-picker": "8.2.1",
@@ -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.404-beta",
3
+ "version": "7.2.408-rc",
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.404-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/face-sdk" version="7.2.408-rc" 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="FaceSDKStage" spec="7.2.3006" />
32
+ <pod name="FaceSDKStage" spec="7.2.3010" />
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
  }
@@ -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
  }