@regulaforensics/face-sdk 8.4.1338-nightly → 8.4.1343-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.
- package/RNFaceSDK.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/cordova.gradle +1 -1
- package/android/src/main/{java → kotlin}/com/regula/plugin/facesdk/Config.kt +94 -90
- package/android/src/main/{java/com/regula/plugin/facesdk/Main.kt → kotlin/com/regula/plugin/facesdk/Implementation.kt} +63 -41
- package/android/src/main/{java → kotlin}/com/regula/plugin/facesdk/JSONConstructor.kt +123 -75
- package/android/src/main/{java → kotlin}/com/regula/plugin/facesdk/Utils.kt +18 -2
- package/examples/capacitor/package.json +2 -2
- package/examples/ionic/package.json +2 -2
- package/examples/react_native/package.json +2 -2
- package/ios/Config.swift +100 -104
- package/ios/Decoder.swift +85 -64
- package/ios/Utils.swift +3 -0
- package/package.json +1 -1
- package/plugin.xml +7 -7
- package/test/json.tsx +73 -61
- package/test/test.tsx +8 -11
- package/www/capacitor/index.js +4 -11
- package/www/capacitor/liveness/enrollment_config.js +10 -16
- package/www/capacitor/liveness/enrollment_response.js +14 -10
- package/www/capacitor/liveness/liveness_exception.js +3 -3
- package/www/capacitor/liveness/verification_config.js +16 -4
- package/www/capacitor/liveness/{verify_match_response.js → verification_match_response.js} +5 -5
- package/www/capacitor/liveness/verification_response.js +9 -9
- package/www/capacitor/person_database/person.js +16 -7
- package/www/capacitor/person_database/search_person.js +9 -0
- package/www/capacitor/person_database/search_person_filter.js +44 -0
- package/www/cordova.js +238 -245
- package/www/react-native/index.js +4 -11
- package/www/react-native/liveness/enrollment_config.js +10 -16
- package/www/react-native/liveness/enrollment_response.js +14 -10
- package/www/react-native/liveness/liveness_exception.js +3 -3
- package/www/react-native/liveness/verification_config.js +16 -4
- package/www/react-native/liveness/{verify_match_response.js → verification_match_response.js} +5 -5
- package/www/react-native/liveness/verification_response.js +9 -9
- package/www/react-native/person_database/person.js +16 -7
- package/www/react-native/person_database/search_person.js +9 -0
- package/www/react-native/person_database/search_person_filter.js +44 -0
- package/www/types/index.d.ts +4 -8
- package/www/types/liveness/enrollment_config.d.ts +4 -6
- package/www/types/liveness/enrollment_response.d.ts +5 -4
- package/www/types/liveness/liveness_exception.d.ts +2 -2
- package/www/types/liveness/verification_config.d.ts +49 -5
- package/www/types/liveness/verification_match_response.d.ts +6 -0
- package/www/types/liveness/verification_response.d.ts +5 -5
- package/www/types/person_database/person.d.ts +12 -8
- package/www/types/person_database/search_person.d.ts +6 -0
- package/www/types/person_database/search_person_filter.d.ts +16 -0
- package/www/capacitor/liveness/enrollment_request.js +0 -39
- package/www/capacitor/liveness/error_response.js +0 -21
- package/www/react-native/liveness/enrollment_request.js +0 -39
- package/www/react-native/liveness/error_response.js +0 -21
- package/www/types/liveness/enrollment_request.d.ts +0 -24
- package/www/types/liveness/error_response.d.ts +0 -6
- package/www/types/liveness/verify_match_response.d.ts +0 -6
- /package/android/src/main/{java → kotlin}/com/regula/plugin/facesdk/RNFaceApiModule.kt +0 -0
- /package/ios/{Main.swift → Implementation.swift} +0 -0
|
@@ -104,15 +104,13 @@ export {
|
|
|
104
104
|
|
|
105
105
|
import { LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep } from './liveness/liveness_config'
|
|
106
106
|
import { EnrollmentConfig } from './liveness/enrollment_config'
|
|
107
|
-
import { EnrollmentRequest } from './liveness/enrollment_request'
|
|
108
107
|
import { VerificationConfig } from './liveness/verification_config'
|
|
109
108
|
import { LivenessBackendException, LivenessBackendErrorCode } from './liveness/liveness_backend_exception'
|
|
110
109
|
import { LivenessException, LivenessErrorCode } from './liveness/liveness_exception'
|
|
111
110
|
import { LivenessResponse, LivenessStatus } from './liveness/liveness_response'
|
|
112
111
|
import { LivenessNotification, LivenessProcessStatus } from './liveness/liveness_notification'
|
|
113
|
-
import { ErrorResponse } from './liveness/error_response'
|
|
114
112
|
import { EnrollmentResponse } from './liveness/enrollment_response'
|
|
115
|
-
import {
|
|
113
|
+
import { VerificationMatchResponse } from './liveness/verification_match_response'
|
|
116
114
|
import { VerificationResponse } from './liveness/verification_response'
|
|
117
115
|
export {
|
|
118
116
|
LivenessBackendException,
|
|
@@ -128,11 +126,9 @@ export {
|
|
|
128
126
|
LivenessResponse,
|
|
129
127
|
LivenessStatus,
|
|
130
128
|
EnrollmentConfig,
|
|
131
|
-
EnrollmentRequest,
|
|
132
129
|
VerificationConfig,
|
|
133
|
-
ErrorResponse,
|
|
134
130
|
EnrollmentResponse,
|
|
135
|
-
|
|
131
|
+
VerificationMatchResponse,
|
|
136
132
|
VerificationResponse,
|
|
137
133
|
}
|
|
138
134
|
|
|
@@ -173,6 +169,7 @@ import { Person } from './person_database/person'
|
|
|
173
169
|
import { SearchPersonDetection } from './person_database/search_person_detection'
|
|
174
170
|
import { SearchPersonImage } from './person_database/search_person_image'
|
|
175
171
|
import { SearchPersonRequest } from './person_database/search_person_request'
|
|
172
|
+
import { SearchPersonFilter } from './person_database/search_person_filter'
|
|
176
173
|
import { SearchPerson } from './person_database/search_person'
|
|
177
174
|
export {
|
|
178
175
|
EditGroupPersonsRequest,
|
|
@@ -185,6 +182,7 @@ export {
|
|
|
185
182
|
SearchPersonDetection,
|
|
186
183
|
SearchPersonImage,
|
|
187
184
|
SearchPersonRequest,
|
|
185
|
+
SearchPersonFilter,
|
|
188
186
|
SearchPerson,
|
|
189
187
|
}
|
|
190
188
|
|
|
@@ -311,11 +309,6 @@ export class FaceSDK {
|
|
|
311
309
|
return [lr, er];
|
|
312
310
|
}
|
|
313
311
|
|
|
314
|
-
async enrollWithTrustedPhoto(request) {
|
|
315
|
-
var response = await exec("enrollWithTrustedPhoto", [request])
|
|
316
|
-
return EnrollmentResponse.fromJson(JSON.parse(response));
|
|
317
|
-
}
|
|
318
|
-
|
|
319
312
|
stopLiveness() {
|
|
320
313
|
exec("stopLiveness", [])
|
|
321
314
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CameraPosition } from '../customization/camera_position'
|
|
2
2
|
import { ScreenOrientation } from '../customization/screen_orientation'
|
|
3
3
|
import { RecordingProcess, LivenessType, LivenessSkipStep } from './liveness_config'
|
|
4
|
+
import { Person } from '../person_database/person'
|
|
5
|
+
import { SearchPersonFilter } from '../person_database/search_person_filter'
|
|
4
6
|
|
|
5
7
|
export class EnrollmentConfig {
|
|
6
8
|
copyright
|
|
@@ -19,10 +21,8 @@ export class EnrollmentConfig {
|
|
|
19
21
|
tag
|
|
20
22
|
skipStep
|
|
21
23
|
metadata
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
checkDuplicatesEnabled
|
|
25
|
-
duplicatesThreshold
|
|
24
|
+
person
|
|
25
|
+
searchFilter
|
|
26
26
|
|
|
27
27
|
constructor(options) {
|
|
28
28
|
this.copyright = options?.copyright ?? true
|
|
@@ -41,10 +41,8 @@ export class EnrollmentConfig {
|
|
|
41
41
|
this.tag = options?.tag
|
|
42
42
|
this.skipStep = options?.skipStep ?? []
|
|
43
43
|
this.metadata = options?.metadata
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.checkDuplicatesEnabled = options?.checkDuplicatesEnabled
|
|
47
|
-
this.duplicatesThreshold = options?.duplicatesThreshold
|
|
44
|
+
this.person = Person.fromJson(options?.person)
|
|
45
|
+
this.searchFilter = SearchPersonFilter.fromJson(options?.searchFilter)
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
static fromJson(jsonObject) {
|
|
@@ -67,10 +65,8 @@ export class EnrollmentConfig {
|
|
|
67
65
|
result.tag = jsonObject["tag"]
|
|
68
66
|
result.skipStep = jsonObject["skipStep"]
|
|
69
67
|
result.metadata = jsonObject["metadata"]
|
|
70
|
-
result.
|
|
71
|
-
result.
|
|
72
|
-
result.checkDuplicatesEnabled = jsonObject["checkDuplicatesEnabled"]
|
|
73
|
-
result.duplicatesThreshold = jsonObject["duplicatesThreshold"]
|
|
68
|
+
result.person = Person.fromJson(jsonObject["person"])
|
|
69
|
+
result.searchFilter = SearchPersonFilter.fromJson(jsonObject["searchFilter"])
|
|
74
70
|
|
|
75
71
|
return result
|
|
76
72
|
}
|
|
@@ -93,10 +89,8 @@ export class EnrollmentConfig {
|
|
|
93
89
|
"tag": this.tag,
|
|
94
90
|
"skipStep": this.skipStep,
|
|
95
91
|
"metadata": this.metadata,
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"checkDuplicatesEnabled": this.checkDuplicatesEnabled,
|
|
99
|
-
"duplicatesThreshold": this.duplicatesThreshold,
|
|
92
|
+
"person": this.person?.toJson(),
|
|
93
|
+
"searchFilter": this.searchFilter?.toJson(),
|
|
100
94
|
}
|
|
101
95
|
}
|
|
102
96
|
}
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Person } from '../person_database/person'
|
|
2
|
+
import { SearchPerson } from '../person_database/search_person'
|
|
2
3
|
|
|
3
4
|
export class EnrollmentResponse {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
enrolled
|
|
6
|
+
person
|
|
7
|
+
searchPersons
|
|
7
8
|
|
|
8
9
|
static fromJson(jsonObject) {
|
|
9
10
|
if (jsonObject == null) return null
|
|
10
11
|
const result = new EnrollmentResponse()
|
|
11
12
|
|
|
12
|
-
result.
|
|
13
|
-
result.
|
|
14
|
-
result.
|
|
13
|
+
result.enrolled = jsonObject["enrolled"]
|
|
14
|
+
result.person = Person.fromJson(jsonObject["person"])
|
|
15
|
+
result.searchPersons = []
|
|
16
|
+
if (jsonObject["searchPersons"] != null)
|
|
17
|
+
for (const item of jsonObject["searchPersons"])
|
|
18
|
+
result.searchPersons.push(SearchPerson.fromJson(item))
|
|
15
19
|
|
|
16
20
|
return result
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
toJson() {
|
|
20
24
|
return {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
25
|
+
"enrolled": this.enrolled,
|
|
26
|
+
"person": this.person?.toJson(),
|
|
27
|
+
"searchPersons": this.searchPersons?.map(e => e.toJson()),
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
}
|
|
@@ -36,9 +36,9 @@ export const LivenessErrorCode = {
|
|
|
36
36
|
PROCESSING_FRAME_FAILED: 7,
|
|
37
37
|
APPLICATION_INACTIVE: 8,
|
|
38
38
|
BAD_FACE_QUALITY: 9,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
CAMERA_NOT_AVAILABLE: 10,
|
|
40
|
+
CAMERA_NO_PERMISSION: 11,
|
|
41
|
+
BAD_FRAME_SIZE: 12,
|
|
42
42
|
CONTEXT_IS_NULL: 13,
|
|
43
43
|
IN_PROGRESS_ALREADY: 14,
|
|
44
44
|
ZOOM_NOT_SUPPORTED: 15,
|
|
@@ -20,7 +20,7 @@ export class VerificationConfig {
|
|
|
20
20
|
skipStep
|
|
21
21
|
metadata
|
|
22
22
|
personId
|
|
23
|
-
|
|
23
|
+
externalId
|
|
24
24
|
threshold
|
|
25
25
|
|
|
26
26
|
constructor(options) {
|
|
@@ -41,10 +41,22 @@ export class VerificationConfig {
|
|
|
41
41
|
this.skipStep = options?.skipStep ?? []
|
|
42
42
|
this.metadata = options?.metadata
|
|
43
43
|
this.personId = options?.personId
|
|
44
|
-
this.
|
|
44
|
+
this.externalId = options?.externalId
|
|
45
45
|
this.threshold = options?.threshold
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
static withPersonId(personId, options) {
|
|
49
|
+
const result = new VerificationConfig(options)
|
|
50
|
+
result.personId = personId
|
|
51
|
+
return result
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static withExternalId(externalId, options) {
|
|
55
|
+
const result = new VerificationConfig(options)
|
|
56
|
+
result.externalId = externalId
|
|
57
|
+
return result
|
|
58
|
+
}
|
|
59
|
+
|
|
48
60
|
static fromJson(jsonObject) {
|
|
49
61
|
if (jsonObject == null) return null
|
|
50
62
|
const result = new VerificationConfig()
|
|
@@ -66,7 +78,7 @@ export class VerificationConfig {
|
|
|
66
78
|
result.skipStep = jsonObject["skipStep"]
|
|
67
79
|
result.metadata = jsonObject["metadata"]
|
|
68
80
|
result.personId = jsonObject["personId"]
|
|
69
|
-
result.
|
|
81
|
+
result.externalId = jsonObject["externalId"]
|
|
70
82
|
result.threshold = jsonObject["threshold"]
|
|
71
83
|
|
|
72
84
|
return result
|
|
@@ -91,7 +103,7 @@ export class VerificationConfig {
|
|
|
91
103
|
"skipStep": this.skipStep,
|
|
92
104
|
"metadata": this.metadata,
|
|
93
105
|
"personId": this.personId,
|
|
94
|
-
"
|
|
106
|
+
"externalId": this.externalId,
|
|
95
107
|
"threshold": this.threshold,
|
|
96
108
|
}
|
|
97
109
|
}
|
package/www/react-native/liveness/{verify_match_response.js → verification_match_response.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export class
|
|
2
|
-
|
|
1
|
+
export class VerificationMatchResponse {
|
|
2
|
+
verified
|
|
3
3
|
similarity
|
|
4
4
|
|
|
5
5
|
static fromJson(jsonObject) {
|
|
6
6
|
if (jsonObject == null) return null
|
|
7
|
-
const result = new
|
|
7
|
+
const result = new VerificationMatchResponse()
|
|
8
8
|
|
|
9
|
-
result.
|
|
9
|
+
result.verified = jsonObject["verified"]
|
|
10
10
|
result.similarity = jsonObject["similarity"]
|
|
11
11
|
|
|
12
12
|
return result
|
|
@@ -14,7 +14,7 @@ export class VerifyMatchResponse {
|
|
|
14
14
|
|
|
15
15
|
toJson() {
|
|
16
16
|
return {
|
|
17
|
-
"
|
|
17
|
+
"verified": this.verified,
|
|
18
18
|
"similarity": this.similarity,
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { VerificationMatchResponse } from './verification_match_response'
|
|
2
|
+
import { Person } from '../person_database/person'
|
|
3
3
|
|
|
4
4
|
export class VerificationResponse {
|
|
5
|
-
|
|
5
|
+
verified
|
|
6
|
+
person
|
|
6
7
|
match
|
|
7
|
-
error
|
|
8
8
|
|
|
9
9
|
static fromJson(jsonObject) {
|
|
10
10
|
if (jsonObject == null) return null
|
|
11
11
|
const result = new VerificationResponse()
|
|
12
12
|
|
|
13
|
-
result.
|
|
14
|
-
result.
|
|
15
|
-
result.
|
|
13
|
+
result.verified = jsonObject["verified"]
|
|
14
|
+
result.person = Person.fromJson(jsonObject["person"])
|
|
15
|
+
result.match = VerificationMatchResponse.fromJson(jsonObject["match"])
|
|
16
16
|
|
|
17
17
|
return result
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
toJson() {
|
|
21
21
|
return {
|
|
22
|
-
"
|
|
22
|
+
"verified": this.verified,
|
|
23
|
+
"person": this.person?.toJson(),
|
|
23
24
|
"match": this.match?.toJson(),
|
|
24
|
-
"error": this.error?.toJson(),
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,35 +1,44 @@
|
|
|
1
1
|
import { dateToString } from '../internal/bridge'
|
|
2
2
|
|
|
3
3
|
export class Person {
|
|
4
|
+
id
|
|
5
|
+
createdAt
|
|
4
6
|
name
|
|
5
7
|
updatedAt
|
|
6
8
|
groups
|
|
7
|
-
id
|
|
8
9
|
metadata
|
|
9
|
-
|
|
10
|
+
externalId
|
|
11
|
+
expireAt
|
|
12
|
+
ttl
|
|
10
13
|
|
|
11
14
|
static fromJson(jsonObject) {
|
|
12
15
|
if (jsonObject == null) return null
|
|
13
16
|
var result = new Person()
|
|
14
17
|
|
|
18
|
+
result.id = jsonObject["id"]
|
|
19
|
+
result.createdAt = jsonObject["createdAt"] === null ? null : new Date(jsonObject["createdAt"]);
|
|
15
20
|
result.name = jsonObject["name"]
|
|
16
|
-
result.updatedAt = new Date(jsonObject["updatedAt"])
|
|
21
|
+
result.updatedAt = jsonObject["updatedAt"] === null ? null : new Date(jsonObject["updatedAt"]);
|
|
17
22
|
result.groups = jsonObject["groups"]
|
|
18
|
-
result.id = jsonObject["id"]
|
|
19
23
|
result.metadata = jsonObject["metadata"]
|
|
20
|
-
result.
|
|
24
|
+
result.externalId = jsonObject["externalId"]
|
|
25
|
+
result.expireAt = jsonObject["expireAt"] === null ? null : new Date(jsonObject["expireAt"]);
|
|
26
|
+
result.ttl = jsonObject["ttl"]
|
|
21
27
|
|
|
22
28
|
return result
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
toJson() {
|
|
26
32
|
return {
|
|
33
|
+
"id": this.id,
|
|
34
|
+
"createdAt": dateToString(this.createdAt),
|
|
27
35
|
"name": this.name,
|
|
28
36
|
"updatedAt": dateToString(this.updatedAt),
|
|
29
37
|
"groups": this.groups,
|
|
30
|
-
"id": this.id,
|
|
31
38
|
"metadata": this.metadata,
|
|
32
|
-
"
|
|
39
|
+
"externalId": this.externalId,
|
|
40
|
+
"expireAt": dateToString(this.expireAt),
|
|
41
|
+
"ttl": this.ttl,
|
|
33
42
|
}
|
|
34
43
|
}
|
|
35
44
|
}
|
|
@@ -11,6 +11,9 @@ export class SearchPerson {
|
|
|
11
11
|
id
|
|
12
12
|
metadata
|
|
13
13
|
createdAt
|
|
14
|
+
externalId
|
|
15
|
+
expireAt
|
|
16
|
+
ttl
|
|
14
17
|
|
|
15
18
|
static fromJson(jsonObject) {
|
|
16
19
|
if (jsonObject == null) return null
|
|
@@ -26,6 +29,9 @@ export class SearchPerson {
|
|
|
26
29
|
result.id = jsonObject["id"]
|
|
27
30
|
result.metadata = jsonObject["metadata"]
|
|
28
31
|
result.createdAt = new Date(jsonObject["createdAt"])
|
|
32
|
+
result.externalId = jsonObject["externalId"]
|
|
33
|
+
result.expireAt = new Date(jsonObject["expireAt"])
|
|
34
|
+
result.ttl = jsonObject["ttl"]
|
|
29
35
|
|
|
30
36
|
return result
|
|
31
37
|
}
|
|
@@ -40,6 +46,9 @@ export class SearchPerson {
|
|
|
40
46
|
"id": this.id,
|
|
41
47
|
"metadata": this.metadata,
|
|
42
48
|
"createdAt": dateToString(this.createdAt),
|
|
49
|
+
"externalId": this.externalId,
|
|
50
|
+
"expireAt": dateToString(this.expireAt),
|
|
51
|
+
"ttl": this.ttl,
|
|
43
52
|
}
|
|
44
53
|
}
|
|
45
54
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export class SearchPersonFilter {
|
|
2
|
+
groups
|
|
3
|
+
threshold
|
|
4
|
+
limit
|
|
5
|
+
fieldName
|
|
6
|
+
fieldValues
|
|
7
|
+
exclude
|
|
8
|
+
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.groups = options?.groups ?? []
|
|
11
|
+
this.threshold = options?.threshold ?? 0
|
|
12
|
+
this.limit = options?.limit ?? 1
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
filterField(fieldName, fieldValues, options) {
|
|
16
|
+
this.fieldName = fieldName
|
|
17
|
+
this.fieldValues = fieldValues
|
|
18
|
+
this.exclude = options?.exclude ?? false
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static fromJson(jsonObject) {
|
|
22
|
+
if (jsonObject == null) return null
|
|
23
|
+
var result = new SearchPersonFilter({
|
|
24
|
+
groups: jsonObject["groups"],
|
|
25
|
+
threshold: jsonObject["threshold"],
|
|
26
|
+
limit: jsonObject["limit"]
|
|
27
|
+
})
|
|
28
|
+
result.fieldName = jsonObject["fieldName"];
|
|
29
|
+
result.fieldValues = jsonObject["fieldValues"];
|
|
30
|
+
result.exclude = jsonObject["exclude"];
|
|
31
|
+
return result
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
toJson() {
|
|
35
|
+
return {
|
|
36
|
+
"groups": this.groups,
|
|
37
|
+
"threshold": this.threshold,
|
|
38
|
+
"limit": this.limit,
|
|
39
|
+
"fieldName": this.fieldName,
|
|
40
|
+
"fieldValues": this.fieldValues,
|
|
41
|
+
"exclude": this.exclude,
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/www/types/index.d.ts
CHANGED
|
@@ -98,15 +98,13 @@ export {
|
|
|
98
98
|
|
|
99
99
|
import { LivenessConfig, RecordingProcess, LivenessType, LivenessSkipStep } from './liveness/liveness_config'
|
|
100
100
|
import { EnrollmentConfig } from './liveness/enrollment_config'
|
|
101
|
-
import { EnrollmentRequest } from './liveness/enrollment_request'
|
|
102
101
|
import { VerificationConfig } from './liveness/verification_config'
|
|
103
102
|
import { LivenessBackendException, LivenessBackendErrorCode } from './liveness/liveness_backend_exception'
|
|
104
103
|
import { LivenessException, LivenessErrorCode } from './liveness/liveness_exception'
|
|
105
104
|
import { LivenessResponse, LivenessStatus } from './liveness/liveness_response'
|
|
106
105
|
import { LivenessNotification, LivenessProcessStatus, LivenessNotificationCompletion } from './liveness/liveness_notification'
|
|
107
|
-
import { ErrorResponse } from './liveness/error_response'
|
|
108
106
|
import { EnrollmentResponse } from './liveness/enrollment_response'
|
|
109
|
-
import {
|
|
107
|
+
import { VerificationMatchResponse } from './liveness/verification_match_response'
|
|
110
108
|
import { VerificationResponse } from './liveness/verification_response'
|
|
111
109
|
export {
|
|
112
110
|
LivenessBackendException,
|
|
@@ -123,11 +121,9 @@ export {
|
|
|
123
121
|
LivenessResponse,
|
|
124
122
|
LivenessStatus,
|
|
125
123
|
EnrollmentConfig,
|
|
126
|
-
EnrollmentRequest,
|
|
127
124
|
VerificationConfig,
|
|
128
|
-
ErrorResponse,
|
|
129
125
|
EnrollmentResponse,
|
|
130
|
-
|
|
126
|
+
VerificationMatchResponse,
|
|
131
127
|
VerificationResponse,
|
|
132
128
|
}
|
|
133
129
|
|
|
@@ -168,6 +164,7 @@ import { Person } from './person_database/person'
|
|
|
168
164
|
import { SearchPersonDetection } from './person_database/search_person_detection'
|
|
169
165
|
import { SearchPersonImage } from './person_database/search_person_image'
|
|
170
166
|
import { SearchPersonRequest } from './person_database/search_person_request'
|
|
167
|
+
import { SearchPersonFilter } from './person_database/search_person_filter'
|
|
171
168
|
import { SearchPerson } from './person_database/search_person'
|
|
172
169
|
export {
|
|
173
170
|
EditGroupPersonsRequest,
|
|
@@ -180,6 +177,7 @@ export {
|
|
|
180
177
|
SearchPersonDetection,
|
|
181
178
|
SearchPersonImage,
|
|
182
179
|
SearchPersonRequest,
|
|
180
|
+
SearchPersonFilter,
|
|
183
181
|
SearchPerson,
|
|
184
182
|
}
|
|
185
183
|
|
|
@@ -299,8 +297,6 @@ export class FaceSDK {
|
|
|
299
297
|
}
|
|
300
298
|
): Promise<[LivenessResponse, VerificationResponse | null]>
|
|
301
299
|
|
|
302
|
-
enrollWithTrustedPhoto(request: EnrollmentRequest): Promise<EnrollmentResponse>
|
|
303
|
-
|
|
304
300
|
stopLiveness(): void
|
|
305
301
|
|
|
306
302
|
matchFaces(
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CameraPosition } from '../customization/camera_position'
|
|
2
2
|
import { ScreenOrientation } from '../customization/screen_orientation'
|
|
3
3
|
import { RecordingProcess, LivenessType, LivenessSkipStep } from './liveness_config'
|
|
4
|
+
import { Person } from '../person_database/person'
|
|
5
|
+
import { SearchPersonFilter } from '../person_database/search_person_filter'
|
|
4
6
|
|
|
5
7
|
export interface EnrollmentConfig {
|
|
6
8
|
/**
|
|
@@ -87,11 +89,7 @@ export interface EnrollmentConfig {
|
|
|
87
89
|
|
|
88
90
|
metadata?: Record<string, any>
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
person?: Person
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
checkDuplicatesEnabled?: boolean
|
|
95
|
-
|
|
96
|
-
duplicatesThreshold?: number
|
|
94
|
+
searchFilter?: SearchPersonFilter
|
|
97
95
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Person } from '../person_database/person'
|
|
2
|
+
import { SearchPerson } from '../person_database/search_person'
|
|
2
3
|
|
|
3
4
|
export class EnrollmentResponse {
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
5
|
+
readonly enrolled: boolean
|
|
6
|
+
readonly person: Person | null
|
|
7
|
+
readonly searchPersons: Array<SearchPerson> | null
|
|
7
8
|
|
|
8
9
|
private constructor()
|
|
9
10
|
}
|
|
@@ -29,12 +29,12 @@ export enum LivenessErrorCode {
|
|
|
29
29
|
APPLICATION_INACTIVE,
|
|
30
30
|
/** Processing finished by bad face quality. */
|
|
31
31
|
BAD_FACE_QUALITY,
|
|
32
|
-
/** Processing finished by bad frame size. */
|
|
33
|
-
BAD_FRAME_SIZE,
|
|
34
32
|
/** Device has no available camera. */
|
|
35
33
|
CAMERA_NOT_AVAILABLE,
|
|
36
34
|
/** Application does not have camera permission. */
|
|
37
35
|
CAMERA_NO_PERMISSION,
|
|
36
|
+
/** Processing finished by bad frame size. */
|
|
37
|
+
BAD_FRAME_SIZE,
|
|
38
38
|
/**
|
|
39
39
|
* Application context is null.
|
|
40
40
|
*
|
|
@@ -2,7 +2,7 @@ import { CameraPosition } from '../customization/camera_position'
|
|
|
2
2
|
import { ScreenOrientation } from '../customization/screen_orientation'
|
|
3
3
|
import { RecordingProcess, LivenessType, LivenessSkipStep } from './liveness_config'
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export class VerificationConfig {
|
|
6
6
|
/**
|
|
7
7
|
* Defines, whether the logo is visible on the bottom of Liveness UI screens. Defaults to `true`.
|
|
8
8
|
*/
|
|
@@ -87,9 +87,53 @@ export interface VerificationConfig {
|
|
|
87
87
|
|
|
88
88
|
metadata?: Record<string, any>
|
|
89
89
|
|
|
90
|
-
personId: string
|
|
91
|
-
|
|
92
|
-
groupId?: string
|
|
93
|
-
|
|
94
90
|
threshold?: number
|
|
91
|
+
|
|
92
|
+
private constructor();
|
|
93
|
+
|
|
94
|
+
static withPersonId(
|
|
95
|
+
personId: string,
|
|
96
|
+
options?: {
|
|
97
|
+
copyright?: boolean
|
|
98
|
+
cameraSwitchEnabled?: boolean
|
|
99
|
+
closeButtonEnabled?: boolean
|
|
100
|
+
torchButtonEnabled?: boolean
|
|
101
|
+
vibrateOnSteps?: boolean
|
|
102
|
+
cameraPositionAndroid?: number
|
|
103
|
+
cameraPositionIOS?: CameraPosition
|
|
104
|
+
screenOrientation?: Array<ScreenOrientation>
|
|
105
|
+
locationTrackingEnabled?: boolean
|
|
106
|
+
preventScreenRecording?: boolean
|
|
107
|
+
attemptsCount?: number
|
|
108
|
+
recordingProcess?: RecordingProcess
|
|
109
|
+
livenessType?: LivenessType
|
|
110
|
+
tag?: string
|
|
111
|
+
skipStep?: Array<LivenessSkipStep>
|
|
112
|
+
metadata?: Record<string, any>
|
|
113
|
+
threshold?: number
|
|
114
|
+
}
|
|
115
|
+
): VerificationConfig;
|
|
116
|
+
|
|
117
|
+
static withExternalId(
|
|
118
|
+
externalId: string,
|
|
119
|
+
options?: {
|
|
120
|
+
copyright?: boolean
|
|
121
|
+
cameraSwitchEnabled?: boolean
|
|
122
|
+
closeButtonEnabled?: boolean
|
|
123
|
+
torchButtonEnabled?: boolean
|
|
124
|
+
vibrateOnSteps?: boolean
|
|
125
|
+
cameraPositionAndroid?: number
|
|
126
|
+
cameraPositionIOS?: CameraPosition
|
|
127
|
+
screenOrientation?: Array<ScreenOrientation>
|
|
128
|
+
locationTrackingEnabled?: boolean
|
|
129
|
+
preventScreenRecording?: boolean
|
|
130
|
+
attemptsCount?: number
|
|
131
|
+
recordingProcess?: RecordingProcess
|
|
132
|
+
livenessType?: LivenessType
|
|
133
|
+
tag?: string
|
|
134
|
+
skipStep?: Array<LivenessSkipStep>
|
|
135
|
+
metadata?: Record<string, any>
|
|
136
|
+
threshold?: number
|
|
137
|
+
}
|
|
138
|
+
): VerificationConfig;
|
|
95
139
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { VerificationMatchResponse } from './verification_match_response'
|
|
2
|
+
import { Person } from '../person_database/person'
|
|
3
3
|
|
|
4
4
|
export class VerificationResponse {
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
5
|
+
readonly verified: boolean
|
|
6
|
+
readonly person?: Person
|
|
7
|
+
readonly match?: VerificationMatchResponse
|
|
8
8
|
|
|
9
9
|
private constructor()
|
|
10
10
|
}
|
|
@@ -3,31 +3,35 @@
|
|
|
3
3
|
* A Person Database object that represents Person.
|
|
4
4
|
*/
|
|
5
5
|
export class Person {
|
|
6
|
+
id?: string | null
|
|
7
|
+
|
|
8
|
+
get createdAt(): Date | null
|
|
9
|
+
|
|
6
10
|
/**
|
|
7
11
|
* Person name.
|
|
8
12
|
* Updatable field.
|
|
9
13
|
*/
|
|
10
|
-
name
|
|
14
|
+
name?: string | null
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* Person update date.
|
|
14
18
|
*/
|
|
15
|
-
|
|
19
|
+
updatedAt?: Date | null
|
|
16
20
|
|
|
17
21
|
/**
|
|
18
22
|
* Array if Group IDs Person belongs to.
|
|
19
23
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
get id(): string
|
|
24
|
+
groups?: string[] | null
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* A free-form object containing Person extended attributes.
|
|
26
28
|
* Updatable field.
|
|
27
29
|
*/
|
|
28
|
-
metadata
|
|
30
|
+
metadata?: any | null
|
|
31
|
+
|
|
32
|
+
externalId?: string | null
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
expireAt?: Date | null
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
ttl?: number | null
|
|
33
37
|
}
|