@regulaforensics/document-reader 9.2.542-nightly → 9.2.547-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 (31) 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 +436 -489
  7. package/examples/ionic/package.json +1 -1
  8. package/examples/react_native/package.json +1 -1
  9. package/ios/RGLWMain.m +16 -22
  10. package/package.json +1 -1
  11. package/plugin.xml +2 -2
  12. package/test/package-lock.json +1 -1
  13. package/www/capacitor/index.js +5 -5
  14. package/www/cordova.js +1214 -1214
  15. package/www/react-native/index.js +5 -5
  16. package/www/types/index.d.ts +5 -5
  17. /package/www/capacitor/{engagement → mdl}/DataRetrieval.js +0 -0
  18. /package/www/capacitor/{engagement → mdl}/DeviceEngagement.js +0 -0
  19. /package/www/capacitor/{engagement → mdl}/DeviceRetrievalMethod.js +0 -0
  20. /package/www/capacitor/{engagement → mdl}/DocumentRequestMDL.js +0 -0
  21. /package/www/capacitor/{engagement → mdl}/NameSpaceMDL.js +0 -0
  22. /package/www/react-native/{engagement → mdl}/DataRetrieval.js +0 -0
  23. /package/www/react-native/{engagement → mdl}/DeviceEngagement.js +0 -0
  24. /package/www/react-native/{engagement → mdl}/DeviceRetrievalMethod.js +0 -0
  25. /package/www/react-native/{engagement → mdl}/DocumentRequestMDL.js +0 -0
  26. /package/www/react-native/{engagement → mdl}/NameSpaceMDL.js +0 -0
  27. /package/www/types/{engagement → mdl}/DataRetrieval.d.ts +0 -0
  28. /package/www/types/{engagement → mdl}/DeviceEngagement.d.ts +0 -0
  29. /package/www/types/{engagement → mdl}/DeviceRetrievalMethod.d.ts +0 -0
  30. /package/www/types/{engagement → mdl}/DocumentRequestMDL.d.ts +0 -0
  31. /package/www/types/{engagement → mdl}/NameSpaceMDL.d.ts +0 -0
package/www/cordova.js CHANGED
@@ -398,457 +398,6 @@ 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
-
852
401
  /***/ },
853
402
 
854
403
  /***/ "./src/index.js"
@@ -895,9 +444,9 @@ __webpack_require__.r(__webpack_exports__);
895
444
  /* harmony export */ CustomizationImages: () => (/* reexport safe */ _params_customization_CustomizationImages__WEBPACK_IMPORTED_MODULE_88__.CustomizationImages),
896
445
  /* harmony export */ DTCDataGroup: () => (/* reexport safe */ _params_rfid_scenario_DTCDataGroup__WEBPACK_IMPORTED_MODULE_94__.DTCDataGroup),
897
446
  /* harmony export */ DataField: () => (/* reexport safe */ _results_rfid_DataField__WEBPACK_IMPORTED_MODULE_59__.DataField),
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),
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),
901
450
  /* harmony export */ DocFeature: () => (/* reexport safe */ _results_visible_digital_seals_DocFeature__WEBPACK_IMPORTED_MODULE_54__.DocFeature),
902
451
  /* harmony export */ DocFormat: () => (/* reexport safe */ _results_DocumentType__WEBPACK_IMPORTED_MODULE_28__.DocFormat),
903
452
  /* harmony export */ DocReaderAction: () => (/* binding */ DocReaderAction),
@@ -907,8 +456,8 @@ __webpack_require__.r(__webpack_exports__);
907
456
  /* harmony export */ DocReaderScenario: () => (/* reexport safe */ _info_DocReaderScenario__WEBPACK_IMPORTED_MODULE_11__.DocReaderScenario),
908
457
  /* harmony export */ DocReaderVersion: () => (/* reexport safe */ _info_DocReaderVersion__WEBPACK_IMPORTED_MODULE_6__.DocReaderVersion),
909
458
  /* harmony export */ DocumentReader: () => (/* binding */ DocumentReader),
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),
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),
912
461
  /* harmony export */ DocumentType: () => (/* reexport safe */ _results_DocumentType__WEBPACK_IMPORTED_MODULE_28__.DocumentType),
913
462
  /* harmony export */ DocumentTypeEnum: () => (/* reexport safe */ _results_DocumentType__WEBPACK_IMPORTED_MODULE_28__.DocType),
914
463
  /* harmony export */ DocumentsDatabase: () => (/* reexport safe */ _info_DocumentsDatabase__WEBPACK_IMPORTED_MODULE_9__.DocumentsDatabase),
@@ -944,14 +493,14 @@ __webpack_require__.r(__webpack_exports__);
944
493
  /* harmony export */ Lights: () => (/* reexport safe */ _results_visual_results_Lights__WEBPACK_IMPORTED_MODULE_20__.Lights),
945
494
  /* harmony export */ LivenessParams: () => (/* reexport safe */ _params_process_params_LivenessParams__WEBPACK_IMPORTED_MODULE_77__.LivenessParams),
946
495
  /* harmony export */ LogLevel: () => (/* reexport safe */ _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.LogLevel),
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),
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),
951
500
  /* harmony export */ MRZFormat: () => (/* reexport safe */ _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.MRZFormat),
952
501
  /* harmony export */ MeasureSystem: () => (/* reexport safe */ _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.MeasureSystem),
953
502
  /* harmony export */ MrzDetectionModes: () => (/* reexport safe */ _params_process_params_ProcessParams__WEBPACK_IMPORTED_MODULE_78__.MrzDetectionModes),
954
- /* harmony export */ NameSpaceMDL: () => (/* reexport safe */ _engagement_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_106__.NameSpaceMDL),
503
+ /* harmony export */ NameSpaceMDL: () => (/* reexport safe */ _mdl_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_106__.NameSpaceMDL),
955
504
  /* harmony export */ OnlineMode: () => (/* reexport safe */ _config_OnlineProcessingConfig__WEBPACK_IMPORTED_MODULE_1__.OnlineMode),
956
505
  /* harmony export */ OnlineProcessingConfig: () => (/* reexport safe */ _config_OnlineProcessingConfig__WEBPACK_IMPORTED_MODULE_1__.OnlineProcessingConfig),
957
506
  /* harmony export */ OpticalStatus: () => (/* reexport safe */ _results_status_OpticalStatus__WEBPACK_IMPORTED_MODULE_35__.OpticalStatus),
@@ -1114,11 +663,13 @@ __webpack_require__.r(__webpack_exports__);
1114
663
  /* harmony import */ var _rfid_PAAttribute__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./rfid/PAAttribute */ "./src/rfid/PAAttribute.js");
1115
664
  /* harmony import */ var _rfid_TAChallenge__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./rfid/TAChallenge */ "./src/rfid/TAChallenge.js");
1116
665
  /* harmony import */ var _rfid_PKDCertificate__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./rfid/PKDCertificate */ "./src/rfid/PKDCertificate.js");
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");
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
+
1122
673
 
1123
674
 
1124
675
 
@@ -1260,703 +811,1168 @@ __webpack_require__.r(__webpack_exports__);
1260
811
 
1261
812
 
1262
813
 
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
+
1341
+ static fromJson(jsonObject) {
1342
+ if (jsonObject == null) return null
1343
+ const result = new DocReaderScenario()
1263
1344
 
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"]
1264
1358
 
1265
- class DocumentReader {
1266
- static get instance() { return DocumentReader._instance }
1267
- static _instance = new DocumentReader()
1359
+ return result
1360
+ }
1268
1361
 
1269
- get availableScenarios() { return this._availableScenarios }
1270
- _availableScenarios = []
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
+ }
1271
1380
 
1272
- get version() { return this._version }
1273
- _version = null
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
+ }
1274
1404
 
1275
- get license() { return this._license }
1276
- _license = new _info_License__WEBPACK_IMPORTED_MODULE_10__.License()
1405
+ const DocReaderOrientation = {
1406
+ ALL: 0,
1407
+ PORTRAIT: 1,
1408
+ LANDSCAPE: 2,
1409
+ LANDSCAPE_LEFT: 3,
1410
+ LANDSCAPE_RIGHT: 4
1411
+ }
1277
1412
 
1278
- async isRFIDAvailableForUse() {
1279
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getIsRFIDAvailableForUse", []);
1280
- }
1281
1413
 
1282
- async isAuthenticatorRFIDAvailableForUse() {
1283
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("isAuthenticatorRFIDAvailableForUse", []);
1284
- }
1414
+ /***/ },
1285
1415
 
1286
- async isAuthenticatorAvailableForUse() {
1287
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("isAuthenticatorAvailableForUse", []);
1288
- }
1416
+ /***/ "./src/info/DocReaderVersion.js"
1417
+ /*!**************************************!*\
1418
+ !*** ./src/info/DocReaderVersion.js ***!
1419
+ \**************************************/
1420
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1289
1421
 
1290
- get rfidSessionStatus() { return this._rfidSessionStatus }
1291
- _rfidSessionStatus = null
1292
- set rfidSessionStatus(val) {
1293
- this._rfidSessionStatus = val;
1294
- this._setRfidSessionStatus(val);
1295
- }
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");
1296
1427
 
1297
- get tag() { return this._tag }
1298
- _tag = null
1299
- set tag(val) {
1300
- this._tag = val;
1301
- this._setTag(val);
1302
- }
1303
1428
 
1304
- get tenant() { return this._tenant }
1305
- _tenant = null
1306
- set tenant(val) {
1307
- this._tenant = val;
1308
- this._setTenant(val);
1309
- }
1429
+ class DocReaderVersion {
1430
+ api
1431
+ core
1432
+ coreMode
1433
+ database
1310
1434
 
1311
- get env() { return this._env }
1312
- _env = null
1313
- set env(val) {
1314
- this._env = val;
1315
- this._setEnv(val);
1435
+ constructor() {
1316
1436
  }
1317
1437
 
1318
- get locale() { return this._locale }
1319
- _locale = null
1320
- set locale(val) {
1321
- this._locale = val;
1322
- this._setLocale(val);
1323
- }
1438
+ static fromJson(jsonObject) {
1439
+ if (jsonObject == null) return null
1440
+ const result = new DocReaderVersion()
1324
1441
 
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
- }
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"])
1333
1446
 
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();
1447
+ return result
1339
1448
  }
1340
1449
 
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();
1450
+ toJson() {
1451
+ return {
1452
+ "api": this.api,
1453
+ "core": this.core,
1454
+ "coreMode": this.coreMode,
1455
+ "database": this.database?.toJson(),
1456
+ }
1346
1457
  }
1458
+ }
1347
1459
 
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
- }
1354
1460
 
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
- }
1461
+ /***/ },
1361
1462
 
1362
- async isReady() {
1363
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getDocumentReaderIsReady", []);
1364
- }
1463
+ /***/ "./src/info/DocumentsDatabase.js"
1464
+ /*!***************************************!*\
1465
+ !*** ./src/info/DocumentsDatabase.js ***!
1466
+ \***************************************/
1467
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1365
1468
 
1366
- async status() {
1367
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getDocumentReaderStatus", []);
1368
- }
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
1369
1481
 
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();
1482
+ constructor() {
1376
1483
  }
1377
1484
 
1378
- set onCustomButtonTapped(completion) {
1379
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setCustomButtonTappedCompletion)(completion);
1380
- }
1485
+ static fromJson(jsonObject) {
1486
+ if (jsonObject == null) return null
1487
+ const result = new DocumentsDatabase()
1381
1488
 
1382
- set videoEncoderCompletion(completion) {
1383
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setVideoEncoderCompletion)(completion);
1384
- }
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"]
1385
1496
 
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]
1497
+ return result
1391
1498
  }
1392
1499
 
1393
- async connectBluetoothDevice(deviceName) {
1394
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("connectBluetoothDevice", [deviceName]);
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
+ }
1395
1510
  }
1511
+ }
1396
1512
 
1397
- deinitializeReader() {
1398
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("deinitializeReader", []);
1399
- }
1400
1513
 
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
- }
1514
+ /***/ },
1406
1515
 
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);
1411
- }
1516
+ /***/ "./src/info/License.js"
1517
+ /*!*****************************!*\
1518
+ !*** ./src/info/License.js ***!
1519
+ \*****************************/
1520
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1412
1521
 
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);
1416
- }
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
1417
1533
 
1418
- async cancelDBUpdate() {
1419
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("cancelDBUpdate", []);
1534
+ constructor() {
1420
1535
  }
1421
1536
 
1422
- async removeDatabase() {
1423
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("removeDatabase", []);
1424
- }
1537
+ static fromJson(jsonObject) {
1538
+ if (jsonObject == null) return null
1539
+ const result = new License()
1425
1540
 
1426
- startNewPage() {
1427
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startNewPage", []);
1428
- }
1541
+ result.expiryDate = jsonObject["expiryDate"]
1542
+ result.countryFilter = jsonObject["countryFilter"]
1543
+ result.isRfidAvailable = jsonObject["isRfidAvailable"] ?? false
1429
1544
 
1430
- startNewSession() {
1431
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("startNewSession", []);
1545
+ return result
1432
1546
  }
1433
1547
 
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]);
1548
+ toJson() {
1549
+ return {
1550
+ "expiryDate": this.expiryDate,
1551
+ "countryFilter": this.countryFilter,
1552
+ "isRfidAvailable": this.isRfidAvailable,
1553
+ }
1437
1554
  }
1555
+ }
1438
1556
 
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]);
1557
+
1558
+ /***/ },
1559
+
1560
+ /***/ "./src/info/PrepareProgress.js"
1561
+ /*!*************************************!*\
1562
+ !*** ./src/info/PrepareProgress.js ***!
1563
+ \*************************************/
1564
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1565
+
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
1577
+
1578
+ constructor(downloadedBytes, totalBytes, progress) {
1579
+ this.downloadedBytes = downloadedBytes
1580
+ this.totalBytes = totalBytes
1581
+ this.progress = progress
1442
1582
  }
1443
1583
 
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]);
1584
+ static fromJson(jsonObject) {
1585
+ if (jsonObject == null) return null
1586
+ return new PrepareProgress(
1587
+ jsonObject["downloadedBytes"],
1588
+ jsonObject["totalBytes"],
1589
+ jsonObject["progress"]
1590
+ )
1447
1591
  }
1448
1592
 
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);
1593
+ toJson() {
1594
+ return {
1595
+ "downloadedBytes": this.downloadedBytes,
1596
+ "totalBytes": this.totalBytes,
1597
+ "progress": this.progress,
1454
1598
  }
1599
+ }
1600
+ }
1455
1601
 
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);
1462
1602
 
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
- }
1603
+ /***/ },
1469
1604
 
1470
- stopScanner() {
1471
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("stopScanner", []);
1472
- }
1605
+ /***/ "./src/info/RFIDException.js"
1606
+ /*!***********************************!*\
1607
+ !*** ./src/info/RFIDException.js ***!
1608
+ \***********************************/
1609
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1473
1610
 
1474
- stopRFIDReader() {
1475
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("stopRFIDReader", []);
1476
- }
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");
1477
1616
 
1478
- addPKDCertificates(certificates) {
1479
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("addPKDCertificates", [certificates]);
1480
- }
1481
1617
 
1482
- clearPKDCertificates() {
1483
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("clearPKDCertificates", []);
1484
- }
1618
+ class RFIDException {
1619
+ code
1620
+ message
1485
1621
 
1486
- async setTCCParams(params) {
1487
- var response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTCCParams", [params]);
1488
- return this._successOrErrorFromJson(response);
1622
+ constructor() {
1489
1623
  }
1490
1624
 
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"]);
1625
+ static fromJson(jsonObject) {
1626
+ if (jsonObject == null) return null
1627
+ const result = new RFIDException()
1497
1628
 
1498
- return [action, info, error];
1499
- }
1629
+ result.code = jsonObject["code"]
1630
+ result.message = jsonObject["message"] ?? ""
1500
1631
 
1501
- endBackendTransaction() {
1502
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("endBackendTransaction", []);
1632
+ return result
1503
1633
  }
1504
1634
 
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
- ]
1635
+ toJson() {
1636
+ return {
1637
+ "code": this.code,
1638
+ "message": this.message,
1639
+ }
1513
1640
  }
1641
+ }
1514
1642
 
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
- }
1524
-
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
- }
1531
1643
 
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);
1644
+ /***/ },
1539
1645
 
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
- }
1646
+ /***/ "./src/internal/bridge.js"
1647
+ /*!********************************!*\
1648
+ !*** ./src/internal/bridge.js ***!
1649
+ \********************************/
1650
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1546
1651
 
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
- }
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");
1553
1675
 
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
- }
1568
1676
 
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
- }
1573
1677
 
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
- }
1578
1678
 
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
- }
1583
1679
 
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
- }
1588
1680
 
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
- }
1593
1681
 
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
- }
1602
1682
 
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
- }
1607
1683
 
1608
- async _getRfidSessionStatus() {
1609
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getRfidSessionStatus", []);
1610
- }
1611
1684
 
1612
- _setRfidSessionStatus(status) {
1613
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setRfidSessionStatus", [status]);
1614
- }
1685
+ const { RNDocumentReader } = _cordova__WEBPACK_IMPORTED_MODULE_0__.NativeModules
1686
+ var eventManager = new _cordova__WEBPACK_IMPORTED_MODULE_0__.NativeEventEmitter(RNDocumentReader)
1615
1687
 
1616
- async _getTag() {
1617
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getTag", []);
1618
- }
1688
+ async function exec(name, params) {
1689
+ return RNDocumentReader.exec(name, params)
1690
+ }
1619
1691
 
1620
- _setTag(tag) {
1621
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTag", [tag]);
1622
- }
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
+ }
1623
1702
 
1624
- async _getTenant() {
1625
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getTenant", []);
1626
- }
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
+ }
1627
1712
 
1628
- _setTenant(tenant) {
1629
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setTenant", [tenant]);
1630
- }
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
+ }
1631
1722
 
1632
- async _getEnv() {
1633
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getEnv", []);
1634
- }
1723
+ function _setDocumentReaderPrepareCompletion(completion) {
1724
+ _setEvent("database_progress", completion, json => _info_PrepareProgress__WEBPACK_IMPORTED_MODULE_4__.PrepareProgress.fromJson(JSON.parse(json)))
1725
+ }
1635
1726
 
1636
- _setEnv(env) {
1637
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setEnv", [env]);
1638
- }
1727
+ function _setCustomButtonTappedCompletion(completion) {
1728
+ _setEvent("onCustomButtonTappedEvent", completion)
1729
+ }
1639
1730
 
1640
- async _getLocale() {
1641
- return await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("getLocale", []);
1642
- }
1731
+ function _setVideoEncoderCompletion(completion) {
1732
+ _setEvent("video_encoder_completion", completion)
1733
+ }
1643
1734
 
1644
- _setLocale(locale) {
1645
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setLocale", [locale]);
1646
- }
1735
+ function _setRFIDProgressCompletion(completion) {
1736
+ _setEvent("rfidOnProgressCompletion", completion, json => _rfid_RFIDNotification__WEBPACK_IMPORTED_MODULE_5__.RFIDNotification.fromJson(JSON.parse(json)))
1737
+ }
1647
1738
 
1648
- _setLocalizationDictionary(dictionary) {
1649
- (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)("setLocalizationDictionary", [dictionary]);
1650
- }
1739
+ function _setChipDetectedCompletion(completion) {
1740
+ _setEvent("rfidOnChipDetectedEvent", completion)
1651
1741
  }
1652
1742
 
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
- };
1743
+ function _setRetryReadChipCompletion(completion) {
1744
+ _setEvent("rfidOnRetryReadChipEvent", completion, json => _info_RFIDException__WEBPACK_IMPORTED_MODULE_3__.RFIDException.fromJson(JSON.parse(json)))
1745
+ }
1665
1746
 
1666
- DocReaderAction.finished = function (value) {
1667
- return value == DocReaderAction.COMPLETE || value == DocReaderAction.TIMEOUT
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
+ })
1668
1756
  }
1669
- DocReaderAction.interrupted = function (value) {
1670
- return value == DocReaderAction.CANCEL || value == DocReaderAction.ERROR
1757
+
1758
+ function _setTaCertificateCompletion(completion) {
1759
+ _setEvent("ta_certificate_completion", completion, data => {
1760
+ return [data, async certificates => {
1761
+ await exec("provideTACertificates", [certificates])
1762
+ }]
1763
+ })
1671
1764
  }
1672
- DocReaderAction.stopped = function (value) {
1673
- return DocReaderAction.finished(value) || DocReaderAction.interrupted(value)
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
+ })
1674
1772
  }
1675
1773
 
1676
1774
 
1677
1775
  /***/ },
1678
1776
 
1679
- /***/ "./src/info/DocReaderException.js"
1680
- /*!****************************************!*\
1681
- !*** ./src/info/DocReaderException.js ***!
1682
- \****************************************/
1777
+ /***/ "./src/internal/cordova.js"
1778
+ /*!*********************************!*\
1779
+ !*** ./src/internal/cordova.js ***!
1780
+ \*********************************/
1683
1781
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1684
1782
 
1685
1783
  __webpack_require__.r(__webpack_exports__);
1686
1784
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1687
- /* harmony export */ DocReaderException: () => (/* binding */ DocReaderException),
1688
- /* harmony export */ ErrorCodes: () => (/* binding */ ErrorCodes)
1785
+ /* harmony export */ NativeEventEmitter: () => (/* binding */ NativeEventEmitter),
1786
+ /* harmony export */ NativeModules: () => (/* binding */ NativeModules)
1689
1787
  /* harmony export */ });
1690
- class DocReaderException {
1691
- code
1692
- message
1693
-
1694
- static fromJson(jsonObject) {
1695
- if (jsonObject == null) return null
1696
- const result = new DocReaderException()
1697
-
1698
- result.code = jsonObject["code"]
1699
- result.message = jsonObject["message"] ?? ""
1788
+ var _exec = (completion, params) => cordova.exec(completion, null, "DocumentReader", "exec", params)
1700
1789
 
1701
- return result
1790
+ const NativeModules = {
1791
+ RNDocumentReader: {
1792
+ exec: async (name, params) => new Promise((resolve, _) => _exec(data => resolve(data), [name, ...params]))
1702
1793
  }
1794
+ }
1703
1795
 
1704
- toJson() {
1705
- return {
1706
- "code": this.code,
1707
- "message": this.message,
1708
- }
1796
+ class NativeEventEmitter {
1797
+ addListener(id, completion) {
1798
+ _exec(completion, ["setEvent", id])
1709
1799
  }
1710
- }
1711
1800
 
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
1801
+ removeAllListeners(id) {
1802
+ _exec(null, ["setEvent", id])
1803
+ }
1757
1804
  }
1758
1805
 
1759
-
1760
1806
  /***/ },
1761
1807
 
1762
- /***/ "./src/info/DocReaderScenario.js"
1763
- /*!***************************************!*\
1764
- !*** ./src/info/DocReaderScenario.js ***!
1765
- \***************************************/
1808
+ /***/ "./src/mdl/DataRetrieval.js"
1809
+ /*!**********************************!*\
1810
+ !*** ./src/mdl/DataRetrieval.js ***!
1811
+ \**********************************/
1766
1812
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1767
1813
 
1768
1814
  __webpack_require__.r(__webpack_exports__);
1769
1815
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1770
- /* harmony export */ DocReaderOrientation: () => (/* binding */ DocReaderOrientation),
1771
- /* harmony export */ DocReaderScenario: () => (/* binding */ DocReaderScenario),
1772
- /* harmony export */ Scenario: () => (/* binding */ Scenario)
1816
+ /* harmony export */ DataRetrieval: () => (/* binding */ DataRetrieval),
1817
+ /* harmony export */ MDLDeviceRetrieval: () => (/* binding */ MDLDeviceRetrieval),
1818
+ /* harmony export */ MDLDocRequestPreset: () => (/* binding */ MDLDocRequestPreset)
1773
1819
  /* harmony export */ });
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
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");
1788
1822
 
1789
- constructor() {
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
+ }
1839
+
1840
+ addDocRequest(request) {
1841
+ this.requests.push(request);
1790
1842
  }
1791
1843
 
1792
1844
  static fromJson(jsonObject) {
1793
1845
  if (jsonObject == null) return null
1794
- const result = new DocReaderScenario()
1846
+ const result = new DataRetrieval(jsonObject["deviceRetrieval"])
1795
1847
 
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"]
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));
1809
1851
 
1810
1852
  return result
1811
1853
  }
1812
1854
 
1813
1855
  toJson() {
1814
1856
  return {
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,
1857
+ "deviceRetrieval": this.deviceRetrieval,
1858
+ "docRequestPreset": this.docRequestPreset,
1859
+ "intentToRetain": this.intentToRetain,
1860
+ "requests": this.requests.map(item => item.toJson())
1828
1861
  }
1829
1862
  }
1830
1863
  }
1831
1864
 
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"
1865
+ const MDLDocRequestPreset = {
1866
+ ALL: 0,
1867
+ AGE: 1,
1868
+ STANDARD_ID: 2,
1869
+ TRAVEL: 3,
1870
+ DRIVERS_LICENSE: 4,
1854
1871
  }
1855
1872
 
1856
- const DocReaderOrientation = {
1857
- ALL: 0,
1858
- PORTRAIT: 1,
1859
- LANDSCAPE: 2,
1860
- LANDSCAPE_LEFT: 3,
1861
- LANDSCAPE_RIGHT: 4
1873
+ const MDLDeviceRetrieval = {
1874
+ NFC: 1,
1875
+ BLE: 2,
1862
1876
  }
1863
1877
 
1864
1878
 
1865
1879
  /***/ },
1866
1880
 
1867
- /***/ "./src/info/DocReaderVersion.js"
1868
- /*!**************************************!*\
1869
- !*** ./src/info/DocReaderVersion.js ***!
1870
- \**************************************/
1881
+ /***/ "./src/mdl/DeviceEngagement.js"
1882
+ /*!*************************************!*\
1883
+ !*** ./src/mdl/DeviceEngagement.js ***!
1884
+ \*************************************/
1871
1885
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1872
1886
 
1873
1887
  __webpack_require__.r(__webpack_exports__);
1874
1888
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1875
- /* harmony export */ DocReaderVersion: () => (/* binding */ DocReaderVersion)
1889
+ /* harmony export */ DeviceEngagement: () => (/* binding */ DeviceEngagement),
1890
+ /* harmony export */ MDLDeviceEngagement: () => (/* binding */ MDLDeviceEngagement)
1876
1891
  /* harmony export */ });
1877
- /* harmony import */ var _DocumentsDatabase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DocumentsDatabase */ "./src/info/DocumentsDatabase.js");
1878
-
1892
+ /* harmony import */ var _DeviceRetrievalMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DeviceRetrievalMethod */ "./src/mdl/DeviceRetrievalMethod.js");
1879
1893
 
1880
- class DocReaderVersion {
1881
- api
1882
- core
1883
- coreMode
1884
- database
1885
1894
 
1886
- constructor() {
1887
- }
1895
+ class DeviceEngagement {
1896
+ deviceRetrievalMethods = []
1888
1897
 
1889
1898
  static fromJson(jsonObject) {
1890
1899
  if (jsonObject == null) return null
1891
- const result = new DocReaderVersion()
1892
-
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"])
1900
+ const result = new DeviceEngagement()
1901
+
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
+ }
1897
1908
 
1898
1909
  return result
1899
1910
  }
1900
1911
 
1901
1912
  toJson() {
1902
1913
  return {
1903
- "api": this.api,
1904
- "core": this.core,
1905
- "coreMode": this.coreMode,
1906
- "database": this.database?.toJson(),
1914
+ "deviceRetrievalMethods": this.deviceRetrievalMethods.map(e => e.toJson()),
1907
1915
  }
1908
1916
  }
1909
1917
  }
1910
1918
 
1919
+ const MDLDeviceEngagement = {
1920
+ QR: 0,
1921
+ NFC: 1,
1922
+ }
1923
+
1911
1924
 
1912
1925
  /***/ },
1913
1926
 
1914
- /***/ "./src/info/DocumentsDatabase.js"
1915
- /*!***************************************!*\
1916
- !*** ./src/info/DocumentsDatabase.js ***!
1917
- \***************************************/
1927
+ /***/ "./src/mdl/DeviceRetrievalMethod.js"
1928
+ /*!******************************************!*\
1929
+ !*** ./src/mdl/DeviceRetrievalMethod.js ***!
1930
+ \******************************************/
1918
1931
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1919
1932
 
1920
1933
  __webpack_require__.r(__webpack_exports__);
1921
1934
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1922
- /* harmony export */ DocumentsDatabase: () => (/* binding */ DocumentsDatabase)
1935
+ /* harmony export */ DeviceRetrievalMethod: () => (/* binding */ DeviceRetrievalMethod)
1923
1936
  /* harmony export */ });
1924
- class DocumentsDatabase {
1925
- databaseID
1926
- version
1927
- date
1928
- databaseDescription
1929
- countriesNumber
1930
- documentsNumber
1931
- size
1937
+ /* harmony import */ var _DataRetrieval__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataRetrieval */ "./src/mdl/DataRetrieval.js");
1932
1938
 
1933
- constructor() {
1934
- }
1939
+
1940
+ class DeviceRetrievalMethod {
1941
+ type
1942
+ version
1943
+ cmdMaxLength
1944
+ respMaxLength
1945
+ clientModeSupport
1946
+ clientModeUUID
1947
+ serverModeSupport
1948
+ serverModeUUID
1935
1949
 
1936
1950
  static fromJson(jsonObject) {
1937
1951
  if (jsonObject == null) return null
1938
- const result = new DocumentsDatabase()
1952
+ const result = new DeviceRetrievalMethod()
1939
1953
 
1940
- result.databaseID = jsonObject["databaseID"]
1954
+ result.type = jsonObject["type"]
1941
1955
  result.version = jsonObject["version"]
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"]
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"]
1947
1962
 
1948
1963
  return result
1949
1964
  }
1950
1965
 
1951
1966
  toJson() {
1952
1967
  return {
1953
- "databaseID": this.databaseID,
1968
+ "type": this.type,
1954
1969
  "version": this.version,
1955
- "date": this.date,
1956
- "databaseDescription": this.databaseDescription,
1957
- "countriesNumber": this.countriesNumber,
1958
- "documentsNumber": this.documentsNumber,
1959
- "size": this.size,
1970
+ "cmdMaxLength": this.cmdMaxLength,
1971
+ "respMaxLength": this.respMaxLength,
1972
+ "clientModeSupport": this.clientModeSupport,
1973
+ "clientModeUUID": this.clientModeUUID,
1974
+ "serverModeSupport": this.serverModeSupport,
1975
+ "serverModeUUID": this.serverModeUUID,
1960
1976
  }
1961
1977
  }
1962
1978
  }
@@ -1964,88 +1980,227 @@ class DocumentsDatabase {
1964
1980
 
1965
1981
  /***/ },
1966
1982
 
1967
- /***/ "./src/info/License.js"
1968
- /*!*****************************!*\
1969
- !*** ./src/info/License.js ***!
1970
- \*****************************/
1983
+ /***/ "./src/mdl/DocumentRequestMDL.js"
1984
+ /*!***************************************!*\
1985
+ !*** ./src/mdl/DocumentRequestMDL.js ***!
1986
+ \***************************************/
1971
1987
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1972
1988
 
1973
1989
  __webpack_require__.r(__webpack_exports__);
1974
1990
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1975
- /* harmony export */ License: () => (/* binding */ License)
1991
+ /* harmony export */ DocumentRequest18013MDL: () => (/* binding */ DocumentRequest18013MDL),
1992
+ /* harmony export */ DocumentRequestMDL: () => (/* binding */ DocumentRequestMDL)
1976
1993
  /* harmony export */ });
1977
- /**
1978
- * Class contains properties to get the information about the license.
1979
- */
1980
- class License {
1981
- expiryDate
1982
- countryFilter
1983
- isRfidAvailable
1994
+ /* harmony import */ var _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NameSpaceMDL */ "./src/mdl/NameSpaceMDL.js");
1984
1995
 
1985
- constructor() {
1996
+
1997
+ class DocumentRequestMDL {
1998
+ docType
1999
+ namespaces = []
2000
+
2001
+ constructor(docType) {
2002
+ this.docType = docType
2003
+ }
2004
+
2005
+ addNameSpace(namespace) {
2006
+ this.namespaces.push(namespace);
1986
2007
  }
1987
2008
 
1988
2009
  static fromJson(jsonObject) {
1989
- if (jsonObject == null) return null
1990
- const result = new License()
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);
1991
2016
 
1992
- result.expiryDate = jsonObject["expiryDate"]
1993
- result.countryFilter = jsonObject["countryFilter"]
1994
- result.isRfidAvailable = jsonObject["isRfidAvailable"] ?? false
2017
+ result.namespaces = (jsonObject["namespaces"]).map(item => _NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.NameSpaceMDL.fromJson(item));
1995
2018
 
1996
- return result
2019
+ return result;
1997
2020
  }
1998
2021
 
1999
2022
  toJson() {
2000
2023
  return {
2001
- "expiryDate": this.expiryDate,
2002
- "countryFilter": this.countryFilter,
2003
- "isRfidAvailable": this.isRfidAvailable,
2024
+ "docType": this.docType,
2025
+ "namespaces": this.namespaces.map(item => item.toJson())
2004
2026
  }
2005
2027
  }
2006
2028
  }
2007
2029
 
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
2008
2067
 
2009
- /***/ },
2068
+ constructor() {
2069
+ super("org.iso.18013.5.1.mDL")
2070
+ }
2010
2071
 
2011
- /***/ "./src/info/PrepareProgress.js"
2012
- /*!*************************************!*\
2013
- !*** ./src/info/PrepareProgress.js ***!
2014
- \*************************************/
2015
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2072
+ disableIntentToRetainValues() {
2073
+ this.setAll(_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.MDLIntentToRetain.FALSE);
2074
+ }
2016
2075
 
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
2076
+ enableIntentToRetainValues() {
2077
+ this.setAll(_NameSpaceMDL__WEBPACK_IMPORTED_MODULE_0__.MDLIntentToRetain.TRUE);
2078
+ }
2028
2079
 
2029
- constructor(downloadedBytes, totalBytes, progress) {
2030
- this.downloadedBytes = downloadedBytes
2031
- this.totalBytes = totalBytes
2032
- this.progress = progress
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;
2033
2117
  }
2034
2118
 
2035
- static fromJson(jsonObject) {
2036
- if (jsonObject == null) return null
2037
- return new PrepareProgress(
2038
- jsonObject["downloadedBytes"],
2039
- jsonObject["totalBytes"],
2040
- jsonObject["progress"]
2041
- )
2119
+ static fromJson(jsonObject) {
2120
+ if (jsonObject == null) return null
2121
+ const result = new DocumentRequest18013MDL()
2122
+
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"]
2160
+
2161
+ return result
2042
2162
  }
2043
2163
 
2044
2164
  toJson() {
2045
2165
  return {
2046
- "downloadedBytes": this.downloadedBytes,
2047
- "totalBytes": this.totalBytes,
2048
- "progress": this.progress,
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,
2049
2204
  }
2050
2205
  }
2051
2206
  }
@@ -2053,206 +2208,51 @@ class PrepareProgress {
2053
2208
 
2054
2209
  /***/ },
2055
2210
 
2056
- /***/ "./src/info/RFIDException.js"
2057
- /*!***********************************!*\
2058
- !*** ./src/info/RFIDException.js ***!
2059
- \***********************************/
2211
+ /***/ "./src/mdl/NameSpaceMDL.js"
2212
+ /*!*********************************!*\
2213
+ !*** ./src/mdl/NameSpaceMDL.js ***!
2214
+ \*********************************/
2060
2215
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2061
2216
 
2062
2217
  __webpack_require__.r(__webpack_exports__);
2063
2218
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2064
- /* harmony export */ RFIDException: () => (/* binding */ RFIDException)
2219
+ /* harmony export */ MDLIntentToRetain: () => (/* binding */ MDLIntentToRetain),
2220
+ /* harmony export */ NameSpaceMDL: () => (/* binding */ NameSpaceMDL)
2065
2221
  /* harmony export */ });
2066
- /* harmony import */ var _rfid_RFIDErrorCodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rfid/RFIDErrorCodes */ "./src/rfid/RFIDErrorCodes.js");
2067
-
2068
-
2069
- class RFIDException {
2070
- code
2071
- message
2222
+ class NameSpaceMDL {
2223
+ name
2224
+ map = {}
2072
2225
 
2073
- constructor() {
2226
+ constructor(name) {
2227
+ this.name = name
2074
2228
  }
2075
2229
 
2230
+ addField(name, intentToRetain) {
2231
+ this.map[name] = intentToRetain;
2232
+ }
2233
+
2076
2234
  static fromJson(jsonObject) {
2077
2235
  if (jsonObject == null) return null
2078
- const result = new RFIDException()
2236
+ const result = new NameSpaceMDL(jsonObject["name"])
2079
2237
 
2080
- result.code = jsonObject["code"]
2081
- result.message = jsonObject["message"] ?? ""
2238
+ result.map = jsonObject["map"]
2082
2239
 
2083
2240
  return result
2084
2241
  }
2085
2242
 
2086
2243
  toJson() {
2087
2244
  return {
2088
- "code": this.code,
2089
- "message": this.message,
2245
+ "name": this.name,
2246
+ "map": this.map
2090
2247
  }
2091
2248
  }
2092
2249
  }
2093
2250
 
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
- }
2251
+ const MDLIntentToRetain = {
2252
+ FALSE: 0,
2253
+ TRUE: 1,
2245
2254
  }
2246
2255
 
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