@authme/id-recognition 2.1.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 +137 -0
- package/README.md +7 -0
- package/package.json +15 -0
- package/src/index.d.ts +6 -0
- package/src/index.js +10 -0
- package/src/index.js.map +1 -0
- package/src/lib/data-access/api.d.ts +15 -0
- package/src/lib/data-access/api.js +66 -0
- package/src/lib/data-access/api.js.map +1 -0
- package/src/lib/data-access/index.d.ts +1 -0
- package/src/lib/data-access/index.js +5 -0
- package/src/lib/data-access/index.js.map +1 -0
- package/src/lib/enum/id-recognition.enum.d.ts +104 -0
- package/src/lib/enum/id-recognition.enum.js +122 -0
- package/src/lib/enum/id-recognition.enum.js.map +1 -0
- package/src/lib/enum/index.d.ts +1 -0
- package/src/lib/enum/index.js +5 -0
- package/src/lib/enum/index.js.map +1 -0
- package/src/lib/interface/id-recognition-type.interface.d.ts +83 -0
- package/src/lib/interface/id-recognition-type.interface.js +3 -0
- package/src/lib/interface/id-recognition-type.interface.js.map +1 -0
- package/src/lib/interface/index.d.ts +1 -0
- package/src/lib/interface/index.js +5 -0
- package/src/lib/interface/index.js.map +1 -0
- package/src/lib/model/dto.model.d.ts +16 -0
- package/src/lib/model/dto.model.js +3 -0
- package/src/lib/model/dto.model.js.map +1 -0
- package/src/lib/model/id-type.enum.d.ts +13 -0
- package/src/lib/model/id-type.enum.js +29 -0
- package/src/lib/model/id-type.enum.js.map +1 -0
- package/src/lib/model/index.d.ts +2 -0
- package/src/lib/model/index.js +6 -0
- package/src/lib/model/index.js.map +1 -0
- package/src/lib/modules-id-recognition-feature-id-recognition.d.ts +18 -0
- package/src/lib/modules-id-recognition-feature-id-recognition.js +62 -0
- package/src/lib/modules-id-recognition-feature-id-recognition.js.map +1 -0
- package/src/lib/util.d.ts +2 -0
- package/src/lib/util.js +33 -0
- package/src/lib/util.js.map +1 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
|
+
|
|
5
|
+
## [2.1.1](https://github.com/AuthMe01/web-client-sdk/compare/prod-2.1.0...prod-2.1.1) (2022-09-08)
|
|
6
|
+
|
|
7
|
+
## 1.2.2 (2022-07-28)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- PROD-255 add anti fraud status enum ([c50b6e7](https://github.com/AuthMe01/web-client-sdk/commit/c50b6e717bfadb4d516cb3c60bcacb145a06cecd))
|
|
12
|
+
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
13
|
+
- PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
|
|
14
|
+
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
15
|
+
- PROD-327 change ocr confirm image to cropped version ([b233dec](https://github.com/AuthMe01/web-client-sdk/commit/b233dec49ac5d8f4873924d58335073de338b55e))
|
|
16
|
+
- PROD-327 fix confirm page display issue ([85a53f3](https://github.com/AuthMe01/web-client-sdk/commit/85a53f3ee03b61141cadf79f85923f9297e16c2c))
|
|
17
|
+
- PROD-405 Handle ocr backend recognition error ([1084e8d](https://github.com/AuthMe01/web-client-sdk/commit/1084e8d70f00ab8200f00f334272e1d594585387))
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
22
|
+
- PROD-1170 MRZ function ([f58a3d1](https://github.com/AuthMe01/web-client-sdk/commit/f58a3d1ab7e57e199fc11a4216d698668cf0c7e1))
|
|
23
|
+
- PROD-195 sdk ocr add config ([5eccd4c](https://github.com/AuthMe01/web-client-sdk/commit/5eccd4c1ecdc393e8bb617a980a7345e405ebf0c))
|
|
24
|
+
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
25
|
+
- PROD-327 add ocr confirm image flow ([21e2ef1](https://github.com/AuthMe01/web-client-sdk/commit/21e2ef167452df46c8f85c426fe09c5e3899d50d))
|
|
26
|
+
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
27
|
+
- PROD-772 Add fps limit for anti-fraud ([6afca8e](https://github.com/AuthMe01/web-client-sdk/commit/6afca8e8b71c357050ab9564ff32621f9f0dbecd))
|
|
28
|
+
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
29
|
+
|
|
30
|
+
## 1.2.1 (2022-07-28)
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
- PROD-255 add anti fraud status enum ([c50b6e7](https://github.com/AuthMe01/web-client-sdk/commit/c50b6e717bfadb4d516cb3c60bcacb145a06cecd))
|
|
35
|
+
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
36
|
+
- PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
|
|
37
|
+
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
38
|
+
- PROD-327 change ocr confirm image to cropped version ([b233dec](https://github.com/AuthMe01/web-client-sdk/commit/b233dec49ac5d8f4873924d58335073de338b55e))
|
|
39
|
+
- PROD-327 fix confirm page display issue ([85a53f3](https://github.com/AuthMe01/web-client-sdk/commit/85a53f3ee03b61141cadf79f85923f9297e16c2c))
|
|
40
|
+
- PROD-405 Handle ocr backend recognition error ([1084e8d](https://github.com/AuthMe01/web-client-sdk/commit/1084e8d70f00ab8200f00f334272e1d594585387))
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
45
|
+
- PROD-1170 MRZ function ([f58a3d1](https://github.com/AuthMe01/web-client-sdk/commit/f58a3d1ab7e57e199fc11a4216d698668cf0c7e1))
|
|
46
|
+
- PROD-195 sdk ocr add config ([5eccd4c](https://github.com/AuthMe01/web-client-sdk/commit/5eccd4c1ecdc393e8bb617a980a7345e405ebf0c))
|
|
47
|
+
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
48
|
+
- PROD-327 add ocr confirm image flow ([21e2ef1](https://github.com/AuthMe01/web-client-sdk/commit/21e2ef167452df46c8f85c426fe09c5e3899d50d))
|
|
49
|
+
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
50
|
+
- PROD-772 Add fps limit for anti-fraud ([6afca8e](https://github.com/AuthMe01/web-client-sdk/commit/6afca8e8b71c357050ab9564ff32621f9f0dbecd))
|
|
51
|
+
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
52
|
+
|
|
53
|
+
# 1.2.0 (2022-07-25)
|
|
54
|
+
|
|
55
|
+
### Bug Fixes
|
|
56
|
+
|
|
57
|
+
- PROD-255 add anti fraud status enum ([c50b6e7](https://github.com/AuthMe01/web-client-sdk/commit/c50b6e717bfadb4d516cb3c60bcacb145a06cecd))
|
|
58
|
+
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
59
|
+
- PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
|
|
60
|
+
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
61
|
+
- PROD-327 change ocr confirm image to cropped version ([b233dec](https://github.com/AuthMe01/web-client-sdk/commit/b233dec49ac5d8f4873924d58335073de338b55e))
|
|
62
|
+
- PROD-327 fix confirm page display issue ([85a53f3](https://github.com/AuthMe01/web-client-sdk/commit/85a53f3ee03b61141cadf79f85923f9297e16c2c))
|
|
63
|
+
- PROD-405 Handle ocr backend recognition error ([1084e8d](https://github.com/AuthMe01/web-client-sdk/commit/1084e8d70f00ab8200f00f334272e1d594585387))
|
|
64
|
+
|
|
65
|
+
### Features
|
|
66
|
+
|
|
67
|
+
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
68
|
+
- PROD-195 sdk ocr add config ([5eccd4c](https://github.com/AuthMe01/web-client-sdk/commit/5eccd4c1ecdc393e8bb617a980a7345e405ebf0c))
|
|
69
|
+
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
70
|
+
- PROD-327 add ocr confirm image flow ([21e2ef1](https://github.com/AuthMe01/web-client-sdk/commit/21e2ef167452df46c8f85c426fe09c5e3899d50d))
|
|
71
|
+
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
72
|
+
- PROD-772 Add fps limit for anti-fraud ([6afca8e](https://github.com/AuthMe01/web-client-sdk/commit/6afca8e8b71c357050ab9564ff32621f9f0dbecd))
|
|
73
|
+
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
74
|
+
|
|
75
|
+
## 1.1.1 (2022-07-07)
|
|
76
|
+
|
|
77
|
+
### Bug Fixes
|
|
78
|
+
|
|
79
|
+
- PROD-255 add anti fraud status enum ([c50b6e7](https://github.com/AuthMe01/web-client-sdk/commit/c50b6e717bfadb4d516cb3c60bcacb145a06cecd))
|
|
80
|
+
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
81
|
+
- PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
|
|
82
|
+
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
83
|
+
- PROD-327 change ocr confirm image to cropped version ([b233dec](https://github.com/AuthMe01/web-client-sdk/commit/b233dec49ac5d8f4873924d58335073de338b55e))
|
|
84
|
+
- PROD-327 fix confirm page display issue ([85a53f3](https://github.com/AuthMe01/web-client-sdk/commit/85a53f3ee03b61141cadf79f85923f9297e16c2c))
|
|
85
|
+
- PROD-405 Handle ocr backend recognition error ([1084e8d](https://github.com/AuthMe01/web-client-sdk/commit/1084e8d70f00ab8200f00f334272e1d594585387))
|
|
86
|
+
|
|
87
|
+
### Features
|
|
88
|
+
|
|
89
|
+
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
90
|
+
- PROD-195 sdk ocr add config ([5eccd4c](https://github.com/AuthMe01/web-client-sdk/commit/5eccd4c1ecdc393e8bb617a980a7345e405ebf0c))
|
|
91
|
+
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
92
|
+
- PROD-327 add ocr confirm image flow ([21e2ef1](https://github.com/AuthMe01/web-client-sdk/commit/21e2ef167452df46c8f85c426fe09c5e3899d50d))
|
|
93
|
+
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
94
|
+
- PROD-772 Add fps limit for anti-fraud ([6afca8e](https://github.com/AuthMe01/web-client-sdk/commit/6afca8e8b71c357050ab9564ff32621f9f0dbecd))
|
|
95
|
+
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
96
|
+
|
|
97
|
+
# 1.1.0 (2022-07-06)
|
|
98
|
+
|
|
99
|
+
### Bug Fixes
|
|
100
|
+
|
|
101
|
+
- PROD-255 add anti fraud status enum ([c50b6e7](https://github.com/AuthMe01/web-client-sdk/commit/c50b6e717bfadb4d516cb3c60bcacb145a06cecd))
|
|
102
|
+
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
103
|
+
- PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
|
|
104
|
+
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
105
|
+
- PROD-327 change ocr confirm image to cropped version ([b233dec](https://github.com/AuthMe01/web-client-sdk/commit/b233dec49ac5d8f4873924d58335073de338b55e))
|
|
106
|
+
- PROD-327 fix confirm page display issue ([85a53f3](https://github.com/AuthMe01/web-client-sdk/commit/85a53f3ee03b61141cadf79f85923f9297e16c2c))
|
|
107
|
+
- PROD-405 Handle ocr backend recognition error ([1084e8d](https://github.com/AuthMe01/web-client-sdk/commit/1084e8d70f00ab8200f00f334272e1d594585387))
|
|
108
|
+
|
|
109
|
+
### Features
|
|
110
|
+
|
|
111
|
+
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
112
|
+
- PROD-195 sdk ocr add config ([5eccd4c](https://github.com/AuthMe01/web-client-sdk/commit/5eccd4c1ecdc393e8bb617a980a7345e405ebf0c))
|
|
113
|
+
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
114
|
+
- PROD-327 add ocr confirm image flow ([21e2ef1](https://github.com/AuthMe01/web-client-sdk/commit/21e2ef167452df46c8f85c426fe09c5e3899d50d))
|
|
115
|
+
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
|
116
|
+
- PROD-772 Add fps limit for anti-fraud ([6afca8e](https://github.com/AuthMe01/web-client-sdk/commit/6afca8e8b71c357050ab9564ff32621f9f0dbecd))
|
|
117
|
+
- PROD-957 update engineLib v1.0.2 ([f5383e5](https://github.com/AuthMe01/web-client-sdk/commit/f5383e5210c798bf2663ad8f094a16b937ffa5b6))
|
|
118
|
+
|
|
119
|
+
# 1.0.0 (2022-05-30)
|
|
120
|
+
|
|
121
|
+
### Bug Fixes
|
|
122
|
+
|
|
123
|
+
- PROD-255 add anti fraud status enum ([c50b6e7](https://github.com/AuthMe01/web-client-sdk/commit/c50b6e717bfadb4d516cb3c60bcacb145a06cecd))
|
|
124
|
+
- PROD-255 fix memory leak issue ([7c35177](https://github.com/AuthMe01/web-client-sdk/commit/7c351779f89020694f41f38d7fd8320284c6e544))
|
|
125
|
+
- PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
|
|
126
|
+
- PROD-255 remove console & add fas fail handle ([c2faac9](https://github.com/AuthMe01/web-client-sdk/commit/c2faac958921590958cfc851b678945babeb8402))
|
|
127
|
+
- PROD-327 change ocr confirm image to cropped version ([b233dec](https://github.com/AuthMe01/web-client-sdk/commit/b233dec49ac5d8f4873924d58335073de338b55e))
|
|
128
|
+
- PROD-327 fix confirm page display issue ([85a53f3](https://github.com/AuthMe01/web-client-sdk/commit/85a53f3ee03b61141cadf79f85923f9297e16c2c))
|
|
129
|
+
- PROD-405 Handle ocr backend recognition error ([1084e8d](https://github.com/AuthMe01/web-client-sdk/commit/1084e8d70f00ab8200f00f334272e1d594585387))
|
|
130
|
+
|
|
131
|
+
### Features
|
|
132
|
+
|
|
133
|
+
- PR-52 Add FAS porting ([d43ec7e](https://github.com/AuthMe01/web-client-sdk/commit/d43ec7e92c215b108157aa3931625865c0603540))
|
|
134
|
+
- PROD-195 sdk ocr add config ([5eccd4c](https://github.com/AuthMe01/web-client-sdk/commit/5eccd4c1ecdc393e8bb617a980a7345e405ebf0c))
|
|
135
|
+
- PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
|
|
136
|
+
- PROD-327 add ocr confirm image flow ([21e2ef1](https://github.com/AuthMe01/web-client-sdk/commit/21e2ef167452df46c8f85c426fe09c5e3899d50d))
|
|
137
|
+
- PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
|
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@authme/id-recognition",
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"main": "./src/index.js",
|
|
5
|
+
"typings": "./src/index.d.ts",
|
|
6
|
+
"dependencies": {},
|
|
7
|
+
"peerDependencies": {
|
|
8
|
+
"@authme/core": "2.1.1",
|
|
9
|
+
"@authme/util": "2.1.1",
|
|
10
|
+
"three": "^0.136.0",
|
|
11
|
+
"@authme/engine": "2.1.1",
|
|
12
|
+
"rxjs": "~7.4.0",
|
|
13
|
+
"tslib": "^2.3.0"
|
|
14
|
+
}
|
|
15
|
+
}
|
package/src/index.d.ts
ADDED
package/src/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./lib/modules-id-recognition-feature-id-recognition"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./lib/model"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./lib/enum"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./lib/interface"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./lib/util"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./lib/data-access"), exports);
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/modules/id-recognition/feature-id-recognition/src/index.ts"],"names":[],"mappings":";;;AAAA,8FAAoE;AACpE,sDAA4B;AAC5B,qDAA2B;AAC3B,0DAAgC;AAChC,qDAA2B;AAC3B,4DAAkC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CountryCode, EAuthMeCardClass, IdRecognitionCardType, ResourceImageType } from '../enum';
|
|
2
|
+
import { InitScanResponse } from '../model';
|
|
3
|
+
export declare function init(type: IdRecognitionCardType, country: CountryCode, needConfirm: boolean): Promise<InitScanResponse>;
|
|
4
|
+
export declare function initScanDocument(scanId: string, type: EAuthMeCardClass): Promise<{
|
|
5
|
+
scanDocumentId: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function recognition(documentId: string, file: Blob): Promise<{
|
|
8
|
+
retry?: boolean;
|
|
9
|
+
details: {
|
|
10
|
+
[key: string]: string | number;
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export declare function saveResourceImage(documentId: string, type: ResourceImageType, file: Blob): Promise<any>;
|
|
14
|
+
export declare function finishScanDocument(documentId: string, details: any, fraud: boolean | null): Promise<any>;
|
|
15
|
+
export declare function confirmScan(scanId: string, details: any): Promise<any>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.confirmScan = exports.finishScanDocument = exports.saveResourceImage = exports.recognition = exports.initScanDocument = exports.init = void 0;
|
|
4
|
+
const core_1 = require("@authme/core");
|
|
5
|
+
const enum_1 = require("../enum");
|
|
6
|
+
const util_1 = require("../util");
|
|
7
|
+
function init(type, country, needConfirm) {
|
|
8
|
+
const body = {
|
|
9
|
+
scanType: type === enum_1.IdRecognitionCardType.Passport ? type : `${country}_${type}`,
|
|
10
|
+
cardTypes: (0, util_1.getCardSubTypes)(type, country),
|
|
11
|
+
needConfirm,
|
|
12
|
+
};
|
|
13
|
+
return (0, core_1.sendRequest)('/api/identity-verification/id-recognition/v3/init-scan', 'POST', JSON.stringify(body));
|
|
14
|
+
}
|
|
15
|
+
exports.init = init;
|
|
16
|
+
function initScanDocument(scanId, type) {
|
|
17
|
+
const body = {
|
|
18
|
+
scanId,
|
|
19
|
+
cardType: type.split('EAuthMeCardClass_')[1],
|
|
20
|
+
};
|
|
21
|
+
return (0, core_1.sendRequest)('/api/identity-verification/id-recognition/v3/init-scan-doc', 'POST', JSON.stringify(body));
|
|
22
|
+
}
|
|
23
|
+
exports.initScanDocument = initScanDocument;
|
|
24
|
+
function recognition(documentId, file) {
|
|
25
|
+
const formData = new FormData();
|
|
26
|
+
formData.append('scanDocumentId', documentId);
|
|
27
|
+
formData.append('image', file);
|
|
28
|
+
return (0, core_1.sendRequest)('/api/identity-verification/id-recognition/v3/recognize', 'POST', formData, 'multipart/form-data').catch((error) => {
|
|
29
|
+
var _a, _b, _c;
|
|
30
|
+
if (error instanceof core_1.AuthmeError &&
|
|
31
|
+
((_c = (_b = (_a = error.cause) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.code) === 'AuthMe.IDRecognition:000201') {
|
|
32
|
+
return {
|
|
33
|
+
retry: true,
|
|
34
|
+
details: {},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.recognition = recognition;
|
|
41
|
+
function saveResourceImage(documentId, type, file) {
|
|
42
|
+
const formData = new FormData();
|
|
43
|
+
formData.append('scanDocumentId', documentId);
|
|
44
|
+
formData.append('type', type);
|
|
45
|
+
formData.append('image', file);
|
|
46
|
+
return (0, core_1.sendRequest)('/api/identity-verification/id-recognition/v3/upload-image', 'POST', formData, 'multipart/form-data');
|
|
47
|
+
}
|
|
48
|
+
exports.saveResourceImage = saveResourceImage;
|
|
49
|
+
function finishScanDocument(documentId, details, fraud) {
|
|
50
|
+
const body = {
|
|
51
|
+
scanDocumentId: documentId,
|
|
52
|
+
details,
|
|
53
|
+
fraud,
|
|
54
|
+
};
|
|
55
|
+
return (0, core_1.sendRequest)('/api/identity-verification/id-recognition/v3/finish-scan-doc', 'POST', JSON.stringify(body));
|
|
56
|
+
}
|
|
57
|
+
exports.finishScanDocument = finishScanDocument;
|
|
58
|
+
function confirmScan(scanId, details) {
|
|
59
|
+
const body = {
|
|
60
|
+
scanId,
|
|
61
|
+
details,
|
|
62
|
+
};
|
|
63
|
+
return (0, core_1.sendRequest)('/api/identity-verification/id-recognition/v3/confirm-scan', 'POST', JSON.stringify(body));
|
|
64
|
+
}
|
|
65
|
+
exports.confirmScan = confirmScan;
|
|
66
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +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,kCAA0C;AAE1C,SAAgB,IAAI,CAClB,IAA2B,EAC3B,OAAoB,EACpB,WAAoB;IAEpB,MAAM,IAAI,GAAG;QACX,QAAQ,EACN,IAAI,KAAK,4BAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,IAAI,EAAE;QACvE,SAAS,EAAE,IAAA,sBAAe,EAAC,IAAI,EAAE,OAAO,CAAC;QACzC,WAAW;KACZ,CAAC;IACF,OAAO,IAAA,kBAAW,EAChB,wDAAwD,EACxD,MAAM,EACN,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CACrB,CAAC;AACJ,CAAC;AAhBD,oBAgBC;AAED,SAAgB,gBAAgB,CAC9B,MAAc,EACd,IAAsB;IAEtB,MAAM,IAAI,GAAG;QACX,MAAM;QACN,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;KAC7C,CAAC;IACF,OAAO,IAAA,kBAAW,EAChB,4DAA4D,EAC5D,MAAM,EACN,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CACrB,CAAC;AACJ,CAAC;AAbD,4CAaC;AAED,SAAgB,WAAW,CACzB,UAAkB,EAClB,IAAU;IAEV,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IAChC,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IAC9C,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC/B,OAAO,IAAA,kBAAW,EAChB,wDAAwD,EACxD,MAAM,EACN,QAAQ,EACR,qBAAqB,CACtB,CAAC,KAAK,C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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/data-access/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export declare enum ResourceImageType {
|
|
2
|
+
Recognition = "Recognition",
|
|
3
|
+
Fraud = "Fraud",
|
|
4
|
+
Manual = "Manual"
|
|
5
|
+
}
|
|
6
|
+
export declare enum CountryCode {
|
|
7
|
+
TW = "TWN"
|
|
8
|
+
}
|
|
9
|
+
export declare enum IdRecognitionCardType {
|
|
10
|
+
IDCard = "IDCard",
|
|
11
|
+
DriverLicense = "DriverLicense",
|
|
12
|
+
HealthCard = "HealthCard",
|
|
13
|
+
ResidentCard = "ResidentCard",
|
|
14
|
+
VehiclesLicense = "VehiclesLicense",
|
|
15
|
+
Passport = "Passport"
|
|
16
|
+
}
|
|
17
|
+
export declare enum OCRCardType {
|
|
18
|
+
Invalid = -1,
|
|
19
|
+
Background = 0,
|
|
20
|
+
Unknown = 1,
|
|
21
|
+
Passport = 2,
|
|
22
|
+
TWN_IDCard_Front = 3,
|
|
23
|
+
TWN_IDCard_Back = 4,
|
|
24
|
+
TWN_DriverLicense_Front = 5,
|
|
25
|
+
TWN_DriverLicense_Back = 6,
|
|
26
|
+
TWN_ResidentCard_Front = 7,
|
|
27
|
+
TWN_ResidentCard_Back = 8,
|
|
28
|
+
TWN_HealthCard_Front = 9,
|
|
29
|
+
TWN_VehiclesLicense_Front = 10
|
|
30
|
+
}
|
|
31
|
+
export declare enum EAuthMeIDCardMetalTagStatus {
|
|
32
|
+
NotFound = "EAuthMeIDCardMetalTagStatus_NotFound",
|
|
33
|
+
Bright = "EAuthMeIDCardMetalTagStatus_Bright",
|
|
34
|
+
Dark = "EAuthMeIDCardMetalTagStatus_Dark"
|
|
35
|
+
}
|
|
36
|
+
export declare enum EAuthMeLaserTagStatus {
|
|
37
|
+
NoTag = "EAuthMeLaserTagStatus_NoTag",
|
|
38
|
+
HasTag = "EAuthMeLaserTagStatus_HasTag",
|
|
39
|
+
Others = "EAuthMeLaserTagStatus_Others"
|
|
40
|
+
}
|
|
41
|
+
export declare enum EAuthMeTaiwanHoleStatus {
|
|
42
|
+
NotFound = "EAuthMeTaiwanHoleStatus_NotFound",
|
|
43
|
+
Found = "EAuthMeTaiwanHoleStatus_Found"
|
|
44
|
+
}
|
|
45
|
+
export declare enum EAuthMeCardClass {
|
|
46
|
+
Invalid = "EAuthMeCardClass_Invalid",
|
|
47
|
+
Background = "EAuthMeCardClass_Background",
|
|
48
|
+
Unknown = "EAuthMeCardClass_Unknown",
|
|
49
|
+
Passport = "EAuthMeCardClass_Passport",
|
|
50
|
+
TWN_IDCard_Front = "EAuthMeCardClass_TWN_IDCard_Front",
|
|
51
|
+
TWN_IDCard_Back = "EAuthMeCardClass_TWN_IDCard_Back",
|
|
52
|
+
TWN_DriverLicense_Front = "EAuthMeCardClass_TWN_DriverLicense_Front",
|
|
53
|
+
TWN_DriverLicense_Back = "EAuthMeCardClass_TWN_DriverLicense_Back",
|
|
54
|
+
TWN_ResidentCard_Front = "EAuthMeCardClass_TWN_ResidentCard_Front",
|
|
55
|
+
TWN_ResidentCard_Back = "EAuthMeCardClass_TWN_ResidentCard_Back",
|
|
56
|
+
TWN_HealthCard_Front = "EAuthMeCardClass_TWN_HealthCard_Front",
|
|
57
|
+
TWN_VehiclesLicense_Front = "EAuthMeCardClass_TWN_VehiclesLicense_Front"
|
|
58
|
+
}
|
|
59
|
+
export declare enum EAuthMeCardMatchStatus {
|
|
60
|
+
None = "EAuthMeCardMatchStatus_None",
|
|
61
|
+
Mismatch = "EAuthMeCardMatchStatus_Mismatch",
|
|
62
|
+
NeedMoreFrame = "EAuthMeCardMatchStatus_NeedMoreFrame",
|
|
63
|
+
Match = "EAuthMeCardMatchStatus_Match"
|
|
64
|
+
}
|
|
65
|
+
export declare enum EAuthMeCardOCRStatus {
|
|
66
|
+
NoCard = "EAuthMeCardOCRStatus_NoCard",
|
|
67
|
+
WrongCardType = "EAuthMeCardOCRStatus_WrongCardType",
|
|
68
|
+
PositionNotMatch = "EAuthMeCardOCRStatus_PositionNotMatch",
|
|
69
|
+
Reflective = "EAuthMeCardOCRStatus_Reflective",
|
|
70
|
+
Blur = "EAuthMeCardOCRStatus_Blur",
|
|
71
|
+
Pass = "EAuthMeCardOCRStatus_Pass",
|
|
72
|
+
Error = "EAuthMeCardOCRStatus_Error"
|
|
73
|
+
}
|
|
74
|
+
export declare enum EAuthMeIDCardAntiFraudStatus {
|
|
75
|
+
Failed = "EAuthMeIDCardAntiFraudStatus_Failed",
|
|
76
|
+
NoCard = "EAuthMeIDCardAntiFraudStatus_NoCard",
|
|
77
|
+
WrongCardType = "EAuthMeIDCardAntiFraudStatus_WrongCardType",
|
|
78
|
+
Reflective = "EAuthMeIDCardAntiFraudStatus_Reflective",
|
|
79
|
+
Blur = "EAuthMeIDCardAntiFraudStatus_Blur",
|
|
80
|
+
Gray = "EAuthMeIDCardAntiFraudStatus_Gray",
|
|
81
|
+
PositionNotMatch = "EAuthMeIDCardAntiFraudStatus_PositionNotMatch",
|
|
82
|
+
NeedMoreFrame = "EAuthMeIDCardAntiFraudStatus_NeedMoreFrame",
|
|
83
|
+
Pass = "EAuthMeIDCardAntiFraudStatus_Pass",
|
|
84
|
+
Error = "EAuthMeIDCardAntiFraudStatus_Error"
|
|
85
|
+
}
|
|
86
|
+
export declare enum EAuthMeMRZRecogStatus {
|
|
87
|
+
Success = "EAuthMeMRZRecogStatus_Success",
|
|
88
|
+
WrongFormat = "EAuthMeMRZRecogStatus_WrongFormat"
|
|
89
|
+
}
|
|
90
|
+
export declare enum EAuthMeMRZServiceStatus {
|
|
91
|
+
Success = "EAuthMeMRZServiceStatus_Success",
|
|
92
|
+
NotFound = "EAuthMeMRZServiceStatus_NotFound",
|
|
93
|
+
RecogFailed = "EAuthMeMRZServiceStatus_RecogFailed",
|
|
94
|
+
Error = "EAuthMeMRZServiceStatus_Error"
|
|
95
|
+
}
|
|
96
|
+
export declare enum EAuthMeIDCardAntiFraudStage {
|
|
97
|
+
Frontal = "EAuthMeIDCardAntiFraudStage_Frontal",
|
|
98
|
+
Up = "EAuthMeIDCardAntiFraudStage_Up",
|
|
99
|
+
Down = "EAuthMeIDCardAntiFraudStage_Down",
|
|
100
|
+
Left = "EAuthMeIDCardAntiFraudStage_Left",
|
|
101
|
+
Right = "EAuthMeIDCardAntiFraudStage_Right",
|
|
102
|
+
IgnoreCardMatch = "EAuthMeIDCardAntiFraudStage_IgnoreCardMatch",
|
|
103
|
+
Done = "EAuthMeIDCardAntiFraudStage_Done"
|
|
104
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EAuthMeIDCardAntiFraudStage = exports.EAuthMeMRZServiceStatus = exports.EAuthMeMRZRecogStatus = exports.EAuthMeIDCardAntiFraudStatus = exports.EAuthMeCardOCRStatus = exports.EAuthMeCardMatchStatus = exports.EAuthMeCardClass = exports.EAuthMeTaiwanHoleStatus = exports.EAuthMeLaserTagStatus = exports.EAuthMeIDCardMetalTagStatus = exports.OCRCardType = exports.IdRecognitionCardType = exports.CountryCode = exports.ResourceImageType = void 0;
|
|
4
|
+
var ResourceImageType;
|
|
5
|
+
(function (ResourceImageType) {
|
|
6
|
+
ResourceImageType["Recognition"] = "Recognition";
|
|
7
|
+
ResourceImageType["Fraud"] = "Fraud";
|
|
8
|
+
ResourceImageType["Manual"] = "Manual";
|
|
9
|
+
})(ResourceImageType = exports.ResourceImageType || (exports.ResourceImageType = {}));
|
|
10
|
+
var CountryCode;
|
|
11
|
+
(function (CountryCode) {
|
|
12
|
+
CountryCode["TW"] = "TWN";
|
|
13
|
+
})(CountryCode = exports.CountryCode || (exports.CountryCode = {}));
|
|
14
|
+
var IdRecognitionCardType;
|
|
15
|
+
(function (IdRecognitionCardType) {
|
|
16
|
+
IdRecognitionCardType["IDCard"] = "IDCard";
|
|
17
|
+
IdRecognitionCardType["DriverLicense"] = "DriverLicense";
|
|
18
|
+
IdRecognitionCardType["HealthCard"] = "HealthCard";
|
|
19
|
+
IdRecognitionCardType["ResidentCard"] = "ResidentCard";
|
|
20
|
+
IdRecognitionCardType["VehiclesLicense"] = "VehiclesLicense";
|
|
21
|
+
IdRecognitionCardType["Passport"] = "Passport";
|
|
22
|
+
})(IdRecognitionCardType = exports.IdRecognitionCardType || (exports.IdRecognitionCardType = {}));
|
|
23
|
+
var OCRCardType;
|
|
24
|
+
(function (OCRCardType) {
|
|
25
|
+
OCRCardType[OCRCardType["Invalid"] = -1] = "Invalid";
|
|
26
|
+
OCRCardType[OCRCardType["Background"] = 0] = "Background";
|
|
27
|
+
OCRCardType[OCRCardType["Unknown"] = 1] = "Unknown";
|
|
28
|
+
OCRCardType[OCRCardType["Passport"] = 2] = "Passport";
|
|
29
|
+
OCRCardType[OCRCardType["TWN_IDCard_Front"] = 3] = "TWN_IDCard_Front";
|
|
30
|
+
OCRCardType[OCRCardType["TWN_IDCard_Back"] = 4] = "TWN_IDCard_Back";
|
|
31
|
+
OCRCardType[OCRCardType["TWN_DriverLicense_Front"] = 5] = "TWN_DriverLicense_Front";
|
|
32
|
+
OCRCardType[OCRCardType["TWN_DriverLicense_Back"] = 6] = "TWN_DriverLicense_Back";
|
|
33
|
+
OCRCardType[OCRCardType["TWN_ResidentCard_Front"] = 7] = "TWN_ResidentCard_Front";
|
|
34
|
+
OCRCardType[OCRCardType["TWN_ResidentCard_Back"] = 8] = "TWN_ResidentCard_Back";
|
|
35
|
+
OCRCardType[OCRCardType["TWN_HealthCard_Front"] = 9] = "TWN_HealthCard_Front";
|
|
36
|
+
OCRCardType[OCRCardType["TWN_VehiclesLicense_Front"] = 10] = "TWN_VehiclesLicense_Front";
|
|
37
|
+
})(OCRCardType = exports.OCRCardType || (exports.OCRCardType = {}));
|
|
38
|
+
var EAuthMeIDCardMetalTagStatus;
|
|
39
|
+
(function (EAuthMeIDCardMetalTagStatus) {
|
|
40
|
+
EAuthMeIDCardMetalTagStatus["NotFound"] = "EAuthMeIDCardMetalTagStatus_NotFound";
|
|
41
|
+
EAuthMeIDCardMetalTagStatus["Bright"] = "EAuthMeIDCardMetalTagStatus_Bright";
|
|
42
|
+
EAuthMeIDCardMetalTagStatus["Dark"] = "EAuthMeIDCardMetalTagStatus_Dark";
|
|
43
|
+
})(EAuthMeIDCardMetalTagStatus = exports.EAuthMeIDCardMetalTagStatus || (exports.EAuthMeIDCardMetalTagStatus = {}));
|
|
44
|
+
var EAuthMeLaserTagStatus;
|
|
45
|
+
(function (EAuthMeLaserTagStatus) {
|
|
46
|
+
EAuthMeLaserTagStatus["NoTag"] = "EAuthMeLaserTagStatus_NoTag";
|
|
47
|
+
EAuthMeLaserTagStatus["HasTag"] = "EAuthMeLaserTagStatus_HasTag";
|
|
48
|
+
EAuthMeLaserTagStatus["Others"] = "EAuthMeLaserTagStatus_Others";
|
|
49
|
+
})(EAuthMeLaserTagStatus = exports.EAuthMeLaserTagStatus || (exports.EAuthMeLaserTagStatus = {}));
|
|
50
|
+
var EAuthMeTaiwanHoleStatus;
|
|
51
|
+
(function (EAuthMeTaiwanHoleStatus) {
|
|
52
|
+
EAuthMeTaiwanHoleStatus["NotFound"] = "EAuthMeTaiwanHoleStatus_NotFound";
|
|
53
|
+
EAuthMeTaiwanHoleStatus["Found"] = "EAuthMeTaiwanHoleStatus_Found";
|
|
54
|
+
})(EAuthMeTaiwanHoleStatus = exports.EAuthMeTaiwanHoleStatus || (exports.EAuthMeTaiwanHoleStatus = {}));
|
|
55
|
+
var EAuthMeCardClass;
|
|
56
|
+
(function (EAuthMeCardClass) {
|
|
57
|
+
EAuthMeCardClass["Invalid"] = "EAuthMeCardClass_Invalid";
|
|
58
|
+
EAuthMeCardClass["Background"] = "EAuthMeCardClass_Background";
|
|
59
|
+
EAuthMeCardClass["Unknown"] = "EAuthMeCardClass_Unknown";
|
|
60
|
+
EAuthMeCardClass["Passport"] = "EAuthMeCardClass_Passport";
|
|
61
|
+
EAuthMeCardClass["TWN_IDCard_Front"] = "EAuthMeCardClass_TWN_IDCard_Front";
|
|
62
|
+
EAuthMeCardClass["TWN_IDCard_Back"] = "EAuthMeCardClass_TWN_IDCard_Back";
|
|
63
|
+
EAuthMeCardClass["TWN_DriverLicense_Front"] = "EAuthMeCardClass_TWN_DriverLicense_Front";
|
|
64
|
+
EAuthMeCardClass["TWN_DriverLicense_Back"] = "EAuthMeCardClass_TWN_DriverLicense_Back";
|
|
65
|
+
EAuthMeCardClass["TWN_ResidentCard_Front"] = "EAuthMeCardClass_TWN_ResidentCard_Front";
|
|
66
|
+
EAuthMeCardClass["TWN_ResidentCard_Back"] = "EAuthMeCardClass_TWN_ResidentCard_Back";
|
|
67
|
+
EAuthMeCardClass["TWN_HealthCard_Front"] = "EAuthMeCardClass_TWN_HealthCard_Front";
|
|
68
|
+
EAuthMeCardClass["TWN_VehiclesLicense_Front"] = "EAuthMeCardClass_TWN_VehiclesLicense_Front";
|
|
69
|
+
})(EAuthMeCardClass = exports.EAuthMeCardClass || (exports.EAuthMeCardClass = {}));
|
|
70
|
+
var EAuthMeCardMatchStatus;
|
|
71
|
+
(function (EAuthMeCardMatchStatus) {
|
|
72
|
+
EAuthMeCardMatchStatus["None"] = "EAuthMeCardMatchStatus_None";
|
|
73
|
+
EAuthMeCardMatchStatus["Mismatch"] = "EAuthMeCardMatchStatus_Mismatch";
|
|
74
|
+
EAuthMeCardMatchStatus["NeedMoreFrame"] = "EAuthMeCardMatchStatus_NeedMoreFrame";
|
|
75
|
+
EAuthMeCardMatchStatus["Match"] = "EAuthMeCardMatchStatus_Match";
|
|
76
|
+
})(EAuthMeCardMatchStatus = exports.EAuthMeCardMatchStatus || (exports.EAuthMeCardMatchStatus = {}));
|
|
77
|
+
var EAuthMeCardOCRStatus;
|
|
78
|
+
(function (EAuthMeCardOCRStatus) {
|
|
79
|
+
EAuthMeCardOCRStatus["NoCard"] = "EAuthMeCardOCRStatus_NoCard";
|
|
80
|
+
EAuthMeCardOCRStatus["WrongCardType"] = "EAuthMeCardOCRStatus_WrongCardType";
|
|
81
|
+
EAuthMeCardOCRStatus["PositionNotMatch"] = "EAuthMeCardOCRStatus_PositionNotMatch";
|
|
82
|
+
EAuthMeCardOCRStatus["Reflective"] = "EAuthMeCardOCRStatus_Reflective";
|
|
83
|
+
EAuthMeCardOCRStatus["Blur"] = "EAuthMeCardOCRStatus_Blur";
|
|
84
|
+
EAuthMeCardOCRStatus["Pass"] = "EAuthMeCardOCRStatus_Pass";
|
|
85
|
+
EAuthMeCardOCRStatus["Error"] = "EAuthMeCardOCRStatus_Error";
|
|
86
|
+
})(EAuthMeCardOCRStatus = exports.EAuthMeCardOCRStatus || (exports.EAuthMeCardOCRStatus = {}));
|
|
87
|
+
var EAuthMeIDCardAntiFraudStatus;
|
|
88
|
+
(function (EAuthMeIDCardAntiFraudStatus) {
|
|
89
|
+
EAuthMeIDCardAntiFraudStatus["Failed"] = "EAuthMeIDCardAntiFraudStatus_Failed";
|
|
90
|
+
EAuthMeIDCardAntiFraudStatus["NoCard"] = "EAuthMeIDCardAntiFraudStatus_NoCard";
|
|
91
|
+
EAuthMeIDCardAntiFraudStatus["WrongCardType"] = "EAuthMeIDCardAntiFraudStatus_WrongCardType";
|
|
92
|
+
EAuthMeIDCardAntiFraudStatus["Reflective"] = "EAuthMeIDCardAntiFraudStatus_Reflective";
|
|
93
|
+
EAuthMeIDCardAntiFraudStatus["Blur"] = "EAuthMeIDCardAntiFraudStatus_Blur";
|
|
94
|
+
EAuthMeIDCardAntiFraudStatus["Gray"] = "EAuthMeIDCardAntiFraudStatus_Gray";
|
|
95
|
+
EAuthMeIDCardAntiFraudStatus["PositionNotMatch"] = "EAuthMeIDCardAntiFraudStatus_PositionNotMatch";
|
|
96
|
+
EAuthMeIDCardAntiFraudStatus["NeedMoreFrame"] = "EAuthMeIDCardAntiFraudStatus_NeedMoreFrame";
|
|
97
|
+
EAuthMeIDCardAntiFraudStatus["Pass"] = "EAuthMeIDCardAntiFraudStatus_Pass";
|
|
98
|
+
EAuthMeIDCardAntiFraudStatus["Error"] = "EAuthMeIDCardAntiFraudStatus_Error";
|
|
99
|
+
})(EAuthMeIDCardAntiFraudStatus = exports.EAuthMeIDCardAntiFraudStatus || (exports.EAuthMeIDCardAntiFraudStatus = {}));
|
|
100
|
+
var EAuthMeMRZRecogStatus;
|
|
101
|
+
(function (EAuthMeMRZRecogStatus) {
|
|
102
|
+
EAuthMeMRZRecogStatus["Success"] = "EAuthMeMRZRecogStatus_Success";
|
|
103
|
+
EAuthMeMRZRecogStatus["WrongFormat"] = "EAuthMeMRZRecogStatus_WrongFormat";
|
|
104
|
+
})(EAuthMeMRZRecogStatus = exports.EAuthMeMRZRecogStatus || (exports.EAuthMeMRZRecogStatus = {}));
|
|
105
|
+
var EAuthMeMRZServiceStatus;
|
|
106
|
+
(function (EAuthMeMRZServiceStatus) {
|
|
107
|
+
EAuthMeMRZServiceStatus["Success"] = "EAuthMeMRZServiceStatus_Success";
|
|
108
|
+
EAuthMeMRZServiceStatus["NotFound"] = "EAuthMeMRZServiceStatus_NotFound";
|
|
109
|
+
EAuthMeMRZServiceStatus["RecogFailed"] = "EAuthMeMRZServiceStatus_RecogFailed";
|
|
110
|
+
EAuthMeMRZServiceStatus["Error"] = "EAuthMeMRZServiceStatus_Error";
|
|
111
|
+
})(EAuthMeMRZServiceStatus = exports.EAuthMeMRZServiceStatus || (exports.EAuthMeMRZServiceStatus = {}));
|
|
112
|
+
var EAuthMeIDCardAntiFraudStage;
|
|
113
|
+
(function (EAuthMeIDCardAntiFraudStage) {
|
|
114
|
+
EAuthMeIDCardAntiFraudStage["Frontal"] = "EAuthMeIDCardAntiFraudStage_Frontal";
|
|
115
|
+
EAuthMeIDCardAntiFraudStage["Up"] = "EAuthMeIDCardAntiFraudStage_Up";
|
|
116
|
+
EAuthMeIDCardAntiFraudStage["Down"] = "EAuthMeIDCardAntiFraudStage_Down";
|
|
117
|
+
EAuthMeIDCardAntiFraudStage["Left"] = "EAuthMeIDCardAntiFraudStage_Left";
|
|
118
|
+
EAuthMeIDCardAntiFraudStage["Right"] = "EAuthMeIDCardAntiFraudStage_Right";
|
|
119
|
+
EAuthMeIDCardAntiFraudStage["IgnoreCardMatch"] = "EAuthMeIDCardAntiFraudStage_IgnoreCardMatch";
|
|
120
|
+
EAuthMeIDCardAntiFraudStage["Done"] = "EAuthMeIDCardAntiFraudStage_Done";
|
|
121
|
+
})(EAuthMeIDCardAntiFraudStage = exports.EAuthMeIDCardAntiFraudStage || (exports.EAuthMeIDCardAntiFraudStage = {}));
|
|
122
|
+
//# sourceMappingURL=id-recognition.enum.js.map
|
|
@@ -0,0 +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,yBAAU,CAAA;AACZ,CAAC,EAFW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAEtB;AACD,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,wDAA+B,CAAA;IAC/B,kDAAyB,CAAA;IACzB,sDAA6B,CAAA;IAC7B,4DAAmC,CAAA;IACnC,8CAAqB,CAAA;AACvB,CAAC,EAPW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAOhC;AAED,IAAY,WAaX;AAbD,WAAY,WAAW;IACrB,oDAAY,CAAA;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
1
|
+
export * from './id-recognition.enum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/enum/index.ts"],"names":[],"mappings":";;;AAAA,gEAAsC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { EAuthMeCardClass, EAuthMeCardMatchStatus, EAuthMeCardOCRStatus, EAuthMeIDCardAntiFraudStage, EAuthMeIDCardAntiFraudStatus, EAuthMeIDCardMetalTagStatus, EAuthMeLaserTagStatus, EAuthMeMRZRecogStatus, EAuthMeMRZServiceStatus, EAuthMeTaiwanHoleStatus } from '../enum';
|
|
2
|
+
export interface IDCardAntiFraudResult {
|
|
3
|
+
info: AuthMeIDCardAntiFraudInfo;
|
|
4
|
+
statistics: AuthMeIDCardAntiFraudStatistics;
|
|
5
|
+
eStage: EAuthMeIDCardAntiFraudStage;
|
|
6
|
+
eStatus: EAuthMeIDCardAntiFraudStatus;
|
|
7
|
+
}
|
|
8
|
+
export interface AuthMeIDCardAntiFraudInfo {
|
|
9
|
+
aiCardVertices: number[];
|
|
10
|
+
fCardMatchScore: number;
|
|
11
|
+
reflective: AuthMeImageReflectiveInfo;
|
|
12
|
+
eCardMatchStatus: EAuthMeCardMatchStatus;
|
|
13
|
+
blur: AuthMeImageBlurInfo;
|
|
14
|
+
colorDetect: AuthMeIDCardColorInfo;
|
|
15
|
+
metalTag: AuthMeMetalTagInfo;
|
|
16
|
+
laserTag: AuthMeLaserTagInfo;
|
|
17
|
+
taiwanHole: AuthMeTaiwanHoleInfo;
|
|
18
|
+
cardClass: AuthMeCardClassInfo;
|
|
19
|
+
}
|
|
20
|
+
export interface AuthMeImageReflectiveInfo {
|
|
21
|
+
fScore: number;
|
|
22
|
+
}
|
|
23
|
+
export interface AuthMeImageBlurInfo {
|
|
24
|
+
fScore: number;
|
|
25
|
+
}
|
|
26
|
+
export interface AuthMeIDCardColorInfo {
|
|
27
|
+
fScore: number;
|
|
28
|
+
}
|
|
29
|
+
export interface AuthMeMetalTagInfo {
|
|
30
|
+
aeStatus: EAuthMeIDCardMetalTagStatus[];
|
|
31
|
+
}
|
|
32
|
+
export interface AuthMeLaserTagInfo {
|
|
33
|
+
eStatus: EAuthMeLaserTagStatus;
|
|
34
|
+
}
|
|
35
|
+
export interface AuthMeTaiwanHoleInfo {
|
|
36
|
+
eStatus: EAuthMeTaiwanHoleStatus;
|
|
37
|
+
}
|
|
38
|
+
export interface AuthMeCardClassInfo {
|
|
39
|
+
eClass: EAuthMeCardClass;
|
|
40
|
+
}
|
|
41
|
+
export interface AuthMeIDCardAntiFraudStatistics {
|
|
42
|
+
iHasLaserTagCount: number;
|
|
43
|
+
iNoLaserTagCount: number;
|
|
44
|
+
iTaiwanHoleCount: number;
|
|
45
|
+
iValidMetalTagCount: number;
|
|
46
|
+
}
|
|
47
|
+
export interface CardOCRResult {
|
|
48
|
+
info: AuthMeCardOCRInfo;
|
|
49
|
+
eStatus: EAuthMeCardOCRStatus;
|
|
50
|
+
iWidth: number;
|
|
51
|
+
iHeight: number;
|
|
52
|
+
ulStride: number;
|
|
53
|
+
pointer: number;
|
|
54
|
+
imageData?: Uint8Array;
|
|
55
|
+
}
|
|
56
|
+
export interface AuthMeCardOCRInfo {
|
|
57
|
+
aiCardVertices: number[];
|
|
58
|
+
fCardMatchScore: number;
|
|
59
|
+
cardClass: AuthMeCardClassInfo;
|
|
60
|
+
reflective: AuthMeImageReflectiveInfo;
|
|
61
|
+
blur: AuthMeImageBlurInfo;
|
|
62
|
+
}
|
|
63
|
+
export interface MRZResult {
|
|
64
|
+
info: AuthMeMRZInfo;
|
|
65
|
+
eStatus: EAuthMeMRZServiceStatus;
|
|
66
|
+
tField: MRZFieldTD3;
|
|
67
|
+
}
|
|
68
|
+
export interface MRZFieldTD3 {
|
|
69
|
+
surname: string;
|
|
70
|
+
givenName: string;
|
|
71
|
+
birthDate: string;
|
|
72
|
+
expiryDate: string;
|
|
73
|
+
country: string;
|
|
74
|
+
documentNumber: string;
|
|
75
|
+
documentType: string;
|
|
76
|
+
sex: string;
|
|
77
|
+
nationality: string;
|
|
78
|
+
personalNumber: string;
|
|
79
|
+
}
|
|
80
|
+
export interface AuthMeMRZInfo {
|
|
81
|
+
eRecogStatus: EAuthMeMRZRecogStatus;
|
|
82
|
+
afVertices: number[];
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id-recognition-type.interface.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/interface/id-recognition-type.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './id-recognition-type.interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/interface/index.ts"],"names":[],"mappings":";;;AAAA,0EAAgD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IdRecognitionResponse {
|
|
2
|
+
id: string;
|
|
3
|
+
details: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare type IdRecognitionInfoConfirmRequest = IdRecognitionResponse;
|
|
8
|
+
export interface InitScanResponse {
|
|
9
|
+
scanId: string;
|
|
10
|
+
parameters: {
|
|
11
|
+
enableManualUpload: boolean;
|
|
12
|
+
fraudRetryTimes: number;
|
|
13
|
+
fraudTimeout: number;
|
|
14
|
+
fraudMaxFps: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dto.model.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/model/dto.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum IdType {
|
|
2
|
+
IdCard = "IDCard",
|
|
3
|
+
DriverLicense = "DriverLicense",
|
|
4
|
+
HealthCard = "HealthCard",
|
|
5
|
+
Passport = "Passport"
|
|
6
|
+
}
|
|
7
|
+
export interface IdConfig {
|
|
8
|
+
front: boolean;
|
|
9
|
+
back: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const IdTypeConfig: {
|
|
12
|
+
[key: string]: IdConfig;
|
|
13
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IdTypeConfig = exports.IdType = void 0;
|
|
4
|
+
var IdType;
|
|
5
|
+
(function (IdType) {
|
|
6
|
+
IdType["IdCard"] = "IDCard";
|
|
7
|
+
IdType["DriverLicense"] = "DriverLicense";
|
|
8
|
+
IdType["HealthCard"] = "HealthCard";
|
|
9
|
+
IdType["Passport"] = "Passport";
|
|
10
|
+
})(IdType = exports.IdType || (exports.IdType = {}));
|
|
11
|
+
exports.IdTypeConfig = {
|
|
12
|
+
[IdType.IdCard]: {
|
|
13
|
+
front: true,
|
|
14
|
+
back: true,
|
|
15
|
+
},
|
|
16
|
+
[IdType.Passport]: {
|
|
17
|
+
front: true,
|
|
18
|
+
back: true,
|
|
19
|
+
},
|
|
20
|
+
[IdType.HealthCard]: {
|
|
21
|
+
front: true,
|
|
22
|
+
back: false,
|
|
23
|
+
},
|
|
24
|
+
[IdType.DriverLicense]: {
|
|
25
|
+
front: true,
|
|
26
|
+
back: true,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=id-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id-type.enum.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/model/id-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,2BAAiB,CAAA;IACjB,yCAA+B,CAAA;IAC/B,mCAAyB,CAAA;IACzB,+BAAqB,CAAA;AACvB,CAAC,EALW,MAAM,GAAN,cAAM,KAAN,cAAM,QAKjB;AAOY,QAAA,YAAY,GAAgC;IACvD,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;QACf,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,IAAI;KACX;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;QACjB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,IAAI;KACX;IACD,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE;QACnB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,KAAK;KACZ;IACD,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;QACtB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,IAAI;KACX;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/model/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,sDAA4B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AuthmeEngineModuleBase, MlEngine } from '@authme/engine';
|
|
2
|
+
import { CardOCRResult, IDCardAntiFraudResult, MRZResult } from './interface';
|
|
3
|
+
import { EAuthMeCardClass, EAuthMeIDCardAntiFraudStage } from './enum';
|
|
4
|
+
export declare class CardOCR extends AuthmeEngineModuleBase<CardOCRResult> {
|
|
5
|
+
private type;
|
|
6
|
+
constructor(engine: MlEngine);
|
|
7
|
+
setType(type: EAuthMeCardClass): Promise<any>;
|
|
8
|
+
getType(): EAuthMeCardClass;
|
|
9
|
+
setMaskPosition(positions: number[][]): Promise<any>;
|
|
10
|
+
}
|
|
11
|
+
export declare class IdCardAntiFraudService extends AuthmeEngineModuleBase<IDCardAntiFraudResult> {
|
|
12
|
+
constructor(engine: MlEngine);
|
|
13
|
+
setMaskPosition(positions: number[][]): Promise<any>;
|
|
14
|
+
setStage(stageList: EAuthMeIDCardAntiFraudStage[]): Promise<any>;
|
|
15
|
+
}
|
|
16
|
+
export declare class MRZService extends AuthmeEngineModuleBase<MRZResult> {
|
|
17
|
+
constructor(engine: MlEngine);
|
|
18
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MRZService = exports.IdCardAntiFraudService = exports.CardOCR = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const engine_1 = require("@authme/engine");
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
const enum_1 = require("./enum");
|
|
8
|
+
class CardOCR extends engine_1.AuthmeEngineModuleBase {
|
|
9
|
+
constructor(engine) {
|
|
10
|
+
super(engine);
|
|
11
|
+
this.type = enum_1.EAuthMeCardClass.Invalid;
|
|
12
|
+
this.moduleName = engine_1.EngineModule.CardOCR;
|
|
13
|
+
}
|
|
14
|
+
setType(type) {
|
|
15
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const convertedType = enum_1.OCRCardType[type.split('EAuthMeCardClass_')[1]];
|
|
17
|
+
this.type = type;
|
|
18
|
+
return yield (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'setType', {
|
|
19
|
+
type: convertedType,
|
|
20
|
+
}));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
getType() {
|
|
24
|
+
return this.type;
|
|
25
|
+
}
|
|
26
|
+
setMaskPosition(positions) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return yield (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'setMaskPosition', {
|
|
29
|
+
positions,
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.CardOCR = CardOCR;
|
|
35
|
+
class IdCardAntiFraudService extends engine_1.AuthmeEngineModuleBase {
|
|
36
|
+
constructor(engine) {
|
|
37
|
+
super(engine);
|
|
38
|
+
this.moduleName = engine_1.EngineModule.IdCardAntiFraud;
|
|
39
|
+
}
|
|
40
|
+
setMaskPosition(positions) {
|
|
41
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
return yield (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'setMaskPosition', {
|
|
43
|
+
positions,
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
setStage(stageList) {
|
|
48
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const stageStrList = stageList.map((x) => x.split('_')[1]);
|
|
50
|
+
return yield (0, rxjs_1.firstValueFrom)(this.engine.run(this.moduleName, 'setStage', stageStrList));
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.IdCardAntiFraudService = IdCardAntiFraudService;
|
|
55
|
+
class MRZService extends engine_1.AuthmeEngineModuleBase {
|
|
56
|
+
constructor(engine) {
|
|
57
|
+
super(engine);
|
|
58
|
+
this.moduleName = engine_1.EngineModule.MRZ;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.MRZService = MRZService;
|
|
62
|
+
//# sourceMappingURL=modules-id-recognition-feature-id-recognition.js.map
|
|
@@ -0,0 +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":";;;;AAAA,2CAAgF;AAChF,+BAAsC;AAEtC,iCAIgB;AAChB,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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AAC,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,CAC3D,CAAC;QACJ,CAAC;KAAA;CACF;AApBD,wDAoBC;AAED,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;CACF;AALD,gCAKC"}
|
package/src/lib/util.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCardSubTypes = void 0;
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const CardTypeMapping = {
|
|
6
|
+
[enum_1.IdRecognitionCardType.IDCard]: [
|
|
7
|
+
enum_1.EAuthMeCardClass.TWN_IDCard_Front,
|
|
8
|
+
enum_1.EAuthMeCardClass.TWN_IDCard_Back,
|
|
9
|
+
],
|
|
10
|
+
[enum_1.IdRecognitionCardType.HealthCard]: [enum_1.EAuthMeCardClass.TWN_HealthCard_Front],
|
|
11
|
+
[enum_1.IdRecognitionCardType.Passport]: [enum_1.EAuthMeCardClass.Passport],
|
|
12
|
+
[enum_1.IdRecognitionCardType.ResidentCard]: [
|
|
13
|
+
enum_1.EAuthMeCardClass.TWN_ResidentCard_Front,
|
|
14
|
+
enum_1.EAuthMeCardClass.TWN_ResidentCard_Back,
|
|
15
|
+
],
|
|
16
|
+
[enum_1.IdRecognitionCardType.VehiclesLicense]: [
|
|
17
|
+
enum_1.EAuthMeCardClass.TWN_VehiclesLicense_Front,
|
|
18
|
+
],
|
|
19
|
+
[enum_1.IdRecognitionCardType.DriverLicense]: [
|
|
20
|
+
enum_1.EAuthMeCardClass.TWN_DriverLicense_Front,
|
|
21
|
+
enum_1.EAuthMeCardClass.TWN_DriverLicense_Back,
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
function getCardSubTypes(type, country, removePrefix = true) {
|
|
25
|
+
if (removePrefix) {
|
|
26
|
+
return CardTypeMapping[type].map((x) => x.split('EAuthMeCardClass_')[1]);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return CardTypeMapping[type];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.getCardSubTypes = getCardSubTypes;
|
|
33
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../../../libs/modules/id-recognition/feature-id-recognition/src/lib/util.ts"],"names":[],"mappings":";;;AAAA,iCAA8E;AAE9E,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,eAAe,CAAC,EAAE;QACvC,uBAAgB,CAAC,yBAAyB;KAC3C;IACD,CAAC,4BAAqB,CAAC,aAAa,CAAC,EAAE;QACrC,uBAAgB,CAAC,uBAAuB;QACxC,uBAAgB,CAAC,sBAAsB;KACxC;CACF,CAAC;AAEF,SAAgB,eAAe,CAC7B,IAA2B,EAC3B,OAAoB,EACpB,YAAY,GAAG,IAAI;IAEnB,IAAI,YAAY,EAAE;QAChB,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC1E;SAAM;QACL,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;KAC9B;AACH,CAAC;AAVD,0CAUC"}
|