@microblink/blinkid-react-native 7.6.2 → 8000.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BlinkidReactNative.podspec +2 -1
- package/README.md +490 -282
- package/android/build.gradle +56 -4
- package/android/gradle.properties +3 -4
- package/android/src/main/java/com/microblink/blinkid/reactnative/BlinkIdDeserializationUtilities.kt +312 -251
- package/android/src/main/java/com/microblink/blinkid/reactnative/BlinkIdSerializationUtilities.kt +859 -710
- package/android/src/main/java/com/microblink/blinkid/reactnative/BlinkidReactNativeModule.kt +42 -34
- package/ios/BlinkidReactNative.mm +42 -52
- package/ios/BlinkidReactNativeModule.swift +92 -57
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/BlinkID +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Headers/BlinkID-Swift.h +23857 -17935
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Headers/BlinkID.h +2 -1
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Info.plist +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios.abi.json +24452 -8480
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios.private.swiftinterface +536 -234
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios.swiftinterface +536 -234
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/PrivateHeaders/SwiftCxxBridge.hpp +2 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/_CodeSignature/CodeResources +19 -30
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/conan.xcconfig +3 -3
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/BlinkID +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Headers/BlinkID-Swift.h +51708 -39864
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Headers/BlinkID.h +2 -1
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Info.plist +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios-simulator.abi.json +24452 -8480
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +536 -234
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios-simulator.swiftinterface +536 -234
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/x86_64-apple-ios-simulator.abi.json +24452 -8480
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +536 -234
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +536 -234
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/PrivateHeaders/SwiftCxxBridge.hpp +2 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/_CodeSignature/CodeResources +29 -40
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/conan.xcconfig +3 -3
- package/ios/Frameworks/BlinkIDUX.xcframework/Info.plist +5 -5
- package/ios/Frameworks/BlinkIDUX.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/_CodeSignature/CodeResources +276 -859
- package/ios/Frameworks/BlinkIDUX.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/Assets.car +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/Info.plist +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ak.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/am.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ar.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/bn.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/cs.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/da.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/de.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/el.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/en-GB.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/en.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/es-MX.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/es.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fa.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fi.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fil.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fr-CA.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ha.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/he.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/hi.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/hr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/hu.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/id.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/is.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/it.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ja.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ka-GE.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/kk.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/km-KH.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ko.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/lv.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ms.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/nb.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ne.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/nl.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/pl.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ps-AF.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/pt-BR.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/pt.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ro.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ru.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/si.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sk.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sl.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sv.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sw.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/th.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/tr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/uk.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ur.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/uz.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/vi.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/yo.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/zh-Hans.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/zh-Hant.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Info.plist +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.abi.json +8983 -4775
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.package.swiftinterface +234 -100
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.private.swiftinterface +234 -100
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.swiftinterface +234 -100
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/Assets.car +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/Info.plist +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/_CodeSignature/CodeResources +114 -346
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ak.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/am.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ar.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/bn.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/cs.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/da.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/de.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/el.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/en-GB.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/en.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/es-MX.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/es.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fa.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fi.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fil.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fr-CA.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/fr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ha.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/he.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/hi.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/hr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/hu.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/id.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/is.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/it.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ja.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ka-GE.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/kk.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/km-KH.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ko.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/lv.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ms.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/nb.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ne.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/nl.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/pl.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ps-AF.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/pt-BR.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/pt.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ro.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ru.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/si.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sk.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sl.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sv.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/sw.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/th.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/tr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/uk.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/ur.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/uz.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/vi.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/yo.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/zh-Hans.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/zh-Hant.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Info.plist +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.abi.json +8983 -4775
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +234 -100
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +234 -100
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.swiftinterface +234 -100
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.abi.json +8983 -4775
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +234 -100
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +234 -100
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +234 -100
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/_CodeSignature/CodeResources +1 -1
- package/ios/Serialization/BlinkIdDeserializationUtils.swift +492 -0
- package/ios/Serialization/BlinkIdSerializationUtils.swift +866 -0
- package/lib/module/NativeBlinkidReactNative.js.map +1 -1
- package/lib/module/blinkIdResult.js +1 -764
- package/lib/module/blinkIdResult.js.map +1 -1
- package/lib/module/blinkIdSettings.js +1 -496
- package/lib/module/blinkIdSettings.js.map +1 -1
- package/lib/module/index.js +81 -17
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +697 -3334
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/NativeBlinkidReactNative.d.ts +26 -5
- package/lib/typescript/src/NativeBlinkidReactNative.d.ts.map +1 -1
- package/lib/typescript/src/blinkIdResult.d.ts +35 -17
- package/lib/typescript/src/blinkIdResult.d.ts.map +1 -1
- package/lib/typescript/src/blinkIdSettings.d.ts +36 -297
- package/lib/typescript/src/blinkIdSettings.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +38 -10
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +992 -1149
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/NativeBlinkidReactNative.ts +28 -5
- package/src/blinkIdResult.ts +44 -432
- package/src/blinkIdSettings.ts +53 -373
- package/src/index.tsx +208 -35
- package/src/types.ts +1180 -1398
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/ios/BlinkIdDeserializationUtilities.swift +0 -374
- package/ios/BlinkIdSerializationUtilities.swift +0 -839
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Headers/MBSampleBufferWrapper.h +0 -28
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Headers/MBSampleBufferWrapper.h +0 -28
- package/ios/Frameworks/BlinkIDUX.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/_CodeSignature/CodeRequirements-1 +0 -0
- package/lib/module/blinkIdUtilities.js +0 -21
- package/lib/module/blinkIdUtilities.js.map +0 -1
- package/lib/typescript/src/blinkIdUtilities.d.ts +0 -8
- package/lib/typescript/src/blinkIdUtilities.d.ts.map +0 -1
- package/src/blinkIdUtilities.ts +0 -20
package/android/src/main/java/com/microblink/blinkid/reactnative/BlinkIdSerializationUtilities.kt
CHANGED
|
@@ -4,738 +4,887 @@ import android.graphics.Bitmap
|
|
|
4
4
|
import com.microblink.blinkid.core.result.AddressDetailedInfo
|
|
5
5
|
import com.microblink.blinkid.core.result.AlphabetType
|
|
6
6
|
import com.microblink.blinkid.core.result.DataMatchFieldState
|
|
7
|
+
import com.microblink.blinkid.core.result.DataMatchFieldType
|
|
7
8
|
import com.microblink.blinkid.core.result.DataMatchResult
|
|
8
|
-
import com.microblink.blinkid.core.result.
|
|
9
|
+
import com.microblink.blinkid.core.result.DataMatchState
|
|
9
10
|
import com.microblink.blinkid.core.result.DependentInfo
|
|
10
11
|
import com.microblink.blinkid.core.result.DriverLicenseDetailedInfo
|
|
11
|
-
import com.microblink.blinkid.core.result.Rectangle
|
|
12
12
|
import com.microblink.blinkid.core.result.SingleSideScanningResult
|
|
13
13
|
import com.microblink.blinkid.core.result.StringResult
|
|
14
14
|
import com.microblink.blinkid.core.result.VehicleClassInfo
|
|
15
15
|
import com.microblink.blinkid.core.result.barcode.BarcodeData
|
|
16
16
|
import com.microblink.blinkid.core.result.barcode.BarcodeResult
|
|
17
|
+
import com.microblink.blinkid.core.result.barcode.BarcodeType
|
|
17
18
|
import com.microblink.blinkid.core.result.classinfo.DocumentClassInfo
|
|
18
|
-
import com.microblink.blinkid.core.result.
|
|
19
|
+
import com.microblink.blinkid.core.result.mrz.DocumentType
|
|
19
20
|
import com.microblink.blinkid.core.result.mrz.MrzResult
|
|
20
21
|
import com.microblink.blinkid.core.result.viz.VizResult
|
|
21
22
|
import com.microblink.blinkid.core.session.BlinkIdScanningResult
|
|
22
23
|
import org.json.JSONObject
|
|
23
24
|
import java.io.ByteArrayOutputStream
|
|
24
25
|
import android.util.Base64
|
|
25
|
-
import com.microblink.blinkid.core.result.
|
|
26
|
+
import com.microblink.blinkid.core.result.ParentInfo
|
|
26
27
|
import com.microblink.blinkid.core.result.barcode.BarcodeElement
|
|
28
|
+
import com.microblink.blinkid.core.result.DateResult
|
|
29
|
+
import com.microblink.blinkid.core.result.DetailedCroppedImageResult
|
|
30
|
+
import com.microblink.blinkid.core.result.Rectangle
|
|
31
|
+
import com.microblink.blinkid.core.result.ScanningSide
|
|
27
32
|
import org.json.JSONArray
|
|
28
33
|
|
|
29
34
|
object BlinkIdSerializationUtilities {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
return barcodeDataJson
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
private fun serializeMrzResult(mrzResult: MrzResult?): JSONObject {
|
|
488
|
-
val mrzResultJson = JSONObject()
|
|
489
|
-
mrzResultJson.put("dateOfBirth", serializeDateResult(mrzResult?.dateOfBirth))
|
|
490
|
-
mrzResultJson.put("dateOfExpiry", serializeDateResult(mrzResult?.dateOfExpiry))
|
|
491
|
-
mrzResultJson.put("documentCode", mrzResult?.documentCode)
|
|
492
|
-
mrzResultJson.put("documentNumber", mrzResult?.documentNumber)
|
|
493
|
-
mrzResultJson.put("documentType", mrzResult?.documentType?.ordinal)
|
|
494
|
-
mrzResultJson.put("gender", mrzResult?.gender)
|
|
495
|
-
mrzResultJson.put("issuer", mrzResult?.issuer)
|
|
496
|
-
mrzResultJson.put("issuerName", mrzResult?.issuerName)
|
|
497
|
-
mrzResultJson.put("nationality", mrzResult?.nationality)
|
|
498
|
-
mrzResultJson.put("nationalityName", mrzResult?.nationalityName)
|
|
499
|
-
mrzResultJson.put("opt1", mrzResult?.opt1)
|
|
500
|
-
mrzResultJson.put("opt2", mrzResult?.opt2)
|
|
501
|
-
mrzResultJson.put("primaryID", mrzResult?.primaryID)
|
|
502
|
-
mrzResultJson.put("rawMRZString", mrzResult?.rawMRZString)
|
|
503
|
-
mrzResultJson.put("sanitizedDocumentCode", mrzResult?.sanitizedDocumentCode)
|
|
504
|
-
mrzResultJson.put("sanitizedDocumentNumber", mrzResult?.sanitizedDocumentNumber)
|
|
505
|
-
mrzResultJson.put("sanitizedIssuer", mrzResult?.sanitizedIssuer)
|
|
506
|
-
mrzResultJson.put("sanitizedNationality", mrzResult?.sanitizedNationality)
|
|
507
|
-
mrzResultJson.put("sanitizedOpt1", mrzResult?.sanitizedOpt1)
|
|
508
|
-
mrzResultJson.put("sanitizedOpt2", mrzResult?.sanitizedOpt2)
|
|
509
|
-
mrzResultJson.put("secondaryID", mrzResult?.secondaryID)
|
|
510
|
-
mrzResultJson.put("verified", mrzResult?.verified)
|
|
511
|
-
|
|
512
|
-
return mrzResultJson
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
private fun serializeVizResult(vizResult: VizResult?): JSONObject {
|
|
516
|
-
val vizResultJson = JSONObject()
|
|
517
|
-
|
|
518
|
-
vizResult?.additionalAddressInformation?.let {
|
|
519
|
-
vizResultJson.put("additionalAddressInformation", serializeStringResult(it))
|
|
520
|
-
}
|
|
521
|
-
vizResult?.additionalNameInformation?.let {
|
|
522
|
-
vizResultJson.put("additionalNameInformation", serializeStringResult(it))
|
|
523
|
-
}
|
|
524
|
-
vizResult?.additionalOptionalAddressInformation?.let {
|
|
525
|
-
vizResultJson.put("additionalOptionalAddressInformation", serializeStringResult(it))
|
|
526
|
-
}
|
|
527
|
-
vizResult?.additionalPersonalIdNumber?.let {
|
|
528
|
-
vizResultJson.put("additionalPersonalIdNumber", serializeStringResult(it))
|
|
529
|
-
}
|
|
530
|
-
vizResult?.address?.let {
|
|
531
|
-
vizResultJson.put("address", serializeStringResult(it))
|
|
532
|
-
}
|
|
533
|
-
vizResult?.bloodType?.let {
|
|
534
|
-
vizResultJson.put("bloodType", serializeStringResult(it))
|
|
535
|
-
}
|
|
536
|
-
vizResult?.dateOfBirth?.let {
|
|
537
|
-
vizResultJson.put("dateOfBirth", serializeDateResult(it))
|
|
538
|
-
}
|
|
539
|
-
vizResult?.dateOfExpiry?.let {
|
|
540
|
-
vizResultJson.put("dateOfExpiry", serializeDateResult(it))
|
|
541
|
-
}
|
|
542
|
-
vizResult?.dateOfIssue?.let {
|
|
543
|
-
vizResultJson.put("dateOfIssue", serializeDateResult(it))
|
|
544
|
-
}
|
|
545
|
-
vizResult?.dateOfEntry?.let {
|
|
546
|
-
vizResultJson.put("dateOfEntry", serializeDateResult(it))
|
|
547
|
-
}
|
|
548
|
-
vizResult?.localityCode?.let {
|
|
549
|
-
vizResultJson.put("localityCode", serializeStringResult(it))
|
|
550
|
-
}
|
|
551
|
-
vizResult?.maidenName?.let {
|
|
552
|
-
vizResultJson.put("maidenName", serializeStringResult(it))
|
|
553
|
-
}
|
|
554
|
-
vizResult?.municipalityCode?.let {
|
|
555
|
-
vizResultJson.put("municipalityCode", serializeStringResult(it))
|
|
556
|
-
}
|
|
557
|
-
vizResult?.municipalityOfRegistration?.let {
|
|
558
|
-
vizResultJson.put("municipalityOfRegistration", serializeStringResult(it))
|
|
559
|
-
}
|
|
560
|
-
vizResult?.pollingStationCode?.let {
|
|
561
|
-
vizResultJson.put("pollingStationCode", serializeStringResult(it))
|
|
562
|
-
}
|
|
563
|
-
vizResult?.registrationCenterCode?.let {
|
|
564
|
-
vizResultJson.put("registrationCenterCode", serializeStringResult(it))
|
|
565
|
-
}
|
|
566
|
-
vizResult?.sectionCode?.let {
|
|
567
|
-
vizResultJson.put("sectionCode", serializeStringResult(it))
|
|
568
|
-
}
|
|
569
|
-
vizResult?.stateCode?.let {
|
|
570
|
-
vizResultJson.put("stateCode", serializeStringResult(it))
|
|
571
|
-
}
|
|
572
|
-
vizResult?.stateName?.let {
|
|
573
|
-
vizResultJson.put("stateName", serializeStringResult(it))
|
|
574
|
-
}
|
|
575
|
-
vizResult?.dateOfExpiryPermanent?.let {
|
|
576
|
-
vizResultJson.put("dateOfExpiryPermanent", it)
|
|
577
|
-
}
|
|
578
|
-
vizResult?.documentAdditionalNumber?.let {
|
|
579
|
-
vizResultJson.put("documentAdditionalNumber", serializeStringResult(it))
|
|
580
|
-
}
|
|
581
|
-
vizResult?.dependentsInfo.let {
|
|
582
|
-
vizResultJson.put(
|
|
583
|
-
"dependentsInfo",
|
|
584
|
-
JSONArray(it?.map { dependentInfo -> serializeDependentInfo(dependentInfo) })
|
|
585
|
-
)
|
|
586
|
-
}
|
|
587
|
-
vizResult?.documentNumber?.let {
|
|
588
|
-
vizResultJson.put("documentNumber", serializeStringResult(it))
|
|
589
|
-
}
|
|
590
|
-
vizResult?.documentOptionalAdditionalNumber?.let {
|
|
591
|
-
vizResultJson.put("documentOptionalAdditionalNumber", serializeStringResult(it))
|
|
592
|
-
}
|
|
593
|
-
vizResult?.documentSubtype?.let {
|
|
594
|
-
vizResultJson.put("documentSubtype", serializeStringResult(it))
|
|
595
|
-
}
|
|
596
|
-
vizResult?.driverLicenseDetailedInfo?.let {
|
|
597
|
-
vizResultJson.put("driverLicenseDetailedInfo", serializeDriverLicenseDetailedInfo(it))
|
|
598
|
-
}
|
|
599
|
-
vizResult?.eligibilityCategory?.let {
|
|
600
|
-
vizResultJson.put("eligibilityCategory", serializeStringResult(it))
|
|
601
|
-
}
|
|
602
|
-
vizResult?.employer?.let {
|
|
603
|
-
vizResultJson.put("employer", serializeStringResult(it))
|
|
604
|
-
}
|
|
605
|
-
vizResult?.fathersName?.let {
|
|
606
|
-
vizResultJson.put("fathersName", serializeStringResult(it))
|
|
607
|
-
}
|
|
608
|
-
vizResult?.firstName?.let {
|
|
609
|
-
vizResultJson.put("firstName", serializeStringResult(it))
|
|
610
|
-
}
|
|
611
|
-
vizResult?.fullName?.let {
|
|
612
|
-
vizResultJson.put("fullName", serializeStringResult(it))
|
|
613
|
-
}
|
|
614
|
-
vizResult?.issuingAuthority?.let {
|
|
615
|
-
vizResultJson.put("issuingAuthority", serializeStringResult(it))
|
|
616
|
-
}
|
|
617
|
-
vizResult?.lastName?.let {
|
|
618
|
-
vizResultJson.put("lastName", serializeStringResult(it))
|
|
619
|
-
}
|
|
620
|
-
vizResult?.localizedName?.let {
|
|
621
|
-
vizResultJson.put("localizedName", serializeStringResult(it))
|
|
622
|
-
}
|
|
623
|
-
vizResult?.profession?.let {
|
|
624
|
-
vizResultJson.put("profession", serializeStringResult(it))
|
|
625
|
-
}
|
|
626
|
-
vizResult?.placeOfBirth?.let {
|
|
627
|
-
vizResultJson.put("placeOfBirth", serializeStringResult(it))
|
|
628
|
-
}
|
|
629
|
-
vizResult?.personalIdNumber?.let {
|
|
630
|
-
vizResultJson.put("personalIdNumber", serializeStringResult(it))
|
|
631
|
-
}
|
|
632
|
-
vizResult?.nationality?.let {
|
|
633
|
-
vizResultJson.put("nationality", serializeStringResult(it))
|
|
634
|
-
}
|
|
635
|
-
vizResult?.mothersName?.let {
|
|
636
|
-
vizResultJson.put("mothersName", serializeStringResult(it))
|
|
637
|
-
}
|
|
638
|
-
vizResult?.maritalStatus?.let {
|
|
639
|
-
vizResultJson.put("maritalStatus", serializeStringResult(it))
|
|
640
|
-
}
|
|
641
|
-
vizResult?.manufacturingYear?.let {
|
|
642
|
-
vizResultJson.put("manufacturingYear", serializeStringResult(it))
|
|
643
|
-
}
|
|
644
|
-
vizResult?.race?.let {
|
|
645
|
-
vizResultJson.put("race", serializeStringResult(it))
|
|
646
|
-
}
|
|
647
|
-
vizResult?.religion?.let {
|
|
648
|
-
vizResultJson.put("religion", serializeStringResult(it))
|
|
649
|
-
}
|
|
650
|
-
vizResult?.remarks?.let {
|
|
651
|
-
vizResultJson.put("remarks", serializeStringResult(it))
|
|
652
|
-
}
|
|
653
|
-
vizResult?.residencePermitType?.let {
|
|
654
|
-
vizResultJson.put("residencePermitType", serializeStringResult(it))
|
|
655
|
-
}
|
|
656
|
-
vizResult?.residentialStatus?.let {
|
|
657
|
-
vizResultJson.put("residentialStatus", serializeStringResult(it))
|
|
658
|
-
}
|
|
659
|
-
vizResult?.sex?.let {
|
|
660
|
-
vizResultJson.put("sex", serializeStringResult(it))
|
|
661
|
-
}
|
|
662
|
-
vizResult?.specificDocumentValidity?.let {
|
|
663
|
-
vizResultJson.put("specificDocumentValidity", serializeStringResult(it))
|
|
664
|
-
}
|
|
665
|
-
vizResult?.sponsor?.let {
|
|
666
|
-
vizResultJson.put("sponsor", serializeStringResult(it))
|
|
667
|
-
}
|
|
668
|
-
vizResult?.vehicleOwner?.let {
|
|
669
|
-
vizResultJson.put("vehicleOwner", serializeStringResult(it))
|
|
670
|
-
}
|
|
671
|
-
vizResult?.vehicleType?.let {
|
|
672
|
-
vizResultJson.put("vehicleType", serializeStringResult(it))
|
|
673
|
-
}
|
|
674
|
-
vizResult?.visaType?.let {
|
|
675
|
-
vizResultJson.put("visaType", serializeStringResult(it))
|
|
676
|
-
}
|
|
677
|
-
vizResult?.countryCode?.let {
|
|
678
|
-
vizResultJson.put("countryCode", serializeStringResult(it))
|
|
679
|
-
}
|
|
680
|
-
vizResult?.certificateNumber?.let {
|
|
681
|
-
vizResultJson.put("certificateNumber", serializeStringResult(it))
|
|
682
|
-
}
|
|
683
|
-
vizResult?.nationalInsuranceNumber?.let {
|
|
684
|
-
vizResultJson.put("nationalInsuranceNumber", serializeStringResult(it))
|
|
685
|
-
}
|
|
686
|
-
return vizResultJson
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
private fun serializeDetailedCroppedImageResult(detailedCroppedImageResult: DetailedCroppedImageResult?): JSONObject {
|
|
690
|
-
val detailedCroppedImageResultJson = JSONObject()
|
|
691
|
-
|
|
692
|
-
detailedCroppedImageResult?.bitmap?.let {
|
|
693
|
-
encodeBase64Image(it)?.let { image ->
|
|
694
|
-
detailedCroppedImageResultJson.put("image", image)
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
detailedCroppedImageResult?.location?.let {
|
|
698
|
-
detailedCroppedImageResultJson.put("location", serializeLocation(it))
|
|
699
|
-
}
|
|
700
|
-
detailedCroppedImageResult?.side?.let {
|
|
701
|
-
detailedCroppedImageResultJson.put("side", it.ordinal)
|
|
702
|
-
|
|
35
|
+
fun serializeBlinkIdScanningResult(scanningResult: BlinkIdScanningResult?): String {
|
|
36
|
+
val scanningResultJson: JSONObject = JSONObject()
|
|
37
|
+
|
|
38
|
+
scanningResult?.documentClassInfo?.let {
|
|
39
|
+
scanningResultJson.put("documentClassInfo", serializeDocumentClassInfo(it))
|
|
40
|
+
}
|
|
41
|
+
scanningResult?.dataMatchResult?.let {
|
|
42
|
+
scanningResultJson.put("dataMatchResult", serializeDataMatchResult(it))
|
|
43
|
+
}
|
|
44
|
+
scanningResult?.firstName?.let {
|
|
45
|
+
scanningResultJson.put("firstName", serializeStringResult(it))
|
|
46
|
+
}
|
|
47
|
+
scanningResult?.lastName?.let {
|
|
48
|
+
scanningResultJson.put("lastName", serializeStringResult(it))
|
|
49
|
+
}
|
|
50
|
+
scanningResult?.fullName?.let {
|
|
51
|
+
scanningResultJson.put("fullName", serializeStringResult(it))
|
|
52
|
+
}
|
|
53
|
+
scanningResult?.additionalNameInformation?.let {
|
|
54
|
+
scanningResultJson.put("additionalNameInformation", serializeStringResult(it))
|
|
55
|
+
}
|
|
56
|
+
scanningResult?.localizedName?.let {
|
|
57
|
+
scanningResultJson.put("localizedName", serializeStringResult(it))
|
|
58
|
+
}
|
|
59
|
+
scanningResult?.fathersName?.let {
|
|
60
|
+
scanningResultJson.put("fathersName", serializeStringResult(it))
|
|
61
|
+
}
|
|
62
|
+
scanningResult?.mothersName?.let {
|
|
63
|
+
scanningResultJson.put("mothersName", serializeStringResult(it))
|
|
64
|
+
}
|
|
65
|
+
scanningResult?.address?.let {
|
|
66
|
+
scanningResultJson.put("address", serializeStringResult(it))
|
|
67
|
+
}
|
|
68
|
+
scanningResult?.additionalAddressInformation?.let {
|
|
69
|
+
scanningResultJson.put("additionalAddressInformation", serializeStringResult(it))
|
|
70
|
+
}
|
|
71
|
+
scanningResult?.additionalOptionalAddressInformation?.let {
|
|
72
|
+
scanningResultJson.put(
|
|
73
|
+
"additionalOptionalAddressInformation",
|
|
74
|
+
serializeStringResult(it)
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
scanningResult?.placeOfBirth?.let {
|
|
78
|
+
scanningResultJson.put("placeOfBirth", serializeStringResult(it))
|
|
79
|
+
}
|
|
80
|
+
scanningResult?.nationality?.let {
|
|
81
|
+
scanningResultJson.put("nationality", serializeStringResult(it))
|
|
82
|
+
}
|
|
83
|
+
scanningResult?.race?.let {
|
|
84
|
+
scanningResultJson.put("race", serializeStringResult(it))
|
|
85
|
+
}
|
|
86
|
+
scanningResult?.religion?.let {
|
|
87
|
+
scanningResultJson.put("religion", serializeStringResult(it))
|
|
88
|
+
}
|
|
89
|
+
scanningResult?.profession?.let {
|
|
90
|
+
scanningResultJson.put("profession", serializeStringResult(it))
|
|
91
|
+
}
|
|
92
|
+
scanningResult?.maritalStatus?.let {
|
|
93
|
+
scanningResultJson.put("maritalStatus", serializeStringResult(it))
|
|
94
|
+
}
|
|
95
|
+
scanningResult?.residentialStatus?.let {
|
|
96
|
+
scanningResultJson.put("residentialStatus", serializeStringResult(it))
|
|
97
|
+
}
|
|
98
|
+
scanningResult?.employer?.let {
|
|
99
|
+
scanningResultJson.put("employer", serializeStringResult(it))
|
|
100
|
+
}
|
|
101
|
+
scanningResult?.sex?.let {
|
|
102
|
+
scanningResultJson.put("sex", serializeStringResult(it))
|
|
103
|
+
}
|
|
104
|
+
scanningResult?.sponsor?.let {
|
|
105
|
+
scanningResultJson.put("sponsor", serializeStringResult(it))
|
|
106
|
+
}
|
|
107
|
+
scanningResult?.bloodType?.let {
|
|
108
|
+
scanningResultJson.put("bloodType", serializeStringResult(it))
|
|
109
|
+
}
|
|
110
|
+
scanningResult?.documentNumber?.let {
|
|
111
|
+
scanningResultJson.put("documentNumber", serializeStringResult(it))
|
|
112
|
+
}
|
|
113
|
+
scanningResult?.cardAccessNumber?.let {
|
|
114
|
+
scanningResultJson.put("cardAccessNumber", serializeStringResult(it))
|
|
115
|
+
}
|
|
116
|
+
scanningResult?.personalIdNumber?.let {
|
|
117
|
+
scanningResultJson.put("personalIdNumber", serializeStringResult(it))
|
|
118
|
+
}
|
|
119
|
+
scanningResult?.documentAdditionalNumber?.let {
|
|
120
|
+
scanningResultJson.put("documentAdditionalNumber", serializeStringResult(it))
|
|
121
|
+
}
|
|
122
|
+
scanningResult?.documentOptionalAdditionalNumber?.let {
|
|
123
|
+
scanningResultJson.put("documentOptionalAdditionalNumber", serializeStringResult(it))
|
|
124
|
+
}
|
|
125
|
+
scanningResult?.additionalPersonalIdNumber?.let {
|
|
126
|
+
scanningResultJson.put("additionalPersonalIdNumber", serializeStringResult(it))
|
|
127
|
+
}
|
|
128
|
+
scanningResult?.issuingAuthority?.let {
|
|
129
|
+
scanningResultJson.put("issuingAuthority", serializeStringResult(it))
|
|
130
|
+
}
|
|
131
|
+
scanningResult?.documentSubtype?.let {
|
|
132
|
+
scanningResultJson.put("documentSubtype", serializeStringResult(it))
|
|
133
|
+
}
|
|
134
|
+
scanningResult?.remarks?.let {
|
|
135
|
+
scanningResultJson.put("remarks", serializeStringResult(it))
|
|
136
|
+
}
|
|
137
|
+
scanningResult?.residencePermitType?.let {
|
|
138
|
+
scanningResultJson.put("residencePermitType", serializeStringResult(it))
|
|
139
|
+
}
|
|
140
|
+
scanningResult?.manufacturingYear?.let {
|
|
141
|
+
scanningResultJson.put("manufacturingYear", serializeStringResult(it))
|
|
142
|
+
}
|
|
143
|
+
scanningResult?.vehicleType?.let {
|
|
144
|
+
scanningResultJson.put("vehicleType", serializeStringResult(it))
|
|
145
|
+
}
|
|
146
|
+
scanningResult?.vehicleOwner?.let {
|
|
147
|
+
scanningResultJson.put("vehicleOwner", serializeStringResult(it))
|
|
148
|
+
}
|
|
149
|
+
scanningResult?.eligibilityCategory?.let {
|
|
150
|
+
scanningResultJson.put("eligibilityCategory", serializeStringResult(it))
|
|
151
|
+
}
|
|
152
|
+
scanningResult?.specificDocumentValidity?.let {
|
|
153
|
+
scanningResultJson.put("specificDocumentValidity", serializeStringResult(it))
|
|
154
|
+
}
|
|
155
|
+
scanningResult?.visaType?.let {
|
|
156
|
+
scanningResultJson.put("visaType", serializeStringResult(it))
|
|
157
|
+
}
|
|
158
|
+
scanningResult?.countryCode?.let {
|
|
159
|
+
scanningResultJson.put("countryCode", serializeStringResult(it))
|
|
160
|
+
}
|
|
161
|
+
scanningResult?.certificateNumber?.let {
|
|
162
|
+
scanningResultJson.put("certificateNumber", serializeStringResult(it))
|
|
163
|
+
}
|
|
164
|
+
scanningResult?.nationalInsuranceNumber?.let {
|
|
165
|
+
scanningResultJson.put("nationalInsuranceNumber", serializeStringResult(it))
|
|
166
|
+
}
|
|
167
|
+
scanningResult?.dateOfBirth?.let {
|
|
168
|
+
scanningResultJson.put("dateOfBirth", serializeDateResult(it))
|
|
169
|
+
}
|
|
170
|
+
scanningResult?.dateOfIssue?.let {
|
|
171
|
+
scanningResultJson.put("dateOfIssue", serializeDateResult(it))
|
|
172
|
+
}
|
|
173
|
+
scanningResult?.dateOfExpiry?.let {
|
|
174
|
+
scanningResultJson.put("dateOfExpiry", serializeDateResult(it))
|
|
175
|
+
}
|
|
176
|
+
scanningResult?.dateOfEntry?.let {
|
|
177
|
+
scanningResultJson.put("dateOfEntry", serializeDateResult(it))
|
|
178
|
+
}
|
|
179
|
+
scanningResult?.localityCode?.let {
|
|
180
|
+
scanningResultJson.put("localityCode", serializeStringResult(it))
|
|
181
|
+
}
|
|
182
|
+
scanningResult?.maidenName?.let {
|
|
183
|
+
scanningResultJson.put("maidenName", serializeStringResult(it))
|
|
184
|
+
}
|
|
185
|
+
scanningResult?.municipalityCode?.let {
|
|
186
|
+
scanningResultJson.put("municipalityCode", serializeStringResult(it))
|
|
187
|
+
}
|
|
188
|
+
scanningResult?.municipalityOfRegistration?.let {
|
|
189
|
+
scanningResultJson.put("municipalityOfRegistration", serializeStringResult(it))
|
|
190
|
+
}
|
|
191
|
+
scanningResult?.pollingStationCode?.let {
|
|
192
|
+
scanningResultJson.put("pollingStationCode", serializeStringResult(it))
|
|
193
|
+
}
|
|
194
|
+
scanningResult?.registrationCenterCode?.let {
|
|
195
|
+
scanningResultJson.put("registrationCenterCode", serializeStringResult(it))
|
|
196
|
+
}
|
|
197
|
+
scanningResult?.sectionCode?.let {
|
|
198
|
+
scanningResultJson.put("sectionCode", serializeStringResult(it))
|
|
199
|
+
}
|
|
200
|
+
scanningResult?.stateCode?.let {
|
|
201
|
+
scanningResultJson.put("stateCode", serializeStringResult(it))
|
|
202
|
+
}
|
|
203
|
+
scanningResult?.stateName?.let {
|
|
204
|
+
scanningResultJson.put("stateName", serializeStringResult(it))
|
|
205
|
+
}
|
|
206
|
+
scanningResult?.dateOfExpiryPermanent?.let {
|
|
207
|
+
scanningResultJson.put("dateOfExpiryPermanent", it)
|
|
208
|
+
}
|
|
209
|
+
scanningResult?.driverLicenseDetailedInfo?.let {
|
|
210
|
+
scanningResultJson.put(
|
|
211
|
+
"driverLicenseDetailedInfo",
|
|
212
|
+
serializeDriverLicenseDetailedInfo(it)
|
|
213
|
+
)
|
|
214
|
+
}
|
|
215
|
+
scanningResult?.dependentsInfo?.let {
|
|
216
|
+
scanningResultJson.put(
|
|
217
|
+
"dependentsInfo",
|
|
218
|
+
JSONArray(it.map { dependentInfo -> serializeDependentInfo(dependentInfo) })
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
scanningResult?.parentsInfo?.let {
|
|
222
|
+
scanningResultJson.put(
|
|
223
|
+
"parentsInfo",
|
|
224
|
+
JSONArray(it.map { parentInfo -> serializeParentInfo(parentInfo) })
|
|
225
|
+
)
|
|
226
|
+
}
|
|
227
|
+
scanningResult?.effectiveDate?.let {
|
|
228
|
+
scanningResultJson.put("effectiveDate", serializeDateResult(it))
|
|
229
|
+
}
|
|
230
|
+
scanningResult?.husbandName?.let {
|
|
231
|
+
scanningResultJson.put("husbandName", serializeStringResult(it))
|
|
232
|
+
}
|
|
233
|
+
scanningResult?.legalStatus?.let {
|
|
234
|
+
scanningResultJson.put("legalStatus", serializeStringResult(it))
|
|
235
|
+
}
|
|
236
|
+
scanningResult?.socialSecurityStatus?.let {
|
|
237
|
+
scanningResultJson.put("socialSecurityStatus", serializeStringResult(it))
|
|
238
|
+
}
|
|
239
|
+
scanningResult?.workRestriction?.let {
|
|
240
|
+
scanningResultJson.put("workRestriction", serializeStringResult(it))
|
|
241
|
+
}
|
|
242
|
+
scanningResult?.subResults?.let {
|
|
243
|
+
scanningResultJson.put(
|
|
244
|
+
"subResults",
|
|
245
|
+
JSONArray(it.map { subResult -> serializeSubResult(subResult) })
|
|
246
|
+
)
|
|
247
|
+
}
|
|
248
|
+
scanningResult?.inputImage(ScanningSide.First)?.let {
|
|
249
|
+
scanningResultJson.put("firstInputImage", encodeBase64Image(it.bitmap))
|
|
250
|
+
}
|
|
251
|
+
scanningResult?.inputImage(ScanningSide.Second)?.let {
|
|
252
|
+
scanningResultJson.put("secondInputImage", encodeBase64Image(it.bitmap))
|
|
253
|
+
}
|
|
254
|
+
scanningResult?.barcodeImage()?.let {
|
|
255
|
+
scanningResultJson.put("barcodeImage", encodeBase64Image(it.bitmap))
|
|
256
|
+
}
|
|
257
|
+
scanningResult?.documentImage(ScanningSide.First)?.let {
|
|
258
|
+
scanningResultJson.put("firstDocumentImage", encodeBase64Image(it.bitmap))
|
|
259
|
+
}
|
|
260
|
+
scanningResult?.documentImage(ScanningSide.Second)?.let {
|
|
261
|
+
scanningResultJson.put("secondDocumentImage", encodeBase64Image(it.bitmap))
|
|
262
|
+
}
|
|
263
|
+
scanningResult?.faceImage()?.let {
|
|
264
|
+
scanningResultJson.put("faceImage", serializeDetailedCroppedImageResult(it))
|
|
265
|
+
}
|
|
266
|
+
scanningResult?.signatureImage()?.let {
|
|
267
|
+
scanningResultJson.put("signatureImage", serializeDetailedCroppedImageResult(it))
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return scanningResultJson.toString()
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
private fun serializeDateResult(dateResult: DateResult<*>?): JSONObject {
|
|
274
|
+
val dateResultJson = JSONObject()
|
|
275
|
+
|
|
276
|
+
dateResultJson.put("date", serializeSimpleDateResult(dateResult));
|
|
277
|
+
dateResultJson.put("filledByDomainKnowledge", dateResult?.filledByDomainKnowledge)
|
|
278
|
+
dateResultJson.put("successfullyParsed", dateResult?.successfullyParsed)
|
|
279
|
+
dateResultJson.put("originalString", serializeStringType(dateResult?.originalString))
|
|
280
|
+
return dateResultJson
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
private fun serializeSimpleDateResult(dateResult: DateResult<*>?): JSONObject {
|
|
284
|
+
val simpleDateResultJson = JSONObject()
|
|
285
|
+
dateResult?.day?.let {
|
|
286
|
+
simpleDateResultJson.put("day", it)
|
|
287
|
+
}
|
|
288
|
+
dateResult?.month?.let {
|
|
289
|
+
simpleDateResultJson.put("month", it)
|
|
290
|
+
}
|
|
291
|
+
dateResult?.year?.let {
|
|
292
|
+
simpleDateResultJson.put("year", it)
|
|
293
|
+
}
|
|
294
|
+
return simpleDateResultJson;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
private fun serializeDocumentClassInfo(documentClassInfo: DocumentClassInfo): JSONObject {
|
|
298
|
+
val documentClassInfoJson = JSONObject()
|
|
299
|
+
// TODO: Align country/region/documentType strings with iOS (rawValue). Android uses
|
|
300
|
+
// enum.name with only the first character lowercased; values usually match but are not
|
|
301
|
+
// guaranteed identical for every enum. Prefer shared explicit string mappers on both platforms.
|
|
302
|
+
documentClassInfo.country?.name?.let {
|
|
303
|
+
documentClassInfoJson.put("country", it.replaceFirstChar { char -> char.lowercase() })
|
|
304
|
+
}
|
|
305
|
+
documentClassInfo.region?.name?.let {
|
|
306
|
+
documentClassInfoJson.put("region", it.replaceFirstChar { char -> char.lowercase() })
|
|
307
|
+
}
|
|
308
|
+
documentClassInfo.type?.name?.let {
|
|
309
|
+
documentClassInfoJson.put(
|
|
310
|
+
"documentType",
|
|
311
|
+
it.replaceFirstChar { char -> char.lowercase() })
|
|
312
|
+
}
|
|
313
|
+
documentClassInfo.countryName?.let {
|
|
314
|
+
documentClassInfoJson.put("countryName", it)
|
|
315
|
+
}
|
|
316
|
+
documentClassInfo.isoAlpha2CountryCode?.let {
|
|
317
|
+
documentClassInfoJson.put("isoAlpha2CountryCode", it)
|
|
318
|
+
}
|
|
319
|
+
documentClassInfo.isoAlpha3CountryCode?.let {
|
|
320
|
+
documentClassInfoJson.put("isoAlpha3CountryCode", it)
|
|
321
|
+
}
|
|
322
|
+
documentClassInfo.isoNumericCountryCode?.let {
|
|
323
|
+
documentClassInfoJson.put("isoNumericCountryCode", it)
|
|
324
|
+
}
|
|
325
|
+
documentClassInfoJson.put("empty", documentClassInfo.isEmpty())
|
|
326
|
+
return documentClassInfoJson
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
private fun serializeDataMatchResult(dataMatchResult: DataMatchResult): JSONObject {
|
|
330
|
+
val dataMatchResultJson = JSONObject()
|
|
331
|
+
|
|
332
|
+
val statesArray = JSONArray()
|
|
333
|
+
dataMatchResult.statePerField.forEach {
|
|
334
|
+
statesArray.put(serializeDataMatchField(it))
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
dataMatchResultJson.put("states", statesArray)
|
|
338
|
+
dataMatchResultJson.put("overallState", serializeDataMatchState(dataMatchResult.overallState))
|
|
339
|
+
|
|
340
|
+
return dataMatchResultJson
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
private fun serializeDataMatchField(dataMatchField: DataMatchFieldState): JSONObject {
|
|
344
|
+
val dataMatchFieldJson = JSONObject()
|
|
345
|
+
dataMatchFieldJson.put("field", serializeDataMatchFieldType(dataMatchField.fieldType))
|
|
346
|
+
dataMatchFieldJson.put("state", serializeDataMatchState(dataMatchField.state))
|
|
347
|
+
return dataMatchFieldJson
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
private fun serializeDataMatchFieldType(fieldType: DataMatchFieldType): String {
|
|
351
|
+
return when (fieldType) {
|
|
352
|
+
DataMatchFieldType.DateOfBirth -> "dateOfBirth"
|
|
353
|
+
DataMatchFieldType.DateOfExpiry -> "dateOfExpiry"
|
|
354
|
+
DataMatchFieldType.DocumentNumber -> "documentNumber"
|
|
355
|
+
DataMatchFieldType.DocumentAdditionalNumber -> "documentAdditionalNumber"
|
|
356
|
+
DataMatchFieldType.DocumentOptionalAdditionalNumber -> "documentOptionalAdditionalNumber"
|
|
357
|
+
DataMatchFieldType.PersonalIdNumber -> "personalIdNumber"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
private fun serializeDataMatchState(state: DataMatchState): String {
|
|
362
|
+
return when (state) {
|
|
363
|
+
DataMatchState.NotPerformed -> "notPerformed"
|
|
364
|
+
DataMatchState.Failed -> "failed"
|
|
365
|
+
DataMatchState.Success -> "success"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
private fun serializeStringResult(stringResult: StringResult): JSONObject {
|
|
370
|
+
val stringResultJson = JSONObject()
|
|
371
|
+
stringResultJson.put("value", stringResult.value(AlphabetType.Latin))
|
|
372
|
+
stringResultJson.put("latin", stringResult.value(AlphabetType.Latin))
|
|
373
|
+
stringResultJson.put("arabic", stringResult.value(AlphabetType.Arabic))
|
|
374
|
+
stringResultJson.put("cyrillic", stringResult.value(AlphabetType.Cyrillic))
|
|
375
|
+
stringResultJson.put("greek", stringResult.value(AlphabetType.Greek))
|
|
376
|
+
|
|
377
|
+
val locationJson = JSONObject()
|
|
378
|
+
stringResult.location(AlphabetType.Latin)?.let {
|
|
379
|
+
locationJson.put("latin", serializeLocation(it))
|
|
380
|
+
}
|
|
381
|
+
stringResult.location(AlphabetType.Arabic)?.let {
|
|
382
|
+
locationJson.put("arabic", serializeLocation(it))
|
|
383
|
+
}
|
|
384
|
+
stringResult.location(AlphabetType.Cyrillic)?.let {
|
|
385
|
+
locationJson.put("cyrillic", serializeLocation(it))
|
|
386
|
+
}
|
|
387
|
+
stringResult.location(AlphabetType.Greek)?.let {
|
|
388
|
+
locationJson.put("greek", serializeLocation(it))
|
|
389
|
+
}
|
|
390
|
+
stringResultJson.put("location", locationJson)
|
|
391
|
+
|
|
392
|
+
val sideJson = JSONObject()
|
|
393
|
+
stringResult.side(AlphabetType.Latin)?.let {
|
|
394
|
+
sideJson.put("latin", serializeScanningSide(it))
|
|
395
|
+
}
|
|
396
|
+
stringResult.side(AlphabetType.Arabic)?.let {
|
|
397
|
+
sideJson.put("arabic", serializeScanningSide(it))
|
|
398
|
+
}
|
|
399
|
+
stringResult.side(AlphabetType.Cyrillic)?.let {
|
|
400
|
+
sideJson.put("cyrillic", serializeScanningSide(it))
|
|
401
|
+
}
|
|
402
|
+
stringResult.side(AlphabetType.Greek)?.let {
|
|
403
|
+
sideJson.put("greek", serializeScanningSide(it))
|
|
404
|
+
}
|
|
405
|
+
stringResultJson.put("side", sideJson)
|
|
406
|
+
|
|
407
|
+
return stringResultJson
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
private fun serializeLocation(rectangle: Rectangle): JSONObject {
|
|
411
|
+
val locationJson = JSONObject()
|
|
412
|
+
locationJson.put("x", rectangle.x.toDouble())
|
|
413
|
+
locationJson.put("y", rectangle.y.toDouble())
|
|
414
|
+
locationJson.put("width", rectangle.width.toDouble())
|
|
415
|
+
locationJson.put("height", rectangle.height.toDouble())
|
|
416
|
+
return locationJson
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
private fun serializeDriverLicenseDetailedInfo(
|
|
420
|
+
driverLicenseDetailedInfo: DriverLicenseDetailedInfo<*>?
|
|
421
|
+
): JSONObject {
|
|
422
|
+
val json = JSONObject()
|
|
423
|
+
|
|
424
|
+
json.put("conditions", serializeStringType(driverLicenseDetailedInfo?.conditions))
|
|
425
|
+
json.put("endorsements", serializeStringType(driverLicenseDetailedInfo?.endorsements))
|
|
426
|
+
json.put("restrictions", serializeStringType(driverLicenseDetailedInfo?.restrictions))
|
|
427
|
+
json.put("vehicleClass", serializeStringType(driverLicenseDetailedInfo?.vehicleClass))
|
|
428
|
+
|
|
429
|
+
driverLicenseDetailedInfo?.vehicleClassesInfo?.let { vehicleClasses ->
|
|
430
|
+
val array = JSONArray()
|
|
431
|
+
for (info in vehicleClasses) {
|
|
432
|
+
array.put(serializeVehicleClassInfo(info))
|
|
433
|
+
}
|
|
434
|
+
json.put("vehicleClassesInfo", array)
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
return json
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
private fun serializeVehicleClassInfo(vehicleClassInfo: VehicleClassInfo<*>): JSONObject {
|
|
441
|
+
val vehicleClassInfoJson = JSONObject()
|
|
442
|
+
vehicleClassInfoJson.put(
|
|
443
|
+
"effectiveDate",
|
|
444
|
+
serializeDateResult(vehicleClassInfo.effectiveDate)
|
|
445
|
+
)
|
|
446
|
+
vehicleClassInfoJson.put("expiryDate", serializeDateResult(vehicleClassInfo.expiryDate))
|
|
447
|
+
vehicleClassInfoJson.put("licenceType", serializeStringType(vehicleClassInfo.licenceType))
|
|
448
|
+
vehicleClassInfoJson.put("vehicleClass", serializeStringType(vehicleClassInfo.vehicleClass))
|
|
449
|
+
return vehicleClassInfoJson
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
private fun serializeDependentInfo(dependentInfo: DependentInfo): JSONObject {
|
|
453
|
+
val dependentInfoJson = JSONObject()
|
|
454
|
+
|
|
455
|
+
dependentInfo.fullName?.let {
|
|
456
|
+
dependentInfoJson.put("fullName", serializeStringResult(it))
|
|
457
|
+
}
|
|
458
|
+
dependentInfo.sex?.let {
|
|
459
|
+
dependentInfoJson.put("sex", serializeStringResult(it))
|
|
460
|
+
}
|
|
461
|
+
dependentInfo.dateOfBirth?.let {
|
|
462
|
+
dependentInfoJson.put("dateOfBirth", serializeDateResult(it))
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
dependentInfo.documentNumber?.let {
|
|
466
|
+
dependentInfoJson.put("documentNumber", serializeStringResult(it))
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return dependentInfoJson
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
private fun serializeSubResult(subResult: SingleSideScanningResult): JSONObject {
|
|
473
|
+
val subResultJson = JSONObject()
|
|
474
|
+
subResultJson.put("barcode", serializeBarcodeResult(subResult.barcode))
|
|
475
|
+
subResultJson.put(
|
|
476
|
+
"barcodeImage",
|
|
477
|
+
encodeBase64Image(subResult.barcodeImage?.bitmap)
|
|
478
|
+
)
|
|
479
|
+
subResultJson.put("documentImage", encodeBase64Image(subResult.documentImage?.bitmap))
|
|
480
|
+
subResultJson.put("faceImage", serializeDetailedCroppedImageResult(subResult.faceImage))
|
|
481
|
+
subResultJson.put("inputImage", encodeBase64Image(subResult.inputImage?.bitmap))
|
|
482
|
+
subResultJson.put("mrz", serializeMrzResult(subResult.mrz))
|
|
483
|
+
subResultJson.put(
|
|
484
|
+
"signatureImage",
|
|
485
|
+
serializeDetailedCroppedImageResult(subResult.signatureImage)
|
|
486
|
+
)
|
|
487
|
+
subResultJson.put("viz", serializeVizResult(subResult.viz))
|
|
488
|
+
return subResultJson
|
|
703
489
|
}
|
|
704
|
-
return detailedCroppedImageResultJson
|
|
705
|
-
}
|
|
706
490
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
element.value
|
|
491
|
+
private fun serializeBarcodeResult(barcodeResult: BarcodeResult?): JSONObject {
|
|
492
|
+
val barcodeResultJson = JSONObject()
|
|
493
|
+
barcodeResultJson.put("additionalNameInformation", barcodeResult?.additionalNameInformation)
|
|
494
|
+
barcodeResultJson.put("address", barcodeResult?.address)
|
|
495
|
+
barcodeResultJson.put(
|
|
496
|
+
"addressDetailedInfo",
|
|
497
|
+
serializeAddressDetailedInfo(barcodeResult?.addressDetailedInfo)
|
|
715
498
|
)
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
else -> null
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
private fun encodeBase64Image(image: Bitmap?): String? {
|
|
730
|
-
return image?.let { bmp ->
|
|
731
|
-
val outputStream = ByteArrayOutputStream()
|
|
732
|
-
outputStream.use { stream ->
|
|
733
|
-
bmp.compress(Bitmap.CompressFormat.JPEG, 95, stream)
|
|
734
|
-
Base64.encodeToString(
|
|
735
|
-
stream.toByteArray(),
|
|
736
|
-
Base64.NO_WRAP
|
|
499
|
+
barcodeResultJson.put("barcodeData", serializeBarcodeData(barcodeResult?.barcodeData))
|
|
500
|
+
barcodeResultJson.put("dateOfBirth", serializeDateResult(barcodeResult?.dateOfBirth))
|
|
501
|
+
barcodeResultJson.put("dateOfExpiry", serializeDateResult(barcodeResult?.dateOfExpiry))
|
|
502
|
+
barcodeResultJson.put("dateOfIssue", serializeDateResult(barcodeResult?.dateOfIssue))
|
|
503
|
+
barcodeResultJson.put("documentAdditionalNumber", barcodeResult?.documentAdditionalNumber)
|
|
504
|
+
barcodeResultJson.put("documentNumber", barcodeResult?.documentNumber)
|
|
505
|
+
barcodeResultJson.put(
|
|
506
|
+
"driverLicenseDetailedInfo",
|
|
507
|
+
serializeDriverLicenseDetailedInfo(barcodeResult?.driverLicenseDetailedInfo)
|
|
737
508
|
)
|
|
738
|
-
|
|
509
|
+
barcodeResultJson.put("employer", barcodeResult?.employer)
|
|
510
|
+
barcodeResultJson.put("firstName", barcodeResult?.firstName)
|
|
511
|
+
barcodeResultJson.put("fullName", barcodeResult?.fullName)
|
|
512
|
+
barcodeResultJson.put("issuingAuthority", barcodeResult?.issuingAuthority)
|
|
513
|
+
barcodeResultJson.put("lastName", barcodeResult?.lastName)
|
|
514
|
+
barcodeResultJson.put("maritalStatus", barcodeResult?.maritalStatus)
|
|
515
|
+
barcodeResultJson.put("middleName", barcodeResult?.middleName)
|
|
516
|
+
barcodeResultJson.put("nationality", barcodeResult?.nationality)
|
|
517
|
+
barcodeResultJson.put("personalIdNumber", barcodeResult?.personalIdNumber)
|
|
518
|
+
barcodeResultJson.put("placeOfBirth", barcodeResult?.placeOfBirth)
|
|
519
|
+
barcodeResultJson.put("profession", barcodeResult?.profession)
|
|
520
|
+
barcodeResultJson.put("race", barcodeResult?.race)
|
|
521
|
+
barcodeResultJson.put("religion", barcodeResult?.religion)
|
|
522
|
+
barcodeResultJson.put("residentialStatus", barcodeResult?.residentialStatus)
|
|
523
|
+
barcodeResultJson.put("sex", barcodeResult?.sex)
|
|
524
|
+
barcodeResultJson.put("parsed", barcodeResult?.parsed)
|
|
525
|
+
barcodeResultJson.put(
|
|
526
|
+
"extendedElements",
|
|
527
|
+
serializeBarcodeExtendedElements(barcodeResult?.extendedElements?.barcodeElements)
|
|
528
|
+
)
|
|
529
|
+
|
|
530
|
+
return barcodeResultJson
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
private fun serializeAddressDetailedInfo(addressDetailedInfo: AddressDetailedInfo?): JSONObject {
|
|
534
|
+
val addressDetailedInfoJson = JSONObject()
|
|
535
|
+
addressDetailedInfoJson.put("city", addressDetailedInfo?.city)
|
|
536
|
+
addressDetailedInfoJson.put("postalCode", addressDetailedInfo?.postalCode)
|
|
537
|
+
addressDetailedInfoJson.put("jurisdiction", addressDetailedInfo?.jurisdiction)
|
|
538
|
+
addressDetailedInfoJson.put("street", addressDetailedInfo?.street)
|
|
539
|
+
|
|
540
|
+
return addressDetailedInfoJson
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
private fun serializeBarcodeData(barcodeData: BarcodeData?): JSONObject {
|
|
544
|
+
val barcodeDataJson = JSONObject()
|
|
545
|
+
barcodeDataJson.put("barcodeType", serializeBarcodeType(barcodeData?.barcodeType))
|
|
546
|
+
barcodeDataJson.put("rawData", encodeBase64Bytes(barcodeData?.rawData))
|
|
547
|
+
barcodeDataJson.put("stringData", barcodeData?.stringData)
|
|
548
|
+
barcodeDataJson.put("uncertain", barcodeData?.uncertain)
|
|
549
|
+
|
|
550
|
+
return barcodeDataJson
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
private fun serializeBarcodeType(barcodeType: BarcodeType?): String {
|
|
554
|
+
return when (barcodeType) {
|
|
555
|
+
BarcodeType.None -> "none"
|
|
556
|
+
BarcodeType.QRCode -> "qrCode"
|
|
557
|
+
BarcodeType.DataMatrix -> "dataMatrix"
|
|
558
|
+
BarcodeType.UPCE -> "upce"
|
|
559
|
+
BarcodeType.UPCA -> "upca"
|
|
560
|
+
BarcodeType.EAN8 -> "ean8"
|
|
561
|
+
BarcodeType.EAN13 -> "ean13"
|
|
562
|
+
BarcodeType.Code128 -> "code128"
|
|
563
|
+
BarcodeType.Code39 -> "code39"
|
|
564
|
+
BarcodeType.ITF -> "itf"
|
|
565
|
+
BarcodeType.Aztec -> "aztec"
|
|
566
|
+
BarcodeType.PDF417 -> "pdf417"
|
|
567
|
+
null -> "none"
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
private fun serializeMrzResult(mrzResult: MrzResult?): JSONObject {
|
|
572
|
+
val mrzResultJson = JSONObject()
|
|
573
|
+
mrzResultJson.put("dateOfBirth", serializeDateResult(mrzResult?.dateOfBirth))
|
|
574
|
+
mrzResultJson.put("dateOfExpiry", serializeDateResult(mrzResult?.dateOfExpiry))
|
|
575
|
+
mrzResultJson.put("documentCode", mrzResult?.documentCode)
|
|
576
|
+
mrzResultJson.put("documentNumber", mrzResult?.documentNumber)
|
|
577
|
+
mrzResultJson.put("documentType", serializeMrzDocumentType(mrzResult?.documentType))
|
|
578
|
+
mrzResultJson.put("gender", mrzResult?.gender)
|
|
579
|
+
mrzResultJson.put("issuer", mrzResult?.issuer)
|
|
580
|
+
mrzResultJson.put("issuerName", mrzResult?.issuerName)
|
|
581
|
+
mrzResultJson.put("nationality", mrzResult?.nationality)
|
|
582
|
+
mrzResultJson.put("nationalityName", mrzResult?.nationalityName)
|
|
583
|
+
mrzResultJson.put("opt1", mrzResult?.opt1)
|
|
584
|
+
mrzResultJson.put("opt2", mrzResult?.opt2)
|
|
585
|
+
mrzResultJson.put("primaryID", mrzResult?.primaryID)
|
|
586
|
+
mrzResultJson.put("rawMRZString", mrzResult?.rawMRZString)
|
|
587
|
+
mrzResultJson.put("sanitizedDocumentCode", mrzResult?.sanitizedDocumentCode)
|
|
588
|
+
mrzResultJson.put("sanitizedDocumentNumber", mrzResult?.sanitizedDocumentNumber)
|
|
589
|
+
mrzResultJson.put("sanitizedIssuer", mrzResult?.sanitizedIssuer)
|
|
590
|
+
mrzResultJson.put("sanitizedNationality", mrzResult?.sanitizedNationality)
|
|
591
|
+
mrzResultJson.put("sanitizedOpt1", mrzResult?.sanitizedOpt1)
|
|
592
|
+
mrzResultJson.put("sanitizedOpt2", mrzResult?.sanitizedOpt2)
|
|
593
|
+
mrzResultJson.put("secondaryID", mrzResult?.secondaryID)
|
|
594
|
+
mrzResultJson.put("verified", mrzResult?.verified)
|
|
595
|
+
|
|
596
|
+
return mrzResultJson
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
private fun serializeVizResult(vizResult: VizResult?): JSONObject {
|
|
600
|
+
val vizResultJson = JSONObject()
|
|
601
|
+
|
|
602
|
+
vizResult?.additionalAddressInformation?.let {
|
|
603
|
+
vizResultJson.put("additionalAddressInformation", serializeStringResult(it))
|
|
604
|
+
}
|
|
605
|
+
vizResult?.additionalNameInformation?.let {
|
|
606
|
+
vizResultJson.put("additionalNameInformation", serializeStringResult(it))
|
|
607
|
+
}
|
|
608
|
+
vizResult?.additionalOptionalAddressInformation?.let {
|
|
609
|
+
vizResultJson.put("additionalOptionalAddressInformation", serializeStringResult(it))
|
|
610
|
+
}
|
|
611
|
+
vizResult?.additionalPersonalIdNumber?.let {
|
|
612
|
+
vizResultJson.put("additionalPersonalIdNumber", serializeStringResult(it))
|
|
613
|
+
}
|
|
614
|
+
vizResult?.address?.let {
|
|
615
|
+
vizResultJson.put("address", serializeStringResult(it))
|
|
616
|
+
}
|
|
617
|
+
vizResult?.bloodType?.let {
|
|
618
|
+
vizResultJson.put("bloodType", serializeStringResult(it))
|
|
619
|
+
}
|
|
620
|
+
vizResult?.dateOfBirth?.let {
|
|
621
|
+
vizResultJson.put("dateOfBirth", serializeDateResult(it))
|
|
622
|
+
}
|
|
623
|
+
vizResult?.dateOfExpiry?.let {
|
|
624
|
+
vizResultJson.put("dateOfExpiry", serializeDateResult(it))
|
|
625
|
+
}
|
|
626
|
+
vizResult?.dateOfIssue?.let {
|
|
627
|
+
vizResultJson.put("dateOfIssue", serializeDateResult(it))
|
|
628
|
+
}
|
|
629
|
+
vizResult?.dateOfEntry?.let {
|
|
630
|
+
vizResultJson.put("dateOfEntry", serializeDateResult(it))
|
|
631
|
+
}
|
|
632
|
+
vizResult?.localityCode?.let {
|
|
633
|
+
vizResultJson.put("localityCode", serializeStringResult(it))
|
|
634
|
+
}
|
|
635
|
+
vizResult?.maidenName?.let {
|
|
636
|
+
vizResultJson.put("maidenName", serializeStringResult(it))
|
|
637
|
+
}
|
|
638
|
+
vizResult?.municipalityCode?.let {
|
|
639
|
+
vizResultJson.put("municipalityCode", serializeStringResult(it))
|
|
640
|
+
}
|
|
641
|
+
vizResult?.municipalityOfRegistration?.let {
|
|
642
|
+
vizResultJson.put("municipalityOfRegistration", serializeStringResult(it))
|
|
643
|
+
}
|
|
644
|
+
vizResult?.pollingStationCode?.let {
|
|
645
|
+
vizResultJson.put("pollingStationCode", serializeStringResult(it))
|
|
646
|
+
}
|
|
647
|
+
vizResult?.registrationCenterCode?.let {
|
|
648
|
+
vizResultJson.put("registrationCenterCode", serializeStringResult(it))
|
|
649
|
+
}
|
|
650
|
+
vizResult?.sectionCode?.let {
|
|
651
|
+
vizResultJson.put("sectionCode", serializeStringResult(it))
|
|
652
|
+
}
|
|
653
|
+
vizResult?.stateCode?.let {
|
|
654
|
+
vizResultJson.put("stateCode", serializeStringResult(it))
|
|
655
|
+
}
|
|
656
|
+
vizResult?.stateName?.let {
|
|
657
|
+
vizResultJson.put("stateName", serializeStringResult(it))
|
|
658
|
+
}
|
|
659
|
+
vizResult?.dateOfExpiryPermanent?.let {
|
|
660
|
+
vizResultJson.put("dateOfExpiryPermanent", it)
|
|
661
|
+
}
|
|
662
|
+
vizResult?.documentAdditionalNumber?.let {
|
|
663
|
+
vizResultJson.put("documentAdditionalNumber", serializeStringResult(it))
|
|
664
|
+
}
|
|
665
|
+
vizResult?.dependentsInfo?.let {
|
|
666
|
+
vizResultJson.put(
|
|
667
|
+
"dependentsInfo",
|
|
668
|
+
JSONArray(it.map { dependentInfo -> serializeDependentInfo(dependentInfo) })
|
|
669
|
+
)
|
|
670
|
+
}
|
|
671
|
+
vizResult?.documentNumber?.let {
|
|
672
|
+
vizResultJson.put("documentNumber", serializeStringResult(it))
|
|
673
|
+
}
|
|
674
|
+
vizResult?.cardAccessNumber?.let {
|
|
675
|
+
vizResultJson.put("cardAccessNumber", serializeStringResult(it))
|
|
676
|
+
}
|
|
677
|
+
vizResult?.documentOptionalAdditionalNumber?.let {
|
|
678
|
+
vizResultJson.put("documentOptionalAdditionalNumber", serializeStringResult(it))
|
|
679
|
+
}
|
|
680
|
+
vizResult?.documentSubtype?.let {
|
|
681
|
+
vizResultJson.put("documentSubtype", serializeStringResult(it))
|
|
682
|
+
}
|
|
683
|
+
vizResult?.driverLicenseDetailedInfo?.let {
|
|
684
|
+
vizResultJson.put("driverLicenseDetailedInfo", serializeDriverLicenseDetailedInfo(it))
|
|
685
|
+
}
|
|
686
|
+
vizResult?.eligibilityCategory?.let {
|
|
687
|
+
vizResultJson.put("eligibilityCategory", serializeStringResult(it))
|
|
688
|
+
}
|
|
689
|
+
vizResult?.employer?.let {
|
|
690
|
+
vizResultJson.put("employer", serializeStringResult(it))
|
|
691
|
+
}
|
|
692
|
+
vizResult?.fathersName?.let {
|
|
693
|
+
vizResultJson.put("fathersName", serializeStringResult(it))
|
|
694
|
+
}
|
|
695
|
+
vizResult?.firstName?.let {
|
|
696
|
+
vizResultJson.put("firstName", serializeStringResult(it))
|
|
697
|
+
}
|
|
698
|
+
vizResult?.fullName?.let {
|
|
699
|
+
vizResultJson.put("fullName", serializeStringResult(it))
|
|
700
|
+
}
|
|
701
|
+
vizResult?.issuingAuthority?.let {
|
|
702
|
+
vizResultJson.put("issuingAuthority", serializeStringResult(it))
|
|
703
|
+
}
|
|
704
|
+
vizResult?.lastName?.let {
|
|
705
|
+
vizResultJson.put("lastName", serializeStringResult(it))
|
|
706
|
+
}
|
|
707
|
+
vizResult?.localizedName?.let {
|
|
708
|
+
vizResultJson.put("localizedName", serializeStringResult(it))
|
|
709
|
+
}
|
|
710
|
+
vizResult?.profession?.let {
|
|
711
|
+
vizResultJson.put("profession", serializeStringResult(it))
|
|
712
|
+
}
|
|
713
|
+
vizResult?.placeOfBirth?.let {
|
|
714
|
+
vizResultJson.put("placeOfBirth", serializeStringResult(it))
|
|
715
|
+
}
|
|
716
|
+
vizResult?.personalIdNumber?.let {
|
|
717
|
+
vizResultJson.put("personalIdNumber", serializeStringResult(it))
|
|
718
|
+
}
|
|
719
|
+
vizResult?.nationality?.let {
|
|
720
|
+
vizResultJson.put("nationality", serializeStringResult(it))
|
|
721
|
+
}
|
|
722
|
+
vizResult?.mothersName?.let {
|
|
723
|
+
vizResultJson.put("mothersName", serializeStringResult(it))
|
|
724
|
+
}
|
|
725
|
+
vizResult?.maritalStatus?.let {
|
|
726
|
+
vizResultJson.put("maritalStatus", serializeStringResult(it))
|
|
727
|
+
}
|
|
728
|
+
vizResult?.manufacturingYear?.let {
|
|
729
|
+
vizResultJson.put("manufacturingYear", serializeStringResult(it))
|
|
730
|
+
}
|
|
731
|
+
vizResult?.race?.let {
|
|
732
|
+
vizResultJson.put("race", serializeStringResult(it))
|
|
733
|
+
}
|
|
734
|
+
vizResult?.religion?.let {
|
|
735
|
+
vizResultJson.put("religion", serializeStringResult(it))
|
|
736
|
+
}
|
|
737
|
+
vizResult?.remarks?.let {
|
|
738
|
+
vizResultJson.put("remarks", serializeStringResult(it))
|
|
739
|
+
}
|
|
740
|
+
vizResult?.residencePermitType?.let {
|
|
741
|
+
vizResultJson.put("residencePermitType", serializeStringResult(it))
|
|
742
|
+
}
|
|
743
|
+
vizResult?.residentialStatus?.let {
|
|
744
|
+
vizResultJson.put("residentialStatus", serializeStringResult(it))
|
|
745
|
+
}
|
|
746
|
+
vizResult?.sex?.let {
|
|
747
|
+
vizResultJson.put("sex", serializeStringResult(it))
|
|
748
|
+
}
|
|
749
|
+
vizResult?.specificDocumentValidity?.let {
|
|
750
|
+
vizResultJson.put("specificDocumentValidity", serializeStringResult(it))
|
|
751
|
+
}
|
|
752
|
+
vizResult?.sponsor?.let {
|
|
753
|
+
vizResultJson.put("sponsor", serializeStringResult(it))
|
|
754
|
+
}
|
|
755
|
+
vizResult?.vehicleOwner?.let {
|
|
756
|
+
vizResultJson.put("vehicleOwner", serializeStringResult(it))
|
|
757
|
+
}
|
|
758
|
+
vizResult?.vehicleType?.let {
|
|
759
|
+
vizResultJson.put("vehicleType", serializeStringResult(it))
|
|
760
|
+
}
|
|
761
|
+
vizResult?.visaType?.let {
|
|
762
|
+
vizResultJson.put("visaType", serializeStringResult(it))
|
|
763
|
+
}
|
|
764
|
+
vizResult?.countryCode?.let {
|
|
765
|
+
vizResultJson.put("countryCode", serializeStringResult(it))
|
|
766
|
+
}
|
|
767
|
+
vizResult?.certificateNumber?.let {
|
|
768
|
+
vizResultJson.put("certificateNumber", serializeStringResult(it))
|
|
769
|
+
}
|
|
770
|
+
vizResult?.nationalInsuranceNumber?.let {
|
|
771
|
+
vizResultJson.put("nationalInsuranceNumber", serializeStringResult(it))
|
|
772
|
+
}
|
|
773
|
+
vizResult?.parentsInfo?.let {
|
|
774
|
+
vizResultJson.put(
|
|
775
|
+
"parentsInfo",
|
|
776
|
+
JSONArray(it.map { parentInfo -> serializeParentInfo(parentInfo) })
|
|
777
|
+
)
|
|
778
|
+
}
|
|
779
|
+
vizResult?.effectiveDate?.let {
|
|
780
|
+
vizResultJson.put("effectiveDate", serializeDateResult(it))
|
|
781
|
+
}
|
|
782
|
+
vizResult?.husbandName?.let {
|
|
783
|
+
vizResultJson.put("husbandName", serializeStringResult(it))
|
|
784
|
+
}
|
|
785
|
+
vizResult?.legalStatus?.let {
|
|
786
|
+
vizResultJson.put("legalStatus", serializeStringResult(it))
|
|
787
|
+
}
|
|
788
|
+
vizResult?.socialSecurityStatus?.let {
|
|
789
|
+
vizResultJson.put("socialSecurityStatus", serializeStringResult(it))
|
|
790
|
+
}
|
|
791
|
+
vizResult?.workRestriction?.let {
|
|
792
|
+
vizResultJson.put("workRestriction", serializeStringResult(it))
|
|
793
|
+
}
|
|
794
|
+
return vizResultJson
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
private fun serializeDetailedCroppedImageResult(detailedCroppedImageResult: DetailedCroppedImageResult?): JSONObject {
|
|
798
|
+
val detailedCroppedImageResultJson = JSONObject()
|
|
799
|
+
|
|
800
|
+
detailedCroppedImageResult?.bitmap?.let {
|
|
801
|
+
encodeBase64Image(it)?.let { image ->
|
|
802
|
+
detailedCroppedImageResultJson.put("image", image)
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
detailedCroppedImageResult?.location?.let {
|
|
806
|
+
detailedCroppedImageResultJson.put("location", serializeLocation(it))
|
|
807
|
+
}
|
|
808
|
+
detailedCroppedImageResult?.side?.let { side ->
|
|
809
|
+
detailedCroppedImageResultJson.put("side", serializeScanningSide(side))
|
|
810
|
+
}
|
|
811
|
+
return detailedCroppedImageResultJson
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
private fun serializeMrzDocumentType(documentType: DocumentType?): String? {
|
|
815
|
+
return when (documentType) {
|
|
816
|
+
DocumentType.Unknown -> "unknown"
|
|
817
|
+
DocumentType.IdentityCard -> "identityCard"
|
|
818
|
+
DocumentType.Passport -> "passport"
|
|
819
|
+
DocumentType.Visa -> "visa"
|
|
820
|
+
DocumentType.GreenCard -> "greenCard"
|
|
821
|
+
DocumentType.MysPassIMM13P -> "mysPassIMM13P"
|
|
822
|
+
DocumentType.DriverLicense -> "driverLicense"
|
|
823
|
+
DocumentType.InternalTravelDocument -> "internalTravelDocument"
|
|
824
|
+
DocumentType.BorderCrossingCard -> "borderCrossingCard"
|
|
825
|
+
null -> null
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
private fun serializeScanningSide(side: ScanningSide): String {
|
|
830
|
+
return when (side) {
|
|
831
|
+
ScanningSide.First -> "first"
|
|
832
|
+
ScanningSide.Second -> "second"
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
private fun serializeBarcodeExtendedElements(barcodeExtendedElements: Array<BarcodeElement>?): JSONObject {
|
|
837
|
+
val barcodeExtendedElementsJson = JSONObject()
|
|
838
|
+
|
|
839
|
+
barcodeExtendedElements?.let {
|
|
840
|
+
it.map { element ->
|
|
841
|
+
barcodeExtendedElementsJson.put(
|
|
842
|
+
element.key.name.replaceFirstChar { char -> char.lowercase() },
|
|
843
|
+
element.value
|
|
844
|
+
)
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return barcodeExtendedElementsJson
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
private fun serializeParentInfo(parentInfo: ParentInfo): JSONObject {
|
|
851
|
+
val parentInfoJson = JSONObject()
|
|
852
|
+
|
|
853
|
+
parentInfo.firstName?.let {
|
|
854
|
+
parentInfoJson.put("firstName", serializeStringResult(it))
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
parentInfo.lastName?.let {
|
|
858
|
+
parentInfoJson.put("lastName", serializeStringResult(it))
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
return parentInfoJson
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
private fun serializeStringType(value: Any?): Any? {
|
|
865
|
+
return when (value) {
|
|
866
|
+
is StringResult -> serializeStringResult(value)
|
|
867
|
+
is String -> value
|
|
868
|
+
else -> null
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
private fun encodeBase64Bytes(data: ByteArray?): String? {
|
|
873
|
+
return data?.let {
|
|
874
|
+
Base64.encodeToString(it, Base64.NO_WRAP)
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
private fun encodeBase64Image(image: Bitmap?): String? {
|
|
879
|
+
return image?.let { bmp ->
|
|
880
|
+
val outputStream = ByteArrayOutputStream()
|
|
881
|
+
outputStream.use { stream ->
|
|
882
|
+
bmp.compress(Bitmap.CompressFormat.JPEG, 95, stream)
|
|
883
|
+
Base64.encodeToString(
|
|
884
|
+
stream.toByteArray(),
|
|
885
|
+
Base64.NO_WRAP
|
|
886
|
+
)
|
|
887
|
+
}
|
|
888
|
+
}
|
|
739
889
|
}
|
|
740
|
-
}
|
|
741
890
|
}
|