@regulaforensics/document-reader 9.2.553-nightly → 9.2.555-nightly

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.
Files changed (32) hide show
  1. package/RNDocumentReader.podspec +2 -2
  2. package/android/build.gradle +2 -2
  3. package/android/cordova.gradle +2 -2
  4. package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +1 -1
  5. package/examples/capacitor/package.json +1 -1
  6. package/examples/ionic/package-lock.json +489 -436
  7. package/examples/ionic/package.json +1 -1
  8. package/examples/react_native/package.json +1 -1
  9. package/ios/RGLWJSONConstructor.m +3 -6
  10. package/ios/RGLWMain.m +22 -16
  11. package/package.json +1 -1
  12. package/plugin.xml +2 -2
  13. package/test/package-lock.json +1 -1
  14. package/www/capacitor/index.js +5 -5
  15. package/www/cordova.js +1218 -1218
  16. package/www/react-native/index.js +5 -5
  17. package/www/types/index.d.ts +5 -5
  18. /package/www/capacitor/{mdl → engagement}/DataRetrieval.js +0 -0
  19. /package/www/capacitor/{mdl → engagement}/DeviceEngagement.js +0 -0
  20. /package/www/capacitor/{mdl → engagement}/DeviceRetrievalMethod.js +0 -0
  21. /package/www/capacitor/{mdl → engagement}/DocumentRequestMDL.js +0 -0
  22. /package/www/capacitor/{mdl → engagement}/NameSpaceMDL.js +0 -0
  23. /package/www/react-native/{mdl → engagement}/DataRetrieval.js +0 -0
  24. /package/www/react-native/{mdl → engagement}/DeviceEngagement.js +0 -0
  25. /package/www/react-native/{mdl → engagement}/DeviceRetrievalMethod.js +0 -0
  26. /package/www/react-native/{mdl → engagement}/DocumentRequestMDL.js +0 -0
  27. /package/www/react-native/{mdl → engagement}/NameSpaceMDL.js +0 -0
  28. /package/www/types/{mdl → engagement}/DataRetrieval.d.ts +0 -0
  29. /package/www/types/{mdl → engagement}/DeviceEngagement.d.ts +0 -0
  30. /package/www/types/{mdl → engagement}/DeviceRetrievalMethod.d.ts +0 -0
  31. /package/www/types/{mdl → engagement}/DocumentRequestMDL.d.ts +0 -0
  32. /package/www/types/{mdl → engagement}/NameSpaceMDL.d.ts +0 -0
package/www/cordova.js CHANGED
@@ -398,6 +398,457 @@ class ScannerConfig {
398
398
  }
399
399
 
400
400
 
401
+ /***/ },
402
+
403
+ /***/ "./src/engagement/DataRetrieval.js"
404
+ /*!*****************************************!*\
405
+ !*** ./src/engagement/DataRetrieval.js ***!
406
+ \*****************************************/
407
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
408
+
409
+ __webpack_require__.r(__webpack_exports__);
410
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
411
+ /* harmony export */ DataRetrieval: () => (/* binding */ DataRetrieval),
412
+ /* harmony export */ MDLDeviceRetrieval: () => (/* binding */ MDLDeviceRetrieval),
413
+ /* harmony export */ MDLDocRequestPreset: () => (/* binding */ MDLDocRequestPreset)
414
+ /* harmony export */ });
415
+ /* harmony import */ var _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NameSpaceMDL */ "./src/engagement/NameSpaceMDL.js");
416
+ /* harmony import */ var _DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DocumentRequestMDL */ "./src/engagement/DocumentRequestMDL.js");
417
+
418
+
419
+
420
+ class DataRetrieval {
421
+ deviceRetrieval
422
+ docRequestPreset
423
+ intentToRetain = _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.MDLIntentToRetain.FALSE
424
+ requests = []
425
+
426
+ constructor(deviceRetrieval) {
427
+ this.deviceRetrieval = deviceRetrieval
428
+ }
429
+
430
+ setDocRequestPreset(docRequestPreset, intentToRetain) {
431
+ this.docRequestPreset = docRequestPreset
432
+ this.intentToRetain = intentToRetain
433
+ }
434
+
435
+ addDocRequest(request) {
436
+ this.requests.push(request);
437
+ }
438
+
439
+ static fromJson(jsonObject) {
440
+ if (jsonObject == null) return null
441
+ const result = new DataRetrieval(jsonObject["deviceRetrieval"])
442
+
443
+ result.docRequestPreset = jsonObject["docRequestPreset"]
444
+ result.intentToRetain = jsonObject["intentToRetain"]
445
+ result.requests = (jsonObject["requests"]).map(item => _DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_1__.DocumentRequestMDL.fromJson(item));
446
+
447
+ return result
448
+ }
449
+
450
+ toJson() {
451
+ return {
452
+ "deviceRetrieval": this.deviceRetrieval,
453
+ "docRequestPreset": this.docRequestPreset,
454
+ "intentToRetain": this.intentToRetain,
455
+ "requests": this.requests.map(item => item.toJson())
456
+ }
457
+ }
458
+ }
459
+
460
+ const MDLDocRequestPreset = {
461
+ ALL: 0,
462
+ AGE: 1,
463
+ STANDARD_ID: 2,
464
+ TRAVEL: 3,
465
+ DRIVERS_LICENSE: 4,
466
+ }
467
+
468
+ const MDLDeviceRetrieval = {
469
+ NFC: 1,
470
+ BLE: 2,
471
+ }
472
+
473
+
474
+ /***/ },
475
+
476
+ /***/ "./src/engagement/DeviceEngagement.js"
477
+ /*!********************************************!*\
478
+ !*** ./src/engagement/DeviceEngagement.js ***!
479
+ \********************************************/
480
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
481
+
482
+ __webpack_require__.r(__webpack_exports__);
483
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
484
+ /* harmony export */ DeviceEngagement: () => (/* binding */ DeviceEngagement),
485
+ /* harmony export */ MDLDeviceEngagement: () => (/* binding */ MDLDeviceEngagement)
486
+ /* harmony export */ });
487
+ /* harmony import */ var _DeviceRetrievalMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DeviceRetrievalMethod */ "./src/engagement/DeviceRetrievalMethod.js");
488
+
489
+
490
+ class DeviceEngagement {
491
+ deviceRetrievalMethods = []
492
+
493
+ static fromJson(jsonObject) {
494
+ if (jsonObject == null) return null
495
+ const result = new DeviceEngagement()
496
+
497
+ for (var item of jsonObject["deviceRetrievalMethods"]) {
498
+ item = _DeviceRetrievalMethod__WEBPACK_IMPORTED_MODULE_0__.DeviceRetrievalMethod.fromJson(item);
499
+ if (item != null) {
500
+ result.deviceRetrievalMethods.push(item);
501
+ }
502
+ }
503
+
504
+ return result
505
+ }
506
+
507
+ toJson() {
508
+ return {
509
+ "deviceRetrievalMethods": this.deviceRetrievalMethods.map(e => e.toJson()),
510
+ }
511
+ }
512
+ }
513
+
514
+ const MDLDeviceEngagement = {
515
+ QR: 0,
516
+ NFC: 1,
517
+ }
518
+
519
+
520
+ /***/ },
521
+
522
+ /***/ "./src/engagement/DeviceRetrievalMethod.js"
523
+ /*!*************************************************!*\
524
+ !*** ./src/engagement/DeviceRetrievalMethod.js ***!
525
+ \*************************************************/
526
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
527
+
528
+ __webpack_require__.r(__webpack_exports__);
529
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
530
+ /* harmony export */ DeviceRetrievalMethod: () => (/* binding */ DeviceRetrievalMethod)
531
+ /* harmony export */ });
532
+ /* harmony import */ var _DataRetrieval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataRetrieval */ "./src/engagement/DataRetrieval.js");
533
+
534
+
535
+ class DeviceRetrievalMethod {
536
+ type
537
+ version
538
+ cmdMaxLength
539
+ respMaxLength
540
+ clientModeSupport
541
+ clientModeUUID
542
+ serverModeSupport
543
+ serverModeUUID
544
+
545
+ static fromJson(jsonObject) {
546
+ if (jsonObject == null) return null
547
+ const result = new DeviceRetrievalMethod()
548
+
549
+ result.type = jsonObject["type"]
550
+ result.version = jsonObject["version"]
551
+ result.cmdMaxLength = jsonObject["cmdMaxLength"]
552
+ result.respMaxLength = jsonObject["respMaxLength"]
553
+ result.clientModeSupport = jsonObject["clientModeSupport"]
554
+ result.clientModeUUID = jsonObject["clientModeUUID"]
555
+ result.serverModeSupport = jsonObject["serverModeSupport"]
556
+ result.serverModeUUID = jsonObject["serverModeUUID"]
557
+
558
+ return result
559
+ }
560
+
561
+ toJson() {
562
+ return {
563
+ "type": this.type,
564
+ "version": this.version,
565
+ "cmdMaxLength": this.cmdMaxLength,
566
+ "respMaxLength": this.respMaxLength,
567
+ "clientModeSupport": this.clientModeSupport,
568
+ "clientModeUUID": this.clientModeUUID,
569
+ "serverModeSupport": this.serverModeSupport,
570
+ "serverModeUUID": this.serverModeUUID,
571
+ }
572
+ }
573
+ }
574
+
575
+
576
+ /***/ },
577
+
578
+ /***/ "./src/engagement/DocumentRequestMDL.js"
579
+ /*!**********************************************!*\
580
+ !*** ./src/engagement/DocumentRequestMDL.js ***!
581
+ \**********************************************/
582
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
583
+
584
+ __webpack_require__.r(__webpack_exports__);
585
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
586
+ /* harmony export */ DocumentRequest18013MDL: () => (/* binding */ DocumentRequest18013MDL),
587
+ /* harmony export */ DocumentRequestMDL: () => (/* binding */ DocumentRequestMDL)
588
+ /* harmony export */ });
589
+ /* harmony import */ var _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NameSpaceMDL */ "./src/engagement/NameSpaceMDL.js");
590
+
591
+
592
+ class DocumentRequestMDL {
593
+ docType
594
+ namespaces = []
595
+
596
+ constructor(docType) {
597
+ this.docType = docType
598
+ }
599
+
600
+ addNameSpace(namespace) {
601
+ this.namespaces.push(namespace);
602
+ }
603
+
604
+ static fromJson(jsonObject) {
605
+ if (jsonObject == null) return null;
606
+ var docType = jsonObject["docType"];
607
+ if (docType == "org.iso.18013.5.1.mDL") {
608
+ return DocumentRequest18013MDL.fromJson(jsonObject);
609
+ }
610
+ var result = new DocumentRequestMDL(docType);
611
+
612
+ result.namespaces = (jsonObject["namespaces"]).map(item => _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.NameSpaceMDL.fromJson(item));
613
+
614
+ return result;
615
+ }
616
+
617
+ toJson() {
618
+ return {
619
+ "docType": this.docType,
620
+ "namespaces": this.namespaces.map(item => item.toJson())
621
+ }
622
+ }
623
+ }
624
+
625
+ class DocumentRequest18013MDL extends DocumentRequestMDL {
626
+ familyName
627
+ givenName
628
+ birthDate
629
+ issueDate
630
+ expiryDate
631
+ issuingCountry
632
+ issuingAuthority
633
+ documentNumber
634
+ portrait
635
+ drivingPrivileges
636
+ unDistinguishingSign
637
+ administrativeNumber
638
+ sex
639
+ height
640
+ weight
641
+ eyeColour
642
+ hairColour
643
+ birthPlace
644
+ residentAddress
645
+ portraitCaptureDate
646
+ ageInYears
647
+ ageBirthYear
648
+ ageOver18
649
+ issuingJurisdiction
650
+ nationality
651
+ residentCity
652
+ residentState
653
+ residentPostalCode
654
+ residentCountry
655
+ biometricTemplateFace
656
+ biometricTemplateIris
657
+ biometricTemplateFinger
658
+ biometricTemplateSignatureSign
659
+ familyNameNationalCharacter
660
+ givenNameNationalCharacter
661
+ signatureUsualMark
662
+
663
+ constructor() {
664
+ super("org.iso.18013.5.1.mDL")
665
+ }
666
+
667
+ disableIntentToRetainValues() {
668
+ this.setAll(_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.MDLIntentToRetain.FALSE);
669
+ }
670
+
671
+ enableIntentToRetainValues() {
672
+ this.setAll(_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.MDLIntentToRetain.TRUE);
673
+ }
674
+
675
+ setAll(value) {
676
+ this.familyName = value;
677
+ this.givenName = value;
678
+ this.birthDate = value;
679
+ this.issueDate = value;
680
+ this.expiryDate = value;
681
+ this.issuingCountry = value;
682
+ this.issuingAuthority = value;
683
+ this.documentNumber = value;
684
+ this.portrait = value;
685
+ this.drivingPrivileges = value;
686
+ this.unDistinguishingSign = value;
687
+ this.administrativeNumber = value;
688
+ this.sex = value;
689
+ this.height = value;
690
+ this.weight = value;
691
+ this.eyeColour = value;
692
+ this.hairColour = value;
693
+ this.birthPlace = value;
694
+ this.residentAddress = value;
695
+ this.portraitCaptureDate = value;
696
+ this.ageInYears = value;
697
+ this.ageBirthYear = value;
698
+ this.ageOver18 = value;
699
+ this.issuingJurisdiction = value;
700
+ this.nationality = value;
701
+ this.residentCity = value;
702
+ this.residentState = value;
703
+ this.residentPostalCode = value;
704
+ this.residentCountry = value;
705
+ this.biometricTemplateFace = value;
706
+ this.biometricTemplateIris = value;
707
+ this.biometricTemplateFinger = value;
708
+ this.biometricTemplateSignatureSign = value;
709
+ this.familyNameNationalCharacter = value;
710
+ this.givenNameNationalCharacter = value;
711
+ this.signatureUsualMark = value;
712
+ }
713
+
714
+ static fromJson(jsonObject) {
715
+ if (jsonObject == null) return null
716
+ const result = new DocumentRequest18013MDL()
717
+
718
+ result.namespaces = (jsonObject["namespaces"]).map(item => _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.NameSpaceMDL.fromJson(item));
719
+ result.familyName = jsonObject["familyName"]
720
+ result.givenName = jsonObject["givenName"]
721
+ result.birthDate = jsonObject["birthDate"]
722
+ result.issueDate = jsonObject["issueDate"]
723
+ result.expiryDate = jsonObject["expiryDate"]
724
+ result.issuingCountry = jsonObject["issuingCountry"]
725
+ result.issuingAuthority = jsonObject["issuingAuthority"]
726
+ result.documentNumber = jsonObject["documentNumber"]
727
+ result.portrait = jsonObject["portrait"]
728
+ result.drivingPrivileges = jsonObject["drivingPrivileges"]
729
+ result.unDistinguishingSign = jsonObject["unDistinguishingSign"]
730
+ result.administrativeNumber = jsonObject["administrativeNumber"]
731
+ result.sex = jsonObject["sex"]
732
+ result.height = jsonObject["height"]
733
+ result.weight = jsonObject["weight"]
734
+ result.eyeColour = jsonObject["eyeColour"]
735
+ result.hairColour = jsonObject["hairColour"]
736
+ result.birthPlace = jsonObject["birthPlace"]
737
+ result.residentAddress = jsonObject["residentAddress"]
738
+ result.portraitCaptureDate = jsonObject["portraitCaptureDate"]
739
+ result.ageInYears = jsonObject["ageInYears"]
740
+ result.ageBirthYear = jsonObject["ageBirthYear"]
741
+ result.ageOver18 = jsonObject["ageOver18"]
742
+ result.issuingJurisdiction = jsonObject["issuingJurisdiction"]
743
+ result.nationality = jsonObject["nationality"]
744
+ result.residentCity = jsonObject["residentCity"]
745
+ result.residentState = jsonObject["residentState"]
746
+ result.residentPostalCode = jsonObject["residentPostalCode"]
747
+ result.residentCountry = jsonObject["residentCountry"]
748
+ result.biometricTemplateFace = jsonObject["biometricTemplateFace"]
749
+ result.biometricTemplateIris = jsonObject["biometricTemplateIris"]
750
+ result.biometricTemplateFinger = jsonObject["biometricTemplateFinger"]
751
+ result.biometricTemplateSignatureSign = jsonObject["biometricTemplateSignatureSign"]
752
+ result.familyNameNationalCharacter = jsonObject["familyNameNationalCharacter"]
753
+ result.givenNameNationalCharacter = jsonObject["givenNameNationalCharacter"]
754
+ result.signatureUsualMark = jsonObject["signatureUsualMark"]
755
+
756
+ return result
757
+ }
758
+
759
+ toJson() {
760
+ return {
761
+ "docType": this.docType,
762
+ "namespaces": this.namespaces.map(item => item.toJson()),
763
+ "familyName": this.familyName,
764
+ "givenName": this.givenName,
765
+ "birthDate": this.birthDate,
766
+ "issueDate": this.issueDate,
767
+ "expiryDate": this.expiryDate,
768
+ "issuingCountry": this.issuingCountry,
769
+ "issuingAuthority": this.issuingAuthority,
770
+ "documentNumber": this.documentNumber,
771
+ "portrait": this.portrait,
772
+ "drivingPrivileges": this.drivingPrivileges,
773
+ "unDistinguishingSign": this.unDistinguishingSign,
774
+ "administrativeNumber": this.administrativeNumber,
775
+ "sex": this.sex,
776
+ "height": this.height,
777
+ "weight": this.weight,
778
+ "eyeColour": this.eyeColour,
779
+ "hairColour": this.hairColour,
780
+ "birthPlace": this.birthPlace,
781
+ "residentAddress": this.residentAddress,
782
+ "portraitCaptureDate": this.portraitCaptureDate,
783
+ "ageInYears": this.ageInYears,
784
+ "ageBirthYear": this.ageBirthYear,
785
+ "ageOver18": this.ageOver18,
786
+ "issuingJurisdiction": this.issuingJurisdiction,
787
+ "nationality": this.nationality,
788
+ "residentCity": this.residentCity,
789
+ "residentState": this.residentState,
790
+ "residentPostalCode": this.residentPostalCode,
791
+ "residentCountry": this.residentCountry,
792
+ "biometricTemplateFace": this.biometricTemplateFace,
793
+ "biometricTemplateIris": this.biometricTemplateIris,
794
+ "biometricTemplateFinger": this.biometricTemplateFinger,
795
+ "biometricTemplateSignatureSign": this.biometricTemplateSignatureSign,
796
+ "familyNameNationalCharacter": this.familyNameNationalCharacter,
797
+ "givenNameNationalCharacter": this.givenNameNationalCharacter,
798
+ "signatureUsualMark": this.signatureUsualMark,
799
+ }
800
+ }
801
+ }
802
+
803
+
804
+ /***/ },
805
+
806
+ /***/ "./src/engagement/NameSpaceMDL.js"
807
+ /*!****************************************!*\
808
+ !*** ./src/engagement/NameSpaceMDL.js ***!
809
+ \****************************************/
810
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
811
+
812
+ __webpack_require__.r(__webpack_exports__);
813
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
814
+ /* harmony export */ MDLIntentToRetain: () => (/* binding */ MDLIntentToRetain),
815
+ /* harmony export */ NameSpaceMDL: () => (/* binding */ NameSpaceMDL)
816
+ /* harmony export */ });
817
+ class NameSpaceMDL {
818
+ name
819
+ map = {}
820
+
821
+ constructor(name) {
822
+ this.name = name
823
+ }
824
+
825
+ addField(name, intentToRetain) {
826
+ this.map[name] = intentToRetain;
827
+ }
828
+
829
+ static fromJson(jsonObject) {
830
+ if (jsonObject == null) return null
831
+ const result = new NameSpaceMDL(jsonObject["name"])
832
+
833
+ result.map = jsonObject["map"]
834
+
835
+ return result
836
+ }
837
+
838
+ toJson() {
839
+ return {
840
+ "name": this.name,
841
+ "map": this.map
842
+ }
843
+ }
844
+ }
845
+
846
+ const MDLIntentToRetain = {
847
+ FALSE: 0,
848
+ TRUE: 1,
849
+ }
850
+
851
+
401
852
  /***/ },
402
853
 
403
854
  /***/ "./src/index.js"
@@ -444,9 +895,9 @@ __webpack_require__.r(__webpack_exports__);
444
895
  /* harmony export */ CustomizationImages: () => (/* reexport safe */ _params_customization_CustomizationImages__WEBPACK_IMPORTED_MODULE_88__.CustomizationImages),
445
896
  /* harmony export */ DTCDataGroup: () => (/* reexport safe */ _params_rfid_scenario_DTCDataGroup__WEBPACK_IMPORTED_MODULE_94__.DTCDataGroup),
446
897
  /* harmony export */ DataField: () => (/* reexport safe */ _results_rfid_DataField__WEBPACK_IMPORTED_MODULE_59__.DataField),
447
- /* harmony export */ DataRetrieval: () => (/* reexport safe */ _mdl_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.DataRetrieval),
448
- /* harmony export */ DeviceEngagement: () => (/* reexport safe */ _mdl_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.DeviceEngagement),
449
- /* harmony export */ DeviceRetrievalMethod: () => (/* reexport safe */ _mdl_DeviceRetrievalMethod__WEBPACK_IMPORTED_MODULE_108__.DeviceRetrievalMethod),
898
+ /* harmony export */ DataRetrieval: () => (/* reexport safe */ _engagement_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.DataRetrieval),
899
+ /* harmony export */ DeviceEngagement: () => (/* reexport safe */ _engagement_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.DeviceEngagement),
900
+ /* harmony export */ DeviceRetrievalMethod: () => (/* reexport safe */ _engagement_DeviceRetrievalMethod__WEBPACK_IMPORTED_MODULE_108__.DeviceRetrievalMethod),
450
901
  /* harmony export */ DocFeature: () => (/* reexport safe */ _results_visible_digital_seals_DocFeature__WEBPACK_IMPORTED_MODULE_54__.DocFeature),
451
902
  /* harmony export */ DocFormat: () => (/* reexport safe */ _results_DocumentType__WEBPACK_IMPORTED_MODULE_28__.DocFormat),
452
903
  /* harmony export */ DocReaderAction: () => (/* binding */ DocReaderAction),
@@ -456,8 +907,8 @@ __webpack_require__.r(__webpack_exports__);
456
907
  /* harmony export */ DocReaderScenario: () => (/* reexport safe */ _info_DocReaderScenario__WEBPACK_IMPORTED_MODULE_11__.DocReaderScenario),
457
908
  /* harmony export */ DocReaderVersion: () => (/* reexport safe */ _info_DocReaderVersion__WEBPACK_IMPORTED_MODULE_6__.DocReaderVersion),
458
909
  /* harmony export */ DocumentReader: () => (/* binding */ DocumentReader),
459
- /* harmony export */ DocumentRequest18013MDL: () => (/* reexport safe */ _mdl_DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_107__.DocumentRequest18013MDL),
460
- /* harmony export */ DocumentRequestMDL: () => (/* reexport safe */ _mdl_DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_107__.DocumentRequestMDL),
910
+ /* harmony export */ DocumentRequest18013MDL: () => (/* reexport safe */ _engagement_DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_107__.DocumentRequest18013MDL),
911
+ /* harmony export */ DocumentRequestMDL: () => (/* reexport safe */ _engagement_DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_107__.DocumentRequestMDL),
461
912
  /* harmony export */ DocumentType: () => (/* reexport safe */ _results_DocumentType__WEBPACK_IMPORTED_MODULE_28__.DocumentType),
462
913
  /* harmony export */ DocumentTypeEnum: () => (/* reexport safe */ _results_DocumentType__WEBPACK_IMPORTED_MODULE_28__.DocType),
463
914
  /* harmony export */ DocumentsDatabase: () => (/* reexport safe */ _info_DocumentsDatabase__WEBPACK_IMPORTED_MODULE_9__.DocumentsDatabase),
@@ -493,14 +944,14 @@ __webpack_require__.r(__webpack_exports__);
493
944
  /* harmony export */ Lights: () => (/* reexport safe */ _results_visual_results_Lights__WEBPACK_IMPORTED_MODULE_20__.Lights),
494
945
  /* harmony export */ LivenessParams: () => (/* reexport safe */ _params_process_params_LivenessParams__WEBPACK_IMPORTED_MODULE_77__.LivenessParams),
495
946
  /* harmony export */ LogLevel: () => (/* reexport safe */ _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.LogLevel),
496
- /* harmony export */ MDLDeviceEngagement: () => (/* reexport safe */ _mdl_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.MDLDeviceEngagement),
497
- /* harmony export */ MDLDeviceRetrieval: () => (/* reexport safe */ _mdl_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.MDLDeviceRetrieval),
498
- /* harmony export */ MDLDocRequestPreset: () => (/* reexport safe */ _mdl_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.MDLDocRequestPreset),
499
- /* harmony export */ MDLIntentToRetain: () => (/* reexport safe */ _mdl_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_106__.MDLIntentToRetain),
947
+ /* harmony export */ MDLDeviceEngagement: () => (/* reexport safe */ _engagement_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.MDLDeviceEngagement),
948
+ /* harmony export */ MDLDeviceRetrieval: () => (/* reexport safe */ _engagement_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.MDLDeviceRetrieval),
949
+ /* harmony export */ MDLDocRequestPreset: () => (/* reexport safe */ _engagement_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.MDLDocRequestPreset),
950
+ /* harmony export */ MDLIntentToRetain: () => (/* reexport safe */ _engagement_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_106__.MDLIntentToRetain),
500
951
  /* harmony export */ MRZFormat: () => (/* reexport safe */ _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.MRZFormat),
501
952
  /* harmony export */ MeasureSystem: () => (/* reexport safe */ _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.MeasureSystem),
502
953
  /* harmony export */ MrzDetectionModes: () => (/* reexport safe */ _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.MrzDetectionModes),
503
- /* harmony export */ NameSpaceMDL: () => (/* reexport safe */ _mdl_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_106__.NameSpaceMDL),
954
+ /* harmony export */ NameSpaceMDL: () => (/* reexport safe */ _engagement_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_106__.NameSpaceMDL),
504
955
  /* harmony export */ OnlineMode: () => (/* reexport safe */ _config_OnlineProcessingConfig__WEBPACK_IMPORTED_MODULE_1__.OnlineMode),
505
956
  /* harmony export */ OnlineProcessingConfig: () => (/* reexport safe */ _config_OnlineProcessingConfig__WEBPACK_IMPORTED_MODULE_1__.OnlineProcessingConfig),
506
957
  /* harmony export */ OpticalStatus: () => (/* reexport safe */ _results_status_OpticalStatus__WEBPACK_IMPORTED_MODULE_35__.OpticalStatus),
@@ -663,21 +1114,13 @@ __webpack_require__.r(__webpack_exports__);
663
1114
  /* harmony import */ var _rfid_PAAttribute__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./rfid/PAAttribute */ "./src/rfid/PAAttribute.js");
664
1115
  /* harmony import */ var _rfid_TAChallenge__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./rfid/TAChallenge */ "./src/rfid/TAChallenge.js");
665
1116
  /* harmony import */ var _rfid_PKDCertificate__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./rfid/PKDCertificate */ "./src/rfid/PKDCertificate.js");
666
- /* harmony import */ var _mdl_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./mdl/DataRetrieval */ "./src/mdl/DataRetrieval.js");
667
- /* harmony import */ var _mdl_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./mdl/DeviceEngagement */ "./src/mdl/DeviceEngagement.js");
668
- /* harmony import */ var _mdl_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./mdl/NameSpaceMDL */ "./src/mdl/NameSpaceMDL.js");
669
- /* harmony import */ var _mdl_DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./mdl/DocumentRequestMDL */ "./src/mdl/DocumentRequestMDL.js");
670
- /* harmony import */ var _mdl_DeviceRetrievalMethod__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./mdl/DeviceRetrievalMethod */ "./src/mdl/DeviceRetrievalMethod.js");
671
-
672
-
673
-
674
-
675
-
676
-
677
-
678
-
679
-
680
-
1117
+ /* harmony import */ var _engagement_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./engagement/DataRetrieval */ "./src/engagement/DataRetrieval.js");
1118
+ /* harmony import */ var _engagement_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./engagement/DeviceEngagement */ "./src/engagement/DeviceEngagement.js");
1119
+ /* harmony import */ var _engagement_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./engagement/NameSpaceMDL */ "./src/engagement/NameSpaceMDL.js");
1120
+ /* harmony import */ var _engagement_DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./engagement/DocumentRequestMDL */ "./src/engagement/DocumentRequestMDL.js");
1121
+ /* harmony import */ var _engagement_DeviceRetrievalMethod__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./engagement/DeviceRetrievalMethod */ "./src/engagement/DeviceRetrievalMethod.js");
1122
+
1123
+
681
1124
 
682
1125
 
683
1126
 
@@ -811,1168 +1254,709 @@ __webpack_require__.r(__webpack_exports__);
811
1254
 
812
1255
 
813
1256
 
814
- class DocumentReader {
815
- static get instance() { return DocumentReader._instance }
816
- static _instance = new DocumentReader()
817
-
818
- get availableScenarios() { return this._availableScenarios }
819
- _availableScenarios = []
820
-
821
- get version() { return this._version }
822
- _version = null
823
-
824
- get license() { return this._license }
825
- _license = new _info_License__WEBPACK_IMPORTED_MODULE_10__.License()
826
-
827
- async isRFIDAvailableForUse() {
828
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getIsRFIDAvailableForUse", []);
829
- }
830
-
831
- async isAuthenticatorRFIDAvailableForUse() {
832
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("isAuthenticatorRFIDAvailableForUse", []);
833
- }
834
-
835
- async isAuthenticatorAvailableForUse() {
836
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("isAuthenticatorAvailableForUse", []);
837
- }
838
-
839
- get rfidSessionStatus() { return this._rfidSessionStatus }
840
- _rfidSessionStatus = null
841
- set rfidSessionStatus(val) {
842
- this._rfidSessionStatus = val;
843
- this._setRfidSessionStatus(val);
844
- }
845
-
846
- get tag() { return this._tag }
847
- _tag = null
848
- set tag(val) {
849
- this._tag = val;
850
- this._setTag(val);
851
- }
852
-
853
- get tenant() { return this._tenant }
854
- _tenant = null
855
- set tenant(val) {
856
- this._tenant = val;
857
- this._setTenant(val);
858
- }
859
-
860
- get env() { return this._env }
861
- _env = null
862
- set env(val) {
863
- this._env = val;
864
- this._setEnv(val);
865
- }
866
-
867
- get locale() { return this._locale }
868
- _locale = null
869
- set locale(val) {
870
- this._locale = val;
871
- this._setLocale(val);
872
- }
873
-
874
- get localizationDictionary() { return this._localizationDictionary }
875
- _localizationDictionary = null
876
- set localizationDictionary(val) {
877
- var temp = Object.assign({}, val);
878
- Object.freeze(temp);
879
- this._localizationDictionary = temp
880
- this._setLocalizationDictionary(val)
881
- }
882
-
883
- get functionality() { return this._functionality }
884
- _functionality = new _params_Functionality__WEBPACK_IMPORTED_MODULE_86__.Functionality()
885
- set functionality(val) {
886
- this._functionality = val;
887
- this._functionality._apply();
888
- }
889
-
890
- get processParams() { return this._processParams }
891
- _processParams = new _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.ProcessParams()
892
- set processParams(val) {
893
- this._processParams = val;
894
- this._processParams._apply();
895
- }
896
-
897
- get customization() { return this._customization }
898
- _customization = new _params_customization_Customization__WEBPACK_IMPORTED_MODULE_90__.Customization()
899
- set customization(val) {
900
- this._customization = val;
901
- this._customization._apply();
902
- }
903
-
904
- get rfidScenario() { return this._rfidScenario }
905
- _rfidScenario = new _params_rfid_scenario_RFIDScenario__WEBPACK_IMPORTED_MODULE_95__.RFIDScenario()
906
- set rfidScenario(val) {
907
- this._rfidScenario = val;
908
- this._rfidScenario._apply();
909
- }
910
-
911
- async isReady() {
912
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getDocumentReaderIsReady", []);
913
- }
914
-
915
- async status() {
916
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getDocumentReaderStatus", []);
917
- }
918
-
919
- resetConfiguration() {
920
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("resetConfiguration", []);
921
- this._functionality = new _params_Functionality__WEBPACK_IMPORTED_MODULE_86__.Functionality();
922
- this._processParams = new _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.ProcessParams();
923
- this._customization = new _params_customization_Customization__WEBPACK_IMPORTED_MODULE_90__.Customization();
924
- this._rfidScenario = new _params_rfid_scenario_RFIDScenario__WEBPACK_IMPORTED_MODULE_95__.RFIDScenario();
925
- }
926
-
927
- set onCustomButtonTapped(completion) {
928
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setCustomButtonTappedCompletion)(completion);
929
- }
930
-
931
- set videoEncoderCompletion(completion) {
932
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setVideoEncoderCompletion)(completion);
933
- }
934
-
935
- async initialize(config) {
936
- var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("initialize", [config])
937
- var [success, error] = this._successOrErrorFromJson(response)
938
- if (success) await this._onInit()
939
- return [success, error]
940
- }
941
-
942
- async connectBluetoothDevice(deviceName) {
943
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("connectBluetoothDevice", [deviceName]);
944
- }
945
-
946
- deinitializeReader() {
947
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("deinitializeReader", []);
948
- }
949
-
950
- async prepareDatabase(databaseID, prepareCompletion) {
951
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderPrepareCompletion)(prepareCompletion);
952
- var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("prepareDatabase", [databaseID]);
953
- return this._successOrErrorFromJson(response);
954
- }
955
-
956
- async runAutoUpdate(databaseID, prepareCompletion) {
957
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderPrepareCompletion)(prepareCompletion);
958
- var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("runAutoUpdate", [databaseID]);
959
- return this._successOrErrorFromJson(response);
960
- }
961
-
962
- async checkDatabaseUpdate(databaseID) {
963
- var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("checkDatabaseUpdate", [databaseID]);
964
- return _info_DocumentsDatabase__WEBPACK_IMPORTED_MODULE_9__.DocumentsDatabase.fromJson(response ? JSON.parse(response) : null);
965
- }
966
-
967
- async cancelDBUpdate() {
968
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("cancelDBUpdate", []);
969
- }
970
-
971
- async removeDatabase() {
972
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("removeDatabase", []);
973
- }
974
-
975
- startNewPage() {
976
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startNewPage", []);
977
- }
978
-
979
- startNewSession() {
980
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startNewSession", []);
981
- }
982
-
983
- scan(config, completion) {
984
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderCompletion)(completion);
985
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("scan", [config]);
986
- }
987
-
988
- startScanner(config, completion) {
989
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderCompletion)(completion);
990
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startScanner", [config]);
991
- }
992
-
993
- recognize(config, completion) {
994
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderCompletion)(completion);
995
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("recognize", [config]);
996
- }
997
-
998
- rfid(config) {
999
- if (config._disableUI) {
1000
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setRFIDCompletion)(config._rfidCompletion);
1001
- } else {
1002
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderCompletion)(config._completion);
1003
- }
1004
-
1005
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setRFIDProgressCompletion)(config.onProgress);
1006
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setChipDetectedCompletion)(config.onChipDetected);
1007
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setRetryReadChipCompletion)(config.onRetryReadChip);
1008
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setPaCertificateCompletion)(config.onRequestPACertificates);
1009
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setTaCertificateCompletion)(config.onRequestTACertificates);
1010
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setTaSignatureCompletion)(config.onRequestTASignature);
1011
-
1012
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)(config._disableUI ? "readRFID" : "startRFIDReader", [
1013
- config.onRequestPACertificates != null,
1014
- config.onRequestTACertificates != null,
1015
- config.onRequestTASignature != null,
1016
- ]);
1017
- }
1018
-
1019
- stopScanner() {
1020
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("stopScanner", []);
1021
- }
1022
-
1023
- stopRFIDReader() {
1024
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("stopRFIDReader", []);
1025
- }
1026
-
1027
- addPKDCertificates(certificates) {
1028
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("addPKDCertificates", [certificates]);
1029
- }
1030
-
1031
- clearPKDCertificates() {
1032
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("clearPKDCertificates", []);
1033
- }
1034
-
1035
- async setTCCParams(params) {
1036
- var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTCCParams", [params]);
1037
- return this._successOrErrorFromJson(response);
1038
- }
1039
-
1040
- async finalizePackage() {
1041
- var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("finalizePackage", []);
1042
- var jsonObject = JSON.parse(response);
1043
- var action = jsonObject["action"];
1044
- var info = _results_TransactionInfo__WEBPACK_IMPORTED_MODULE_30__.TransactionInfo.fromJson(jsonObject["info"]);
1045
- var error = _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]);
1046
-
1047
- return [action, info, error];
1048
- }
1049
-
1050
- endBackendTransaction() {
1051
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("endBackendTransaction", []);
1052
- }
1053
-
1054
- async readMDL(type, retrieval) {
1055
- var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startReadMDl", [type, retrieval.toJson()]);
1056
- var jsonObject = JSON.parse(response);
1057
- return [
1058
- jsonObject["action"],
1059
- _results_Results__WEBPACK_IMPORTED_MODULE_29__.Results.fromJson(jsonObject["results"]),
1060
- _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]),
1061
- ]
1062
- }
1063
-
1064
- async engageDevice(type, options) {
1065
- var response = "";
1066
- if (options?.withoutUI != true) {
1067
- response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startEngageDevice", [type.value]);
1068
- } else if (type == _mdl_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.MDLDeviceEngagement.NFC) {
1069
- response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("engageDeviceNFC", []);
1070
- } else if (type == _mdl_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.MDLDeviceEngagement.QR && options?.data != null) {
1071
- response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("engageDeviceData", [options.data]);
1072
- }
1073
-
1074
- var jsonObject = JSON.parse(response);
1075
- return [
1076
- _mdl_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.DeviceEngagement.fromJson(jsonObject["deviceEngagement"]),
1077
- _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]),
1078
- ]
1079
- }
1080
-
1081
- async retrieveData(retrieval, options) {
1082
- var func = "startRetrieveData";
1083
- if (options?.withoutUI == _mdl_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.MDLDeviceRetrieval.NFC) func = "engageDeviceNFC";
1084
- if (options?.withoutUI == _mdl_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.MDLDeviceRetrieval.BLE) func = "engageDeviceBLE";
1085
-
1086
- var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)(func, [retrieval.toJson(), options?.engagement?.toJson()]);
1087
- var jsonObject = JSON.parse(response);
1088
-
1089
- return [
1090
- jsonObject["action"],
1091
- _results_Results__WEBPACK_IMPORTED_MODULE_29__.Results.fromJson(jsonObject["results"]),
1092
- _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]),
1093
- ]
1094
- }
1095
-
1096
- _successOrErrorFromJson(jsonString) {
1097
- var jsonObject = JSON.parse(jsonString);
1098
- var success = jsonObject["success"];
1099
- var error = _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]);
1100
- return [success, error];
1101
- }
1102
-
1103
- async _onInit() {
1104
- this._version = await this._getDocReaderVersion();
1105
- this._availableScenarios = await this._getAvailableScenarios();
1106
- this._license = await this._getLicense();
1107
- this._tag = await this._getTag();
1108
- this._tenant = await this._getTenant();
1109
- this._env = await this._getEnv();
1110
- this._locale = await this._getLocale();
1111
- this._rfidSessionStatus = await this._getRfidSessionStatus();
1112
- this._functionality = await this._getFunctionality();
1113
- this._processParams = await this._getProcessParams();
1114
- this._customization = await this._getCustomization();
1115
- this._rfidScenario = await this._getRfidScenario();
1116
- }
1117
-
1118
- async _getProcessParams() {
1119
- const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getProcessParams", []);
1120
- return _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.ProcessParams.fromJson(JSON.parse(response));
1121
- }
1122
-
1123
- async _getFunctionality() {
1124
- const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getFunctionality", []);
1125
- return _params_Functionality__WEBPACK_IMPORTED_MODULE_86__.Functionality.fromJson(JSON.parse(response));
1126
- }
1127
-
1128
- async _getCustomization() {
1129
- const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getCustomization", []);
1130
- return _params_customization_Customization__WEBPACK_IMPORTED_MODULE_90__.Customization.fromJson(JSON.parse(response));
1131
- }
1132
-
1133
- async _getRfidScenario() {
1134
- const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getRfidScenario", []);
1135
- return _params_rfid_scenario_RFIDScenario__WEBPACK_IMPORTED_MODULE_95__.RFIDScenario.fromJson(JSON.parse(response));
1136
- }
1137
-
1138
- async _getLicense() {
1139
- const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getLicense", []);
1140
- return _info_License__WEBPACK_IMPORTED_MODULE_10__.License.fromJson(response ? JSON.parse(response) : {});
1141
- }
1142
-
1143
- async _getAvailableScenarios() {
1144
- const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getAvailableScenarios", []);
1145
- const scenarios = [];
1146
- for (const s of JSON.parse(response)) {
1147
- scenarios.push(_info_DocReaderScenario__WEBPACK_IMPORTED_MODULE_11__.DocReaderScenario.fromJson(s));
1148
- }
1149
- return scenarios;
1150
- }
1151
-
1152
- async _getDocReaderVersion() {
1153
- const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getDocReaderVersion", []);
1154
- return _info_DocReaderVersion__WEBPACK_IMPORTED_MODULE_6__.DocReaderVersion.fromJson(response ? JSON.parse(response) : null);
1155
- }
1156
-
1157
- async _getRfidSessionStatus() {
1158
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getRfidSessionStatus", []);
1159
- }
1160
-
1161
- _setRfidSessionStatus(status) {
1162
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setRfidSessionStatus", [status]);
1163
- }
1164
-
1165
- async _getTag() {
1166
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getTag", []);
1167
- }
1168
-
1169
- _setTag(tag) {
1170
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTag", [tag]);
1171
- }
1172
-
1173
- async _getTenant() {
1174
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getTenant", []);
1175
- }
1176
-
1177
- _setTenant(tenant) {
1178
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTenant", [tenant]);
1179
- }
1180
-
1181
- async _getEnv() {
1182
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getEnv", []);
1183
- }
1184
-
1185
- _setEnv(env) {
1186
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setEnv", [env]);
1187
- }
1188
-
1189
- async _getLocale() {
1190
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getLocale", []);
1191
- }
1192
-
1193
- _setLocale(locale) {
1194
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setLocale", [locale]);
1195
- }
1196
-
1197
- _setLocalizationDictionary(dictionary) {
1198
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setLocalizationDictionary", [dictionary]);
1199
- }
1200
- }
1201
-
1202
- const DocReaderAction = {
1203
- COMPLETE: 0,
1204
- PROCESS: 1,
1205
- MORE_PAGES_AVAILABLE: 2,
1206
- CANCEL: 3,
1207
- ERROR: 4,
1208
- PROCESS_WHITE_FLASHLIGHT: 5,
1209
- TIMEOUT: 6,
1210
- PROCESSING_ON_SERVICE: 7,
1211
- PROCESS_WHITE_UV_IMAGES: 102,
1212
- PROCESS_IR_FRAME: 103
1213
- };
1214
-
1215
- DocReaderAction.finished = function (value) {
1216
- return value == DocReaderAction.COMPLETE || value == DocReaderAction.TIMEOUT
1217
- }
1218
- DocReaderAction.interrupted = function (value) {
1219
- return value == DocReaderAction.CANCEL || value == DocReaderAction.ERROR
1220
- }
1221
- DocReaderAction.stopped = function (value) {
1222
- return DocReaderAction.finished(value) || DocReaderAction.interrupted(value)
1223
- }
1224
-
1225
-
1226
- /***/ },
1227
-
1228
- /***/ "./src/info/DocReaderException.js"
1229
- /*!****************************************!*\
1230
- !*** ./src/info/DocReaderException.js ***!
1231
- \****************************************/
1232
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1233
-
1234
- __webpack_require__.r(__webpack_exports__);
1235
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1236
- /* harmony export */ DocReaderException: () => (/* binding */ DocReaderException),
1237
- /* harmony export */ ErrorCodes: () => (/* binding */ ErrorCodes)
1238
- /* harmony export */ });
1239
- class DocReaderException {
1240
- code
1241
- message
1242
-
1243
- static fromJson(jsonObject) {
1244
- if (jsonObject == null) return null
1245
- const result = new DocReaderException()
1246
-
1247
- result.code = jsonObject["code"]
1248
- result.message = jsonObject["message"] ?? ""
1249
-
1250
- return result
1251
- }
1252
-
1253
- toJson() {
1254
- return {
1255
- "code": this.code,
1256
- "message": this.message,
1257
- }
1258
- }
1259
- }
1260
-
1261
- const ErrorCodes = {
1262
- INITIALIZATION_CORE_ABSENT: 0,
1263
- INITIALIZATION_FAILED: 1,
1264
- INCORRECT_SCENARIO: 2,
1265
- NO_RESULT: 3,
1266
- REMOVE_DATABASE: 4,
1267
- FETCHING_DATABASE: 5,
1268
- DB_ID_NOT_FOUND: 6,
1269
- DB_DESCRIPTION_NOT_FOUND: 7,
1270
- SAVE_DB: 8,
1271
- DOWNLOAD_DB_INCORRECT_CHECKSUM: 9,
1272
- DB_DOWNLOAD: 10,
1273
- DB_CREATION: 11,
1274
- RFID_ERROR: 12,
1275
- LICENSE_ABSENT_OR_CORRUPTED: 13,
1276
- LICENSE_INVALID_DATE: 14,
1277
- LICENSE_INVALID_VERSION: 15,
1278
- LICENSE_INVALID_DEVICE_ID: 16,
1279
- LICENSE_INVALID_SYSTEM_OR_APP_ID: 17,
1280
- LICENSE_NO_CAPABILITIES: 18,
1281
- LICENSE_NO_AUTHENTICITY: 19,
1282
- RECORD_PROCESS_INVALID_OUTPUT_URL: 20,
1283
- LICENSE_ONLINE_ERROR: 21,
1284
- LICENSE_NO_DATABASE: 22,
1285
- LICENSE_DATABASE_INCORRECT: 23,
1286
- INVALID_TCC_PARAMS: 24,
1287
- RFID_IN_PROGRESS: 25,
1288
- START_BACKEND_PROCESSING: 26,
1289
- ADD_DATA_TO_PACKAGE: 27,
1290
- FINALIZE_FAILED: 28,
1291
- CAMERA_NO_PERMISSION: 29,
1292
- CAMERA_NOT_AVAILABLE: 30,
1293
- CANNOT_USE_CAMERA_IN_SCENARIO: 40,
1294
- BLUETOOTH_NO_PERMISSION: 41,
1295
- BACKEND_ONLINE_PROCESSING: 303,
1296
- WRONG_INPUT: 400,
1297
- RESULT_UNAVAILABLE: 410,
1298
- RESULT_WRONG_OUTPUT: 411,
1299
- STATE_EXCEPTION: 500,
1300
- BLE_EXCEPTION: 600,
1301
- FEATURE_BLUETOOTH_LE_NOT_SUPPORTED: 601,
1302
- APP_BACKGROUND: 700,
1303
- ONLINE_PROCESSING_WRONG_INPUT: 800,
1304
- MDL_EXCEPTION: 900,
1305
- NATIVE_JAVA_EXCEPTION: 1000
1306
- }
1307
-
1308
-
1309
- /***/ },
1310
-
1311
- /***/ "./src/info/DocReaderScenario.js"
1312
- /*!***************************************!*\
1313
- !*** ./src/info/DocReaderScenario.js ***!
1314
- \***************************************/
1315
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1316
-
1317
- __webpack_require__.r(__webpack_exports__);
1318
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1319
- /* harmony export */ DocReaderOrientation: () => (/* binding */ DocReaderOrientation),
1320
- /* harmony export */ DocReaderScenario: () => (/* binding */ DocReaderScenario),
1321
- /* harmony export */ Scenario: () => (/* binding */ Scenario)
1322
- /* harmony export */ });
1323
- class DocReaderScenario {
1324
- name
1325
- caption
1326
- description
1327
- frameOrientation
1328
- uvTorch
1329
- faceExt
1330
- multiPageOff
1331
- seriesProcessMode
1332
- frameKWHLandscape
1333
- frameKWHPortrait
1334
- frameKWHDoublePageSpreadLandscape
1335
- frameKWHDoublePageSpreadPortrait
1336
- manualCrop
1337
-
1338
- constructor() {
1339
- }
1340
1257
 
1341
- static fromJson(jsonObject) {
1342
- if (jsonObject == null) return null
1343
- const result = new DocReaderScenario()
1344
1258
 
1345
- result.uvTorch = jsonObject["uvTorch"]
1346
- result.frameOrientation = jsonObject["frameOrientation"]
1347
- result.faceExt = jsonObject["faceExt"]
1348
- result.multiPageOff = jsonObject["multiPageOff"]
1349
- result.seriesProcessMode = jsonObject["seriesProcessMode"]
1350
- result.frameKWHLandscape = jsonObject["frameKWHLandscape"]
1351
- result.frameKWHPortrait = jsonObject["frameKWHPortrait"]
1352
- result.frameKWHDoublePageSpreadPortrait = jsonObject["frameKWHDoublePageSpreadPortrait"]
1353
- result.frameKWHDoublePageSpreadLandscape = jsonObject["frameKWHDoublePageSpreadLandscape"]
1354
- result.name = jsonObject["name"]
1355
- result.caption = jsonObject["caption"]
1356
- result.description = jsonObject["description"]
1357
- result.manualCrop = jsonObject["manualCrop"]
1358
1259
 
1359
- return result
1360
- }
1361
1260
 
1362
- toJson() {
1363
- return {
1364
- "uvTorch": this.uvTorch,
1365
- "frameOrientation": this.frameOrientation,
1366
- "faceExt": this.faceExt,
1367
- "multiPageOff": this.multiPageOff,
1368
- "seriesProcessMode": this.seriesProcessMode,
1369
- "frameKWHLandscape": this.frameKWHLandscape,
1370
- "frameKWHPortrait": this.frameKWHPortrait,
1371
- "frameKWHDoublePageSpreadPortrait": this.frameKWHDoublePageSpreadPortrait,
1372
- "frameKWHDoublePageSpreadLandscape": this.frameKWHDoublePageSpreadLandscape,
1373
- "name": this.name,
1374
- "caption": this.caption,
1375
- "description": this.description,
1376
- "manualCrop": this.manualCrop,
1377
- }
1378
- }
1379
- }
1380
1261
 
1381
- const Scenario = {
1382
- MRZ: "Mrz",
1383
- BARCODE: "Barcode",
1384
- LOCATE: "Locate",
1385
- OCR: "Ocr",
1386
- DOCTYPE: "DocType",
1387
- MRZ_OR_BARCODE: "MrzOrBarcode",
1388
- MRZ_OR_LOCATE: "MrzOrLocate",
1389
- MRZ_AND_LOCATE: "MrzAndLocate",
1390
- BARCODE_AND_LOCATE: "BarcodeAndLocate",
1391
- MRZ_OR_OCR: "MrzOrOcr",
1392
- MRZ_OR_BARCODE_OR_OCR: "MrzOrBarcodeOrOcr",
1393
- LOCATE_VISUAL_AND_MRZ_OR_OCR: "LocateVisual_And_MrzOrOcr",
1394
- FULL_PROCESS: "FullProcess",
1395
- FULL_AUTH: "FullAuth",
1396
- ID3RUS: "Id3Rus",
1397
- RUS_STAMP: "RusStamp",
1398
- OCR_FREE: "OcrFree",
1399
- CREDIT_CARD: "CreditCard",
1400
- CAPTURE: "Capture",
1401
- DTC: "DTC",
1402
- RFID: "RFID"
1403
- }
1404
1262
 
1405
- const DocReaderOrientation = {
1406
- ALL: 0,
1407
- PORTRAIT: 1,
1408
- LANDSCAPE: 2,
1409
- LANDSCAPE_LEFT: 3,
1410
- LANDSCAPE_RIGHT: 4
1411
- }
1412
1263
 
1413
1264
 
1414
- /***/ },
1265
+ class DocumentReader {
1266
+ static get instance() { return DocumentReader._instance }
1267
+ static _instance = new DocumentReader()
1415
1268
 
1416
- /***/ "./src/info/DocReaderVersion.js"
1417
- /*!**************************************!*\
1418
- !*** ./src/info/DocReaderVersion.js ***!
1419
- \**************************************/
1420
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1269
+ get availableScenarios() { return this._availableScenarios }
1270
+ _availableScenarios = []
1421
1271
 
1422
- __webpack_require__.r(__webpack_exports__);
1423
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1424
- /* harmony export */ DocReaderVersion: () => (/* binding */ DocReaderVersion)
1425
- /* harmony export */ });
1426
- /* harmony import */ var _DocumentsDatabase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DocumentsDatabase */ "./src/info/DocumentsDatabase.js");
1272
+ get version() { return this._version }
1273
+ _version = null
1427
1274
 
1275
+ get license() { return this._license }
1276
+ _license = new _info_License__WEBPACK_IMPORTED_MODULE_10__.License()
1428
1277
 
1429
- class DocReaderVersion {
1430
- api
1431
- core
1432
- coreMode
1433
- database
1278
+ async isRFIDAvailableForUse() {
1279
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getIsRFIDAvailableForUse", []);
1280
+ }
1434
1281
 
1435
- constructor() {
1282
+ async isAuthenticatorRFIDAvailableForUse() {
1283
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("isAuthenticatorRFIDAvailableForUse", []);
1436
1284
  }
1437
1285
 
1438
- static fromJson(jsonObject) {
1439
- if (jsonObject == null) return null
1440
- const result = new DocReaderVersion()
1286
+ async isAuthenticatorAvailableForUse() {
1287
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("isAuthenticatorAvailableForUse", []);
1288
+ }
1441
1289
 
1442
- result.api = jsonObject["api"]
1443
- result.core = jsonObject["core"]
1444
- result.coreMode = jsonObject["coreMode"]
1445
- result.database = _DocumentsDatabase__WEBPACK_IMPORTED_MODULE_0__.DocumentsDatabase.fromJson(jsonObject["database"])
1290
+ get rfidSessionStatus() { return this._rfidSessionStatus }
1291
+ _rfidSessionStatus = null
1292
+ set rfidSessionStatus(val) {
1293
+ this._rfidSessionStatus = val;
1294
+ this._setRfidSessionStatus(val);
1295
+ }
1446
1296
 
1447
- return result
1297
+ get tag() { return this._tag }
1298
+ _tag = null
1299
+ set tag(val) {
1300
+ this._tag = val;
1301
+ this._setTag(val);
1448
1302
  }
1449
1303
 
1450
- toJson() {
1451
- return {
1452
- "api": this.api,
1453
- "core": this.core,
1454
- "coreMode": this.coreMode,
1455
- "database": this.database?.toJson(),
1456
- }
1304
+ get tenant() { return this._tenant }
1305
+ _tenant = null
1306
+ set tenant(val) {
1307
+ this._tenant = val;
1308
+ this._setTenant(val);
1457
1309
  }
1458
- }
1459
1310
 
1311
+ get env() { return this._env }
1312
+ _env = null
1313
+ set env(val) {
1314
+ this._env = val;
1315
+ this._setEnv(val);
1316
+ }
1460
1317
 
1461
- /***/ },
1318
+ get locale() { return this._locale }
1319
+ _locale = null
1320
+ set locale(val) {
1321
+ this._locale = val;
1322
+ this._setLocale(val);
1323
+ }
1462
1324
 
1463
- /***/ "./src/info/DocumentsDatabase.js"
1464
- /*!***************************************!*\
1465
- !*** ./src/info/DocumentsDatabase.js ***!
1466
- \***************************************/
1467
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1325
+ get localizationDictionary() { return this._localizationDictionary }
1326
+ _localizationDictionary = null
1327
+ set localizationDictionary(val) {
1328
+ var temp = Object.assign({}, val);
1329
+ Object.freeze(temp);
1330
+ this._localizationDictionary = temp
1331
+ this._setLocalizationDictionary(val)
1332
+ }
1468
1333
 
1469
- __webpack_require__.r(__webpack_exports__);
1470
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1471
- /* harmony export */ DocumentsDatabase: () => (/* binding */ DocumentsDatabase)
1472
- /* harmony export */ });
1473
- class DocumentsDatabase {
1474
- databaseID
1475
- version
1476
- date
1477
- databaseDescription
1478
- countriesNumber
1479
- documentsNumber
1480
- size
1334
+ get functionality() { return this._functionality }
1335
+ _functionality = new _params_Functionality__WEBPACK_IMPORTED_MODULE_86__.Functionality()
1336
+ set functionality(val) {
1337
+ this._functionality = val;
1338
+ this._functionality._apply();
1339
+ }
1481
1340
 
1482
- constructor() {
1341
+ get processParams() { return this._processParams }
1342
+ _processParams = new _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.ProcessParams()
1343
+ set processParams(val) {
1344
+ this._processParams = val;
1345
+ this._processParams._apply();
1483
1346
  }
1484
1347
 
1485
- static fromJson(jsonObject) {
1486
- if (jsonObject == null) return null
1487
- const result = new DocumentsDatabase()
1348
+ get customization() { return this._customization }
1349
+ _customization = new _params_customization_Customization__WEBPACK_IMPORTED_MODULE_90__.Customization()
1350
+ set customization(val) {
1351
+ this._customization = val;
1352
+ this._customization._apply();
1353
+ }
1488
1354
 
1489
- result.databaseID = jsonObject["databaseID"]
1490
- result.version = jsonObject["version"]
1491
- result.date = jsonObject["date"]
1492
- result.databaseDescription = jsonObject["databaseDescription"]
1493
- result.countriesNumber = jsonObject["countriesNumber"]
1494
- result.documentsNumber = jsonObject["documentsNumber"]
1495
- result.size = jsonObject["size"]
1355
+ get rfidScenario() { return this._rfidScenario }
1356
+ _rfidScenario = new _params_rfid_scenario_RFIDScenario__WEBPACK_IMPORTED_MODULE_95__.RFIDScenario()
1357
+ set rfidScenario(val) {
1358
+ this._rfidScenario = val;
1359
+ this._rfidScenario._apply();
1360
+ }
1496
1361
 
1497
- return result
1362
+ async isReady() {
1363
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getDocumentReaderIsReady", []);
1498
1364
  }
1499
1365
 
1500
- toJson() {
1501
- return {
1502
- "databaseID": this.databaseID,
1503
- "version": this.version,
1504
- "date": this.date,
1505
- "databaseDescription": this.databaseDescription,
1506
- "countriesNumber": this.countriesNumber,
1507
- "documentsNumber": this.documentsNumber,
1508
- "size": this.size,
1509
- }
1366
+ async status() {
1367
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getDocumentReaderStatus", []);
1510
1368
  }
1511
- }
1512
1369
 
1370
+ resetConfiguration() {
1371
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("resetConfiguration", []);
1372
+ this._functionality = new _params_Functionality__WEBPACK_IMPORTED_MODULE_86__.Functionality();
1373
+ this._processParams = new _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.ProcessParams();
1374
+ this._customization = new _params_customization_Customization__WEBPACK_IMPORTED_MODULE_90__.Customization();
1375
+ this._rfidScenario = new _params_rfid_scenario_RFIDScenario__WEBPACK_IMPORTED_MODULE_95__.RFIDScenario();
1376
+ }
1513
1377
 
1514
- /***/ },
1378
+ set onCustomButtonTapped(completion) {
1379
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setCustomButtonTappedCompletion)(completion);
1380
+ }
1515
1381
 
1516
- /***/ "./src/info/License.js"
1517
- /*!*****************************!*\
1518
- !*** ./src/info/License.js ***!
1519
- \*****************************/
1520
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1382
+ set videoEncoderCompletion(completion) {
1383
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setVideoEncoderCompletion)(completion);
1384
+ }
1521
1385
 
1522
- __webpack_require__.r(__webpack_exports__);
1523
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1524
- /* harmony export */ License: () => (/* binding */ License)
1525
- /* harmony export */ });
1526
- /**
1527
- * Class contains properties to get the information about the license.
1528
- */
1529
- class License {
1530
- expiryDate
1531
- countryFilter
1532
- isRfidAvailable
1386
+ async initialize(config) {
1387
+ var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("initialize", [config])
1388
+ var [success, error] = this._successOrErrorFromJson(response)
1389
+ if (success) await this._onInit()
1390
+ return [success, error]
1391
+ }
1533
1392
 
1534
- constructor() {
1393
+ async connectBluetoothDevice(deviceName) {
1394
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("connectBluetoothDevice", [deviceName]);
1535
1395
  }
1536
1396
 
1537
- static fromJson(jsonObject) {
1538
- if (jsonObject == null) return null
1539
- const result = new License()
1397
+ deinitializeReader() {
1398
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("deinitializeReader", []);
1399
+ }
1540
1400
 
1541
- result.expiryDate = jsonObject["expiryDate"]
1542
- result.countryFilter = jsonObject["countryFilter"]
1543
- result.isRfidAvailable = jsonObject["isRfidAvailable"] ?? false
1401
+ async prepareDatabase(databaseID, prepareCompletion) {
1402
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderPrepareCompletion)(prepareCompletion);
1403
+ var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("prepareDatabase", [databaseID]);
1404
+ return this._successOrErrorFromJson(response);
1405
+ }
1544
1406
 
1545
- return result
1407
+ async runAutoUpdate(databaseID, prepareCompletion) {
1408
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderPrepareCompletion)(prepareCompletion);
1409
+ var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("runAutoUpdate", [databaseID]);
1410
+ return this._successOrErrorFromJson(response);
1546
1411
  }
1547
1412
 
1548
- toJson() {
1549
- return {
1550
- "expiryDate": this.expiryDate,
1551
- "countryFilter": this.countryFilter,
1552
- "isRfidAvailable": this.isRfidAvailable,
1553
- }
1413
+ async checkDatabaseUpdate(databaseID) {
1414
+ var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("checkDatabaseUpdate", [databaseID]);
1415
+ return _info_DocumentsDatabase__WEBPACK_IMPORTED_MODULE_9__.DocumentsDatabase.fromJson(response ? JSON.parse(response) : null);
1554
1416
  }
1555
- }
1556
1417
 
1418
+ async cancelDBUpdate() {
1419
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("cancelDBUpdate", []);
1420
+ }
1557
1421
 
1558
- /***/ },
1422
+ async removeDatabase() {
1423
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("removeDatabase", []);
1424
+ }
1559
1425
 
1560
- /***/ "./src/info/PrepareProgress.js"
1561
- /*!*************************************!*\
1562
- !*** ./src/info/PrepareProgress.js ***!
1563
- \*************************************/
1564
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1426
+ startNewPage() {
1427
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startNewPage", []);
1428
+ }
1565
1429
 
1566
- __webpack_require__.r(__webpack_exports__);
1567
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1568
- /* harmony export */ PrepareProgress: () => (/* binding */ PrepareProgress)
1569
- /* harmony export */ });
1570
- /**
1571
- * Class contains info about database preparation progress.
1572
- */
1573
- class PrepareProgress {
1574
- downloadedBytes
1575
- totalBytes
1576
- progress
1430
+ startNewSession() {
1431
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startNewSession", []);
1432
+ }
1577
1433
 
1578
- constructor(downloadedBytes, totalBytes, progress) {
1579
- this.downloadedBytes = downloadedBytes
1580
- this.totalBytes = totalBytes
1581
- this.progress = progress
1434
+ scan(config, completion) {
1435
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderCompletion)(completion);
1436
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("scan", [config]);
1582
1437
  }
1583
1438
 
1584
- static fromJson(jsonObject) {
1585
- if (jsonObject == null) return null
1586
- return new PrepareProgress(
1587
- jsonObject["downloadedBytes"],
1588
- jsonObject["totalBytes"],
1589
- jsonObject["progress"]
1590
- )
1439
+ startScanner(config, completion) {
1440
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderCompletion)(completion);
1441
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startScanner", [config]);
1591
1442
  }
1592
1443
 
1593
- toJson() {
1594
- return {
1595
- "downloadedBytes": this.downloadedBytes,
1596
- "totalBytes": this.totalBytes,
1597
- "progress": this.progress,
1598
- }
1444
+ recognize(config, completion) {
1445
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderCompletion)(completion);
1446
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("recognize", [config]);
1599
1447
  }
1600
- }
1601
1448
 
1449
+ rfid(config) {
1450
+ if (config._disableUI) {
1451
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setRFIDCompletion)(config._rfidCompletion);
1452
+ } else {
1453
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setDocumentReaderCompletion)(config._completion);
1454
+ }
1602
1455
 
1603
- /***/ },
1456
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setRFIDProgressCompletion)(config.onProgress);
1457
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setChipDetectedCompletion)(config.onChipDetected);
1458
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setRetryReadChipCompletion)(config.onRetryReadChip);
1459
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setPaCertificateCompletion)(config.onRequestPACertificates);
1460
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setTaCertificateCompletion)(config.onRequestTACertificates);
1461
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setTaSignatureCompletion)(config.onRequestTASignature);
1604
1462
 
1605
- /***/ "./src/info/RFIDException.js"
1606
- /*!***********************************!*\
1607
- !*** ./src/info/RFIDException.js ***!
1608
- \***********************************/
1609
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1463
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)(config._disableUI ? "readRFID" : "startRFIDReader", [
1464
+ config.onRequestPACertificates != null,
1465
+ config.onRequestTACertificates != null,
1466
+ config.onRequestTASignature != null,
1467
+ ]);
1468
+ }
1610
1469
 
1611
- __webpack_require__.r(__webpack_exports__);
1612
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1613
- /* harmony export */ RFIDException: () => (/* binding */ RFIDException)
1614
- /* harmony export */ });
1615
- /* harmony import */ var _rfid_RFIDErrorCodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rfid/RFIDErrorCodes */ "./src/rfid/RFIDErrorCodes.js");
1470
+ stopScanner() {
1471
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("stopScanner", []);
1472
+ }
1616
1473
 
1474
+ stopRFIDReader() {
1475
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("stopRFIDReader", []);
1476
+ }
1617
1477
 
1618
- class RFIDException {
1619
- code
1620
- message
1478
+ addPKDCertificates(certificates) {
1479
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("addPKDCertificates", [certificates]);
1480
+ }
1621
1481
 
1622
- constructor() {
1482
+ clearPKDCertificates() {
1483
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("clearPKDCertificates", []);
1623
1484
  }
1624
1485
 
1625
- static fromJson(jsonObject) {
1626
- if (jsonObject == null) return null
1627
- const result = new RFIDException()
1486
+ async setTCCParams(params) {
1487
+ var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTCCParams", [params]);
1488
+ return this._successOrErrorFromJson(response);
1489
+ }
1628
1490
 
1629
- result.code = jsonObject["code"]
1630
- result.message = jsonObject["message"] ?? ""
1491
+ async finalizePackage() {
1492
+ var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("finalizePackage", []);
1493
+ var jsonObject = JSON.parse(response);
1494
+ var action = jsonObject["action"];
1495
+ var info = _results_TransactionInfo__WEBPACK_IMPORTED_MODULE_30__.TransactionInfo.fromJson(jsonObject["info"]);
1496
+ var error = _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]);
1631
1497
 
1632
- return result
1498
+ return [action, info, error];
1633
1499
  }
1634
1500
 
1635
- toJson() {
1636
- return {
1637
- "code": this.code,
1638
- "message": this.message,
1639
- }
1501
+ endBackendTransaction() {
1502
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("endBackendTransaction", []);
1640
1503
  }
1641
- }
1642
1504
 
1505
+ async readMDL(type, retrieval) {
1506
+ var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startReadMDl", [type, retrieval.toJson()]);
1507
+ var jsonObject = JSON.parse(response);
1508
+ return [
1509
+ jsonObject["action"],
1510
+ _results_Results__WEBPACK_IMPORTED_MODULE_29__.Results.fromJson(jsonObject["results"]),
1511
+ _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]),
1512
+ ]
1513
+ }
1643
1514
 
1644
- /***/ },
1515
+ async engageDevice(type, options) {
1516
+ var response = "";
1517
+ if (options?.withoutUI != true) {
1518
+ response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startEngageDevice", [type.value]);
1519
+ } else if (type == _engagement_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.MDLDeviceEngagement.NFC) {
1520
+ response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("engageDeviceNFC", []);
1521
+ } else if (type == _engagement_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.MDLDeviceEngagement.QR && options?.data != null) {
1522
+ response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("engageDeviceData", [options.data]);
1523
+ }
1645
1524
 
1646
- /***/ "./src/internal/bridge.js"
1647
- /*!********************************!*\
1648
- !*** ./src/internal/bridge.js ***!
1649
- \********************************/
1650
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1525
+ var jsonObject = JSON.parse(response);
1526
+ return [
1527
+ _engagement_DeviceEngagement__WEBPACK_IMPORTED_MODULE_105__.DeviceEngagement.fromJson(jsonObject["deviceEngagement"]),
1528
+ _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]),
1529
+ ]
1530
+ }
1651
1531
 
1652
- __webpack_require__.r(__webpack_exports__);
1653
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1654
- /* harmony export */ _setChipDetectedCompletion: () => (/* binding */ _setChipDetectedCompletion),
1655
- /* harmony export */ _setCustomButtonTappedCompletion: () => (/* binding */ _setCustomButtonTappedCompletion),
1656
- /* harmony export */ _setDocumentReaderCompletion: () => (/* binding */ _setDocumentReaderCompletion),
1657
- /* harmony export */ _setDocumentReaderPrepareCompletion: () => (/* binding */ _setDocumentReaderPrepareCompletion),
1658
- /* harmony export */ _setPaCertificateCompletion: () => (/* binding */ _setPaCertificateCompletion),
1659
- /* harmony export */ _setRFIDCompletion: () => (/* binding */ _setRFIDCompletion),
1660
- /* harmony export */ _setRFIDProgressCompletion: () => (/* binding */ _setRFIDProgressCompletion),
1661
- /* harmony export */ _setRetryReadChipCompletion: () => (/* binding */ _setRetryReadChipCompletion),
1662
- /* harmony export */ _setTaCertificateCompletion: () => (/* binding */ _setTaCertificateCompletion),
1663
- /* harmony export */ _setTaSignatureCompletion: () => (/* binding */ _setTaSignatureCompletion),
1664
- /* harmony export */ _setVideoEncoderCompletion: () => (/* binding */ _setVideoEncoderCompletion),
1665
- /* harmony export */ exec: () => (/* binding */ exec)
1666
- /* harmony export */ });
1667
- /* harmony import */ var _cordova__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cordova */ "./src/internal/cordova.js");
1668
- /* harmony import */ var _results_Results__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../results/Results */ "./src/results/Results.js");
1669
- /* harmony import */ var _info_DocReaderException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../info/DocReaderException */ "./src/info/DocReaderException.js");
1670
- /* harmony import */ var _info_RFIDException__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../info/RFIDException */ "./src/info/RFIDException.js");
1671
- /* harmony import */ var _info_PrepareProgress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../info/PrepareProgress */ "./src/info/PrepareProgress.js");
1672
- /* harmony import */ var _rfid_RFIDNotification__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../rfid/RFIDNotification */ "./src/rfid/RFIDNotification.js");
1673
- /* harmony import */ var _rfid_PAResourcesIssuer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rfid/PAResourcesIssuer */ "./src/rfid/PAResourcesIssuer.js");
1674
- /* harmony import */ var _rfid_TAChallenge__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../rfid/TAChallenge */ "./src/rfid/TAChallenge.js");
1532
+ async retrieveData(retrieval, options) {
1533
+ var func = "startRetrieveData";
1534
+ if (options?.withoutUI == _engagement_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.MDLDeviceRetrieval.NFC) func = "engageDeviceNFC";
1535
+ if (options?.withoutUI == _engagement_DataRetrieval__WEBPACK_IMPORTED_MODULE_104__.MDLDeviceRetrieval.BLE) func = "engageDeviceBLE";
1536
+
1537
+ var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)(func, [retrieval.toJson(), options?.engagement?.toJson()]);
1538
+ var jsonObject = JSON.parse(response);
1539
+
1540
+ return [
1541
+ jsonObject["action"],
1542
+ _results_Results__WEBPACK_IMPORTED_MODULE_29__.Results.fromJson(jsonObject["results"]),
1543
+ _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]),
1544
+ ]
1545
+ }
1675
1546
 
1547
+ _successOrErrorFromJson(jsonString) {
1548
+ var jsonObject = JSON.parse(jsonString);
1549
+ var success = jsonObject["success"];
1550
+ var error = _info_DocReaderException__WEBPACK_IMPORTED_MODULE_8__.DocReaderException.fromJson(jsonObject["error"]);
1551
+ return [success, error];
1552
+ }
1676
1553
 
1554
+ async _onInit() {
1555
+ this._version = await this._getDocReaderVersion();
1556
+ this._availableScenarios = await this._getAvailableScenarios();
1557
+ this._license = await this._getLicense();
1558
+ this._tag = await this._getTag();
1559
+ this._tenant = await this._getTenant();
1560
+ this._env = await this._getEnv();
1561
+ this._locale = await this._getLocale();
1562
+ this._rfidSessionStatus = await this._getRfidSessionStatus();
1563
+ this._functionality = await this._getFunctionality();
1564
+ this._processParams = await this._getProcessParams();
1565
+ this._customization = await this._getCustomization();
1566
+ this._rfidScenario = await this._getRfidScenario();
1567
+ }
1677
1568
 
1569
+ async _getProcessParams() {
1570
+ const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getProcessParams", []);
1571
+ return _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.ProcessParams.fromJson(JSON.parse(response));
1572
+ }
1678
1573
 
1574
+ async _getFunctionality() {
1575
+ const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getFunctionality", []);
1576
+ return _params_Functionality__WEBPACK_IMPORTED_MODULE_86__.Functionality.fromJson(JSON.parse(response));
1577
+ }
1679
1578
 
1579
+ async _getCustomization() {
1580
+ const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getCustomization", []);
1581
+ return _params_customization_Customization__WEBPACK_IMPORTED_MODULE_90__.Customization.fromJson(JSON.parse(response));
1582
+ }
1680
1583
 
1584
+ async _getRfidScenario() {
1585
+ const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getRfidScenario", []);
1586
+ return _params_rfid_scenario_RFIDScenario__WEBPACK_IMPORTED_MODULE_95__.RFIDScenario.fromJson(JSON.parse(response));
1587
+ }
1681
1588
 
1589
+ async _getLicense() {
1590
+ const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getLicense", []);
1591
+ return _info_License__WEBPACK_IMPORTED_MODULE_10__.License.fromJson(response ? JSON.parse(response) : {});
1592
+ }
1682
1593
 
1594
+ async _getAvailableScenarios() {
1595
+ const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getAvailableScenarios", []);
1596
+ const scenarios = [];
1597
+ for (const s of JSON.parse(response)) {
1598
+ scenarios.push(_info_DocReaderScenario__WEBPACK_IMPORTED_MODULE_11__.DocReaderScenario.fromJson(s));
1599
+ }
1600
+ return scenarios;
1601
+ }
1683
1602
 
1603
+ async _getDocReaderVersion() {
1604
+ const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getDocReaderVersion", []);
1605
+ return _info_DocReaderVersion__WEBPACK_IMPORTED_MODULE_6__.DocReaderVersion.fromJson(response ? JSON.parse(response) : null);
1606
+ }
1684
1607
 
1685
- const { RNDocumentReader } = _cordova__WEBPACK_IMPORTED_MODULE_0__.NativeModules
1686
- var eventManager = new _cordova__WEBPACK_IMPORTED_MODULE_0__.NativeEventEmitter(RNDocumentReader)
1608
+ async _getRfidSessionStatus() {
1609
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getRfidSessionStatus", []);
1610
+ }
1687
1611
 
1688
- async function exec(name, params) {
1689
- return RNDocumentReader.exec(name, params)
1690
- }
1612
+ _setRfidSessionStatus(status) {
1613
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setRfidSessionStatus", [status]);
1614
+ }
1691
1615
 
1692
- function _setEvent(id, completion, fromJson) {
1693
- eventManager.removeAllListeners(id)
1694
- if (completion == null) return
1695
- if (fromJson == null) eventManager.addListener(id, completion)
1696
- else eventManager.addListener(id, data => {
1697
- data = fromJson(data)
1698
- if (data !== null && typeof data[Symbol.iterator] === 'function') completion(...data)
1699
- else completion(data)
1700
- })
1701
- }
1616
+ async _getTag() {
1617
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getTag", []);
1618
+ }
1702
1619
 
1703
- function _setDocumentReaderCompletion(completion) {
1704
- _setEvent("completion", completion, json => {
1705
- var jsonObject = JSON.parse(json)
1706
- var action = jsonObject["action"];
1707
- var results = _results_Results__WEBPACK_IMPORTED_MODULE_1__.Results.fromJson(jsonObject["results"]);
1708
- var error = _info_DocReaderException__WEBPACK_IMPORTED_MODULE_2__.DocReaderException.fromJson(jsonObject["error"]);
1709
- return [action, results, error]
1710
- })
1711
- }
1620
+ _setTag(tag) {
1621
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTag", [tag]);
1622
+ }
1712
1623
 
1713
- function _setRFIDCompletion(completion) {
1714
- _setEvent("completion", completion, json => {
1715
- var jsonObject = JSON.parse(json)
1716
- var action = jsonObject["action"];
1717
- var results = _results_Results__WEBPACK_IMPORTED_MODULE_1__.Results.fromJson(jsonObject["results"]);
1718
- var error = _info_RFIDException__WEBPACK_IMPORTED_MODULE_3__.RFIDException.fromJson(jsonObject["error"]);
1719
- return [action, results, error]
1720
- })
1721
- }
1624
+ async _getTenant() {
1625
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getTenant", []);
1626
+ }
1722
1627
 
1723
- function _setDocumentReaderPrepareCompletion(completion) {
1724
- _setEvent("database_progress", completion, json => _info_PrepareProgress__WEBPACK_IMPORTED_MODULE_4__.PrepareProgress.fromJson(JSON.parse(json)))
1725
- }
1628
+ _setTenant(tenant) {
1629
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTenant", [tenant]);
1630
+ }
1726
1631
 
1727
- function _setCustomButtonTappedCompletion(completion) {
1728
- _setEvent("onCustomButtonTappedEvent", completion)
1729
- }
1632
+ async _getEnv() {
1633
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getEnv", []);
1634
+ }
1730
1635
 
1731
- function _setVideoEncoderCompletion(completion) {
1732
- _setEvent("video_encoder_completion", completion)
1733
- }
1636
+ _setEnv(env) {
1637
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setEnv", [env]);
1638
+ }
1734
1639
 
1735
- function _setRFIDProgressCompletion(completion) {
1736
- _setEvent("rfidOnProgressCompletion", completion, json => _rfid_RFIDNotification__WEBPACK_IMPORTED_MODULE_5__.RFIDNotification.fromJson(JSON.parse(json)))
1737
- }
1640
+ async _getLocale() {
1641
+ return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getLocale", []);
1642
+ }
1738
1643
 
1739
- function _setChipDetectedCompletion(completion) {
1740
- _setEvent("rfidOnChipDetectedEvent", completion)
1741
- }
1644
+ _setLocale(locale) {
1645
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setLocale", [locale]);
1646
+ }
1742
1647
 
1743
- function _setRetryReadChipCompletion(completion) {
1744
- _setEvent("rfidOnRetryReadChipEvent", completion, json => _info_RFIDException__WEBPACK_IMPORTED_MODULE_3__.RFIDException.fromJson(JSON.parse(json)))
1648
+ _setLocalizationDictionary(dictionary) {
1649
+ (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setLocalizationDictionary", [dictionary]);
1650
+ }
1745
1651
  }
1746
1652
 
1747
- function _setPaCertificateCompletion(completion) {
1748
- _setEvent("pa_certificate_completion", completion, json => {
1749
- var jsonObject = JSON.parse(json)
1750
- var serialNumber = jsonObject["serialNumber"]
1751
- var issuer = _rfid_PAResourcesIssuer__WEBPACK_IMPORTED_MODULE_6__.PAResourcesIssuer.fromJson(jsonObject["issuer"])
1752
- return [serialNumber, issuer, async certificates => {
1753
- await exec("providePACertificates", [certificates])
1754
- }]
1755
- })
1756
- }
1653
+ const DocReaderAction = {
1654
+ COMPLETE: 0,
1655
+ PROCESS: 1,
1656
+ MORE_PAGES_AVAILABLE: 2,
1657
+ CANCEL: 3,
1658
+ ERROR: 4,
1659
+ PROCESS_WHITE_FLASHLIGHT: 5,
1660
+ TIMEOUT: 6,
1661
+ PROCESSING_ON_SERVICE: 7,
1662
+ PROCESS_WHITE_UV_IMAGES: 102,
1663
+ PROCESS_IR_FRAME: 103
1664
+ };
1757
1665
 
1758
- function _setTaCertificateCompletion(completion) {
1759
- _setEvent("ta_certificate_completion", completion, data => {
1760
- return [data, async certificates => {
1761
- await exec("provideTACertificates", [certificates])
1762
- }]
1763
- })
1666
+ DocReaderAction.finished = function (value) {
1667
+ return value == DocReaderAction.COMPLETE || value == DocReaderAction.TIMEOUT
1764
1668
  }
1765
-
1766
- function _setTaSignatureCompletion(completion) {
1767
- _setEvent("ta_signature_completion", completion, json => {
1768
- return [_rfid_TAChallenge__WEBPACK_IMPORTED_MODULE_7__.TAChallenge.fromJson(json.decode(msg)), async signature => {
1769
- await exec("provideTASignature", [signature])
1770
- }]
1771
- })
1669
+ DocReaderAction.interrupted = function (value) {
1670
+ return value == DocReaderAction.CANCEL || value == DocReaderAction.ERROR
1671
+ }
1672
+ DocReaderAction.stopped = function (value) {
1673
+ return DocReaderAction.finished(value) || DocReaderAction.interrupted(value)
1772
1674
  }
1773
1675
 
1774
1676
 
1775
1677
  /***/ },
1776
1678
 
1777
- /***/ "./src/internal/cordova.js"
1778
- /*!*********************************!*\
1779
- !*** ./src/internal/cordova.js ***!
1780
- \*********************************/
1679
+ /***/ "./src/info/DocReaderException.js"
1680
+ /*!****************************************!*\
1681
+ !*** ./src/info/DocReaderException.js ***!
1682
+ \****************************************/
1781
1683
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1782
1684
 
1783
1685
  __webpack_require__.r(__webpack_exports__);
1784
1686
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1785
- /* harmony export */ NativeEventEmitter: () => (/* binding */ NativeEventEmitter),
1786
- /* harmony export */ NativeModules: () => (/* binding */ NativeModules)
1687
+ /* harmony export */ DocReaderException: () => (/* binding */ DocReaderException),
1688
+ /* harmony export */ ErrorCodes: () => (/* binding */ ErrorCodes)
1787
1689
  /* harmony export */ });
1788
- var _exec = (completion, params) => cordova.exec(completion, null, "DocumentReader", "exec", params)
1690
+ class DocReaderException {
1691
+ code
1692
+ message
1789
1693
 
1790
- const NativeModules = {
1791
- RNDocumentReader: {
1792
- exec: async (name, params) => new Promise((resolve, _) => _exec(data => resolve(data), [name, ...params]))
1793
- }
1794
- }
1694
+ static fromJson(jsonObject) {
1695
+ if (jsonObject == null) return null
1696
+ const result = new DocReaderException()
1795
1697
 
1796
- class NativeEventEmitter {
1797
- addListener(id, completion) {
1798
- _exec(completion, ["setEvent", id])
1698
+ result.code = jsonObject["code"]
1699
+ result.message = jsonObject["message"] ?? ""
1700
+
1701
+ return result
1799
1702
  }
1800
1703
 
1801
- removeAllListeners(id) {
1802
- _exec(null, ["setEvent", id])
1704
+ toJson() {
1705
+ return {
1706
+ "code": this.code,
1707
+ "message": this.message,
1708
+ }
1803
1709
  }
1804
1710
  }
1805
1711
 
1712
+ const ErrorCodes = {
1713
+ INITIALIZATION_CORE_ABSENT: 0,
1714
+ INITIALIZATION_FAILED: 1,
1715
+ INCORRECT_SCENARIO: 2,
1716
+ NO_RESULT: 3,
1717
+ REMOVE_DATABASE: 4,
1718
+ FETCHING_DATABASE: 5,
1719
+ DB_ID_NOT_FOUND: 6,
1720
+ DB_DESCRIPTION_NOT_FOUND: 7,
1721
+ SAVE_DB: 8,
1722
+ DOWNLOAD_DB_INCORRECT_CHECKSUM: 9,
1723
+ DB_DOWNLOAD: 10,
1724
+ DB_CREATION: 11,
1725
+ RFID_ERROR: 12,
1726
+ LICENSE_ABSENT_OR_CORRUPTED: 13,
1727
+ LICENSE_INVALID_DATE: 14,
1728
+ LICENSE_INVALID_VERSION: 15,
1729
+ LICENSE_INVALID_DEVICE_ID: 16,
1730
+ LICENSE_INVALID_SYSTEM_OR_APP_ID: 17,
1731
+ LICENSE_NO_CAPABILITIES: 18,
1732
+ LICENSE_NO_AUTHENTICITY: 19,
1733
+ RECORD_PROCESS_INVALID_OUTPUT_URL: 20,
1734
+ LICENSE_ONLINE_ERROR: 21,
1735
+ LICENSE_NO_DATABASE: 22,
1736
+ LICENSE_DATABASE_INCORRECT: 23,
1737
+ INVALID_TCC_PARAMS: 24,
1738
+ RFID_IN_PROGRESS: 25,
1739
+ START_BACKEND_PROCESSING: 26,
1740
+ ADD_DATA_TO_PACKAGE: 27,
1741
+ FINALIZE_FAILED: 28,
1742
+ CAMERA_NO_PERMISSION: 29,
1743
+ CAMERA_NOT_AVAILABLE: 30,
1744
+ CANNOT_USE_CAMERA_IN_SCENARIO: 40,
1745
+ BLUETOOTH_NO_PERMISSION: 41,
1746
+ BACKEND_ONLINE_PROCESSING: 303,
1747
+ WRONG_INPUT: 400,
1748
+ RESULT_UNAVAILABLE: 410,
1749
+ RESULT_WRONG_OUTPUT: 411,
1750
+ STATE_EXCEPTION: 500,
1751
+ BLE_EXCEPTION: 600,
1752
+ FEATURE_BLUETOOTH_LE_NOT_SUPPORTED: 601,
1753
+ APP_BACKGROUND: 700,
1754
+ ONLINE_PROCESSING_WRONG_INPUT: 800,
1755
+ MDL_EXCEPTION: 900,
1756
+ NATIVE_JAVA_EXCEPTION: 1000
1757
+ }
1758
+
1759
+
1806
1760
  /***/ },
1807
1761
 
1808
- /***/ "./src/mdl/DataRetrieval.js"
1809
- /*!**********************************!*\
1810
- !*** ./src/mdl/DataRetrieval.js ***!
1811
- \**********************************/
1762
+ /***/ "./src/info/DocReaderScenario.js"
1763
+ /*!***************************************!*\
1764
+ !*** ./src/info/DocReaderScenario.js ***!
1765
+ \***************************************/
1812
1766
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1813
1767
 
1814
1768
  __webpack_require__.r(__webpack_exports__);
1815
1769
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1816
- /* harmony export */ DataRetrieval: () => (/* binding */ DataRetrieval),
1817
- /* harmony export */ MDLDeviceRetrieval: () => (/* binding */ MDLDeviceRetrieval),
1818
- /* harmony export */ MDLDocRequestPreset: () => (/* binding */ MDLDocRequestPreset)
1770
+ /* harmony export */ DocReaderOrientation: () => (/* binding */ DocReaderOrientation),
1771
+ /* harmony export */ DocReaderScenario: () => (/* binding */ DocReaderScenario),
1772
+ /* harmony export */ Scenario: () => (/* binding */ Scenario)
1819
1773
  /* harmony export */ });
1820
- /* harmony import */ var _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NameSpaceMDL */ "./src/mdl/NameSpaceMDL.js");
1821
- /* harmony import */ var _DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DocumentRequestMDL */ "./src/mdl/DocumentRequestMDL.js");
1822
-
1823
-
1824
-
1825
- class DataRetrieval {
1826
- deviceRetrieval
1827
- docRequestPreset
1828
- intentToRetain = _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.MDLIntentToRetain.FALSE
1829
- requests = []
1830
-
1831
- constructor(deviceRetrieval) {
1832
- this.deviceRetrieval = deviceRetrieval
1833
- }
1834
-
1835
- setDocRequestPreset(docRequestPreset, intentToRetain) {
1836
- this.docRequestPreset = docRequestPreset
1837
- this.intentToRetain = intentToRetain
1838
- }
1774
+ class DocReaderScenario {
1775
+ name
1776
+ caption
1777
+ description
1778
+ frameOrientation
1779
+ uvTorch
1780
+ faceExt
1781
+ multiPageOff
1782
+ seriesProcessMode
1783
+ frameKWHLandscape
1784
+ frameKWHPortrait
1785
+ frameKWHDoublePageSpreadLandscape
1786
+ frameKWHDoublePageSpreadPortrait
1787
+ manualCrop
1839
1788
 
1840
- addDocRequest(request) {
1841
- this.requests.push(request);
1789
+ constructor() {
1842
1790
  }
1843
1791
 
1844
1792
  static fromJson(jsonObject) {
1845
1793
  if (jsonObject == null) return null
1846
- const result = new DataRetrieval(jsonObject["deviceRetrieval"])
1794
+ const result = new DocReaderScenario()
1847
1795
 
1848
- result.docRequestPreset = jsonObject["docRequestPreset"]
1849
- result.intentToRetain = jsonObject["intentToRetain"]
1850
- result.requests = (jsonObject["requests"]).map(item => _DocumentRequestMDL__WEBPACK_IMPORTED_MODULE_1__.DocumentRequestMDL.fromJson(item));
1796
+ result.uvTorch = jsonObject["uvTorch"]
1797
+ result.frameOrientation = jsonObject["frameOrientation"]
1798
+ result.faceExt = jsonObject["faceExt"]
1799
+ result.multiPageOff = jsonObject["multiPageOff"]
1800
+ result.seriesProcessMode = jsonObject["seriesProcessMode"]
1801
+ result.frameKWHLandscape = jsonObject["frameKWHLandscape"]
1802
+ result.frameKWHPortrait = jsonObject["frameKWHPortrait"]
1803
+ result.frameKWHDoublePageSpreadPortrait = jsonObject["frameKWHDoublePageSpreadPortrait"]
1804
+ result.frameKWHDoublePageSpreadLandscape = jsonObject["frameKWHDoublePageSpreadLandscape"]
1805
+ result.name = jsonObject["name"]
1806
+ result.caption = jsonObject["caption"]
1807
+ result.description = jsonObject["description"]
1808
+ result.manualCrop = jsonObject["manualCrop"]
1851
1809
 
1852
1810
  return result
1853
1811
  }
1854
1812
 
1855
1813
  toJson() {
1856
1814
  return {
1857
- "deviceRetrieval": this.deviceRetrieval,
1858
- "docRequestPreset": this.docRequestPreset,
1859
- "intentToRetain": this.intentToRetain,
1860
- "requests": this.requests.map(item => item.toJson())
1815
+ "uvTorch": this.uvTorch,
1816
+ "frameOrientation": this.frameOrientation,
1817
+ "faceExt": this.faceExt,
1818
+ "multiPageOff": this.multiPageOff,
1819
+ "seriesProcessMode": this.seriesProcessMode,
1820
+ "frameKWHLandscape": this.frameKWHLandscape,
1821
+ "frameKWHPortrait": this.frameKWHPortrait,
1822
+ "frameKWHDoublePageSpreadPortrait": this.frameKWHDoublePageSpreadPortrait,
1823
+ "frameKWHDoublePageSpreadLandscape": this.frameKWHDoublePageSpreadLandscape,
1824
+ "name": this.name,
1825
+ "caption": this.caption,
1826
+ "description": this.description,
1827
+ "manualCrop": this.manualCrop,
1861
1828
  }
1862
1829
  }
1863
1830
  }
1864
1831
 
1865
- const MDLDocRequestPreset = {
1866
- ALL: 0,
1867
- AGE: 1,
1868
- STANDARD_ID: 2,
1869
- TRAVEL: 3,
1870
- DRIVERS_LICENSE: 4,
1832
+ const Scenario = {
1833
+ MRZ: "Mrz",
1834
+ BARCODE: "Barcode",
1835
+ LOCATE: "Locate",
1836
+ OCR: "Ocr",
1837
+ DOCTYPE: "DocType",
1838
+ MRZ_OR_BARCODE: "MrzOrBarcode",
1839
+ MRZ_OR_LOCATE: "MrzOrLocate",
1840
+ MRZ_AND_LOCATE: "MrzAndLocate",
1841
+ BARCODE_AND_LOCATE: "BarcodeAndLocate",
1842
+ MRZ_OR_OCR: "MrzOrOcr",
1843
+ MRZ_OR_BARCODE_OR_OCR: "MrzOrBarcodeOrOcr",
1844
+ LOCATE_VISUAL_AND_MRZ_OR_OCR: "LocateVisual_And_MrzOrOcr",
1845
+ FULL_PROCESS: "FullProcess",
1846
+ FULL_AUTH: "FullAuth",
1847
+ ID3RUS: "Id3Rus",
1848
+ RUS_STAMP: "RusStamp",
1849
+ OCR_FREE: "OcrFree",
1850
+ CREDIT_CARD: "CreditCard",
1851
+ CAPTURE: "Capture",
1852
+ DTC: "DTC",
1853
+ RFID: "RFID"
1871
1854
  }
1872
1855
 
1873
- const MDLDeviceRetrieval = {
1874
- NFC: 1,
1875
- BLE: 2,
1856
+ const DocReaderOrientation = {
1857
+ ALL: 0,
1858
+ PORTRAIT: 1,
1859
+ LANDSCAPE: 2,
1860
+ LANDSCAPE_LEFT: 3,
1861
+ LANDSCAPE_RIGHT: 4
1876
1862
  }
1877
1863
 
1878
1864
 
1879
1865
  /***/ },
1880
1866
 
1881
- /***/ "./src/mdl/DeviceEngagement.js"
1882
- /*!*************************************!*\
1883
- !*** ./src/mdl/DeviceEngagement.js ***!
1884
- \*************************************/
1867
+ /***/ "./src/info/DocReaderVersion.js"
1868
+ /*!**************************************!*\
1869
+ !*** ./src/info/DocReaderVersion.js ***!
1870
+ \**************************************/
1885
1871
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1886
1872
 
1887
1873
  __webpack_require__.r(__webpack_exports__);
1888
1874
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1889
- /* harmony export */ DeviceEngagement: () => (/* binding */ DeviceEngagement),
1890
- /* harmony export */ MDLDeviceEngagement: () => (/* binding */ MDLDeviceEngagement)
1875
+ /* harmony export */ DocReaderVersion: () => (/* binding */ DocReaderVersion)
1891
1876
  /* harmony export */ });
1892
- /* harmony import */ var _DeviceRetrievalMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DeviceRetrievalMethod */ "./src/mdl/DeviceRetrievalMethod.js");
1877
+ /* harmony import */ var _DocumentsDatabase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DocumentsDatabase */ "./src/info/DocumentsDatabase.js");
1893
1878
 
1894
1879
 
1895
- class DeviceEngagement {
1896
- deviceRetrievalMethods = []
1880
+ class DocReaderVersion {
1881
+ api
1882
+ core
1883
+ coreMode
1884
+ database
1885
+
1886
+ constructor() {
1887
+ }
1897
1888
 
1898
1889
  static fromJson(jsonObject) {
1899
1890
  if (jsonObject == null) return null
1900
- const result = new DeviceEngagement()
1891
+ const result = new DocReaderVersion()
1901
1892
 
1902
- for (var item of jsonObject["deviceRetrievalMethods"]) {
1903
- item = _DeviceRetrievalMethod__WEBPACK_IMPORTED_MODULE_0__.DeviceRetrievalMethod.fromJson(item);
1904
- if (item != null) {
1905
- result.deviceRetrievalMethods.push(item);
1906
- }
1907
- }
1893
+ result.api = jsonObject["api"]
1894
+ result.core = jsonObject["core"]
1895
+ result.coreMode = jsonObject["coreMode"]
1896
+ result.database = _DocumentsDatabase__WEBPACK_IMPORTED_MODULE_0__.DocumentsDatabase.fromJson(jsonObject["database"])
1908
1897
 
1909
1898
  return result
1910
1899
  }
1911
1900
 
1912
1901
  toJson() {
1913
1902
  return {
1914
- "deviceRetrievalMethods": this.deviceRetrievalMethods.map(e => e.toJson()),
1903
+ "api": this.api,
1904
+ "core": this.core,
1905
+ "coreMode": this.coreMode,
1906
+ "database": this.database?.toJson(),
1915
1907
  }
1916
1908
  }
1917
1909
  }
1918
1910
 
1919
- const MDLDeviceEngagement = {
1920
- QR: 0,
1921
- NFC: 1,
1922
- }
1923
-
1924
1911
 
1925
1912
  /***/ },
1926
1913
 
1927
- /***/ "./src/mdl/DeviceRetrievalMethod.js"
1928
- /*!******************************************!*\
1929
- !*** ./src/mdl/DeviceRetrievalMethod.js ***!
1930
- \******************************************/
1914
+ /***/ "./src/info/DocumentsDatabase.js"
1915
+ /*!***************************************!*\
1916
+ !*** ./src/info/DocumentsDatabase.js ***!
1917
+ \***************************************/
1931
1918
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1932
1919
 
1933
1920
  __webpack_require__.r(__webpack_exports__);
1934
1921
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1935
- /* harmony export */ DeviceRetrievalMethod: () => (/* binding */ DeviceRetrievalMethod)
1922
+ /* harmony export */ DocumentsDatabase: () => (/* binding */ DocumentsDatabase)
1936
1923
  /* harmony export */ });
1937
- /* harmony import */ var _DataRetrieval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataRetrieval */ "./src/mdl/DataRetrieval.js");
1938
-
1939
-
1940
- class DeviceRetrievalMethod {
1941
- type
1924
+ class DocumentsDatabase {
1925
+ databaseID
1942
1926
  version
1943
- cmdMaxLength
1944
- respMaxLength
1945
- clientModeSupport
1946
- clientModeUUID
1947
- serverModeSupport
1948
- serverModeUUID
1927
+ date
1928
+ databaseDescription
1929
+ countriesNumber
1930
+ documentsNumber
1931
+ size
1932
+
1933
+ constructor() {
1934
+ }
1949
1935
 
1950
1936
  static fromJson(jsonObject) {
1951
1937
  if (jsonObject == null) return null
1952
- const result = new DeviceRetrievalMethod()
1938
+ const result = new DocumentsDatabase()
1953
1939
 
1954
- result.type = jsonObject["type"]
1940
+ result.databaseID = jsonObject["databaseID"]
1955
1941
  result.version = jsonObject["version"]
1956
- result.cmdMaxLength = jsonObject["cmdMaxLength"]
1957
- result.respMaxLength = jsonObject["respMaxLength"]
1958
- result.clientModeSupport = jsonObject["clientModeSupport"]
1959
- result.clientModeUUID = jsonObject["clientModeUUID"]
1960
- result.serverModeSupport = jsonObject["serverModeSupport"]
1961
- result.serverModeUUID = jsonObject["serverModeUUID"]
1942
+ result.date = jsonObject["date"]
1943
+ result.databaseDescription = jsonObject["databaseDescription"]
1944
+ result.countriesNumber = jsonObject["countriesNumber"]
1945
+ result.documentsNumber = jsonObject["documentsNumber"]
1946
+ result.size = jsonObject["size"]
1962
1947
 
1963
1948
  return result
1964
1949
  }
1965
1950
 
1966
1951
  toJson() {
1967
1952
  return {
1968
- "type": this.type,
1953
+ "databaseID": this.databaseID,
1969
1954
  "version": this.version,
1970
- "cmdMaxLength": this.cmdMaxLength,
1971
- "respMaxLength": this.respMaxLength,
1972
- "clientModeSupport": this.clientModeSupport,
1973
- "clientModeUUID": this.clientModeUUID,
1974
- "serverModeSupport": this.serverModeSupport,
1975
- "serverModeUUID": this.serverModeUUID,
1955
+ "date": this.date,
1956
+ "databaseDescription": this.databaseDescription,
1957
+ "countriesNumber": this.countriesNumber,
1958
+ "documentsNumber": this.documentsNumber,
1959
+ "size": this.size,
1976
1960
  }
1977
1961
  }
1978
1962
  }
@@ -1980,227 +1964,88 @@ class DeviceRetrievalMethod {
1980
1964
 
1981
1965
  /***/ },
1982
1966
 
1983
- /***/ "./src/mdl/DocumentRequestMDL.js"
1984
- /*!***************************************!*\
1985
- !*** ./src/mdl/DocumentRequestMDL.js ***!
1986
- \***************************************/
1967
+ /***/ "./src/info/License.js"
1968
+ /*!*****************************!*\
1969
+ !*** ./src/info/License.js ***!
1970
+ \*****************************/
1987
1971
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1988
1972
 
1989
1973
  __webpack_require__.r(__webpack_exports__);
1990
1974
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1991
- /* harmony export */ DocumentRequest18013MDL: () => (/* binding */ DocumentRequest18013MDL),
1992
- /* harmony export */ DocumentRequestMDL: () => (/* binding */ DocumentRequestMDL)
1975
+ /* harmony export */ License: () => (/* binding */ License)
1993
1976
  /* harmony export */ });
1994
- /* harmony import */ var _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NameSpaceMDL */ "./src/mdl/NameSpaceMDL.js");
1995
-
1996
-
1997
- class DocumentRequestMDL {
1998
- docType
1999
- namespaces = []
2000
-
2001
- constructor(docType) {
2002
- this.docType = docType
2003
- }
1977
+ /**
1978
+ * Class contains properties to get the information about the license.
1979
+ */
1980
+ class License {
1981
+ expiryDate
1982
+ countryFilter
1983
+ isRfidAvailable
2004
1984
 
2005
- addNameSpace(namespace) {
2006
- this.namespaces.push(namespace);
1985
+ constructor() {
2007
1986
  }
2008
1987
 
2009
1988
  static fromJson(jsonObject) {
2010
- if (jsonObject == null) return null;
2011
- var docType = jsonObject["docType"];
2012
- if (docType == "org.iso.18013.5.1.mDL") {
2013
- return DocumentRequest18013MDL.fromJson(jsonObject);
2014
- }
2015
- var result = new DocumentRequestMDL(docType);
1989
+ if (jsonObject == null) return null
1990
+ const result = new License()
2016
1991
 
2017
- result.namespaces = (jsonObject["namespaces"]).map(item => _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.NameSpaceMDL.fromJson(item));
1992
+ result.expiryDate = jsonObject["expiryDate"]
1993
+ result.countryFilter = jsonObject["countryFilter"]
1994
+ result.isRfidAvailable = jsonObject["isRfidAvailable"] ?? false
2018
1995
 
2019
- return result;
1996
+ return result
2020
1997
  }
2021
1998
 
2022
1999
  toJson() {
2023
2000
  return {
2024
- "docType": this.docType,
2025
- "namespaces": this.namespaces.map(item => item.toJson())
2001
+ "expiryDate": this.expiryDate,
2002
+ "countryFilter": this.countryFilter,
2003
+ "isRfidAvailable": this.isRfidAvailable,
2026
2004
  }
2027
2005
  }
2028
2006
  }
2029
2007
 
2030
- class DocumentRequest18013MDL extends DocumentRequestMDL {
2031
- familyName
2032
- givenName
2033
- birthDate
2034
- issueDate
2035
- expiryDate
2036
- issuingCountry
2037
- issuingAuthority
2038
- documentNumber
2039
- portrait
2040
- drivingPrivileges
2041
- unDistinguishingSign
2042
- administrativeNumber
2043
- sex
2044
- height
2045
- weight
2046
- eyeColour
2047
- hairColour
2048
- birthPlace
2049
- residentAddress
2050
- portraitCaptureDate
2051
- ageInYears
2052
- ageBirthYear
2053
- ageOver18
2054
- issuingJurisdiction
2055
- nationality
2056
- residentCity
2057
- residentState
2058
- residentPostalCode
2059
- residentCountry
2060
- biometricTemplateFace
2061
- biometricTemplateIris
2062
- biometricTemplateFinger
2063
- biometricTemplateSignatureSign
2064
- familyNameNationalCharacter
2065
- givenNameNationalCharacter
2066
- signatureUsualMark
2067
-
2068
- constructor() {
2069
- super("org.iso.18013.5.1.mDL")
2070
- }
2071
-
2072
- disableIntentToRetainValues() {
2073
- this.setAll(_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.MDLIntentToRetain.FALSE);
2074
- }
2075
-
2076
- enableIntentToRetainValues() {
2077
- this.setAll(_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.MDLIntentToRetain.TRUE);
2078
- }
2079
2008
 
2080
- setAll(value) {
2081
- this.familyName = value;
2082
- this.givenName = value;
2083
- this.birthDate = value;
2084
- this.issueDate = value;
2085
- this.expiryDate = value;
2086
- this.issuingCountry = value;
2087
- this.issuingAuthority = value;
2088
- this.documentNumber = value;
2089
- this.portrait = value;
2090
- this.drivingPrivileges = value;
2091
- this.unDistinguishingSign = value;
2092
- this.administrativeNumber = value;
2093
- this.sex = value;
2094
- this.height = value;
2095
- this.weight = value;
2096
- this.eyeColour = value;
2097
- this.hairColour = value;
2098
- this.birthPlace = value;
2099
- this.residentAddress = value;
2100
- this.portraitCaptureDate = value;
2101
- this.ageInYears = value;
2102
- this.ageBirthYear = value;
2103
- this.ageOver18 = value;
2104
- this.issuingJurisdiction = value;
2105
- this.nationality = value;
2106
- this.residentCity = value;
2107
- this.residentState = value;
2108
- this.residentPostalCode = value;
2109
- this.residentCountry = value;
2110
- this.biometricTemplateFace = value;
2111
- this.biometricTemplateIris = value;
2112
- this.biometricTemplateFinger = value;
2113
- this.biometricTemplateSignatureSign = value;
2114
- this.familyNameNationalCharacter = value;
2115
- this.givenNameNationalCharacter = value;
2116
- this.signatureUsualMark = value;
2117
- }
2009
+ /***/ },
2118
2010
 
2119
- static fromJson(jsonObject) {
2120
- if (jsonObject == null) return null
2121
- const result = new DocumentRequest18013MDL()
2011
+ /***/ "./src/info/PrepareProgress.js"
2012
+ /*!*************************************!*\
2013
+ !*** ./src/info/PrepareProgress.js ***!
2014
+ \*************************************/
2015
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2122
2016
 
2123
- result.namespaces = (jsonObject["namespaces"]).map(item => _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.NameSpaceMDL.fromJson(item));
2124
- result.familyName = jsonObject["familyName"]
2125
- result.givenName = jsonObject["givenName"]
2126
- result.birthDate = jsonObject["birthDate"]
2127
- result.issueDate = jsonObject["issueDate"]
2128
- result.expiryDate = jsonObject["expiryDate"]
2129
- result.issuingCountry = jsonObject["issuingCountry"]
2130
- result.issuingAuthority = jsonObject["issuingAuthority"]
2131
- result.documentNumber = jsonObject["documentNumber"]
2132
- result.portrait = jsonObject["portrait"]
2133
- result.drivingPrivileges = jsonObject["drivingPrivileges"]
2134
- result.unDistinguishingSign = jsonObject["unDistinguishingSign"]
2135
- result.administrativeNumber = jsonObject["administrativeNumber"]
2136
- result.sex = jsonObject["sex"]
2137
- result.height = jsonObject["height"]
2138
- result.weight = jsonObject["weight"]
2139
- result.eyeColour = jsonObject["eyeColour"]
2140
- result.hairColour = jsonObject["hairColour"]
2141
- result.birthPlace = jsonObject["birthPlace"]
2142
- result.residentAddress = jsonObject["residentAddress"]
2143
- result.portraitCaptureDate = jsonObject["portraitCaptureDate"]
2144
- result.ageInYears = jsonObject["ageInYears"]
2145
- result.ageBirthYear = jsonObject["ageBirthYear"]
2146
- result.ageOver18 = jsonObject["ageOver18"]
2147
- result.issuingJurisdiction = jsonObject["issuingJurisdiction"]
2148
- result.nationality = jsonObject["nationality"]
2149
- result.residentCity = jsonObject["residentCity"]
2150
- result.residentState = jsonObject["residentState"]
2151
- result.residentPostalCode = jsonObject["residentPostalCode"]
2152
- result.residentCountry = jsonObject["residentCountry"]
2153
- result.biometricTemplateFace = jsonObject["biometricTemplateFace"]
2154
- result.biometricTemplateIris = jsonObject["biometricTemplateIris"]
2155
- result.biometricTemplateFinger = jsonObject["biometricTemplateFinger"]
2156
- result.biometricTemplateSignatureSign = jsonObject["biometricTemplateSignatureSign"]
2157
- result.familyNameNationalCharacter = jsonObject["familyNameNationalCharacter"]
2158
- result.givenNameNationalCharacter = jsonObject["givenNameNationalCharacter"]
2159
- result.signatureUsualMark = jsonObject["signatureUsualMark"]
2017
+ __webpack_require__.r(__webpack_exports__);
2018
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2019
+ /* harmony export */ PrepareProgress: () => (/* binding */ PrepareProgress)
2020
+ /* harmony export */ });
2021
+ /**
2022
+ * Class contains info about database preparation progress.
2023
+ */
2024
+ class PrepareProgress {
2025
+ downloadedBytes
2026
+ totalBytes
2027
+ progress
2160
2028
 
2161
- return result
2029
+ constructor(downloadedBytes, totalBytes, progress) {
2030
+ this.downloadedBytes = downloadedBytes
2031
+ this.totalBytes = totalBytes
2032
+ this.progress = progress
2033
+ }
2034
+
2035
+ static fromJson(jsonObject) {
2036
+ if (jsonObject == null) return null
2037
+ return new PrepareProgress(
2038
+ jsonObject["downloadedBytes"],
2039
+ jsonObject["totalBytes"],
2040
+ jsonObject["progress"]
2041
+ )
2162
2042
  }
2163
2043
 
2164
2044
  toJson() {
2165
2045
  return {
2166
- "docType": this.docType,
2167
- "namespaces": this.namespaces.map(item => item.toJson()),
2168
- "familyName": this.familyName,
2169
- "givenName": this.givenName,
2170
- "birthDate": this.birthDate,
2171
- "issueDate": this.issueDate,
2172
- "expiryDate": this.expiryDate,
2173
- "issuingCountry": this.issuingCountry,
2174
- "issuingAuthority": this.issuingAuthority,
2175
- "documentNumber": this.documentNumber,
2176
- "portrait": this.portrait,
2177
- "drivingPrivileges": this.drivingPrivileges,
2178
- "unDistinguishingSign": this.unDistinguishingSign,
2179
- "administrativeNumber": this.administrativeNumber,
2180
- "sex": this.sex,
2181
- "height": this.height,
2182
- "weight": this.weight,
2183
- "eyeColour": this.eyeColour,
2184
- "hairColour": this.hairColour,
2185
- "birthPlace": this.birthPlace,
2186
- "residentAddress": this.residentAddress,
2187
- "portraitCaptureDate": this.portraitCaptureDate,
2188
- "ageInYears": this.ageInYears,
2189
- "ageBirthYear": this.ageBirthYear,
2190
- "ageOver18": this.ageOver18,
2191
- "issuingJurisdiction": this.issuingJurisdiction,
2192
- "nationality": this.nationality,
2193
- "residentCity": this.residentCity,
2194
- "residentState": this.residentState,
2195
- "residentPostalCode": this.residentPostalCode,
2196
- "residentCountry": this.residentCountry,
2197
- "biometricTemplateFace": this.biometricTemplateFace,
2198
- "biometricTemplateIris": this.biometricTemplateIris,
2199
- "biometricTemplateFinger": this.biometricTemplateFinger,
2200
- "biometricTemplateSignatureSign": this.biometricTemplateSignatureSign,
2201
- "familyNameNationalCharacter": this.familyNameNationalCharacter,
2202
- "givenNameNationalCharacter": this.givenNameNationalCharacter,
2203
- "signatureUsualMark": this.signatureUsualMark,
2046
+ "downloadedBytes": this.downloadedBytes,
2047
+ "totalBytes": this.totalBytes,
2048
+ "progress": this.progress,
2204
2049
  }
2205
2050
  }
2206
2051
  }
@@ -2208,51 +2053,206 @@ class DocumentRequest18013MDL extends DocumentRequestMDL {
2208
2053
 
2209
2054
  /***/ },
2210
2055
 
2211
- /***/ "./src/mdl/NameSpaceMDL.js"
2212
- /*!*********************************!*\
2213
- !*** ./src/mdl/NameSpaceMDL.js ***!
2214
- \*********************************/
2056
+ /***/ "./src/info/RFIDException.js"
2057
+ /*!***********************************!*\
2058
+ !*** ./src/info/RFIDException.js ***!
2059
+ \***********************************/
2215
2060
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2216
2061
 
2217
2062
  __webpack_require__.r(__webpack_exports__);
2218
2063
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2219
- /* harmony export */ MDLIntentToRetain: () => (/* binding */ MDLIntentToRetain),
2220
- /* harmony export */ NameSpaceMDL: () => (/* binding */ NameSpaceMDL)
2064
+ /* harmony export */ RFIDException: () => (/* binding */ RFIDException)
2221
2065
  /* harmony export */ });
2222
- class NameSpaceMDL {
2223
- name
2224
- map = {}
2066
+ /* harmony import */ var _rfid_RFIDErrorCodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rfid/RFIDErrorCodes */ "./src/rfid/RFIDErrorCodes.js");
2225
2067
 
2226
- constructor(name) {
2227
- this.name = name
2228
- }
2229
2068
 
2230
- addField(name, intentToRetain) {
2231
- this.map[name] = intentToRetain;
2232
- }
2069
+ class RFIDException {
2070
+ code
2071
+ message
2072
+
2073
+ constructor() {
2074
+ }
2233
2075
 
2234
2076
  static fromJson(jsonObject) {
2235
2077
  if (jsonObject == null) return null
2236
- const result = new NameSpaceMDL(jsonObject["name"])
2078
+ const result = new RFIDException()
2237
2079
 
2238
- result.map = jsonObject["map"]
2080
+ result.code = jsonObject["code"]
2081
+ result.message = jsonObject["message"] ?? ""
2239
2082
 
2240
2083
  return result
2241
2084
  }
2242
2085
 
2243
2086
  toJson() {
2244
2087
  return {
2245
- "name": this.name,
2246
- "map": this.map
2088
+ "code": this.code,
2089
+ "message": this.message,
2247
2090
  }
2248
2091
  }
2249
2092
  }
2250
2093
 
2251
- const MDLIntentToRetain = {
2252
- FALSE: 0,
2253
- TRUE: 1,
2094
+
2095
+ /***/ },
2096
+
2097
+ /***/ "./src/internal/bridge.js"
2098
+ /*!********************************!*\
2099
+ !*** ./src/internal/bridge.js ***!
2100
+ \********************************/
2101
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2102
+
2103
+ __webpack_require__.r(__webpack_exports__);
2104
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2105
+ /* harmony export */ _setChipDetectedCompletion: () => (/* binding */ _setChipDetectedCompletion),
2106
+ /* harmony export */ _setCustomButtonTappedCompletion: () => (/* binding */ _setCustomButtonTappedCompletion),
2107
+ /* harmony export */ _setDocumentReaderCompletion: () => (/* binding */ _setDocumentReaderCompletion),
2108
+ /* harmony export */ _setDocumentReaderPrepareCompletion: () => (/* binding */ _setDocumentReaderPrepareCompletion),
2109
+ /* harmony export */ _setPaCertificateCompletion: () => (/* binding */ _setPaCertificateCompletion),
2110
+ /* harmony export */ _setRFIDCompletion: () => (/* binding */ _setRFIDCompletion),
2111
+ /* harmony export */ _setRFIDProgressCompletion: () => (/* binding */ _setRFIDProgressCompletion),
2112
+ /* harmony export */ _setRetryReadChipCompletion: () => (/* binding */ _setRetryReadChipCompletion),
2113
+ /* harmony export */ _setTaCertificateCompletion: () => (/* binding */ _setTaCertificateCompletion),
2114
+ /* harmony export */ _setTaSignatureCompletion: () => (/* binding */ _setTaSignatureCompletion),
2115
+ /* harmony export */ _setVideoEncoderCompletion: () => (/* binding */ _setVideoEncoderCompletion),
2116
+ /* harmony export */ exec: () => (/* binding */ exec)
2117
+ /* harmony export */ });
2118
+ /* harmony import */ var _cordova__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cordova */ "./src/internal/cordova.js");
2119
+ /* harmony import */ var _results_Results__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../results/Results */ "./src/results/Results.js");
2120
+ /* harmony import */ var _info_DocReaderException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../info/DocReaderException */ "./src/info/DocReaderException.js");
2121
+ /* harmony import */ var _info_RFIDException__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../info/RFIDException */ "./src/info/RFIDException.js");
2122
+ /* harmony import */ var _info_PrepareProgress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../info/PrepareProgress */ "./src/info/PrepareProgress.js");
2123
+ /* harmony import */ var _rfid_RFIDNotification__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../rfid/RFIDNotification */ "./src/rfid/RFIDNotification.js");
2124
+ /* harmony import */ var _rfid_PAResourcesIssuer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rfid/PAResourcesIssuer */ "./src/rfid/PAResourcesIssuer.js");
2125
+ /* harmony import */ var _rfid_TAChallenge__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../rfid/TAChallenge */ "./src/rfid/TAChallenge.js");
2126
+
2127
+
2128
+
2129
+
2130
+
2131
+
2132
+
2133
+
2134
+
2135
+
2136
+ const { RNDocumentReader } = _cordova__WEBPACK_IMPORTED_MODULE_0__.NativeModules
2137
+ var eventManager = new _cordova__WEBPACK_IMPORTED_MODULE_0__.NativeEventEmitter(RNDocumentReader)
2138
+
2139
+ async function exec(name, params) {
2140
+ return RNDocumentReader.exec(name, params)
2141
+ }
2142
+
2143
+ function _setEvent(id, completion, fromJson) {
2144
+ eventManager.removeAllListeners(id)
2145
+ if (completion == null) return
2146
+ if (fromJson == null) eventManager.addListener(id, completion)
2147
+ else eventManager.addListener(id, data => {
2148
+ data = fromJson(data)
2149
+ if (data !== null && typeof data[Symbol.iterator] === 'function') completion(...data)
2150
+ else completion(data)
2151
+ })
2152
+ }
2153
+
2154
+ function _setDocumentReaderCompletion(completion) {
2155
+ _setEvent("completion", completion, json => {
2156
+ var jsonObject = JSON.parse(json)
2157
+ var action = jsonObject["action"];
2158
+ var results = _results_Results__WEBPACK_IMPORTED_MODULE_1__.Results.fromJson(jsonObject["results"]);
2159
+ var error = _info_DocReaderException__WEBPACK_IMPORTED_MODULE_2__.DocReaderException.fromJson(jsonObject["error"]);
2160
+ return [action, results, error]
2161
+ })
2162
+ }
2163
+
2164
+ function _setRFIDCompletion(completion) {
2165
+ _setEvent("completion", completion, json => {
2166
+ var jsonObject = JSON.parse(json)
2167
+ var action = jsonObject["action"];
2168
+ var results = _results_Results__WEBPACK_IMPORTED_MODULE_1__.Results.fromJson(jsonObject["results"]);
2169
+ var error = _info_RFIDException__WEBPACK_IMPORTED_MODULE_3__.RFIDException.fromJson(jsonObject["error"]);
2170
+ return [action, results, error]
2171
+ })
2172
+ }
2173
+
2174
+ function _setDocumentReaderPrepareCompletion(completion) {
2175
+ _setEvent("database_progress", completion, json => _info_PrepareProgress__WEBPACK_IMPORTED_MODULE_4__.PrepareProgress.fromJson(JSON.parse(json)))
2176
+ }
2177
+
2178
+ function _setCustomButtonTappedCompletion(completion) {
2179
+ _setEvent("onCustomButtonTappedEvent", completion)
2180
+ }
2181
+
2182
+ function _setVideoEncoderCompletion(completion) {
2183
+ _setEvent("video_encoder_completion", completion)
2184
+ }
2185
+
2186
+ function _setRFIDProgressCompletion(completion) {
2187
+ _setEvent("rfidOnProgressCompletion", completion, json => _rfid_RFIDNotification__WEBPACK_IMPORTED_MODULE_5__.RFIDNotification.fromJson(JSON.parse(json)))
2188
+ }
2189
+
2190
+ function _setChipDetectedCompletion(completion) {
2191
+ _setEvent("rfidOnChipDetectedEvent", completion)
2192
+ }
2193
+
2194
+ function _setRetryReadChipCompletion(completion) {
2195
+ _setEvent("rfidOnRetryReadChipEvent", completion, json => _info_RFIDException__WEBPACK_IMPORTED_MODULE_3__.RFIDException.fromJson(JSON.parse(json)))
2196
+ }
2197
+
2198
+ function _setPaCertificateCompletion(completion) {
2199
+ _setEvent("pa_certificate_completion", completion, json => {
2200
+ var jsonObject = JSON.parse(json)
2201
+ var serialNumber = jsonObject["serialNumber"]
2202
+ var issuer = _rfid_PAResourcesIssuer__WEBPACK_IMPORTED_MODULE_6__.PAResourcesIssuer.fromJson(jsonObject["issuer"])
2203
+ return [serialNumber, issuer, async certificates => {
2204
+ await exec("providePACertificates", [certificates])
2205
+ }]
2206
+ })
2207
+ }
2208
+
2209
+ function _setTaCertificateCompletion(completion) {
2210
+ _setEvent("ta_certificate_completion", completion, data => {
2211
+ return [data, async certificates => {
2212
+ await exec("provideTACertificates", [certificates])
2213
+ }]
2214
+ })
2215
+ }
2216
+
2217
+ function _setTaSignatureCompletion(completion) {
2218
+ _setEvent("ta_signature_completion", completion, json => {
2219
+ return [_rfid_TAChallenge__WEBPACK_IMPORTED_MODULE_7__.TAChallenge.fromJson(json.decode(msg)), async signature => {
2220
+ await exec("provideTASignature", [signature])
2221
+ }]
2222
+ })
2223
+ }
2224
+
2225
+
2226
+ /***/ },
2227
+
2228
+ /***/ "./src/internal/cordova.js"
2229
+ /*!*********************************!*\
2230
+ !*** ./src/internal/cordova.js ***!
2231
+ \*********************************/
2232
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2233
+
2234
+ __webpack_require__.r(__webpack_exports__);
2235
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2236
+ /* harmony export */ NativeEventEmitter: () => (/* binding */ NativeEventEmitter),
2237
+ /* harmony export */ NativeModules: () => (/* binding */ NativeModules)
2238
+ /* harmony export */ });
2239
+ var _exec = (completion, params) => cordova.exec(completion, null, "DocumentReader", "exec", params)
2240
+
2241
+ const NativeModules = {
2242
+ RNDocumentReader: {
2243
+ exec: async (name, params) => new Promise((resolve, _) => _exec(data => resolve(data), [name, ...params]))
2244
+ }
2254
2245
  }
2255
2246
 
2247
+ class NativeEventEmitter {
2248
+ addListener(id, completion) {
2249
+ _exec(completion, ["setEvent", id])
2250
+ }
2251
+
2252
+ removeAllListeners(id) {
2253
+ _exec(null, ["setEvent", id])
2254
+ }
2255
+ }
2256
2256
 
2257
2257
  /***/ },
2258
2258