@regulaforensics/react-native-document-reader-api 6.6.0 → 6.7.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/index.d.ts CHANGED
@@ -230,6 +230,8 @@ export class DocumentReaderTextField {
230
230
  values?: DocumentReaderValue[]
231
231
  comparisonList?: DocumentReaderComparison[]
232
232
  validityList?: DocumentReaderValidity[]
233
+ comparisonStatus?: number
234
+ validityStatus?: number
233
235
 
234
236
  static fromJson(jsonObject?: any): DocumentReaderTextField | undefined {
235
237
  if (jsonObject == null || jsonObject == undefined) return undefined
@@ -266,6 +268,8 @@ export class DocumentReaderTextField {
266
268
  result.validityList.push(item)
267
269
  }
268
270
  }
271
+ result.comparisonStatus = jsonObject["comparisonStatus"]
272
+ result.validityStatus = jsonObject["validityStatus"]
269
273
 
270
274
  return result
271
275
  }
@@ -447,16 +451,20 @@ export class DocumentReaderDocumentType {
447
451
 
448
452
  export class DocumentReaderNotification {
449
453
  code?: number
450
- attachment?: number
451
454
  value?: number
455
+ notificationCode?: number
456
+ dataFileType?: number
457
+ progress?: number
452
458
 
453
459
  static fromJson(jsonObject?: any): DocumentReaderNotification | undefined {
454
460
  if (jsonObject == null || jsonObject == undefined) return undefined
455
461
  const result = new DocumentReaderNotification
456
462
 
457
463
  result.code = jsonObject["code"]
458
- result.attachment = jsonObject["attachment"]
459
464
  result.value = jsonObject["value"]
465
+ result.notificationCode = jsonObject["notificationCode"]
466
+ result.dataFileType = jsonObject["dataFileType"]
467
+ result.progress = jsonObject["progress"]
460
468
 
461
469
  return result
462
470
  }
@@ -1496,7 +1504,9 @@ export class DocumentReaderValidity {
1496
1504
  }
1497
1505
 
1498
1506
  export class DocumentReaderResults {
1507
+ videoCaptureSessionId?: string
1499
1508
  chipPage?: number
1509
+ irElapsedTime?: number
1500
1510
  processingFinishedStatus?: number
1501
1511
  elapsedTime?: number
1502
1512
  elapsedTimeRFID?: number
@@ -1514,11 +1524,83 @@ export class DocumentReaderResults {
1514
1524
  rfidSessionData?: RFIDSessionData
1515
1525
  authenticityResult?: DocumentReaderAuthenticityResult
1516
1526
  barcodeResult?: DocumentReaderBarcodeResult
1527
+ ppmIn?: number
1517
1528
  documentType?: DocumentReaderDocumentType[]
1518
1529
  status?: DocumentReaderResultsStatus
1519
1530
  vdsncData?: VDSNCData
1520
1531
 
1521
- getTextFieldValueByType({ fieldType, lcid = 0, source = -1, original = false }: { fieldType: number, lcid?: number, source?: number, original?: boolean }): string | undefined {
1532
+
1533
+ static fromJson(jsonObject?: any): DocumentReaderResults | undefined {
1534
+ if (jsonObject == null || jsonObject == undefined) return undefined
1535
+ const result = new DocumentReaderResults
1536
+
1537
+ result.videoCaptureSessionId = jsonObject["videoCaptureSessionId"]
1538
+ result.chipPage = jsonObject["chipPage"]
1539
+ result.irElapsedTime = jsonObject["irElapsedTime"]
1540
+ result.processingFinishedStatus = jsonObject["processingFinishedStatus"]
1541
+ result.elapsedTime = jsonObject["elapsedTime"]
1542
+ result.elapsedTimeRFID = jsonObject["elapsedTimeRFID"]
1543
+ result.morePagesAvailable = jsonObject["morePagesAvailable"]
1544
+ result.rfidResult = jsonObject["rfidResult"]
1545
+ result.highResolution = jsonObject["highResolution"]
1546
+ result.graphicResult = DocumentReaderGraphicResult.fromJson(jsonObject["graphicResult"])
1547
+ result.textResult = DocumentReaderTextResult.fromJson(jsonObject["textResult"])
1548
+ result.documentPosition = []
1549
+ if (jsonObject["documentPosition"] != null) {
1550
+ for (const i in jsonObject["documentPosition"]) {
1551
+ const item = ElementPosition.fromJson(jsonObject["documentPosition"][i])
1552
+ if (item != undefined)
1553
+ result.documentPosition.push(item)
1554
+ }
1555
+ }
1556
+ result.barcodePosition = []
1557
+ if (jsonObject["barcodePosition"] != null) {
1558
+ for (const i in jsonObject["barcodePosition"]) {
1559
+ const item = ElementPosition.fromJson(jsonObject["barcodePosition"][i])
1560
+ if (item != undefined)
1561
+ result.barcodePosition.push(item)
1562
+ }
1563
+ }
1564
+ result.mrzPosition = []
1565
+ if (jsonObject["mrzPosition"] != null) {
1566
+ for (const i in jsonObject["mrzPosition"]) {
1567
+ const item = ElementPosition.fromJson(jsonObject["mrzPosition"][i])
1568
+ if (item != undefined)
1569
+ result.mrzPosition.push(item)
1570
+ }
1571
+ }
1572
+ result.imageQuality = []
1573
+ if (jsonObject["imageQuality"] != null) {
1574
+ for (const i in jsonObject["imageQuality"]) {
1575
+ const item = ImageQualityGroup.fromJson(jsonObject["imageQuality"][i])
1576
+ if (item != undefined)
1577
+ result.imageQuality.push(item)
1578
+ }
1579
+ }
1580
+ result.rawResult = jsonObject["rawResult"]
1581
+ result.documentReaderNotification = DocumentReaderNotification.fromJson(jsonObject["documentReaderNotification"])
1582
+ result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"])
1583
+ result.authenticityResult = DocumentReaderAuthenticityResult.fromJson(jsonObject["authenticityResult"])
1584
+ result.barcodeResult = DocumentReaderBarcodeResult.fromJson(jsonObject["barcodeResult"])
1585
+ result.ppmIn = jsonObject["ppmIn"]
1586
+ result.documentType = []
1587
+ if (jsonObject["documentType"] != null) {
1588
+ for (const i in jsonObject["documentType"]) {
1589
+ const item = DocumentReaderDocumentType.fromJson(jsonObject["documentType"][i])
1590
+ if (item != undefined)
1591
+ result.documentType.push(item)
1592
+ }
1593
+ }
1594
+ result.status = DocumentReaderResultsStatus.fromJson(jsonObject["status"])
1595
+ result.vdsncData = VDSNCData.fromJson(jsonObject["vdsncData"])
1596
+
1597
+ return result
1598
+ }
1599
+
1600
+ /**
1601
+ * @deprecated Use textFieldValueBy...()
1602
+ */
1603
+ getTextFieldValueByType({ fieldType, lcid = 0, source = -1, original = false }: { fieldType: number, lcid?: number, source?: number, original?: boolean }): string | undefined {
1522
1604
  if (this.textResult == undefined) return undefined
1523
1605
  const field = this.findByTypeAndLcid(fieldType, lcid)
1524
1606
  if (field == undefined) return undefined
@@ -1527,6 +1609,9 @@ export class DocumentReaderResults {
1527
1609
  return original ? value.originalValue : value.value
1528
1610
  }
1529
1611
 
1612
+ /**
1613
+ * @deprecated
1614
+ */
1530
1615
  getTextFieldStatusByType(fieldType: number, lcid?: number): number {
1531
1616
  if (this.textResult == undefined) return 0
1532
1617
  const field = this.findByTypeAndLcid(fieldType, lcid)
@@ -1535,6 +1620,9 @@ export class DocumentReaderResults {
1535
1620
  return 0
1536
1621
  }
1537
1622
 
1623
+ /**
1624
+ * @deprecated Use graphicFieldImageBy...()
1625
+ */
1538
1626
  getGraphicFieldImageByType({ fieldType, source = -1, light = -1, pageIndex = -1 }: { fieldType: number, source?: number, light?: number, pageIndex?: number }): string | undefined {
1539
1627
  if (this.graphicResult == undefined || this.graphicResult.fields == undefined) return undefined
1540
1628
  const foundFields: DocumentReaderGraphicField[] = []
@@ -1558,6 +1646,9 @@ export class DocumentReaderResults {
1558
1646
  return foundFields.length > 0 ? foundFields[0].value : undefined
1559
1647
  }
1560
1648
 
1649
+ /**
1650
+ * @deprecated
1651
+ */
1561
1652
  getQualityResult({ imageQualityCheckType, securityFeature = -1, pageIndex = 0 }: { imageQualityCheckType: number, securityFeature?: number, pageIndex?: number }): number {
1562
1653
  let resultSum = 2
1563
1654
  if (this.imageQuality == undefined)
@@ -1588,6 +1679,9 @@ export class DocumentReaderResults {
1588
1679
  return resultSum
1589
1680
  }
1590
1681
 
1682
+ /**
1683
+ * @deprecated
1684
+ */
1591
1685
  findByTypeAndLcid(type: number, lcid?: number): DocumentReaderTextField | undefined {
1592
1686
  if (this.textResult == undefined || this.textResult.fields == undefined) return undefined
1593
1687
  let field
@@ -1612,6 +1706,9 @@ export class DocumentReaderResults {
1612
1706
  return foundField
1613
1707
  }
1614
1708
 
1709
+ /**
1710
+ * @deprecated
1711
+ */
1615
1712
  findBySource(field: DocumentReaderTextField, sourceType: number): DocumentReaderValue | undefined {
1616
1713
  let value
1617
1714
  if (sourceType === -1) {
@@ -1632,6 +1729,9 @@ export class DocumentReaderResults {
1632
1729
  return undefined
1633
1730
  }
1634
1731
 
1732
+ /**
1733
+ * @deprecated Use containers()
1734
+ */
1635
1735
  getContainers(resultTypes: number[]): string | undefined {
1636
1736
  try {
1637
1737
  if(this.rawResult == undefined) return undefined
@@ -1658,6 +1758,9 @@ export class DocumentReaderResults {
1658
1758
  }
1659
1759
  }
1660
1760
 
1761
+ /**
1762
+ * @deprecated Use encryptedContainers()
1763
+ */
1661
1764
  getEncryptedContainers(): string | undefined {
1662
1765
  return this.getContainers([
1663
1766
  eRPRM_ResultType.RPRM_RESULT_TYPE_INTERNAL_RFID_SESSION,
@@ -1666,69 +1769,23 @@ export class DocumentReaderResults {
1666
1769
  ])
1667
1770
  }
1668
1771
 
1669
- static fromJson(jsonObject?: any): DocumentReaderResults | undefined {
1670
- if (jsonObject == null || jsonObject == undefined) return undefined
1671
- const result = new DocumentReaderResults
1672
-
1673
- result.chipPage = jsonObject["chipPage"]
1674
- result.processingFinishedStatus = jsonObject["processingFinishedStatus"]
1675
- result.elapsedTime = jsonObject["elapsedTime"]
1676
- result.elapsedTimeRFID = jsonObject["elapsedTimeRFID"]
1677
- result.morePagesAvailable = jsonObject["morePagesAvailable"]
1678
- result.rfidResult = jsonObject["rfidResult"]
1679
- result.highResolution = jsonObject["highResolution"]
1680
- result.graphicResult = DocumentReaderGraphicResult.fromJson(jsonObject["graphicResult"])
1681
- result.textResult = DocumentReaderTextResult.fromJson(jsonObject["textResult"])
1682
- result.documentPosition = []
1683
- if (jsonObject["documentPosition"] != null) {
1684
- for (const i in jsonObject["documentPosition"]) {
1685
- const item = ElementPosition.fromJson(jsonObject["documentPosition"][i])
1686
- if (item != undefined)
1687
- result.documentPosition.push(item)
1688
- }
1689
- }
1690
- result.barcodePosition = []
1691
- if (jsonObject["barcodePosition"] != null) {
1692
- for (const i in jsonObject["barcodePosition"]) {
1693
- const item = ElementPosition.fromJson(jsonObject["barcodePosition"][i])
1694
- if (item != undefined)
1695
- result.barcodePosition.push(item)
1696
- }
1697
- }
1698
- result.mrzPosition = []
1699
- if (jsonObject["mrzPosition"] != null) {
1700
- for (const i in jsonObject["mrzPosition"]) {
1701
- const item = ElementPosition.fromJson(jsonObject["mrzPosition"][i])
1702
- if (item != undefined)
1703
- result.mrzPosition.push(item)
1704
- }
1705
- }
1706
- result.imageQuality = []
1707
- if (jsonObject["imageQuality"] != null) {
1708
- for (const i in jsonObject["imageQuality"]) {
1709
- const item = ImageQualityGroup.fromJson(jsonObject["imageQuality"][i])
1710
- if (item != undefined)
1711
- result.imageQuality.push(item)
1712
- }
1713
- }
1714
- result.rawResult = jsonObject["rawResult"]
1715
- result.documentReaderNotification = DocumentReaderNotification.fromJson(jsonObject["documentReaderNotification"])
1716
- result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"])
1717
- result.authenticityResult = DocumentReaderAuthenticityResult.fromJson(jsonObject["authenticityResult"])
1718
- result.barcodeResult = DocumentReaderBarcodeResult.fromJson(jsonObject["barcodeResult"])
1719
- result.documentType = []
1720
- if (jsonObject["documentType"] != null) {
1721
- for (const i in jsonObject["documentType"]) {
1722
- const item = DocumentReaderDocumentType.fromJson(jsonObject["documentType"][i])
1723
- if (item != undefined)
1724
- result.documentType.push(item)
1725
- }
1726
- }
1727
- result.status = DocumentReaderResultsStatus.fromJson(jsonObject["status"])
1728
- result.vdsncData = VDSNCData.fromJson(jsonObject["vdsncData"])
1729
-
1730
- return result
1731
- }
1772
+ textFieldValueByType(fieldType: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1773
+ textFieldValueByTypeLcid(fieldType: number, lcid: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1774
+ textFieldValueByTypeSource(fieldType: number, source: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1775
+ textFieldValueByTypeLcidSource(fieldType: number, lcid: number, source: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1776
+ textFieldValueByTypeSourceOriginal(fieldType: number, source: number, original: boolean, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1777
+ textFieldValueByTypeLcidSourceOriginal(fieldType: number, lcid: number, source: number, original: boolean, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1778
+ textFieldByType(fieldType: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1779
+ textFieldByTypeLcid(fieldType: number, lcid: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1780
+ graphicFieldByTypeSource(fieldType: number, source: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1781
+ graphicFieldByTypeSourcePageIndex(fieldType: number, source: number, pageIndex: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1782
+ graphicFieldByTypeSourcePageIndexLight(fieldType: number, source: number, pageIndex: number, light: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1783
+ graphicFieldImageByType(fieldType: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1784
+ graphicFieldImageByTypeSource(fieldType: number, source: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1785
+ graphicFieldImageByTypeSourcePageIndex(fieldType: number, source: number, pageIndex: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1786
+ graphicFieldImageByTypeSourcePageIndexLight(fieldType: number, source: number, pageIndex: number, light: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1787
+ containers(resultType: number[], successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1788
+ encryptedContainers(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void;
1732
1789
  }
1733
1790
 
1734
1791
  export const FontStyle = {
@@ -2548,6 +2605,7 @@ export const eRPRM_ResultType = {
2548
2605
  RPRM_RESULT_TYPE_INTERNAL_RFID_SESSION: 48,
2549
2606
  RPRM_RESULT_TYPE_INTERNAL_ENCRYPTED_RCL: 49,
2550
2607
  RPRM_RESULT_TYPE_INTERNAL_LICENSE: 50,
2608
+ RPRM_RESULT_TYPE_TEXT: 36,
2551
2609
  RPRM_RESULT_TYPE_IMAGES: 37,
2552
2610
  RPRM_RESULT_TYPE_HOLO_PARAMS: 47,
2553
2611
  RPRM_RESULT_TYPE_DOCUMENT_POSITION: 85,
@@ -2588,17 +2646,17 @@ export const eRPRM_FieldVerificationResult = {
2588
2646
  }
2589
2647
 
2590
2648
  export const DocReaderAction = {
2591
- COMPLETE: 1,
2592
- PROCESS: 0,
2593
- CANCEL: 2,
2594
- ERROR: 3,
2595
- NOTIFICATION: 5,
2596
- PROCESS_WHITE_UV_IMAGES: 6,
2597
- PROCESS_WHITE_FLASHLIGHT: 7,
2598
- MORE_PAGES_AVAILABLE: 8,
2599
- PROCESS_IR_FRAME: 9,
2600
- TIMEOUT: 10,
2601
- PROCESSING_ON_SERVICE: 11,
2649
+ COMPLETE: 0,
2650
+ PROCESS: 1,
2651
+ MORE_PAGES_AVAILABLE: 2,
2652
+ CANCEL: 3,
2653
+ ERROR: 4,
2654
+ PROCESS_WHITE_FLASHLIGHT: 5,
2655
+ TIMEOUT: 6,
2656
+ PROCESSING_ON_SERVICE: 7,
2657
+ NOTIFICATION: 101,
2658
+ PROCESS_WHITE_UV_IMAGES: 102,
2659
+ PROCESS_IR_FRAME: 103,
2602
2660
  }
2603
2661
 
2604
2662
  export const eProcessGLCommands = {
@@ -2889,6 +2947,13 @@ export const RFIDDelegate = {
2889
2947
  FULL: 2,
2890
2948
  }
2891
2949
 
2950
+ export const TextProcessing = {
2951
+ ocNoChange: 0,
2952
+ ocUppercase: 1,
2953
+ ocLowercase: 2,
2954
+ ocCapital: 3,
2955
+ }
2956
+
2892
2957
  export const ProcessingFinishedStatus = {
2893
2958
  NOT_READY: 0,
2894
2959
  READY: 1,
@@ -3588,6 +3653,31 @@ export const eImageQualityCheckType = {
3588
3653
  IQC_SCREEN_CAPTURE: 6,
3589
3654
  IQC_PORTRAIT: 7,
3590
3655
  IQC_HANDWRITTEN: 8,
3656
+
3657
+ getTranslation(value: number) {
3658
+ switch (value) {
3659
+ case this.IQC_IMAGE_GLARES:
3660
+ return "Glares"
3661
+ case this.IQC_IMAGE_FOCUS:
3662
+ return "Focus"
3663
+ case this.IQC_IMAGE_RESOLUTION:
3664
+ return "Resolution"
3665
+ case this.IQC_IMAGE_COLORNESS:
3666
+ return "Color"
3667
+ case this.IQC_PERSPECTIVE:
3668
+ return "Perspective angle"
3669
+ case this.IQC_BOUNDS:
3670
+ return "Bounds"
3671
+ case this.IQC_SCREEN_CAPTURE:
3672
+ return "Moire pattern"
3673
+ case this.IQC_PORTRAIT:
3674
+ return "Portrait"
3675
+ case this.IQC_HANDWRITTEN:
3676
+ return "Handwritten"
3677
+ default:
3678
+ return value.toString()
3679
+ }
3680
+ }
3591
3681
  }
3592
3682
 
3593
3683
  export const MRZFormat = {
@@ -3996,6 +4086,10 @@ export const eGraphicFieldType = {
3996
4086
  }
3997
4087
  }
3998
4088
 
4089
+ export const RegDeviceConfigType = {
4090
+ DEVICE_7310: 1,
4091
+ }
4092
+
3999
4093
  export const CameraMode = {
4000
4094
  AUTO: 0,
4001
4095
  CAMERA1: 1,
@@ -4142,7 +4236,7 @@ export const eRFID_DataFile_Type = {
4142
4236
  case this.DFT_PASSPORT_DG5:
4143
4237
  return "Portrait(s) (DG5)"
4144
4238
  case this.DFT_ID_DG5:
4145
- return "Surname/given name at birth" + " (DG5)"
4239
+ return "Family name" + " (DG5)"
4146
4240
  case this.DFT_DL_DG5:
4147
4241
  return "Signature / usual mark image (DG5)"
4148
4242
  case this.DFT_PASSPORT_DG6:
@@ -4874,6 +4968,12 @@ export const eVisualFieldType = {
4874
4968
  FT_THIRD_NAME: 648,
4875
4969
  FT_FOURTH_NAME: 649,
4876
4970
  FT_LAST_NAME: 650,
4971
+ FT_DLCLASSCODE_RM_FROM: 651,
4972
+ FT_DLCLASSCODE_RM_NOTES: 652,
4973
+ FT_DLCLASSCODE_RM_TO: 653,
4974
+ FT_DLCLASSCODE_PW_FROM: 654,
4975
+ FT_DLCLASSCODE_PW_NOTES: 655,
4976
+ FT_DLCLASSCODE_PW_TO: 656,
4877
4977
 
4878
4978
  getTranslation(value: number) {
4879
4979
  switch (value) {
@@ -5130,7 +5230,7 @@ export const eVisualFieldType = {
5130
5230
  case this.FT_JURISDICTION_RESTRICTION_CODE:
5131
5231
  return "Jurisdiction restriction code"
5132
5232
  case this.FT_FAMILY_NAME:
5133
- return "Surname/given name at birth"
5233
+ return "Family name"
5134
5234
  case this.FT_GIVEN_NAMES_RUS:
5135
5235
  return "Given name (National)"
5136
5236
  case this.FT_VISA_ID_RUS:
@@ -6077,6 +6177,18 @@ export const eVisualFieldType = {
6077
6177
  return "Fourth name"
6078
6178
  case this.FT_LAST_NAME:
6079
6179
  return "Last name"
6180
+ case this.FT_DLCLASSCODE_PW_FROM:
6181
+ return "DL class code PW valid from"
6182
+ case this.FT_DLCLASSCODE_PW_NOTES:
6183
+ return "DL class code PW notes"
6184
+ case this.FT_DLCLASSCODE_PW_TO:
6185
+ return "DL class code PW valid to"
6186
+ case this.FT_DLCLASSCODE_RM_FROM:
6187
+ return "DL class code RM valid from"
6188
+ case this.FT_DLCLASSCODE_RM_NOTES:
6189
+ return "DL class code RM notes"
6190
+ case this.FT_DLCLASSCODE_RM_TO:
6191
+ return "DL class code RM valid to"
6080
6192
  default:
6081
6193
  return value.toString()
6082
6194
  }
@@ -6679,6 +6791,7 @@ export const Enum = {
6679
6791
  eSignManagementAction,
6680
6792
  eCheckDiagnose,
6681
6793
  RFIDDelegate,
6794
+ TextProcessing,
6682
6795
  ProcessingFinishedStatus,
6683
6796
  DocFormat,
6684
6797
  eLDS_ParsingNotificationCodes,
@@ -6693,6 +6806,7 @@ export const Enum = {
6693
6806
  eRequestCommand,
6694
6807
  ImageFormat,
6695
6808
  eGraphicFieldType,
6809
+ RegDeviceConfigType,
6696
6810
  CameraMode,
6697
6811
  CaptureMode,
6698
6812
  eCheckResult,