@regulaforensics/face-sdk 7.1.432-nightly → 7.1.439-nightly

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) 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/examples/capacitor/android/app/src/main/AndroidManifest.xml +2 -2
  6. package/examples/capacitor/index.html +2 -7
  7. package/examples/capacitor/index.tsx +53 -0
  8. package/examples/capacitor/package-lock.json +12 -162
  9. package/examples/capacitor/package.json +4 -4
  10. package/examples/capacitor/scripts/setup.sh +4 -2
  11. package/examples/capacitor/src/main.css +60 -6
  12. package/examples/capacitor/src/main.html +1 -1
  13. package/examples/capacitor/src/main.tsx +51 -87
  14. package/examples/ionic/README.md +1 -1
  15. package/examples/ionic/angular.json +3 -3
  16. package/examples/ionic/config.xml +4 -2
  17. package/examples/ionic/index.tsx +68 -0
  18. package/examples/ionic/package-lock.json +42 -68
  19. package/examples/ionic/package.json +2 -2
  20. package/examples/ionic/src/main.css +60 -6
  21. package/examples/ionic/src/main.html +1 -1
  22. package/examples/ionic/src/{main.ts → main.tsx} +52 -97
  23. package/examples/ionic/tsconfig.json +3 -2
  24. package/examples/react_native/README.md +1 -0
  25. package/examples/react_native/app.config.ts +1 -1
  26. package/examples/react_native/index.tsx +49 -7
  27. package/examples/react_native/package-lock.json +594 -597
  28. package/examples/react_native/package.json +9 -9
  29. package/examples/react_native/src/main.css +60 -6
  30. package/examples/react_native/src/main.html +1 -1
  31. package/examples/react_native/src/main.tsx +54 -77
  32. package/package.json +1 -1
  33. package/plugin.xml +2 -2
  34. package/test/json.tsx +375 -0
  35. package/test/package-lock.json +584 -0
  36. package/test/package.json +9 -0
  37. package/test/test.tsx +61 -0
  38. package/test/utils.tsx +38 -0
  39. package/www/capacitor/customization/customization_fonts.js +1 -1
  40. package/www/capacitor/customization/customization_images.js +1 -1
  41. package/www/capacitor/customization/font.js +8 -0
  42. package/www/capacitor/detect_faces/detect_face_result.js +12 -0
  43. package/www/capacitor/detect_faces/detect_faces_attribute_result.js +9 -0
  44. package/www/capacitor/detect_faces/detect_faces_backend_exception.js +7 -0
  45. package/www/capacitor/detect_faces/detect_faces_config.js +34 -0
  46. package/www/capacitor/detect_faces/detect_faces_exception.js +8 -0
  47. package/www/capacitor/detect_faces/detect_faces_request.js +22 -0
  48. package/www/capacitor/detect_faces/detect_faces_response.js +9 -0
  49. package/www/capacitor/face_capture/face_capture_config.js +37 -0
  50. package/www/capacitor/face_capture/face_capture_exception.js +7 -0
  51. package/www/capacitor/face_capture/face_capture_image.js +8 -0
  52. package/www/capacitor/face_capture/face_capture_response.js +7 -0
  53. package/www/capacitor/image_params/output_image_crop.js +23 -0
  54. package/www/capacitor/image_params/output_image_params.js +19 -0
  55. package/www/capacitor/image_params/point.js +7 -0
  56. package/www/capacitor/image_params/rect.js +9 -0
  57. package/www/capacitor/image_params/size.js +12 -0
  58. package/www/capacitor/image_quality/image_quality_characteristic.js +22 -0
  59. package/www/capacitor/image_quality/image_quality_range.js +7 -0
  60. package/www/capacitor/image_quality/image_quality_result.js +10 -0
  61. package/www/capacitor/init/face_sdk_version.js +8 -0
  62. package/www/capacitor/init/init_config.js +19 -0
  63. package/www/capacitor/init/init_exception.js +8 -0
  64. package/www/capacitor/init/license_exception.js +7 -0
  65. package/www/capacitor/internal/bridge.js +20 -1
  66. package/www/capacitor/liveness/liveness_backend_exception.js +7 -0
  67. package/www/capacitor/liveness/liveness_config.js +43 -0
  68. package/www/capacitor/liveness/liveness_exception.js +8 -0
  69. package/www/capacitor/liveness/liveness_notification.js +7 -0
  70. package/www/capacitor/liveness/liveness_response.js +11 -0
  71. package/www/capacitor/match_faces/compared_face.js +9 -0
  72. package/www/capacitor/match_faces/compared_faces_pair.js +10 -0
  73. package/www/capacitor/match_faces/compared_faces_split.js +7 -0
  74. package/www/capacitor/match_faces/match_faces_backend_exception.js +7 -0
  75. package/www/capacitor/match_faces/match_faces_config.js +19 -0
  76. package/www/capacitor/match_faces/match_faces_detection.js +9 -0
  77. package/www/capacitor/match_faces/match_faces_detection_face.js +11 -0
  78. package/www/capacitor/match_faces/match_faces_exception.js +8 -0
  79. package/www/capacitor/match_faces/match_faces_image.js +9 -0
  80. package/www/capacitor/match_faces/match_faces_request.js +27 -0
  81. package/www/capacitor/match_faces/match_faces_response.js +9 -0
  82. package/www/capacitor/person_database/edit_group_persons_request.js +15 -0
  83. package/www/capacitor/person_database/image_upload.js +17 -0
  84. package/www/capacitor/person_database/pageable_item_list.js +8 -0
  85. package/www/capacitor/person_database/person.js +13 -0
  86. package/www/capacitor/person_database/person_group.js +11 -0
  87. package/www/capacitor/person_database/person_image.js +13 -0
  88. package/www/capacitor/person_database/search_person.js +14 -0
  89. package/www/capacitor/person_database/search_person_detection.js +9 -0
  90. package/www/capacitor/person_database/search_person_image.js +15 -0
  91. package/www/capacitor/person_database/search_person_request.js +27 -0
  92. package/www/cordova.js +703 -6
  93. package/www/react-native/customization/customization_fonts.js +1 -1
  94. package/www/react-native/customization/customization_images.js +1 -1
  95. package/www/react-native/customization/font.js +8 -0
  96. package/www/react-native/detect_faces/detect_face_result.js +12 -0
  97. package/www/react-native/detect_faces/detect_faces_attribute_result.js +9 -0
  98. package/www/react-native/detect_faces/detect_faces_backend_exception.js +7 -0
  99. package/www/react-native/detect_faces/detect_faces_config.js +34 -0
  100. package/www/react-native/detect_faces/detect_faces_exception.js +8 -0
  101. package/www/react-native/detect_faces/detect_faces_request.js +22 -0
  102. package/www/react-native/detect_faces/detect_faces_response.js +9 -0
  103. package/www/react-native/face_capture/face_capture_config.js +37 -0
  104. package/www/react-native/face_capture/face_capture_exception.js +7 -0
  105. package/www/react-native/face_capture/face_capture_image.js +8 -0
  106. package/www/react-native/face_capture/face_capture_response.js +7 -0
  107. package/www/react-native/image_params/output_image_crop.js +23 -0
  108. package/www/react-native/image_params/output_image_params.js +19 -0
  109. package/www/react-native/image_params/point.js +7 -0
  110. package/www/react-native/image_params/rect.js +9 -0
  111. package/www/react-native/image_params/size.js +12 -0
  112. package/www/react-native/image_quality/image_quality_characteristic.js +22 -0
  113. package/www/react-native/image_quality/image_quality_range.js +7 -0
  114. package/www/react-native/image_quality/image_quality_result.js +10 -0
  115. package/www/react-native/init/face_sdk_version.js +8 -0
  116. package/www/react-native/init/init_config.js +19 -0
  117. package/www/react-native/init/init_exception.js +8 -0
  118. package/www/react-native/init/license_exception.js +7 -0
  119. package/www/react-native/internal/bridge.js +20 -1
  120. package/www/react-native/liveness/liveness_backend_exception.js +7 -0
  121. package/www/react-native/liveness/liveness_config.js +43 -0
  122. package/www/react-native/liveness/liveness_exception.js +8 -0
  123. package/www/react-native/liveness/liveness_notification.js +7 -0
  124. package/www/react-native/liveness/liveness_response.js +11 -0
  125. package/www/react-native/match_faces/compared_face.js +9 -0
  126. package/www/react-native/match_faces/compared_faces_pair.js +10 -0
  127. package/www/react-native/match_faces/compared_faces_split.js +7 -0
  128. package/www/react-native/match_faces/match_faces_backend_exception.js +7 -0
  129. package/www/react-native/match_faces/match_faces_config.js +19 -0
  130. package/www/react-native/match_faces/match_faces_detection.js +9 -0
  131. package/www/react-native/match_faces/match_faces_detection_face.js +11 -0
  132. package/www/react-native/match_faces/match_faces_exception.js +8 -0
  133. package/www/react-native/match_faces/match_faces_image.js +9 -0
  134. package/www/react-native/match_faces/match_faces_request.js +27 -0
  135. package/www/react-native/match_faces/match_faces_response.js +9 -0
  136. package/www/react-native/person_database/edit_group_persons_request.js +15 -0
  137. package/www/react-native/person_database/image_upload.js +17 -0
  138. package/www/react-native/person_database/pageable_item_list.js +8 -0
  139. package/www/react-native/person_database/person.js +13 -0
  140. package/www/react-native/person_database/person_group.js +11 -0
  141. package/www/react-native/person_database/person_image.js +13 -0
  142. package/www/react-native/person_database/search_person.js +14 -0
  143. package/www/react-native/person_database/search_person_detection.js +9 -0
  144. package/www/react-native/person_database/search_person_image.js +15 -0
  145. package/www/react-native/person_database/search_person_request.js +27 -0
  146. package/www/types/match_faces/match_faces_config.d.ts +2 -0
  147. package/examples/cordova/.vscode/launch.json +0 -28
  148. package/examples/cordova/README.md +0 -25
  149. package/examples/cordova/config.xml +0 -26
  150. package/examples/cordova/package-lock.json +0 -1327
  151. package/examples/cordova/package.json +0 -30
  152. package/examples/cordova/scripts/android.sh +0 -8
  153. package/examples/cordova/scripts/ios.sh +0 -8
  154. package/examples/cordova/scripts/setup.sh +0 -8
  155. package/examples/cordova/www/images/logo.png +0 -0
  156. package/examples/cordova/www/index.html +0 -21
  157. package/examples/cordova/www/src/main.css +0 -83
  158. package/examples/cordova/www/src/main.html +0 -25
  159. package/examples/cordova/www/src/main.js +0 -152
  160. package/examples/ionic/index.ts +0 -17
  161. package/examples/ionic/src/images/portrait.png +0 -0
  162. /package/examples/ionic/{src/assets → assets}/.gitkeep +0 -0
  163. /package/examples/ionic/{src/images → images}/icon.png +0 -0
  164. /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 = {
@@ -2354,6 +2636,14 @@ class FaceSDKVersion {
2354
2636
 
2355
2637
  return result
2356
2638
  }
2639
+
2640
+ toJson() {
2641
+ return {
2642
+ "api": this.api,
2643
+ "core": this.core,
2644
+ "coreMode": this.coreMode,
2645
+ }
2646
+ }
2357
2647
  }
2358
2648
 
2359
2649
  /***/ }),
@@ -2384,6 +2674,25 @@ class InitConfig {
2384
2674
  this.licenseUpdate = params?.licenseUpdate
2385
2675
  this.useBleDevice = false
2386
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
+ }
2387
2696
  }
2388
2697
 
2389
2698
  /***/ }),
@@ -2417,6 +2726,14 @@ class InitException {
2417
2726
 
2418
2727
  return result
2419
2728
  }
2729
+
2730
+ toJson() {
2731
+ return {
2732
+ "code": this.code,
2733
+ "message": this.message,
2734
+ "underlyingError": this.underlyingError?.toJson(),
2735
+ }
2736
+ }
2420
2737
  }
2421
2738
 
2422
2739
  const InitErrorCode = {
@@ -2456,6 +2773,13 @@ class LicenseException {
2456
2773
 
2457
2774
  return result
2458
2775
  }
2776
+
2777
+ toJson() {
2778
+ return {
2779
+ "code": this.code,
2780
+ "message": this.message,
2781
+ }
2782
+ }
2459
2783
  }
2460
2784
 
2461
2785
  const LicensingResultCode = {
@@ -2487,6 +2811,7 @@ __webpack_require__.r(__webpack_exports__);
2487
2811
  /* harmony export */ _setCustomButtonTappedCompletion: () => (/* binding */ _setCustomButtonTappedCompletion),
2488
2812
  /* harmony export */ _setLivenessNotificationCompletion: () => (/* binding */ _setLivenessNotificationCompletion),
2489
2813
  /* harmony export */ _setVideoEncoderCompletion: () => (/* binding */ _setVideoEncoderCompletion),
2814
+ /* harmony export */ dateToString: () => (/* binding */ dateToString),
2490
2815
  /* harmony export */ exec: () => (/* binding */ exec)
2491
2816
  /* harmony export */ });
2492
2817
  /* harmony import */ var _liveness_liveness_notification__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../liveness/liveness_notification */ "./src/liveness/liveness_notification.js");
@@ -2532,6 +2857,26 @@ function _setCameraSwitchCallback(completion) {
2532
2857
  _setEvent("cameraSwitchEvent", completion)
2533
2858
  }
2534
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
+
2535
2880
  /***/ }),
2536
2881
 
2537
2882
  /***/ "./src/internal/cordova.js":
@@ -2589,6 +2934,13 @@ class LivenessBackendException {
2589
2934
 
2590
2935
  return result
2591
2936
  }
2937
+
2938
+ toJson() {
2939
+ return {
2940
+ "code": this.code,
2941
+ "message": this.message,
2942
+ }
2943
+ }
2592
2944
  }
2593
2945
 
2594
2946
  const LivenessBackendErrorCode = {
@@ -2680,6 +3032,49 @@ class LivenessConfig {
2680
3032
  this.skipStep = params?.skipStep ?? []
2681
3033
  this.metadata = params?.metadata
2682
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
+ }
2683
3078
  }
2684
3079
 
2685
3080
  const RecordingProcess = {
@@ -2729,6 +3124,14 @@ class LivenessException {
2729
3124
 
2730
3125
  return result
2731
3126
  }
3127
+
3128
+ toJson() {
3129
+ return {
3130
+ "code": this.code,
3131
+ "message": this.message,
3132
+ "underlyingError": this.underlyingError?.toJson(),
3133
+ }
3134
+ }
2732
3135
  }
2733
3136
 
2734
3137
  const LivenessErrorCode = {
@@ -2777,6 +3180,13 @@ class LivenessNotification {
2777
3180
 
2778
3181
  return result
2779
3182
  }
3183
+
3184
+ toJson() {
3185
+ return {
3186
+ "status": this.status,
3187
+ "response": this.response?.toJson(),
3188
+ }
3189
+ }
2780
3190
  }
2781
3191
 
2782
3192
  const LivenessProcessStatus = {
@@ -2835,6 +3245,17 @@ class LivenessResponse {
2835
3245
 
2836
3246
  return result
2837
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
+ }
2838
3259
  }
2839
3260
 
2840
3261
  const LivenessStatus = {
@@ -2876,6 +3297,15 @@ class ComparedFace {
2876
3297
 
2877
3298
  return result
2878
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
+ }
2879
3309
  }
2880
3310
 
2881
3311
  /***/ }),
@@ -2914,6 +3344,16 @@ class ComparedFacesPair {
2914
3344
 
2915
3345
  return result
2916
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
+ }
2917
3357
  }
2918
3358
 
2919
3359
  /***/ }),
@@ -2950,6 +3390,13 @@ class ComparedFacesSplit {
2950
3390
 
2951
3391
  return result
2952
3392
  }
3393
+
3394
+ toJson() {
3395
+ return {
3396
+ "matchedFaces": this.matchedFaces?.map(e => e.toJson()),
3397
+ "unmatchedFaces": this.unmatchedFaces?.map(e => e.toJson()),
3398
+ }
3399
+ }
2953
3400
  }
2954
3401
 
2955
3402
  /***/ }),
@@ -2977,6 +3424,13 @@ class MatchFacesBackendException {
2977
3424
 
2978
3425
  return result
2979
3426
  }
3427
+
3428
+ toJson() {
3429
+ return {
3430
+ "code": this.code,
3431
+ "message": this.message,
3432
+ }
3433
+ }
2980
3434
  }
2981
3435
 
2982
3436
  /***/ }),
@@ -2994,9 +3448,28 @@ __webpack_require__.r(__webpack_exports__);
2994
3448
  /* harmony export */ });
2995
3449
  class MatchFacesConfig {
2996
3450
  processingMode
3451
+ locationTrackingEnabled
2997
3452
 
2998
3453
  constructor(params) {
2999
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
+ }
3000
3473
  }
3001
3474
  }
3002
3475
 
@@ -3044,6 +3517,15 @@ class MatchFacesDetection {
3044
3517
 
3045
3518
  return result
3046
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
+ }
3047
3529
  }
3048
3530
 
3049
3531
  /***/ }),
@@ -3087,6 +3569,17 @@ class MatchFacesDetectionFace {
3087
3569
 
3088
3570
  return result
3089
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
+ }
3090
3583
  }
3091
3584
 
3092
3585
  /***/ }),
@@ -3120,6 +3613,14 @@ class MatchFacesException {
3120
3613
 
3121
3614
  return result
3122
3615
  }
3616
+
3617
+ toJson() {
3618
+ return {
3619
+ "code": this.code,
3620
+ "message": this.message,
3621
+ "underlyingError": this.underlyingError?.toJson(),
3622
+ }
3623
+ }
3123
3624
  }
3124
3625
 
3125
3626
  const MatchFacesErrorCode = {
@@ -3170,6 +3671,15 @@ class MatchFacesImage {
3170
3671
 
3171
3672
  return result
3172
3673
  }
3674
+
3675
+ toJson() {
3676
+ return {
3677
+ "image": this.image,
3678
+ "imageType": this.imageType,
3679
+ "detectAll": this.detectAll,
3680
+ "identifier": this.identifier,
3681
+ }
3682
+ }
3173
3683
  }
3174
3684
 
3175
3685
  /***/ }),
@@ -3184,6 +3694,11 @@ __webpack_require__.r(__webpack_exports__);
3184
3694
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3185
3695
  /* harmony export */ MatchFacesRequest: () => (/* binding */ MatchFacesRequest)
3186
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
+
3187
3702
  class MatchFacesRequest {
3188
3703
  images
3189
3704
  outputImageParams
@@ -3196,6 +3711,30 @@ class MatchFacesRequest {
3196
3711
  this.tag = params?.tag
3197
3712
  this.metadata = params?.metadata
3198
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
+ }
3199
3738
  }
3200
3739
 
3201
3740
  /***/ }),
@@ -3240,6 +3779,15 @@ class MatchFacesResponse {
3240
3779
 
3241
3780
  return result
3242
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
+ }
3243
3791
  }
3244
3792
 
3245
3793
  /***/ }),
@@ -3262,6 +3810,21 @@ class EditGroupPersonsRequest {
3262
3810
  this.personIdsToAdd = params?.personIdsToAdd
3263
3811
  this.personIdsToRemove = params?.personIdsToRemove
3264
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
+ }
3265
3828
  }
3266
3829
 
3267
3830
 
@@ -3292,6 +3855,23 @@ class ImageUpload {
3292
3855
  result.imageUrl = imageUrl
3293
3856
  return result
3294
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
+ }
3295
3875
  }
3296
3876
 
3297
3877
 
@@ -3328,6 +3908,14 @@ class PageableItemList {
3328
3908
 
3329
3909
  return result
3330
3910
  }
3911
+
3912
+ toJson() {
3913
+ return {
3914
+ "items": this.items?.map(e => e.toJson()),
3915
+ "page": this.page,
3916
+ "totalPages": this.totalPages,
3917
+ }
3918
+ }
3331
3919
  }
3332
3920
 
3333
3921
 
@@ -3343,6 +3931,9 @@ __webpack_require__.r(__webpack_exports__);
3343
3931
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3344
3932
  /* harmony export */ Person: () => (/* binding */ Person)
3345
3933
  /* harmony export */ });
3934
+ /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js");
3935
+
3936
+
3346
3937
  class Person {
3347
3938
  name
3348
3939
  updatedAt
@@ -3364,6 +3955,17 @@ class Person {
3364
3955
 
3365
3956
  return result
3366
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
+ }
3367
3969
  }
3368
3970
 
3369
3971
 
@@ -3544,6 +4146,9 @@ __webpack_require__.r(__webpack_exports__);
3544
4146
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3545
4147
  /* harmony export */ PersonGroup: () => (/* binding */ PersonGroup)
3546
4148
  /* harmony export */ });
4149
+ /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js");
4150
+
4151
+
3547
4152
  class PersonGroup {
3548
4153
  name
3549
4154
  id
@@ -3561,6 +4166,15 @@ class PersonGroup {
3561
4166
 
3562
4167
  return result
3563
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
+ }
3564
4178
  }
3565
4179
 
3566
4180
 
@@ -3576,6 +4190,9 @@ __webpack_require__.r(__webpack_exports__);
3576
4190
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3577
4191
  /* harmony export */ PersonImage: () => (/* binding */ PersonImage)
3578
4192
  /* harmony export */ });
4193
+ /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js");
4194
+
4195
+
3579
4196
  class PersonImage {
3580
4197
  path
3581
4198
  url
@@ -3597,6 +4214,17 @@ class PersonImage {
3597
4214
 
3598
4215
  return result
3599
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
+ }
3600
4228
  }
3601
4229
 
3602
4230
 
@@ -3612,8 +4240,10 @@ __webpack_require__.r(__webpack_exports__);
3612
4240
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3613
4241
  /* harmony export */ SearchPerson: () => (/* binding */ SearchPerson)
3614
4242
  /* harmony export */ });
3615
- /* harmony import */ var _search_person_image__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./search_person_image */ "./src/person_database/search_person_image.js");
3616
- /* 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
+
3617
4247
 
3618
4248
 
3619
4249
 
@@ -3633,8 +4263,8 @@ class SearchPerson {
3633
4263
 
3634
4264
  if (jsonObject["images"] != null)
3635
4265
  for (var item of jsonObject["images"])
3636
- result.images.push(_search_person_image__WEBPACK_IMPORTED_MODULE_0__.SearchPersonImage.fromJson(item))
3637
- 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"])
3638
4268
  result.name = jsonObject["name"]
3639
4269
  result.updatedAt = new Date(jsonObject["updatedAt"])
3640
4270
  result.groups = jsonObject["groups"]
@@ -3644,6 +4274,19 @@ class SearchPerson {
3644
4274
 
3645
4275
  return result
3646
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
+ }
3647
4290
  }
3648
4291
 
3649
4292
 
@@ -3682,6 +4325,15 @@ class SearchPersonDetection {
3682
4325
 
3683
4326
  return result
3684
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
+ }
3685
4337
  }
3686
4338
 
3687
4339
 
@@ -3697,6 +4349,9 @@ __webpack_require__.r(__webpack_exports__);
3697
4349
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3698
4350
  /* harmony export */ SearchPersonImage: () => (/* binding */ SearchPersonImage)
3699
4351
  /* harmony export */ });
4352
+ /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js");
4353
+
4354
+
3700
4355
  class SearchPersonImage {
3701
4356
  similarity
3702
4357
  distance
@@ -3722,6 +4377,19 @@ class SearchPersonImage {
3722
4377
 
3723
4378
  return result
3724
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
+ }
3725
4393
  }
3726
4394
 
3727
4395
 
@@ -3737,6 +4405,11 @@ __webpack_require__.r(__webpack_exports__);
3737
4405
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3738
4406
  /* harmony export */ SearchPersonRequest: () => (/* binding */ SearchPersonRequest)
3739
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
+
3740
4413
  class SearchPersonRequest {
3741
4414
  imageUpload
3742
4415
  groupIdsForSearch
@@ -3755,6 +4428,30 @@ class SearchPersonRequest {
3755
4428
  this.detectAll = params?.detectAll ?? false
3756
4429
  this.outputImageParams = params?.outputImageParams
3757
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
+ }
3758
4455
  }
3759
4456
 
3760
4457