@regulaforensics/cordova-plugin-document-reader-api
Version:
Cordova plugin for reading and validation of identification documents (API framework)
1,392 lines (1,163 loc) • 179 kB
JavaScript
// Classes
class DocumentReaderScenario {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderScenario()
result.name = jsonObject["name"]
result.caption = jsonObject["caption"]
result.description = jsonObject["description"]
result.multiPageOff = jsonObject["multiPageOff"]
result.frameKWHLandscape = jsonObject["frameKWHLandscape"]
result.frameKWHPortrait = jsonObject["frameKWHPortrait"]
result.frameKWHDoublePageSpreadPortrait = jsonObject["frameKWHDoublePageSpreadPortrait"]
result.frameKWHDoublePageSpreadLandscape = jsonObject["frameKWHDoublePageSpreadLandscape"]
result.frameOrientation = jsonObject["frameOrientation"]
result.uvTorch = jsonObject["uvTorch"]
result.faceExt = jsonObject["faceExt"]
result.seriesProcessMode = jsonObject["seriesProcessMode"]
result.manualCrop = jsonObject["manualCrop"]
return result
}
}
class Rect {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Rect()
result.bottom = jsonObject["bottom"]
result.top = jsonObject["top"]
result.left = jsonObject["left"]
result.right = jsonObject["right"]
return result
}
}
class DocumentReaderGraphicField {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderGraphicField()
result.sourceType = jsonObject["sourceType"]
result.fieldType = jsonObject["fieldType"]
result.light = jsonObject["light"]
result.pageIndex = jsonObject["pageIndex"]
result.originalPageIndex = jsonObject["originalPageIndex"]
result.fieldName = jsonObject["fieldName"]
result.lightName = jsonObject["lightName"]
result.value = jsonObject["value"]
result.fieldRect = Rect.fromJson(jsonObject["fieldRect"])
return result
}
}
class DocumentReaderGraphicResult {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderGraphicResult()
result.fields = []
if (jsonObject["fields"] != null)
for (const i in jsonObject["fields"])
result.fields.push(DocumentReaderGraphicField.fromJson(jsonObject["fields"][i]))
return result
}
}
class DocumentReaderValue {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderValue()
result.pageIndex = jsonObject["pageIndex"]
result.sourceType = jsonObject["sourceType"]
result.probability = jsonObject["probability"]
result.value = jsonObject["value"]
result.originalValue = jsonObject["originalValue"]
result.boundRect = Rect.fromJson(jsonObject["boundRect"])
result.originalSymbols = []
if (jsonObject["originalSymbols"] != null)
for (const i in jsonObject["originalSymbols"])
result.originalSymbols.push(DocumentReaderSymbol.fromJson(jsonObject["originalSymbols"][i]))
result.rfidOrigin = DocumentReaderRfidOrigin.fromJson(jsonObject["rfidOrigin"])
return result
}
}
class DocumentReaderTextField {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderTextField()
result.fieldType = jsonObject["fieldType"]
result.lcid = jsonObject["lcid"]
result.status = jsonObject["status"]
result.lcidName = jsonObject["lcidName"]
result.fieldName = jsonObject["fieldName"]
result.value = jsonObject["value"]
result.getValue = DocumentReaderValue.fromJson(jsonObject["getValue"])
result.values = []
if (jsonObject["values"] != null)
for (const i in jsonObject["values"])
result.values.push(DocumentReaderValue.fromJson(jsonObject["values"][i]))
result.comparisonList = []
if (jsonObject["comparisonList"] != null)
for (const i in jsonObject["comparisonList"])
result.comparisonList.push(DocumentReaderComparison.fromJson(jsonObject["comparisonList"][i]))
result.validityList = []
if (jsonObject["validityList"] != null)
for (const i in jsonObject["validityList"])
result.validityList.push(DocumentReaderValidity.fromJson(jsonObject["validityList"][i]))
result.comparisonStatus = jsonObject["comparisonStatus"]
result.validityStatus = jsonObject["validityStatus"]
return result
}
}
class DocumentReaderTextResult {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderTextResult()
result.status = jsonObject["status"]
result.comparisonStatus = jsonObject["comparisonStatus"]
result.validityStatus = jsonObject["validityStatus"]
result.availableSourceList = []
if (jsonObject["availableSourceList"] != null)
for (const i in jsonObject["availableSourceList"])
result.availableSourceList.push(DocumentReaderTextSource.fromJson(jsonObject["availableSourceList"][i]))
result.fields = []
if (jsonObject["fields"] != null)
for (const i in jsonObject["fields"])
result.fields.push(DocumentReaderTextField.fromJson(jsonObject["fields"][i]))
return result
}
}
class Coordinate {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Coordinate()
result.x = jsonObject["x"]
result.y = jsonObject["y"]
return result
}
}
class ElementPosition {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ElementPosition()
result.docFormat = jsonObject["docFormat"]
result.width = jsonObject["width"]
result.height = jsonObject["height"]
result.dpi = jsonObject["dpi"]
result.pageIndex = jsonObject["pageIndex"]
result.inverse = jsonObject["inverse"]
result.perspectiveTr = jsonObject["perspectiveTr"]
result.objArea = jsonObject["objArea"]
result.objIntAngleDev = jsonObject["objIntAngleDev"]
result.resultStatus = jsonObject["resultStatus"]
result.angle = jsonObject["angle"]
result.center = Coordinate.fromJson(jsonObject["center"])
result.leftTop = Coordinate.fromJson(jsonObject["leftTop"])
result.leftBottom = Coordinate.fromJson(jsonObject["leftBottom"])
result.rightTop = Coordinate.fromJson(jsonObject["rightTop"])
result.rightBottom = Coordinate.fromJson(jsonObject["rightBottom"])
return result
}
}
class ImageQuality {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ImageQuality()
result.featureType = jsonObject["featureType"]
result.result = jsonObject["result"]
result.type = jsonObject["type"]
result.boundRects = []
if (jsonObject["boundRects"] != null)
for (const i in jsonObject["boundRects"])
result.boundRects.push(Rect.fromJson(jsonObject["boundRects"][i]))
return result
}
}
class ImageQualityGroup {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ImageQualityGroup()
result.count = jsonObject["count"]
result.result = jsonObject["result"]
result.imageQualityList = []
if (jsonObject["imageQualityList"] != null)
for (const i in jsonObject["imageQualityList"])
result.imageQualityList.push(ImageQuality.fromJson(jsonObject["imageQualityList"][i]))
result.pageIndex = jsonObject["pageIndex"]
return result
}
}
class DocumentReaderDocumentType {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderDocumentType()
result.pageIndex = jsonObject["pageIndex"]
result.documentID = jsonObject["documentID"]
result.dType = jsonObject["dType"]
result.dFormat = jsonObject["dFormat"]
result.dMRZ = jsonObject["dMRZ"]
result.isDeprecated = jsonObject["isDeprecated"]
result.name = jsonObject["name"]
result.ICAOCode = jsonObject["ICAOCode"]
result.dDescription = jsonObject["dDescription"]
result.dYear = jsonObject["dYear"]
result.dCountryName = jsonObject["dCountryName"]
result.FDSID = []
if (jsonObject["FDSID"] != null)
for (const i in jsonObject["FDSID"])
result.FDSID.push(jsonObject["FDSID"][i])
return result
}
}
class DocumentReaderNotification {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderNotification()
result.notificationCode = jsonObject["notificationCode"]
result.dataFileType = jsonObject["dataFileType"]
result.progress = jsonObject["progress"]
return result
}
}
class AccessControlProcedureType {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new AccessControlProcedureType()
result.activeOptionIdx = jsonObject["activeOptionIdx"]
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
return result
}
}
class FileData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new FileData()
result.length = jsonObject["length"]
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.data = jsonObject["data"]
return result
}
}
class CertificateData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new CertificateData()
result.length = jsonObject["length"]
result.data = jsonObject["data"]
return result
}
}
class SecurityObjectCertificates {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new SecurityObjectCertificates()
result.securityObject = CertificateData.fromJson(jsonObject["securityObject"])
return result
}
}
class File {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new File()
result.readingTime = jsonObject["readingTime"]
result.type = jsonObject["type"]
result.typeName = jsonObject["typeName"]
result.pAStatus = jsonObject["pAStatus"]
result.readingStatus = jsonObject["readingStatus"]
result.fileID = jsonObject["fileID"]
result.fileData = FileData.fromJson(jsonObject["fileData"])
result.certificates = SecurityObjectCertificates.fromJson(jsonObject["certificates"])
result.docFieldsText = []
if (jsonObject["docFieldsText"] != null)
for (const i in jsonObject["docFieldsText"])
result.docFieldsText.push(jsonObject["docFieldsText"][i])
result.docFieldsGraphics = []
if (jsonObject["docFieldsGraphics"] != null)
for (const i in jsonObject["docFieldsGraphics"])
result.docFieldsGraphics.push(jsonObject["docFieldsGraphics"][i])
result.docFieldsOriginals = []
if (jsonObject["docFieldsOriginals"] != null)
for (const i in jsonObject["docFieldsOriginals"])
result.docFieldsOriginals.push(jsonObject["docFieldsOriginals"][i])
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
return result
}
}
class Application {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Application()
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.applicationID = jsonObject["applicationID"]
result.dataHashAlgorithm = jsonObject["dataHashAlgorithm"]
result.unicodeVersion = jsonObject["unicodeVersion"]
result.version = jsonObject["version"]
result.files = []
if (jsonObject["files"] != null)
for (const i in jsonObject["files"])
result.files.push(File.fromJson(jsonObject["files"][i]))
return result
}
}
class Value {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Value()
result.length = jsonObject["length"]
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.data = jsonObject["data"]
result.format = jsonObject["format"]
return result
}
}
class Attribute {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Attribute()
result.type = jsonObject["type"]
result.value = Value.fromJson(jsonObject["value"])
return result
}
}
class Authority {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Authority()
result.data = jsonObject["data"]
result.friendlyName = Value.fromJson(jsonObject["friendlyName"])
result.attributes = []
if (jsonObject["attributes"] != null)
for (const i in jsonObject["attributes"])
result.attributes.push(Attribute.fromJson(jsonObject["attributes"][i]))
return result
}
}
class Extension {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Extension()
result.data = jsonObject["data"]
result.type = jsonObject["type"]
return result
}
}
class Validity {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Validity()
result.notAfter = Value.fromJson(jsonObject["notAfter"])
result.notBefore = Value.fromJson(jsonObject["notBefore"])
return result
}
}
class CertificateChain {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new CertificateChain()
result.origin = jsonObject["origin"]
result.type = jsonObject["type"]
result.version = jsonObject["version"]
result.paStatus = jsonObject["paStatus"]
result.serialNumber = jsonObject["serialNumber"]
result.signatureAlgorithm = jsonObject["signatureAlgorithm"]
result.subjectPKAlgorithm = jsonObject["subjectPKAlgorithm"]
result.fileName = Value.fromJson(jsonObject["fileName"])
result.validity = Validity.fromJson(jsonObject["validity"])
result.issuer = Authority.fromJson(jsonObject["issuer"])
result.subject = Authority.fromJson(jsonObject["subject"])
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
result.extensions = []
if (jsonObject["extensions"] != null)
for (const i in jsonObject["extensions"])
result.extensions.push(Extension.fromJson(jsonObject["extensions"][i]))
return result
}
}
class SignerInfo {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new SignerInfo()
result.version = jsonObject["version"]
result.paStatus = jsonObject["paStatus"]
result.dataToHash = jsonObject["dataToHash"]
result.digestAlgorithm = jsonObject["digestAlgorithm"]
result.signatureAlgorithm = jsonObject["signatureAlgorithm"]
result.serialNumber = Value.fromJson(jsonObject["serialNumber"])
result.signature = Value.fromJson(jsonObject["signature"])
result.subjectKeyIdentifier = Value.fromJson(jsonObject["subjectKeyIdentifier"])
result.issuer = Authority.fromJson(jsonObject["issuer"])
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
result.signedAttributes = []
if (jsonObject["signedAttributes"] != null)
for (const i in jsonObject["signedAttributes"])
result.signedAttributes.push(Extension.fromJson(jsonObject["signedAttributes"][i]))
result.certificateChain = []
if (jsonObject["certificateChain"] != null)
for (const i in jsonObject["certificateChain"])
result.certificateChain.push(CertificateChain.fromJson(jsonObject["certificateChain"][i]))
return result
}
}
class SecurityObject {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new SecurityObject()
result.fileReference = jsonObject["fileReference"]
result.version = jsonObject["version"]
result.objectType = jsonObject["objectType"]
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
result.signerInfos = []
if (jsonObject["signerInfos"] != null)
for (const i in jsonObject["signerInfos"])
result.signerInfos.push(SignerInfo.fromJson(jsonObject["signerInfos"][i]))
return result
}
}
class CardProperties {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new CardProperties()
result.aTQA = jsonObject["aTQA"]
result.bitRateR = jsonObject["bitRateR"]
result.bitRateS = jsonObject["bitRateS"]
result.chipTypeA = jsonObject["chipTypeA"]
result.mifareMemory = jsonObject["mifareMemory"]
result.rfidType = jsonObject["rfidType"]
result.sAK = jsonObject["sAK"]
result.support4 = jsonObject["support4"]
result.supportMifare = jsonObject["supportMifare"]
result.aTQB = jsonObject["aTQB"]
result.aTR = jsonObject["aTR"]
result.baudrate1 = jsonObject["baudrate1"]
result.baudrate2 = jsonObject["baudrate2"]
result.uID = jsonObject["uID"]
return result
}
}
class RFIDSessionData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new RFIDSessionData()
result.totalBytesReceived = jsonObject["totalBytesReceived"]
result.totalBytesSent = jsonObject["totalBytesSent"]
result.status = jsonObject["status"]
result.extLeSupport = jsonObject["extLeSupport"]
result.processTime = jsonObject["processTime"]
result.cardProperties = CardProperties.fromJson(jsonObject["cardProperties"])
result.accessControls = []
if (jsonObject["accessControls"] != null)
for (const i in jsonObject["accessControls"])
result.accessControls.push(AccessControlProcedureType.fromJson(jsonObject["accessControls"][i]))
result.applications = []
if (jsonObject["applications"] != null)
for (const i in jsonObject["applications"])
result.applications.push(Application.fromJson(jsonObject["applications"][i]))
result.securityObjects = []
if (jsonObject["securityObjects"] != null)
for (const i in jsonObject["securityObjects"])
result.securityObjects.push(SecurityObject.fromJson(jsonObject["securityObjects"][i]))
result.dataGroups = []
if (jsonObject["dataGroups"] != null)
for (const i in jsonObject["dataGroups"])
result.dataGroups.push(jsonObject["dataGroups"][i])
result.dataFields = []
if (jsonObject["dataFields"] != null)
for (const i in jsonObject["dataFields"])
result.dataFields.push(DataField.fromJson(jsonObject["dataFields"][i]))
return result
}
}
class DataField {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DataField()
result.data = jsonObject["data"]
result.fieldType = jsonObject["fieldType"]
return result
}
}
class DocumentReaderAuthenticityCheck {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderAuthenticityCheck()
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.typeName = jsonObject["typeName"]
result.pageIndex = jsonObject["pageIndex"]
result.elements = []
if (jsonObject["elements"] != null)
for (const i in jsonObject["elements"])
result.elements.push(DocumentReaderAuthenticityElement.fromJson(jsonObject["elements"][i]))
return result
}
}
class PDF417Info {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new PDF417Info()
result.errorLevel = jsonObject["errorLevel"]
result.columns = jsonObject["columns"]
result.rows = jsonObject["rows"]
return result
}
}
class DocumentReaderBarcodeResult {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderBarcodeResult()
result.fields = []
if (jsonObject["fields"] != null)
for (const i in jsonObject["fields"])
result.fields.push(DocumentReaderBarcodeField.fromJson(jsonObject["fields"][i]))
return result
}
}
class DocumentReaderBarcodeField {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderBarcodeField()
result.barcodeType = jsonObject["barcodeType"]
result.status = jsonObject["status"]
result.pageIndex = jsonObject["pageIndex"]
result.pdf417Info = PDF417Info.fromJson(jsonObject["pdf417Info"])
result.data = jsonObject["data"]
return result
}
}
class DocumentReaderAuthenticityResult {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderAuthenticityResult()
result.status = jsonObject["status"]
result.checks = []
if (jsonObject["checks"] != null)
for (const i in jsonObject["checks"])
result.checks.push(DocumentReaderAuthenticityCheck.fromJson(jsonObject["checks"][i]))
return result
}
}
class DocumentReaderAuthenticityElement {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderAuthenticityElement()
result.status = jsonObject["status"]
result.elementType = jsonObject["elementType"]
result.elementDiagnose = jsonObject["elementDiagnose"]
result.elementTypeName = jsonObject["elementTypeName"]
result.elementDiagnoseName = jsonObject["elementDiagnoseName"]
return result
}
}
class DocumentReaderCompletion {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderCompletion()
result.action = jsonObject["action"]
result.results = DocumentReaderResults.fromJson(jsonObject["results"])
result.error = RegulaException.fromJson(jsonObject["error"])
return result
}
}
class RfidNotificationCompletion {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new RfidNotificationCompletion()
result.notification = jsonObject["notification"]
result.value = jsonObject["value"]
return result
}
}
class RegulaException {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new RegulaException()
result.code = jsonObject["code"]
result.message = jsonObject["message"]
return result
}
}
class PKDCertificate {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new PKDCertificate()
result.binaryData = jsonObject["binaryData"]
result.resourceType = jsonObject["resourceType"]
result.privateKey = jsonObject["privateKey"]
return result
}
}
class TccParams {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new TccParams()
result.serviceUrlTA = jsonObject["serviceUrlTA"]
result.serviceUrlPA = jsonObject["serviceUrlPA"]
result.pfxCertUrl = jsonObject["pfxCertUrl"]
result.pfxPassPhrase = jsonObject["pfxPassPhrase"]
result.pfxCert = jsonObject["pfxCert"]
return result
}
}
class ImageInputParam {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ImageInputParam()
result.width = jsonObject["width"]
result.height = jsonObject["height"]
result.type = jsonObject["type"]
result.disableFrameShiftIR = jsonObject["disableFrameShiftIR"]
result.doFlipYAxis = jsonObject["doFlipYAxis"]
return result
}
}
class PAResourcesIssuer {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new PAResourcesIssuer()
result.data = jsonObject["data"]
result.friendlyName = jsonObject["friendlyName"]
result.attributes = []
if (jsonObject["attributes"] != null)
for (const i in jsonObject["attributes"])
result.attributes.push(PAAttribute.fromJson(jsonObject["attributes"][i]))
return result
}
}
class PAAttribute {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new PAAttribute()
result.type = jsonObject["type"]
result.value = jsonObject["value"]
return result
}
}
class TAChallenge {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new TAChallenge()
result.data = jsonObject["data"]
result.auxPCD = jsonObject["auxPCD"]
result.challengePICC = jsonObject["challengePICC"]
result.hashPK = jsonObject["hashPK"]
result.idPICC = jsonObject["idPICC"]
return result
}
}
class DocumentReaderResultsStatus {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderResultsStatus()
result.overallStatus = jsonObject["overallStatus"]
result.optical = jsonObject["optical"]
result.detailsOptical = DetailsOptical.fromJson(jsonObject["detailsOptical"])
result.rfid = jsonObject["rfid"]
result.detailsRFID = DetailsRFID.fromJson(jsonObject["detailsRFID"])
result.portrait = jsonObject["portrait"]
result.stopList = jsonObject["stopList"]
return result
}
}
class DetailsOptical {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DetailsOptical()
result.overallStatus = jsonObject["overallStatus"]
result.mrz = jsonObject["mrz"]
result.text = jsonObject["text"]
result.docType = jsonObject["docType"]
result.security = jsonObject["security"]
result.imageQA = jsonObject["imageQA"]
result.expiry = jsonObject["expiry"]
result.vds = jsonObject["vds"]
result.pagesCount = jsonObject["pagesCount"]
return result
}
}
class DetailsRFID {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DetailsRFID()
result.pa = jsonObject["pa"]
result.ca = jsonObject["ca"]
result.aa = jsonObject["aa"]
result.ta = jsonObject["ta"]
result.bac = jsonObject["bac"]
result.pace = jsonObject["pace"]
result.overallStatus = jsonObject["overallStatus"]
return result
}
}
class VDSNCData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new VDSNCData()
result.type = jsonObject["type"]
result.version = jsonObject["version"]
result.issuingCountry = jsonObject["issuingCountry"]
result.message = jsonObject["message"]
result.signatureAlgorithm = jsonObject["signatureAlgorithm"]
result.signature = BytesData.fromJson(jsonObject["signature"])
result.certificate = BytesData.fromJson(jsonObject["certificate"])
result.certificateChain = []
if (jsonObject["certificateChain"] != null)
for (const i in jsonObject["certificateChain"])
result.certificateChain.push(CertificateChain.fromJson(jsonObject["certificateChain"][i]))
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
return result
}
}
class BytesData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new BytesData()
result.data = jsonObject["data"]
result.length = jsonObject["length"]
result.status = jsonObject["status"]
result.type = jsonObject["type"]
return result
}
}
class ImageInputData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ImageInputData()
result.pageIndex = jsonObject["pageIndex"]
result.light = jsonObject["light"]
result.type = jsonObject["type"]
result.width = jsonObject["width"]
result.height = jsonObject["height"]
result.bitmap = jsonObject["bitmap"]
result.imgBytes = jsonObject["imgBytes"]
return result
}
}
class DocReaderDocumentsDatabase {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocReaderDocumentsDatabase()
result.databaseID = jsonObject["databaseID"]
result.version = jsonObject["version"]
result.date = jsonObject["date"]
result.databaseDescription = jsonObject["databaseDescription"]
result.countriesNumber = jsonObject["countriesNumber"]
result.documentsNumber = jsonObject["documentsNumber"]
result.size = jsonObject["size"]
return result
}
}
class DocumentReaderComparison {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderComparison()
result.sourceTypeLeft = jsonObject["sourceTypeLeft"]
result.sourceTypeRight = jsonObject["sourceTypeRight"]
result.status = jsonObject["status"]
return result
}
}
class DocumentReaderRfidOrigin {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderRfidOrigin()
result.dg = jsonObject["dg"]
result.dgTag = jsonObject["dgTag"]
result.entryView = jsonObject["entryView"]
result.tagEntry = jsonObject["tagEntry"]
return result
}
}
class DocumentReaderTextSource {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderTextSource()
result.sourceType = jsonObject["sourceType"]
result.source = jsonObject["source"]
result.validityStatus = jsonObject["validityStatus"]
return result
}
}
class DocumentReaderSymbol {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderSymbol()
result.code = jsonObject["code"]
result.rect = Rect.fromJson(jsonObject["rect"])
result.probability = jsonObject["probability"]
return result
}
}
class DocumentReaderValidity {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderValidity()
result.sourceType = jsonObject["sourceType"]
result.status = jsonObject["status"]
return result
}
}
class OnlineProcessingConfig {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new OnlineProcessingConfig()
result.mode = jsonObject["mode"]
result.url = jsonObject["url"]
result.processParams = ProcessParams.fromJson(jsonObject["processParams"])
result.imageFormat = jsonObject["imageFormat"]
result.imageCompressionQuality = jsonObject["imageCompressionQuality"]
result.requestHeaders = jsonObject["requestHeaders"]
return result
}
}
class DocReaderConfig {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocReaderConfig()
result.license = jsonObject["license"]
result.customDb = jsonObject["customDb"]
result.databasePath = jsonObject["databasePath"]
result.licenseUpdate = jsonObject["licenseUpdate"]
result.delayedNNLoad = jsonObject["delayedNNLoad"]
result.blackList = jsonObject["blackList"]
return result
}
}
class ScannerConfig {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ScannerConfig()
result.scenario = jsonObject["scenario"]
result.livePortrait = jsonObject["livePortrait"]
result.extPortrait = jsonObject["extPortrait"]
result.onlineProcessingConfig = OnlineProcessingConfig.fromJson(jsonObject["onlineProcessingConfig"])
result.cameraId = jsonObject["cameraId"]
return result
}
}
class RecognizeConfig {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new RecognizeConfig()
result.scenario = jsonObject["scenario"]
result.onlineProcessingConfig = OnlineProcessingConfig.fromJson(jsonObject["onlineProcessingConfig"])
result.oneShotIdentification = jsonObject["oneShotIdentification"]
result.dtc = jsonObject["dtc"]
result.livePortrait = jsonObject["livePortrait"]
result.extPortrait = jsonObject["extPortrait"]
result.image = jsonObject["image"]
result.data = jsonObject["data"]
result.images = []
if (jsonObject["images"] != null)
for (const i in jsonObject["images"])
result.images.push(jsonObject["images"][i])
result.imageInputData = []
if (jsonObject["imageInputData"] != null)
for (const i in jsonObject["imageInputData"])
result.imageInputData.push(ImageInputData.fromJson(jsonObject["imageInputData"][i]))
return result
}
}
class License {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new License()
result.expiryDate = jsonObject["expiryDate"]
result.countryFilter = []
if (jsonObject["countryFilter"] != null)
for (const i in jsonObject["countryFilter"])
result.countryFilter.push(jsonObject["countryFilter"][i])
result.isRfidAvailable = jsonObject["isRfidAvailable"]
return result
}
}
class DocReaderVersion {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocReaderVersion()
result.api = jsonObject["api"]
result.core = jsonObject["core"]
result.coreMode = jsonObject["coreMode"]
result.database = DocReaderDocumentsDatabase.fromJson(jsonObject["database"])
return result
}
}
class TransactionInfo {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new TransactionInfo()
result.transactionId = jsonObject["transactionId"]
result.tag = jsonObject["tag"]
result.sessionLogFolder = jsonObject["sessionLogFolder"]
return result
}
}
class DocumentReaderResults {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderResults()
result.chipPage = jsonObject["chipPage"]
result.processingFinishedStatus = jsonObject["processingFinishedStatus"]
result.elapsedTime = jsonObject["elapsedTime"]
result.elapsedTimeRFID = jsonObject["elapsedTimeRFID"]
result.morePagesAvailable = jsonObject["morePagesAvailable"]
result.graphicResult = DocumentReaderGraphicResult.fromJson(jsonObject["graphicResult"])
result.textResult = DocumentReaderTextResult.fromJson(jsonObject["textResult"])
result.documentPosition = []
if (jsonObject["documentPosition"] != null)
for (const i in jsonObject["documentPosition"])
result.documentPosition.push(ElementPosition.fromJson(jsonObject["documentPosition"][i]))
result.barcodePosition = []
if (jsonObject["barcodePosition"] != null)
for (const i in jsonObject["barcodePosition"])
result.barcodePosition.push(ElementPosition.fromJson(jsonObject["barcodePosition"][i]))
result.mrzPosition = []
if (jsonObject["mrzPosition"] != null)
for (const i in jsonObject["mrzPosition"])
result.mrzPosition.push(ElementPosition.fromJson(jsonObject["mrzPosition"][i]))
result.imageQuality = []
if (jsonObject["imageQuality"] != null)
for (const i in jsonObject["imageQuality"])
result.imageQuality.push(ImageQualityGroup.fromJson(jsonObject["imageQuality"][i]))
result.rawResult = jsonObject["rawResult"]
result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"])
result.authenticityResult = DocumentReaderAuthenticityResult.fromJson(jsonObject["authenticityResult"])
result.barcodeResult = DocumentReaderBarcodeResult.fromJson(jsonObject["barcodeResult"])
result.documentType = []
if (jsonObject["documentType"] != null)
for (const i in jsonObject["documentType"])
result.documentType.push(DocumentReaderDocumentType.fromJson(jsonObject["documentType"][i]))
result.status = DocumentReaderResultsStatus.fromJson(jsonObject["status"])
result.vdsncData = VDSNCData.fromJson(jsonObject["vdsncData"])
result.dtcData = jsonObject["dtcData"]
result.transactionInfo = TransactionInfo.fromJson(jsonObject["transactionInfo"])
return result
}
}
class CameraSize {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new CameraSize()
result.width = jsonObject["width"]
result.height = jsonObject["height"]
return result
}
}
class Functionality {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Functionality()
result.pictureOnBoundsReady = jsonObject["pictureOnBoundsReady"]
result.showTorchButton = jsonObject["showTorchButton"]
result.showCloseButton = jsonObject["showCloseButton"]
result.videoCaptureMotionControl = jsonObject["videoCaptureMotionControl"]
result.showCaptureButton = jsonObject["showCaptureButton"]
result.showChangeFrameButton = jsonObject["showChangeFrameButton"]
result.showSkipNextPageButton = jsonObject["showSkipNextPageButton"]
result.useAuthenticator = jsonObject["useAuthenticator"]
result.skipFocusingFrames = jsonObject["skipFocusingFrames"]
result.showCameraSwitchButton = jsonObject["showCameraSwitchButton"]
result.displayMetadata = jsonObject["displayMetadata"]
result.isZoomEnabled = jsonObject["isZoomEnabled"]
result.isCameraTorchCheckDisabled = jsonObject["isCameraTorchCheckDisabled"]
result.recordScanningProcess = jsonObject["recordScanningProcess"]
result.manualMultipageMode = jsonObject["manualMultipageMode"]
result.singleResult = jsonObject["singleResult"]
result.torchTurnedOn = jsonObject["torchTurnedOn"]
result.showCaptureButtonDelayFromDetect = jsonObject["showCaptureButtonDelayFromDetect"]
result.showCaptureButtonDelayFromStart = jsonObject["showCaptureButtonDelayFromStart"]
result.rfidTimeout = jsonObject["rfidTimeout"]
result.forcePagesCount = jsonObject["forcePagesCount"]
result.orientation = jsonObject["orientation"]
result.captureMode = jsonObject["captureMode"]
result.cameraMode = jsonObject["cameraMode"]
result.cameraPositionIOS = jsonObject["cameraPositionIOS"]
result.cameraFrame = jsonObject["cameraFrame"]
result.btDeviceName = jsonObject["btDeviceName"]
result.zoomFactor = jsonObject["zoomFactor"]
result.exposure = jsonObject["exposure"]
result.excludedCamera2Models = []
if (jsonObject["excludedCamera2Models"] != null)
for (const i in jsonObject["excludedCamera2Models"])
result.excludedCamera2Models.push(jsonObject["excludedCamera2Models"][i])
result.cameraSize = CameraSize.fromJson(jsonObject["cameraSize"])
result.videoSessionPreset = jsonObject["videoSessionPreset"]
return result
}
}
class GlaresCheckParams {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new GlaresCheckParams()
result.imgMarginPart = jsonObject["imgMarginPart"]
result.maxGlaringPart = jsonObject["maxGlaringPart"]
return result
}
}
class ImageQA {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ImageQA()
result.dpiThreshold = jsonObject["dpiThreshold"]
result.angleThreshold = jsonObject["angleThreshold"]
result.focusCheck = jsonObject["focusCheck"]
result.glaresCheck = jsonObject["glaresCheck"]
result.glaresCheckParams = GlaresCheckParams.fromJson(jsonObject["glaresCheckParams"])
result.colornessCheck = jsonObject["colornessCheck"]
result.screenCapture = jsonObject["screenCapture"]
result.expectedPass = []
if (jsonObject["expectedPass"] != null)
for (const i in jsonObject["expectedPass"])
result.expectedPass.push(jsonObject["expectedPass"][i])
result.documentPositionIndent = jsonObject["documentPositionIndent"]
result.brightnessThreshold = jsonObject["brightnessThreshold"]
result.occlusionCheck = jsonObject["occlusionCheck"]
return result
}
}
class RFIDParams {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new RFIDParams()
result.paIgnoreNotificationCodes = []
if (jsonObject["paIgnoreNotificationCodes"] != null)
for (const i in jsonObject["paIgnoreNotificationCodes"])
result.paIgnoreNotificationCodes.push(jsonObject["paIgnoreNotificationCodes"][i])
return result
}
}
class FaceApiSearchParams {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new FaceApiSearchParams()
result.limit = jsonObject["limit"]
result.threshold = jsonObject["threshold"]
result.groupIds = []
if (jsonObject["groupIds"] != null)
for (const i in jsonObject["groupIds"])
result.groupIds.push(jsonObject["groupIds"][i])
return result
}
}
class FaceApiParams {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new FaceApiParams()
result.url = jsonObject["url"]
result.mode = jsonObject["mode"]
result.threshold = jsonObject["threshold"]
result.searchParams = FaceApiSearchParams.fromJson(jsonObject["searchParams"])
result.serviceTimeout = jsonObject["serviceTimeout"]
result.proxy = jsonObject["proxy"]
result.proxyPassword = jsonObject["proxyPassword"]
result.proxyType = jsonObject["proxyType"]
return result
}
}
class BackendProcessingConfig {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new BackendProcessingConfig()
result.url = jsonObject["url"]
result.httpHeaders = jsonObject["httpHeaders"]
result.rfidServerSideChipVerification = jsonObject["rfidServerSideChipVerification"]
result.timeoutConnection = jsonObject["timeoutConnection"]
return result
}
}
class LivenessParams {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new LivenessParams()
result.checkOVI = jsonObject["checkOVI"]
result.checkMLI = jsonObject["checkMLI"]
result.checkHolo = jsonObject["checkHolo"]
result.checkED = jsonObject["checkED"]
result.checkBlackAndWhiteCopy = jsonObject["checkBlackAndWhiteCopy"]
result.checkDynaprint = jsonObject["checkDynaprint"]
result.checkGeometry = jsonObject["checkGeometry"]
return result
}
}
class AuthenticityParams {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new AuthenticityParams()
result.useLivenessCheck = jsonObject["useLivenessCheck"]
result.livenessParams = LivenessParams.fromJson(jsonObject["livenessParams"])
result.checkUVLuminiscence = jsonObject["checkUVLuminiscence"]
result.checkIRB900 = jsonObject["checkIRB900"]
result.checkImagePatterns = jsonObject["checkImagePatterns"]
result.checkFibers = jsonObject["checkFibers"]
result.checkExtMRZ = jsonObject["checkExtMRZ"]
result.checkExtOCR = jsonObject["checkExtOCR"]
result.checkAxial = jsonObject["checkAxial"]
result.checkBarcodeFormat = jsonObject["checkBarcodeFormat"]
result.checkIRVisibility = jsonObject["checkIRVisibility"]
result.checkIPI = jsonObject["checkIPI"]
result.checkPhotoEmbedding = jsonObject["checkPhotoEmbedding"]
result.checkPhotoComparison = jsonObject["checkPhotoComparison"]
result.checkLetterScreen = jsonObject["checkLetterScreen"]
result.checkSecurityText = jsonObject["checkSecurityText"]
return result
}
}
class ProcessParams {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ProcessParams()
result.multipageProcessing = jsonObject["multipageProcessing"]
result.logs = jsonObject["logs"]
result.debugSaveImages = jsonObject["debugSaveImages"]
result.debugSaveLogs = jsonObject["debugSaveLogs"]
result.returnUncroppedImage = jsonObject["returnUncroppedImage"]
result.uvTorchEnabled = jsonObject["uvTorchEnabled"]
result.debugSaveCroppedImages = jsonObject["debugSaveCroppedImages"]
result.disableFocusingCheck = jsonObject["disableFocusingCheck"]
result.debugSaveRFIDSession = jsonObject["debugSaveRFIDSession"]
result.doublePageSpread = jsonObject["doublePageSpread"]
result.manualCrop = jsonObject["manualCrop"]
result.integralImage = jsonObject["integralImage"]
result.returnCroppedBarcode = jsonObject["returnCroppedBarcode"]
result.checkRequiredTextFields = jsonObject["checkRequiredTextFields"]
result.depersonalizeLog = jsonObject["depersonalizeLog"]
result.generateDoublePageSpreadImage = jsonObject["generateDoublePageSpreadImage"]
result.alreadyCropped = jsonObject["alreadyCropped"]
result.matchTextFieldMask = jsonObject["matchTextFieldMask"]
result.updateOCRValidityByGlare = jsonObject["updateOCRValidityByGlare"]
result.noGraphics = jsonObject["noGraphics"]
result.multiDocOnImage = jsonObject["multiDocOnImage"]
result.forceReadMrzBeforeLocate = jsonObject["forceReadMrzBeforeLocate"]
result.parseBarcodes = jsonObject["parseBarcodes"]
result.shouldReturnPackageForReprocess = jsonObject["shouldReturnPackageForReprocess"]
result.disablePerforationOCR = jsonObject["disablePerforationOCR"]
result.respectImageQuality = jsonObject["respectImageQuality"]
result.strictImageQuality = jsonObject["strictImageQuality"]
result.splitNames = jsonObject["splitNames"]
result.useFaceApi = jsonObject["useFaceApi"]
result.useAuthenticityCheck = jsonObject["useAuthenticityCheck"]
result.checkHologram = jsonObject["checkHologram"]
result.generateNumericCodes = jsonObject["generateNumericCodes"]
result.strictBarcodeDigitalSignatureCheck = jsonObject["strictBarcodeDigitalSignatureCheck"]
result.selectLongestNames = jsonObject["selectLongestNames"]
result.generateDTCVC = jsonObject["generateDTCVC"]
result.strictDLCategoryExpiry = jsonObject["strictDLCategoryExpiry"]
result.generateAlpha2Codes = jsonObject["generateAlpha2Codes"]
result.disableAuthResolutionFilter = jsonObject["disableAuthResolutionFilter"]
result.barcodePa