@regulaforensics/face-sdk 7.2.429-beta → 7.2.433-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/RNFaceSDK.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +0 -2
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +0 -18
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +2 -2
- package/examples/capacitor/index.html +7 -2
- package/examples/capacitor/package-lock.json +162 -12
- package/examples/capacitor/package.json +4 -4
- package/examples/capacitor/scripts/setup.sh +2 -4
- package/examples/capacitor/src/main.css +6 -60
- package/examples/capacitor/src/main.html +1 -1
- package/examples/capacitor/src/main.tsx +87 -51
- package/examples/cordova/.vscode/launch.json +28 -0
- package/examples/cordova/README.md +25 -0
- package/examples/cordova/config.xml +26 -0
- package/examples/cordova/package-lock.json +1327 -0
- package/examples/cordova/package.json +30 -0
- package/examples/cordova/scripts/android.sh +8 -0
- package/examples/cordova/scripts/ios.sh +8 -0
- package/examples/cordova/scripts/setup.sh +8 -0
- package/examples/cordova/www/images/logo.png +0 -0
- package/examples/cordova/www/index.html +21 -0
- package/examples/cordova/www/src/main.css +83 -0
- package/examples/cordova/www/src/main.html +25 -0
- package/examples/cordova/www/src/main.js +152 -0
- package/examples/ionic/README.md +1 -1
- package/examples/ionic/angular.json +3 -3
- package/examples/ionic/config.xml +2 -4
- package/examples/ionic/index.ts +17 -0
- package/examples/ionic/package-lock.json +68 -42
- package/examples/ionic/package.json +2 -2
- package/examples/ionic/src/images/portrait.png +0 -0
- package/examples/ionic/src/main.css +6 -60
- package/examples/ionic/src/main.html +1 -1
- package/examples/ionic/src/{main.tsx → main.ts} +97 -52
- package/examples/ionic/tsconfig.json +2 -3
- package/examples/react_native/README.md +0 -1
- package/examples/react_native/app.config.ts +1 -1
- package/examples/react_native/index.tsx +7 -49
- package/examples/react_native/package-lock.json +597 -594
- package/examples/react_native/package.json +9 -9
- package/examples/react_native/src/main.css +6 -60
- package/examples/react_native/src/main.html +1 -1
- package/examples/react_native/src/main.tsx +77 -54
- package/ios/RFSWJSONConstructor.h +1 -0
- package/ios/RFSWJSONConstructor.m +14 -5
- package/ios/RFSWMain.m +0 -30
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/www/capacitor/customization/customization_fonts.js +1 -1
- package/www/capacitor/customization/customization_images.js +1 -1
- package/www/capacitor/customization/font.js +0 -8
- package/www/capacitor/detect_faces/detect_face_result.js +0 -12
- package/www/capacitor/detect_faces/detect_faces_attribute_result.js +0 -9
- package/www/capacitor/detect_faces/detect_faces_backend_exception.js +0 -7
- package/www/capacitor/detect_faces/detect_faces_config.js +0 -34
- package/www/capacitor/detect_faces/detect_faces_exception.js +0 -8
- package/www/capacitor/detect_faces/detect_faces_request.js +0 -22
- package/www/capacitor/detect_faces/detect_faces_response.js +0 -9
- package/www/capacitor/face_capture/face_capture_config.js +0 -37
- package/www/capacitor/face_capture/face_capture_exception.js +0 -7
- package/www/capacitor/face_capture/face_capture_image.js +0 -8
- package/www/capacitor/face_capture/face_capture_response.js +0 -7
- package/www/capacitor/image_params/output_image_crop.js +0 -23
- package/www/capacitor/image_params/output_image_params.js +0 -19
- package/www/capacitor/image_params/point.js +0 -7
- package/www/capacitor/image_params/rect.js +0 -9
- package/www/capacitor/image_params/size.js +0 -12
- package/www/capacitor/image_quality/image_quality_characteristic.js +0 -22
- package/www/capacitor/image_quality/image_quality_range.js +0 -7
- package/www/capacitor/image_quality/image_quality_result.js +0 -10
- package/www/capacitor/index.js +0 -48
- package/www/capacitor/init/face_sdk_version.js +0 -8
- package/www/capacitor/init/init_config.js +0 -19
- package/www/capacitor/init/init_exception.js +0 -8
- package/www/capacitor/init/license_exception.js +0 -7
- package/www/capacitor/internal/bridge.js +1 -20
- package/www/capacitor/liveness/liveness_backend_exception.js +0 -7
- package/www/capacitor/liveness/liveness_config.js +0 -43
- package/www/capacitor/liveness/liveness_exception.js +0 -8
- package/www/capacitor/liveness/liveness_notification.js +0 -7
- package/www/capacitor/liveness/liveness_response.js +0 -11
- package/www/capacitor/match_faces/compared_face.js +0 -9
- package/www/capacitor/match_faces/compared_faces_pair.js +0 -10
- package/www/capacitor/match_faces/compared_faces_split.js +0 -7
- package/www/capacitor/match_faces/match_faces_backend_exception.js +0 -7
- package/www/capacitor/match_faces/match_faces_config.js +0 -19
- package/www/capacitor/match_faces/match_faces_detection.js +0 -9
- package/www/capacitor/match_faces/match_faces_detection_face.js +0 -11
- package/www/capacitor/match_faces/match_faces_exception.js +0 -8
- package/www/capacitor/match_faces/match_faces_image.js +0 -9
- package/www/capacitor/match_faces/match_faces_request.js +0 -27
- package/www/capacitor/match_faces/match_faces_response.js +0 -9
- package/www/capacitor/person_database/edit_group_persons_request.js +0 -15
- package/www/capacitor/person_database/image_upload.js +0 -17
- package/www/capacitor/person_database/pageable_item_list.js +0 -8
- package/www/capacitor/person_database/person.js +0 -13
- package/www/capacitor/person_database/person_group.js +0 -11
- package/www/capacitor/person_database/person_image.js +0 -13
- package/www/capacitor/person_database/search_person.js +0 -14
- package/www/capacitor/person_database/search_person_detection.js +0 -9
- package/www/capacitor/person_database/search_person_image.js +0 -15
- package/www/capacitor/person_database/search_person_request.js +0 -29
- package/www/cordova.js +6 -753
- 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 +0 -8
- package/www/react-native/detect_faces/detect_face_result.js +0 -12
- package/www/react-native/detect_faces/detect_faces_attribute_result.js +0 -9
- package/www/react-native/detect_faces/detect_faces_backend_exception.js +0 -7
- package/www/react-native/detect_faces/detect_faces_config.js +0 -34
- package/www/react-native/detect_faces/detect_faces_exception.js +0 -8
- package/www/react-native/detect_faces/detect_faces_request.js +0 -22
- package/www/react-native/detect_faces/detect_faces_response.js +0 -9
- package/www/react-native/face_capture/face_capture_config.js +0 -37
- package/www/react-native/face_capture/face_capture_exception.js +0 -7
- package/www/react-native/face_capture/face_capture_image.js +0 -8
- package/www/react-native/face_capture/face_capture_response.js +0 -7
- package/www/react-native/image_params/output_image_crop.js +0 -23
- package/www/react-native/image_params/output_image_params.js +0 -19
- package/www/react-native/image_params/point.js +0 -7
- package/www/react-native/image_params/rect.js +0 -9
- package/www/react-native/image_params/size.js +0 -12
- package/www/react-native/image_quality/image_quality_characteristic.js +0 -22
- package/www/react-native/image_quality/image_quality_range.js +0 -7
- package/www/react-native/image_quality/image_quality_result.js +0 -10
- package/www/react-native/index.js +0 -48
- package/www/react-native/init/face_sdk_version.js +0 -8
- package/www/react-native/init/init_config.js +0 -19
- package/www/react-native/init/init_exception.js +0 -8
- package/www/react-native/init/license_exception.js +0 -7
- package/www/react-native/internal/bridge.js +1 -20
- package/www/react-native/liveness/liveness_backend_exception.js +0 -7
- package/www/react-native/liveness/liveness_config.js +0 -43
- package/www/react-native/liveness/liveness_exception.js +0 -8
- package/www/react-native/liveness/liveness_notification.js +0 -7
- package/www/react-native/liveness/liveness_response.js +0 -11
- package/www/react-native/match_faces/compared_face.js +0 -9
- package/www/react-native/match_faces/compared_faces_pair.js +0 -10
- package/www/react-native/match_faces/compared_faces_split.js +0 -7
- package/www/react-native/match_faces/match_faces_backend_exception.js +0 -7
- package/www/react-native/match_faces/match_faces_config.js +0 -19
- package/www/react-native/match_faces/match_faces_detection.js +0 -9
- package/www/react-native/match_faces/match_faces_detection_face.js +0 -11
- package/www/react-native/match_faces/match_faces_exception.js +0 -8
- package/www/react-native/match_faces/match_faces_image.js +0 -9
- package/www/react-native/match_faces/match_faces_request.js +0 -27
- package/www/react-native/match_faces/match_faces_response.js +0 -9
- package/www/react-native/person_database/edit_group_persons_request.js +0 -15
- package/www/react-native/person_database/image_upload.js +0 -17
- package/www/react-native/person_database/pageable_item_list.js +0 -8
- package/www/react-native/person_database/person.js +0 -13
- package/www/react-native/person_database/person_group.js +0 -11
- package/www/react-native/person_database/person_image.js +0 -13
- package/www/react-native/person_database/search_person.js +0 -14
- package/www/react-native/person_database/search_person_detection.js +0 -9
- package/www/react-native/person_database/search_person_image.js +0 -15
- package/www/react-native/person_database/search_person_request.js +0 -29
- package/www/types/index.d.ts +0 -12
- package/www/types/match_faces/match_faces_config.d.ts +0 -2
- package/www/types/person_database/search_person_request.d.ts +0 -4
- package/examples/capacitor/index.tsx +0 -53
- package/examples/ionic/index.tsx +0 -68
- package/test/json.tsx +0 -375
- package/test/package-lock.json +0 -584
- package/test/package.json +0 -9
- package/test/test.tsx +0 -61
- package/test/utils.tsx +0 -38
- /package/examples/{ionic → cordova/www}/images/portrait.png +0 -0
- /package/examples/ionic/{assets → src/assets}/.gitkeep +0 -0
- /package/examples/ionic/{images → src/images}/icon.png +0 -0
|
@@ -22,17 +22,6 @@ export class LivenessResponse {
|
|
|
22
22
|
|
|
23
23
|
return result
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
toJson() {
|
|
27
|
-
return {
|
|
28
|
-
"image": this.image,
|
|
29
|
-
"liveness": this.liveness,
|
|
30
|
-
"tag": this.tag,
|
|
31
|
-
"transactionId": this.transactionId,
|
|
32
|
-
"estimatedAge": this.estimatedAge,
|
|
33
|
-
"error": this.error?.toJson(),
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
25
|
}
|
|
37
26
|
|
|
38
27
|
export const LivenessStatus = {
|
|
@@ -20,14 +20,4 @@ export class ComparedFacesPair {
|
|
|
20
20
|
|
|
21
21
|
return result
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
toJson() {
|
|
25
|
-
return {
|
|
26
|
-
"first": this.first?.toJson(),
|
|
27
|
-
"second": this.second?.toJson(),
|
|
28
|
-
"similarity": this.similarity,
|
|
29
|
-
"score": this.score,
|
|
30
|
-
"error": this.error?.toJson(),
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
23
|
}
|
|
@@ -1,27 +1,8 @@
|
|
|
1
1
|
export class MatchFacesConfig {
|
|
2
2
|
processingMode
|
|
3
|
-
locationTrackingEnabled
|
|
4
3
|
|
|
5
4
|
constructor(params) {
|
|
6
5
|
this.processingMode = params?.processingMode ?? ProcessingMode.ONLINE
|
|
7
|
-
this.locationTrackingEnabled = params?.locationTrackingEnabled ?? true
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
static fromJson(jsonObject) {
|
|
11
|
-
if (jsonObject == null) return null
|
|
12
|
-
const result = new MatchFacesConfig()
|
|
13
|
-
|
|
14
|
-
result.processingMode = jsonObject["processingMode"]
|
|
15
|
-
result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"]
|
|
16
|
-
|
|
17
|
-
return result
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
toJson() {
|
|
21
|
-
return {
|
|
22
|
-
"processingMode": this.processingMode,
|
|
23
|
-
"locationTrackingEnabled": this.locationTrackingEnabled,
|
|
24
|
-
}
|
|
25
6
|
}
|
|
26
7
|
}
|
|
27
8
|
|
|
@@ -22,13 +22,4 @@ export class MatchFacesDetection {
|
|
|
22
22
|
|
|
23
23
|
return result
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
toJson() {
|
|
27
|
-
return {
|
|
28
|
-
"imageIndex": this.imageIndex,
|
|
29
|
-
"image": this.image?.toJson(),
|
|
30
|
-
"faces": this.faces?.map(e => e.toJson()),
|
|
31
|
-
"error": this.error?.toJson(),
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
25
|
}
|
|
@@ -25,15 +25,4 @@ export class MatchFacesDetectionFace {
|
|
|
25
25
|
|
|
26
26
|
return result
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
toJson() {
|
|
30
|
-
return {
|
|
31
|
-
"faceIndex": this.faceIndex,
|
|
32
|
-
"landmarks": this.landmarks?.map(e => e.toJson()),
|
|
33
|
-
"faceRect": this.faceRect?.toJson(),
|
|
34
|
-
"rotationAngle": this.rotationAngle,
|
|
35
|
-
"originalRect": this.originalRect?.toJson(),
|
|
36
|
-
"crop": this.crop,
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
28
|
}
|
|
@@ -15,14 +15,6 @@ export class MatchFacesException {
|
|
|
15
15
|
|
|
16
16
|
return result
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
toJson() {
|
|
20
|
-
return {
|
|
21
|
-
"code": this.code,
|
|
22
|
-
"message": this.message,
|
|
23
|
-
"underlyingError": this.underlyingError?.toJson(),
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
18
|
}
|
|
27
19
|
|
|
28
20
|
export const MatchFacesErrorCode = {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { OutputImageParams } from '../image_params/output_image_params'
|
|
2
|
-
import { MatchFacesImage } from './match_faces_image'
|
|
3
|
-
|
|
4
1
|
export class MatchFacesRequest {
|
|
5
2
|
images
|
|
6
3
|
outputImageParams
|
|
@@ -13,28 +10,4 @@ export class MatchFacesRequest {
|
|
|
13
10
|
this.tag = params?.tag
|
|
14
11
|
this.metadata = params?.metadata
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
static fromJson(jsonObject) {
|
|
18
|
-
if (jsonObject == null) return null
|
|
19
|
-
|
|
20
|
-
const images = []
|
|
21
|
-
for (const item of jsonObject["images"]) {
|
|
22
|
-
images.push(MatchFacesImage.fromJson(item))
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return new MatchFacesRequest(images, {
|
|
26
|
-
outputImageParams: OutputImageParams.fromJson(jsonObject["outputImageParams"]),
|
|
27
|
-
tag: jsonObject["tag"],
|
|
28
|
-
metadata: jsonObject["metadata"],
|
|
29
|
-
})
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
toJson() {
|
|
33
|
-
return {
|
|
34
|
-
"images": this.images?.map(e => e.toJson()),
|
|
35
|
-
"outputImageParams": this.outputImageParams?.toJson(),
|
|
36
|
-
"tag": this.tag,
|
|
37
|
-
"metadata": this.metadata,
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
13
|
}
|
|
@@ -25,13 +25,4 @@ 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
|
-
}
|
|
37
28
|
}
|
|
@@ -6,19 +6,4 @@ 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
|
-
}
|
|
24
9
|
}
|
|
@@ -13,21 +13,4 @@ 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
|
-
}
|
|
33
16
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { dateToString } from '../internal/bridge'
|
|
2
|
-
|
|
3
1
|
export class Person {
|
|
4
2
|
name
|
|
5
3
|
updatedAt
|
|
@@ -21,15 +19,4 @@ export class Person {
|
|
|
21
19
|
|
|
22
20
|
return result
|
|
23
21
|
}
|
|
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
|
-
}
|
|
35
22
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { dateToString } from '../internal/bridge'
|
|
2
|
-
|
|
3
1
|
export class PersonGroup {
|
|
4
2
|
name
|
|
5
3
|
id
|
|
@@ -17,13 +15,4 @@ export class PersonGroup {
|
|
|
17
15
|
|
|
18
16
|
return result
|
|
19
17
|
}
|
|
20
|
-
|
|
21
|
-
toJson() {
|
|
22
|
-
return {
|
|
23
|
-
"name": this.name,
|
|
24
|
-
"id": this.id,
|
|
25
|
-
"metadata": this.metadata,
|
|
26
|
-
"createdAt": dateToString(this.createdAt),
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
18
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { dateToString } from '../internal/bridge'
|
|
2
|
-
|
|
3
1
|
export class PersonImage {
|
|
4
2
|
path
|
|
5
3
|
url
|
|
@@ -21,15 +19,4 @@ export class PersonImage {
|
|
|
21
19
|
|
|
22
20
|
return result
|
|
23
21
|
}
|
|
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
|
-
}
|
|
35
22
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { dateToString } from '../internal/bridge'
|
|
2
1
|
import { SearchPersonImage } from './search_person_image'
|
|
3
2
|
import { SearchPersonDetection } from './search_person_detection'
|
|
4
3
|
|
|
@@ -29,17 +28,4 @@ export class SearchPerson {
|
|
|
29
28
|
|
|
30
29
|
return result
|
|
31
30
|
}
|
|
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
|
-
}
|
|
45
31
|
}
|
|
@@ -19,13 +19,4 @@ 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
|
-
}
|
|
31
22
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { dateToString } from '../internal/bridge'
|
|
2
|
-
|
|
3
1
|
export class SearchPersonImage {
|
|
4
2
|
similarity
|
|
5
3
|
distance
|
|
@@ -25,17 +23,4 @@ export class SearchPersonImage {
|
|
|
25
23
|
|
|
26
24
|
return result
|
|
27
25
|
}
|
|
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
|
-
}
|
|
41
26
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { OutputImageParams } from '../image_params/output_image_params'
|
|
2
|
-
import { ImageUpload } from './image_upload'
|
|
3
|
-
|
|
4
1
|
export class SearchPersonRequest {
|
|
5
2
|
imageUpload
|
|
6
3
|
groupIdsForSearch
|
|
7
4
|
threshold
|
|
8
5
|
limit
|
|
9
|
-
tag
|
|
10
6
|
detectAll
|
|
11
7
|
outputImageParams
|
|
12
8
|
|
|
@@ -15,32 +11,7 @@ export class SearchPersonRequest {
|
|
|
15
11
|
this.groupIdsForSearch = params?.groupIdsForSearch
|
|
16
12
|
this.threshold = params?.threshold
|
|
17
13
|
this.limit = params?.limit
|
|
18
|
-
this.tag = params?.tag
|
|
19
14
|
this.detectAll = params?.detectAll ?? false
|
|
20
15
|
this.outputImageParams = params?.outputImageParams
|
|
21
16
|
}
|
|
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
|
-
}
|
|
46
17
|
}
|
package/www/types/index.d.ts
CHANGED
|
@@ -97,18 +97,6 @@ export class FaceSDK {
|
|
|
97
97
|
get serviceUrl(): string | null
|
|
98
98
|
set serviceUrl(val: string | null)
|
|
99
99
|
|
|
100
|
-
/** Customer name. */
|
|
101
|
-
tenant: string | null;
|
|
102
|
-
|
|
103
|
-
/** Environment type. */
|
|
104
|
-
env: string | null;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Custom language locale code of DocumentReaderSDK.
|
|
108
|
-
* If empty or doesn't exist - app language is used. Format "en-US" or "en".
|
|
109
|
-
*/
|
|
110
|
-
locale: string | null;
|
|
111
|
-
|
|
112
100
|
/**
|
|
113
101
|
* A localization dictionary to override default localization logic.
|
|
114
102
|
* Allows to replace any string of FaceSDK with an arbitrary string.
|
|
@@ -20,9 +20,6 @@ export class SearchPersonRequest {
|
|
|
20
20
|
* @param params.limit - The number of returned Persons limit.
|
|
21
21
|
* Default: 100.
|
|
22
22
|
*
|
|
23
|
-
* @param tag - Defines tag that can be used in search request.
|
|
24
|
-
* Default: null.
|
|
25
|
-
*
|
|
26
23
|
* @param params.detectAll - Whether to process only the one face on the image or all the faces.
|
|
27
24
|
* Default: `false`.
|
|
28
25
|
*
|
|
@@ -35,7 +32,6 @@ export class SearchPersonRequest {
|
|
|
35
32
|
groupIdsForSearch?: string[],
|
|
36
33
|
threshold?: number,
|
|
37
34
|
limit?: number,
|
|
38
|
-
tag?: string,
|
|
39
35
|
detectAll?: boolean,
|
|
40
36
|
outputImageParams?: OutputImageParams
|
|
41
37
|
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import '@ionic/react/css/core.css'
|
|
2
|
-
import '/src/main.css'
|
|
3
|
-
import { setupIonicReact } from '@ionic/react'
|
|
4
|
-
import { StatusBar, Style } from '@capacitor/status-bar'
|
|
5
|
-
import { File } from '@awesome-cordova-plugins/file'
|
|
6
|
-
import { Camera, DestinationType, MediaType, PictureSourceType } from '@awesome-cordova-plugins/camera'
|
|
7
|
-
import { main } from './src/main'
|
|
8
|
-
import { Dialog } from '@capacitor/dialog'
|
|
9
|
-
|
|
10
|
-
document.addEventListener('deviceready', () => fetch("main.html")
|
|
11
|
-
.then(response => response.text())
|
|
12
|
-
.then(html => document.getElementById("content").innerHTML = html)
|
|
13
|
-
.then(_ => document.dispatchEvent(new Event('ready')))
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
export async function loadAssetIfExists(path: string): Promise<string | null> {
|
|
17
|
-
try {
|
|
18
|
-
var dir = await File.resolveDirectoryUrl(File.applicationDirectory + "public/assets")
|
|
19
|
-
var fileEntry = await File.getFile(dir, path, null)
|
|
20
|
-
var result = await new Promise<string | null>((resolve, _) => {
|
|
21
|
-
fileEntry.file(file => {
|
|
22
|
-
var reader = new FileReader()
|
|
23
|
-
reader.onloadend = (_) => resolve(reader.result as string)
|
|
24
|
-
reader.readAsDataURL(file)
|
|
25
|
-
}, _ => resolve(null))
|
|
26
|
-
})
|
|
27
|
-
return result
|
|
28
|
-
} catch (_) {
|
|
29
|
-
return null
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export async function pickImage(): Promise<string | null> {
|
|
34
|
-
return await Camera.getPicture({
|
|
35
|
-
destinationType: DestinationType.DATA_URL,
|
|
36
|
-
mediaType: MediaType.PICTURE,
|
|
37
|
-
sourceType: PictureSourceType.PHOTOLIBRARY
|
|
38
|
-
})
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export async function chooseOption(): Promise<boolean | null> {
|
|
42
|
-
var response = await Dialog.confirm({
|
|
43
|
-
message: "Select option",
|
|
44
|
-
okButtonTitle: "Use camera",
|
|
45
|
-
cancelButtonTitle: "Use gallery"
|
|
46
|
-
})
|
|
47
|
-
return response.value
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
document.addEventListener('ready', main)
|
|
51
|
-
|
|
52
|
-
setupIonicReact()
|
|
53
|
-
StatusBar.setStyle({ style: Style.Light })
|
package/examples/ionic/index.tsx
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import 'zone.js';
|
|
2
|
-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
|
|
3
|
-
import { BrowserModule } from '@angular/platform-browser'
|
|
4
|
-
import { IonicModule, Platform } from '@ionic/angular'
|
|
5
|
-
import { NgModule } from '@angular/core'
|
|
6
|
-
|
|
7
|
-
import { Component } from '@angular/core'
|
|
8
|
-
import { File } from '@awesome-cordova-plugins/file'
|
|
9
|
-
import { Camera, DestinationType, MediaType, PictureSourceType } from '@awesome-cordova-plugins/camera/ngx'
|
|
10
|
-
import { Dialogs } from '@awesome-cordova-plugins/dialogs/ngx'
|
|
11
|
-
|
|
12
|
-
import { main } from './src/main'
|
|
13
|
-
|
|
14
|
-
export async function loadAssetIfExists(path: string): Promise<string | null> {
|
|
15
|
-
try {
|
|
16
|
-
var dir = await File.resolveDirectoryUrl(File.applicationDirectory + "www/assets")
|
|
17
|
-
var fileEntry = await File.getFile(dir, path, null)
|
|
18
|
-
var result = await new Promise<string | null>((resolve, _) => {
|
|
19
|
-
fileEntry.file(file => {
|
|
20
|
-
var reader = new FileReader()
|
|
21
|
-
reader.onloadend = (_) => resolve(reader.result as string)
|
|
22
|
-
reader.readAsDataURL(file)
|
|
23
|
-
}, _ => resolve(null))
|
|
24
|
-
})
|
|
25
|
-
return result
|
|
26
|
-
} catch (_) {
|
|
27
|
-
return null
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export async function pickImage(): Promise<string | null> {
|
|
32
|
-
return await cameraInstance.getPicture({
|
|
33
|
-
destinationType: DestinationType.DATA_URL,
|
|
34
|
-
mediaType: MediaType.PICTURE,
|
|
35
|
-
sourceType: PictureSourceType.PHOTOLIBRARY
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export async function chooseOption(): Promise<boolean | null> {
|
|
40
|
-
return await dialogsInstance.confirm("", "Select option", [
|
|
41
|
-
"Use camera",
|
|
42
|
-
"Use gallery"
|
|
43
|
-
]) == 1
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
var cameraInstance: Camera
|
|
47
|
-
var dialogsInstance: Dialogs
|
|
48
|
-
@Component({
|
|
49
|
-
selector: 'app-root',
|
|
50
|
-
templateUrl: 'src/main.html',
|
|
51
|
-
styleUrl: 'src/main.css'
|
|
52
|
-
})
|
|
53
|
-
class Main {
|
|
54
|
-
constructor(platform: Platform, camera: Camera, dialogs: Dialogs) {
|
|
55
|
-
cameraInstance = camera
|
|
56
|
-
dialogsInstance = dialogs
|
|
57
|
-
platform.ready().then(main)
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@NgModule({
|
|
62
|
-
bootstrap: [Main],
|
|
63
|
-
providers: [Platform, Camera, Dialogs],
|
|
64
|
-
imports: [BrowserModule, IonicModule.forRoot()]
|
|
65
|
-
})
|
|
66
|
-
class MainModule { }
|
|
67
|
-
|
|
68
|
-
platformBrowserDynamic().bootstrapModule(MainModule)
|