@authme/id-recognition 2.2.0 → 2.2.1-rc.1
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/CHANGELOG.md +16 -0
- package/package.json +4 -4
- package/src/lib/data-access/api.d.ts +2 -2
- package/src/lib/data-access/api.js +3 -3
- package/src/lib/data-access/api.js.map +1 -1
- package/src/lib/enum/id-recognition.enum.d.ts +13 -87
- package/src/lib/enum/id-recognition.enum.js +23 -100
- package/src/lib/enum/id-recognition.enum.js.map +1 -1
- package/src/lib/interface/id-recognition-type.interface.d.ts +3 -13
- package/src/lib/model/dto.model.d.ts +1 -0
- package/src/lib/modules-id-recognition-feature-id-recognition.d.ts +2 -2
- package/src/lib/modules-id-recognition-feature-id-recognition.js +6 -19
- package/src/lib/modules-id-recognition-feature-id-recognition.js.map +1 -1
- package/src/lib/util.d.ts +6 -2
- package/src/lib/util.js +18 -8
- package/src/lib/util.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [2.2.1-rc.1](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.1-rc.0...v2.2.1-rc.1) (2022-12-28)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- 1. orc mod implement timeout 2. implement TIME_UNIT enum ([90197c5](https://github.com/AuthMe01/web-client-sdk/commit/90197c5ae1243bfbe27c4136a70576a55157204a))
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- inconsistency enum (or remove unused) ([b716f14](https://github.com/AuthMe01/web-client-sdk/commit/b716f142fa20d2eebf0af66ff27f858ef1e825b0))
|
|
14
|
+
|
|
15
|
+
## [2.2.1-rc.0](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0...v2.2.1-rc.0) (2022-12-22)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- implement preloadBackground feature ([4b58a16](https://github.com/AuthMe01/web-client-sdk/commit/4b58a16dbdd506d48ce9f9671d8154997f4b9839))
|
|
20
|
+
|
|
5
21
|
## [2.2.0](https://github.com/AuthMe01/web-client-sdk/compare/v2.2.0-rc.13...v2.2.0) (2022-12-19)
|
|
6
22
|
|
|
7
23
|
## [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)
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authme/id-recognition",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1-rc.1",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"typings": "./src/index.d.ts",
|
|
6
6
|
"dependencies": {},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@authme/core": "2.2.
|
|
9
|
-
"@authme/util": "2.2.
|
|
8
|
+
"@authme/core": "2.2.1-rc.1",
|
|
9
|
+
"@authme/util": "2.2.1-rc.1",
|
|
10
10
|
"three": "^0.136.0",
|
|
11
11
|
"lottie-web": "^5.9.2",
|
|
12
|
-
"@authme/engine": "2.2.
|
|
12
|
+
"@authme/engine": "2.2.1-rc.1",
|
|
13
13
|
"rxjs": "~7.4.0",
|
|
14
14
|
"tslib": "^2.3.0"
|
|
15
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CountryCode,
|
|
1
|
+
import { CountryCode, IdRecognitionCardType, ResourceImageType, ServerSideEAuthMeCardClass } from '../enum';
|
|
2
2
|
import { InitScanResponse } from '../model';
|
|
3
3
|
export declare function init(type: IdRecognitionCardType, country: CountryCode, needConfirm: boolean): Promise<InitScanResponse>;
|
|
4
|
-
export declare function initScanDocument(scanId: string,
|
|
4
|
+
export declare function initScanDocument(scanId: string, cardType: `${ServerSideEAuthMeCardClass}`): Promise<{
|
|
5
5
|
scanDocumentId: string;
|
|
6
6
|
}>;
|
|
7
7
|
export declare function recognition(documentId: string, file: Blob): Promise<{
|
|
@@ -7,16 +7,16 @@ const util_1 = require("../util");
|
|
|
7
7
|
function init(type, country, needConfirm) {
|
|
8
8
|
const body = {
|
|
9
9
|
scanType: type === enum_1.IdRecognitionCardType.Passport ? type : `${country}_${type}`,
|
|
10
|
-
cardTypes: (0, util_1.getCardSubTypes)(type, country),
|
|
10
|
+
cardTypes: (0, util_1.getCardSubTypes)(type, country).map((c) => util_1.twoWayAuthmeCardClassMap.toServer(c)),
|
|
11
11
|
needConfirm,
|
|
12
12
|
};
|
|
13
13
|
return (0, core_1.sendRequest)('/api/identity-verification/id-recognition/v3/init-scan', 'POST', { body: JSON.stringify(body) });
|
|
14
14
|
}
|
|
15
15
|
exports.init = init;
|
|
16
|
-
function initScanDocument(scanId,
|
|
16
|
+
function initScanDocument(scanId, cardType) {
|
|
17
17
|
const body = {
|
|
18
18
|
scanId,
|
|
19
|
-
cardType
|
|
19
|
+
cardType,
|
|
20
20
|
};
|
|
21
21
|
return (0, core_1.sendRequest)('/api/identity-verification/id-recognition/v3/init-scan-doc', 'POST', { body: JSON.stringify(body) });
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/data-access/api.ts"],"names":[],"mappings":";;;AAAA,uCAAwD;AACxD,kCAKiB;AAEjB,
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/data-access/api.ts"],"names":[],"mappings":";;;AAAA,uCAAwD;AACxD,kCAKiB;AAEjB,kCAAoE;AAEpE,SAAgB,IAAI,CAClB,IAA2B,EAC3B,OAAoB,EACpB,WAAoB;IAEpB,MAAM,IAAI,GAAG;QACX,QAAQ,EACN,IAAI,KAAK,4BAAqB,CAAC,QAAQ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IDCardAntiFraudStatus, EAuthMeMRZRecogStatus, EAuthMePassportServiceStatus, } from '@authme/engine';
|
|
1
2
|
export declare enum ResourceImageType {
|
|
2
3
|
Recognition = "Recognition",
|
|
3
4
|
Fraud = "Fraud",
|
|
@@ -13,91 +14,16 @@ export declare enum IdRecognitionCardType {
|
|
|
13
14
|
ResidentCard = "ResidentCard",
|
|
14
15
|
Passport = "Passport"
|
|
15
16
|
}
|
|
16
|
-
export declare enum
|
|
17
|
-
Invalid =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
TWN_VehiclesLicense_Front = 10
|
|
29
|
-
}
|
|
30
|
-
export declare enum EAuthMeIDCardMetalTagStatus {
|
|
31
|
-
NotFound = "EAuthMeIDCardMetalTagStatus_NotFound",
|
|
32
|
-
Bright = "EAuthMeIDCardMetalTagStatus_Bright",
|
|
33
|
-
Dark = "EAuthMeIDCardMetalTagStatus_Dark"
|
|
34
|
-
}
|
|
35
|
-
export declare enum EAuthMeLaserTagStatus {
|
|
36
|
-
NoTag = "EAuthMeLaserTagStatus_NoTag",
|
|
37
|
-
HasTag = "EAuthMeLaserTagStatus_HasTag",
|
|
38
|
-
Others = "EAuthMeLaserTagStatus_Others"
|
|
39
|
-
}
|
|
40
|
-
export declare enum EAuthMeTaiwanHoleStatus {
|
|
41
|
-
NotFound = "EAuthMeTaiwanHoleStatus_NotFound",
|
|
42
|
-
Found = "EAuthMeTaiwanHoleStatus_Found"
|
|
43
|
-
}
|
|
44
|
-
export declare enum EAuthMeCardClass {
|
|
45
|
-
Invalid = "EAuthMeCardClass_Invalid",
|
|
46
|
-
Background = "EAuthMeCardClass_Background",
|
|
47
|
-
Unknown = "EAuthMeCardClass_Unknown",
|
|
48
|
-
Passport = "EAuthMeCardClass_Passport",
|
|
49
|
-
TWN_IDCard_Front = "EAuthMeCardClass_TWN_IDCard_Front",
|
|
50
|
-
TWN_IDCard_Back = "EAuthMeCardClass_TWN_IDCard_Back",
|
|
51
|
-
TWN_DriverLicense_Front = "EAuthMeCardClass_TWN_DriverLicense_Front",
|
|
52
|
-
TWN_DriverLicense_Back = "EAuthMeCardClass_TWN_DriverLicense_Back",
|
|
53
|
-
TWN_ResidentCard_Front = "EAuthMeCardClass_TWN_ResidentCard_Front",
|
|
54
|
-
TWN_ResidentCard_Back = "EAuthMeCardClass_TWN_ResidentCard_Back",
|
|
55
|
-
TWN_HealthCard_Front = "EAuthMeCardClass_TWN_HealthCard_Front",
|
|
56
|
-
TWN_VehiclesLicense_Front = "EAuthMeCardClass_TWN_VehiclesLicense_Front"
|
|
57
|
-
}
|
|
58
|
-
export declare enum EAuthMeCardMatchStatus {
|
|
59
|
-
None = "EAuthMeCardMatchStatus_None",
|
|
60
|
-
Mismatch = "EAuthMeCardMatchStatus_Mismatch",
|
|
61
|
-
NeedMoreFrame = "EAuthMeCardMatchStatus_NeedMoreFrame",
|
|
62
|
-
Match = "EAuthMeCardMatchStatus_Match"
|
|
63
|
-
}
|
|
64
|
-
export declare enum EAuthMeCardOCRStatus {
|
|
65
|
-
NoCard = "EAuthMeCardOCRStatus_NoCard",
|
|
66
|
-
WrongCardType = "EAuthMeCardOCRStatus_WrongCardType",
|
|
67
|
-
PositionNotMatch = "EAuthMeCardOCRStatus_PositionNotMatch",
|
|
68
|
-
Reflective = "EAuthMeCardOCRStatus_Reflective",
|
|
69
|
-
Blur = "EAuthMeCardOCRStatus_Blur",
|
|
70
|
-
Pass = "EAuthMeCardOCRStatus_Pass",
|
|
71
|
-
Error = "EAuthMeCardOCRStatus_Error"
|
|
72
|
-
}
|
|
73
|
-
export declare enum EAuthMeIDCardAntiFraudStatus {
|
|
74
|
-
Failed = "EAuthMeIDCardAntiFraudStatus_Failed",
|
|
75
|
-
NoCard = "EAuthMeIDCardAntiFraudStatus_NoCard",
|
|
76
|
-
WrongCardType = "EAuthMeIDCardAntiFraudStatus_WrongCardType",
|
|
77
|
-
Reflective = "EAuthMeIDCardAntiFraudStatus_Reflective",
|
|
78
|
-
Blur = "EAuthMeIDCardAntiFraudStatus_Blur",
|
|
79
|
-
Gray = "EAuthMeIDCardAntiFraudStatus_Gray",
|
|
80
|
-
PositionNotMatch = "EAuthMeIDCardAntiFraudStatus_PositionNotMatch",
|
|
81
|
-
NeedMoreFrame = "EAuthMeIDCardAntiFraudStatus_NeedMoreFrame",
|
|
82
|
-
Pass = "EAuthMeIDCardAntiFraudStatus_Pass",
|
|
83
|
-
Error = "EAuthMeIDCardAntiFraudStatus_Error"
|
|
84
|
-
}
|
|
85
|
-
export declare enum EAuthMePassportRecogStatus {
|
|
86
|
-
Success = "EAuthMePassportRecogStatus_Success",
|
|
87
|
-
WrongFormat = "EAuthMePassportRecogStatus_WrongFormat"
|
|
88
|
-
}
|
|
89
|
-
export declare enum EAuthMePassportServiceStatus {
|
|
90
|
-
Success = "EAuthMePassportServiceStatus_Success",
|
|
91
|
-
NotFound = "EAuthMePassportServiceStatus_NotFound",
|
|
92
|
-
RecogFailed = "EAuthMePassportServiceStatus_RecogFailed",
|
|
93
|
-
Error = "EAuthMePassportServiceStatus_Error"
|
|
94
|
-
}
|
|
95
|
-
export declare enum EAuthMeIDCardAntiFraudStage {
|
|
96
|
-
Frontal = "EAuthMeIDCardAntiFraudStage_Frontal",
|
|
97
|
-
Up = "EAuthMeIDCardAntiFraudStage_Up",
|
|
98
|
-
Down = "EAuthMeIDCardAntiFraudStage_Down",
|
|
99
|
-
Left = "EAuthMeIDCardAntiFraudStage_Left",
|
|
100
|
-
Right = "EAuthMeIDCardAntiFraudStage_Right",
|
|
101
|
-
IgnoreCardMatch = "EAuthMeIDCardAntiFraudStage_IgnoreCardMatch",
|
|
102
|
-
Done = "EAuthMeIDCardAntiFraudStage_Done"
|
|
17
|
+
export declare enum ServerSideEAuthMeCardClass {
|
|
18
|
+
Invalid = "Invalid",
|
|
19
|
+
Unknown = "UnknownCard",
|
|
20
|
+
Passport = "Passport",
|
|
21
|
+
TWN_IDCard_Front = "TWN_IDCard_Front",
|
|
22
|
+
TWN_IDCard_Back = "TWN_IDCard_Back",
|
|
23
|
+
TWN_DriverLicense_Front = "TWN_DriverLicense_Front",
|
|
24
|
+
TWN_DriverLicense_Back = "TWN_DriverLicense_Back",
|
|
25
|
+
TWN_ResidentCard_Front = "TWN_ResidentCard_Front",
|
|
26
|
+
TWN_ResidentCard_Back = "TWN_ResidentCard_Back",
|
|
27
|
+
TWN_HealthCard_Front = "TWN_HealthCard_Front",
|
|
28
|
+
TWN_VehiclesLicense_Front = "TWN_VehiclesLicense_Front"
|
|
103
29
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ServerSideEAuthMeCardClass = exports.IdRecognitionCardType = exports.CountryCode = exports.ResourceImageType = exports.EAuthMePassportServiceStatus = exports.EAuthMeMRZRecogStatus = exports.EAuthMeIDCardAntiFraudStatus = exports.EAuthMeIDCardAntiFraudStage = exports.EAuthMeCardOCRStatus = exports.EAuthMeCardMatchStatus = exports.EAuthMeCardClass = void 0;
|
|
4
|
+
var engine_1 = require("@authme/engine");
|
|
5
|
+
Object.defineProperty(exports, "EAuthMeCardClass", { enumerable: true, get: function () { return engine_1.EAuthMeCardClass; } });
|
|
6
|
+
Object.defineProperty(exports, "EAuthMeCardMatchStatus", { enumerable: true, get: function () { return engine_1.EAuthMeCardMatchStatus; } });
|
|
7
|
+
Object.defineProperty(exports, "EAuthMeCardOCRStatus", { enumerable: true, get: function () { return engine_1.EAuthMeCardOCRStatus; } });
|
|
8
|
+
Object.defineProperty(exports, "EAuthMeIDCardAntiFraudStage", { enumerable: true, get: function () { return engine_1.EAuthMeIDCardAntiFraudStage; } });
|
|
9
|
+
Object.defineProperty(exports, "EAuthMeIDCardAntiFraudStatus", { enumerable: true, get: function () { return engine_1.EAuthMeIDCardAntiFraudStatus; } });
|
|
10
|
+
Object.defineProperty(exports, "EAuthMeMRZRecogStatus", { enumerable: true, get: function () { return engine_1.EAuthMeMRZRecogStatus; } });
|
|
11
|
+
Object.defineProperty(exports, "EAuthMePassportServiceStatus", { enumerable: true, get: function () { return engine_1.EAuthMePassportServiceStatus; } });
|
|
4
12
|
var ResourceImageType;
|
|
5
13
|
(function (ResourceImageType) {
|
|
6
14
|
ResourceImageType["Recognition"] = "Recognition";
|
|
@@ -19,103 +27,18 @@ var IdRecognitionCardType;
|
|
|
19
27
|
IdRecognitionCardType["ResidentCard"] = "ResidentCard";
|
|
20
28
|
IdRecognitionCardType["Passport"] = "Passport";
|
|
21
29
|
})(IdRecognitionCardType = exports.IdRecognitionCardType || (exports.IdRecognitionCardType = {}));
|
|
22
|
-
var
|
|
23
|
-
(function (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
})(OCRCardType = exports.OCRCardType || (exports.OCRCardType = {}));
|
|
37
|
-
var EAuthMeIDCardMetalTagStatus;
|
|
38
|
-
(function (EAuthMeIDCardMetalTagStatus) {
|
|
39
|
-
EAuthMeIDCardMetalTagStatus["NotFound"] = "EAuthMeIDCardMetalTagStatus_NotFound";
|
|
40
|
-
EAuthMeIDCardMetalTagStatus["Bright"] = "EAuthMeIDCardMetalTagStatus_Bright";
|
|
41
|
-
EAuthMeIDCardMetalTagStatus["Dark"] = "EAuthMeIDCardMetalTagStatus_Dark";
|
|
42
|
-
})(EAuthMeIDCardMetalTagStatus = exports.EAuthMeIDCardMetalTagStatus || (exports.EAuthMeIDCardMetalTagStatus = {}));
|
|
43
|
-
var EAuthMeLaserTagStatus;
|
|
44
|
-
(function (EAuthMeLaserTagStatus) {
|
|
45
|
-
EAuthMeLaserTagStatus["NoTag"] = "EAuthMeLaserTagStatus_NoTag";
|
|
46
|
-
EAuthMeLaserTagStatus["HasTag"] = "EAuthMeLaserTagStatus_HasTag";
|
|
47
|
-
EAuthMeLaserTagStatus["Others"] = "EAuthMeLaserTagStatus_Others";
|
|
48
|
-
})(EAuthMeLaserTagStatus = exports.EAuthMeLaserTagStatus || (exports.EAuthMeLaserTagStatus = {}));
|
|
49
|
-
var EAuthMeTaiwanHoleStatus;
|
|
50
|
-
(function (EAuthMeTaiwanHoleStatus) {
|
|
51
|
-
EAuthMeTaiwanHoleStatus["NotFound"] = "EAuthMeTaiwanHoleStatus_NotFound";
|
|
52
|
-
EAuthMeTaiwanHoleStatus["Found"] = "EAuthMeTaiwanHoleStatus_Found";
|
|
53
|
-
})(EAuthMeTaiwanHoleStatus = exports.EAuthMeTaiwanHoleStatus || (exports.EAuthMeTaiwanHoleStatus = {}));
|
|
54
|
-
var EAuthMeCardClass;
|
|
55
|
-
(function (EAuthMeCardClass) {
|
|
56
|
-
EAuthMeCardClass["Invalid"] = "EAuthMeCardClass_Invalid";
|
|
57
|
-
EAuthMeCardClass["Background"] = "EAuthMeCardClass_Background";
|
|
58
|
-
EAuthMeCardClass["Unknown"] = "EAuthMeCardClass_Unknown";
|
|
59
|
-
EAuthMeCardClass["Passport"] = "EAuthMeCardClass_Passport";
|
|
60
|
-
EAuthMeCardClass["TWN_IDCard_Front"] = "EAuthMeCardClass_TWN_IDCard_Front";
|
|
61
|
-
EAuthMeCardClass["TWN_IDCard_Back"] = "EAuthMeCardClass_TWN_IDCard_Back";
|
|
62
|
-
EAuthMeCardClass["TWN_DriverLicense_Front"] = "EAuthMeCardClass_TWN_DriverLicense_Front";
|
|
63
|
-
EAuthMeCardClass["TWN_DriverLicense_Back"] = "EAuthMeCardClass_TWN_DriverLicense_Back";
|
|
64
|
-
EAuthMeCardClass["TWN_ResidentCard_Front"] = "EAuthMeCardClass_TWN_ResidentCard_Front";
|
|
65
|
-
EAuthMeCardClass["TWN_ResidentCard_Back"] = "EAuthMeCardClass_TWN_ResidentCard_Back";
|
|
66
|
-
EAuthMeCardClass["TWN_HealthCard_Front"] = "EAuthMeCardClass_TWN_HealthCard_Front";
|
|
67
|
-
EAuthMeCardClass["TWN_VehiclesLicense_Front"] = "EAuthMeCardClass_TWN_VehiclesLicense_Front";
|
|
68
|
-
})(EAuthMeCardClass = exports.EAuthMeCardClass || (exports.EAuthMeCardClass = {}));
|
|
69
|
-
var EAuthMeCardMatchStatus;
|
|
70
|
-
(function (EAuthMeCardMatchStatus) {
|
|
71
|
-
EAuthMeCardMatchStatus["None"] = "EAuthMeCardMatchStatus_None";
|
|
72
|
-
EAuthMeCardMatchStatus["Mismatch"] = "EAuthMeCardMatchStatus_Mismatch";
|
|
73
|
-
EAuthMeCardMatchStatus["NeedMoreFrame"] = "EAuthMeCardMatchStatus_NeedMoreFrame";
|
|
74
|
-
EAuthMeCardMatchStatus["Match"] = "EAuthMeCardMatchStatus_Match";
|
|
75
|
-
})(EAuthMeCardMatchStatus = exports.EAuthMeCardMatchStatus || (exports.EAuthMeCardMatchStatus = {}));
|
|
76
|
-
var EAuthMeCardOCRStatus;
|
|
77
|
-
(function (EAuthMeCardOCRStatus) {
|
|
78
|
-
EAuthMeCardOCRStatus["NoCard"] = "EAuthMeCardOCRStatus_NoCard";
|
|
79
|
-
EAuthMeCardOCRStatus["WrongCardType"] = "EAuthMeCardOCRStatus_WrongCardType";
|
|
80
|
-
EAuthMeCardOCRStatus["PositionNotMatch"] = "EAuthMeCardOCRStatus_PositionNotMatch";
|
|
81
|
-
EAuthMeCardOCRStatus["Reflective"] = "EAuthMeCardOCRStatus_Reflective";
|
|
82
|
-
EAuthMeCardOCRStatus["Blur"] = "EAuthMeCardOCRStatus_Blur";
|
|
83
|
-
EAuthMeCardOCRStatus["Pass"] = "EAuthMeCardOCRStatus_Pass";
|
|
84
|
-
EAuthMeCardOCRStatus["Error"] = "EAuthMeCardOCRStatus_Error";
|
|
85
|
-
})(EAuthMeCardOCRStatus = exports.EAuthMeCardOCRStatus || (exports.EAuthMeCardOCRStatus = {}));
|
|
86
|
-
var EAuthMeIDCardAntiFraudStatus;
|
|
87
|
-
(function (EAuthMeIDCardAntiFraudStatus) {
|
|
88
|
-
EAuthMeIDCardAntiFraudStatus["Failed"] = "EAuthMeIDCardAntiFraudStatus_Failed";
|
|
89
|
-
EAuthMeIDCardAntiFraudStatus["NoCard"] = "EAuthMeIDCardAntiFraudStatus_NoCard";
|
|
90
|
-
EAuthMeIDCardAntiFraudStatus["WrongCardType"] = "EAuthMeIDCardAntiFraudStatus_WrongCardType";
|
|
91
|
-
EAuthMeIDCardAntiFraudStatus["Reflective"] = "EAuthMeIDCardAntiFraudStatus_Reflective";
|
|
92
|
-
EAuthMeIDCardAntiFraudStatus["Blur"] = "EAuthMeIDCardAntiFraudStatus_Blur";
|
|
93
|
-
EAuthMeIDCardAntiFraudStatus["Gray"] = "EAuthMeIDCardAntiFraudStatus_Gray";
|
|
94
|
-
EAuthMeIDCardAntiFraudStatus["PositionNotMatch"] = "EAuthMeIDCardAntiFraudStatus_PositionNotMatch";
|
|
95
|
-
EAuthMeIDCardAntiFraudStatus["NeedMoreFrame"] = "EAuthMeIDCardAntiFraudStatus_NeedMoreFrame";
|
|
96
|
-
EAuthMeIDCardAntiFraudStatus["Pass"] = "EAuthMeIDCardAntiFraudStatus_Pass";
|
|
97
|
-
EAuthMeIDCardAntiFraudStatus["Error"] = "EAuthMeIDCardAntiFraudStatus_Error";
|
|
98
|
-
})(EAuthMeIDCardAntiFraudStatus = exports.EAuthMeIDCardAntiFraudStatus || (exports.EAuthMeIDCardAntiFraudStatus = {}));
|
|
99
|
-
var EAuthMePassportRecogStatus;
|
|
100
|
-
(function (EAuthMePassportRecogStatus) {
|
|
101
|
-
EAuthMePassportRecogStatus["Success"] = "EAuthMePassportRecogStatus_Success";
|
|
102
|
-
EAuthMePassportRecogStatus["WrongFormat"] = "EAuthMePassportRecogStatus_WrongFormat";
|
|
103
|
-
})(EAuthMePassportRecogStatus = exports.EAuthMePassportRecogStatus || (exports.EAuthMePassportRecogStatus = {}));
|
|
104
|
-
var EAuthMePassportServiceStatus;
|
|
105
|
-
(function (EAuthMePassportServiceStatus) {
|
|
106
|
-
EAuthMePassportServiceStatus["Success"] = "EAuthMePassportServiceStatus_Success";
|
|
107
|
-
EAuthMePassportServiceStatus["NotFound"] = "EAuthMePassportServiceStatus_NotFound";
|
|
108
|
-
EAuthMePassportServiceStatus["RecogFailed"] = "EAuthMePassportServiceStatus_RecogFailed";
|
|
109
|
-
EAuthMePassportServiceStatus["Error"] = "EAuthMePassportServiceStatus_Error";
|
|
110
|
-
})(EAuthMePassportServiceStatus = exports.EAuthMePassportServiceStatus || (exports.EAuthMePassportServiceStatus = {}));
|
|
111
|
-
var EAuthMeIDCardAntiFraudStage;
|
|
112
|
-
(function (EAuthMeIDCardAntiFraudStage) {
|
|
113
|
-
EAuthMeIDCardAntiFraudStage["Frontal"] = "EAuthMeIDCardAntiFraudStage_Frontal";
|
|
114
|
-
EAuthMeIDCardAntiFraudStage["Up"] = "EAuthMeIDCardAntiFraudStage_Up";
|
|
115
|
-
EAuthMeIDCardAntiFraudStage["Down"] = "EAuthMeIDCardAntiFraudStage_Down";
|
|
116
|
-
EAuthMeIDCardAntiFraudStage["Left"] = "EAuthMeIDCardAntiFraudStage_Left";
|
|
117
|
-
EAuthMeIDCardAntiFraudStage["Right"] = "EAuthMeIDCardAntiFraudStage_Right";
|
|
118
|
-
EAuthMeIDCardAntiFraudStage["IgnoreCardMatch"] = "EAuthMeIDCardAntiFraudStage_IgnoreCardMatch";
|
|
119
|
-
EAuthMeIDCardAntiFraudStage["Done"] = "EAuthMeIDCardAntiFraudStage_Done";
|
|
120
|
-
})(EAuthMeIDCardAntiFraudStage = exports.EAuthMeIDCardAntiFraudStage || (exports.EAuthMeIDCardAntiFraudStage = {}));
|
|
30
|
+
var ServerSideEAuthMeCardClass;
|
|
31
|
+
(function (ServerSideEAuthMeCardClass) {
|
|
32
|
+
ServerSideEAuthMeCardClass["Invalid"] = "Invalid";
|
|
33
|
+
ServerSideEAuthMeCardClass["Unknown"] = "UnknownCard";
|
|
34
|
+
ServerSideEAuthMeCardClass["Passport"] = "Passport";
|
|
35
|
+
ServerSideEAuthMeCardClass["TWN_IDCard_Front"] = "TWN_IDCard_Front";
|
|
36
|
+
ServerSideEAuthMeCardClass["TWN_IDCard_Back"] = "TWN_IDCard_Back";
|
|
37
|
+
ServerSideEAuthMeCardClass["TWN_DriverLicense_Front"] = "TWN_DriverLicense_Front";
|
|
38
|
+
ServerSideEAuthMeCardClass["TWN_DriverLicense_Back"] = "TWN_DriverLicense_Back";
|
|
39
|
+
ServerSideEAuthMeCardClass["TWN_ResidentCard_Front"] = "TWN_ResidentCard_Front";
|
|
40
|
+
ServerSideEAuthMeCardClass["TWN_ResidentCard_Back"] = "TWN_ResidentCard_Back";
|
|
41
|
+
ServerSideEAuthMeCardClass["TWN_HealthCard_Front"] = "TWN_HealthCard_Front";
|
|
42
|
+
ServerSideEAuthMeCardClass["TWN_VehiclesLicense_Front"] = "TWN_VehiclesLicense_Front";
|
|
43
|
+
})(ServerSideEAuthMeCardClass = exports.ServerSideEAuthMeCardClass || (exports.ServerSideEAuthMeCardClass = {}));
|
|
121
44
|
//# sourceMappingURL=id-recognition.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id-recognition.enum.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/enum/id-recognition.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,oCAAe,CAAA;IACf,sCAAiB,CAAA;AACnB,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAED,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,0BAAW,CAAA;AACb,CAAC,EAFW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAEtB;AACD,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,wDAA+B,CAAA;IAC/B,kDAAyB,CAAA;IACzB,sDAA6B,CAAA;IAC7B,8CAAqB,CAAA;AACvB,CAAC,EANW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAMhC;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"id-recognition.enum.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/enum/id-recognition.enum.ts"],"names":[],"mappings":";;;AAAA,yCAQwB;AAPtB,0GAAA,gBAAgB,OAAA;AAChB,gHAAA,sBAAsB,OAAA;AACtB,8GAAA,oBAAoB,OAAA;AACpB,qHAAA,2BAA2B,OAAA;AAC3B,sHAAA,4BAA4B,OAAA;AAC5B,+GAAA,qBAAqB,OAAA;AACrB,sHAAA,4BAA4B,OAAA;AAG9B,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,oCAAe,CAAA;IACf,sCAAiB,CAAA;AACnB,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAED,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,0BAAW,CAAA;AACb,CAAC,EAFW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAEtB;AACD,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,wDAA+B,CAAA;IAC/B,kDAAyB,CAAA;IACzB,sDAA6B,CAAA;IAC7B,8CAAqB,CAAA;AACvB,CAAC,EANW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAMhC;AAED,IAAY,0BAYX;AAZD,WAAY,0BAA0B;IACpC,iDAAmB,CAAA;IACnB,qDAAuB,CAAA;IACvB,mDAAqB,CAAA;IACrB,mEAAqC,CAAA;IACrC,iEAAmC,CAAA;IACnC,iFAAmD,CAAA;IACnD,+EAAiD,CAAA;IACjD,+EAAiD,CAAA;IACjD,6EAA+C,CAAA;IAC/C,2EAA6C,CAAA;IAC7C,qFAAuD,CAAA;AACzD,CAAC,EAZW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAYrC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EAuthMeIDCardMetalTagStatus } from '@authme/engine';
|
|
2
|
+
import { EAuthMeCardClass, EAuthMeCardMatchStatus, EAuthMeCardOCRStatus, EAuthMeIDCardAntiFraudStage, EAuthMeIDCardAntiFraudStatus, EAuthMeMRZRecogStatus, EAuthMePassportServiceStatus } from '../enum';
|
|
2
3
|
export interface IDCardAntiFraudResult {
|
|
3
4
|
info: AuthMeIDCardAntiFraudInfo;
|
|
4
5
|
statistics: AuthMeIDCardAntiFraudStatistics;
|
|
@@ -13,8 +14,6 @@ export interface AuthMeIDCardAntiFraudInfo {
|
|
|
13
14
|
blur: AuthMeImageBlurInfo;
|
|
14
15
|
colorDetect: AuthMeIDCardColorInfo;
|
|
15
16
|
metalTag: AuthMeMetalTagInfo;
|
|
16
|
-
laserTag: AuthMeLaserTagInfo;
|
|
17
|
-
taiwanHole: AuthMeTaiwanHoleInfo;
|
|
18
17
|
cardClass: AuthMeCardClassInfo;
|
|
19
18
|
}
|
|
20
19
|
export interface AuthMeImageReflectiveInfo {
|
|
@@ -29,19 +28,10 @@ export interface AuthMeIDCardColorInfo {
|
|
|
29
28
|
export interface AuthMeMetalTagInfo {
|
|
30
29
|
aeStatus: EAuthMeIDCardMetalTagStatus[];
|
|
31
30
|
}
|
|
32
|
-
export interface AuthMeLaserTagInfo {
|
|
33
|
-
eStatus: EAuthMeLaserTagStatus;
|
|
34
|
-
}
|
|
35
|
-
export interface AuthMeTaiwanHoleInfo {
|
|
36
|
-
eStatus: EAuthMeTaiwanHoleStatus;
|
|
37
|
-
}
|
|
38
31
|
export interface AuthMeCardClassInfo {
|
|
39
32
|
eClass: EAuthMeCardClass;
|
|
40
33
|
}
|
|
41
34
|
export interface AuthMeIDCardAntiFraudStatistics {
|
|
42
|
-
iHasLaserTagCount: number;
|
|
43
|
-
iNoLaserTagCount: number;
|
|
44
|
-
iTaiwanHoleCount: number;
|
|
45
35
|
iValidMetalTagCount: number;
|
|
46
36
|
}
|
|
47
37
|
export interface CardOCRResult {
|
|
@@ -79,6 +69,6 @@ export interface MRZFieldTD3 {
|
|
|
79
69
|
[key: string]: string;
|
|
80
70
|
}
|
|
81
71
|
export interface AuthMeMRZInfo {
|
|
82
|
-
eRecogStatus:
|
|
72
|
+
eRecogStatus: EAuthMeMRZRecogStatus;
|
|
83
73
|
afVertices: number[];
|
|
84
74
|
}
|
|
@@ -7,6 +7,7 @@ export interface IdRecognitionResponse {
|
|
|
7
7
|
export declare type IdRecognitionInfoConfirmRequest = IdRecognitionResponse;
|
|
8
8
|
export interface InitScanResponse {
|
|
9
9
|
scanId: string;
|
|
10
|
+
expiredIn: number;
|
|
10
11
|
parameters: {
|
|
11
12
|
enableManualUpload: boolean;
|
|
12
13
|
fraudRetryTimes: number;
|
|
@@ -4,12 +4,12 @@ import { EAuthMeCardClass, EAuthMeIDCardAntiFraudStage } from './enum';
|
|
|
4
4
|
export declare class CardOCR extends AuthmeEngineModuleBase<CardOCRResult> {
|
|
5
5
|
private type;
|
|
6
6
|
constructor(engine: MlEngine);
|
|
7
|
-
setType(type: EAuthMeCardClass): Promise<
|
|
7
|
+
setType(type: EAuthMeCardClass): Promise<unknown>;
|
|
8
8
|
getType(): EAuthMeCardClass;
|
|
9
9
|
}
|
|
10
10
|
export declare class IdCardAntiFraudService extends AuthmeEngineModuleBase<IDCardAntiFraudResult> {
|
|
11
11
|
constructor(engine: MlEngine);
|
|
12
|
-
setStage(stageList: EAuthMeIDCardAntiFraudStage[]): Promise<
|
|
12
|
+
setStage(stageList: EAuthMeIDCardAntiFraudStage[]): Promise<unknown>;
|
|
13
13
|
}
|
|
14
14
|
export declare class MRZService extends AuthmeEngineModuleBase<PassportResult> {
|
|
15
15
|
constructor(engine: MlEngine);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MRZService = exports.IdCardAntiFraudService = exports.CardOCR = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const engine_1 = require("@authme/engine");
|
|
6
|
-
const rxjs_1 = require("rxjs");
|
|
7
5
|
const enum_1 = require("./enum");
|
|
8
6
|
class CardOCR extends engine_1.AuthmeEngineModuleBase {
|
|
9
7
|
constructor(engine) {
|
|
@@ -12,13 +10,8 @@ class CardOCR extends engine_1.AuthmeEngineModuleBase {
|
|
|
12
10
|
this.moduleName = engine_1.EngineModule.CardOCR;
|
|
13
11
|
}
|
|
14
12
|
setType(type) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
this.type = type;
|
|
18
|
-
return yield (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'setType', {
|
|
19
|
-
type: convertedType,
|
|
20
|
-
}));
|
|
21
|
-
});
|
|
13
|
+
this.type = type;
|
|
14
|
+
return this.engine.run(this.moduleName, 'setType', { type });
|
|
22
15
|
}
|
|
23
16
|
getType() {
|
|
24
17
|
return this.type;
|
|
@@ -31,10 +24,8 @@ class IdCardAntiFraudService extends engine_1.AuthmeEngineModuleBase {
|
|
|
31
24
|
this.moduleName = engine_1.EngineModule.IdCardAntiFraud;
|
|
32
25
|
}
|
|
33
26
|
setStage(stageList) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return yield (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'setStage', stageStrList));
|
|
37
|
-
});
|
|
27
|
+
const stageStrList = stageList.map((x) => x.split('_')[1]);
|
|
28
|
+
return this.engine.run(this.moduleName, 'setStage', stageStrList);
|
|
38
29
|
}
|
|
39
30
|
}
|
|
40
31
|
exports.IdCardAntiFraudService = IdCardAntiFraudService;
|
|
@@ -44,14 +35,10 @@ class MRZService extends engine_1.AuthmeEngineModuleBase {
|
|
|
44
35
|
this.moduleName = engine_1.EngineModule.PassportService;
|
|
45
36
|
}
|
|
46
37
|
getFinalResult() {
|
|
47
|
-
return
|
|
48
|
-
return (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'getFinalResult'));
|
|
49
|
-
});
|
|
38
|
+
return this.engine.run(this.moduleName, 'getFinalResult');
|
|
50
39
|
}
|
|
51
40
|
toJson(params) {
|
|
52
|
-
return
|
|
53
|
-
return (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'toJson', params));
|
|
54
|
-
});
|
|
41
|
+
return this.engine.run(this.moduleName, 'toJson', params);
|
|
55
42
|
}
|
|
56
43
|
}
|
|
57
44
|
exports.MRZService = MRZService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules-id-recognition-feature-id-recognition.js","sourceRoot":"","sources":["../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/modules-id-recognition-feature-id-recognition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modules-id-recognition-feature-id-recognition.js","sourceRoot":"","sources":["../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/modules-id-recognition-feature-id-recognition.ts"],"names":[],"mappings":";;;AAAA,2CAAgF;AAMhF,iCAAuE;AACvE,MAAa,OAAQ,SAAQ,+BAAqC;IAEhE,YAAY,MAAgB;QAC1B,KAAK,CAAC,MAAM,CAAC,CAAC;QAFR,SAAI,GAAqB,uBAAgB,CAAC,OAAO,CAAC;QAGxD,IAAI,CAAC,UAAU,GAAG,qBAAY,CAAC,OAAO,CAAC;IACzC,CAAC;IAED,OAAO,CAAC,IAAsB;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AAdD,0BAcC;AAED,MAAa,sBAAuB,SAAQ,+BAA6C;IACvF,YAAY,MAAgB;QAC1B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,qBAAY,CAAC,eAAe,CAAC;IACjD,CAAC;IAED,QAAQ,CAAC,SAAwC;QAC/C,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;IACpE,CAAC;CACF;AAVD,wDAUC;AAED,MAAa,UAAW,SAAQ,+BAAsC;IACpE,YAAY,MAAgB;QAC1B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,qBAAY,CAAC,eAAe,CAAC;IACjD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,CAAC,MAAe;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;CACF;AAbD,gCAaC"}
|
package/src/lib/util.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { CountryCode, IdRecognitionCardType } from './enum';
|
|
2
|
-
export declare function getCardSubTypes(type: IdRecognitionCardType, country: CountryCode
|
|
1
|
+
import { CountryCode, EAuthMeCardClass, IdRecognitionCardType, ServerSideEAuthMeCardClass } from './enum';
|
|
2
|
+
export declare function getCardSubTypes(type: IdRecognitionCardType, country: CountryCode): EAuthMeCardClass[];
|
|
3
3
|
export declare function getRecognitionColumnOrder(column: string): number;
|
|
4
|
+
export declare const twoWayAuthmeCardClassMap: {
|
|
5
|
+
toServer(clientEnum: `${EAuthMeCardClass}`): `${ServerSideEAuthMeCardClass}`;
|
|
6
|
+
toClient(serverEnum: `${ServerSideEAuthMeCardClass}`): `${EAuthMeCardClass}`;
|
|
7
|
+
};
|
package/src/lib/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRecognitionColumnOrder = exports.getCardSubTypes = void 0;
|
|
3
|
+
exports.twoWayAuthmeCardClassMap = exports.getRecognitionColumnOrder = exports.getCardSubTypes = void 0;
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const CardTypeMapping = {
|
|
6
6
|
[enum_1.IdRecognitionCardType.IDCard]: [
|
|
@@ -45,13 +45,8 @@ const RECOGNITION_COLUMNS_ORDER = Object.fromEntries([
|
|
|
45
45
|
'nationality',
|
|
46
46
|
'expiryDate',
|
|
47
47
|
].map((value, index) => [value, index]));
|
|
48
|
-
function getCardSubTypes(type, country
|
|
49
|
-
|
|
50
|
-
return CardTypeMapping[type].map((x) => x.split('EAuthMeCardClass_')[1]);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
return CardTypeMapping[type];
|
|
54
|
-
}
|
|
48
|
+
function getCardSubTypes(type, country) {
|
|
49
|
+
return CardTypeMapping[type];
|
|
55
50
|
}
|
|
56
51
|
exports.getCardSubTypes = getCardSubTypes;
|
|
57
52
|
function getRecognitionColumnOrder(column) {
|
|
@@ -59,4 +54,19 @@ function getRecognitionColumnOrder(column) {
|
|
|
59
54
|
return (_a = RECOGNITION_COLUMNS_ORDER[column]) !== null && _a !== void 0 ? _a : Number.MAX_VALUE;
|
|
60
55
|
}
|
|
61
56
|
exports.getRecognitionColumnOrder = getRecognitionColumnOrder;
|
|
57
|
+
exports.twoWayAuthmeCardClassMap = (() => {
|
|
58
|
+
const map = Object.fromEntries(Object.entries(enum_1.ServerSideEAuthMeCardClass).map(([key, value]) => [
|
|
59
|
+
`EAuthMeCardClass_${key}`,
|
|
60
|
+
value,
|
|
61
|
+
]));
|
|
62
|
+
const inverted = Object.fromEntries(Object.entries(map).map(([key, value]) => [value, key]));
|
|
63
|
+
return {
|
|
64
|
+
toServer(clientEnum) {
|
|
65
|
+
return map[clientEnum];
|
|
66
|
+
},
|
|
67
|
+
toClient(serverEnum) {
|
|
68
|
+
return inverted[serverEnum];
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
})();
|
|
62
72
|
//# sourceMappingURL=util.js.map
|
package/src/lib/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/util.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/util.ts"],"names":[],"mappings":";;;AAAA,iCAKgB;AAEhB,MAAM,eAAe,GAA0C;IAC7D,CAAC,4BAAqB,CAAC,MAAM,CAAC,EAAE;QAC9B,uBAAgB,CAAC,gBAAgB;QACjC,uBAAgB,CAAC,eAAe;KACjC;IACD,CAAC,4BAAqB,CAAC,UAAU,CAAC,EAAE,CAAC,uBAAgB,CAAC,oBAAoB,CAAC;IAC3E,CAAC,4BAAqB,CAAC,QAAQ,CAAC,EAAE,CAAC,uBAAgB,CAAC,QAAQ,CAAC;IAC7D,CAAC,4BAAqB,CAAC,YAAY,CAAC,EAAE;QACpC,uBAAgB,CAAC,sBAAsB;QACvC,uBAAgB,CAAC,qBAAqB;KACvC;IACD,CAAC,4BAAqB,CAAC,aAAa,CAAC,EAAE;QACrC,uBAAgB,CAAC,uBAAuB;QACxC,uBAAgB,CAAC,sBAAsB;KACxC;CACF,CAAC;AAEF,MAAM,yB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