@regulaforensics/face-sdk 7.2.433-rc → 7.2.437-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 +2 -3
  2. package/RNFaceSDK.podspec +2 -2
  3. package/android/build.gradle +1 -1
  4. package/android/cordova.gradle +1 -1
  5. package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +2 -0
  6. package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +18 -0
  7. package/examples/capacitor/android/app/src/main/AndroidManifest.xml +2 -2
  8. package/examples/capacitor/index.html +2 -7
  9. package/examples/capacitor/index.tsx +53 -0
  10. package/examples/capacitor/package-lock.json +12 -162
  11. package/examples/capacitor/package.json +4 -4
  12. package/examples/capacitor/scripts/setup.sh +4 -2
  13. package/examples/capacitor/src/main.css +60 -6
  14. package/examples/capacitor/src/main.html +1 -1
  15. package/examples/capacitor/src/main.tsx +51 -87
  16. package/examples/ionic/README.md +1 -1
  17. package/examples/ionic/angular.json +3 -3
  18. package/examples/ionic/config.xml +4 -2
  19. package/examples/ionic/index.tsx +68 -0
  20. package/examples/ionic/package-lock.json +42 -68
  21. package/examples/ionic/package.json +2 -2
  22. package/examples/ionic/src/main.css +60 -6
  23. package/examples/ionic/src/main.html +1 -1
  24. package/examples/ionic/src/{main.ts → main.tsx} +52 -97
  25. package/examples/ionic/tsconfig.json +3 -2
  26. package/examples/react_native/README.md +1 -0
  27. package/examples/react_native/app.config.ts +1 -1
  28. package/examples/react_native/index.tsx +49 -7
  29. package/examples/react_native/package-lock.json +594 -597
  30. package/examples/react_native/package.json +9 -9
  31. package/examples/react_native/src/main.css +60 -6
  32. package/examples/react_native/src/main.html +1 -1
  33. package/examples/react_native/src/main.tsx +54 -77
  34. package/ios/RFSWJSONConstructor.h +0 -1
  35. package/ios/RFSWJSONConstructor.m +5 -14
  36. package/ios/RFSWMain.m +30 -0
  37. package/package.json +1 -1
  38. package/plugin.xml +2 -2
  39. package/test/json.tsx +375 -0
  40. package/test/package-lock.json +584 -0
  41. package/test/package.json +9 -0
  42. package/test/test.tsx +61 -0
  43. package/test/utils.tsx +38 -0
  44. package/www/capacitor/customization/customization_fonts.js +1 -1
  45. package/www/capacitor/customization/customization_images.js +1 -1
  46. package/www/capacitor/customization/font.js +8 -0
  47. package/www/capacitor/detect_faces/detect_face_result.js +12 -0
  48. package/www/capacitor/detect_faces/detect_faces_attribute_result.js +9 -0
  49. package/www/capacitor/detect_faces/detect_faces_backend_exception.js +7 -0
  50. package/www/capacitor/detect_faces/detect_faces_config.js +34 -0
  51. package/www/capacitor/detect_faces/detect_faces_exception.js +8 -0
  52. package/www/capacitor/detect_faces/detect_faces_request.js +22 -0
  53. package/www/capacitor/detect_faces/detect_faces_response.js +9 -0
  54. package/www/capacitor/face_capture/face_capture_config.js +37 -0
  55. package/www/capacitor/face_capture/face_capture_exception.js +7 -0
  56. package/www/capacitor/face_capture/face_capture_image.js +8 -0
  57. package/www/capacitor/face_capture/face_capture_response.js +7 -0
  58. package/www/capacitor/image_params/output_image_crop.js +23 -0
  59. package/www/capacitor/image_params/output_image_params.js +19 -0
  60. package/www/capacitor/image_params/point.js +7 -0
  61. package/www/capacitor/image_params/rect.js +9 -0
  62. package/www/capacitor/image_params/size.js +12 -0
  63. package/www/capacitor/image_quality/image_quality_characteristic.js +22 -0
  64. package/www/capacitor/image_quality/image_quality_range.js +7 -0
  65. package/www/capacitor/image_quality/image_quality_result.js +10 -0
  66. package/www/capacitor/index.js +48 -0
  67. package/www/capacitor/init/face_sdk_version.js +8 -0
  68. package/www/capacitor/init/init_config.js +19 -0
  69. package/www/capacitor/init/init_exception.js +8 -0
  70. package/www/capacitor/init/license_exception.js +7 -0
  71. package/www/capacitor/internal/bridge.js +20 -1
  72. package/www/capacitor/liveness/liveness_backend_exception.js +7 -0
  73. package/www/capacitor/liveness/liveness_config.js +43 -0
  74. package/www/capacitor/liveness/liveness_exception.js +8 -0
  75. package/www/capacitor/liveness/liveness_notification.js +7 -0
  76. package/www/capacitor/liveness/liveness_response.js +11 -0
  77. package/www/capacitor/match_faces/compared_face.js +9 -0
  78. package/www/capacitor/match_faces/compared_faces_pair.js +10 -0
  79. package/www/capacitor/match_faces/compared_faces_split.js +7 -0
  80. package/www/capacitor/match_faces/match_faces_backend_exception.js +7 -0
  81. package/www/capacitor/match_faces/match_faces_config.js +19 -0
  82. package/www/capacitor/match_faces/match_faces_detection.js +9 -0
  83. package/www/capacitor/match_faces/match_faces_detection_face.js +11 -0
  84. package/www/capacitor/match_faces/match_faces_exception.js +8 -0
  85. package/www/capacitor/match_faces/match_faces_image.js +9 -0
  86. package/www/capacitor/match_faces/match_faces_request.js +27 -0
  87. package/www/capacitor/match_faces/match_faces_response.js +9 -0
  88. package/www/capacitor/person_database/edit_group_persons_request.js +15 -0
  89. package/www/capacitor/person_database/image_upload.js +17 -0
  90. package/www/capacitor/person_database/pageable_item_list.js +8 -0
  91. package/www/capacitor/person_database/person.js +13 -0
  92. package/www/capacitor/person_database/person_group.js +11 -0
  93. package/www/capacitor/person_database/person_image.js +13 -0
  94. package/www/capacitor/person_database/search_person.js +14 -0
  95. package/www/capacitor/person_database/search_person_detection.js +9 -0
  96. package/www/capacitor/person_database/search_person_image.js +15 -0
  97. package/www/capacitor/person_database/search_person_request.js +29 -0
  98. package/www/cordova.js +753 -6
  99. package/www/react-native/customization/customization_fonts.js +1 -1
  100. package/www/react-native/customization/customization_images.js +1 -1
  101. package/www/react-native/customization/font.js +8 -0
  102. package/www/react-native/detect_faces/detect_face_result.js +12 -0
  103. package/www/react-native/detect_faces/detect_faces_attribute_result.js +9 -0
  104. package/www/react-native/detect_faces/detect_faces_backend_exception.js +7 -0
  105. package/www/react-native/detect_faces/detect_faces_config.js +34 -0
  106. package/www/react-native/detect_faces/detect_faces_exception.js +8 -0
  107. package/www/react-native/detect_faces/detect_faces_request.js +22 -0
  108. package/www/react-native/detect_faces/detect_faces_response.js +9 -0
  109. package/www/react-native/face_capture/face_capture_config.js +37 -0
  110. package/www/react-native/face_capture/face_capture_exception.js +7 -0
  111. package/www/react-native/face_capture/face_capture_image.js +8 -0
  112. package/www/react-native/face_capture/face_capture_response.js +7 -0
  113. package/www/react-native/image_params/output_image_crop.js +23 -0
  114. package/www/react-native/image_params/output_image_params.js +19 -0
  115. package/www/react-native/image_params/point.js +7 -0
  116. package/www/react-native/image_params/rect.js +9 -0
  117. package/www/react-native/image_params/size.js +12 -0
  118. package/www/react-native/image_quality/image_quality_characteristic.js +22 -0
  119. package/www/react-native/image_quality/image_quality_range.js +7 -0
  120. package/www/react-native/image_quality/image_quality_result.js +10 -0
  121. package/www/react-native/index.js +48 -0
  122. package/www/react-native/init/face_sdk_version.js +8 -0
  123. package/www/react-native/init/init_config.js +19 -0
  124. package/www/react-native/init/init_exception.js +8 -0
  125. package/www/react-native/init/license_exception.js +7 -0
  126. package/www/react-native/internal/bridge.js +20 -1
  127. package/www/react-native/liveness/liveness_backend_exception.js +7 -0
  128. package/www/react-native/liveness/liveness_config.js +43 -0
  129. package/www/react-native/liveness/liveness_exception.js +8 -0
  130. package/www/react-native/liveness/liveness_notification.js +7 -0
  131. package/www/react-native/liveness/liveness_response.js +11 -0
  132. package/www/react-native/match_faces/compared_face.js +9 -0
  133. package/www/react-native/match_faces/compared_faces_pair.js +10 -0
  134. package/www/react-native/match_faces/compared_faces_split.js +7 -0
  135. package/www/react-native/match_faces/match_faces_backend_exception.js +7 -0
  136. package/www/react-native/match_faces/match_faces_config.js +19 -0
  137. package/www/react-native/match_faces/match_faces_detection.js +9 -0
  138. package/www/react-native/match_faces/match_faces_detection_face.js +11 -0
  139. package/www/react-native/match_faces/match_faces_exception.js +8 -0
  140. package/www/react-native/match_faces/match_faces_image.js +9 -0
  141. package/www/react-native/match_faces/match_faces_request.js +27 -0
  142. package/www/react-native/match_faces/match_faces_response.js +9 -0
  143. package/www/react-native/person_database/edit_group_persons_request.js +15 -0
  144. package/www/react-native/person_database/image_upload.js +17 -0
  145. package/www/react-native/person_database/pageable_item_list.js +8 -0
  146. package/www/react-native/person_database/person.js +13 -0
  147. package/www/react-native/person_database/person_group.js +11 -0
  148. package/www/react-native/person_database/person_image.js +13 -0
  149. package/www/react-native/person_database/search_person.js +14 -0
  150. package/www/react-native/person_database/search_person_detection.js +9 -0
  151. package/www/react-native/person_database/search_person_image.js +15 -0
  152. package/www/react-native/person_database/search_person_request.js +29 -0
  153. package/www/types/index.d.ts +12 -0
  154. package/www/types/match_faces/match_faces_config.d.ts +2 -0
  155. package/www/types/person_database/search_person_request.d.ts +4 -0
  156. package/examples/cordova/.vscode/launch.json +0 -28
  157. package/examples/cordova/README.md +0 -25
  158. package/examples/cordova/config.xml +0 -26
  159. package/examples/cordova/package-lock.json +0 -1327
  160. package/examples/cordova/package.json +0 -30
  161. package/examples/cordova/scripts/android.sh +0 -8
  162. package/examples/cordova/scripts/ios.sh +0 -8
  163. package/examples/cordova/scripts/setup.sh +0 -8
  164. package/examples/cordova/www/images/logo.png +0 -0
  165. package/examples/cordova/www/index.html +0 -21
  166. package/examples/cordova/www/src/main.css +0 -83
  167. package/examples/cordova/www/src/main.html +0 -25
  168. package/examples/cordova/www/src/main.js +0 -152
  169. package/examples/ionic/index.ts +0 -17
  170. package/examples/ionic/src/images/portrait.png +0 -0
  171. /package/examples/ionic/{src/assets → assets}/.gitkeep +0 -0
  172. /package/examples/ionic/{src/images → images}/icon.png +0 -0
  173. /package/examples/{cordova/www → ionic}/images/portrait.png +0 -0
package/www/cordova.js CHANGED
@@ -465,7 +465,7 @@ class CustomizationFonts {
465
465
  }
466
466
 
467
467
  _apply() {
468
- this._set(toJson())
468
+ this._set(this.toJson())
469
469
  }
470
470
  }
471
471
 
@@ -608,7 +608,7 @@ class CustomizationImages {
608
608
  }
609
609
 
610
610
  _apply() {
611
- this._set(toJson())
611
+ this._set(this.toJson())
612
612
  }
613
613
  }
614
614
 
@@ -647,6 +647,14 @@ class Font {
647
647
 
648
648
  return result
649
649
  }
650
+
651
+ toJson() {
652
+ return {
653
+ "name": this.name,
654
+ "size": this.size,
655
+ "style": this.style,
656
+ }
657
+ }
650
658
  }
651
659
 
652
660
  const FontStyle = {
@@ -727,6 +735,18 @@ class DetectFaceResult {
727
735
 
728
736
  return result
729
737
  }
738
+
739
+ toJson() {
740
+ return {
741
+ "quality": this.quality?.map(e => e.toJson()),
742
+ "crop": this.crop,
743
+ "attributes": this.attributes?.map(e => e.toJson()),
744
+ "landmarks": this.landmarks?.map(e => e.toJson()),
745
+ "faceRect": this.faceRect?.toJson(),
746
+ "originalRect": this.originalRect?.toJson(),
747
+ "isQualityCompliant": this.isQualityCompliant,
748
+ }
749
+ }
730
750
  }
731
751
 
732
752
  /***/ }),
@@ -789,6 +809,15 @@ class DetectFacesAttributeResult {
789
809
 
790
810
  return result
791
811
  }
812
+
813
+ toJson() {
814
+ return {
815
+ "attribute": this.attribute,
816
+ "value": this.value,
817
+ "range": this.range?.toJson(),
818
+ "confidence": this.confidence,
819
+ }
820
+ }
792
821
  }
793
822
 
794
823
  /***/ }),
@@ -817,6 +846,13 @@ class DetectFacesBackendException {
817
846
 
818
847
  return result
819
848
  }
849
+
850
+ toJson() {
851
+ return {
852
+ "code": this.code,
853
+ "message": this.message,
854
+ }
855
+ }
820
856
  }
821
857
 
822
858
  const DetectFacesBackendErrorCode = {
@@ -840,6 +876,11 @@ __webpack_require__.r(__webpack_exports__);
840
876
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
841
877
  /* harmony export */ DetectFacesConfig: () => (/* binding */ DetectFacesConfig)
842
878
  /* harmony export */ });
879
+ /* harmony import */ var _image_quality_image_quality_characteristic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../image_quality/image_quality_characteristic */ "./src/image_quality/image_quality_characteristic.js");
880
+ /* harmony import */ var _image_params_output_image_params__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../image_params/output_image_params */ "./src/image_params/output_image_params.js");
881
+
882
+
883
+
843
884
  class DetectFacesConfig {
844
885
  attributes
845
886
  customQuality
@@ -853,6 +894,37 @@ class DetectFacesConfig {
853
894
  this.outputImageParams = params?.outputImageParams
854
895
  this.onlyCentralFace = params?.onlyCentralFace ?? this.onlyCentralFace
855
896
  }
897
+
898
+ static fromJson(jsonObject) {
899
+ if (jsonObject == null) return null
900
+ const result = new DetectFacesConfig()
901
+
902
+ if (jsonObject["attributes"] != null) {
903
+ result.attributes = []
904
+ for (const item of jsonObject["attributes"]) {
905
+ result.attributes.push(item)
906
+ }
907
+ }
908
+ if (jsonObject["customQuality"] != null) {
909
+ result.customQuality = []
910
+ for (const item of jsonObject["customQuality"]) {
911
+ result.customQuality.push(_image_quality_image_quality_characteristic__WEBPACK_IMPORTED_MODULE_0__.ImageQualityCharacteristic.fromJson(item))
912
+ }
913
+ }
914
+ result.outputImageParams = _image_params_output_image_params__WEBPACK_IMPORTED_MODULE_1__.OutputImageParams.fromJson(jsonObject["outputImageParams"])
915
+ result.onlyCentralFace = jsonObject["onlyCentralFace"]
916
+
917
+ return result
918
+ }
919
+
920
+ toJson() {
921
+ return {
922
+ "attributes": this.attributes?.map(e => e),
923
+ "customQuality": this.customQuality?.map(e => e.toJson()),
924
+ "outputImageParams": this.outputImageParams?.toJson(),
925
+ "onlyCentralFace": this.onlyCentralFace,
926
+ }
927
+ }
856
928
  }
857
929
 
858
930
  /***/ }),
@@ -886,6 +958,14 @@ class DetectFacesException {
886
958
 
887
959
  return result
888
960
  }
961
+
962
+ toJson() {
963
+ return {
964
+ "code": this.code,
965
+ "message": this.message,
966
+ "underlyingError": this.underlyingError?.toJson(),
967
+ }
968
+ }
889
969
  }
890
970
 
891
971
  const DetectFacesErrorCode = {
@@ -913,6 +993,8 @@ __webpack_require__.r(__webpack_exports__);
913
993
  /* harmony export */ DetectFacesRequest: () => (/* binding */ DetectFacesRequest)
914
994
  /* harmony export */ });
915
995
  /* harmony import */ var _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./detect_faces_scenario */ "./src/detect_faces/detect_faces_scenario.js");
996
+ /* harmony import */ var _detect_faces_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./detect_faces_config */ "./src/detect_faces/detect_faces_config.js");
997
+
916
998
 
917
999
 
918
1000
  class DetectFacesRequest {
@@ -981,6 +1063,27 @@ class DetectFacesRequest {
981
1063
  result.scenario = _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__.DetectFacesScenario.ATTRIBUTES_ALL
982
1064
  return result
983
1065
  }
1066
+
1067
+ static fromJson(jsonObject) {
1068
+ if (jsonObject == null) return null
1069
+ const result = new DetectFacesRequest()
1070
+
1071
+ result.tag = jsonObject["tag"]
1072
+ result.scenario = jsonObject["scenario"]
1073
+ result.image = jsonObject["image"]
1074
+ result.configuration = _detect_faces_config__WEBPACK_IMPORTED_MODULE_1__.DetectFacesConfig.fromJson(jsonObject["configuration"])
1075
+
1076
+ return result
1077
+ }
1078
+
1079
+ toJson() {
1080
+ return {
1081
+ "tag": this.tag,
1082
+ "scenario": this.scenario,
1083
+ "image": this.image,
1084
+ "configuration": this.configuration?.toJson(),
1085
+ }
1086
+ }
984
1087
  }
985
1088
 
986
1089
  /***/ }),
@@ -1020,6 +1123,15 @@ class DetectFacesResponse {
1020
1123
 
1021
1124
  return result
1022
1125
  }
1126
+
1127
+ toJson() {
1128
+ return {
1129
+ "detection": this.detection?.toJson(),
1130
+ "allDetections": this.allDetections?.map(e => e.toJson()),
1131
+ "scenario": this.scenario,
1132
+ "error": this.error?.toJson(),
1133
+ }
1134
+ }
1023
1135
  }
1024
1136
 
1025
1137
  /***/ }),
@@ -1090,6 +1202,43 @@ class FaceCaptureConfig {
1090
1202
  this.timeout = params?.timeout
1091
1203
  this.holdStillDuration = params?.holdStillDuration
1092
1204
  }
1205
+
1206
+ static fromJson(jsonObject) {
1207
+ if (jsonObject == null) return null
1208
+ const result = new FaceCaptureConfig()
1209
+
1210
+ result.copyright = jsonObject["copyright"]
1211
+ result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"]
1212
+ result.closeButtonEnabled = jsonObject["closeButtonEnabled"]
1213
+ result.torchButtonEnabled = jsonObject["torchButtonEnabled"]
1214
+ result.vibrateOnSteps = jsonObject["vibrateOnSteps"]
1215
+ result.detectOcclusion = jsonObject["detectOcclusion"]
1216
+ result.showFaceAnimation = jsonObject["showFaceAnimation"]
1217
+ result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"]
1218
+ result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
1219
+ result.screenOrientation = jsonObject["screenOrientation"]
1220
+ result.timeout = jsonObject["timeout"]
1221
+ result.holdStillDuration = jsonObject["holdStillDuration"]
1222
+
1223
+ return result
1224
+ }
1225
+
1226
+ toJson() {
1227
+ return {
1228
+ "copyright": this.copyright,
1229
+ "cameraSwitchEnabled": this.cameraSwitchEnabled,
1230
+ "closeButtonEnabled": this.closeButtonEnabled,
1231
+ "torchButtonEnabled": this.torchButtonEnabled,
1232
+ "vibrateOnSteps": this.vibrateOnSteps,
1233
+ "detectOcclusion": this.detectOcclusion,
1234
+ "showFaceAnimation": this.showFaceAnimation,
1235
+ "cameraPositionAndroid": this.cameraPositionAndroid,
1236
+ "cameraPositionIOS": this.cameraPositionIOS,
1237
+ "screenOrientation": this.screenOrientation,
1238
+ "timeout": this.timeout,
1239
+ "holdStillDuration": this.holdStillDuration,
1240
+ }
1241
+ }
1093
1242
  }
1094
1243
 
1095
1244
  /***/ }),
@@ -1118,6 +1267,13 @@ class FaceCaptureException {
1118
1267
 
1119
1268
  return result
1120
1269
  }
1270
+
1271
+ toJson() {
1272
+ return {
1273
+ "code": this.code,
1274
+ "message": this.message,
1275
+ }
1276
+ }
1121
1277
  }
1122
1278
 
1123
1279
  const FaceCaptureErrorCode = {
@@ -1159,6 +1315,14 @@ class FaceCaptureImage {
1159
1315
 
1160
1316
  return result
1161
1317
  }
1318
+
1319
+ toJson() {
1320
+ return {
1321
+ "imageType": this.imageType,
1322
+ "image": this.image,
1323
+ "tag": this.tag,
1324
+ }
1325
+ }
1162
1326
  }
1163
1327
 
1164
1328
  const ImageType = {
@@ -1201,6 +1365,13 @@ class FaceCaptureResponse {
1201
1365
 
1202
1366
  return result
1203
1367
  }
1368
+
1369
+ toJson() {
1370
+ return {
1371
+ "image": this.image?.toJson(),
1372
+ "error": this.error?.toJson(),
1373
+ }
1374
+ }
1204
1375
  }
1205
1376
 
1206
1377
  /***/ }),
@@ -1216,6 +1387,9 @@ __webpack_require__.r(__webpack_exports__);
1216
1387
  /* harmony export */ OutputImageCrop: () => (/* binding */ OutputImageCrop),
1217
1388
  /* harmony export */ OutputImageCropAspectRatio: () => (/* binding */ OutputImageCropAspectRatio)
1218
1389
  /* harmony export */ });
1390
+ /* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./size */ "./src/image_params/size.js");
1391
+
1392
+
1219
1393
  class OutputImageCrop {
1220
1394
  type
1221
1395
  size
@@ -1228,6 +1402,27 @@ class OutputImageCrop {
1228
1402
  this.padColor = params?.padColor
1229
1403
  this.returnOriginalRect = params?.returnOriginalRect ?? false
1230
1404
  }
1405
+
1406
+ static fromJson(jsonObject) {
1407
+ if (jsonObject == null) return null
1408
+ return new OutputImageCrop(
1409
+ jsonObject["type"],
1410
+ {
1411
+ size: _size__WEBPACK_IMPORTED_MODULE_0__.Size.fromJson(jsonObject["size"]),
1412
+ padColor: jsonObject["padColor"],
1413
+ returnOriginalRect: jsonObject["returnOriginalRect"],
1414
+ }
1415
+ )
1416
+ }
1417
+
1418
+ toJson() {
1419
+ return {
1420
+ "type": this.type,
1421
+ "size": this.size?.toJson(),
1422
+ "padColor": this.padColor,
1423
+ "returnOriginalRect": this.returnOriginalRect,
1424
+ }
1425
+ }
1231
1426
  }
1232
1427
 
1233
1428
  const OutputImageCropAspectRatio = {
@@ -1250,6 +1445,9 @@ __webpack_require__.r(__webpack_exports__);
1250
1445
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1251
1446
  /* harmony export */ OutputImageParams: () => (/* binding */ OutputImageParams)
1252
1447
  /* harmony export */ });
1448
+ /* harmony import */ var _output_image_crop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./output_image_crop */ "./src/image_params/output_image_crop.js");
1449
+
1450
+
1253
1451
  class OutputImageParams {
1254
1452
  crop
1255
1453
  backgroundColor
@@ -1258,6 +1456,23 @@ class OutputImageParams {
1258
1456
  this.crop = params?.crop
1259
1457
  this.backgroundColor = params?.backgroundColor
1260
1458
  }
1459
+
1460
+ static fromJson(jsonObject) {
1461
+ if (jsonObject == null) return null
1462
+ const result = new OutputImageParams()
1463
+
1464
+ result.crop = _output_image_crop__WEBPACK_IMPORTED_MODULE_0__.OutputImageCrop.fromJson(jsonObject["crop"])
1465
+ result.backgroundColor = jsonObject["backgroundColor"]
1466
+
1467
+ return result
1468
+ }
1469
+
1470
+ toJson() {
1471
+ return {
1472
+ "crop": this.crop?.toJson(),
1473
+ "backgroundColor": this.backgroundColor,
1474
+ }
1475
+ }
1261
1476
  }
1262
1477
 
1263
1478
  /***/ }),
@@ -1285,6 +1500,13 @@ class Point {
1285
1500
 
1286
1501
  return result
1287
1502
  }
1503
+
1504
+ toJson() {
1505
+ return {
1506
+ "x": this.x,
1507
+ "y": this.y,
1508
+ }
1509
+ }
1288
1510
  }
1289
1511
 
1290
1512
  /***/ }),
@@ -1316,6 +1538,15 @@ class Rect {
1316
1538
 
1317
1539
  return result
1318
1540
  }
1541
+
1542
+ toJson() {
1543
+ return {
1544
+ "left": this.left,
1545
+ "top": this.top,
1546
+ "right": this.right,
1547
+ "bottom": this.bottom,
1548
+ }
1549
+ }
1319
1550
  }
1320
1551
 
1321
1552
  /***/ }),
@@ -1338,6 +1569,18 @@ class Size {
1338
1569
  this.width = width
1339
1570
  this.height = height
1340
1571
  }
1572
+
1573
+ static fromJson(jsonObject) {
1574
+ if (jsonObject == null) return null
1575
+ return new Size(jsonObject["width"], jsonObject["height"])
1576
+ }
1577
+
1578
+ toJson() {
1579
+ return {
1580
+ "width": this.width,
1581
+ "height": this.height,
1582
+ }
1583
+ }
1341
1584
  }
1342
1585
 
1343
1586
  /***/ }),
@@ -1378,6 +1621,28 @@ class ImageQualityCharacteristic {
1378
1621
  this.customRange = _image_quality_range__WEBPACK_IMPORTED_MODULE_0__.ImageQualityRange.withValue(value)
1379
1622
  return this
1380
1623
  }
1624
+
1625
+ static fromJson(jsonObject) {
1626
+ if (jsonObject == null) return null
1627
+
1628
+ return ImageQualityCharacteristic._create(
1629
+ jsonObject["characteristicName"],
1630
+ {
1631
+ recommended: _image_quality_range__WEBPACK_IMPORTED_MODULE_0__.ImageQualityRange.fromJson(jsonObject["recommendedRange"]),
1632
+ custom: _image_quality_range__WEBPACK_IMPORTED_MODULE_0__.ImageQualityRange.fromJson(jsonObject["customRange"]),
1633
+ color: jsonObject["color"],
1634
+ }
1635
+ )
1636
+ }
1637
+
1638
+ toJson() {
1639
+ return {
1640
+ "characteristicName": this.characteristicName,
1641
+ "recommendedRange": this.recommendedRange?.toJson(),
1642
+ "customRange": this.customRange?.toJson(),
1643
+ "color": this.color,
1644
+ }
1645
+ }
1381
1646
  }
1382
1647
 
1383
1648
  /***/ }),
@@ -1845,6 +2110,13 @@ class ImageQualityRange {
1845
2110
 
1846
2111
  return result
1847
2112
  }
2113
+
2114
+ toJson() {
2115
+ return {
2116
+ "min": this.min,
2117
+ "max": this.max,
2118
+ }
2119
+ }
1848
2120
  }
1849
2121
 
1850
2122
  /***/ }),
@@ -1883,6 +2155,16 @@ class ImageQualityResult {
1883
2155
 
1884
2156
  return result
1885
2157
  }
2158
+
2159
+ toJson() {
2160
+ return {
2161
+ "group": this.group,
2162
+ "name": this.name,
2163
+ "status": this.status,
2164
+ "value": this.value,
2165
+ "range": this.range?.toJson(),
2166
+ }
2167
+ }
1886
2168
  }
1887
2169
 
1888
2170
  const ImageQualityGroupName = {
@@ -2163,6 +2445,27 @@ class FaceSDK {
2163
2445
  this._setServiceUrl(val)
2164
2446
  }
2165
2447
 
2448
+ get tenant() { return this._tenant }
2449
+ _tenant = null
2450
+ set tenant(val) {
2451
+ this._tenant = val;
2452
+ this._setTenant(val);
2453
+ }
2454
+
2455
+ get env() { return this._env }
2456
+ _env = null
2457
+ set env(val) {
2458
+ this._env = val;
2459
+ this._setEnv(val);
2460
+ }
2461
+
2462
+ get locale() { return this._locale }
2463
+ _locale = null
2464
+ set locale(val) {
2465
+ this._locale = val;
2466
+ this._setLocale(val);
2467
+ }
2468
+
2166
2469
  get localizationDictionary() { return this._localizationDictionary }
2167
2470
  _localizationDictionary
2168
2471
  set localizationDictionary(val) {
@@ -2254,6 +2557,9 @@ class FaceSDK {
2254
2557
  async _onInit() {
2255
2558
  this._version = await this._getVersion()
2256
2559
  this._serviceUrl = await this._getServiceUrl()
2560
+ this._tenant = await this._getTenant();
2561
+ this._env = await this._getEnv();
2562
+ this._locale = await this._getLocale();
2257
2563
  }
2258
2564
 
2259
2565
  async _getVersion() {
@@ -2269,6 +2575,30 @@ class FaceSDK {
2269
2575
  (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setServiceUrl", [url])
2270
2576
  }
2271
2577
 
2578
+ async _getTenant() {
2579
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getTenant", []);
2580
+ }
2581
+
2582
+ _setTenant(tenant) {
2583
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTenant", [tenant]);
2584
+ }
2585
+
2586
+ async _getEnv() {
2587
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getEnv", []);
2588
+ }
2589
+
2590
+ _setEnv(env) {
2591
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setEnv", [env]);
2592
+ }
2593
+
2594
+ async _getLocale() {
2595
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getLocale", []);
2596
+ }
2597
+
2598
+ _setLocale(locale) {
2599
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setLocale", [locale]);
2600
+ }
2601
+
2272
2602
  _setLocalizationDictionary(dictionary) {
2273
2603
  (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setLocalizationDictionary", [dictionary])
2274
2604
  }
@@ -2306,6 +2636,14 @@ class FaceSDKVersion {
2306
2636
 
2307
2637
  return result
2308
2638
  }
2639
+
2640
+ toJson() {
2641
+ return {
2642
+ "api": this.api,
2643
+ "core": this.core,
2644
+ "coreMode": this.coreMode,
2645
+ }
2646
+ }
2309
2647
  }
2310
2648
 
2311
2649
  /***/ }),
@@ -2336,6 +2674,25 @@ class InitConfig {
2336
2674
  this.licenseUpdate = params?.licenseUpdate
2337
2675
  this.useBleDevice = false
2338
2676
  }
2677
+
2678
+ static fromJson(jsonObject) {
2679
+ if (jsonObject == null) return null
2680
+ const result = new InitConfig()
2681
+
2682
+ result.license = jsonObject["license"]
2683
+ result.licenseUpdate = jsonObject["licenseUpdate"]
2684
+ result.useBleDevice = jsonObject["useBleDevice"]
2685
+
2686
+ return result
2687
+ }
2688
+
2689
+ toJson() {
2690
+ return {
2691
+ "license": this.license,
2692
+ "licenseUpdate": this.licenseUpdate,
2693
+ "useBleDevice": this.useBleDevice,
2694
+ }
2695
+ }
2339
2696
  }
2340
2697
 
2341
2698
  /***/ }),
@@ -2369,6 +2726,14 @@ class InitException {
2369
2726
 
2370
2727
  return result
2371
2728
  }
2729
+
2730
+ toJson() {
2731
+ return {
2732
+ "code": this.code,
2733
+ "message": this.message,
2734
+ "underlyingError": this.underlyingError?.toJson(),
2735
+ }
2736
+ }
2372
2737
  }
2373
2738
 
2374
2739
  const InitErrorCode = {
@@ -2408,6 +2773,13 @@ class LicenseException {
2408
2773
 
2409
2774
  return result
2410
2775
  }
2776
+
2777
+ toJson() {
2778
+ return {
2779
+ "code": this.code,
2780
+ "message": this.message,
2781
+ }
2782
+ }
2411
2783
  }
2412
2784
 
2413
2785
  const LicensingResultCode = {
@@ -2439,6 +2811,7 @@ __webpack_require__.r(__webpack_exports__);
2439
2811
  /* harmony export */ _setCustomButtonTappedCompletion: () => (/* binding */ _setCustomButtonTappedCompletion),
2440
2812
  /* harmony export */ _setLivenessNotificationCompletion: () => (/* binding */ _setLivenessNotificationCompletion),
2441
2813
  /* harmony export */ _setVideoEncoderCompletion: () => (/* binding */ _setVideoEncoderCompletion),
2814
+ /* harmony export */ dateToString: () => (/* binding */ dateToString),
2442
2815
  /* harmony export */ exec: () => (/* binding */ exec)
2443
2816
  /* harmony export */ });
2444
2817
  /* harmony import */ var _liveness_liveness_notification__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../liveness/liveness_notification */ "./src/liveness/liveness_notification.js");
@@ -2484,6 +2857,26 @@ function _setCameraSwitchCallback(completion) {
2484
2857
  _setEvent("cameraSwitchEvent", completion)
2485
2858
  }
2486
2859
 
2860
+ function dateToString(date) {
2861
+ if (date == null) return null
2862
+ const fmt = new Intl.DateTimeFormat('en', {
2863
+ year: 'numeric',
2864
+ month: '2-digit',
2865
+ day: '2-digit',
2866
+ hour: '2-digit',
2867
+ minute: '2-digit',
2868
+ second: '2-digit',
2869
+ fractionalSecondDigits: 3,
2870
+ hour12: false
2871
+ });
2872
+
2873
+ const parts = fmt.formatToParts(date);
2874
+ const get = (t) => parts.find(p => p.type === t)?.value ?? '';
2875
+
2876
+ return `${get('year')}-${get('month')}-${get('day')} ${get('hour')}:${get('minute')}:${get('second')}.${get('fractionalSecond')}`;
2877
+ }
2878
+
2879
+
2487
2880
  /***/ }),
2488
2881
 
2489
2882
  /***/ "./src/internal/cordova.js":
@@ -2541,6 +2934,13 @@ class LivenessBackendException {
2541
2934
 
2542
2935
  return result
2543
2936
  }
2937
+
2938
+ toJson() {
2939
+ return {
2940
+ "code": this.code,
2941
+ "message": this.message,
2942
+ }
2943
+ }
2544
2944
  }
2545
2945
 
2546
2946
  const LivenessBackendErrorCode = {
@@ -2632,6 +3032,49 @@ class LivenessConfig {
2632
3032
  this.skipStep = params?.skipStep ?? []
2633
3033
  this.metadata = params?.metadata
2634
3034
  }
3035
+
3036
+ static fromJson(jsonObject) {
3037
+ if (jsonObject == null) return null
3038
+ const result = new LivenessConfig()
3039
+
3040
+ result.copyright = jsonObject["copyright"]
3041
+ result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"]
3042
+ result.closeButtonEnabled = jsonObject["closeButtonEnabled"]
3043
+ result.torchButtonEnabled = jsonObject["torchButtonEnabled"]
3044
+ result.vibrateOnSteps = jsonObject["vibrateOnSteps"]
3045
+ result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"]
3046
+ result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
3047
+ result.screenOrientation = jsonObject["screenOrientation"]
3048
+ result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
3049
+ result.attemptsCount = jsonObject["attemptsCount"]
3050
+ result.recordingProcess = jsonObject["recordingProcess"]
3051
+ result.livenessType = jsonObject["livenessType"]
3052
+ result.tag = jsonObject["tag"]
3053
+ result.skipStep = jsonObject["skipStep"]
3054
+ result.metadata = jsonObject["metadata"]
3055
+
3056
+ return result
3057
+ }
3058
+
3059
+ toJson() {
3060
+ return {
3061
+ "copyright": this.copyright,
3062
+ "cameraSwitchEnabled": this.cameraSwitchEnabled,
3063
+ "closeButtonEnabled": this.closeButtonEnabled,
3064
+ "torchButtonEnabled": this.torchButtonEnabled,
3065
+ "vibrateOnSteps": this.vibrateOnSteps,
3066
+ "cameraPositionAndroid": this.cameraPositionAndroid,
3067
+ "cameraPositionIOS": this.cameraPositionIOS,
3068
+ "screenOrientation": this.screenOrientation,
3069
+ "locationTrackingEnabled": this.locationTrackingEnabled,
3070
+ "attemptsCount": this.attemptsCount,
3071
+ "recordingProcess": this.recordingProcess,
3072
+ "livenessType": this.livenessType,
3073
+ "tag": this.tag,
3074
+ "skipStep": this.skipStep,
3075
+ "metadata": this.metadata,
3076
+ }
3077
+ }
2635
3078
  }
2636
3079
 
2637
3080
  const RecordingProcess = {
@@ -2681,6 +3124,14 @@ class LivenessException {
2681
3124
 
2682
3125
  return result
2683
3126
  }
3127
+
3128
+ toJson() {
3129
+ return {
3130
+ "code": this.code,
3131
+ "message": this.message,
3132
+ "underlyingError": this.underlyingError?.toJson(),
3133
+ }
3134
+ }
2684
3135
  }
2685
3136
 
2686
3137
  const LivenessErrorCode = {
@@ -2729,6 +3180,13 @@ class LivenessNotification {
2729
3180
 
2730
3181
  return result
2731
3182
  }
3183
+
3184
+ toJson() {
3185
+ return {
3186
+ "status": this.status,
3187
+ "response": this.response?.toJson(),
3188
+ }
3189
+ }
2732
3190
  }
2733
3191
 
2734
3192
  const LivenessProcessStatus = {
@@ -2787,6 +3245,17 @@ class LivenessResponse {
2787
3245
 
2788
3246
  return result
2789
3247
  }
3248
+
3249
+ toJson() {
3250
+ return {
3251
+ "image": this.image,
3252
+ "liveness": this.liveness,
3253
+ "tag": this.tag,
3254
+ "transactionId": this.transactionId,
3255
+ "estimatedAge": this.estimatedAge,
3256
+ "error": this.error?.toJson(),
3257
+ }
3258
+ }
2790
3259
  }
2791
3260
 
2792
3261
  const LivenessStatus = {
@@ -2828,6 +3297,15 @@ class ComparedFace {
2828
3297
 
2829
3298
  return result
2830
3299
  }
3300
+
3301
+ toJson() {
3302
+ return {
3303
+ "imageIndex": this.imageIndex,
3304
+ "image": this.image?.toJson(),
3305
+ "faceIndex": this.faceIndex,
3306
+ "face": this.face?.toJson(),
3307
+ }
3308
+ }
2831
3309
  }
2832
3310
 
2833
3311
  /***/ }),
@@ -2866,6 +3344,16 @@ class ComparedFacesPair {
2866
3344
 
2867
3345
  return result
2868
3346
  }
3347
+
3348
+ toJson() {
3349
+ return {
3350
+ "first": this.first?.toJson(),
3351
+ "second": this.second?.toJson(),
3352
+ "similarity": this.similarity,
3353
+ "score": this.score,
3354
+ "error": this.error?.toJson(),
3355
+ }
3356
+ }
2869
3357
  }
2870
3358
 
2871
3359
  /***/ }),
@@ -2902,6 +3390,13 @@ class ComparedFacesSplit {
2902
3390
 
2903
3391
  return result
2904
3392
  }
3393
+
3394
+ toJson() {
3395
+ return {
3396
+ "matchedFaces": this.matchedFaces?.map(e => e.toJson()),
3397
+ "unmatchedFaces": this.unmatchedFaces?.map(e => e.toJson()),
3398
+ }
3399
+ }
2905
3400
  }
2906
3401
 
2907
3402
  /***/ }),
@@ -2929,6 +3424,13 @@ class MatchFacesBackendException {
2929
3424
 
2930
3425
  return result
2931
3426
  }
3427
+
3428
+ toJson() {
3429
+ return {
3430
+ "code": this.code,
3431
+ "message": this.message,
3432
+ }
3433
+ }
2932
3434
  }
2933
3435
 
2934
3436
  /***/ }),
@@ -2946,9 +3448,28 @@ __webpack_require__.r(__webpack_exports__);
2946
3448
  /* harmony export */ });
2947
3449
  class MatchFacesConfig {
2948
3450
  processingMode
3451
+ locationTrackingEnabled
2949
3452
 
2950
3453
  constructor(params) {
2951
3454
  this.processingMode = params?.processingMode ?? ProcessingMode.ONLINE
3455
+ this.locationTrackingEnabled = params?.locationTrackingEnabled ?? true
3456
+ }
3457
+
3458
+ static fromJson(jsonObject) {
3459
+ if (jsonObject == null) return null
3460
+ const result = new MatchFacesConfig()
3461
+
3462
+ result.processingMode = jsonObject["processingMode"]
3463
+ result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
3464
+
3465
+ return result
3466
+ }
3467
+
3468
+ toJson() {
3469
+ return {
3470
+ "processingMode": this.processingMode,
3471
+ "locationTrackingEnabled": this.locationTrackingEnabled,
3472
+ }
2952
3473
  }
2953
3474
  }
2954
3475
 
@@ -2996,6 +3517,15 @@ class MatchFacesDetection {
2996
3517
 
2997
3518
  return result
2998
3519
  }
3520
+
3521
+ toJson() {
3522
+ return {
3523
+ "imageIndex": this.imageIndex,
3524
+ "image": this.image?.toJson(),
3525
+ "faces": this.faces?.map(e => e.toJson()),
3526
+ "error": this.error?.toJson(),
3527
+ }
3528
+ }
2999
3529
  }
3000
3530
 
3001
3531
  /***/ }),
@@ -3039,6 +3569,17 @@ class MatchFacesDetectionFace {
3039
3569
 
3040
3570
  return result
3041
3571
  }
3572
+
3573
+ toJson() {
3574
+ return {
3575
+ "faceIndex": this.faceIndex,
3576
+ "landmarks": this.landmarks?.map(e => e.toJson()),
3577
+ "faceRect": this.faceRect?.toJson(),
3578
+ "rotationAngle": this.rotationAngle,
3579
+ "originalRect": this.originalRect?.toJson(),
3580
+ "crop": this.crop,
3581
+ }
3582
+ }
3042
3583
  }
3043
3584
 
3044
3585
  /***/ }),
@@ -3072,6 +3613,14 @@ class MatchFacesException {
3072
3613
 
3073
3614
  return result
3074
3615
  }
3616
+
3617
+ toJson() {
3618
+ return {
3619
+ "code": this.code,
3620
+ "message": this.message,
3621
+ "underlyingError": this.underlyingError?.toJson(),
3622
+ }
3623
+ }
3075
3624
  }
3076
3625
 
3077
3626
  const MatchFacesErrorCode = {
@@ -3122,6 +3671,15 @@ class MatchFacesImage {
3122
3671
 
3123
3672
  return result
3124
3673
  }
3674
+
3675
+ toJson() {
3676
+ return {
3677
+ "image": this.image,
3678
+ "imageType": this.imageType,
3679
+ "detectAll": this.detectAll,
3680
+ "identifier": this.identifier,
3681
+ }
3682
+ }
3125
3683
  }
3126
3684
 
3127
3685
  /***/ }),
@@ -3136,6 +3694,11 @@ __webpack_require__.r(__webpack_exports__);
3136
3694
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3137
3695
  /* harmony export */ MatchFacesRequest: () => (/* binding */ MatchFacesRequest)
3138
3696
  /* harmony export */ });
3697
+ /* harmony import */ var _image_params_output_image_params__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../image_params/output_image_params */ "./src/image_params/output_image_params.js");
3698
+ /* harmony import */ var _match_faces_image__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./match_faces_image */ "./src/match_faces/match_faces_image.js");
3699
+
3700
+
3701
+
3139
3702
  class MatchFacesRequest {
3140
3703
  images
3141
3704
  outputImageParams
@@ -3148,6 +3711,30 @@ class MatchFacesRequest {
3148
3711
  this.tag = params?.tag
3149
3712
  this.metadata = params?.metadata
3150
3713
  }
3714
+
3715
+ static fromJson(jsonObject) {
3716
+ if (jsonObject == null) return null
3717
+
3718
+ const images = []
3719
+ for (const item of jsonObject["images"]) {
3720
+ images.push(_match_faces_image__WEBPACK_IMPORTED_MODULE_1__.MatchFacesImage.fromJson(item))
3721
+ }
3722
+
3723
+ return new MatchFacesRequest(images, {
3724
+ outputImageParams: _image_params_output_image_params__WEBPACK_IMPORTED_MODULE_0__.OutputImageParams.fromJson(jsonObject["outputImageParams"]),
3725
+ tag: jsonObject["tag"],
3726
+ metadata: jsonObject["metadata"],
3727
+ })
3728
+ }
3729
+
3730
+ toJson() {
3731
+ return {
3732
+ "images": this.images?.map(e => e.toJson()),
3733
+ "outputImageParams": this.outputImageParams?.toJson(),
3734
+ "tag": this.tag,
3735
+ "metadata": this.metadata,
3736
+ }
3737
+ }
3151
3738
  }
3152
3739
 
3153
3740
  /***/ }),
@@ -3192,6 +3779,15 @@ class MatchFacesResponse {
3192
3779
 
3193
3780
  return result
3194
3781
  }
3782
+
3783
+ toJson() {
3784
+ return {
3785
+ "results": this.results?.map(e => e.toJson()),
3786
+ "detections": this.detections?.map(e => e.toJson()),
3787
+ "tag": this.tag,
3788
+ "error": this.error?.toJson(),
3789
+ }
3790
+ }
3195
3791
  }
3196
3792
 
3197
3793
  /***/ }),
@@ -3214,6 +3810,21 @@ class EditGroupPersonsRequest {
3214
3810
  this.personIdsToAdd = params?.personIdsToAdd
3215
3811
  this.personIdsToRemove = params?.personIdsToRemove
3216
3812
  }
3813
+
3814
+ static fromJson(jsonObject) {
3815
+ if (jsonObject == null) return null
3816
+ return new EditGroupPersonsRequest({
3817
+ personIdsToAdd: jsonObject["personIdsToAdd"],
3818
+ personIdsToRemove: jsonObject["personIdsToRemove"],
3819
+ })
3820
+ }
3821
+
3822
+ toJson() {
3823
+ return {
3824
+ "personIdsToAdd": this.personIdsToAdd,
3825
+ "personIdsToRemove": this.personIdsToRemove,
3826
+ }
3827
+ }
3217
3828
  }
3218
3829
 
3219
3830
 
@@ -3244,6 +3855,23 @@ class ImageUpload {
3244
3855
  result.imageUrl = imageUrl
3245
3856
  return result
3246
3857
  }
3858
+
3859
+ static fromJson(jsonObject) {
3860
+ if (jsonObject == null) return null
3861
+ var result = new ImageUpload()
3862
+
3863
+ result.imageData = jsonObject["imageData"]
3864
+ result.imageUrl = jsonObject["imageUrl"]
3865
+
3866
+ return result
3867
+ }
3868
+
3869
+ toJson() {
3870
+ return {
3871
+ "imageData": this.imageData,
3872
+ "imageUrl": this.imageUrl,
3873
+ }
3874
+ }
3247
3875
  }
3248
3876
 
3249
3877
 
@@ -3280,6 +3908,14 @@ class PageableItemList {
3280
3908
 
3281
3909
  return result
3282
3910
  }
3911
+
3912
+ toJson() {
3913
+ return {
3914
+ "items": this.items?.map(e => e.toJson()),
3915
+ "page": this.page,
3916
+ "totalPages": this.totalPages,
3917
+ }
3918
+ }
3283
3919
  }
3284
3920
 
3285
3921
 
@@ -3295,6 +3931,9 @@ __webpack_require__.r(__webpack_exports__);
3295
3931
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3296
3932
  /* harmony export */ Person: () => (/* binding */ Person)
3297
3933
  /* harmony export */ });
3934
+ /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js");
3935
+
3936
+
3298
3937
  class Person {
3299
3938
  name
3300
3939
  updatedAt
@@ -3316,6 +3955,17 @@ class Person {
3316
3955
 
3317
3956
  return result
3318
3957
  }
3958
+
3959
+ toJson() {
3960
+ return {
3961
+ "name": this.name,
3962
+ "updatedAt": (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.dateToString)(this.updatedAt),
3963
+ "groups": this.groups,
3964
+ "id": this.id,
3965
+ "metadata": this.metadata,
3966
+ "createdAt": (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.dateToString)(this.createdAt),
3967
+ }
3968
+ }
3319
3969
  }
3320
3970
 
3321
3971
 
@@ -3496,6 +4146,9 @@ __webpack_require__.r(__webpack_exports__);
3496
4146
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3497
4147
  /* harmony export */ PersonGroup: () => (/* binding */ PersonGroup)
3498
4148
  /* harmony export */ });
4149
+ /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js");
4150
+
4151
+
3499
4152
  class PersonGroup {
3500
4153
  name
3501
4154
  id
@@ -3513,6 +4166,15 @@ class PersonGroup {
3513
4166
 
3514
4167
  return result
3515
4168
  }
4169
+
4170
+ toJson() {
4171
+ return {
4172
+ "name": this.name,
4173
+ "id": this.id,
4174
+ "metadata": this.metadata,
4175
+ "createdAt": (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.dateToString)(this.createdAt),
4176
+ }
4177
+ }
3516
4178
  }
3517
4179
 
3518
4180
 
@@ -3528,6 +4190,9 @@ __webpack_require__.r(__webpack_exports__);
3528
4190
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3529
4191
  /* harmony export */ PersonImage: () => (/* binding */ PersonImage)
3530
4192
  /* harmony export */ });
4193
+ /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js");
4194
+
4195
+
3531
4196
  class PersonImage {
3532
4197
  path
3533
4198
  url
@@ -3549,6 +4214,17 @@ class PersonImage {
3549
4214
 
3550
4215
  return result
3551
4216
  }
4217
+
4218
+ toJson() {
4219
+ return {
4220
+ "path": this.path,
4221
+ "url": this.url,
4222
+ "contentType": this.contentType,
4223
+ "id": this.id,
4224
+ "metadata": this.metadata,
4225
+ "createdAt": (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.dateToString)(this.createdAt),
4226
+ }
4227
+ }
3552
4228
  }
3553
4229
 
3554
4230
 
@@ -3564,8 +4240,10 @@ __webpack_require__.r(__webpack_exports__);
3564
4240
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3565
4241
  /* harmony export */ SearchPerson: () => (/* binding */ SearchPerson)
3566
4242
  /* harmony export */ });
3567
- /* harmony import */ var _search_person_image__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./search_person_image */ "./src/person_database/search_person_image.js");
3568
- /* harmony import */ var _search_person_detection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./search_person_detection */ "./src/person_database/search_person_detection.js");
4243
+ /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js");
4244
+ /* harmony import */ var _search_person_image__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./search_person_image */ "./src/person_database/search_person_image.js");
4245
+ /* harmony import */ var _search_person_detection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./search_person_detection */ "./src/person_database/search_person_detection.js");
4246
+
3569
4247
 
3570
4248
 
3571
4249
 
@@ -3585,8 +4263,8 @@ class SearchPerson {
3585
4263
 
3586
4264
  if (jsonObject["images"] != null)
3587
4265
  for (var item of jsonObject["images"])
3588
- result.images.push(_search_person_image__WEBPACK_IMPORTED_MODULE_0__.SearchPersonImage.fromJson(item))
3589
- result.detection = _search_person_detection__WEBPACK_IMPORTED_MODULE_1__.SearchPersonDetection.fromJson(jsonObject["detection"])
4266
+ result.images.push(_search_person_image__WEBPACK_IMPORTED_MODULE_1__.SearchPersonImage.fromJson(item))
4267
+ result.detection = _search_person_detection__WEBPACK_IMPORTED_MODULE_2__.SearchPersonDetection.fromJson(jsonObject["detection"])
3590
4268
  result.name = jsonObject["name"]
3591
4269
  result.updatedAt = new Date(jsonObject["updatedAt"])
3592
4270
  result.groups = jsonObject["groups"]
@@ -3596,6 +4274,19 @@ class SearchPerson {
3596
4274
 
3597
4275
  return result
3598
4276
  }
4277
+
4278
+ toJson() {
4279
+ return {
4280
+ "images": this.images?.map(e => e.toJson()),
4281
+ "detection": this.detection?.toJson(),
4282
+ "name": this.name,
4283
+ "updatedAt": (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.dateToString)(this.updatedAt),
4284
+ "groups": this.groups,
4285
+ "id": this.id,
4286
+ "metadata": this.metadata,
4287
+ "createdAt": (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.dateToString)(this.createdAt),
4288
+ }
4289
+ }
3599
4290
  }
3600
4291
 
3601
4292
 
@@ -3634,6 +4325,15 @@ class SearchPersonDetection {
3634
4325
 
3635
4326
  return result
3636
4327
  }
4328
+
4329
+ toJson() {
4330
+ return {
4331
+ "landmarks": this.landmarks?.map(e => e.toJson()),
4332
+ "rect": this.rect?.toJson(),
4333
+ "crop": this.crop,
4334
+ "rotationAngle": this.rotationAngle,
4335
+ }
4336
+ }
3637
4337
  }
3638
4338
 
3639
4339
 
@@ -3649,6 +4349,9 @@ __webpack_require__.r(__webpack_exports__);
3649
4349
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3650
4350
  /* harmony export */ SearchPersonImage: () => (/* binding */ SearchPersonImage)
3651
4351
  /* harmony export */ });
4352
+ /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js");
4353
+
4354
+
3652
4355
  class SearchPersonImage {
3653
4356
  similarity
3654
4357
  distance
@@ -3674,6 +4377,19 @@ class SearchPersonImage {
3674
4377
 
3675
4378
  return result
3676
4379
  }
4380
+
4381
+ toJson() {
4382
+ return {
4383
+ "similarity": this.similarity,
4384
+ "distance": this.distance,
4385
+ "path": this.path,
4386
+ "url": this.url,
4387
+ "contentType": this.contentType,
4388
+ "id": this.id,
4389
+ "metadata": this.metadata,
4390
+ "createdAt": (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.dateToString)(this.createdAt),
4391
+ }
4392
+ }
3677
4393
  }
3678
4394
 
3679
4395
 
@@ -3689,11 +4405,17 @@ __webpack_require__.r(__webpack_exports__);
3689
4405
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3690
4406
  /* harmony export */ SearchPersonRequest: () => (/* binding */ SearchPersonRequest)
3691
4407
  /* harmony export */ });
4408
+ /* harmony import */ var _image_params_output_image_params__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../image_params/output_image_params */ "./src/image_params/output_image_params.js");
4409
+ /* harmony import */ var _image_upload__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./image_upload */ "./src/person_database/image_upload.js");
4410
+
4411
+
4412
+
3692
4413
  class SearchPersonRequest {
3693
4414
  imageUpload
3694
4415
  groupIdsForSearch
3695
4416
  threshold
3696
4417
  limit
4418
+ tag
3697
4419
  detectAll
3698
4420
  outputImageParams
3699
4421
 
@@ -3702,9 +4424,34 @@ class SearchPersonRequest {
3702
4424
  this.groupIdsForSearch = params?.groupIdsForSearch
3703
4425
  this.threshold = params?.threshold
3704
4426
  this.limit = params?.limit
4427
+ this.tag = params?.tag
3705
4428
  this.detectAll = params?.detectAll ?? false
3706
4429
  this.outputImageParams = params?.outputImageParams
3707
4430
  }
4431
+
4432
+ static fromJson(jsonObject) {
4433
+ if (jsonObject == null) return null
4434
+ return new SearchPersonRequest(_image_upload__WEBPACK_IMPORTED_MODULE_1__.ImageUpload.fromJson(jsonObject["imageUpload"]), {
4435
+ groupIdsForSearch: jsonObject["groupIdsForSearch"],
4436
+ threshold: jsonObject["threshold"],
4437
+ limit: jsonObject["limit"],
4438
+ tag: jsonObject["tag"],
4439
+ detectAll: jsonObject["detectAll"],
4440
+ outputImageParams: _image_params_output_image_params__WEBPACK_IMPORTED_MODULE_0__.OutputImageParams.fromJson(jsonObject["outputImageParams"]),
4441
+ })
4442
+ }
4443
+
4444
+ toJson() {
4445
+ return {
4446
+ "imageUpload": this.imageUpload?.toJson(),
4447
+ "groupIdsForSearch": this.groupIdsForSearch,
4448
+ "threshold": this.threshold,
4449
+ "limit": this.limit,
4450
+ "tag": this.tag,
4451
+ "detectAll": this.detectAll,
4452
+ "outputImageParams": this.outputImageParams?.toJson(),
4453
+ }
4454
+ }
3708
4455
  }
3709
4456
 
3710
4457