@regulaforensics/face-sdk 7.2.422-beta → 7.2.425-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.
Files changed (171) hide show
  1. package/README.md +2 -3
  2. package/RNFaceSDK.podspec +1 -1
  3. package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +2 -0
  4. package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +18 -0
  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 +17 -3
  9. package/examples/capacitor/package.json +2 -2
  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 +849 -763
  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 +618 -621
  28. package/examples/react_native/package.json +8 -8
  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 -79
  32. package/ios/RFSWJSONConstructor.h +0 -1
  33. package/ios/RFSWJSONConstructor.m +5 -14
  34. package/ios/RFSWMain.m +30 -0
  35. package/package.json +1 -1
  36. package/plugin.xml +1 -1
  37. package/test/json.tsx +375 -0
  38. package/test/package-lock.json +584 -0
  39. package/test/package.json +9 -0
  40. package/test/test.tsx +61 -0
  41. package/test/utils.tsx +38 -0
  42. package/www/capacitor/customization/customization_fonts.js +1 -1
  43. package/www/capacitor/customization/customization_images.js +1 -1
  44. package/www/capacitor/customization/font.js +8 -0
  45. package/www/capacitor/detect_faces/detect_face_result.js +12 -0
  46. package/www/capacitor/detect_faces/detect_faces_attribute_result.js +9 -0
  47. package/www/capacitor/detect_faces/detect_faces_backend_exception.js +7 -0
  48. package/www/capacitor/detect_faces/detect_faces_config.js +34 -0
  49. package/www/capacitor/detect_faces/detect_faces_exception.js +8 -0
  50. package/www/capacitor/detect_faces/detect_faces_request.js +22 -0
  51. package/www/capacitor/detect_faces/detect_faces_response.js +9 -0
  52. package/www/capacitor/face_capture/face_capture_config.js +37 -0
  53. package/www/capacitor/face_capture/face_capture_exception.js +7 -0
  54. package/www/capacitor/face_capture/face_capture_image.js +8 -0
  55. package/www/capacitor/face_capture/face_capture_response.js +7 -0
  56. package/www/capacitor/image_params/output_image_crop.js +23 -0
  57. package/www/capacitor/image_params/output_image_params.js +19 -0
  58. package/www/capacitor/image_params/point.js +7 -0
  59. package/www/capacitor/image_params/rect.js +9 -0
  60. package/www/capacitor/image_params/size.js +12 -0
  61. package/www/capacitor/image_quality/image_quality_characteristic.js +22 -0
  62. package/www/capacitor/image_quality/image_quality_range.js +7 -0
  63. package/www/capacitor/image_quality/image_quality_result.js +10 -0
  64. package/www/capacitor/index.js +48 -0
  65. package/www/capacitor/init/face_sdk_version.js +8 -0
  66. package/www/capacitor/init/init_config.js +19 -0
  67. package/www/capacitor/init/init_exception.js +8 -0
  68. package/www/capacitor/init/license_exception.js +7 -0
  69. package/www/capacitor/internal/bridge.js +20 -1
  70. package/www/capacitor/liveness/liveness_backend_exception.js +7 -0
  71. package/www/capacitor/liveness/liveness_config.js +43 -0
  72. package/www/capacitor/liveness/liveness_exception.js +8 -0
  73. package/www/capacitor/liveness/liveness_notification.js +7 -0
  74. package/www/capacitor/liveness/liveness_response.js +11 -0
  75. package/www/capacitor/match_faces/compared_face.js +9 -0
  76. package/www/capacitor/match_faces/compared_faces_pair.js +10 -0
  77. package/www/capacitor/match_faces/compared_faces_split.js +7 -0
  78. package/www/capacitor/match_faces/match_faces_backend_exception.js +7 -0
  79. package/www/capacitor/match_faces/match_faces_config.js +19 -0
  80. package/www/capacitor/match_faces/match_faces_detection.js +9 -0
  81. package/www/capacitor/match_faces/match_faces_detection_face.js +11 -0
  82. package/www/capacitor/match_faces/match_faces_exception.js +8 -0
  83. package/www/capacitor/match_faces/match_faces_image.js +9 -0
  84. package/www/capacitor/match_faces/match_faces_request.js +27 -0
  85. package/www/capacitor/match_faces/match_faces_response.js +9 -0
  86. package/www/capacitor/person_database/edit_group_persons_request.js +15 -0
  87. package/www/capacitor/person_database/image_upload.js +17 -0
  88. package/www/capacitor/person_database/pageable_item_list.js +8 -0
  89. package/www/capacitor/person_database/person.js +13 -0
  90. package/www/capacitor/person_database/person_group.js +11 -0
  91. package/www/capacitor/person_database/person_image.js +13 -0
  92. package/www/capacitor/person_database/search_person.js +14 -0
  93. package/www/capacitor/person_database/search_person_detection.js +9 -0
  94. package/www/capacitor/person_database/search_person_image.js +15 -0
  95. package/www/capacitor/person_database/search_person_request.js +29 -0
  96. package/www/cordova.js +753 -6
  97. package/www/react-native/customization/customization_fonts.js +1 -1
  98. package/www/react-native/customization/customization_images.js +1 -1
  99. package/www/react-native/customization/font.js +8 -0
  100. package/www/react-native/detect_faces/detect_face_result.js +12 -0
  101. package/www/react-native/detect_faces/detect_faces_attribute_result.js +9 -0
  102. package/www/react-native/detect_faces/detect_faces_backend_exception.js +7 -0
  103. package/www/react-native/detect_faces/detect_faces_config.js +34 -0
  104. package/www/react-native/detect_faces/detect_faces_exception.js +8 -0
  105. package/www/react-native/detect_faces/detect_faces_request.js +22 -0
  106. package/www/react-native/detect_faces/detect_faces_response.js +9 -0
  107. package/www/react-native/face_capture/face_capture_config.js +37 -0
  108. package/www/react-native/face_capture/face_capture_exception.js +7 -0
  109. package/www/react-native/face_capture/face_capture_image.js +8 -0
  110. package/www/react-native/face_capture/face_capture_response.js +7 -0
  111. package/www/react-native/image_params/output_image_crop.js +23 -0
  112. package/www/react-native/image_params/output_image_params.js +19 -0
  113. package/www/react-native/image_params/point.js +7 -0
  114. package/www/react-native/image_params/rect.js +9 -0
  115. package/www/react-native/image_params/size.js +12 -0
  116. package/www/react-native/image_quality/image_quality_characteristic.js +22 -0
  117. package/www/react-native/image_quality/image_quality_range.js +7 -0
  118. package/www/react-native/image_quality/image_quality_result.js +10 -0
  119. package/www/react-native/index.js +48 -0
  120. package/www/react-native/init/face_sdk_version.js +8 -0
  121. package/www/react-native/init/init_config.js +19 -0
  122. package/www/react-native/init/init_exception.js +8 -0
  123. package/www/react-native/init/license_exception.js +7 -0
  124. package/www/react-native/internal/bridge.js +20 -1
  125. package/www/react-native/liveness/liveness_backend_exception.js +7 -0
  126. package/www/react-native/liveness/liveness_config.js +43 -0
  127. package/www/react-native/liveness/liveness_exception.js +8 -0
  128. package/www/react-native/liveness/liveness_notification.js +7 -0
  129. package/www/react-native/liveness/liveness_response.js +11 -0
  130. package/www/react-native/match_faces/compared_face.js +9 -0
  131. package/www/react-native/match_faces/compared_faces_pair.js +10 -0
  132. package/www/react-native/match_faces/compared_faces_split.js +7 -0
  133. package/www/react-native/match_faces/match_faces_backend_exception.js +7 -0
  134. package/www/react-native/match_faces/match_faces_config.js +19 -0
  135. package/www/react-native/match_faces/match_faces_detection.js +9 -0
  136. package/www/react-native/match_faces/match_faces_detection_face.js +11 -0
  137. package/www/react-native/match_faces/match_faces_exception.js +8 -0
  138. package/www/react-native/match_faces/match_faces_image.js +9 -0
  139. package/www/react-native/match_faces/match_faces_request.js +27 -0
  140. package/www/react-native/match_faces/match_faces_response.js +9 -0
  141. package/www/react-native/person_database/edit_group_persons_request.js +15 -0
  142. package/www/react-native/person_database/image_upload.js +17 -0
  143. package/www/react-native/person_database/pageable_item_list.js +8 -0
  144. package/www/react-native/person_database/person.js +13 -0
  145. package/www/react-native/person_database/person_group.js +11 -0
  146. package/www/react-native/person_database/person_image.js +13 -0
  147. package/www/react-native/person_database/search_person.js +14 -0
  148. package/www/react-native/person_database/search_person_detection.js +9 -0
  149. package/www/react-native/person_database/search_person_image.js +15 -0
  150. package/www/react-native/person_database/search_person_request.js +29 -0
  151. package/www/types/index.d.ts +12 -0
  152. package/www/types/match_faces/match_faces_config.d.ts +2 -0
  153. package/www/types/person_database/search_person_request.d.ts +4 -0
  154. package/examples/cordova/.vscode/launch.json +0 -28
  155. package/examples/cordova/README.md +0 -25
  156. package/examples/cordova/config.xml +0 -26
  157. package/examples/cordova/package-lock.json +0 -1313
  158. package/examples/cordova/package.json +0 -30
  159. package/examples/cordova/scripts/android.sh +0 -8
  160. package/examples/cordova/scripts/ios.sh +0 -8
  161. package/examples/cordova/scripts/setup.sh +0 -8
  162. package/examples/cordova/www/images/logo.png +0 -0
  163. package/examples/cordova/www/index.html +0 -21
  164. package/examples/cordova/www/src/main.css +0 -83
  165. package/examples/cordova/www/src/main.html +0 -25
  166. package/examples/cordova/www/src/main.js +0 -152
  167. package/examples/ionic/index.ts +0 -17
  168. package/examples/ionic/src/images/portrait.png +0 -0
  169. /package/examples/ionic/{src/assets → assets}/.gitkeep +0 -0
  170. /package/examples/ionic/{src/images → images}/icon.png +0 -0
  171. /package/examples/{cordova/www → ionic}/images/portrait.png +0 -0
@@ -15,6 +15,14 @@ export class LivenessException {
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 LivenessErrorCode = {
@@ -13,6 +13,13 @@ export class LivenessNotification {
13
13
 
14
14
  return result
15
15
  }
16
+
17
+ toJson() {
18
+ return {
19
+ "status": this.status,
20
+ "response": this.response?.toJson(),
21
+ }
22
+ }
16
23
  }
17
24
 
18
25
  export const LivenessProcessStatus = {
@@ -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 = {
@@ -18,4 +18,13 @@ export class ComparedFace {
18
18
 
19
19
  return result
20
20
  }
21
+
22
+ toJson() {
23
+ return {
24
+ "imageIndex": this.imageIndex,
25
+ "image": this.image?.toJson(),
26
+ "faceIndex": this.faceIndex,
27
+ "face": this.face?.toJson(),
28
+ }
29
+ }
21
30
  }
@@ -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
  }
@@ -19,4 +19,11 @@ export class ComparedFacesSplit {
19
19
 
20
20
  return result
21
21
  }
22
+
23
+ toJson() {
24
+ return {
25
+ "matchedFaces": this.matchedFaces?.map(e => e.toJson()),
26
+ "unmatchedFaces": this.unmatchedFaces?.map(e => e.toJson()),
27
+ }
28
+ }
22
29
  }
@@ -11,4 +11,11 @@ export class MatchFacesBackendException {
11
11
 
12
12
  return result
13
13
  }
14
+
15
+ toJson() {
16
+ return {
17
+ "code": this.code,
18
+ "message": this.message,
19
+ }
20
+ }
14
21
  }
@@ -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 = {
@@ -22,4 +22,13 @@ export class MatchFacesImage {
22
22
 
23
23
  return result
24
24
  }
25
+
26
+ toJson() {
27
+ return {
28
+ "image": this.image,
29
+ "imageType": this.imageType,
30
+ "detectAll": this.detectAll,
31
+ "identifier": this.identifier,
32
+ }
33
+ }
25
34
  }
@@ -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
  }
@@ -19,4 +19,12 @@ export class PageableItemList {
19
19
 
20
20
  return result
21
21
  }
22
+
23
+ toJson() {
24
+ return {
25
+ "items": this.items?.map(e => e.toJson()),
26
+ "page": this.page,
27
+ "totalPages": this.totalPages,
28
+ }
29
+ }
22
30
  }
@@ -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
  }
@@ -97,6 +97,18 @@ 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
+
100
112
  /**
101
113
  * A localization dictionary to override default localization logic.
102
114
  * Allows to replace any string of FaceSDK with an arbitrary string.
@@ -1,9 +1,11 @@
1
1
  export class MatchFacesConfig {
2
2
  processingMode: ProcessingMode
3
+ locationTrackingEnabled: boolean
3
4
 
4
5
  constructor(
5
6
  params?: {
6
7
  processingMode?: ProcessingMode
8
+ locationTrackingEnabled?: boolean
7
9
  }
8
10
  )
9
11
  }
@@ -20,6 +20,9 @@ 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
+ *
23
26
  * @param params.detectAll - Whether to process only the one face on the image or all the faces.
24
27
  * Default: `false`.
25
28
  *
@@ -32,6 +35,7 @@ export class SearchPersonRequest {
32
35
  groupIdsForSearch?: string[],
33
36
  threshold?: number,
34
37
  limit?: number,
38
+ tag?: string,
35
39
  detectAll?: boolean,
36
40
  outputImageParams?: OutputImageParams
37
41
  }
@@ -1,28 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "name": "Debug Android on emulator",
9
- "type": "cordova",
10
- "request": "launch",
11
- "platform": "android",
12
- "target": "emulator",
13
- "port": 9222,
14
- "sourceMaps": true,
15
- "cwd": "${workspaceFolder}"
16
- },
17
- {
18
- "name": "Debug Android on device",
19
- "type": "cordova",
20
- "request": "launch",
21
- "platform": "android",
22
- "target": "device",
23
- "port": 9222,
24
- "sourceMaps": true,
25
- "cwd": "${workspaceFolder}"
26
- }
27
- ]
28
- }
@@ -1,25 +0,0 @@
1
- # Regula Face SDK Cordova demo application
2
-
3
- ## How to build demo application
4
- 1. Download or the clone current repository using the command `git clone https://github.com/regulaforensics/npm-face-sdk.git`.
5
-
6
- 2. Execute `npm run setup` within this directory.
7
-
8
- 3. Run the app:
9
- * IOS: `npm run ios`.
10
- * Android: `npm run android`.
11
-
12
- **Note**: this is just one way of running the app. You can also pass `-o` or `--open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
13
-
14
-
15
- ## How to use offline match
16
- 1. Place a license that supports offline match at `www/regula.license`.
17
-
18
- 2. Change core with the following commands:
19
- ```bash
20
- cordova plugin remove @regulaforensics/face-core-basic
21
- cordova plugin add @regulaforensics/face-core-match
22
- npm run setup
23
- ```
24
-
25
- 3. Turn off the internet and run the app.
@@ -1,26 +0,0 @@
1
- <widget android-packageName="com.regula.documentreader.api.androidtest" ios-CFBundleIdentifier="com.regula.documentreader.qa" version="1.0.0"
2
- xmlns:android="http://schemas.android.com/apk/res/android">
3
- <name>FaceSDK</name>
4
- <platform name="android">
5
- <preference name="orientation" value="portrait" />
6
- <preference name="GradlePluginKotlinEnabled" value="true" />
7
- <preference name="android-minSdkVersion" value="24" />
8
- <preference name="android-targetSdkVersion" value="35" />
9
- <config-file parent="/*" target="AndroidManifest.xml">
10
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
11
- </config-file>
12
- <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
13
- <application android:usesCleartextTraffic="true" />
14
- </edit-config>
15
- </platform>
16
- <platform name="ios">
17
- <preference name="orientation" value="portrait" />
18
- <preference name="DisallowOverscroll" value="true" />
19
- <config-file target="*-Info.plist" parent="NSCameraUsageDescription">
20
- <string>To use camera</string>
21
- </config-file>
22
- <config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
23
- <string>To pick images</string>
24
- </config-file>
25
- </platform>
26
- </widget>