@regulaforensics/document-reader 1.1.1318-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Package.swift +28 -0
- package/README.md +19 -0
- package/android/CVDDocumentReader.kt +76 -0
- package/android/build.gradle.kts +37 -0
- package/android/cordova.gradle.kts +13 -0
- package/android/src/main/kotlin/com/regula/plugin/document/reader/BluetoothUtil.kt +164 -0
- package/android/src/main/kotlin/com/regula/plugin/document/reader/Config.kt +1021 -0
- package/android/src/main/kotlin/com/regula/plugin/document/reader/JSONConstructor.kt +2192 -0
- package/android/src/main/kotlin/com/regula/plugin/document/reader/Main.kt +656 -0
- package/android/src/main/kotlin/com/regula/plugin/document/reader/RNDocumentReaderModule.kt +101 -0
- package/android/src/main/kotlin/com/regula/plugin/document/reader/Utils.kt +248 -0
- package/app.plugin.js +45 -0
- package/examples/capacitor/README.md +24 -0
- package/examples/capacitor/android/app/build.gradle +41 -0
- package/examples/capacitor/android/app/proguard-rules.pro +21 -0
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +36 -0
- package/examples/capacitor/android/app/src/main/assets/Regula/.gitkeep +0 -0
- package/examples/capacitor/android/app/src/main/java/com/regula/example/dr/capacitor/MainActivity.java +5 -0
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable/launcher.xml +4 -0
- package/examples/capacitor/android/app/src/main/res/drawable/launcher_round.xml +4 -0
- package/examples/capacitor/android/app/src/main/res/drawable/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/layout/activity_main.xml +12 -0
- package/examples/capacitor/android/app/src/main/res/values/styles.xml +22 -0
- package/examples/capacitor/android/app/src/main/res/xml/file_paths.xml +5 -0
- package/examples/capacitor/android/build.gradle +39 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/examples/capacitor/android/gradle.properties +26 -0
- package/examples/capacitor/android/gradlew +248 -0
- package/examples/capacitor/android/gradlew.bat +82 -0
- package/examples/capacitor/android/settings.gradle +5 -0
- package/examples/capacitor/android/variables.gradle +20 -0
- package/examples/capacitor/capacitor.config.json +15 -0
- package/examples/capacitor/index.html +5 -0
- package/examples/capacitor/index.tsx +31 -0
- package/examples/capacitor/ios/App/App/App.entitlements +10 -0
- package/examples/capacitor/ios/App/App/AppDelegate.swift +14 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Contents.json +6 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/examples/capacitor/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
- package/examples/capacitor/ios/App/App/Info.plist +88 -0
- package/examples/capacitor/ios/App/App/SceneDelegate.swift +23 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +374 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/examples/capacitor/ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift +1 -0
- package/examples/capacitor/package-lock.json +1965 -0
- package/examples/capacitor/package.json +26 -0
- package/examples/capacitor/public/assets/.gitkeep +0 -0
- package/examples/capacitor/public/images/document.png +0 -0
- package/examples/capacitor/public/images/portrait.png +0 -0
- package/examples/capacitor/scripts/android.sh +8 -0
- package/examples/capacitor/scripts/ios.sh +8 -0
- package/examples/capacitor/scripts/setup.sh +9 -0
- package/examples/capacitor/src/extra/bt_device.tsx +33 -0
- package/examples/capacitor/src/extra/custom_rfid.tsx +61 -0
- package/examples/capacitor/src/main.css +153 -0
- package/examples/capacitor/src/main.html +38 -0
- package/examples/capacitor/src/main.tsx +172 -0
- package/examples/capacitor/tsconfig.json +5 -0
- package/examples/capacitor/vite.config.ts +5 -0
- package/examples/ionic/README.md +24 -0
- package/examples/ionic/angular.json +39 -0
- package/examples/ionic/assets/.gitkeep +0 -0
- package/examples/ionic/config.xml +61 -0
- package/examples/ionic/images/document.png +0 -0
- package/examples/ionic/images/icon.png +0 -0
- package/examples/ionic/images/portrait.png +0 -0
- package/examples/ionic/index.html +19 -0
- package/examples/ionic/index.tsx +63 -0
- package/examples/ionic/ionic.config.json +7 -0
- package/examples/ionic/package-lock.json +17554 -0
- package/examples/ionic/package.json +76 -0
- package/examples/ionic/patches/cordova-plugin-ionic-webview+5.0.1.patch +23 -0
- package/examples/ionic/scripts/android.sh +9 -0
- package/examples/ionic/scripts/ios.sh +11 -0
- package/examples/ionic/scripts/setup.sh +8 -0
- package/examples/ionic/src/extra/bt_device.tsx +33 -0
- package/examples/ionic/src/extra/custom_rfid.tsx +61 -0
- package/examples/ionic/src/main.css +148 -0
- package/examples/ionic/src/main.html +38 -0
- package/examples/ionic/src/main.tsx +172 -0
- package/examples/ionic/tsconfig.json +13 -0
- package/examples/react_native/README.md +24 -0
- package/examples/react_native/app.config.ts +54 -0
- package/examples/react_native/assets/.gitkeep +0 -0
- package/examples/react_native/images/document.png +0 -0
- package/examples/react_native/images/icon.png +0 -0
- package/examples/react_native/images/portrait.png +0 -0
- package/examples/react_native/index.tsx +111 -0
- package/examples/react_native/metro.config.js +5 -0
- package/examples/react_native/package-lock.json +6924 -0
- package/examples/react_native/package.json +37 -0
- package/examples/react_native/scripts/android.sh +8 -0
- package/examples/react_native/scripts/ios.sh +6 -0
- package/examples/react_native/scripts/setup.sh +10 -0
- package/examples/react_native/scripts/withoutMetroServer.js +89 -0
- package/examples/react_native/src/extra/bt_device.tsx +33 -0
- package/examples/react_native/src/extra/custom_rfid.tsx +61 -0
- package/examples/react_native/src/main.css +148 -0
- package/examples/react_native/src/main.html +38 -0
- package/examples/react_native/src/main.tsx +172 -0
- package/ios/CVDDocumentReader.h +7 -0
- package/ios/CVDDocumentReader.m +43 -0
- package/ios/RGLWConfig.h +44 -0
- package/ios/RGLWConfig.m +1577 -0
- package/ios/RGLWJSONConstructor.h +216 -0
- package/ios/RGLWJSONConstructor.m +2875 -0
- package/ios/RGLWMain.h +34 -0
- package/ios/RGLWMain.m +722 -0
- package/ios/RNDocumentReader.h +8 -0
- package/ios/RNDocumentReader.m +52 -0
- package/ios/spm/module.modulemap +7 -0
- package/package.json +39 -0
- package/plugin.xml +51 -0
- package/react-native-document-reader.podspec +14 -0
- package/test/json.tsx +1159 -0
- package/test/package-lock.json +584 -0
- package/test/package.json +9 -0
- package/test/test.tsx +315 -0
- package/test/utils.tsx +38 -0
- package/www/capacitor/config/FinalizeConfig.js +35 -0
- package/www/capacitor/config/InitConfig.js +55 -0
- package/www/capacitor/config/OnlineProcessingConfig.js +52 -0
- package/www/capacitor/config/RFIDConfig.js +47 -0
- package/www/capacitor/config/RecognizeConfig.js +138 -0
- package/www/capacitor/config/ScannerConfig.js +48 -0
- package/www/capacitor/index.js +758 -0
- package/www/capacitor/info/DocReaderException.js +68 -0
- package/www/capacitor/info/DocReaderScenario.js +89 -0
- package/www/capacitor/info/DocReaderVersion.js +32 -0
- package/www/capacitor/info/DocumentsDatabase.js +39 -0
- package/www/capacitor/info/License.js +30 -0
- package/www/capacitor/info/PrepareProgress.js +31 -0
- package/www/capacitor/info/RFIDException.js +26 -0
- package/www/capacitor/internal/bridge.js +131 -0
- package/www/capacitor/internal/cordova.js +17 -0
- package/www/capacitor/mdl/DataRetrieval.js +55 -0
- package/www/capacitor/mdl/DeviceEngagement.js +30 -0
- package/www/capacitor/mdl/DeviceRetrievalMethod.js +41 -0
- package/www/capacitor/mdl/DocumentRequestMDL.js +212 -0
- package/www/capacitor/mdl/NameSpaceMDL.js +33 -0
- package/www/capacitor/params/Functionality.js +387 -0
- package/www/capacitor/params/customization/Customization.js +664 -0
- package/www/capacitor/params/customization/CustomizationColors.js +231 -0
- package/www/capacitor/params/customization/CustomizationContentModes.js +55 -0
- package/www/capacitor/params/customization/CustomizationFonts.js +156 -0
- package/www/capacitor/params/customization/CustomizationImages.js +199 -0
- package/www/capacitor/params/customization/CustomizationMatrices.js +39 -0
- package/www/capacitor/params/customization/CustomizationTimings.js +71 -0
- package/www/capacitor/params/process_params/AuthenticityParams.js +166 -0
- package/www/capacitor/params/process_params/AuthenticityPropertiesParams.js +39 -0
- package/www/capacitor/params/process_params/BackendProcessingConfig.js +38 -0
- package/www/capacitor/params/process_params/Bsi.js +23 -0
- package/www/capacitor/params/process_params/FaceApiParams.js +55 -0
- package/www/capacitor/params/process_params/FaceApiSearchParams.js +29 -0
- package/www/capacitor/params/process_params/GlaresCheckParams.js +25 -0
- package/www/capacitor/params/process_params/ImageQA.js +122 -0
- package/www/capacitor/params/process_params/LivenessParams.js +87 -0
- package/www/capacitor/params/process_params/OcclusionCheckParams.js +21 -0
- package/www/capacitor/params/process_params/ProcessParams.js +724 -0
- package/www/capacitor/params/process_params/RFIDParams.js +21 -0
- package/www/capacitor/params/rfid_scenario/DTCDataGroup.js +63 -0
- package/www/capacitor/params/rfid_scenario/EDLDataGroups.js +135 -0
- package/www/capacitor/params/rfid_scenario/EIDDataGroups.js +191 -0
- package/www/capacitor/params/rfid_scenario/EPassportDataGroups.js +151 -0
- package/www/capacitor/params/rfid_scenario/RFIDScenario.js +584 -0
- package/www/capacitor/results/DocumentType.js +302 -0
- package/www/capacitor/results/Position.js +88 -0
- package/www/capacitor/results/Results.js +354 -0
- package/www/capacitor/results/TransactionInfo.js +24 -0
- package/www/capacitor/results/authenticity/Authenticity.js +24 -0
- package/www/capacitor/results/authenticity/AuthenticityCheck.js +43 -0
- package/www/capacitor/results/authenticity/AuthenticityElement.js +37 -0
- package/www/capacitor/results/authenticity/AuthenticityResult.js +33 -0
- package/www/capacitor/results/authenticity/CheckDiagnose.js +133 -0
- package/www/capacitor/results/authenticity/SecurityFeatureType.js +67 -0
- package/www/capacitor/results/barcode/BarcodeField.js +34 -0
- package/www/capacitor/results/barcode/BarcodeResult.js +30 -0
- package/www/capacitor/results/barcode/BarcodeStatus.js +33 -0
- package/www/capacitor/results/barcode/BarcodeType.js +21 -0
- package/www/capacitor/results/barcode/PDF417Info.js +24 -0
- package/www/capacitor/results/image_quality/ImageQuality.js +40 -0
- package/www/capacitor/results/image_quality/ImageQualityCheckType.js +19 -0
- package/www/capacitor/results/image_quality/ImageQualityGroup.js +39 -0
- package/www/capacitor/results/rfid/AccessControlProcedureType.js +30 -0
- package/www/capacitor/results/rfid/Application.js +63 -0
- package/www/capacitor/results/rfid/Attribute.js +23 -0
- package/www/capacitor/results/rfid/Authority.js +36 -0
- package/www/capacitor/results/rfid/CardProperties.js +57 -0
- package/www/capacitor/results/rfid/CertificateChain.js +69 -0
- package/www/capacitor/results/rfid/CertificateData.js +21 -0
- package/www/capacitor/results/rfid/DataField.js +23 -0
- package/www/capacitor/results/rfid/Extension.js +21 -0
- package/www/capacitor/results/rfid/File.js +56 -0
- package/www/capacitor/results/rfid/FileData.js +27 -0
- package/www/capacitor/results/rfid/RFIDAccessControlProcedureType.js +10 -0
- package/www/capacitor/results/rfid/RFIDCertificateType.js +14 -0
- package/www/capacitor/results/rfid/RFIDDataFileType.js +106 -0
- package/www/capacitor/results/rfid/RFIDSessionData.js +92 -0
- package/www/capacitor/results/rfid/RFIDValidity.js +23 -0
- package/www/capacitor/results/rfid/RFIDValue.js +30 -0
- package/www/capacitor/results/rfid/SecurityObject.js +41 -0
- package/www/capacitor/results/rfid/SecurityObjectCertificates.js +20 -0
- package/www/capacitor/results/rfid/SignerInfo.js +74 -0
- package/www/capacitor/results/status/AgeStatus.js +35 -0
- package/www/capacitor/results/status/CheckResult.js +5 -0
- package/www/capacitor/results/status/OpticalStatus.js +44 -0
- package/www/capacitor/results/status/RFIDStatus.js +38 -0
- package/www/capacitor/results/status/ResultsStatus.js +53 -0
- package/www/capacitor/results/visible_digital_seals/BytesData.js +27 -0
- package/www/capacitor/results/visible_digital_seals/DocFeature.js +23 -0
- package/www/capacitor/results/visible_digital_seals/LDSParsingErrorCodes.js +136 -0
- package/www/capacitor/results/visible_digital_seals/LDSParsingNotificationCodes.js +239 -0
- package/www/capacitor/results/visible_digital_seals/VDSData.js +75 -0
- package/www/capacitor/results/visible_digital_seals/VDSNCData.js +54 -0
- package/www/capacitor/results/visual_results/Comparison.js +27 -0
- package/www/capacitor/results/visual_results/FieldType.js +671 -0
- package/www/capacitor/results/visual_results/GraphicField.js +47 -0
- package/www/capacitor/results/visual_results/GraphicFieldType.js +25 -0
- package/www/capacitor/results/visual_results/GraphicResult.js +28 -0
- package/www/capacitor/results/visual_results/LCID.js +174 -0
- package/www/capacitor/results/visual_results/Lights.js +11 -0
- package/www/capacitor/results/visual_results/RFIDOrigin.js +27 -0
- package/www/capacitor/results/visual_results/Rect.js +27 -0
- package/www/capacitor/results/visual_results/Symbol.js +26 -0
- package/www/capacitor/results/visual_results/TextField.js +85 -0
- package/www/capacitor/results/visual_results/TextResult.js +52 -0
- package/www/capacitor/results/visual_results/TextSource.js +27 -0
- package/www/capacitor/results/visual_results/Validity.js +24 -0
- package/www/capacitor/results/visual_results/Value.js +52 -0
- package/www/capacitor/rfid/CAProtocol.js +27 -0
- package/www/capacitor/rfid/PAAttribute.js +24 -0
- package/www/capacitor/rfid/PACEProtocol.js +24 -0
- package/www/capacitor/rfid/PAResourcesIssuer.js +35 -0
- package/www/capacitor/rfid/PKDCertificate.js +65 -0
- package/www/capacitor/rfid/RFIDErrorCodes.js +123 -0
- package/www/capacitor/rfid/RFIDNotification.js +71 -0
- package/www/capacitor/rfid/TAChallenge.js +33 -0
- package/www/capacitor/rfid/TccParams.js +34 -0
- package/www/cordova.js +12948 -0
- package/www/react-native/config/FinalizeConfig.js +35 -0
- package/www/react-native/config/InitConfig.js +55 -0
- package/www/react-native/config/OnlineProcessingConfig.js +52 -0
- package/www/react-native/config/RFIDConfig.js +47 -0
- package/www/react-native/config/RecognizeConfig.js +138 -0
- package/www/react-native/config/ScannerConfig.js +48 -0
- package/www/react-native/index.js +758 -0
- package/www/react-native/info/DocReaderException.js +68 -0
- package/www/react-native/info/DocReaderScenario.js +89 -0
- package/www/react-native/info/DocReaderVersion.js +32 -0
- package/www/react-native/info/DocumentsDatabase.js +39 -0
- package/www/react-native/info/License.js +30 -0
- package/www/react-native/info/PrepareProgress.js +31 -0
- package/www/react-native/info/RFIDException.js +26 -0
- package/www/react-native/internal/bridge.js +131 -0
- package/www/react-native/mdl/DataRetrieval.js +55 -0
- package/www/react-native/mdl/DeviceEngagement.js +30 -0
- package/www/react-native/mdl/DeviceRetrievalMethod.js +41 -0
- package/www/react-native/mdl/DocumentRequestMDL.js +212 -0
- package/www/react-native/mdl/NameSpaceMDL.js +33 -0
- package/www/react-native/params/Functionality.js +387 -0
- package/www/react-native/params/customization/Customization.js +664 -0
- package/www/react-native/params/customization/CustomizationColors.js +231 -0
- package/www/react-native/params/customization/CustomizationContentModes.js +55 -0
- package/www/react-native/params/customization/CustomizationFonts.js +156 -0
- package/www/react-native/params/customization/CustomizationImages.js +199 -0
- package/www/react-native/params/customization/CustomizationMatrices.js +39 -0
- package/www/react-native/params/customization/CustomizationTimings.js +71 -0
- package/www/react-native/params/process_params/AuthenticityParams.js +166 -0
- package/www/react-native/params/process_params/AuthenticityPropertiesParams.js +39 -0
- package/www/react-native/params/process_params/BackendProcessingConfig.js +38 -0
- package/www/react-native/params/process_params/Bsi.js +23 -0
- package/www/react-native/params/process_params/FaceApiParams.js +55 -0
- package/www/react-native/params/process_params/FaceApiSearchParams.js +29 -0
- package/www/react-native/params/process_params/GlaresCheckParams.js +25 -0
- package/www/react-native/params/process_params/ImageQA.js +122 -0
- package/www/react-native/params/process_params/LivenessParams.js +87 -0
- package/www/react-native/params/process_params/OcclusionCheckParams.js +21 -0
- package/www/react-native/params/process_params/ProcessParams.js +724 -0
- package/www/react-native/params/process_params/RFIDParams.js +21 -0
- package/www/react-native/params/rfid_scenario/DTCDataGroup.js +63 -0
- package/www/react-native/params/rfid_scenario/EDLDataGroups.js +135 -0
- package/www/react-native/params/rfid_scenario/EIDDataGroups.js +191 -0
- package/www/react-native/params/rfid_scenario/EPassportDataGroups.js +151 -0
- package/www/react-native/params/rfid_scenario/RFIDScenario.js +584 -0
- package/www/react-native/results/DocumentType.js +302 -0
- package/www/react-native/results/Position.js +88 -0
- package/www/react-native/results/Results.js +354 -0
- package/www/react-native/results/TransactionInfo.js +24 -0
- package/www/react-native/results/authenticity/Authenticity.js +24 -0
- package/www/react-native/results/authenticity/AuthenticityCheck.js +43 -0
- package/www/react-native/results/authenticity/AuthenticityElement.js +37 -0
- package/www/react-native/results/authenticity/AuthenticityResult.js +33 -0
- package/www/react-native/results/authenticity/CheckDiagnose.js +133 -0
- package/www/react-native/results/authenticity/SecurityFeatureType.js +67 -0
- package/www/react-native/results/barcode/BarcodeField.js +34 -0
- package/www/react-native/results/barcode/BarcodeResult.js +30 -0
- package/www/react-native/results/barcode/BarcodeStatus.js +33 -0
- package/www/react-native/results/barcode/BarcodeType.js +21 -0
- package/www/react-native/results/barcode/PDF417Info.js +24 -0
- package/www/react-native/results/image_quality/ImageQuality.js +40 -0
- package/www/react-native/results/image_quality/ImageQualityCheckType.js +19 -0
- package/www/react-native/results/image_quality/ImageQualityGroup.js +39 -0
- package/www/react-native/results/rfid/AccessControlProcedureType.js +30 -0
- package/www/react-native/results/rfid/Application.js +63 -0
- package/www/react-native/results/rfid/Attribute.js +23 -0
- package/www/react-native/results/rfid/Authority.js +36 -0
- package/www/react-native/results/rfid/CardProperties.js +57 -0
- package/www/react-native/results/rfid/CertificateChain.js +69 -0
- package/www/react-native/results/rfid/CertificateData.js +21 -0
- package/www/react-native/results/rfid/DataField.js +23 -0
- package/www/react-native/results/rfid/Extension.js +21 -0
- package/www/react-native/results/rfid/File.js +56 -0
- package/www/react-native/results/rfid/FileData.js +27 -0
- package/www/react-native/results/rfid/RFIDAccessControlProcedureType.js +10 -0
- package/www/react-native/results/rfid/RFIDCertificateType.js +14 -0
- package/www/react-native/results/rfid/RFIDDataFileType.js +106 -0
- package/www/react-native/results/rfid/RFIDSessionData.js +92 -0
- package/www/react-native/results/rfid/RFIDValidity.js +23 -0
- package/www/react-native/results/rfid/RFIDValue.js +30 -0
- package/www/react-native/results/rfid/SecurityObject.js +41 -0
- package/www/react-native/results/rfid/SecurityObjectCertificates.js +20 -0
- package/www/react-native/results/rfid/SignerInfo.js +74 -0
- package/www/react-native/results/status/AgeStatus.js +35 -0
- package/www/react-native/results/status/CheckResult.js +5 -0
- package/www/react-native/results/status/OpticalStatus.js +44 -0
- package/www/react-native/results/status/RFIDStatus.js +38 -0
- package/www/react-native/results/status/ResultsStatus.js +53 -0
- package/www/react-native/results/visible_digital_seals/BytesData.js +27 -0
- package/www/react-native/results/visible_digital_seals/DocFeature.js +23 -0
- package/www/react-native/results/visible_digital_seals/LDSParsingErrorCodes.js +136 -0
- package/www/react-native/results/visible_digital_seals/LDSParsingNotificationCodes.js +239 -0
- package/www/react-native/results/visible_digital_seals/VDSData.js +75 -0
- package/www/react-native/results/visible_digital_seals/VDSNCData.js +54 -0
- package/www/react-native/results/visual_results/Comparison.js +27 -0
- package/www/react-native/results/visual_results/FieldType.js +671 -0
- package/www/react-native/results/visual_results/GraphicField.js +47 -0
- package/www/react-native/results/visual_results/GraphicFieldType.js +25 -0
- package/www/react-native/results/visual_results/GraphicResult.js +28 -0
- package/www/react-native/results/visual_results/LCID.js +174 -0
- package/www/react-native/results/visual_results/Lights.js +11 -0
- package/www/react-native/results/visual_results/RFIDOrigin.js +27 -0
- package/www/react-native/results/visual_results/Rect.js +27 -0
- package/www/react-native/results/visual_results/Symbol.js +26 -0
- package/www/react-native/results/visual_results/TextField.js +85 -0
- package/www/react-native/results/visual_results/TextResult.js +52 -0
- package/www/react-native/results/visual_results/TextSource.js +27 -0
- package/www/react-native/results/visual_results/Validity.js +24 -0
- package/www/react-native/results/visual_results/Value.js +52 -0
- package/www/react-native/rfid/CAProtocol.js +27 -0
- package/www/react-native/rfid/PAAttribute.js +24 -0
- package/www/react-native/rfid/PACEProtocol.js +24 -0
- package/www/react-native/rfid/PAResourcesIssuer.js +35 -0
- package/www/react-native/rfid/PKDCertificate.js +65 -0
- package/www/react-native/rfid/RFIDErrorCodes.js +123 -0
- package/www/react-native/rfid/RFIDNotification.js +71 -0
- package/www/react-native/rfid/TAChallenge.js +33 -0
- package/www/react-native/rfid/TccParams.js +34 -0
- package/www/types/config/FinalizeConfig.d.ts +6 -0
- package/www/types/config/InitConfig.d.ts +68 -0
- package/www/types/config/OnlineProcessingConfig.d.ts +22 -0
- package/www/types/config/RFIDConfig.d.ts +178 -0
- package/www/types/config/RecognizeConfig.d.ts +126 -0
- package/www/types/config/ScannerConfig.d.ts +54 -0
- package/www/types/index.d.ts +656 -0
- package/www/types/info/DocReaderException.d.ts +85 -0
- package/www/types/info/DocReaderScenario.d.ts +90 -0
- package/www/types/info/DocReaderVersion.d.ts +28 -0
- package/www/types/info/DocumentsDatabase.d.ts +42 -0
- package/www/types/info/License.d.ts +23 -0
- package/www/types/info/PrepareProgress.d.ts +15 -0
- package/www/types/info/RFIDException.d.ts +8 -0
- package/www/types/mdl/DataRetrieval.d.ts +28 -0
- package/www/types/mdl/DeviceEngagement.d.ts +16 -0
- package/www/types/mdl/DeviceRetrievalMethod.d.ts +18 -0
- package/www/types/mdl/DocumentRequestMDL.d.ts +63 -0
- package/www/types/mdl/NameSpaceMDL.d.ts +16 -0
- package/www/types/params/Functionality.d.ts +337 -0
- package/www/types/params/customization/Customization.d.ts +584 -0
- package/www/types/params/customization/CustomizationColors.d.ts +42 -0
- package/www/types/params/customization/CustomizationContentModes.d.ts +41 -0
- package/www/types/params/customization/CustomizationFonts.d.ts +63 -0
- package/www/types/params/customization/CustomizationImages.d.ts +34 -0
- package/www/types/params/customization/CustomizationMatrices.d.ts +10 -0
- package/www/types/params/customization/CustomizationTimings.d.ts +14 -0
- package/www/types/params/process_params/AuthenticityParams.d.ts +31 -0
- package/www/types/params/process_params/AuthenticityPropertiesParams.d.ts +12 -0
- package/www/types/params/process_params/BackendProcessingConfig.d.ts +27 -0
- package/www/types/params/process_params/Bsi.d.ts +3 -0
- package/www/types/params/process_params/FaceApiParams.d.ts +72 -0
- package/www/types/params/process_params/FaceApiSearchParams.d.ts +35 -0
- package/www/types/params/process_params/GlaresCheckParams.d.ts +26 -0
- package/www/types/params/process_params/ImageQA.d.ts +85 -0
- package/www/types/params/process_params/LivenessParams.d.ts +18 -0
- package/www/types/params/process_params/OcclusionCheckParams.d.ts +16 -0
- package/www/types/params/process_params/ProcessParams.d.ts +496 -0
- package/www/types/params/process_params/RFIDParams.d.ts +19 -0
- package/www/types/params/rfid_scenario/DTCDataGroup.d.ts +13 -0
- package/www/types/params/rfid_scenario/EDLDataGroups.d.ts +22 -0
- package/www/types/params/rfid_scenario/EIDDataGroups.d.ts +29 -0
- package/www/types/params/rfid_scenario/EPassportDataGroups.d.ts +24 -0
- package/www/types/params/rfid_scenario/RFIDScenario.d.ts +178 -0
- package/www/types/results/DocumentType.d.ts +525 -0
- package/www/types/results/Position.d.ts +50 -0
- package/www/types/results/Results.d.ts +295 -0
- package/www/types/results/TransactionInfo.d.ts +9 -0
- package/www/types/results/authenticity/Authenticity.d.ts +68 -0
- package/www/types/results/authenticity/AuthenticityCheck.d.ts +23 -0
- package/www/types/results/authenticity/AuthenticityElement.d.ts +26 -0
- package/www/types/results/authenticity/AuthenticityResult.d.ts +16 -0
- package/www/types/results/authenticity/CheckDiagnose.d.ts +242 -0
- package/www/types/results/authenticity/SecurityFeatureType.d.ts +110 -0
- package/www/types/results/barcode/BarcodeField.d.ts +37 -0
- package/www/types/results/barcode/BarcodeResult.d.ts +14 -0
- package/www/types/results/barcode/BarcodeStatus.d.ts +66 -0
- package/www/types/results/barcode/BarcodeType.d.ts +45 -0
- package/www/types/results/barcode/PDF417Info.d.ts +15 -0
- package/www/types/results/image_quality/ImageQuality.d.ts +18 -0
- package/www/types/results/image_quality/ImageQualityCheckType.d.ts +30 -0
- package/www/types/results/image_quality/ImageQualityGroup.d.ts +17 -0
- package/www/types/results/rfid/AccessControlProcedureType.d.ts +21 -0
- package/www/types/results/rfid/Application.d.ts +48 -0
- package/www/types/results/rfid/Attribute.d.ts +9 -0
- package/www/types/results/rfid/Authority.d.ts +11 -0
- package/www/types/results/rfid/CardProperties.d.ts +48 -0
- package/www/types/results/rfid/CertificateChain.d.ts +28 -0
- package/www/types/results/rfid/CertificateData.d.ts +7 -0
- package/www/types/results/rfid/DataField.d.ts +9 -0
- package/www/types/results/rfid/Extension.d.ts +7 -0
- package/www/types/results/rfid/File.d.ts +22 -0
- package/www/types/results/rfid/FileData.d.ts +9 -0
- package/www/types/results/rfid/RFIDAccessControlProcedureType.d.ts +18 -0
- package/www/types/results/rfid/RFIDCertificateType.d.ts +14 -0
- package/www/types/results/rfid/RFIDDataFileType.d.ts +108 -0
- package/www/types/results/rfid/RFIDSessionData.d.ts +48 -0
- package/www/types/results/rfid/RFIDValidity.d.ts +9 -0
- package/www/types/results/rfid/RFIDValue.d.ts +10 -0
- package/www/types/results/rfid/SecurityObject.d.ts +28 -0
- package/www/types/results/rfid/SecurityObjectCertificates.d.ts +8 -0
- package/www/types/results/rfid/SignerInfo.d.ts +41 -0
- package/www/types/results/status/AgeStatus.d.ts +14 -0
- package/www/types/results/status/CheckResult.d.ts +8 -0
- package/www/types/results/status/OpticalStatus.d.ts +29 -0
- package/www/types/results/status/RFIDStatus.d.ts +22 -0
- package/www/types/results/status/ResultsStatus.d.ts +32 -0
- package/www/types/results/visible_digital_seals/BytesData.d.ts +9 -0
- package/www/types/results/visible_digital_seals/DocFeature.d.ts +9 -0
- package/www/types/results/visible_digital_seals/LDSParsingErrorCodes.d.ts +134 -0
- package/www/types/results/visible_digital_seals/LDSParsingNotificationCodes.d.ts +237 -0
- package/www/types/results/visible_digital_seals/VDSData.d.ts +32 -0
- package/www/types/results/visible_digital_seals/VDSNCData.d.ts +35 -0
- package/www/types/results/visual_results/Comparison.d.ts +15 -0
- package/www/types/results/visual_results/FieldType.d.ts +1328 -0
- package/www/types/results/visual_results/GraphicField.d.ts +29 -0
- package/www/types/results/visual_results/GraphicFieldType.d.ts +52 -0
- package/www/types/results/visual_results/GraphicResult.d.ts +10 -0
- package/www/types/results/visual_results/LCID.d.ts +173 -0
- package/www/types/results/visual_results/Lights.d.ts +23 -0
- package/www/types/results/visual_results/RFIDOrigin.d.ts +10 -0
- package/www/types/results/visual_results/Rect.d.ts +9 -0
- package/www/types/results/visual_results/Symbol.d.ts +14 -0
- package/www/types/results/visual_results/TextField.d.ts +40 -0
- package/www/types/results/visual_results/TextResult.d.ts +23 -0
- package/www/types/results/visual_results/TextSource.d.ts +15 -0
- package/www/types/results/visual_results/Validity.d.ts +13 -0
- package/www/types/results/visual_results/Value.d.ts +27 -0
- package/www/types/rfid/CAProtocol.d.ts +6 -0
- package/www/types/rfid/PAAttribute.d.ts +4 -0
- package/www/types/rfid/PACEProtocol.d.ts +5 -0
- package/www/types/rfid/PAResourcesIssuer.d.ts +7 -0
- package/www/types/rfid/PKDCertificate.d.ts +40 -0
- package/www/types/rfid/RFIDErrorCodes.d.ts +121 -0
- package/www/types/rfid/RFIDNotification.d.ts +156 -0
- package/www/types/rfid/TAChallenge.d.ts +7 -0
- package/www/types/rfid/TccParams.d.ts +25 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export class PKDCertificate {
|
|
2
|
+
binaryData
|
|
3
|
+
resourceType
|
|
4
|
+
privateKey
|
|
5
|
+
|
|
6
|
+
constructor(binaryData, resourceType, options) {
|
|
7
|
+
this.binaryData = binaryData
|
|
8
|
+
this.resourceType = resourceType
|
|
9
|
+
this.privateKey = options?.privateKey
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static fromJson(jsonObject) {
|
|
13
|
+
if (jsonObject == null) return null
|
|
14
|
+
return new PKDCertificate(
|
|
15
|
+
jsonObject["binaryData"],
|
|
16
|
+
jsonObject["resourceType"],
|
|
17
|
+
{ privateKey: jsonObject["privateKey"] }
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
toJson() {
|
|
22
|
+
return {
|
|
23
|
+
"binaryData": this.binaryData,
|
|
24
|
+
"resourceType": this.resourceType,
|
|
25
|
+
"privateKey": this.privateKey,
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const PKDResourceType = {
|
|
31
|
+
CERTIFICATE_PA: 0,
|
|
32
|
+
CERTIFICATE_TA: 1,
|
|
33
|
+
LDIF: 2,
|
|
34
|
+
CRL: 3,
|
|
35
|
+
ML: 4,
|
|
36
|
+
DEFL: 5,
|
|
37
|
+
DEVL: 6,
|
|
38
|
+
BL: 7,
|
|
39
|
+
LDIF_TA: 8,
|
|
40
|
+
ML_TA: 9,
|
|
41
|
+
CBOR: 10,
|
|
42
|
+
|
|
43
|
+
getType(value) {
|
|
44
|
+
switch (value) {
|
|
45
|
+
case "pa":
|
|
46
|
+
return PKDResourceType.CERTIFICATE_PA
|
|
47
|
+
case "ta":
|
|
48
|
+
return PKDResourceType.CERTIFICATE_TA
|
|
49
|
+
case "ldif":
|
|
50
|
+
return PKDResourceType.LDIF
|
|
51
|
+
case "crl":
|
|
52
|
+
return PKDResourceType.CRL
|
|
53
|
+
case "ml":
|
|
54
|
+
return PKDResourceType.ML
|
|
55
|
+
case "defl":
|
|
56
|
+
return PKDResourceType.DEFL
|
|
57
|
+
case "devl":
|
|
58
|
+
return PKDResourceType.DEVL
|
|
59
|
+
case "bl":
|
|
60
|
+
return PKDResourceType.BL
|
|
61
|
+
default:
|
|
62
|
+
return PKDResourceType.CERTIFICATE_PA
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { exec } from "../internal/bridge";
|
|
2
|
+
|
|
3
|
+
export const RFIDErrorCodes = {
|
|
4
|
+
UNDEFINED: 0,
|
|
5
|
+
NO_ERROR: 1,
|
|
6
|
+
ALREADY_DONE: 2,
|
|
7
|
+
FAILED: -1,
|
|
8
|
+
NO_CHIP_DETECTED: -2147418111,
|
|
9
|
+
NOT_AVAILABLE: -2147418110,
|
|
10
|
+
INVALID_PARAMETER: -2147418108,
|
|
11
|
+
NOT_INITIALIZED: -2147418107,
|
|
12
|
+
NOT_ENOUGH_MEMORY: -2147418106,
|
|
13
|
+
INVALID_DIRECTORY: -2147418104,
|
|
14
|
+
UNKNOWN_COMMAND: -2147418103,
|
|
15
|
+
FILE_IO_ERROR: -2147418102,
|
|
16
|
+
BUSY: -2147418101,
|
|
17
|
+
OLD_FIRMWARE: -2147418100,
|
|
18
|
+
PCSC_FAILED: -2147352576,
|
|
19
|
+
PCSC_READER_NOT_AVAILABLE: -2147352575,
|
|
20
|
+
PCSC_CANT_CONNECT_CARD: -2147352574,
|
|
21
|
+
PCSC_CARD_IS_NOT_CONNECTED: -2147352573,
|
|
22
|
+
PCSC_OPERATION_CANCELLED: -2147352572,
|
|
23
|
+
PCSC_CARD_IS_BUSY: -2147352571,
|
|
24
|
+
PCSC_FAILED_SCARD: -2147352570,
|
|
25
|
+
PCSC_EXT_LE_FAILED: -2147352560,
|
|
26
|
+
LAYER6_SECURITY_MANAGER: -2046820352,
|
|
27
|
+
LAYER6_APP_SELECTION_FAILURE: -2046820351,
|
|
28
|
+
LAYER6_MUTUAL_AUTH_MAC_FAIL: -2046819840,
|
|
29
|
+
LAYER6_MUTUAL_AUTH_ENC_FAIL: -2046819839,
|
|
30
|
+
LAYER6_MUTUAL_AUTH_FAILURE: -2046819838,
|
|
31
|
+
LAYER6_MUTUAL_AUTH_FAILURE_DATA: -2046819837,
|
|
32
|
+
LAYER6_SM_DO_8E_MISSING: -2046819584,
|
|
33
|
+
LAYER6_SM_DO_87_MISSING: -2046819583,
|
|
34
|
+
LAYER6_SM_DO_99_MISSING: -2046819582,
|
|
35
|
+
LAYER6_SM_MAC_INCORRECT: -2046819581,
|
|
36
|
+
LAYER6_SM_DO_87_INCORRECT: -2046819580,
|
|
37
|
+
LAYER6_NON_TLV_RESPONSE_DATA: -2046819328,
|
|
38
|
+
LAYER6_WRONG_RND_ICC_LENGTH: -2046819327,
|
|
39
|
+
LAYER6_INT_AUTH_FAILURE: -2046819326,
|
|
40
|
+
LAYER6_MSE_SET_KAT_FAILURE: -2046819325,
|
|
41
|
+
LAYER6_MSE_SET_DST_FAILURE: -2046819324,
|
|
42
|
+
LAYER6_PSO_CERTIFICATE_FAILURE: -2046819323,
|
|
43
|
+
LAYER6_MSE_SET_AT_FAILURE: -2046819322,
|
|
44
|
+
LAYER6_GET_CHALLENGE_FAILURE: -2046819321,
|
|
45
|
+
LAYER6_EXT_AUTH_FAILURE: -2046819320,
|
|
46
|
+
LAYER6_GENERAL_AUTH_FAILURE: -2046819319,
|
|
47
|
+
LAYER6_FILE_NOT_FOUND: -2147456638,
|
|
48
|
+
LAYER6_FILE_EOF1: -2147458142,
|
|
49
|
+
LAYER6_WRONG_PARAMS: -2147456256,
|
|
50
|
+
LAYER6_INCORRECT_PARAMS: -2147456640,
|
|
51
|
+
LAYER6_NO_REFERENCE_DATA: -2147456632,
|
|
52
|
+
LAYER6_PWD_SUSPEND: -2147458143,
|
|
53
|
+
LAYER6_PWD_BLOCKED: -2147458144,
|
|
54
|
+
LAYER6_PWD_DEACTIVATED: -2147458141,
|
|
55
|
+
LAYER6_PWD_BLOCKED2: -2147457437,
|
|
56
|
+
LAYER6_PWD_DEACTIVATED2: -2147457436,
|
|
57
|
+
LAYER6_PWD_SUSPEND2: -2147457435,
|
|
58
|
+
LAYER6_PWD_FAILED: -2146380864,
|
|
59
|
+
NOT_PERFORMED: -2100080640,
|
|
60
|
+
SESSION_IS_CLOSED: -2100080639,
|
|
61
|
+
SESSION_TERMINAL_UNSUPPORTED_OPERATION: -2100080638,
|
|
62
|
+
SESSION_TERMINAL_TYPE_UNKNOWN: -2100080624,
|
|
63
|
+
SESSION_TERMINAL_TYPE_BAD_CERTIFICATE: -2100080623,
|
|
64
|
+
SESSION_TERMINAL_TYPE_NOT_SET: -2100080622,
|
|
65
|
+
SESSION_PROCEDURE_TYPE_UNKNOWN: -2100080621,
|
|
66
|
+
Session_Procedure_Type_Unsupported: -2100080620,
|
|
67
|
+
SESSION_PROCEDURE_TYPE_NOT_SET: -2100080619,
|
|
68
|
+
SESSION_ACCESS_KEY_UNKNOWN_TYPE: -2100080618,
|
|
69
|
+
SESSION_ACCESS_KEY_UNSUPPORTED_SM_TYPE: -2100080617,
|
|
70
|
+
SESSION_ACCESS_KEY_INCORRECT_SM_TYPE: -2100080616,
|
|
71
|
+
SESSION_ACCESS_KEY_RESTRICTED: -2100080615,
|
|
72
|
+
SESSION_ACCESS_KEY_INCORRECT_DATA: -2100080614,
|
|
73
|
+
SESSION_ACCESS_KEY_NOT_SET: -2100080613,
|
|
74
|
+
SESSION_PWD_MANAGEMENT_NOT_AUTHORIZED: -2100080612,
|
|
75
|
+
SESSION_ACCESS_CONTROL_UNKNOWN_TYPE: -2100080608,
|
|
76
|
+
SESSION_ACCESS_CONTROL_REQUIRES_SM: -2100080607,
|
|
77
|
+
SESSION_ACCESS_CONTROL_REQUIRES_PACE: -2100080606,
|
|
78
|
+
SESSION_ACCESS_CONTROL_REQUIRES_CA_KEYS: -2100080605,
|
|
79
|
+
SESSION_ACCESS_CONTROL_REQUIRES_TA: -2100080604,
|
|
80
|
+
SESSION_ACCESS_CONTROL_REQUIRES_CA: -2100080603,
|
|
81
|
+
SESSION_ACCESS_CONTROL_INCORRECT_OPTION_CA: -2100080602,
|
|
82
|
+
SESSION_ACCESS_CONTROL_CA_FAILED: -2100080601,
|
|
83
|
+
SESSION_ACCESS_CONTROL_TA_FAILED: -2100080600,
|
|
84
|
+
SESSION_ACCESS_CONTROL_AA_FAILED: -2100080599,
|
|
85
|
+
SESSION_ACCESS_CONTROL_RI_FAILED: -2100080598,
|
|
86
|
+
SESSION_PA_SIGNATURE_CHECK_FAILED: -2100080592,
|
|
87
|
+
SESSION_PA_HASH_CHECK_FAILED: -2100080591,
|
|
88
|
+
SESSION_INVALID_AUX_DATA_DATE_OF_EXPIRY: -2100080576,
|
|
89
|
+
SESSION_INVALID_AUX_DATA_DATE_OF_BIRTH: -2100080575,
|
|
90
|
+
SESSION_INVALID_AUX_DATA_COMMUNITY_ID: -2100080574,
|
|
91
|
+
SESSION_E_SIGN_REQUIRES_APP_SELECTION: -2100080560,
|
|
92
|
+
SESSION_E_SIGN_PIN_NOT_SET: -2100080559,
|
|
93
|
+
SESSION_E_SIGN_PIN_NOT_VERIFIED: -2100080558,
|
|
94
|
+
SESSION_INCORRECT_DATA: -2100080544,
|
|
95
|
+
SESSION_FILE_NOT_ENOUGH_DATA: -2099949568,
|
|
96
|
+
SESSION_FILE_INCORRECT_DATA: -2099884032,
|
|
97
|
+
SESSION_FILE_UNEXPECTED_DATA: -2099818496,
|
|
98
|
+
SESSION_FILE_CONTENTS_UNEXPECTED_DATA: -2099752960,
|
|
99
|
+
SESSION_FILE_WRONG_TAG: -2099687424,
|
|
100
|
+
SESSION_FILE_CANT_USE_DATA: -2099621888,
|
|
101
|
+
SESSION_FILE_CANT_READ_DATA: -2099556352,
|
|
102
|
+
SESSION_FILE_ACCESS_DENIED: -2099490816,
|
|
103
|
+
LAYER34_NO_ERROR: -2080374784,
|
|
104
|
+
LAYER34_TIME_OUT: -2080309248,
|
|
105
|
+
LAYER34_COLLISION: -2080243712,
|
|
106
|
+
LAYER34_CRC: -2080178176,
|
|
107
|
+
LAYER34_DATA_INTEGRITY: -2080112640,
|
|
108
|
+
LAYER34_DATA_LENGTH: -2080047104,
|
|
109
|
+
Layer34_RFU: -2079981568,
|
|
110
|
+
LAYER34_COLLISION_TOO_MANY: -2079916032,
|
|
111
|
+
LAYER34_PROTOCOL_B: -2079850496,
|
|
112
|
+
LAYER34_DATA_CONTENTS: -2079784960,
|
|
113
|
+
LAYER34_PROTOCOL: -2079719424,
|
|
114
|
+
LAYER34_GLOBAL_TIME_OUT: -2079653888,
|
|
115
|
+
LAYER34_MIFARE_AUTH: -2079588352,
|
|
116
|
+
LAYER34_SAM_ERROR: -2079522816,
|
|
117
|
+
LAYER34_SAM_COLLISION: -2079457280,
|
|
118
|
+
LAYER34_SAM_ACKNOWLEDGE: -2079391744
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
RFIDErrorCodes.getTranslation = async function (value) {
|
|
122
|
+
return await exec("getTranslation", ["RFIDErrorCodes", value]);
|
|
123
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { RFIDDataFileType } from "../results/rfid/RFIDDataFileType";
|
|
2
|
+
|
|
3
|
+
export class RFIDNotification {
|
|
4
|
+
notificationCode
|
|
5
|
+
dataFileType
|
|
6
|
+
progress
|
|
7
|
+
|
|
8
|
+
constructor() {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static fromJson(jsonObject) {
|
|
12
|
+
if (jsonObject == null) return null
|
|
13
|
+
const result = new RFIDNotification()
|
|
14
|
+
|
|
15
|
+
result.notificationCode = jsonObject["notificationCode"]
|
|
16
|
+
result.dataFileType = jsonObject["dataFileType"]
|
|
17
|
+
result.progress = jsonObject["progress"]
|
|
18
|
+
|
|
19
|
+
return result
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
toJson() {
|
|
23
|
+
return {
|
|
24
|
+
"notificationCode": this.notificationCode,
|
|
25
|
+
"dataFileType": this.dataFileType,
|
|
26
|
+
"progress": this.progress,
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const RFIDNotificationCodes = {
|
|
32
|
+
ERROR: 65536,
|
|
33
|
+
DOCUMENT_READY: 65537,
|
|
34
|
+
READ_PROTOCOL4: 65539,
|
|
35
|
+
READ_PROTOCOL3: 65546,
|
|
36
|
+
PROGRESS: 65547,
|
|
37
|
+
TA_STEP: 65550,
|
|
38
|
+
SM_REQUIRED: 65551,
|
|
39
|
+
ISO_ERROR: 69632,
|
|
40
|
+
PA_REQUEST: 77824,
|
|
41
|
+
SM_ESTABLISHED: 81935,
|
|
42
|
+
PCSC_READER_DISCONNECTED: 131072,
|
|
43
|
+
PCSC_READER_LIST_CHANGED: 131073,
|
|
44
|
+
PCSC_BYTES_RECEIVED: 131074,
|
|
45
|
+
PCSC_TOTAL_READING_TIME: 131075,
|
|
46
|
+
PCSC_DATA_RECEIVED: 131076,
|
|
47
|
+
PCSC_BYTES_SENT: 131077,
|
|
48
|
+
PCSC_TOTAL_READING_SPEED: 131078,
|
|
49
|
+
PCSC_TOTAL_PROCESS_TIME: 131079,
|
|
50
|
+
PCSC_READER_LIST_CHANGING: 131080,
|
|
51
|
+
PCSC_EXT_LENGTH_SUPPORT: 131088,
|
|
52
|
+
PA_CERTIFICATE_CHAIN: 131089,
|
|
53
|
+
PA_CERTIFICATE_CHAIN_ITEM: 131090,
|
|
54
|
+
SCENARIO: 131104,
|
|
55
|
+
PCSC_READING_DATAGROUP: 196608,
|
|
56
|
+
PCSC_FILE_NOT_FOUND: 262144,
|
|
57
|
+
PCSC_END_OF_FILE: 327680,
|
|
58
|
+
PCSC_FILE_ACCESS_DENIED: 393216,
|
|
59
|
+
PCSC_APPLICATION_SELECTED: 458752,
|
|
60
|
+
AC_PROCEDURE_START: 524288,
|
|
61
|
+
AC_PROCEDURE_FINISH: 589824,
|
|
62
|
+
PA_SECURITY_OBJECT_CHECK: 655360,
|
|
63
|
+
PA_FILE_CHECK: 720896,
|
|
64
|
+
PCSC_UPDATING_DATAGROUP: 786432,
|
|
65
|
+
AUXILIARY_DATA_VALIDATION: 851968,
|
|
66
|
+
RI_SECTOR_ID: 917504,
|
|
67
|
+
BIOMETRICS_EMPTY_PLACEHOLDER: 983040,
|
|
68
|
+
SESSION_FILE_DATA_UPDATED: 1048576,
|
|
69
|
+
TCC_TA_RESOURCES: 1114112,
|
|
70
|
+
TCC_TA_SIGNATURE: 1114113,
|
|
71
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export class TAChallenge {
|
|
2
|
+
data
|
|
3
|
+
auxPCD
|
|
4
|
+
challengePICC
|
|
5
|
+
hashPK
|
|
6
|
+
idPICC
|
|
7
|
+
|
|
8
|
+
constructor() {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static fromJson(jsonObject) {
|
|
12
|
+
if (jsonObject == null) return null
|
|
13
|
+
const result = new TAChallenge()
|
|
14
|
+
|
|
15
|
+
result.data = jsonObject["data"]
|
|
16
|
+
result.auxPCD = jsonObject["auxPCD"] ?? ""
|
|
17
|
+
result.challengePICC = jsonObject["challengePICC"] ?? ""
|
|
18
|
+
result.hashPK = jsonObject["hashPK"] ?? ""
|
|
19
|
+
result.idPICC = jsonObject["idPICC"] ?? ""
|
|
20
|
+
|
|
21
|
+
return result
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
toJson() {
|
|
25
|
+
return {
|
|
26
|
+
"data": this.data,
|
|
27
|
+
"auxPCD": this.auxPCD,
|
|
28
|
+
"challengePICC": this.challengePICC,
|
|
29
|
+
"hashPK": this.hashPK,
|
|
30
|
+
"idPICC": this.idPICC,
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** TCC service related parameters for RFID session configuration. */
|
|
2
|
+
export class TccParams {
|
|
3
|
+
serviceUrlTA
|
|
4
|
+
serviceUrlPA
|
|
5
|
+
pfxCertUrl
|
|
6
|
+
pfxPassPhrase
|
|
7
|
+
pfxCert
|
|
8
|
+
|
|
9
|
+
constructor() {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static fromJson(jsonObject) {
|
|
13
|
+
if (jsonObject == null) return null
|
|
14
|
+
const result = new TccParams()
|
|
15
|
+
|
|
16
|
+
result.serviceUrlTA = jsonObject["serviceUrlTA"]
|
|
17
|
+
result.serviceUrlPA = jsonObject["serviceUrlPA"]
|
|
18
|
+
result.pfxCertUrl = jsonObject["pfxCertUrl"]
|
|
19
|
+
result.pfxPassPhrase = jsonObject["pfxPassPhrase"]
|
|
20
|
+
result.pfxCert = jsonObject["pfxCert"]
|
|
21
|
+
|
|
22
|
+
return result
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
toJson() {
|
|
26
|
+
return {
|
|
27
|
+
"serviceUrlTA": this.serviceUrlTA,
|
|
28
|
+
"serviceUrlPA": this.serviceUrlPA,
|
|
29
|
+
"pfxCertUrl": this.pfxCertUrl,
|
|
30
|
+
"pfxPassPhrase": this.pfxPassPhrase,
|
|
31
|
+
"pfxCert": this.pfxCert,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A configuration file for DocumentReader initialization.
|
|
3
|
+
* Controls initialization time properties such as licenseUpdate and delayedNNLoad.
|
|
4
|
+
*/
|
|
5
|
+
export declare class InitConfig {
|
|
6
|
+
/**
|
|
7
|
+
* The license binary file. Base64 string.
|
|
8
|
+
*/
|
|
9
|
+
readonly license: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Enables automatic license update check during {@link DocumentReader} initialization.
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
licenseUpdate: boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Allows you to configure the maximum time needed for a license update (in seconds).
|
|
19
|
+
*/
|
|
20
|
+
licenseUpdateTimeout?: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Defines whether the {@link DocumentReader} delays loading of neural networks.
|
|
24
|
+
*
|
|
25
|
+
* When set to `true` the initialization starts in the background thread after
|
|
26
|
+
* the method {@link DocumentReader#initialize} is called. If the document
|
|
27
|
+
* processing is initiated before all the networks are loaded,
|
|
28
|
+
* the {@link DocumentReader} will wait for it before starting the handling.
|
|
29
|
+
*
|
|
30
|
+
* When set to `false` the initialization is performed during
|
|
31
|
+
* {@link DocumentReader#initialize} method.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
delayedNNLoad: boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The path to the database file.
|
|
38
|
+
*
|
|
39
|
+
* IOS only. For Android use {@link InitConfig#customDb}.
|
|
40
|
+
*/
|
|
41
|
+
databasePath?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Custom database binary. Base64 string.
|
|
45
|
+
*
|
|
46
|
+
* Android only. For iOS use {@link InitConfig#databasePath}.
|
|
47
|
+
*/
|
|
48
|
+
customDb?: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Android only.
|
|
52
|
+
*/
|
|
53
|
+
blackList?: Record<string, any>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructor for initialization using a license binary.
|
|
57
|
+
* @param license The license binary file. Base64 string.
|
|
58
|
+
*/
|
|
59
|
+
constructor(license: string);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructor for initialization using a ble device.
|
|
63
|
+
* Doesn't need a license file, it will be fetched automatically from your ble device.
|
|
64
|
+
*
|
|
65
|
+
* Requires [btdevice plugin](https://www.npmjs.com/package/@regulaforensics/react-native-document-reader-btdevice).
|
|
66
|
+
*/
|
|
67
|
+
static withBleDevice(): InitConfig;
|
|
68
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ProcessParams } from "../params/process_params/ProcessParams";
|
|
2
|
+
|
|
3
|
+
export declare class OnlineProcessingConfig {
|
|
4
|
+
mode: OnlineMode;
|
|
5
|
+
url: string;
|
|
6
|
+
processParams: ProcessParams;
|
|
7
|
+
imageFormat: ImageFormat;
|
|
8
|
+
imageCompressionQuality: number;
|
|
9
|
+
requestHeaders?: Record<string, string>;
|
|
10
|
+
|
|
11
|
+
constructor(mode: OnlineMode);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare enum ImageFormat {
|
|
15
|
+
PNG = 0,
|
|
16
|
+
JPG = 1,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare enum OnlineMode {
|
|
20
|
+
MANUAL = 0,
|
|
21
|
+
AUTO = 1,
|
|
22
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { DocumentReaderCompletion, DocReaderAction } from "../index";
|
|
2
|
+
import { Results } from "../results/Results";
|
|
3
|
+
import { RFIDException } from "../info/RFIDException";
|
|
4
|
+
import { RFIDNotification } from "../rfid/RFIDNotification";
|
|
5
|
+
import { PAResourcesIssuer } from "../rfid/PAResourcesIssuer";
|
|
6
|
+
import { PKDCertificate } from "../rfid/PKDCertificate";
|
|
7
|
+
import { TAChallenge } from "../rfid/TAChallenge";
|
|
8
|
+
import { PACEProtocol } from "../rfid/PACEProtocol";
|
|
9
|
+
import { CAProtocol } from "../rfid/CAProtocol";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A configuration file for the RFID chip processing.
|
|
13
|
+
*/
|
|
14
|
+
export declare class RFIDConfig {
|
|
15
|
+
/**
|
|
16
|
+
* Callback for reveiving notification about RFID reading process.
|
|
17
|
+
*/
|
|
18
|
+
onProgress?: RFIDProgressCompletion;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Callback for receiving signal when RFID chip is recognized
|
|
22
|
+
* by a phone and chip reading is started.
|
|
23
|
+
*
|
|
24
|
+
* Only used with default constructor. If {@link RFIDConfig.withoutUI} was used,
|
|
25
|
+
* you will receive this update via {@link DocumentReaderCompletion}.
|
|
26
|
+
*/
|
|
27
|
+
onChipDetected?: ChipDetectedCompletion;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Fires when RFID chip reading was interrupted with no severe reasons
|
|
31
|
+
* (for example connection to the chip was lost) and will be reestablished automatically.
|
|
32
|
+
*
|
|
33
|
+
* Only used with default constructor. If {@link RFIDConfig.withoutUI} was used,
|
|
34
|
+
* you will receive this update via {@link DocumentReaderCompletion}
|
|
35
|
+
* and chip reading will not be reestablished.
|
|
36
|
+
*/
|
|
37
|
+
onRetryReadChip?: RetryReadChipCompletion;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Callback for receiving RFID request data
|
|
41
|
+
*/
|
|
42
|
+
onRequestPACertificates?: PaCertificateCompletion;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Callback for receiving RFID request data
|
|
46
|
+
*/
|
|
47
|
+
onRequestTACertificates?: TaCertificateCompletion;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Callback for receiving RFID request data
|
|
51
|
+
*/
|
|
52
|
+
onRequestTASignature?: TaSignatureCompletion;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Callback for receiving RFID request data
|
|
56
|
+
*/
|
|
57
|
+
onRequestAAChallenge?: AAChallengeCompletion;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Callback for receiving RFID request data
|
|
61
|
+
*/
|
|
62
|
+
onRequestPACEProtocol?: PACEProtocolCompletion;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Callback for receiving RFID request data
|
|
66
|
+
*/
|
|
67
|
+
onRequestCAProtocol?: CAProtocolCompletion;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Regular RFID chip reading.
|
|
71
|
+
*
|
|
72
|
+
* @param completion - block to execute after the chip reading process finishes.
|
|
73
|
+
*/
|
|
74
|
+
constructor(completion: DocumentReaderCompletion);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* RFID chip reading with no UI.
|
|
78
|
+
*
|
|
79
|
+
* User is supposed to implement the UI.
|
|
80
|
+
*
|
|
81
|
+
* Since this constructor accepts {@link RFIDCompletion}
|
|
82
|
+
* instead of {@link DocumentReaderCompletion}, user will be provided
|
|
83
|
+
* with more in-depth error information.
|
|
84
|
+
*
|
|
85
|
+
* @param completion - block to execute after the chip reading process finishes.
|
|
86
|
+
*/
|
|
87
|
+
static withoutUI(completion: RFIDCompletion): RFIDConfig;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Callback for receiving answer from processing engine.
|
|
92
|
+
*
|
|
93
|
+
* @param action - defines current processing status.
|
|
94
|
+
* @param results - defines current processing results.
|
|
95
|
+
* @param error - in case of anything is wrong - brief message for developer, `null` otherwise.
|
|
96
|
+
*/
|
|
97
|
+
export type RFIDCompletion = (action: DocReaderAction, results: Results | null, error: RFIDException | null) => void;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Completion for reveiving notification about RFID reading process.
|
|
101
|
+
*/
|
|
102
|
+
export type RFIDProgressCompletion = (notification: RFIDNotification) => void;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Callback for receiving signal when RFID chip is recognized
|
|
106
|
+
* by a phone and chip reading is started.
|
|
107
|
+
*
|
|
108
|
+
* Only used with default constructor. If {@link RFIDConfig.withoutUI} was used,
|
|
109
|
+
* you will receive this update via {@link DocumentReaderCompletion}.
|
|
110
|
+
*/
|
|
111
|
+
export type ChipDetectedCompletion = () => void;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Fires when RFID chip reading was interrupted with no severe reasons
|
|
115
|
+
* (for example connection to the chip was lost) and will be reestablished automatically.
|
|
116
|
+
*
|
|
117
|
+
* Only used with default constructor. If {@link RFIDConfig.withoutUI} was used,
|
|
118
|
+
* you will receive this update via {@link DocumentReaderCompletion}
|
|
119
|
+
* and chip reading will not be reestablished.
|
|
120
|
+
*
|
|
121
|
+
* @param error - a brief message for developer.
|
|
122
|
+
*/
|
|
123
|
+
export type RetryReadChipCompletion = (error: RFIDException) => void;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Callback for receiving RFID request data.
|
|
127
|
+
*/
|
|
128
|
+
export type PaCertificateCompletion = (serialNumber: string, issuer: PAResourcesIssuer | null, request: PKDCertificateRequest) => void;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Callback for receiving RFID request data.
|
|
132
|
+
*/
|
|
133
|
+
export type TaCertificateCompletion = (keyCAR: string | null, request: PKDCertificateRequest) => void;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Provided to a user for passing PKDCertificates to the native part of DocumentReader.
|
|
137
|
+
*/
|
|
138
|
+
export type PKDCertificateRequest = (certificates?: PKDCertificate[]) => Promise<void>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Callback for receiving RFID request data.
|
|
142
|
+
*/
|
|
143
|
+
export type TaSignatureCompletion = (challenge: TAChallenge | null, request: TASignatureRequest) => void;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Provided to a user for passing TASignature to the native part of DocumentReader. Base64 string.
|
|
147
|
+
*/
|
|
148
|
+
export type TASignatureRequest = (signature?: string) => Promise<void>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Callback for receiving RFID request data.
|
|
152
|
+
*/
|
|
153
|
+
export type AAChallengeCompletion = (challenge: string | null, request: AAChallengeRequest) => void;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Provided to a user for passing AAChallenge to the native part of DocumentReader.
|
|
157
|
+
*/
|
|
158
|
+
export type AAChallengeRequest = (challenge?: string | null) => Promise<void>;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Callback for receiving RFID request data.
|
|
162
|
+
*/
|
|
163
|
+
export type PACEProtocolCompletion = (protocols: PACEProtocol[], request: PACEProtocolRequest) => void;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Provided to a user for choosing PACEProtocol.
|
|
167
|
+
*/
|
|
168
|
+
export type PACEProtocolRequest = (protocol: PACEProtocol) => Promise<void>;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Callback for receiving RFID request data.
|
|
172
|
+
*/
|
|
173
|
+
export type CAProtocolCompletion = (protocols: CAProtocol[], request: CAProtocolRequest) => void;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Provided to a user for choosing CAProtocol.
|
|
177
|
+
*/
|
|
178
|
+
export type CAProtocolRequest = (protocol: CAProtocol) => Promise<void>;
|