@regulaforensics/face-sdk 6.3.82-beta → 6.3.85-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 (82) hide show
  1. package/README.md +3 -2
  2. package/RNFaceSDK.podspec +3 -3
  3. package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +4 -2
  4. package/examples/capacitor/README.md +4 -4
  5. package/examples/capacitor/android/build.gradle +2 -2
  6. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  7. package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +2 -2
  8. package/examples/capacitor/ios/App/Podfile +1 -1
  9. package/examples/capacitor/package.json +13 -13
  10. package/examples/capacitor/scripts/android.sh +9 -0
  11. package/examples/capacitor/scripts/ios.sh +8 -0
  12. package/examples/capacitor/scripts/setup.sh +4 -0
  13. package/examples/cordova/README.md +4 -4
  14. package/examples/cordova/config.xml +2 -2
  15. package/examples/cordova/package.json +10 -16
  16. package/examples/cordova/scripts/android.sh +8 -0
  17. package/examples/cordova/scripts/ios.sh +8 -0
  18. package/examples/cordova/scripts/setup.sh +5 -0
  19. package/examples/cordova/www/js/index.js +13 -13
  20. package/examples/ionic/README.md +4 -4
  21. package/examples/ionic/config.xml +2 -2
  22. package/examples/ionic/package.json +16 -17
  23. package/examples/ionic/scripts/android.sh +8 -0
  24. package/examples/ionic/scripts/ios.sh +8 -0
  25. package/examples/ionic/scripts/setup.sh +5 -0
  26. package/examples/react-native/Gemfile +1 -0
  27. package/examples/react-native/Gemfile.lock +26 -23
  28. package/examples/react-native/README.md +4 -4
  29. package/examples/react-native/android/app/src/main/java/com/regula/face/api/MainApplication.kt +2 -1
  30. package/examples/react-native/android/build.gradle +3 -3
  31. package/examples/react-native/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  32. package/examples/react-native/android/gradle/wrapper/gradle-wrapper.properties +2 -2
  33. package/examples/react-native/android/gradlew +4 -1
  34. package/examples/react-native/ios/Podfile.lock +319 -303
  35. package/examples/react-native/package-lock.json +6101 -6298
  36. package/examples/react-native/package.json +20 -18
  37. package/examples/react-native/scripts/android.sh +8 -0
  38. package/examples/react-native/scripts/ios.sh +8 -0
  39. package/examples/react-native/scripts/setup.sh +8 -0
  40. package/package.json +2 -2
  41. package/plugin.xml +3 -2
  42. package/www/capacitor/liveness/liveness_backend_exception.js +3 -0
  43. package/www/cordova.js +4 -1
  44. package/www/react-native/liveness/liveness_backend_exception.js +3 -0
  45. package/www/types/customization/camera_position.d.ts +9 -0
  46. package/www/types/customization/customization.d.ts +22 -0
  47. package/www/types/customization/customization_colors.d.ts +6 -0
  48. package/www/types/customization/customization_fonts.d.ts +6 -0
  49. package/www/types/customization/customization_images.d.ts +6 -0
  50. package/www/types/customization/font.d.ts +19 -0
  51. package/www/types/detect_faces/detect_faces_config.d.ts +18 -0
  52. package/www/types/detect_faces/detect_faces_exception.d.ts +3 -0
  53. package/www/types/detect_faces/detect_faces_request.d.ts +53 -0
  54. package/www/types/face_capture/face_capture_config.d.ts +9 -0
  55. package/www/types/face_capture/face_capture_image.d.ts +24 -0
  56. package/www/types/image_params/output_image_crop.d.ts +24 -0
  57. package/www/types/image_params/output_image_params.d.ts +15 -0
  58. package/www/types/image_params/point.d.ts +3 -0
  59. package/www/types/image_quality/image_quality_characteristic.d.ts +3 -0
  60. package/www/types/image_quality/image_quality_characteristic_name.d.ts +3 -0
  61. package/www/types/image_quality/image_quality_group.d.ts +263 -0
  62. package/www/types/index.d.ts +40 -10
  63. package/www/types/init/face_sdk_version.d.ts +9 -0
  64. package/www/types/init/init_config.d.ts +9 -0
  65. package/www/types/liveness/liveness_backend_exception.d.ts +3 -0
  66. package/www/types/liveness/liveness_config.d.ts +66 -0
  67. package/www/types/liveness/liveness_notification.d.ts +3 -0
  68. package/www/types/liveness/liveness_response.d.ts +24 -0
  69. package/www/types/match_faces/compared_face.d.ts +18 -0
  70. package/www/types/match_faces/compared_faces_pair.d.ts +24 -0
  71. package/www/types/match_faces/match_faces_detection.d.ts +18 -0
  72. package/www/types/match_faces/match_faces_detection_face.d.ts +30 -0
  73. package/www/types/match_faces/match_faces_image.d.ts +18 -0
  74. package/www/types/match_faces/match_faces_request.d.ts +16 -0
  75. package/www/types/match_faces/match_faces_response.d.ts +15 -0
  76. package/www/types/person_database/image_upload.d.ts +14 -0
  77. package/www/types/person_database/person.d.ts +23 -0
  78. package/www/types/person_database/person_database.d.ts +3 -0
  79. package/www/types/person_database/person_group.d.ts +14 -0
  80. package/www/types/person_database/search_person.d.ts +16 -0
  81. package/www/types/person_database/search_person_image.d.ts +13 -0
  82. package/www/types/person_database/search_person_request.d.ts +24 -0
@@ -7,6 +7,9 @@ export class LivenessNotification {
7
7
  private constructor()
8
8
  }
9
9
 
10
+ /**
11
+ * Liveness process statuses.
12
+ */
10
13
  export enum LivenessProcessStatus {
11
14
  START,
12
15
  PREPARING,
@@ -1,18 +1,42 @@
1
1
 
2
2
  import { LivenessException } from './liveness_exception'
3
3
 
4
+ /**
5
+ * The response from the Liveness module.
6
+ */
4
7
  export class LivenessResponse {
8
+ /**
9
+ * The input image used to determine the liveness.
10
+ */
5
11
  get image(): string | null
12
+
13
+ /**
14
+ * The status of the Liveness processing.
15
+ */
6
16
  get liveness(): LivenessStatus
17
+
7
18
  get tag(): string | null
8
19
  get transactionId(): string | null
9
20
  get estimatedAge(): number | null
21
+
22
+ /**
23
+ * The error describes a failed liveness check and contains {@link LivenessErrorCode} codes.
24
+ */
10
25
  get error(): LivenessException | null
11
26
 
12
27
  private constructor()
13
28
  }
14
29
 
30
+ /**
31
+ * The status of the Liveness processing.
32
+ */
15
33
  export enum LivenessStatus {
34
+ /**
35
+ * The liveness check is passed successfully.
36
+ */
16
37
  PASSED,
38
+ /**
39
+ * The liveness check result is unknown.
40
+ */
17
41
  UNKNOWN,
18
42
  }
@@ -1,10 +1,28 @@
1
1
  import { MatchFacesImage } from './match_faces_image'
2
2
  import { MatchFacesDetectionFace } from './match_faces_detection_face'
3
3
 
4
+ /**
5
+ * Represents a reference information of the compared face.
6
+ */
4
7
  export class ComparedFace {
8
+ /**
9
+ * The index to the input image in the input array provided to the request.
10
+ */
5
11
  get imageIndex(): number
12
+
13
+ /**
14
+ * The input image used for comparison operation.
15
+ */
6
16
  get image(): MatchFacesImage
17
+
18
+ /**
19
+ * The index to the array of `faces` in the `detection` results.
20
+ */
7
21
  get faceIndex(): number | null
22
+
23
+ /**
24
+ * The face detection result.
25
+ */
8
26
  get face(): MatchFacesDetectionFace | null
9
27
 
10
28
  private constructor()
@@ -1,11 +1,35 @@
1
1
  import { ComparedFace } from './compared_face'
2
2
  import { MatchFacesException } from './match_faces_exception'
3
3
 
4
+ /**
5
+ * Represents a result of the {@link ComparedFace} attempt to compare input images.
6
+ */
4
7
  export class ComparedFacesPair {
8
+ /**
9
+ * The first face in the comparison pair.
10
+ */
5
11
  get first(): ComparedFace
12
+
13
+ /**
14
+ * The second face in the comparison pair.
15
+ */
6
16
  get second(): ComparedFace
17
+
18
+ /**
19
+ * Similarity of the faces pair. Floating point value from 0 to 1.
20
+ */
7
21
  get similarity(): number
22
+
23
+ /**
24
+ * The raw value returned by the service without applying any thresholds or comparison rules.
25
+ * The value shows the degree of similarity of compared faces, the lower - the more similar, and vice versa less similar.
26
+ * The `score` is used in conjunction with the input image `imageType` to evaluate `similarity`.
27
+ */
8
28
  get score(): number
29
+
30
+ /**
31
+ * The error describes a failed pair comparison and contains {@link MatchFacesErrorCode} codes.
32
+ */
9
33
  get error(): MatchFacesException | null
10
34
 
11
35
  private constructor()
@@ -2,10 +2,28 @@ import { MatchFacesImage } from './match_faces_image'
2
2
  import { MatchFacesDetectionFace } from './match_faces_detection_face'
3
3
  import { MatchFacesException } from './match_faces_exception'
4
4
 
5
+ /**
6
+ * Represents detection results on an input image as a part of {@link MatchFacesResponse}.
7
+ */
5
8
  export class MatchFacesDetection {
9
+ /**
10
+ * The index to the input image in the input array provided to the request.
11
+ */
6
12
  get imageIndex(): number
13
+
14
+ /**
15
+ * The input image used for comparison operation.
16
+ */
7
17
  get image(): MatchFacesImage
18
+
19
+ /**
20
+ * The array of faces detected on the image.
21
+ */
8
22
  get faces(): Array<MatchFacesDetectionFace>
23
+
24
+ /**
25
+ * The error describes a failed face detection and contains {@link MatchFacesErrorCode} codes.
26
+ */
9
27
  get error(): MatchFacesException | null
10
28
 
11
29
  private constructor()
@@ -1,12 +1,42 @@
1
1
  import { Point } from '../image_params/point'
2
2
  import { Rect } from '../image_params/rect'
3
3
 
4
+ /**
5
+ * Represents face detection information as a part of {@link MatchFacesResponse}.
6
+ */
4
7
  export class MatchFacesDetectionFace {
8
+ /**
9
+ * The index of the face detection object in the array of detections.
10
+ */
5
11
  get faceIndex(): number
12
+
13
+ /**
14
+ * Main coordinates of the detected face (eyes, nose, lips, ears and etc.).
15
+ */
6
16
  get landmarks(): Array<Point>
17
+
18
+ /**
19
+ * Rectangular area of the detected face in the original image.
20
+ */
7
21
  get faceRect(): Rect
22
+
23
+ /**
24
+ * Rotation is measured counterclockwise in degrees, with zero indicating
25
+ * that a line drawn between the eyes is horizontal relative to the image orientation.
26
+ */
8
27
  get rotationAngle(): number | null
28
+
29
+ /**
30
+ * Coordinates of the rectangle with the face on the original image prepared for the face crop.
31
+ * Requires {@link OutputImageCrop.returnOriginalRect} is set.
32
+ * Returns `null` if {@link OutputImageCrop.returnOriginalRect} isn't set.
33
+ */
9
34
  get originalRect(): Rect | null
35
+
36
+ /**
37
+ * String image of the aligned and cropped portrait.
38
+ * Returned if {@link MatchFacesRequest.outputImageParams} is set or predefined scenario is used.
39
+ */
10
40
  get crop(): string | null
11
41
 
12
42
  private constructor()
@@ -1,9 +1,27 @@
1
1
  import { ImageType } from '../face_capture/face_capture_image'
2
2
 
3
+ /**
4
+ * This class represents the input image and its attributes for {@link MatchFacesRequest}.
5
+ */
3
6
  export class MatchFacesImage {
7
+ /**
8
+ * The underlying image.
9
+ */
4
10
  get image(): string
11
+
12
+ /**
13
+ * The image type.
14
+ * The imageType influences matching results, therefore this field is required.
15
+ */
5
16
  get imageType(): ImageType
17
+
18
+ /**
19
+ * Defines whether the comparison and detection should apply for all faces found on the image. Defaults to `false`.
20
+ * When set to `false`, only the most centered faces are compared and detected.
21
+ * Otherwise, all the faces are compared and detected.
22
+ */
6
23
  get detectAll(): boolean
24
+
7
25
  get identifier(): string
8
26
 
9
27
  constructor(
@@ -1,10 +1,26 @@
1
1
  import { MatchFacesImage } from './match_faces_image'
2
2
  import { OutputImageParams } from '../image_params/output_image_params'
3
3
 
4
+ /**
5
+ * Compares two or more images with faces on them to find out the similarity of pairs.
6
+ * The request is used as a parameter to {@link FaceSDK.matchFaces}.
7
+ */
4
8
  export class MatchFacesRequest {
9
+ /**
10
+ * Images with faces to match.
11
+ */
5
12
  get images(): Array<MatchFacesImage>
13
+
14
+ /**
15
+ * If set the uploaded image is processed according to the indicated settings.
16
+ */
6
17
  get outputImageParams(): OutputImageParams | null
18
+
19
+ /**
20
+ * Defines tag that can be used in match faces processing. Defaults to `null`.
21
+ */
7
22
  get tag(): string | null
23
+
8
24
  get metadata(): Record<string, any> | null
9
25
 
10
26
  constructor(
@@ -2,10 +2,25 @@ import { ComparedFacesPair } from './compared_faces_pair'
2
2
  import { MatchFacesDetection } from './match_faces_detection'
3
3
  import { MatchFacesException } from './match_faces_exception'
4
4
 
5
+ /**
6
+ * The response from the {@link MatchFacesRequest}.
7
+ */
5
8
  export class MatchFacesResponse {
9
+ /**
10
+ * Face comparison results with score and similarity values.
11
+ */
6
12
  get results(): Array<ComparedFacesPair>
13
+
14
+ /**
15
+ * Face detection results for each given image.
16
+ */
7
17
  get detections(): Array<MatchFacesDetection>
18
+
8
19
  get tag(): string | null
20
+
21
+ /**
22
+ * The error describes a failed match faces request and contains {@link MatchFacesErrorCode} codes.
23
+ */
9
24
  get error(): MatchFacesException | null
10
25
 
11
26
  private constructor()
@@ -1,5 +1,19 @@
1
+ /**
2
+ * An object that represents uploaded image with its settings.
3
+ */
1
4
  export class ImageUpload {
5
+ /**
6
+ * Creates an object of {@link ImageUpload} using an image.
7
+ *
8
+ * @param imageData - Image base64.
9
+ */
2
10
  static withImageData(imageData: string): ImageUpload
11
+
12
+ /**
13
+ * Creates an object of {@link ImageUpload} using an image url.
14
+ *
15
+ * @param imageUrl - Image url.
16
+ */
3
17
  static withImageUrl(imageUrl: string): ImageUpload
4
18
 
5
19
  private constructor()
@@ -1,9 +1,32 @@
1
+
2
+ /**
3
+ * A Person Database object that represents Person.
4
+ */
1
5
  export class Person {
6
+ /**
7
+ * Person name.
8
+ * Updatable field.
9
+ */
2
10
  name: string
11
+
12
+ /**
13
+ * Person update date.
14
+ */
3
15
  get updatedAt(): Date
16
+
17
+ /**
18
+ * Array if Group IDs Person belongs to.
19
+ */
4
20
  get groups(): string[]
21
+
5
22
  get id(): string
23
+
24
+ /**
25
+ * A free-form object containing Person extended attributes.
26
+ * Updatable field.
27
+ */
6
28
  metadata: any
29
+
7
30
  get createdAt(): Date
8
31
 
9
32
  private constructor()
@@ -7,6 +7,9 @@ import { EditGroupPersonsRequest } from './edit_group_persons_request'
7
7
  import { SearchPersonRequest } from './search_person_request'
8
8
  import { SearchPerson } from './search_person'
9
9
 
10
+ /**
11
+ * Represents Regula Database layer and is the entry point for Person Database operations.
12
+ */
10
13
  export class PersonDatabase {
11
14
  createPerson(
12
15
  name: string,
@@ -1,7 +1,21 @@
1
+ /**
2
+ * Person Database object that represents Group of {@link Person}.
3
+ */
1
4
  export class PersonGroup {
5
+ /**
6
+ * PersonGroup name.
7
+ * Updatable field.
8
+ */
2
9
  name: string
10
+
3
11
  get id(): string
12
+
13
+ /**
14
+ * A free-form object containing Group extended attributes.
15
+ * Updatable field.
16
+ */
4
17
  metadata: any
18
+
5
19
  get createdAt(): Date
6
20
 
7
21
  private constructor()
@@ -1,14 +1,30 @@
1
1
  import { SearchPersonImage } from './search_person_image'
2
2
  import { SearchPersonDetection } from './search_person_detection'
3
3
 
4
+ /**
5
+ * A Person Database object that represents th result of Person search.
6
+ */
4
7
  export class SearchPerson {
8
+ /**
9
+ * Array of images where the Person is found.
10
+ */
5
11
  get images(): SearchPersonImage[]
12
+
13
+ /**
14
+ * Detection data relative to the search input image.
15
+ */
6
16
  get detection(): SearchPersonDetection | null
17
+
7
18
  name: string
19
+
8
20
  get updatedAt(): Date
21
+
9
22
  get groups(): string[]
23
+
10
24
  get id(): string
25
+
11
26
  metadata: any
27
+
12
28
  get createdAt(): Date
13
29
 
14
30
  private constructor()
@@ -1,5 +1,18 @@
1
+ /**
2
+ * A Person Database object that represents Image result of Person Search.
3
+ */
1
4
  export class SearchPersonImage {
5
+ /**
6
+ * The similarity score.
7
+ * From 0.0 to 1.0.
8
+ */
2
9
  get similarity(): number
10
+
11
+ /**
12
+ * The similarity distance score.
13
+ * The lower the distance, the higher the face's similarity.
14
+ * From 0.0 to 2.0.
15
+ */
3
16
  get distance(): number
4
17
  get path(): string
5
18
  get url(): string
@@ -1,7 +1,31 @@
1
1
  import { ImageUpload } from './image_upload'
2
2
  import { OutputImageParams } from '../image_params/output_image_params'
3
3
 
4
+ /**
5
+ * Request object that configures Search settings.
6
+ */
4
7
  export class SearchPersonRequest {
8
+ /**
9
+ * Create {@link SearchPersonRequest} object.
10
+ *
11
+ * @param image - Image Upload object to apply search with.
12
+ *
13
+ * @param params.groupIdsForSearch - The Group IDs of the groups in which the search is performed.
14
+ *
15
+ * @param params.threshold - The similarity distance threshold, should be between 0.0 and 2.0,
16
+ * where 0.0 is for returning results for only the most similar persons and 2.0
17
+ * is for all the persons, even the dissimilar ones.
18
+ * Default: 1.
19
+ *
20
+ * @param params.limit - The number of returned Persons limit.
21
+ * Default: 100.
22
+ *
23
+ * @param params.detectAll - Whether to process only the one face on the image or all the faces.
24
+ * Default: `false`.
25
+ *
26
+ * @param params.outputImageParams - If set the uploaded image is processed according to the indicated settings.
27
+ */
28
+
5
29
  constructor(
6
30
  image: ImageUpload,
7
31
  params?: {