@authme/liveness 2.2.0 → 2.2.1-rc.3
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/index.cjs +181 -0
- package/index.js +152 -0
- package/package.json +11 -12
- package/src/index.d.ts +5 -4
- package/src/lib/data-access/api.d.ts +22 -22
- package/src/lib/data-access/dto.interface.d.ts +42 -42
- package/src/lib/data-access/index.d.ts +2 -2
- package/src/lib/enum/fas-recognition.enum.d.ts +1 -46
- package/src/lib/enum/index.d.ts +1 -1
- package/src/lib/interface/fas.interface.d.ts +35 -35
- package/src/lib/interface/index.d.ts +1 -1
- package/src/lib/modules-liveness-feature-liveness.d.ts +17 -17
- package/src/lib/version.d.ts +1 -0
- package/CHANGELOG.md +0 -191
- package/src/index.js +0 -8
- package/src/index.js.map +0 -1
- package/src/lib/data-access/api.js +0 -68
- package/src/lib/data-access/api.js.map +0 -1
- package/src/lib/data-access/dto.interface.js +0 -10
- package/src/lib/data-access/dto.interface.js.map +0 -1
- package/src/lib/data-access/index.js +0 -6
- package/src/lib/data-access/index.js.map +0 -1
- package/src/lib/enum/fas-recognition.enum.js +0 -56
- package/src/lib/enum/fas-recognition.enum.js.map +0 -1
- package/src/lib/enum/index.js +0 -5
- package/src/lib/enum/index.js.map +0 -1
- package/src/lib/interface/fas.interface.js +0 -3
- package/src/lib/interface/fas.interface.js.map +0 -1
- package/src/lib/interface/index.js +0 -5
- package/src/lib/interface/index.js.map +0 -1
- package/src/lib/modules-liveness-feature-liveness.js +0 -30
- package/src/lib/modules-liveness-feature-liveness.js.map +0 -1
package/index.cjs
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var engine = require('@authme/engine');
|
|
6
|
+
require('core-js/modules/es.regexp.to-string.js');
|
|
7
|
+
require('core-js/modules/es.object.assign.js');
|
|
8
|
+
var core = require('@authme/core');
|
|
9
|
+
var util = require('@authme/util');
|
|
10
|
+
require('core-js/modules/es.symbol.description.js');
|
|
11
|
+
|
|
12
|
+
class FasService extends engine.AuthmeEngineModuleBase {
|
|
13
|
+
constructor(engine$1) {
|
|
14
|
+
super(engine$1);
|
|
15
|
+
this.moduleName = engine.EngineModule.Fas;
|
|
16
|
+
}
|
|
17
|
+
setStage(stageList) {
|
|
18
|
+
const stageStrList = stageList.map(x => x.split('_')[1]);
|
|
19
|
+
return this.engine.run(this.moduleName, 'setStage', {
|
|
20
|
+
stageList: stageStrList
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
getStageParams(stageIndex) {
|
|
24
|
+
return this.engine.run(this.moduleName, 'getStageParams', {
|
|
25
|
+
stageIndex
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
setStageParams(stageIndex, value) {
|
|
29
|
+
return this.engine.run(this.moduleName, 'setStageParams', {
|
|
30
|
+
stageIndex,
|
|
31
|
+
value
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/******************************************************************************
|
|
37
|
+
Copyright (c) Microsoft Corporation.
|
|
38
|
+
|
|
39
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
40
|
+
purpose with or without fee is hereby granted.
|
|
41
|
+
|
|
42
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
43
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
44
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
45
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
46
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
47
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
48
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
49
|
+
***************************************************************************** */
|
|
50
|
+
|
|
51
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
52
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
53
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
54
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
55
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
56
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
57
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const init = url => Immediately => __awaiter(void 0, void 0, void 0, function* () {
|
|
62
|
+
return core.sendRequest(url, 'POST', {
|
|
63
|
+
body: JSON.stringify({
|
|
64
|
+
Immediately
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
const detect = url => data => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
|
+
const formData = new FormData();
|
|
70
|
+
formData.append('id', data.id);
|
|
71
|
+
formData.append('score', data.score.toString());
|
|
72
|
+
formData.append('isLiveness', data.isLiveness.toString());
|
|
73
|
+
data.frames.forEach((element, index) => {
|
|
74
|
+
formData.append('Frames', element, `frame${index}`);
|
|
75
|
+
});
|
|
76
|
+
data.results.forEach((item, index) => {
|
|
77
|
+
formData.append(`results[${index}][status]`, item.status.split('_')[1]);
|
|
78
|
+
formData.append(`results[${index}][stage]`, item.stage.split('_')[1]);
|
|
79
|
+
});
|
|
80
|
+
return core.sendRequest(url, 'POST', {
|
|
81
|
+
body: formData,
|
|
82
|
+
contentType: 'multipart/form-data'
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
const uploadFrameFile = url => data => __awaiter(void 0, void 0, void 0, function* () {
|
|
86
|
+
const formData = new FormData();
|
|
87
|
+
formData.append('id', data.id);
|
|
88
|
+
formData.append('index', data.index.toString());
|
|
89
|
+
formData.append('data', util.dataURItoBlob(data.data));
|
|
90
|
+
return core.sendRequest(url, 'POST', {
|
|
91
|
+
body: formData,
|
|
92
|
+
contentType: 'multipart/form-data'
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
const uploadFrame = url => body => __awaiter(void 0, void 0, void 0, function* () {
|
|
96
|
+
return core.sendRequest(url, 'POST', {
|
|
97
|
+
body: JSON.stringify(Object.assign(Object.assign({}, body), {
|
|
98
|
+
data: body.data.split('base64,')[1]
|
|
99
|
+
}))
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
const uploadMeta = url => data => __awaiter(void 0, void 0, void 0, function* () {
|
|
103
|
+
return core.sendRequest(url, 'POST', {
|
|
104
|
+
body: JSON.stringify(data)
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
const getResult = url => id => __awaiter(void 0, void 0, void 0, function* () {
|
|
108
|
+
return core.sendRequest(`${url}${id}`, 'GET');
|
|
109
|
+
});
|
|
110
|
+
const getVerifyResult = url => id => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
|
+
return core.sendRequest(`${url}${id}`, 'GET');
|
|
112
|
+
});
|
|
113
|
+
const IdentityVerification = {
|
|
114
|
+
init: init('/api/identity-verification/v3/liveness/init'),
|
|
115
|
+
detect: detect('/api/identity-verification/v3/liveness/detect'),
|
|
116
|
+
uploadFrame: uploadFrame('/api/identity-verification/v3/liveness/frame'),
|
|
117
|
+
uploadFrameFile: uploadFrameFile('/api/identity-verification/v3/liveness/frame-file'),
|
|
118
|
+
uploadMeta: uploadMeta('/api/identity-verification/v3/liveness/meta'),
|
|
119
|
+
getResult: getResult('/api/identity-verification/v3/liveness/result/')
|
|
120
|
+
};
|
|
121
|
+
const CustomerManagement = {
|
|
122
|
+
getVerifyResult: getVerifyResult('/api/customer-management/liveness-verify/v3/result/'),
|
|
123
|
+
init: init('/api/customer-management/liveness-verify/v3/init'),
|
|
124
|
+
detect: detect('/api/customer-management/liveness-verify/v3/detect')
|
|
125
|
+
};
|
|
126
|
+
const LivenessAPI = {
|
|
127
|
+
IdentityVerification,
|
|
128
|
+
CustomerManagement
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
exports.LivenessResultStatus = void 0;
|
|
132
|
+
(function (LivenessResultStatus) {
|
|
133
|
+
LivenessResultStatus["DONE"] = "DONE";
|
|
134
|
+
LivenessResultStatus["VALIDATING"] = "Validating";
|
|
135
|
+
LivenessResultStatus["UPLOADING"] = "Uploading";
|
|
136
|
+
})(exports.LivenessResultStatus || (exports.LivenessResultStatus = {}));
|
|
137
|
+
|
|
138
|
+
var name = "@authme/liveness";
|
|
139
|
+
var version$1 = "2.2.1-rc.3";
|
|
140
|
+
var peerDependencies = {
|
|
141
|
+
"core-js": "^3.6.0"
|
|
142
|
+
};
|
|
143
|
+
var packageInfo = {
|
|
144
|
+
name: name,
|
|
145
|
+
version: version$1,
|
|
146
|
+
peerDependencies: peerDependencies
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
var _a;
|
|
150
|
+
var _b, _c;
|
|
151
|
+
const version = packageInfo.version;
|
|
152
|
+
(_a = (_b = window)[_c = Symbol.for('authme-sdk')]) !== null && _a !== void 0 ? _a : _b[_c] = {};
|
|
153
|
+
window[Symbol.for('authme-sdk')][packageInfo.name] = version;
|
|
154
|
+
|
|
155
|
+
Object.defineProperty(exports, 'EAuthMeEyeStatus', {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
get: function () { return engine.EAuthMeEyeStatus; }
|
|
158
|
+
});
|
|
159
|
+
Object.defineProperty(exports, 'EAuthMeFASServiceStage', {
|
|
160
|
+
enumerable: true,
|
|
161
|
+
get: function () { return engine.EAuthMeFASServiceStage; }
|
|
162
|
+
});
|
|
163
|
+
Object.defineProperty(exports, 'EAuthMeFaceAntiSpoofingStatus', {
|
|
164
|
+
enumerable: true,
|
|
165
|
+
get: function () { return engine.EAuthMeFaceAntiSpoofingStatus; }
|
|
166
|
+
});
|
|
167
|
+
Object.defineProperty(exports, 'EAuthMeFacePose', {
|
|
168
|
+
enumerable: true,
|
|
169
|
+
get: function () { return engine.EAuthMeFacePose; }
|
|
170
|
+
});
|
|
171
|
+
Object.defineProperty(exports, 'EAuthMeMouthStatus', {
|
|
172
|
+
enumerable: true,
|
|
173
|
+
get: function () { return engine.EAuthMeMouthStatus; }
|
|
174
|
+
});
|
|
175
|
+
Object.defineProperty(exports, 'FasRecognitionResult', {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function () { return engine.EAuthMeFASServiceStatus; }
|
|
178
|
+
});
|
|
179
|
+
exports.FasService = FasService;
|
|
180
|
+
exports.LivenessAPI = LivenessAPI;
|
|
181
|
+
exports.version = version;
|
package/index.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { AuthmeEngineModuleBase, EngineModule } from '@authme/engine';
|
|
2
|
+
export { EAuthMeEyeStatus, EAuthMeFASServiceStage, EAuthMeFaceAntiSpoofingStatus, EAuthMeFacePose, EAuthMeMouthStatus, EAuthMeFASServiceStatus as FasRecognitionResult } from '@authme/engine';
|
|
3
|
+
import 'core-js/modules/es.regexp.to-string.js';
|
|
4
|
+
import 'core-js/modules/es.object.assign.js';
|
|
5
|
+
import { sendRequest } from '@authme/core';
|
|
6
|
+
import { dataURItoBlob } from '@authme/util';
|
|
7
|
+
import 'core-js/modules/es.symbol.description.js';
|
|
8
|
+
|
|
9
|
+
class FasService extends AuthmeEngineModuleBase {
|
|
10
|
+
constructor(engine) {
|
|
11
|
+
super(engine);
|
|
12
|
+
this.moduleName = EngineModule.Fas;
|
|
13
|
+
}
|
|
14
|
+
setStage(stageList) {
|
|
15
|
+
const stageStrList = stageList.map(x => x.split('_')[1]);
|
|
16
|
+
return this.engine.run(this.moduleName, 'setStage', {
|
|
17
|
+
stageList: stageStrList
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
getStageParams(stageIndex) {
|
|
21
|
+
return this.engine.run(this.moduleName, 'getStageParams', {
|
|
22
|
+
stageIndex
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
setStageParams(stageIndex, value) {
|
|
26
|
+
return this.engine.run(this.moduleName, 'setStageParams', {
|
|
27
|
+
stageIndex,
|
|
28
|
+
value
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/******************************************************************************
|
|
34
|
+
Copyright (c) Microsoft Corporation.
|
|
35
|
+
|
|
36
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
37
|
+
purpose with or without fee is hereby granted.
|
|
38
|
+
|
|
39
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
40
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
41
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
42
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
43
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
44
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
45
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
46
|
+
***************************************************************************** */
|
|
47
|
+
|
|
48
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
49
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
50
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
51
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
52
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
53
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
54
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const init = url => Immediately => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
+
return sendRequest(url, 'POST', {
|
|
60
|
+
body: JSON.stringify({
|
|
61
|
+
Immediately
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
const detect = url => data => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
+
const formData = new FormData();
|
|
67
|
+
formData.append('id', data.id);
|
|
68
|
+
formData.append('score', data.score.toString());
|
|
69
|
+
formData.append('isLiveness', data.isLiveness.toString());
|
|
70
|
+
data.frames.forEach((element, index) => {
|
|
71
|
+
formData.append('Frames', element, `frame${index}`);
|
|
72
|
+
});
|
|
73
|
+
data.results.forEach((item, index) => {
|
|
74
|
+
formData.append(`results[${index}][status]`, item.status.split('_')[1]);
|
|
75
|
+
formData.append(`results[${index}][stage]`, item.stage.split('_')[1]);
|
|
76
|
+
});
|
|
77
|
+
return sendRequest(url, 'POST', {
|
|
78
|
+
body: formData,
|
|
79
|
+
contentType: 'multipart/form-data'
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
const uploadFrameFile = url => data => __awaiter(void 0, void 0, void 0, function* () {
|
|
83
|
+
const formData = new FormData();
|
|
84
|
+
formData.append('id', data.id);
|
|
85
|
+
formData.append('index', data.index.toString());
|
|
86
|
+
formData.append('data', dataURItoBlob(data.data));
|
|
87
|
+
return sendRequest(url, 'POST', {
|
|
88
|
+
body: formData,
|
|
89
|
+
contentType: 'multipart/form-data'
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
const uploadFrame = url => body => __awaiter(void 0, void 0, void 0, function* () {
|
|
93
|
+
return sendRequest(url, 'POST', {
|
|
94
|
+
body: JSON.stringify(Object.assign(Object.assign({}, body), {
|
|
95
|
+
data: body.data.split('base64,')[1]
|
|
96
|
+
}))
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
const uploadMeta = url => data => __awaiter(void 0, void 0, void 0, function* () {
|
|
100
|
+
return sendRequest(url, 'POST', {
|
|
101
|
+
body: JSON.stringify(data)
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
const getResult = url => id => __awaiter(void 0, void 0, void 0, function* () {
|
|
105
|
+
return sendRequest(`${url}${id}`, 'GET');
|
|
106
|
+
});
|
|
107
|
+
const getVerifyResult = url => id => __awaiter(void 0, void 0, void 0, function* () {
|
|
108
|
+
return sendRequest(`${url}${id}`, 'GET');
|
|
109
|
+
});
|
|
110
|
+
const IdentityVerification = {
|
|
111
|
+
init: init('/api/identity-verification/v3/liveness/init'),
|
|
112
|
+
detect: detect('/api/identity-verification/v3/liveness/detect'),
|
|
113
|
+
uploadFrame: uploadFrame('/api/identity-verification/v3/liveness/frame'),
|
|
114
|
+
uploadFrameFile: uploadFrameFile('/api/identity-verification/v3/liveness/frame-file'),
|
|
115
|
+
uploadMeta: uploadMeta('/api/identity-verification/v3/liveness/meta'),
|
|
116
|
+
getResult: getResult('/api/identity-verification/v3/liveness/result/')
|
|
117
|
+
};
|
|
118
|
+
const CustomerManagement = {
|
|
119
|
+
getVerifyResult: getVerifyResult('/api/customer-management/liveness-verify/v3/result/'),
|
|
120
|
+
init: init('/api/customer-management/liveness-verify/v3/init'),
|
|
121
|
+
detect: detect('/api/customer-management/liveness-verify/v3/detect')
|
|
122
|
+
};
|
|
123
|
+
const LivenessAPI = {
|
|
124
|
+
IdentityVerification,
|
|
125
|
+
CustomerManagement
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
var LivenessResultStatus;
|
|
129
|
+
(function (LivenessResultStatus) {
|
|
130
|
+
LivenessResultStatus["DONE"] = "DONE";
|
|
131
|
+
LivenessResultStatus["VALIDATING"] = "Validating";
|
|
132
|
+
LivenessResultStatus["UPLOADING"] = "Uploading";
|
|
133
|
+
})(LivenessResultStatus || (LivenessResultStatus = {}));
|
|
134
|
+
|
|
135
|
+
var name = "@authme/liveness";
|
|
136
|
+
var version$1 = "2.2.1-rc.3";
|
|
137
|
+
var peerDependencies = {
|
|
138
|
+
"core-js": "^3.6.0"
|
|
139
|
+
};
|
|
140
|
+
var packageInfo = {
|
|
141
|
+
name: name,
|
|
142
|
+
version: version$1,
|
|
143
|
+
peerDependencies: peerDependencies
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
var _a;
|
|
147
|
+
var _b, _c;
|
|
148
|
+
const version = packageInfo.version;
|
|
149
|
+
(_a = (_b = window)[_c = Symbol.for('authme-sdk')]) !== null && _a !== void 0 ? _a : _b[_c] = {};
|
|
150
|
+
window[Symbol.for('authme-sdk')][packageInfo.name] = version;
|
|
151
|
+
|
|
152
|
+
export { FasService, LivenessAPI, LivenessResultStatus, version };
|
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authme/liveness",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"main": "./src/index.js",
|
|
5
|
-
"typings": "./src/index.d.ts",
|
|
6
|
-
"dependencies": {},
|
|
3
|
+
"version": "2.2.1-rc.3",
|
|
7
4
|
"peerDependencies": {
|
|
8
|
-
"
|
|
9
|
-
"@authme/
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
"core-js": "^3.6.0",
|
|
6
|
+
"@authme/core": "2.2.1-rc.3",
|
|
7
|
+
"@authme/util": "2.2.1-rc.3",
|
|
8
|
+
"@authme/engine": "2.2.1-rc.3"
|
|
9
|
+
},
|
|
10
|
+
"module": "./index.js",
|
|
11
|
+
"main": "./index.cjs",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"types": "./src/index.d.ts",
|
|
14
|
+
"dependencies": {}
|
|
16
15
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './lib/modules-liveness-feature-liveness';
|
|
2
|
-
export * from './lib/enum';
|
|
3
|
-
export * from './lib/interface';
|
|
4
|
-
export * from './lib/data-access';
|
|
1
|
+
export * from './lib/modules-liveness-feature-liveness';
|
|
2
|
+
export * from './lib/enum';
|
|
3
|
+
export * from './lib/interface';
|
|
4
|
+
export * from './lib/data-access';
|
|
5
|
+
export { version } from './lib/version';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { LivenessDetectBody, LivenessResultResponse, LivenessUploadFrameBody, LivenessUploadMetaBody } from './dto.interface';
|
|
2
|
-
export declare const LivenessAPI: {
|
|
3
|
-
IdentityVerification: {
|
|
4
|
-
init: (Immediately: boolean) => Promise<any>;
|
|
5
|
-
detect: (data: LivenessDetectBody) => Promise<{
|
|
6
|
-
isLiveness?: boolean;
|
|
7
|
-
score?: number;
|
|
8
|
-
}>;
|
|
9
|
-
uploadFrame: (body: LivenessUploadFrameBody) => Promise<void>;
|
|
10
|
-
uploadFrameFile: (data: LivenessUploadFrameBody) => Promise<void>;
|
|
11
|
-
uploadMeta: (data: LivenessUploadMetaBody) => Promise<void>;
|
|
12
|
-
getResult: (id: string) => Promise<LivenessResultResponse>;
|
|
13
|
-
};
|
|
14
|
-
CustomerManagement: {
|
|
15
|
-
getVerifyResult: (id: string) => Promise<any>;
|
|
16
|
-
init: (Immediately: boolean) => Promise<any>;
|
|
17
|
-
detect: (data: LivenessDetectBody) => Promise<{
|
|
18
|
-
isLiveness?: boolean;
|
|
19
|
-
score?: number;
|
|
20
|
-
}>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
1
|
+
import { LivenessDetectBody, LivenessResultResponse, LivenessUploadFrameBody, LivenessUploadMetaBody } from './dto.interface';
|
|
2
|
+
export declare const LivenessAPI: {
|
|
3
|
+
IdentityVerification: {
|
|
4
|
+
init: (Immediately: boolean) => Promise<any>;
|
|
5
|
+
detect: (data: LivenessDetectBody) => Promise<{
|
|
6
|
+
isLiveness?: boolean;
|
|
7
|
+
score?: number;
|
|
8
|
+
}>;
|
|
9
|
+
uploadFrame: (body: LivenessUploadFrameBody) => Promise<void>;
|
|
10
|
+
uploadFrameFile: (data: LivenessUploadFrameBody) => Promise<void>;
|
|
11
|
+
uploadMeta: (data: LivenessUploadMetaBody) => Promise<void>;
|
|
12
|
+
getResult: (id: string) => Promise<LivenessResultResponse>;
|
|
13
|
+
};
|
|
14
|
+
CustomerManagement: {
|
|
15
|
+
getVerifyResult: (id: string) => Promise<any>;
|
|
16
|
+
init: (Immediately: boolean) => Promise<any>;
|
|
17
|
+
detect: (data: LivenessDetectBody) => Promise<{
|
|
18
|
+
isLiveness?: boolean;
|
|
19
|
+
score?: number;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export interface LivenessDetectBody {
|
|
2
|
-
id: string;
|
|
3
|
-
frames: Blob[];
|
|
4
|
-
score: number;
|
|
5
|
-
isLiveness: boolean;
|
|
6
|
-
results: {
|
|
7
|
-
status: string;
|
|
8
|
-
stage: string;
|
|
9
|
-
}[];
|
|
10
|
-
}
|
|
11
|
-
export interface LivenessUploadFrameBody {
|
|
12
|
-
id: string;
|
|
13
|
-
index: number;
|
|
14
|
-
data: string;
|
|
15
|
-
}
|
|
16
|
-
export interface LivenessUploadMetaBody {
|
|
17
|
-
id: string;
|
|
18
|
-
data: string;
|
|
19
|
-
}
|
|
20
|
-
export interface LivenessInitResponse {
|
|
21
|
-
id: string;
|
|
22
|
-
expiredIn: number;
|
|
23
|
-
parameters: {
|
|
24
|
-
fasThreshold: number;
|
|
25
|
-
fasTimeout: number;
|
|
26
|
-
fasMaxFps: number;
|
|
27
|
-
fasStages: string[];
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export interface LivenessResultResponse {
|
|
31
|
-
state: LivenessResultStatus;
|
|
32
|
-
isPass: boolean;
|
|
33
|
-
score: number;
|
|
34
|
-
createTime: string;
|
|
35
|
-
updateTime: string;
|
|
36
|
-
expiryTime: string;
|
|
37
|
-
}
|
|
38
|
-
export declare enum LivenessResultStatus {
|
|
39
|
-
DONE = "DONE",
|
|
40
|
-
VALIDATING = "Validating",
|
|
41
|
-
UPLOADING = "Uploading"
|
|
42
|
-
}
|
|
1
|
+
export interface LivenessDetectBody {
|
|
2
|
+
id: string;
|
|
3
|
+
frames: Blob[];
|
|
4
|
+
score: number;
|
|
5
|
+
isLiveness: boolean;
|
|
6
|
+
results: {
|
|
7
|
+
status: string;
|
|
8
|
+
stage: string;
|
|
9
|
+
}[];
|
|
10
|
+
}
|
|
11
|
+
export interface LivenessUploadFrameBody {
|
|
12
|
+
id: string;
|
|
13
|
+
index: number;
|
|
14
|
+
data: string;
|
|
15
|
+
}
|
|
16
|
+
export interface LivenessUploadMetaBody {
|
|
17
|
+
id: string;
|
|
18
|
+
data: string;
|
|
19
|
+
}
|
|
20
|
+
export interface LivenessInitResponse {
|
|
21
|
+
id: string;
|
|
22
|
+
expiredIn: number;
|
|
23
|
+
parameters: {
|
|
24
|
+
fasThreshold: number;
|
|
25
|
+
fasTimeout: number;
|
|
26
|
+
fasMaxFps: number;
|
|
27
|
+
fasStages: string[];
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface LivenessResultResponse {
|
|
31
|
+
state: LivenessResultStatus;
|
|
32
|
+
isPass: boolean;
|
|
33
|
+
score: number;
|
|
34
|
+
createTime: string;
|
|
35
|
+
updateTime: string;
|
|
36
|
+
expiryTime: string;
|
|
37
|
+
}
|
|
38
|
+
export declare enum LivenessResultStatus {
|
|
39
|
+
DONE = "DONE",
|
|
40
|
+
VALIDATING = "Validating",
|
|
41
|
+
UPLOADING = "Uploading"
|
|
42
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export * from './dto.interface';
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './dto.interface';
|
|
@@ -1,46 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
Failed = "EAuthMeFASServiceStatus_Failed",
|
|
3
|
-
NoFace = "EAuthMeFASServiceStatus_NoFace",
|
|
4
|
-
FaceNotAtCenter = "EAuthMeFASServiceStatus_FaceNotAtCenter",
|
|
5
|
-
FaceTooSmall = "EAuthMeFASServiceStatus_FaceTooSmall",
|
|
6
|
-
FaceTooLarge = "EAuthMeFASServiceStatus_FaceTooLarge",
|
|
7
|
-
NeedFaceToCamera = "EAuthMeFASServiceStatus_NeedFaceToCamera",
|
|
8
|
-
FaceMasked = "EAuthMeFASServiceStatus_FaceMasked",
|
|
9
|
-
NeedOpenMouth = "EAuthMeFASServiceStatus_NeedOpenMouth",
|
|
10
|
-
NeedCloseMouth = "EAuthMeFASServiceStatus_NeedCloseMouth",
|
|
11
|
-
NeedSmile = "EAuthMeFASServiceStatus_NeedSmile",
|
|
12
|
-
NeedOpenEyes = "EAuthMeFASServiceStatus_NeedOpenEyes",
|
|
13
|
-
NeedMoreFrame = "EAuthMeFASServiceStatus_NeedMoreFrame",
|
|
14
|
-
Error = "EAuthMeFASServiceStatus_Error",
|
|
15
|
-
Pass = "EAuthMeFASServiceStatus_Pass"
|
|
16
|
-
}
|
|
17
|
-
export declare enum EAuthMeFASServiceStage {
|
|
18
|
-
Passive = "EAuthMeFASServiceStage_Passive",
|
|
19
|
-
OpenMouth = "EAuthMeFASServiceStage_OpenMouth",
|
|
20
|
-
CloseMouth = "EAuthMeFASServiceStage_CloseMouth",
|
|
21
|
-
Smile = "EAuthMeFASServiceStage_Smile",
|
|
22
|
-
Done = "EAuthMeFASServiceStage_Done"
|
|
23
|
-
}
|
|
24
|
-
export declare enum EAuthMeEyeStatus {
|
|
25
|
-
Eye_Close = "EAuthMeEyeStatus_Eye_Close",
|
|
26
|
-
Eye_Open = "EAuthMeEyeStatus_Eye_Open"
|
|
27
|
-
}
|
|
28
|
-
export declare enum EAuthMeMouthStatus {
|
|
29
|
-
Mouth_Close = "EAuthMeMouthStatus_Mouth_Close",
|
|
30
|
-
Mouth_Open = "EAuthMeMouthStatus_Mouth_Open"
|
|
31
|
-
}
|
|
32
|
-
export declare enum EAuthMeFacePose {
|
|
33
|
-
Unknown = "EAuthMeFacePose_Unknown",
|
|
34
|
-
LeftProfile = "EAuthMeFacePose_LeftProfile",
|
|
35
|
-
LeftFrontal = "EAuthMeFacePose_LeftFrontal",
|
|
36
|
-
Frontal = "EAuthMeFacePose_Frontal",
|
|
37
|
-
RightFrontal = "EAuthMeFacePose_RightFrontal",
|
|
38
|
-
RightProfile = "EAuthMeFacePose_RightProfile",
|
|
39
|
-
UpFrontal = "EAuthMeFacePose_UpFrontal",
|
|
40
|
-
DownFrontal = "EAuthMeFacePose_DownFrontal"
|
|
41
|
-
}
|
|
42
|
-
export declare enum EAuthMeFaceAntiSpoofingStatus {
|
|
43
|
-
FrameNotEnough = "EAuthMeFaceAntiSpoofingStatus_FrameNotEnough",
|
|
44
|
-
Real = "EAuthMeFaceAntiSpoofingStatus_Real",
|
|
45
|
-
Spoof = "EAuthMeFaceAntiSpoofingStatus_Spoof"
|
|
46
|
-
}
|
|
1
|
+
export { EAuthMeEyeStatus, EAuthMeFaceAntiSpoofingStatus, EAuthMeFacePose, EAuthMeFASServiceStage, EAuthMeMouthStatus, EAuthMeFASServiceStatus as FasRecognitionResult, } from '@authme/engine';
|
package/src/lib/enum/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './fas-recognition.enum';
|
|
1
|
+
export * from './fas-recognition.enum';
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { AuthMeRectFloat } from '@authme/engine';
|
|
2
|
-
import { EAuthMeEyeStatus, EAuthMeFaceAntiSpoofingStatus, EAuthMeFacePose, EAuthMeFASServiceStage, EAuthMeMouthStatus, FasRecognitionResult } from '../enum';
|
|
3
|
-
export interface FasResult {
|
|
4
|
-
info: AuthMeFASServiceInfo;
|
|
5
|
-
eStatus: FasRecognitionResult;
|
|
6
|
-
eStage: EAuthMeFASServiceStage;
|
|
7
|
-
}
|
|
8
|
-
export interface AuthMeFASServiceInfo {
|
|
9
|
-
face: AuthMeFaceInfo;
|
|
10
|
-
eye: AuthMeEyeInfo;
|
|
11
|
-
mouth: AuthMeMouthInfo;
|
|
12
|
-
pose: AuthMeFacePoseInfo;
|
|
13
|
-
fas: AuthMeFASInfo;
|
|
14
|
-
}
|
|
15
|
-
export interface AuthMeFaceInfo {
|
|
16
|
-
fScore: number;
|
|
17
|
-
fMask: number;
|
|
18
|
-
box: AuthMeRectFloat;
|
|
19
|
-
afLandmark: number[];
|
|
20
|
-
}
|
|
21
|
-
export interface AuthMeEyeInfo {
|
|
22
|
-
fScore: number;
|
|
23
|
-
eStatus: EAuthMeEyeStatus;
|
|
24
|
-
}
|
|
25
|
-
export interface AuthMeMouthInfo {
|
|
26
|
-
fScore: number;
|
|
27
|
-
eStatus: EAuthMeMouthStatus;
|
|
28
|
-
}
|
|
29
|
-
export interface AuthMeFacePoseInfo {
|
|
30
|
-
ePose: EAuthMeFacePose;
|
|
31
|
-
}
|
|
32
|
-
export interface AuthMeFASInfo {
|
|
33
|
-
eStatus: EAuthMeFaceAntiSpoofingStatus;
|
|
34
|
-
fScore: number;
|
|
35
|
-
}
|
|
1
|
+
import { AuthMeRectFloat } from '@authme/engine';
|
|
2
|
+
import { EAuthMeEyeStatus, EAuthMeFaceAntiSpoofingStatus, EAuthMeFacePose, EAuthMeFASServiceStage, EAuthMeMouthStatus, FasRecognitionResult } from '../enum';
|
|
3
|
+
export interface FasResult {
|
|
4
|
+
info: AuthMeFASServiceInfo;
|
|
5
|
+
eStatus: FasRecognitionResult;
|
|
6
|
+
eStage: EAuthMeFASServiceStage;
|
|
7
|
+
}
|
|
8
|
+
export interface AuthMeFASServiceInfo {
|
|
9
|
+
face: AuthMeFaceInfo;
|
|
10
|
+
eye: AuthMeEyeInfo;
|
|
11
|
+
mouth: AuthMeMouthInfo;
|
|
12
|
+
pose: AuthMeFacePoseInfo;
|
|
13
|
+
fas: AuthMeFASInfo;
|
|
14
|
+
}
|
|
15
|
+
export interface AuthMeFaceInfo {
|
|
16
|
+
fScore: number;
|
|
17
|
+
fMask: number;
|
|
18
|
+
box: AuthMeRectFloat;
|
|
19
|
+
afLandmark: number[];
|
|
20
|
+
}
|
|
21
|
+
export interface AuthMeEyeInfo {
|
|
22
|
+
fScore: number;
|
|
23
|
+
eStatus: EAuthMeEyeStatus;
|
|
24
|
+
}
|
|
25
|
+
export interface AuthMeMouthInfo {
|
|
26
|
+
fScore: number;
|
|
27
|
+
eStatus: EAuthMeMouthStatus;
|
|
28
|
+
}
|
|
29
|
+
export interface AuthMeFacePoseInfo {
|
|
30
|
+
ePose: EAuthMeFacePose;
|
|
31
|
+
}
|
|
32
|
+
export interface AuthMeFASInfo {
|
|
33
|
+
eStatus: EAuthMeFaceAntiSpoofingStatus;
|
|
34
|
+
fScore: number;
|
|
35
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './fas.interface';
|
|
1
|
+
export * from './fas.interface';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { AuthmeEngineModuleBase, MlEngine } from '@authme/engine';
|
|
2
|
-
import { EAuthMeFASServiceStage } from './enum';
|
|
3
|
-
import { FasResult } from './interface';
|
|
4
|
-
export declare class FasService extends AuthmeEngineModuleBase<FasResult> {
|
|
5
|
-
constructor(engine: MlEngine);
|
|
6
|
-
setStage(stageList: EAuthMeFASServiceStage[]): Promise<
|
|
7
|
-
getStageParams(stageIndex: number): Promise<{
|
|
8
|
-
applyFAS: 0 | 1;
|
|
9
|
-
fThreshold: number;
|
|
10
|
-
iFrameNum: number;
|
|
11
|
-
}>;
|
|
12
|
-
setStageParams(stageIndex: number, value: {
|
|
13
|
-
applyFAS: 0 | 1;
|
|
14
|
-
fThreshold: number;
|
|
15
|
-
iFrameNum: number;
|
|
16
|
-
}): Promise<
|
|
17
|
-
}
|
|
1
|
+
import { AuthmeEngineModuleBase, MlEngine } from '@authme/engine';
|
|
2
|
+
import { EAuthMeFASServiceStage } from './enum';
|
|
3
|
+
import { FasResult } from './interface';
|
|
4
|
+
export declare class FasService extends AuthmeEngineModuleBase<FasResult> {
|
|
5
|
+
constructor(engine: MlEngine);
|
|
6
|
+
setStage(stageList: EAuthMeFASServiceStage[]): Promise<unknown>;
|
|
7
|
+
getStageParams(stageIndex: number): Promise<{
|
|
8
|
+
applyFAS: 0 | 1;
|
|
9
|
+
fThreshold: number;
|
|
10
|
+
iFrameNum: number;
|
|
11
|
+
}>;
|
|
12
|
+
setStageParams(stageIndex: number, value: {
|
|
13
|
+
applyFAS: 0 | 1;
|
|
14
|
+
fThreshold: number;
|
|
15
|
+
iFrameNum: number;
|
|
16
|
+
}): Promise<unknown>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const version: string;
|
package/CHANGELOG.md
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
|
-
|
|
5
|
-
## [2.2.0](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.13...v2.2.0) (2022-12-19)
|
|
6
|
-
|
|
7
|
-
## [2.2.0-rc.13](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.12...v2.2.0-rc.13) (2022-12-19)
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
- 1.implement enum LivenessResultStatus 2.modify getResult api recall condition ([28323f0](https://github.com/AuthMe01/web-client-sdk/commit/28323f0714657c9c19d230a2771dde5f5bdbe8f9))
|
|
12
|
-
|
|
13
|
-
## [2.2.0-rc.12](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.11...v2.2.0-rc.12) (2022-12-16)
|
|
14
|
-
|
|
15
|
-
## [2.2.0-rc.11](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.10...v2.2.0-rc.11) (2022-12-16)
|
|
16
|
-
|
|
17
|
-
## [2.2.0-rc.10](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.9...v2.2.0-rc.10) (2022-12-15)
|
|
18
|
-
|
|
19
|
-
## [2.2.0-rc.9](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.8...v2.2.0-rc.9) (2022-12-09)
|
|
20
|
-
|
|
21
|
-
## [2.2.0-rc.8](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.7...v2.2.0-rc.8) (2022-12-07)
|
|
22
|
-
|
|
23
|
-
## [2.2.0-rc.7](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.6...v2.2.0-rc.7) (2022-12-07)
|
|
24
|
-
|
|
25
|
-
## [2.2.0-rc.6](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.5...v2.2.0-rc.6) (2022-12-05)
|
|
26
|
-
|
|
27
|
-
## [2.2.0-rc.5](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.4...v2.2.0-rc.5) (2022-12-03)
|
|
28
|
-
|
|
29
|
-
## [2.2.0-rc.4](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.3...v2.2.0-rc.4) (2022-12-01)
|
|
30
|
-
|
|
31
|
-
## [2.2.0-rc.3](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.2...v2.2.0-rc.3) (2022-11-30)
|
|
32
|
-
|
|
33
|
-
## [2.2.0-rc.2](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.1...v2.2.0-rc.2) (2022-11-28)
|
|
34
|
-
|
|
35
|
-
## [2.2.0-rc.1](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.0...v2.2.0-rc.1) (2022-11-18)
|
|
36
|
-
|
|
37
|
-
## [2.2.0-rc.0](https://github.com/AuthMe01/web-client-sdk/compare/v2.1.1...v2.2.0-rc.0) (2022-11-11)
|
|
38
|
-
|
|
39
|
-
### Features
|
|
40
|
-
|
|
41
|
-
- PROD-1647 remove unused code ([2ae2a11](https://github.com/AuthMe01/web-client-sdk/commit/2ae2a11846fa2c733ae4c07d5e00c971270e648c))
|
|
42
|
-
|
|
43
|
-
## [2.1.2-rc.0](https://github.com/AuthMe01/web-client-sdk/compare/prod-2.1.1...prod-2.1.2-rc.0) (2022-09-15)
|
|
44
|
-
|
|
45
|
-
### Features
|
|
46
|
-
|
|
47
|
-
- PROD-1647 remove unused code ([2ae2a11](https://github.com/AuthMe01/web-client-sdk/commit/2ae2a11846fa2c733ae4c07d5e00c971270e648c))
|
|
48
|
-
|
|
49
|
-
## [2.1.1](https://github.com/AuthMe01/web-client-sdk/compare/prod-2.1.0...prod-2.1.1) (2022-09-08)
|
|
50
|
-
|
|
51
|
-
## 1.2.2 (2022-07-28)
|
|
52
|
-
|
|
53
|
-
### Bug Fixes
|
|
54
|
-
|
|
55
|
-
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
56
|
-
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
57
|
-
- PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
|
|
58
|
-
- PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
|
|
59
|
-
- PROD-680 liveness fail with background upload ([269d17d](https://github.com/AuthMe01/web-client-sdk/commit/269d17d29ffd795270e44455215c0f1c292a137b))
|
|
60
|
-
- PROD-715 add max fps control ([377fcd3](https://github.com/AuthMe01/web-client-sdk/commit/377fcd34624b98feaf87ed8468dd6174dd8d3981))
|
|
61
|
-
|
|
62
|
-
### Features
|
|
63
|
-
|
|
64
|
-
- PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
|
|
65
|
-
- PR-51 Integrate fas UI and logic ([e939088](https://github.com/AuthMe01/web-client-sdk/commit/e939088caffe678ef0e768d7281edd0e6eb09d82))
|
|
66
|
-
- PR-51 Integrate passive fas UI & logic ([f76fb5b](https://github.com/AuthMe01/web-client-sdk/commit/f76fb5b3a1f1cfbc9015524ce9a863c80eec5211))
|
|
67
|
-
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
68
|
-
- PROD-135 add fetch model from backend ([a701d6f](https://github.com/AuthMe01/web-client-sdk/commit/a701d6fadc1ed2b57bebb00360e818d34d561191))
|
|
69
|
-
- PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
|
|
70
|
-
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
71
|
-
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
72
|
-
- PROD-595 Add eKYC impl ([6b5cf51](https://github.com/AuthMe01/web-client-sdk/commit/6b5cf5198a8f3039a52a1f114ff2089cb45b17b2))
|
|
73
|
-
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
74
|
-
|
|
75
|
-
## 1.2.1 (2022-07-28)
|
|
76
|
-
|
|
77
|
-
### Bug Fixes
|
|
78
|
-
|
|
79
|
-
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
80
|
-
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
81
|
-
- PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
|
|
82
|
-
- PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
|
|
83
|
-
- PROD-680 liveness fail with background upload ([269d17d](https://github.com/AuthMe01/web-client-sdk/commit/269d17d29ffd795270e44455215c0f1c292a137b))
|
|
84
|
-
- PROD-715 add max fps control ([377fcd3](https://github.com/AuthMe01/web-client-sdk/commit/377fcd34624b98feaf87ed8468dd6174dd8d3981))
|
|
85
|
-
|
|
86
|
-
### Features
|
|
87
|
-
|
|
88
|
-
- PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
|
|
89
|
-
- PR-51 Integrate fas UI and logic ([e939088](https://github.com/AuthMe01/web-client-sdk/commit/e939088caffe678ef0e768d7281edd0e6eb09d82))
|
|
90
|
-
- PR-51 Integrate passive fas UI & logic ([f76fb5b](https://github.com/AuthMe01/web-client-sdk/commit/f76fb5b3a1f1cfbc9015524ce9a863c80eec5211))
|
|
91
|
-
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
92
|
-
- PROD-135 add fetch model from backend ([a701d6f](https://github.com/AuthMe01/web-client-sdk/commit/a701d6fadc1ed2b57bebb00360e818d34d561191))
|
|
93
|
-
- PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
|
|
94
|
-
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
95
|
-
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
96
|
-
- PROD-595 Add eKYC impl ([6b5cf51](https://github.com/AuthMe01/web-client-sdk/commit/6b5cf5198a8f3039a52a1f114ff2089cb45b17b2))
|
|
97
|
-
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
98
|
-
|
|
99
|
-
# 1.2.0 (2022-07-25)
|
|
100
|
-
|
|
101
|
-
### Bug Fixes
|
|
102
|
-
|
|
103
|
-
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
104
|
-
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
105
|
-
- PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
|
|
106
|
-
- PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
|
|
107
|
-
- PROD-680 liveness fail with background upload ([269d17d](https://github.com/AuthMe01/web-client-sdk/commit/269d17d29ffd795270e44455215c0f1c292a137b))
|
|
108
|
-
- PROD-715 add max fps control ([377fcd3](https://github.com/AuthMe01/web-client-sdk/commit/377fcd34624b98feaf87ed8468dd6174dd8d3981))
|
|
109
|
-
|
|
110
|
-
### Features
|
|
111
|
-
|
|
112
|
-
- PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
|
|
113
|
-
- PR-51 Integrate fas UI and logic ([e939088](https://github.com/AuthMe01/web-client-sdk/commit/e939088caffe678ef0e768d7281edd0e6eb09d82))
|
|
114
|
-
- PR-51 Integrate passive fas UI & logic ([f76fb5b](https://github.com/AuthMe01/web-client-sdk/commit/f76fb5b3a1f1cfbc9015524ce9a863c80eec5211))
|
|
115
|
-
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
116
|
-
- PROD-135 add fetch model from backend ([a701d6f](https://github.com/AuthMe01/web-client-sdk/commit/a701d6fadc1ed2b57bebb00360e818d34d561191))
|
|
117
|
-
- PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
|
|
118
|
-
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
119
|
-
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
120
|
-
- PROD-595 Add eKYC impl ([6b5cf51](https://github.com/AuthMe01/web-client-sdk/commit/6b5cf5198a8f3039a52a1f114ff2089cb45b17b2))
|
|
121
|
-
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
122
|
-
|
|
123
|
-
## 1.1.1 (2022-07-07)
|
|
124
|
-
|
|
125
|
-
### Bug Fixes
|
|
126
|
-
|
|
127
|
-
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
128
|
-
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
129
|
-
- PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
|
|
130
|
-
- PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
|
|
131
|
-
- PROD-680 liveness fail with background upload ([269d17d](https://github.com/AuthMe01/web-client-sdk/commit/269d17d29ffd795270e44455215c0f1c292a137b))
|
|
132
|
-
- PROD-715 add max fps control ([377fcd3](https://github.com/AuthMe01/web-client-sdk/commit/377fcd34624b98feaf87ed8468dd6174dd8d3981))
|
|
133
|
-
|
|
134
|
-
### Features
|
|
135
|
-
|
|
136
|
-
- PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
|
|
137
|
-
- PR-51 Integrate fas UI and logic ([e939088](https://github.com/AuthMe01/web-client-sdk/commit/e939088caffe678ef0e768d7281edd0e6eb09d82))
|
|
138
|
-
- PR-51 Integrate passive fas UI & logic ([f76fb5b](https://github.com/AuthMe01/web-client-sdk/commit/f76fb5b3a1f1cfbc9015524ce9a863c80eec5211))
|
|
139
|
-
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
140
|
-
- PROD-135 add fetch model from backend ([a701d6f](https://github.com/AuthMe01/web-client-sdk/commit/a701d6fadc1ed2b57bebb00360e818d34d561191))
|
|
141
|
-
- PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
|
|
142
|
-
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
143
|
-
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
144
|
-
- PROD-595 Add eKYC impl ([6b5cf51](https://github.com/AuthMe01/web-client-sdk/commit/6b5cf5198a8f3039a52a1f114ff2089cb45b17b2))
|
|
145
|
-
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
146
|
-
|
|
147
|
-
# 1.1.0 (2022-07-06)
|
|
148
|
-
|
|
149
|
-
### Bug Fixes
|
|
150
|
-
|
|
151
|
-
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
152
|
-
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
153
|
-
- PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
|
|
154
|
-
- PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
|
|
155
|
-
- PROD-680 liveness fail with background upload ([269d17d](https://github.com/AuthMe01/web-client-sdk/commit/269d17d29ffd795270e44455215c0f1c292a137b))
|
|
156
|
-
- PROD-715 add max fps control ([377fcd3](https://github.com/AuthMe01/web-client-sdk/commit/377fcd34624b98feaf87ed8468dd6174dd8d3981))
|
|
157
|
-
|
|
158
|
-
### Features
|
|
159
|
-
|
|
160
|
-
- PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
|
|
161
|
-
- PR-51 Integrate fas UI and logic ([e939088](https://github.com/AuthMe01/web-client-sdk/commit/e939088caffe678ef0e768d7281edd0e6eb09d82))
|
|
162
|
-
- PR-51 Integrate passive fas UI & logic ([f76fb5b](https://github.com/AuthMe01/web-client-sdk/commit/f76fb5b3a1f1cfbc9015524ce9a863c80eec5211))
|
|
163
|
-
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
164
|
-
- PROD-135 add fetch model from backend ([a701d6f](https://github.com/AuthMe01/web-client-sdk/commit/a701d6fadc1ed2b57bebb00360e818d34d561191))
|
|
165
|
-
- PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
|
|
166
|
-
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
167
|
-
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
168
|
-
- PROD-595 Add eKYC impl ([6b5cf51](https://github.com/AuthMe01/web-client-sdk/commit/6b5cf5198a8f3039a52a1f114ff2089cb45b17b2))
|
|
169
|
-
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
170
|
-
|
|
171
|
-
# 1.0.0 (2022-05-30)
|
|
172
|
-
|
|
173
|
-
### Bug Fixes
|
|
174
|
-
|
|
175
|
-
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
176
|
-
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
177
|
-
- PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
|
|
178
|
-
- PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
|
|
179
|
-
- PROD-680 liveness fail with background upload ([269d17d](https://github.com/AuthMe01/web-client-sdk/commit/269d17d29ffd795270e44455215c0f1c292a137b))
|
|
180
|
-
|
|
181
|
-
### Features
|
|
182
|
-
|
|
183
|
-
- PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
|
|
184
|
-
- PR-51 Integrate fas UI and logic ([e939088](https://github.com/AuthMe01/web-client-sdk/commit/e939088caffe678ef0e768d7281edd0e6eb09d82))
|
|
185
|
-
- PR-51 Integrate passive fas UI & logic ([f76fb5b](https://github.com/AuthMe01/web-client-sdk/commit/f76fb5b3a1f1cfbc9015524ce9a863c80eec5211))
|
|
186
|
-
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
187
|
-
- PROD-135 add fetch model from backend ([a701d6f](https://github.com/AuthMe01/web-client-sdk/commit/a701d6fadc1ed2b57bebb00360e818d34d561191))
|
|
188
|
-
- PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
|
|
189
|
-
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
190
|
-
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
191
|
-
- PROD-595 Add eKYC impl ([6b5cf51](https://github.com/AuthMe01/web-client-sdk/commit/6b5cf5198a8f3039a52a1f114ff2089cb45b17b2))
|
package/src/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./lib/modules-liveness-feature-liveness"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./lib/enum"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./lib/interface"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./lib/data-access"), exports);
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/modules/liveness/feature-liveness/src/index.ts"],"names":[],"mappings":";;;AAAA,kFAAwD;AACxD,qDAA2B;AAC3B,0DAAgC;AAChC,4DAAkC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LivenessAPI = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@authme/core");
|
|
6
|
-
const util_1 = require("@authme/util");
|
|
7
|
-
const init = (url) => (Immediately) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
-
return (0, core_1.sendRequest)(url, 'POST', {
|
|
9
|
-
body: JSON.stringify({
|
|
10
|
-
Immediately,
|
|
11
|
-
}),
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
const detect = (url) => (data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
const formData = new FormData();
|
|
16
|
-
formData.append('id', data.id);
|
|
17
|
-
formData.append('score', data.score.toString());
|
|
18
|
-
formData.append('isLiveness', data.isLiveness.toString());
|
|
19
|
-
data.frames.forEach((element, index) => {
|
|
20
|
-
formData.append('Frames', element, `frame${index}`);
|
|
21
|
-
});
|
|
22
|
-
data.results.forEach((item, index) => {
|
|
23
|
-
formData.append(`results[${index}][status]`, item.status.split('_')[1]);
|
|
24
|
-
formData.append(`results[${index}][stage]`, item.stage.split('_')[1]);
|
|
25
|
-
});
|
|
26
|
-
return (0, core_1.sendRequest)(url, 'POST', {
|
|
27
|
-
body: formData,
|
|
28
|
-
contentType: 'multipart/form-data',
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
const uploadFrameFile = (url) => (data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
-
const formData = new FormData();
|
|
33
|
-
formData.append('id', data.id);
|
|
34
|
-
formData.append('index', data.index.toString());
|
|
35
|
-
formData.append('data', (0, util_1.dataURItoBlob)(data.data));
|
|
36
|
-
return (0, core_1.sendRequest)(url, 'POST', {
|
|
37
|
-
body: formData,
|
|
38
|
-
contentType: 'multipart/form-data',
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
const uploadFrame = (url) => (body) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
42
|
-
return (0, core_1.sendRequest)(url, 'POST', {
|
|
43
|
-
body: JSON.stringify(Object.assign(Object.assign({}, body), { data: body.data.split('base64,')[1] })),
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
const uploadMeta = (url) => (data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
47
|
-
return (0, core_1.sendRequest)(url, 'POST', { body: JSON.stringify(data) });
|
|
48
|
-
});
|
|
49
|
-
const getResult = (url) => (id) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return (0, core_1.sendRequest)(`${url}${id}`, 'GET'); });
|
|
50
|
-
const getVerifyResult = (url) => (id) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return (0, core_1.sendRequest)(`${url}${id}`, 'GET'); });
|
|
51
|
-
const IdentityVerification = {
|
|
52
|
-
init: init('/api/identity-verification/v3/liveness/init'),
|
|
53
|
-
detect: detect('/api/identity-verification/v3/liveness/detect'),
|
|
54
|
-
uploadFrame: uploadFrame('/api/identity-verification/v3/liveness/frame'),
|
|
55
|
-
uploadFrameFile: uploadFrameFile('/api/identity-verification/v3/liveness/frame-file'),
|
|
56
|
-
uploadMeta: uploadMeta('/api/identity-verification/v3/liveness/meta'),
|
|
57
|
-
getResult: getResult('/api/identity-verification/v3/liveness/result/'),
|
|
58
|
-
};
|
|
59
|
-
const CustomerManagement = {
|
|
60
|
-
getVerifyResult: getVerifyResult('/api/customer-management/liveness-verify/v3/result/'),
|
|
61
|
-
init: init('/api/customer-management/liveness-verify/v3/init'),
|
|
62
|
-
detect: detect('/api/customer-management/liveness-verify/v3/detect'),
|
|
63
|
-
};
|
|
64
|
-
exports.LivenessAPI = {
|
|
65
|
-
IdentityVerification,
|
|
66
|
-
CustomerManagement,
|
|
67
|
-
};
|
|
68
|
-
//# sourceMappingURL=api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/liveness/feature-liveness/src/lib/data-access/api.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LivenessResultStatus = void 0;
|
|
4
|
-
var LivenessResultStatus;
|
|
5
|
-
(function (LivenessResultStatus) {
|
|
6
|
-
LivenessResultStatus["DONE"] = "DONE";
|
|
7
|
-
LivenessResultStatus["VALIDATING"] = "Validating";
|
|
8
|
-
LivenessResultStatus["UPLOADING"] = "Uploading";
|
|
9
|
-
})(LivenessResultStatus = exports.LivenessResultStatus || (exports.LivenessResultStatus = {}));
|
|
10
|
-
//# sourceMappingURL=dto.interface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dto.interface.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/liveness/feature-liveness/src/lib/data-access/dto.interface.ts"],"names":[],"mappings":";;;AAuCA,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,iDAAyB,CAAA;IACzB,+CAAuB,CAAA;AACzB,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/liveness/feature-liveness/src/lib/data-access/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,0DAAgC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EAuthMeFaceAntiSpoofingStatus = exports.EAuthMeFacePose = exports.EAuthMeMouthStatus = exports.EAuthMeEyeStatus = exports.EAuthMeFASServiceStage = exports.FasRecognitionResult = void 0;
|
|
4
|
-
var FasRecognitionResult;
|
|
5
|
-
(function (FasRecognitionResult) {
|
|
6
|
-
FasRecognitionResult["Failed"] = "EAuthMeFASServiceStatus_Failed";
|
|
7
|
-
FasRecognitionResult["NoFace"] = "EAuthMeFASServiceStatus_NoFace";
|
|
8
|
-
FasRecognitionResult["FaceNotAtCenter"] = "EAuthMeFASServiceStatus_FaceNotAtCenter";
|
|
9
|
-
FasRecognitionResult["FaceTooSmall"] = "EAuthMeFASServiceStatus_FaceTooSmall";
|
|
10
|
-
FasRecognitionResult["FaceTooLarge"] = "EAuthMeFASServiceStatus_FaceTooLarge";
|
|
11
|
-
FasRecognitionResult["NeedFaceToCamera"] = "EAuthMeFASServiceStatus_NeedFaceToCamera";
|
|
12
|
-
FasRecognitionResult["FaceMasked"] = "EAuthMeFASServiceStatus_FaceMasked";
|
|
13
|
-
FasRecognitionResult["NeedOpenMouth"] = "EAuthMeFASServiceStatus_NeedOpenMouth";
|
|
14
|
-
FasRecognitionResult["NeedCloseMouth"] = "EAuthMeFASServiceStatus_NeedCloseMouth";
|
|
15
|
-
FasRecognitionResult["NeedSmile"] = "EAuthMeFASServiceStatus_NeedSmile";
|
|
16
|
-
FasRecognitionResult["NeedOpenEyes"] = "EAuthMeFASServiceStatus_NeedOpenEyes";
|
|
17
|
-
FasRecognitionResult["NeedMoreFrame"] = "EAuthMeFASServiceStatus_NeedMoreFrame";
|
|
18
|
-
FasRecognitionResult["Error"] = "EAuthMeFASServiceStatus_Error";
|
|
19
|
-
FasRecognitionResult["Pass"] = "EAuthMeFASServiceStatus_Pass";
|
|
20
|
-
})(FasRecognitionResult = exports.FasRecognitionResult || (exports.FasRecognitionResult = {}));
|
|
21
|
-
var EAuthMeFASServiceStage;
|
|
22
|
-
(function (EAuthMeFASServiceStage) {
|
|
23
|
-
EAuthMeFASServiceStage["Passive"] = "EAuthMeFASServiceStage_Passive";
|
|
24
|
-
EAuthMeFASServiceStage["OpenMouth"] = "EAuthMeFASServiceStage_OpenMouth";
|
|
25
|
-
EAuthMeFASServiceStage["CloseMouth"] = "EAuthMeFASServiceStage_CloseMouth";
|
|
26
|
-
EAuthMeFASServiceStage["Smile"] = "EAuthMeFASServiceStage_Smile";
|
|
27
|
-
EAuthMeFASServiceStage["Done"] = "EAuthMeFASServiceStage_Done";
|
|
28
|
-
})(EAuthMeFASServiceStage = exports.EAuthMeFASServiceStage || (exports.EAuthMeFASServiceStage = {}));
|
|
29
|
-
var EAuthMeEyeStatus;
|
|
30
|
-
(function (EAuthMeEyeStatus) {
|
|
31
|
-
EAuthMeEyeStatus["Eye_Close"] = "EAuthMeEyeStatus_Eye_Close";
|
|
32
|
-
EAuthMeEyeStatus["Eye_Open"] = "EAuthMeEyeStatus_Eye_Open";
|
|
33
|
-
})(EAuthMeEyeStatus = exports.EAuthMeEyeStatus || (exports.EAuthMeEyeStatus = {}));
|
|
34
|
-
var EAuthMeMouthStatus;
|
|
35
|
-
(function (EAuthMeMouthStatus) {
|
|
36
|
-
EAuthMeMouthStatus["Mouth_Close"] = "EAuthMeMouthStatus_Mouth_Close";
|
|
37
|
-
EAuthMeMouthStatus["Mouth_Open"] = "EAuthMeMouthStatus_Mouth_Open";
|
|
38
|
-
})(EAuthMeMouthStatus = exports.EAuthMeMouthStatus || (exports.EAuthMeMouthStatus = {}));
|
|
39
|
-
var EAuthMeFacePose;
|
|
40
|
-
(function (EAuthMeFacePose) {
|
|
41
|
-
EAuthMeFacePose["Unknown"] = "EAuthMeFacePose_Unknown";
|
|
42
|
-
EAuthMeFacePose["LeftProfile"] = "EAuthMeFacePose_LeftProfile";
|
|
43
|
-
EAuthMeFacePose["LeftFrontal"] = "EAuthMeFacePose_LeftFrontal";
|
|
44
|
-
EAuthMeFacePose["Frontal"] = "EAuthMeFacePose_Frontal";
|
|
45
|
-
EAuthMeFacePose["RightFrontal"] = "EAuthMeFacePose_RightFrontal";
|
|
46
|
-
EAuthMeFacePose["RightProfile"] = "EAuthMeFacePose_RightProfile";
|
|
47
|
-
EAuthMeFacePose["UpFrontal"] = "EAuthMeFacePose_UpFrontal";
|
|
48
|
-
EAuthMeFacePose["DownFrontal"] = "EAuthMeFacePose_DownFrontal";
|
|
49
|
-
})(EAuthMeFacePose = exports.EAuthMeFacePose || (exports.EAuthMeFacePose = {}));
|
|
50
|
-
var EAuthMeFaceAntiSpoofingStatus;
|
|
51
|
-
(function (EAuthMeFaceAntiSpoofingStatus) {
|
|
52
|
-
EAuthMeFaceAntiSpoofingStatus["FrameNotEnough"] = "EAuthMeFaceAntiSpoofingStatus_FrameNotEnough";
|
|
53
|
-
EAuthMeFaceAntiSpoofingStatus["Real"] = "EAuthMeFaceAntiSpoofingStatus_Real";
|
|
54
|
-
EAuthMeFaceAntiSpoofingStatus["Spoof"] = "EAuthMeFaceAntiSpoofingStatus_Spoof";
|
|
55
|
-
})(EAuthMeFaceAntiSpoofingStatus = exports.EAuthMeFaceAntiSpoofingStatus || (exports.EAuthMeFaceAntiSpoofingStatus = {}));
|
|
56
|
-
//# sourceMappingURL=fas-recognition.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fas-recognition.enum.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/liveness/feature-liveness/src/lib/enum/fas-recognition.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAeX;AAfD,WAAY,oBAAoB;IAC9B,iEAAyC,CAAA;IACzC,iEAAyC,CAAA;IACzC,mFAA2D,CAAA;IAC3D,6EAAqD,CAAA;IACrD,6EAAqD,CAAA;IACrD,qFAA6D,CAAA;IAC7D,yEAAiD,CAAA;IACjD,+EAAuD,CAAA;IACvD,iFAAyD,CAAA;IACzD,uEAA+C,CAAA;IAC/C,6EAAqD,CAAA;IACrD,+EAAuD,CAAA;IACvD,+DAAuC,CAAA;IACvC,6DAAqC,CAAA;AACvC,CAAC,EAfW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAe/B;AAED,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,oEAA0C,CAAA;IAC1C,wEAA8C,CAAA;IAC9C,0EAAgD,CAAA;IAChD,gEAAsC,CAAA;IACtC,8DAAoC,CAAA;AACtC,CAAC,EANW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAMjC;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,4DAAwC,CAAA;IACxC,0DAAsC,CAAA;AACxC,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B;AACD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,oEAA8C,CAAA;IAC9C,kEAA4C,CAAA;AAC9C,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AACD,IAAY,eASX;AATD,WAAY,eAAe;IACzB,sDAAmC,CAAA;IACnC,8DAA2C,CAAA;IAC3C,8DAA2C,CAAA;IAC3C,sDAAmC,CAAA;IACnC,gEAA6C,CAAA;IAC7C,gEAA6C,CAAA;IAC7C,0DAAuC,CAAA;IACvC,8DAA2C,CAAA;AAC7C,CAAC,EATW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAS1B;AAED,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,gGAA+D,CAAA;IAC/D,4EAA2C,CAAA;IAC3C,8EAA6C,CAAA;AAC/C,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC"}
|
package/src/lib/enum/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/liveness/feature-liveness/src/lib/enum/index.ts"],"names":[],"mappings":";;;AAAA,iEAAuC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fas.interface.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/liveness/feature-liveness/src/lib/interface/fas.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/liveness/feature-liveness/src/lib/interface/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FasService = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const engine_1 = require("@authme/engine");
|
|
6
|
-
const rxjs_1 = require("rxjs");
|
|
7
|
-
class FasService extends engine_1.AuthmeEngineModuleBase {
|
|
8
|
-
constructor(engine) {
|
|
9
|
-
super(engine);
|
|
10
|
-
this.moduleName = engine_1.EngineModule.Fas;
|
|
11
|
-
}
|
|
12
|
-
setStage(stageList) {
|
|
13
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
-
const stageStrList = stageList.map((x) => x.split('_')[1]);
|
|
15
|
-
return yield (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'setStage', { stageList: stageStrList }));
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
getStageParams(stageIndex) {
|
|
19
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
return yield (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'getStageParams', { stageIndex }));
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
setStageParams(stageIndex, value) {
|
|
24
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
return yield (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'setStageParams', { stageIndex, value }));
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.FasService = FasService;
|
|
30
|
-
//# sourceMappingURL=modules-liveness-feature-liveness.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules-liveness-feature-liveness.js","sourceRoot":"","sources":["../../../../../../../libs/modules/liveness/feature-liveness/src/lib/modules-liveness-feature-liveness.ts"],"names":[],"mappings":";;;;AAAA,2CAAgF;AAChF,+BAAsC;AAItC,MAAa,UAAW,SAAQ,+BAAiC;IAC/D,YAAY,MAAgB;QAC1B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,qBAAY,CAAC,GAAG,CAAC;IACrC,CAAC;IAEK,QAAQ,CAAC,SAAmC;;YAChD,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3D,OAAO,MAAM,IAAA,qBAAc,EACzB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,CAC1E,CAAC;QACJ,CAAC;KAAA;IAEK,cAAc,CAClB,UAAkB;;YAElB,OAAO,MAAM,IAAA,qBAAc,EACzB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,EAAE,EAAE,UAAU,EAAE,CAAC,CACnE,CAAC;QACJ,CAAC;KAAA;IAEK,cAAc,CAClB,UAAkB,EAClB,KAAiE;;YAEjE,OAAO,MAAM,IAAA,qBAAc,EACzB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAC1E,CAAC;QACJ,CAAC;KAAA;CACF;AA7BD,gCA6BC"}
|