scandit-react-native-datacapture-id 8.0.0-beta.1 → 8.0.0
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/THIRD_PARTY.txt +46 -0
- package/android/build.gradle +1 -1
- package/dist/dts/index.d.ts +55 -9
- package/dist/id.js +182 -22
- package/dist/id.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/scandit-react-native-datacapture-id.podspec +1 -1
package/THIRD_PARTY.txt
CHANGED
|
@@ -236,6 +236,52 @@ includes components licensed under the following licenses:
|
|
|
236
236
|
SOFTWARE.
|
|
237
237
|
|
|
238
238
|
|
|
239
|
+
================================================================================
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
Written by: Philip Hazel
|
|
243
|
+
Email local part: Philip.Hazel
|
|
244
|
+
Email domain: gmail.com
|
|
245
|
+
|
|
246
|
+
Retired from University of Cambridge Computing Service,
|
|
247
|
+
Cambridge, England.
|
|
248
|
+
|
|
249
|
+
Copyright (c) 1997-2007 University of Cambridge
|
|
250
|
+
Copyright (c) 2007-2024 Philip Hazel
|
|
251
|
+
All rights reserved.
|
|
252
|
+
|
|
253
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
254
|
+
are permitted provided that the following conditions are met:
|
|
255
|
+
|
|
256
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
257
|
+
this list of conditions and the following disclaimer.
|
|
258
|
+
|
|
259
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
260
|
+
this list of conditions and the following disclaimer in the documentation
|
|
261
|
+
and/or other materials provided with the distribution.
|
|
262
|
+
|
|
263
|
+
* Neither the names of the copyright holders nor the names of the contributors
|
|
264
|
+
may be used to endorse or promote products derived from this software
|
|
265
|
+
without specific prior written permission.
|
|
266
|
+
|
|
267
|
+
This software is provided by the copyright holders and contributors "as is" and
|
|
268
|
+
any express or implied warranties, including, but not limited to, the implied
|
|
269
|
+
warranties of merchantability and fitness for a particular purpose are disclaimed.
|
|
270
|
+
In no event shall copyright holders or contributors be liable for any direct,
|
|
271
|
+
indirect, incidental, special, exemplary, or consequential damages
|
|
272
|
+
(including, but not limited to, procurement of substitute goods or services;
|
|
273
|
+
loss of use, data, or profits; or business interruption) however caused
|
|
274
|
+
and on any theory of liability, whether in contract, strict liability,
|
|
275
|
+
or tort (including negligence or otherwise) arising in any way out of
|
|
276
|
+
the use of this software, even if advised of the possibility of such damage.
|
|
277
|
+
|
|
278
|
+
The second condition in the BSD licence (covering binary redistributions)
|
|
279
|
+
does not apply all the way down a chain of software. If binary package A
|
|
280
|
+
includes PCRE2, it must respect the condition, but if package B is software
|
|
281
|
+
that includes package A, the condition is not imposed on package B unless
|
|
282
|
+
it uses PCRE2 independently.
|
|
283
|
+
|
|
284
|
+
|
|
239
285
|
================================================================================
|
|
240
286
|
|
|
241
287
|
|
package/android/build.gradle
CHANGED
|
@@ -75,7 +75,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
dependencies {
|
|
78
|
-
def sdk_version = "8.0.0
|
|
78
|
+
def sdk_version = "8.0.0"
|
|
79
79
|
|
|
80
80
|
println("Version of the native sdk used in this build: ${safeExtGet("global_sdk_version", sdk_version)}")
|
|
81
81
|
api project(path: ":scandit-react-native-datacapture-core")
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,11 +1,57 @@
|
|
|
1
|
-
export { DateResult
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { DateResult } from 'scandit-datacapture-frameworks-id';
|
|
2
|
+
export { IdAnonymizationMode } from 'scandit-datacapture-frameworks-id';
|
|
3
|
+
export { IdFieldType } from 'scandit-datacapture-frameworks-id';
|
|
4
|
+
export { IdImageType } from 'scandit-datacapture-frameworks-id';
|
|
5
|
+
export { CapturedSides } from 'scandit-datacapture-frameworks-id';
|
|
6
|
+
export { TextHintPosition } from 'scandit-datacapture-frameworks-id';
|
|
7
|
+
export { BarcodeResult } from 'scandit-datacapture-frameworks-id';
|
|
8
|
+
export { Duration } from 'scandit-datacapture-frameworks-id';
|
|
9
|
+
export { IdImages } from 'scandit-datacapture-frameworks-id';
|
|
10
|
+
export { IdSide } from 'scandit-datacapture-frameworks-id';
|
|
11
|
+
export { Sex } from 'scandit-datacapture-frameworks-id';
|
|
5
12
|
export { UsRealIdStatus } from 'scandit-datacapture-frameworks-id';
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
13
|
+
export { CapturedId } from 'scandit-datacapture-frameworks-id';
|
|
14
|
+
export { MobileDocumentOCRResult } from 'scandit-datacapture-frameworks-id';
|
|
15
|
+
export { MobileDocumentResult } from 'scandit-datacapture-frameworks-id';
|
|
16
|
+
export { MRZResult } from 'scandit-datacapture-frameworks-id';
|
|
17
|
+
export { VIZResult } from 'scandit-datacapture-frameworks-id';
|
|
18
|
+
export { IdCapture } from 'scandit-datacapture-frameworks-id';
|
|
19
|
+
export { IdCaptureFeedback } from 'scandit-datacapture-frameworks-id';
|
|
20
|
+
export { IdCaptureListener } from 'scandit-datacapture-frameworks-id';
|
|
21
|
+
export { IdCaptureOverlay } from 'scandit-datacapture-frameworks-id';
|
|
22
|
+
export { IdCaptureSettings } from 'scandit-datacapture-frameworks-id';
|
|
23
|
+
export { IdLayoutLineStyle } from 'scandit-datacapture-frameworks-id';
|
|
24
|
+
export { IdLayoutStyle } from 'scandit-datacapture-frameworks-id';
|
|
25
|
+
export { RejectionReason } from 'scandit-datacapture-frameworks-id';
|
|
26
|
+
export { IdCaptureDocumentType } from 'scandit-datacapture-frameworks-id';
|
|
27
|
+
export { DriverLicense } from 'scandit-datacapture-frameworks-id';
|
|
28
|
+
export { HealthInsuranceCard } from 'scandit-datacapture-frameworks-id';
|
|
29
|
+
export { IdCaptureDocument } from 'scandit-datacapture-frameworks-id';
|
|
30
|
+
export { IdCard } from 'scandit-datacapture-frameworks-id';
|
|
31
|
+
export { Passport } from 'scandit-datacapture-frameworks-id';
|
|
32
|
+
export { RegionSpecific } from 'scandit-datacapture-frameworks-id';
|
|
33
|
+
export { ResidencePermit } from 'scandit-datacapture-frameworks-id';
|
|
34
|
+
export { VisaIcao } from 'scandit-datacapture-frameworks-id';
|
|
35
|
+
export { IdCaptureScanner } from 'scandit-datacapture-frameworks-id';
|
|
36
|
+
export { SingleSideScanner } from 'scandit-datacapture-frameworks-id';
|
|
37
|
+
export { FullDocumentScanner } from 'scandit-datacapture-frameworks-id';
|
|
38
|
+
export { MobileDocumentScanner } from 'scandit-datacapture-frameworks-id';
|
|
39
|
+
export { PhysicalDocumentScanner } from 'scandit-datacapture-frameworks-id';
|
|
40
|
+
export { MobileDocumentDataElement } from 'scandit-datacapture-frameworks-id';
|
|
41
|
+
export { IdCaptureRegion } from 'scandit-datacapture-frameworks-id';
|
|
42
|
+
export { RegionSpecificSubtype } from 'scandit-datacapture-frameworks-id';
|
|
43
|
+
export { AamvaBarcodeVerificationResult } from 'scandit-datacapture-frameworks-id';
|
|
44
|
+
export { AamvaBarcodeVerificationStatus } from 'scandit-datacapture-frameworks-id';
|
|
45
|
+
export { DataConsistencyResult } from 'scandit-datacapture-frameworks-id';
|
|
46
|
+
export { DataConsistencyCheck } from 'scandit-datacapture-frameworks-id';
|
|
47
|
+
export { VerificationResult } from 'scandit-datacapture-frameworks-id';
|
|
48
|
+
export { ProfessionalDrivingPermit } from 'scandit-datacapture-frameworks-id';
|
|
49
|
+
export { VehicleRestriction } from 'scandit-datacapture-frameworks-id';
|
|
50
|
+
export { DrivingLicenseCategory } from 'scandit-datacapture-frameworks-id';
|
|
51
|
+
export { DrivingLicenseDetails } from 'scandit-datacapture-frameworks-id';
|
|
52
|
+
export { IdCaptureController } from 'scandit-datacapture-frameworks-id';
|
|
53
|
+
export { IdCaptureListenerController } from 'scandit-datacapture-frameworks-id';
|
|
54
|
+
export { IdCaptureListenerProxy } from 'scandit-datacapture-frameworks-id';
|
|
55
|
+
export { IdCaptureListenerEvents } from 'scandit-datacapture-frameworks-id';
|
|
56
|
+
export { IdCaptureProxy } from 'scandit-datacapture-frameworks-id';
|
|
11
57
|
export * from './IdCaptureView';
|
package/dist/id.js
CHANGED
|
@@ -1366,6 +1366,56 @@ __decorate([
|
|
|
1366
1366
|
nameForSerialization('documentType')
|
|
1367
1367
|
], VisaIcao.prototype, "_documentType", void 0);
|
|
1368
1368
|
|
|
1369
|
+
class MobileDocumentOCRResult {
|
|
1370
|
+
get firstName() {
|
|
1371
|
+
return this.json.firstName;
|
|
1372
|
+
}
|
|
1373
|
+
get lastName() {
|
|
1374
|
+
return this.json.lastName;
|
|
1375
|
+
}
|
|
1376
|
+
get fullName() {
|
|
1377
|
+
return this.json.fullName;
|
|
1378
|
+
}
|
|
1379
|
+
get dateOfBirth() {
|
|
1380
|
+
return DateResult.fromJSON(this.json.dateOfBirth);
|
|
1381
|
+
}
|
|
1382
|
+
get documentNumber() {
|
|
1383
|
+
return this.json.documentNumber;
|
|
1384
|
+
}
|
|
1385
|
+
get dateOfExpiry() {
|
|
1386
|
+
return DateResult.fromJSON(this.json.dateOfExpiry);
|
|
1387
|
+
}
|
|
1388
|
+
get issuingJurisdiction() {
|
|
1389
|
+
return this.json.issuingJurisdiction;
|
|
1390
|
+
}
|
|
1391
|
+
get issuingJurisdictionIso() {
|
|
1392
|
+
return this.json.issuingJurisdictionIso;
|
|
1393
|
+
}
|
|
1394
|
+
get sex() {
|
|
1395
|
+
return this.json.sex;
|
|
1396
|
+
}
|
|
1397
|
+
get nationality() {
|
|
1398
|
+
return this.json.nationality;
|
|
1399
|
+
}
|
|
1400
|
+
get address() {
|
|
1401
|
+
return this.json.address;
|
|
1402
|
+
}
|
|
1403
|
+
get documentAdditionalNumber() {
|
|
1404
|
+
return this.json.documentAdditionalNumber;
|
|
1405
|
+
}
|
|
1406
|
+
get dateOfIssue() {
|
|
1407
|
+
return DateResult.fromJSON(this.json.dateOfIssue);
|
|
1408
|
+
}
|
|
1409
|
+
static fromJSON(json) {
|
|
1410
|
+
if (json === null) {
|
|
1411
|
+
return null;
|
|
1412
|
+
}
|
|
1413
|
+
const result = new MobileDocumentOCRResult();
|
|
1414
|
+
result.json = json;
|
|
1415
|
+
return result;
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1369
1419
|
class MobileDocumentResult {
|
|
1370
1420
|
constructor() {
|
|
1371
1421
|
this._drivingLicenseCategories = [];
|
|
@@ -1489,8 +1539,8 @@ class VerificationResult {
|
|
|
1489
1539
|
}
|
|
1490
1540
|
get dataConsistency() {
|
|
1491
1541
|
var _a;
|
|
1492
|
-
if (this._dataConsistency == null && ((_a = this.json) === null || _a === void 0 ? void 0 : _a.
|
|
1493
|
-
this._dataConsistency = DataConsistencyResult.fromJSON(this.json.
|
|
1542
|
+
if (this._dataConsistency == null && ((_a = this.json) === null || _a === void 0 ? void 0 : _a.dataConsistencyResult) != null) {
|
|
1543
|
+
this._dataConsistency = DataConsistencyResult.fromJSON(this.json.dataConsistencyResult);
|
|
1494
1544
|
}
|
|
1495
1545
|
return this._dataConsistency;
|
|
1496
1546
|
}
|
|
@@ -1515,6 +1565,7 @@ class CapturedId {
|
|
|
1515
1565
|
constructor() {
|
|
1516
1566
|
this._document = null;
|
|
1517
1567
|
this._mobileDocument = null;
|
|
1568
|
+
this._mobileDocumentOcr = null;
|
|
1518
1569
|
this._verificationResult = null;
|
|
1519
1570
|
}
|
|
1520
1571
|
get age() {
|
|
@@ -1622,6 +1673,17 @@ class CapturedId {
|
|
|
1622
1673
|
}
|
|
1623
1674
|
return this._mobileDocument;
|
|
1624
1675
|
}
|
|
1676
|
+
/**
|
|
1677
|
+
* The additional information extracted from a mobile document using optical character recognition (OCR).
|
|
1678
|
+
* Returns null if not available.
|
|
1679
|
+
*/
|
|
1680
|
+
get mobileDocumentOcr() {
|
|
1681
|
+
if (this._mobileDocumentOcr === null && this.json.mobileDocumentOcrResult !== null) {
|
|
1682
|
+
this._mobileDocumentOcr = MobileDocumentOCRResult
|
|
1683
|
+
.fromJSON(this.json.mobileDocumentOcrResult);
|
|
1684
|
+
}
|
|
1685
|
+
return this._mobileDocumentOcr;
|
|
1686
|
+
}
|
|
1625
1687
|
get verificationResult() {
|
|
1626
1688
|
if (this._verificationResult === null) {
|
|
1627
1689
|
this._verificationResult = VerificationResult.fromJSON(this.json.verificationResult);
|
|
@@ -1706,6 +1768,41 @@ var IdFieldType;
|
|
|
1706
1768
|
IdFieldType["Sex"] = "sex";
|
|
1707
1769
|
})(IdFieldType || (IdFieldType = {}));
|
|
1708
1770
|
|
|
1771
|
+
var MobileDocumentDataElement;
|
|
1772
|
+
(function (MobileDocumentDataElement) {
|
|
1773
|
+
MobileDocumentDataElement["FamilyName"] = "familyName";
|
|
1774
|
+
MobileDocumentDataElement["GivenName"] = "givenName";
|
|
1775
|
+
MobileDocumentDataElement["BirthDate"] = "birthDate";
|
|
1776
|
+
MobileDocumentDataElement["IssueDate"] = "issueDate";
|
|
1777
|
+
MobileDocumentDataElement["ExpiryDate"] = "expiryDate";
|
|
1778
|
+
MobileDocumentDataElement["IssuingCountry"] = "issuingCountry";
|
|
1779
|
+
MobileDocumentDataElement["IssuingAuthority"] = "issuingAuthority";
|
|
1780
|
+
MobileDocumentDataElement["DocumentNumber"] = "documentNumber";
|
|
1781
|
+
MobileDocumentDataElement["Portrait"] = "portrait";
|
|
1782
|
+
MobileDocumentDataElement["DrivingPrivileges"] = "drivingPrivileges";
|
|
1783
|
+
MobileDocumentDataElement["AdministrativeNumber"] = "administrativeNumber";
|
|
1784
|
+
MobileDocumentDataElement["SexIso"] = "sexIso";
|
|
1785
|
+
MobileDocumentDataElement["Height"] = "height";
|
|
1786
|
+
MobileDocumentDataElement["Weight"] = "weight";
|
|
1787
|
+
MobileDocumentDataElement["EyeColour"] = "eyeColour";
|
|
1788
|
+
MobileDocumentDataElement["HairColour"] = "hairColour";
|
|
1789
|
+
MobileDocumentDataElement["BirthPlace"] = "birthPlace";
|
|
1790
|
+
MobileDocumentDataElement["ResidentAddress"] = "residentAddress";
|
|
1791
|
+
MobileDocumentDataElement["IssuingJurisdiction"] = "issuingJurisdiction";
|
|
1792
|
+
MobileDocumentDataElement["Nationality"] = "nationality";
|
|
1793
|
+
MobileDocumentDataElement["NameSuffix"] = "nameSuffix";
|
|
1794
|
+
MobileDocumentDataElement["FamilyNameTruncation"] = "familyNameTruncation";
|
|
1795
|
+
MobileDocumentDataElement["GivenNameTruncation"] = "givenNameTruncation";
|
|
1796
|
+
MobileDocumentDataElement["AkaFamilyName"] = "akaFamilyName";
|
|
1797
|
+
MobileDocumentDataElement["AkaGivenName"] = "akaGivenName";
|
|
1798
|
+
MobileDocumentDataElement["AkaSuffix"] = "akaSuffix";
|
|
1799
|
+
MobileDocumentDataElement["WeightRange"] = "weightRange";
|
|
1800
|
+
MobileDocumentDataElement["RaceEthnicity"] = "raceEthnicity";
|
|
1801
|
+
MobileDocumentDataElement["ResidentCounty"] = "residentCounty";
|
|
1802
|
+
MobileDocumentDataElement["SexAamva"] = "sexAamva";
|
|
1803
|
+
MobileDocumentDataElement["AamvaVersion"] = "aamvaVersion";
|
|
1804
|
+
})(MobileDocumentDataElement || (MobileDocumentDataElement = {}));
|
|
1805
|
+
|
|
1709
1806
|
class IdCaptureController extends BaseNewController {
|
|
1710
1807
|
constructor(idCapture = null) {
|
|
1711
1808
|
super('IdCaptureProxy');
|
|
@@ -1744,8 +1841,12 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1744
1841
|
constructor(idCapture) {
|
|
1745
1842
|
super('IdCaptureListenerProxy');
|
|
1746
1843
|
this.hasListeners = false;
|
|
1747
|
-
this.
|
|
1748
|
-
|
|
1844
|
+
this.handleDidCaptureWrapper = (ev) => __awaiter(this, void 0, void 0, function* () {
|
|
1845
|
+
return this.handleDidCapture(ev);
|
|
1846
|
+
});
|
|
1847
|
+
this.handleDidRejectWrapper = (ev) => __awaiter(this, void 0, void 0, function* () {
|
|
1848
|
+
return this.handleDidReject(ev);
|
|
1849
|
+
});
|
|
1749
1850
|
this.idCapture = idCapture;
|
|
1750
1851
|
this.initialize();
|
|
1751
1852
|
}
|
|
@@ -1761,11 +1862,9 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1761
1862
|
if (this.hasListeners) {
|
|
1762
1863
|
return;
|
|
1763
1864
|
}
|
|
1764
|
-
this.boundHandleDidCapture = this.handleDidCapture.bind(this);
|
|
1765
|
-
this.boundHandleDidReject = this.handleDidReject.bind(this);
|
|
1766
1865
|
this._proxy.subscribeForEvents(Object.values(IdCaptureListenerEvents));
|
|
1767
|
-
this._proxy.eventEmitter.on(IdCaptureListenerEvents.didCapture, this.
|
|
1768
|
-
this._proxy.eventEmitter.on(IdCaptureListenerEvents.didReject, this.
|
|
1866
|
+
this._proxy.eventEmitter.on(IdCaptureListenerEvents.didCapture, this.handleDidCaptureWrapper);
|
|
1867
|
+
this._proxy.eventEmitter.on(IdCaptureListenerEvents.didReject, this.handleDidRejectWrapper);
|
|
1769
1868
|
yield this._proxy.$addIdCaptureListener({ modeId: this.modeId });
|
|
1770
1869
|
this.hasListeners = true;
|
|
1771
1870
|
});
|
|
@@ -1778,9 +1877,7 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1778
1877
|
return;
|
|
1779
1878
|
}
|
|
1780
1879
|
const capturedIdJson = JSON.parse(event.id);
|
|
1781
|
-
|
|
1782
|
-
capturedIdJson.imageInfo = event.imageInfo;
|
|
1783
|
-
}
|
|
1880
|
+
this.enrichCapturedIdJson(capturedIdJson, event.imageInfo, event.frontReviewImage);
|
|
1784
1881
|
const captureId = CapturedId.fromJSON(capturedIdJson);
|
|
1785
1882
|
this.notifyListenersOfDidCapture(captureId);
|
|
1786
1883
|
this._proxy.$finishDidCaptureCallback({ modeId: this.modeId, enabled: this.idCapture.isEnabled });
|
|
@@ -1795,7 +1892,9 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1795
1892
|
}
|
|
1796
1893
|
let rejectedId = null;
|
|
1797
1894
|
if (event.id != null) {
|
|
1798
|
-
|
|
1895
|
+
const rejectedIdJson = JSON.parse(event.id);
|
|
1896
|
+
this.enrichCapturedIdJson(rejectedIdJson, event.imageInfo, event.frontReviewImage);
|
|
1897
|
+
rejectedId = CapturedId.fromJSON(rejectedIdJson);
|
|
1799
1898
|
}
|
|
1800
1899
|
this.notifyListenersOfDidReject(rejectedId, event.rejectionReason);
|
|
1801
1900
|
this._proxy.$finishDidRejectCallback({ modeId: this.modeId, enabled: this.idCapture.isEnabled });
|
|
@@ -1808,14 +1907,8 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1808
1907
|
}
|
|
1809
1908
|
yield this._proxy.$removeIdCaptureListener({ modeId: this.modeId });
|
|
1810
1909
|
this._proxy.unsubscribeFromEvents(Object.values(IdCaptureListenerEvents));
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
}
|
|
1814
|
-
if (this.boundHandleDidReject) {
|
|
1815
|
-
this._proxy.eventEmitter.off(IdCaptureListenerEvents.didReject, this.boundHandleDidReject);
|
|
1816
|
-
}
|
|
1817
|
-
this.boundHandleDidCapture = null;
|
|
1818
|
-
this.boundHandleDidReject = null;
|
|
1910
|
+
this._proxy.eventEmitter.off(IdCaptureListenerEvents.didCapture, this.handleDidCaptureWrapper);
|
|
1911
|
+
this._proxy.eventEmitter.off(IdCaptureListenerEvents.didReject, this.handleDidRejectWrapper);
|
|
1819
1912
|
this.hasListeners = false;
|
|
1820
1913
|
});
|
|
1821
1914
|
}
|
|
@@ -1835,6 +1928,15 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1835
1928
|
}
|
|
1836
1929
|
});
|
|
1837
1930
|
}
|
|
1931
|
+
enrichCapturedIdJson(capturedIdJson, imageInfo, frontReviewImage) {
|
|
1932
|
+
var _a;
|
|
1933
|
+
if (imageInfo) {
|
|
1934
|
+
capturedIdJson.imageInfo = imageInfo;
|
|
1935
|
+
}
|
|
1936
|
+
if (frontReviewImage && ((_a = capturedIdJson.verificationResult) === null || _a === void 0 ? void 0 : _a.dataConsistencyResult)) {
|
|
1937
|
+
capturedIdJson.verificationResult.dataConsistencyResult.frontReviewImage = frontReviewImage;
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1838
1940
|
dispose() {
|
|
1839
1941
|
this.unsubscribeListener();
|
|
1840
1942
|
this._proxy.dispose();
|
|
@@ -2221,6 +2323,28 @@ __decorate([
|
|
|
2221
2323
|
ignoreFromSerialization
|
|
2222
2324
|
], IdCaptureOverlay, "defaultIdLayoutLineStyle", null);
|
|
2223
2325
|
|
|
2326
|
+
class IdCaptureScanner extends DefaultSerializeable {
|
|
2327
|
+
constructor(physicalDocumentScanner, mobileDocumentScanner) {
|
|
2328
|
+
super();
|
|
2329
|
+
this._physicalDocumentScanner = physicalDocumentScanner !== null && physicalDocumentScanner !== void 0 ? physicalDocumentScanner : null;
|
|
2330
|
+
this._mobileDocumentScanner = mobileDocumentScanner !== null && mobileDocumentScanner !== void 0 ? mobileDocumentScanner : null;
|
|
2331
|
+
}
|
|
2332
|
+
get physicalDocument() {
|
|
2333
|
+
return this._physicalDocumentScanner;
|
|
2334
|
+
}
|
|
2335
|
+
get mobileDocument() {
|
|
2336
|
+
return this._mobileDocumentScanner;
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
__decorate([
|
|
2340
|
+
nameForSerialization('physicalDocument'),
|
|
2341
|
+
ignoreFromSerializationIfNull
|
|
2342
|
+
], IdCaptureScanner.prototype, "_physicalDocumentScanner", void 0);
|
|
2343
|
+
__decorate([
|
|
2344
|
+
nameForSerialization('mobileDocument'),
|
|
2345
|
+
ignoreFromSerializationIfNull
|
|
2346
|
+
], IdCaptureScanner.prototype, "_mobileDocumentScanner", void 0);
|
|
2347
|
+
|
|
2224
2348
|
class SingleSideScanner extends DefaultSerializeable {
|
|
2225
2349
|
constructor(barcode, machineReadableZone, visualInspectionZone) {
|
|
2226
2350
|
super();
|
|
@@ -2284,17 +2408,45 @@ __decorate([
|
|
|
2284
2408
|
ignoreFromSerialization
|
|
2285
2409
|
], FullDocumentScanner.prototype, "_visualInspectionZone", void 0);
|
|
2286
2410
|
|
|
2411
|
+
class MobileDocumentScanner extends DefaultSerializeable {
|
|
2412
|
+
constructor(iso180135, ocr, elementsToRetain) {
|
|
2413
|
+
super();
|
|
2414
|
+
this._iso180135 = iso180135;
|
|
2415
|
+
this._ocr = ocr;
|
|
2416
|
+
this._elementsToRetain = elementsToRetain !== null && elementsToRetain !== void 0 ? elementsToRetain : new Set();
|
|
2417
|
+
}
|
|
2418
|
+
get iso180135() {
|
|
2419
|
+
return this._iso180135;
|
|
2420
|
+
}
|
|
2421
|
+
get ocr() {
|
|
2422
|
+
return this._ocr;
|
|
2423
|
+
}
|
|
2424
|
+
get elementsToRetain() {
|
|
2425
|
+
return this._elementsToRetain;
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
__decorate([
|
|
2429
|
+
nameForSerialization('iso18013_5')
|
|
2430
|
+
], MobileDocumentScanner.prototype, "_iso180135", void 0);
|
|
2431
|
+
__decorate([
|
|
2432
|
+
nameForSerialization('ocr')
|
|
2433
|
+
], MobileDocumentScanner.prototype, "_ocr", void 0);
|
|
2434
|
+
__decorate([
|
|
2435
|
+
nameForSerialization('elements_to_retain')
|
|
2436
|
+
], MobileDocumentScanner.prototype, "_elementsToRetain", void 0);
|
|
2437
|
+
|
|
2287
2438
|
class IdCaptureSettings extends DefaultSerializeable {
|
|
2288
2439
|
constructor() {
|
|
2289
2440
|
super();
|
|
2290
2441
|
this.properties = {};
|
|
2291
2442
|
this.imageToResult = {};
|
|
2443
|
+
this.anonymizationMap = {};
|
|
2292
2444
|
this.anonymizationMode = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.anonymizationMode;
|
|
2293
2445
|
this.rejectVoidedIds = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.rejectVoidedIds;
|
|
2294
2446
|
this.decodeBackOfEuropeanDrivingLicense = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.decodeBackOfEuropeanDrivingLicense;
|
|
2295
2447
|
this.acceptedDocuments = [];
|
|
2296
2448
|
this.rejectedDocuments = [];
|
|
2297
|
-
this.
|
|
2449
|
+
this.scanner = new IdCaptureScanner();
|
|
2298
2450
|
this.rejectExpiredIds = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.rejectExpiredIds;
|
|
2299
2451
|
this.rejectIdsExpiringIn = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.rejectIdsExpiringIn;
|
|
2300
2452
|
this.rejectNotRealIdCompliant = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.rejectNotRealIdCompliant;
|
|
@@ -2317,9 +2469,17 @@ class IdCaptureSettings extends DefaultSerializeable {
|
|
|
2317
2469
|
getShouldPassImageTypeToResult(type) {
|
|
2318
2470
|
return this.imageToResult[type] || false;
|
|
2319
2471
|
}
|
|
2472
|
+
addAnonymizedField(document, fieldType) {
|
|
2473
|
+
var _a;
|
|
2474
|
+
const key = JSON.stringify(document);
|
|
2475
|
+
this.anonymizationMap[key] = [...new Set([...((_a = this.anonymizationMap[key]) !== null && _a !== void 0 ? _a : []), fieldType.toString()])];
|
|
2476
|
+
}
|
|
2320
2477
|
}
|
|
2478
|
+
__decorate([
|
|
2479
|
+
nameForSerialization('scannerType')
|
|
2480
|
+
], IdCaptureSettings.prototype, "scanner", void 0);
|
|
2321
2481
|
__decorate([
|
|
2322
2482
|
ignoreFromSerialization
|
|
2323
2483
|
], IdCaptureSettings, "idCaptureDefaults", null);
|
|
2324
2484
|
|
|
2325
|
-
export { AamvaBarcodeVerificationResult, AamvaBarcodeVerificationStatus, BarcodeResult, CapturedId, CapturedSides, DataConsistencyCheck, DataConsistencyResult, DateResult, DriverLicense, DrivingLicenseCategory, DrivingLicenseDetails, Duration, FullDocumentScanner, HealthInsuranceCard, IdAnonymizationMode, IdCapture, IdCaptureController, IdCaptureDocumentType, IdCaptureFeedback, IdCaptureListenerController, IdCaptureListenerEvents, IdCaptureOverlay, IdCaptureOverlayController, IdCaptureRegion, IdCaptureSettings, IdCard, IdFieldType, IdImageType, IdImages, IdLayoutLineStyle, IdLayoutStyle, IdSide, MRZResult, MobileDocumentResult, Passport, ProfessionalDrivingPermit, RegionSpecific, RegionSpecificSubtype, RejectionReason, ResidencePermit, Sex, SingleSideScanner, TextHintPosition, UsRealIdStatus, VIZResult, VehicleRestriction, VerificationResult, VisaIcao, getIdDefaults, loadIdDefaults, parseIdDefaults };
|
|
2485
|
+
export { AamvaBarcodeVerificationResult, AamvaBarcodeVerificationStatus, BarcodeResult, CapturedId, CapturedSides, DataConsistencyCheck, DataConsistencyResult, DateResult, DriverLicense, DrivingLicenseCategory, DrivingLicenseDetails, Duration, FullDocumentScanner, HealthInsuranceCard, IdAnonymizationMode, IdCapture, IdCaptureController, IdCaptureDocumentType, IdCaptureFeedback, IdCaptureListenerController, IdCaptureListenerEvents, IdCaptureOverlay, IdCaptureOverlayController, IdCaptureRegion, IdCaptureScanner, IdCaptureSettings, IdCard, IdFieldType, IdImageType, IdImages, IdLayoutLineStyle, IdLayoutStyle, IdSide, MRZResult, MobileDocumentDataElement, MobileDocumentOCRResult, MobileDocumentResult, MobileDocumentScanner, Passport, ProfessionalDrivingPermit, RegionSpecific, RegionSpecificSubtype, RejectionReason, ResidencePermit, Sex, SingleSideScanner, TextHintPosition, UsRealIdStatus, VIZResult, VehicleRestriction, VerificationResult, VisaIcao, getIdDefaults, loadIdDefaults, parseIdDefaults };
|