@regulaforensics/face-sdk 7.2.401-rc → 7.2.404-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNFaceSDK.podspec +1 -1
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +2 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +18 -0
- package/examples/capacitor/package.json +1 -1
- package/examples/cordova/package.json +1 -1
- package/examples/ionic/package.json +1 -1
- package/examples/react_native/package.json +1 -1
- package/ios/RFSWJSONConstructor.h +0 -1
- package/ios/RFSWJSONConstructor.m +5 -14
- package/ios/RFSWMain.m +30 -0
- package/package.json +1 -1
- package/plugin.xml +1 -1
- package/test/json.tsx +375 -0
- package/test/package-lock.json +584 -0
- package/test/package.json +9 -0
- package/test/test.tsx +61 -0
- package/test/utils.tsx +38 -0
- package/www/capacitor/customization/customization_fonts.js +1 -1
- package/www/capacitor/customization/customization_images.js +1 -1
- package/www/capacitor/customization/font.js +8 -0
- package/www/capacitor/detect_faces/detect_face_result.js +12 -0
- package/www/capacitor/detect_faces/detect_faces_attribute_result.js +9 -0
- package/www/capacitor/detect_faces/detect_faces_backend_exception.js +7 -0
- package/www/capacitor/detect_faces/detect_faces_config.js +34 -0
- package/www/capacitor/detect_faces/detect_faces_exception.js +8 -0
- package/www/capacitor/detect_faces/detect_faces_request.js +22 -0
- package/www/capacitor/detect_faces/detect_faces_response.js +9 -0
- package/www/capacitor/face_capture/face_capture_config.js +37 -0
- package/www/capacitor/face_capture/face_capture_exception.js +7 -0
- package/www/capacitor/face_capture/face_capture_image.js +8 -0
- package/www/capacitor/face_capture/face_capture_response.js +7 -0
- package/www/capacitor/image_params/output_image_crop.js +23 -0
- package/www/capacitor/image_params/output_image_params.js +19 -0
- package/www/capacitor/image_params/point.js +7 -0
- package/www/capacitor/image_params/rect.js +9 -0
- package/www/capacitor/image_params/size.js +12 -0
- package/www/capacitor/image_quality/image_quality_characteristic.js +22 -0
- package/www/capacitor/image_quality/image_quality_range.js +7 -0
- package/www/capacitor/image_quality/image_quality_result.js +10 -0
- package/www/capacitor/index.js +48 -0
- package/www/capacitor/init/face_sdk_version.js +8 -0
- package/www/capacitor/init/init_config.js +19 -0
- package/www/capacitor/init/init_exception.js +8 -0
- package/www/capacitor/init/license_exception.js +7 -0
- package/www/capacitor/internal/bridge.js +20 -1
- package/www/capacitor/liveness/liveness_backend_exception.js +7 -0
- package/www/capacitor/liveness/liveness_config.js +43 -0
- package/www/capacitor/liveness/liveness_exception.js +8 -0
- package/www/capacitor/liveness/liveness_notification.js +7 -0
- package/www/capacitor/liveness/liveness_response.js +11 -0
- package/www/capacitor/match_faces/compared_face.js +9 -0
- package/www/capacitor/match_faces/compared_faces_pair.js +10 -0
- package/www/capacitor/match_faces/compared_faces_split.js +7 -0
- package/www/capacitor/match_faces/match_faces_backend_exception.js +7 -0
- package/www/capacitor/match_faces/match_faces_config.js +19 -0
- package/www/capacitor/match_faces/match_faces_detection.js +9 -0
- package/www/capacitor/match_faces/match_faces_detection_face.js +11 -0
- package/www/capacitor/match_faces/match_faces_exception.js +8 -0
- package/www/capacitor/match_faces/match_faces_image.js +9 -0
- package/www/capacitor/match_faces/match_faces_request.js +27 -0
- package/www/capacitor/match_faces/match_faces_response.js +9 -0
- package/www/capacitor/person_database/edit_group_persons_request.js +15 -0
- package/www/capacitor/person_database/image_upload.js +17 -0
- package/www/capacitor/person_database/pageable_item_list.js +8 -0
- package/www/capacitor/person_database/person.js +13 -0
- package/www/capacitor/person_database/person_group.js +11 -0
- package/www/capacitor/person_database/person_image.js +13 -0
- package/www/capacitor/person_database/search_person.js +14 -0
- package/www/capacitor/person_database/search_person_detection.js +9 -0
- package/www/capacitor/person_database/search_person_image.js +15 -0
- package/www/capacitor/person_database/search_person_request.js +29 -0
- package/www/cordova.js +753 -6
- package/www/react-native/customization/customization_fonts.js +1 -1
- package/www/react-native/customization/customization_images.js +1 -1
- package/www/react-native/customization/font.js +8 -0
- package/www/react-native/detect_faces/detect_face_result.js +12 -0
- package/www/react-native/detect_faces/detect_faces_attribute_result.js +9 -0
- package/www/react-native/detect_faces/detect_faces_backend_exception.js +7 -0
- package/www/react-native/detect_faces/detect_faces_config.js +34 -0
- package/www/react-native/detect_faces/detect_faces_exception.js +8 -0
- package/www/react-native/detect_faces/detect_faces_request.js +22 -0
- package/www/react-native/detect_faces/detect_faces_response.js +9 -0
- package/www/react-native/face_capture/face_capture_config.js +37 -0
- package/www/react-native/face_capture/face_capture_exception.js +7 -0
- package/www/react-native/face_capture/face_capture_image.js +8 -0
- package/www/react-native/face_capture/face_capture_response.js +7 -0
- package/www/react-native/image_params/output_image_crop.js +23 -0
- package/www/react-native/image_params/output_image_params.js +19 -0
- package/www/react-native/image_params/point.js +7 -0
- package/www/react-native/image_params/rect.js +9 -0
- package/www/react-native/image_params/size.js +12 -0
- package/www/react-native/image_quality/image_quality_characteristic.js +22 -0
- package/www/react-native/image_quality/image_quality_range.js +7 -0
- package/www/react-native/image_quality/image_quality_result.js +10 -0
- package/www/react-native/index.js +48 -0
- package/www/react-native/init/face_sdk_version.js +8 -0
- package/www/react-native/init/init_config.js +19 -0
- package/www/react-native/init/init_exception.js +8 -0
- package/www/react-native/init/license_exception.js +7 -0
- package/www/react-native/internal/bridge.js +20 -1
- package/www/react-native/liveness/liveness_backend_exception.js +7 -0
- package/www/react-native/liveness/liveness_config.js +43 -0
- package/www/react-native/liveness/liveness_exception.js +8 -0
- package/www/react-native/liveness/liveness_notification.js +7 -0
- package/www/react-native/liveness/liveness_response.js +11 -0
- package/www/react-native/match_faces/compared_face.js +9 -0
- package/www/react-native/match_faces/compared_faces_pair.js +10 -0
- package/www/react-native/match_faces/compared_faces_split.js +7 -0
- package/www/react-native/match_faces/match_faces_backend_exception.js +7 -0
- package/www/react-native/match_faces/match_faces_config.js +19 -0
- package/www/react-native/match_faces/match_faces_detection.js +9 -0
- package/www/react-native/match_faces/match_faces_detection_face.js +11 -0
- package/www/react-native/match_faces/match_faces_exception.js +8 -0
- package/www/react-native/match_faces/match_faces_image.js +9 -0
- package/www/react-native/match_faces/match_faces_request.js +27 -0
- package/www/react-native/match_faces/match_faces_response.js +9 -0
- package/www/react-native/person_database/edit_group_persons_request.js +15 -0
- package/www/react-native/person_database/image_upload.js +17 -0
- package/www/react-native/person_database/pageable_item_list.js +8 -0
- package/www/react-native/person_database/person.js +13 -0
- package/www/react-native/person_database/person_group.js +11 -0
- package/www/react-native/person_database/person_image.js +13 -0
- package/www/react-native/person_database/search_person.js +14 -0
- package/www/react-native/person_database/search_person_detection.js +9 -0
- package/www/react-native/person_database/search_person_image.js +15 -0
- package/www/react-native/person_database/search_person_request.js +29 -0
- package/www/types/index.d.ts +12 -0
- package/www/types/match_faces/match_faces_config.d.ts +2 -0
- package/www/types/person_database/search_person_request.d.ts +4 -0
|
@@ -35,6 +35,49 @@ export class LivenessConfig {
|
|
|
35
35
|
this.skipStep = params?.skipStep ?? []
|
|
36
36
|
this.metadata = params?.metadata
|
|
37
37
|
}
|
|
38
|
+
|
|
39
|
+
static fromJson(jsonObject) {
|
|
40
|
+
if (jsonObject == null) return null
|
|
41
|
+
const result = new LivenessConfig()
|
|
42
|
+
|
|
43
|
+
result.copyright = jsonObject["copyright"]
|
|
44
|
+
result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"]
|
|
45
|
+
result.closeButtonEnabled = jsonObject["closeButtonEnabled"]
|
|
46
|
+
result.torchButtonEnabled = jsonObject["torchButtonEnabled"]
|
|
47
|
+
result.vibrateOnSteps = jsonObject["vibrateOnSteps"]
|
|
48
|
+
result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"]
|
|
49
|
+
result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
|
|
50
|
+
result.screenOrientation = jsonObject["screenOrientation"]
|
|
51
|
+
result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
|
|
52
|
+
result.attemptsCount = jsonObject["attemptsCount"]
|
|
53
|
+
result.recordingProcess = jsonObject["recordingProcess"]
|
|
54
|
+
result.livenessType = jsonObject["livenessType"]
|
|
55
|
+
result.tag = jsonObject["tag"]
|
|
56
|
+
result.skipStep = jsonObject["skipStep"]
|
|
57
|
+
result.metadata = jsonObject["metadata"]
|
|
58
|
+
|
|
59
|
+
return result
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
toJson() {
|
|
63
|
+
return {
|
|
64
|
+
"copyright": this.copyright,
|
|
65
|
+
"cameraSwitchEnabled": this.cameraSwitchEnabled,
|
|
66
|
+
"closeButtonEnabled": this.closeButtonEnabled,
|
|
67
|
+
"torchButtonEnabled": this.torchButtonEnabled,
|
|
68
|
+
"vibrateOnSteps": this.vibrateOnSteps,
|
|
69
|
+
"cameraPositionAndroid": this.cameraPositionAndroid,
|
|
70
|
+
"cameraPositionIOS": this.cameraPositionIOS,
|
|
71
|
+
"screenOrientation": this.screenOrientation,
|
|
72
|
+
"locationTrackingEnabled": this.locationTrackingEnabled,
|
|
73
|
+
"attemptsCount": this.attemptsCount,
|
|
74
|
+
"recordingProcess": this.recordingProcess,
|
|
75
|
+
"livenessType": this.livenessType,
|
|
76
|
+
"tag": this.tag,
|
|
77
|
+
"skipStep": this.skipStep,
|
|
78
|
+
"metadata": this.metadata,
|
|
79
|
+
}
|
|
80
|
+
}
|
|
38
81
|
}
|
|
39
82
|
|
|
40
83
|
export const RecordingProcess = {
|
|
@@ -22,6 +22,17 @@ export class LivenessResponse {
|
|
|
22
22
|
|
|
23
23
|
return result
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
toJson() {
|
|
27
|
+
return {
|
|
28
|
+
"image": this.image,
|
|
29
|
+
"liveness": this.liveness,
|
|
30
|
+
"tag": this.tag,
|
|
31
|
+
"transactionId": this.transactionId,
|
|
32
|
+
"estimatedAge": this.estimatedAge,
|
|
33
|
+
"error": this.error?.toJson(),
|
|
34
|
+
}
|
|
35
|
+
}
|
|
25
36
|
}
|
|
26
37
|
|
|
27
38
|
export const LivenessStatus = {
|
|
@@ -20,4 +20,14 @@ export class ComparedFacesPair {
|
|
|
20
20
|
|
|
21
21
|
return result
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
toJson() {
|
|
25
|
+
return {
|
|
26
|
+
"first": this.first?.toJson(),
|
|
27
|
+
"second": this.second?.toJson(),
|
|
28
|
+
"similarity": this.similarity,
|
|
29
|
+
"score": this.score,
|
|
30
|
+
"error": this.error?.toJson(),
|
|
31
|
+
}
|
|
32
|
+
}
|
|
23
33
|
}
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
export class MatchFacesConfig {
|
|
2
2
|
processingMode
|
|
3
|
+
locationTrackingEnabled
|
|
3
4
|
|
|
4
5
|
constructor(params) {
|
|
5
6
|
this.processingMode = params?.processingMode ?? ProcessingMode.ONLINE
|
|
7
|
+
this.locationTrackingEnabled = params?.locationTrackingEnabled ?? true
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
static fromJson(jsonObject) {
|
|
11
|
+
if (jsonObject == null) return null
|
|
12
|
+
const result = new MatchFacesConfig()
|
|
13
|
+
|
|
14
|
+
result.processingMode = jsonObject["processingMode"]
|
|
15
|
+
result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
|
|
16
|
+
|
|
17
|
+
return result
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
toJson() {
|
|
21
|
+
return {
|
|
22
|
+
"processingMode": this.processingMode,
|
|
23
|
+
"locationTrackingEnabled": this.locationTrackingEnabled,
|
|
24
|
+
}
|
|
6
25
|
}
|
|
7
26
|
}
|
|
8
27
|
|
|
@@ -22,4 +22,13 @@ export class MatchFacesDetection {
|
|
|
22
22
|
|
|
23
23
|
return result
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
toJson() {
|
|
27
|
+
return {
|
|
28
|
+
"imageIndex": this.imageIndex,
|
|
29
|
+
"image": this.image?.toJson(),
|
|
30
|
+
"faces": this.faces?.map(e => e.toJson()),
|
|
31
|
+
"error": this.error?.toJson(),
|
|
32
|
+
}
|
|
33
|
+
}
|
|
25
34
|
}
|
|
@@ -25,4 +25,15 @@ export class MatchFacesDetectionFace {
|
|
|
25
25
|
|
|
26
26
|
return result
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
toJson() {
|
|
30
|
+
return {
|
|
31
|
+
"faceIndex": this.faceIndex,
|
|
32
|
+
"landmarks": this.landmarks?.map(e => e.toJson()),
|
|
33
|
+
"faceRect": this.faceRect?.toJson(),
|
|
34
|
+
"rotationAngle": this.rotationAngle,
|
|
35
|
+
"originalRect": this.originalRect?.toJson(),
|
|
36
|
+
"crop": this.crop,
|
|
37
|
+
}
|
|
38
|
+
}
|
|
28
39
|
}
|
|
@@ -15,6 +15,14 @@ export class MatchFacesException {
|
|
|
15
15
|
|
|
16
16
|
return result
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
toJson() {
|
|
20
|
+
return {
|
|
21
|
+
"code": this.code,
|
|
22
|
+
"message": this.message,
|
|
23
|
+
"underlyingError": this.underlyingError?.toJson(),
|
|
24
|
+
}
|
|
25
|
+
}
|
|
18
26
|
}
|
|
19
27
|
|
|
20
28
|
export const MatchFacesErrorCode = {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { OutputImageParams } from '../image_params/output_image_params'
|
|
2
|
+
import { MatchFacesImage } from './match_faces_image'
|
|
3
|
+
|
|
1
4
|
export class MatchFacesRequest {
|
|
2
5
|
images
|
|
3
6
|
outputImageParams
|
|
@@ -10,4 +13,28 @@ export class MatchFacesRequest {
|
|
|
10
13
|
this.tag = params?.tag
|
|
11
14
|
this.metadata = params?.metadata
|
|
12
15
|
}
|
|
16
|
+
|
|
17
|
+
static fromJson(jsonObject) {
|
|
18
|
+
if (jsonObject == null) return null
|
|
19
|
+
|
|
20
|
+
const images = []
|
|
21
|
+
for (const item of jsonObject["images"]) {
|
|
22
|
+
images.push(MatchFacesImage.fromJson(item))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return new MatchFacesRequest(images, {
|
|
26
|
+
outputImageParams: OutputImageParams.fromJson(jsonObject["outputImageParams"]),
|
|
27
|
+
tag: jsonObject["tag"],
|
|
28
|
+
metadata: jsonObject["metadata"],
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
toJson() {
|
|
33
|
+
return {
|
|
34
|
+
"images": this.images?.map(e => e.toJson()),
|
|
35
|
+
"outputImageParams": this.outputImageParams?.toJson(),
|
|
36
|
+
"tag": this.tag,
|
|
37
|
+
"metadata": this.metadata,
|
|
38
|
+
}
|
|
39
|
+
}
|
|
13
40
|
}
|
|
@@ -25,4 +25,13 @@ export class MatchFacesResponse {
|
|
|
25
25
|
|
|
26
26
|
return result
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
toJson() {
|
|
30
|
+
return {
|
|
31
|
+
"results": this.results?.map(e => e.toJson()),
|
|
32
|
+
"detections": this.detections?.map(e => e.toJson()),
|
|
33
|
+
"tag": this.tag,
|
|
34
|
+
"error": this.error?.toJson(),
|
|
35
|
+
}
|
|
36
|
+
}
|
|
28
37
|
}
|
|
@@ -6,4 +6,19 @@ export class EditGroupPersonsRequest {
|
|
|
6
6
|
this.personIdsToAdd = params?.personIdsToAdd
|
|
7
7
|
this.personIdsToRemove = params?.personIdsToRemove
|
|
8
8
|
}
|
|
9
|
+
|
|
10
|
+
static fromJson(jsonObject) {
|
|
11
|
+
if (jsonObject == null) return null
|
|
12
|
+
return new EditGroupPersonsRequest({
|
|
13
|
+
personIdsToAdd: jsonObject["personIdsToAdd"],
|
|
14
|
+
personIdsToRemove: jsonObject["personIdsToRemove"],
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
toJson() {
|
|
19
|
+
return {
|
|
20
|
+
"personIdsToAdd": this.personIdsToAdd,
|
|
21
|
+
"personIdsToRemove": this.personIdsToRemove,
|
|
22
|
+
}
|
|
23
|
+
}
|
|
9
24
|
}
|
|
@@ -13,4 +13,21 @@ export class ImageUpload {
|
|
|
13
13
|
result.imageUrl = imageUrl
|
|
14
14
|
return result
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
static fromJson(jsonObject) {
|
|
18
|
+
if (jsonObject == null) return null
|
|
19
|
+
var result = new ImageUpload()
|
|
20
|
+
|
|
21
|
+
result.imageData = jsonObject["imageData"]
|
|
22
|
+
result.imageUrl = jsonObject["imageUrl"]
|
|
23
|
+
|
|
24
|
+
return result
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
toJson() {
|
|
28
|
+
return {
|
|
29
|
+
"imageData": this.imageData,
|
|
30
|
+
"imageUrl": this.imageUrl,
|
|
31
|
+
}
|
|
32
|
+
}
|
|
16
33
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { dateToString } from '../internal/bridge'
|
|
2
|
+
|
|
1
3
|
export class Person {
|
|
2
4
|
name
|
|
3
5
|
updatedAt
|
|
@@ -19,4 +21,15 @@ export class Person {
|
|
|
19
21
|
|
|
20
22
|
return result
|
|
21
23
|
}
|
|
24
|
+
|
|
25
|
+
toJson() {
|
|
26
|
+
return {
|
|
27
|
+
"name": this.name,
|
|
28
|
+
"updatedAt": dateToString(this.updatedAt),
|
|
29
|
+
"groups": this.groups,
|
|
30
|
+
"id": this.id,
|
|
31
|
+
"metadata": this.metadata,
|
|
32
|
+
"createdAt": dateToString(this.createdAt),
|
|
33
|
+
}
|
|
34
|
+
}
|
|
22
35
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { dateToString } from '../internal/bridge'
|
|
2
|
+
|
|
1
3
|
export class PersonGroup {
|
|
2
4
|
name
|
|
3
5
|
id
|
|
@@ -15,4 +17,13 @@ export class PersonGroup {
|
|
|
15
17
|
|
|
16
18
|
return result
|
|
17
19
|
}
|
|
20
|
+
|
|
21
|
+
toJson() {
|
|
22
|
+
return {
|
|
23
|
+
"name": this.name,
|
|
24
|
+
"id": this.id,
|
|
25
|
+
"metadata": this.metadata,
|
|
26
|
+
"createdAt": dateToString(this.createdAt),
|
|
27
|
+
}
|
|
28
|
+
}
|
|
18
29
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { dateToString } from '../internal/bridge'
|
|
2
|
+
|
|
1
3
|
export class PersonImage {
|
|
2
4
|
path
|
|
3
5
|
url
|
|
@@ -19,4 +21,15 @@ export class PersonImage {
|
|
|
19
21
|
|
|
20
22
|
return result
|
|
21
23
|
}
|
|
24
|
+
|
|
25
|
+
toJson() {
|
|
26
|
+
return {
|
|
27
|
+
"path": this.path,
|
|
28
|
+
"url": this.url,
|
|
29
|
+
"contentType": this.contentType,
|
|
30
|
+
"id": this.id,
|
|
31
|
+
"metadata": this.metadata,
|
|
32
|
+
"createdAt": dateToString(this.createdAt),
|
|
33
|
+
}
|
|
34
|
+
}
|
|
22
35
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { dateToString } from '../internal/bridge'
|
|
1
2
|
import { SearchPersonImage } from './search_person_image'
|
|
2
3
|
import { SearchPersonDetection } from './search_person_detection'
|
|
3
4
|
|
|
@@ -28,4 +29,17 @@ export class SearchPerson {
|
|
|
28
29
|
|
|
29
30
|
return result
|
|
30
31
|
}
|
|
32
|
+
|
|
33
|
+
toJson() {
|
|
34
|
+
return {
|
|
35
|
+
"images": this.images?.map(e => e.toJson()),
|
|
36
|
+
"detection": this.detection?.toJson(),
|
|
37
|
+
"name": this.name,
|
|
38
|
+
"updatedAt": dateToString(this.updatedAt),
|
|
39
|
+
"groups": this.groups,
|
|
40
|
+
"id": this.id,
|
|
41
|
+
"metadata": this.metadata,
|
|
42
|
+
"createdAt": dateToString(this.createdAt),
|
|
43
|
+
}
|
|
44
|
+
}
|
|
31
45
|
}
|
|
@@ -19,4 +19,13 @@ export class SearchPersonDetection {
|
|
|
19
19
|
|
|
20
20
|
return result
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
toJson() {
|
|
24
|
+
return {
|
|
25
|
+
"landmarks": this.landmarks?.map(e => e.toJson()),
|
|
26
|
+
"rect": this.rect?.toJson(),
|
|
27
|
+
"crop": this.crop,
|
|
28
|
+
"rotationAngle": this.rotationAngle,
|
|
29
|
+
}
|
|
30
|
+
}
|
|
22
31
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { dateToString } from '../internal/bridge'
|
|
2
|
+
|
|
1
3
|
export class SearchPersonImage {
|
|
2
4
|
similarity
|
|
3
5
|
distance
|
|
@@ -23,4 +25,17 @@ export class SearchPersonImage {
|
|
|
23
25
|
|
|
24
26
|
return result
|
|
25
27
|
}
|
|
28
|
+
|
|
29
|
+
toJson() {
|
|
30
|
+
return {
|
|
31
|
+
"similarity": this.similarity,
|
|
32
|
+
"distance": this.distance,
|
|
33
|
+
"path": this.path,
|
|
34
|
+
"url": this.url,
|
|
35
|
+
"contentType": this.contentType,
|
|
36
|
+
"id": this.id,
|
|
37
|
+
"metadata": this.metadata,
|
|
38
|
+
"createdAt": dateToString(this.createdAt),
|
|
39
|
+
}
|
|
40
|
+
}
|
|
26
41
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { OutputImageParams } from '../image_params/output_image_params'
|
|
2
|
+
import { ImageUpload } from './image_upload'
|
|
3
|
+
|
|
1
4
|
export class SearchPersonRequest {
|
|
2
5
|
imageUpload
|
|
3
6
|
groupIdsForSearch
|
|
4
7
|
threshold
|
|
5
8
|
limit
|
|
9
|
+
tag
|
|
6
10
|
detectAll
|
|
7
11
|
outputImageParams
|
|
8
12
|
|
|
@@ -11,7 +15,32 @@ export class SearchPersonRequest {
|
|
|
11
15
|
this.groupIdsForSearch = params?.groupIdsForSearch
|
|
12
16
|
this.threshold = params?.threshold
|
|
13
17
|
this.limit = params?.limit
|
|
18
|
+
this.tag = params?.tag
|
|
14
19
|
this.detectAll = params?.detectAll ?? false
|
|
15
20
|
this.outputImageParams = params?.outputImageParams
|
|
16
21
|
}
|
|
22
|
+
|
|
23
|
+
static fromJson(jsonObject) {
|
|
24
|
+
if (jsonObject == null) return null
|
|
25
|
+
return new SearchPersonRequest(ImageUpload.fromJson(jsonObject["imageUpload"]), {
|
|
26
|
+
groupIdsForSearch: jsonObject["groupIdsForSearch"],
|
|
27
|
+
threshold: jsonObject["threshold"],
|
|
28
|
+
limit: jsonObject["limit"],
|
|
29
|
+
tag: jsonObject["tag"],
|
|
30
|
+
detectAll: jsonObject["detectAll"],
|
|
31
|
+
outputImageParams: OutputImageParams.fromJson(jsonObject["outputImageParams"]),
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
toJson() {
|
|
36
|
+
return {
|
|
37
|
+
"imageUpload": this.imageUpload?.toJson(),
|
|
38
|
+
"groupIdsForSearch": this.groupIdsForSearch,
|
|
39
|
+
"threshold": this.threshold,
|
|
40
|
+
"limit": this.limit,
|
|
41
|
+
"tag": this.tag,
|
|
42
|
+
"detectAll": this.detectAll,
|
|
43
|
+
"outputImageParams": this.outputImageParams?.toJson(),
|
|
44
|
+
}
|
|
45
|
+
}
|
|
17
46
|
}
|