diff --git a/example/config.xml b/example/config.xml
index f002856..7795425 100644
--- a/example/config.xml
+++ b/example/config.xml
@@ -16,16 +16,9 @@
-
-
-
-
-
+
-
-
-
diff --git a/example/package.json b/example/package.json
index 9074b5c..095e299 100644
--- a/example/package.json
+++ b/example/package.json
@@ -13,16 +13,15 @@
"author": "Regula Forensics Inc.",
"license": "commercial",
"dependencies": {
- "cordova-android": "10.1.2",
- "cordova-ios": "^6.3.0",
- "cordova-plugin-add-swift-support": "^2.0.2",
- "@regulaforensics/cordova-plugin-document-reader-api": "6.8.1",
- "@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "6.8.1",
- "cordova-plugin-file": "^7.0.0",
- "cordova-plugin-telerik-imagepicker": "^2.3.6",
- "cordova-plugin-android-permissions": "1.1.5",
+ "@regulaforensics/cordova-plugin-document-reader-api": "6.9.0",
+ "@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "6.9.0",
+ "cordova-android": "12.0.0",
+ "cordova-ios": "7.0.0",
+ "cordova-plugin-add-swift-support": "2.0.2",
"cordova-plugin-advanced-http": "3.3.1",
- "jetifier": "^2.0.0"
+ "cordova-plugin-android-permissions": "1.1.5",
+ "cordova-plugin-file": "8.0.0",
+ "jetifier": "2.0.0"
},
"cordova": {
"plugins": {
@@ -32,9 +31,6 @@
},
"@regulaforensics/cordova-plugin-document-reader-core-fullrfid": {},
"cordova-plugin-file": {},
- "cordova-plugin-telerik-imagepicker": {
- "PHOTO_LIBRARY_USAGE_DESCRIPTION": " "
- },
"cordova-plugin-android-permissions": {},
"cordova-plugin-advanced-http": {}
},
diff --git a/example/www/js/index.js b/example/www/js/index.js
index 7078c2b..2158079 100644
--- a/example/www/js/index.js
+++ b/example/www/js/index.js
@@ -14,8 +14,11 @@ var app = {
var DocumentReaderResults = DocumentReaderPlugin.DocumentReaderResults
var DocumentReaderScenario = DocumentReaderPlugin.DocumentReaderScenario
var DocumentReaderCompletion = DocumentReaderPlugin.DocumentReaderCompletion
+ var ScannerConfig = DocumentReaderPlugin.ScannerConfig
+ var RecognizeConfig = DocumentReaderPlugin.RecognizeConfig
var Enum = DocumentReaderPlugin.Enum
+ var selectedScenario = "Mrz"
var doRfid = false
var encryption = false
const ENCRYPTED_RESULT_SERVICE = "https://api.regulaforensics.com/api/process"
@@ -41,7 +44,7 @@ var app = {
input.value = DocumentReaderScenario.fromJson(typeof scenarios[index] === "string" ? JSON.parse(scenarios[index]) : scenarios[index]).name
if (index == 0)
input.checked = true
- input.onclick = function () { DocumentReader.setConfig({ processParams: { scenario: this.value } }, function (m) { }, function (e) { }) }
+ input.onclick = function () { selectedScenario = this.value }
input.style.display = "inline-block"
document.getElementById("scenariosRadioGroup").appendChild(input)
var label = document.createElement("span")
@@ -68,7 +71,9 @@ var app = {
}
function scan() {
- DocumentReader.showScanner(function (m) {
+ var config = new ScannerConfig()
+ config.scenario = selectedScenario
+ DocumentReader.scan(config, function (m) {
handleCompletion(DocumentReaderCompletion.fromJson(JSON.parse(m)))
}, function (e) { })
}
@@ -95,14 +100,20 @@ var app = {
}
function recognize() {
- window.imagePicker.getPictures(function (images) {
- document.getElementById("status").innerHTML = "processing image......"
- document.getElementById("status").style.backgroundColor = "grey"
- DocumentReader.recognizeImages(images, function (m) { handleCompletion(DocumentReaderCompletion.fromJson(JSON.parse(m))) }, function (e) { })
- }, function (e) { }, { maximumImagesCount: 10, outputType: window.imagePicker.OutputType.BASE64_STRING })
+ // window.imagePicker.getPictures(function (images) {
+ // document.getElementById("status").innerHTML = "processing image......"
+ // document.getElementById("status").style.backgroundColor = "grey"
+ // var config = new RecognizeConfig()
+ // config.scenario = selectedScenario
+ // config.images = images
+ // DocumentReader.recognize(config, function (m) {
+ // handleCompletion(DocumentReaderCompletion.fromJson(JSON.parse(m)))
+ // }, function (e) { })
+ // }, function (e) { }, { maximumImagesCount: 10, outputType: window.imagePicker.OutputType.BASE64_STRING })
}
function handleCompletion(completion) {
+ console.log("DocReaderAction: " + completion.action)
if (isReadingRfidCustomUi && (completion.action === Enum.DocReaderAction.CANCEL || completion.action === Enum.DocReaderAction.ERROR))
hideRfidUI()
if (isReadingRfidCustomUi && completion.action === Enum.DocReaderAction.NOTIFICATION)
@@ -153,7 +164,7 @@ var app = {
function updateRfidUI(results) {
if (results.value == null) return
- if (results.code === Enum.eRFID_NotificationCodes.RFID_NOTIFICATION_PCSC_READING_DATAGROUP) {
+ if (results.notificationCode === Enum.eRFID_NotificationCodes.RFID_NOTIFICATION_PCSC_READING_DATAGROUP) {
rfidDescription = Enum.eRFID_DataFile_Type.getTranslation(results.dataFileType)
document.getElementById("rfidDescription").innerHTML = rfidDescription
}
@@ -161,10 +172,10 @@ var app = {
document.getElementById("rfidUIHeader").innerHTML = rfidUIHeader
rfidUIHeaderColor = "black"
document.getElementById("rfidUIHeader").style.color = rfidUIHeaderColor
- rfidProgress = results.value
+ rfidProgress = results.progress
document.getElementById("rfidProgress").value = rfidProgress
if (window.cordova.platformId === 'ios')
- DocumentReader.setRfidSessionStatus(rfidDescription + "\n" + results.value + "%", function (e) { }, function (e) { })
+ DocumentReader.setRfidSessionStatus(rfidDescription + "\n" + results.progress + "%", function (e) { }, function (e) { })
}
function customRFID() {
diff --git a/package.json b/package.json
index 932d546..06f66d3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@regulaforensics/cordova-plugin-document-reader-api",
- "version": "6.8.1",
+ "version": "6.9.0",
"description": "Cordova plugin for reading and validation of identification documents (API framework)",
"cordova": {
"id": "@regulaforensics/cordova-plugin-document-reader-api",
diff --git a/plugin.xml b/plugin.xml
index 96952d4..ed45549 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -1,5 +1,5 @@
-
DocumentReaderApi
Cordova plugin Document reader api
@@ -26,7 +26,7 @@
-
+
diff --git a/src/android/BluetoothUtil.kt b/src/android/BluetoothUtil.kt
index 18a18b6..e43bb0c 100644
--- a/src/android/BluetoothUtil.kt
+++ b/src/android/BluetoothUtil.kt
@@ -69,8 +69,8 @@ class BluetoothUtil {
}
private fun deniedBluetoothPermission(
- activity: Activity,
- permission: String
+ activity: Activity,
+ permission: String
): Array {
if (checkSelfPermission(activity, permission) != PERMISSION_GRANTED)
return arrayOf(permission)
@@ -78,10 +78,10 @@ class BluetoothUtil {
}
fun startBluetoothService(
- activity: Activity,
- onConnected: (Boolean) -> Unit,
- onDisconnected: () -> Unit,
- onReady: () -> Unit,
+ activity: Activity,
+ onConnected: (Boolean) -> Unit,
+ onDisconnected: () -> Unit,
+ onReady: () -> Unit
) {
val bleIntent = Intent(activity, RegulaBleService::class.java)
activity.startService(bleIntent)
diff --git a/src/android/DocumentReader.java b/src/android/DocumentReader.java
index 0e40b27..1eaf615 100644
--- a/src/android/DocumentReader.java
+++ b/src/android/DocumentReader.java
@@ -1,7 +1,12 @@
package cordova.plugin.documentreader;
+import static com.regula.documentreader.api.DocumentReader.Instance;
+import static cordova.plugin.documentreader.Helpers.*;
+import static cordova.plugin.documentreader.JSONConstructor.*;
+
import android.annotation.SuppressLint;
import android.app.Activity;
+import android.app.LocaleManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
@@ -12,51 +17,53 @@
import android.nfc.NfcAdapter;
import android.nfc.tech.IsoDep;
import android.os.Build;
-import android.os.Bundle;
+import android.os.LocaleList;
import android.util.Base64;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.regula.documentreader.api.completions.ICheckDatabaseUpdate;
import com.regula.documentreader.api.completions.IDocumentReaderCompletion;
import com.regula.documentreader.api.completions.IDocumentReaderInitCompletion;
import com.regula.documentreader.api.completions.IDocumentReaderPrepareCompletion;
-import com.regula.documentreader.api.completions.IRfidPKDCertificateCompletion;
-import com.regula.documentreader.api.completions.IRfidReaderRequest;
-import com.regula.documentreader.api.completions.IRfidTASignatureCompletion;
-import com.regula.documentreader.api.completions.ITccParamsCompletion;
+import com.regula.documentreader.api.completions.rfid.IRfidPKDCertificateCompletion;
+import com.regula.documentreader.api.completions.rfid.IRfidReaderCompletion;
+import com.regula.documentreader.api.completions.rfid.IRfidReaderRequest;
+import com.regula.documentreader.api.completions.rfid.IRfidTASignatureCompletion;
+import com.regula.documentreader.api.completions.rfid.ITccParamsCompletion;
import com.regula.documentreader.api.enums.DocReaderAction;
+import com.regula.documentreader.api.errors.DocReaderRfidException;
import com.regula.documentreader.api.errors.DocumentReaderException;
import com.regula.documentreader.api.internal.core.CoreScenarioUtil;
+import com.regula.documentreader.api.internal.params.ImageInputParam;
+import com.regula.documentreader.api.internal.parser.DocReaderResultsJsonParser;
import com.regula.documentreader.api.params.BleDeviceConfig;
import com.regula.documentreader.api.params.DocReaderConfig;
import com.regula.documentreader.api.params.ImageInputData;
-import com.regula.documentreader.api.internal.params.ImageInputParam;
import com.regula.documentreader.api.params.rfid.PKDCertificate;
import com.regula.documentreader.api.params.rfid.authorization.PAResourcesIssuer;
import com.regula.documentreader.api.params.rfid.authorization.TAChallenge;
import com.regula.documentreader.api.results.DocumentReaderGraphicField;
+import com.regula.documentreader.api.results.DocumentReaderNotification;
import com.regula.documentreader.api.results.DocumentReaderResults;
import com.regula.documentreader.api.results.DocumentReaderTextField;
-import com.regula.documentreader.api.internal.parser.DocReaderResultsJsonParser;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.PluginResult;
import org.json.JSONArray;
-import org.json.JSONObject;
import org.json.JSONException;
+import org.json.JSONObject;
-import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Locale;
-import static com.regula.documentreader.api.DocumentReader.Instance;
-
-@SuppressWarnings({"ConstantConditions", "RedundantSuppression"})
+@SuppressWarnings({"ConstantConditions", "RedundantSuppression", "deprecation"})
public class DocumentReader extends CordovaPlugin {
private CallbackContext callbackContext;
private boolean backgroundRFIDEnabled = false;
@@ -65,16 +72,30 @@ public class DocumentReader extends CordovaPlugin {
private IRfidPKDCertificateCompletion paCertificateCompletion;
private IRfidPKDCertificateCompletion taCertificateCompletion;
private IRfidTASignatureCompletion taSignatureCompletion;
- private final static String rfidNotificationCompletionEvent = "rfidNotificationCompletionEvent";
- private final static String paCertificateCompletionEvent = "paCertificateCompletionEvent";
- private final static String taCertificateCompletionEvent = "taCertificateCompletionEvent";
- private final static String taSignatureCompletionEvent = "taSignatureCompletionEvent";
+ private final static String eventDatabaseProgress = "database_progress";
+ private final static String eventCompletion = "completion";
+ // These events have a method that is associated only with this event
+ private final static List singleEvents = Arrays.asList(eventDatabaseProgress, eventCompletion);
+
+ private final static String rfidOnProgressEvent = "rfid_notification_completion";
+ private final static String rfidOnChipDetectedEvent = "rfidOnChipDetectedEvent";
+ private final static String rfidOnRetryReadChipEvent = "rfidOnRetryReadChipEvent";
+
+ private final static String eventPACertificateCompletion = "pa_certificate_completion";
+ private final static String eventTACertificateCompletion = "ta_certificate_completion";
+ private final static String eventTASignatureCompletion = "ta_signature_completion";
private final static String bleOnServiceConnectedEvent = "bleOnServiceConnectedEvent";
private final static String bleOnServiceDisconnectedEvent = "bleOnServiceDisconnectedEvent";
private final static String bleOnDeviceReadyEvent = "bleOnDeviceReadyEvent";
+ private final static String eventVideoEncoderCompletion = "video_encoder_completion";
+ private final static String onCustomButtonTappedEvent = "onCustomButtonTappedEvent";
+ // These events are not working in cordova and ionic because they don't have a method
+ // associated with it. Callbacks are set automatically right after init.
+ private final static List skippedEvents = Arrays.asList(eventVideoEncoderCompletion, onCustomButtonTappedEvent);
+
private static int databaseDownloadProgress = 0;
private Context getContext() {
@@ -89,7 +110,7 @@ private Activity getActivity() {
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (intent.getAction() != null && intent.getAction().equals(NfcAdapter.ACTION_TECH_DISCOVERED) && backgroundRFIDEnabled)
- Instance().readRFID(IsoDep.get(intent.getParcelableExtra(NfcAdapter.EXTRA_TAG)), getCompletion());
+ Instance().readRFID(IsoDep.get(intent.getParcelableExtra(NfcAdapter.EXTRA_TAG)), getRfidReaderCompletion());
}
@Override
@@ -114,75 +135,29 @@ private T args(int index) throws JSONException {
return (T) data.get(index);
}
- private void sendProgress(int progress) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, progress);
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
-
- private void sendCompletion(int action, DocumentReaderResults results, DocumentReaderException error) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, JSONConstructor.generateCompletion(action, results, error, getContext()).toString());
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
-
- private void sendVideoEncoderCompletion(String sessionId, File file) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, JSONConstructor.generateVideoEncoderCompletion(sessionId, file).toString());
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
-
- private void sendIRfidNotificationCompletion(int notification, Bundle value) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, rfidNotificationCompletionEvent + JSONConstructor.generateRfidNotificationCompletion(notification, value));
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
-
- private void sendPACertificateCompletion(byte[] serialNumber, PAResourcesIssuer issuer) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, paCertificateCompletionEvent + JSONConstructor.generatePACertificateCompletion(serialNumber, issuer));
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
-
- private void sendTACertificateCompletion(String keyCAR) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, taCertificateCompletionEvent + keyCAR);
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
- private void sendTASignatureCompletion(TAChallenge challenge) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, taSignatureCompletionEvent + JSONConstructor.generateTAChallenge(challenge));
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
- private void sendBleOnServiceConnectedEvent(boolean isBleManagerConnected) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, bleOnServiceConnectedEvent + isBleManagerConnected);
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
-
- private void sendBleOnServiceDisconnectedEvent() {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, bleOnServiceDisconnectedEvent);
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
- private void sendBleOnDeviceReadyEvent() {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, bleOnDeviceReadyEvent);
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
-
- private void sendOnCustomButtonTappedEvent(int tag) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, tag);
+ private void sendEvent(String event, Object data) {
+ PluginResult pluginResult;
+ String result;
+ if (data instanceof JSONObject || data instanceof JSONArray)
+ result = data.toString();
+ else
+ result = (String) data;
+ if (skippedEvents.contains(event))
+ return;
+ // Allows user to determine which event fired when there are more
+ // than one event associated with the function
+ if (!singleEvents.contains(event))
+ result = event + result;
+ pluginResult = new PluginResult(PluginResult.Status.OK, result);
pluginResult.setKeepCallback(true);
callbackContext.sendPluginResult(pluginResult);
}
-
@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
this.callbackContext = callbackContext;
activity = cordova.getActivity();
- action = (String)args.remove(0);
+ action = (String) args.remove(0);
data = args;
Callback callback = new Callback() {
@Override
@@ -343,8 +318,11 @@ public void error(String s) {
case "checkDatabaseUpdate":
checkDatabaseUpdate(callback, args(0));
break;
- case "getScenario":
- getScenario(callback, args(0));
+ case "scan":
+ scan(callback, args(0));
+ break;
+ case "recognize":
+ recognize(callback, args(0));
break;
case "recognizeImages":
recognizeImages(callback, args(0));
@@ -406,9 +384,6 @@ public void error(String s) {
case "recognizeImagesWithImageInputs":
recognizeImagesWithImageInputs(callback, args(0));
break;
- case "setOnCustomButtonTappedListener":
- setOnCustomButtonTappedListener(callback);
- break;
case "setLanguage":
setLanguage(callback, args(0));
break;
@@ -516,15 +491,15 @@ private void startBluetoothService(Callback callback) {
BluetoothUtil.Companion.startBluetoothService(
getActivity(),
isBleManagerConnected -> {
- sendBleOnServiceConnectedEvent(isBleManagerConnected);
+ sendEvent(bleOnServiceConnectedEvent, isBleManagerConnected);
return null;
},
() -> {
- sendBleOnServiceDisconnectedEvent();
+ sendEvent(bleOnServiceDisconnectedEvent, "");
return null;
},
() -> {
- sendBleOnDeviceReadyEvent();
+ sendEvent(bleOnDeviceReadyEvent, "");
return null;
}
);
@@ -541,12 +516,12 @@ private void initializeReaderBleDeviceConfig(Callback callback) {
}
private void getAvailableScenarios(Callback callback) throws JSONException {
- callback.success(JSONConstructor.generateList(Instance().availableScenarios, JSONConstructor::generateDocumentReaderScenario).toString());
+ callback.success(generateList(Instance().availableScenarios, JSONConstructor::generateDocumentReaderScenario).toString());
}
private void parseCoreResults(Callback callback, String json) {
DocumentReaderResults results = (DocumentReaderResults) DocReaderResultsJsonParser.parseCoreResults(json).get("docReaderResults");
- callback.success(JSONConstructor.generateDocumentReaderResults(results, getContext()).toString());
+ callback.success(generateDocumentReaderResults(results, getContext()).toString());
}
private void getAPIVersion(Callback callback) {
@@ -586,7 +561,7 @@ private void getDatabaseDocumentsNumber(Callback callback) {
}
private void setTCCParams(Callback callback, final JSONObject params) {
- Instance().setTccParams(JSONConstructor.TCCParamsFromJSON(params), getTCCParamsCompletion(callback));
+ Instance().setTccParams(TCCParamsFromJSON(params), getTCCParamsCompletion(callback));
}
private void deinitializeReader(Callback callback) {
@@ -607,11 +582,7 @@ private void getRfidScenario(Callback callback) {
}
private void selectedScenario(Callback callback) {
- callback.success(JSONConstructor.generateCoreDetailedScenario(CoreScenarioUtil.getScenario(Instance().processParams().getScenario())).toString());
- }
-
- private void getScenario(Callback callback, String scenario) {
- callback.success(JSONConstructor.generateCoreDetailedScenario(CoreScenarioUtil.getScenario(scenario)).toString());
+ callback.success(generateDocumentReaderScenario(CoreScenarioUtil.getScenario(Instance().processParams().getScenario())).toString());
}
private void getLicenseExpiryDate(Callback callback) {
@@ -625,7 +596,7 @@ private void getLicenseCountryFilter(Callback callback) {
if (Instance().license().getCountryFilter() == null)
callback.error("null");
else
- callback.success(JSONConstructor.generateList(Instance().license().getCountryFilter()).toString());
+ callback.success(generateList(Instance().license().getCountryFilter()).toString());
}
private void licenseIsRfidAvailable(Callback callback) {
@@ -646,7 +617,7 @@ private void isRFIDAvailableForUse(Callback callback) {
private void initializeReader(Callback callback, JSONObject config) {
if (!Instance().isReady())
- Instance().initializeReader(getContext(), JSONConstructor.DocReaderConfigFromJSON(config), getInitCompletion(callback));
+ Instance().initializeReader(getContext(), DocReaderConfigFromJSON(config), getInitCompletion(callback));
else
callback.success("already initialized");
}
@@ -675,6 +646,16 @@ private void startNewPage(Callback callback) {
callback.success();
}
+ private void scan(@SuppressWarnings("unused") Callback callback, JSONObject config) {
+ stopBackgroundRFID();
+ Instance().showScanner(getContext(), ScannerConfigFromJSON(config), getCompletion());
+ }
+
+ private void recognize(@SuppressWarnings("unused") Callback callback, JSONObject config) {
+ stopBackgroundRFID();
+ Instance().recognize(getContext(), RecognizeConfigFromJSON(config), getCompletion());
+ }
+
private void recognizeImageWithOpts(Callback callback, String base64Image, final JSONObject opts) throws JSONException {
RegulaConfig.setConfig(Instance(), opts, getContext());
recognizeImage(callback, base64Image);
@@ -694,7 +675,7 @@ private void recognizeImages(@SuppressWarnings("unused") Callback callback, JSON
stopBackgroundRFID();
Bitmap[] images = new Bitmap[base64Images.length()];
for (int i = 0; i < images.length; i++)
- images[i] = Helpers.bitmapFromBase64(base64Images.getString(i));
+ images[i] = bitmapFromBase64(base64Images.getString(i));
Instance().recognizeImages(images, getCompletion());
}
@@ -702,7 +683,7 @@ private void recognizeImagesWithImageInputs(@SuppressWarnings("unused") Callback
stopBackgroundRFID();
ImageInputData[] images = new ImageInputData[base64Images.length()];
for (int i = 0; i < images.length; i++)
- images[i] = JSONConstructor.ImageInputDataFromJSON(base64Images.getJSONObject(i));
+ images[i] = ImageInputDataFromJSON(base64Images.getJSONObject(i));
Instance().recognizeImages(images, getCompletion());
}
@@ -766,12 +747,7 @@ private void stopScanner(Callback callback) {
private void startRFIDReader(@SuppressWarnings("unused") Callback callback) {
stopBackgroundRFID();
- IRfidReaderRequest delegate = null;
- if (rfidDelegate == RFIDDelegate.NO_PA)
- delegate = getIRfidReaderRequestNoPA();
- if (rfidDelegate == RFIDDelegate.FULL)
- delegate = getIRfidReaderRequest();
- Instance().startRFIDReader(getContext(), getCompletion(), delegate, this::sendIRfidNotificationCompletion);
+ Instance().startRFIDReader(getContext(), getRfidReaderCompletion(), getRfidReaderRequest());
}
private void stopRFIDReader(Callback callback) {
@@ -807,18 +783,18 @@ private void readRFID(@SuppressWarnings("unused") Callback callback) {
startForegroundDispatch(getActivity());
}
- private void setOnCustomButtonTappedListener(Callback callback) {
- Instance().setOnClickListener(view -> sendOnCustomButtonTappedEvent((int) view.getTag()));
- callback.success();
- }
-
private void setLanguage(Callback callback, String language) {
- Locale locale = new Locale(language);
- Locale.setDefault(locale);
- Resources resources = getContext().getResources();
- Configuration config = resources.getConfiguration();
- config.setLocale(locale);
- resources.updateConfiguration(config, resources.getDisplayMetrics());
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ LocaleManager localeManager = (LocaleManager) getContext().getSystemService(Context.LOCALE_SERVICE);
+ localeManager.setApplicationLocales(new LocaleList(Locale.forLanguageTag(language)));
+ } else {
+ Locale locale = new Locale(language);
+ Locale.setDefault(locale);
+ Resources resources = getContext().getResources();
+ Configuration config = resources.getConfiguration();
+ config.setLocale(locale);
+ resources.updateConfiguration(config, resources.getDisplayMetrics());
+ }
callback.success();
}
@@ -900,7 +876,7 @@ private void textFieldByType(Callback callback, String raw, int fieldType) {
if (result == null)
callback.success(null);
else
- callback.success(JSONConstructor.generateDocumentReaderTextField(result, getContext()).toString());
+ callback.success(generateDocumentReaderTextField(result, getContext()).toString());
}
private void textFieldByTypeLcid(Callback callback, String raw, int fieldType, int lcid) {
@@ -909,7 +885,7 @@ private void textFieldByTypeLcid(Callback callback, String raw, int fieldType, i
if (result == null)
callback.success(null);
else
- callback.success(JSONConstructor.generateDocumentReaderTextField(result, getContext()).toString());
+ callback.success(generateDocumentReaderTextField(result, getContext()).toString());
}
private void graphicFieldByTypeSource(Callback callback, String raw, int fieldType, int source) {
@@ -918,7 +894,7 @@ private void graphicFieldByTypeSource(Callback callback, String raw, int fieldTy
if (result == null)
callback.success(null);
else
- callback.success(JSONConstructor.generateDocumentReaderGraphicField(result, getContext()).toString());
+ callback.success(generateDocumentReaderGraphicField(result, getContext()).toString());
}
private void graphicFieldByTypeSourcePageIndex(Callback callback, String raw, int fieldType, int source, int pageIndex) {
@@ -927,7 +903,7 @@ private void graphicFieldByTypeSourcePageIndex(Callback callback, String raw, in
if (result == null)
callback.success(null);
else
- callback.success(JSONConstructor.generateDocumentReaderGraphicField(result, getContext()).toString());
+ callback.success(generateDocumentReaderGraphicField(result, getContext()).toString());
}
private void graphicFieldByTypeSourcePageIndexLight(Callback callback, String raw, int fieldType, int source, int pageIndex, int light) {
@@ -936,34 +912,34 @@ private void graphicFieldByTypeSourcePageIndexLight(Callback callback, String ra
if (result == null)
callback.success(null);
else
- callback.success(JSONConstructor.generateDocumentReaderGraphicField(result, getContext()).toString());
+ callback.success(generateDocumentReaderGraphicField(result, getContext()).toString());
}
private void graphicFieldImageByType(Callback callback, String raw, int fieldType) {
DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
- callback.success(Helpers.bitmapToBase64String(results.getGraphicFieldImageByType(fieldType)));
+ callback.success(bitmapToBase64String(results.getGraphicFieldImageByType(fieldType)));
}
private void graphicFieldImageByTypeSource(Callback callback, String raw, int fieldType, int source) {
DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
- callback.success(Helpers.bitmapToBase64String(results.getGraphicFieldImageByType(fieldType, source)));
+ callback.success(bitmapToBase64String(results.getGraphicFieldImageByType(fieldType, source)));
}
private void graphicFieldImageByTypeSourcePageIndex(Callback callback, String raw, int fieldType, int source, int pageIndex) {
DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
- callback.success(Helpers.bitmapToBase64String(results.getGraphicFieldImageByType(fieldType, source, pageIndex)));
+ callback.success(bitmapToBase64String(results.getGraphicFieldImageByType(fieldType, source, pageIndex)));
}
private void graphicFieldImageByTypeSourcePageIndexLight(Callback callback, String raw, int fieldType, int source, int pageIndex, int light) {
DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
- callback.success(Helpers.bitmapToBase64String(results.getGraphicFieldImageByType(fieldType, source, pageIndex, light)));
+ callback.success(bitmapToBase64String(results.getGraphicFieldImageByType(fieldType, source, pageIndex, light)));
}
@SuppressLint("WrongConstant")
private void containers(Callback callback, String raw, JSONArray resultType) {
try {
DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
- callback.success(results.getContainers(JSONConstructor.intArrayFromJSON(resultType)));
+ callback.success(results.getContainers(intArrayFromJSON(resultType)));
} catch (JSONException e) {
e.printStackTrace();
callback.error(e.toString());
@@ -1003,24 +979,50 @@ private void getRfidSessionStatus(Callback callback) {
private IDocumentReaderCompletion getCompletion() {
return (action, results, error) -> {
- sendCompletion(action, results, error);
+ sendEvent(eventCompletion, generateCompletion(action, results, error, getContext()));
if (action == DocReaderAction.ERROR || action == DocReaderAction.CANCEL || (action == DocReaderAction.COMPLETE && results != null && results.rfidResult == 1))
stopBackgroundRFID();
};
}
+ private IRfidReaderCompletion getRfidReaderCompletion() {
+ return new IRfidReaderCompletion() {
+ @Override
+ public void onCompleted(int action, @Nullable DocumentReaderResults results, @Nullable DocumentReaderException error) {
+ sendEvent(eventCompletion, generateCompletion(action, results, error, getContext()));
+ if (action == DocReaderAction.ERROR || action == DocReaderAction.CANCEL || (action == DocReaderAction.COMPLETE && results != null && results.rfidResult == 1))
+ stopBackgroundRFID();
+ }
+
+ @Override
+ public void onChipDetected() {
+ sendEvent(rfidOnChipDetectedEvent, "");
+ }
+
+ @Override
+ public void onRetryReadChip(@NonNull DocReaderRfidException error) {
+ sendEvent(rfidOnRetryReadChipEvent, generateRegulaException(error));
+ }
+
+ @Override
+ public void onProgress(@Nullable DocumentReaderNotification notification) {
+ sendEvent(rfidOnProgressEvent, generateDocumentReaderNotification(notification));
+ }
+ };
+ }
+
private IDocumentReaderPrepareCompletion getPrepareCompletion(Callback callback) {
return new IDocumentReaderPrepareCompletion() {
@Override
public void onPrepareProgressChanged(int progress) {
if (progress != databaseDownloadProgress) {
- sendProgress(progress);
+ sendEvent(eventDatabaseProgress, progress + "");
databaseDownloadProgress = progress;
}
}
@Override
- public void onPrepareCompleted(boolean status, DocumentReaderException error) {
+ public void onPrepareCompleted(boolean status, @Nullable DocumentReaderException error) {
if (status)
callback.success("database prepared");
else
@@ -1032,7 +1034,8 @@ public void onPrepareCompleted(boolean status, DocumentReaderException error) {
private IDocumentReaderInitCompletion getInitCompletion(Callback callback) {
return (success, error) -> {
if (success) {
- Instance().setVideoEncoderCompletion(this::sendVideoEncoderCompletion);
+ Instance().setVideoEncoderCompletion((sessionId, file) -> sendEvent(eventVideoEncoderCompletion, generateVideoEncoderCompletion(sessionId, file)));
+ Instance().setOnClickListener(view -> sendEvent(onCustomButtonTappedEvent, view.getTag()));
callback.success("init completed");
} else
callback.error("Init failed:" + error);
@@ -1040,7 +1043,7 @@ private IDocumentReaderInitCompletion getInitCompletion(Callback callback) {
}
private ICheckDatabaseUpdate getCheckDatabaseUpdateCompletion(Callback callback) {
- return (database) -> callback.success(JSONConstructor.generateDocReaderDocumentsDatabase(database));
+ return (database) -> callback.success(generateDocReaderDocumentsDatabase(database));
}
private ITccParamsCompletion getTCCParamsCompletion(Callback callback) {
@@ -1057,20 +1060,19 @@ private IRfidReaderRequest getIRfidReaderRequest() {
@Override
public void onRequestPACertificates(byte[] serialNumber, PAResourcesIssuer issuer, @NonNull IRfidPKDCertificateCompletion completion) {
paCertificateCompletion = completion;
- completion.onCertificatesReceived(new PKDCertificate[0]);
- sendPACertificateCompletion(serialNumber, issuer);
+ sendEvent(eventPACertificateCompletion, generatePACertificateCompletion(serialNumber, issuer));
}
@Override
public void onRequestTACertificates(String keyCAR, @NonNull IRfidPKDCertificateCompletion completion) {
taCertificateCompletion = completion;
- sendTACertificateCompletion(keyCAR);
+ sendEvent(eventTACertificateCompletion, keyCAR);
}
@Override
public void onRequestTASignature(TAChallenge challenge, @NonNull IRfidTASignatureCompletion completion) {
taSignatureCompletion = completion;
- sendTASignatureCompletion(challenge);
+ sendEvent(eventTASignatureCompletion, generateTAChallenge(challenge));
}
};
}
@@ -1086,17 +1088,26 @@ public void onRequestPACertificates(byte[] serialNumber, PAResourcesIssuer issue
@Override
public void onRequestTACertificates(String keyCAR, @NonNull IRfidPKDCertificateCompletion completion) {
taCertificateCompletion = completion;
- sendTACertificateCompletion(keyCAR);
+ sendEvent(eventTACertificateCompletion, keyCAR);
}
@Override
public void onRequestTASignature(TAChallenge challenge, @NonNull IRfidTASignatureCompletion completion) {
taSignatureCompletion = completion;
- sendTASignatureCompletion(challenge);
+ sendEvent(eventTASignatureCompletion, generateTAChallenge(challenge));
}
};
}
+ private IRfidReaderRequest getRfidReaderRequest() {
+ IRfidReaderRequest delegate = null;
+ if (rfidDelegate == RFIDDelegate.NO_PA)
+ delegate = getIRfidReaderRequestNoPA();
+ if (rfidDelegate == RFIDDelegate.FULL)
+ delegate = getIRfidReaderRequest();
+ return delegate;
+ }
+
private static int rfidDelegate = RFIDDelegate.NULL;
private static class RFIDDelegate {
diff --git a/src/android/Helpers.java b/src/android/Helpers.java
index a9cdb0f..17b5514 100644
--- a/src/android/Helpers.java
+++ b/src/android/Helpers.java
@@ -19,11 +19,114 @@
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
class Helpers {
+ interface JSONObjectGeneratorWithContext {
+ JSONObject generateJSONObject(T param, Context context) throws JSONException;
+ }
+
+ interface JSONObjectGenerator {
+ JSONObject generateJSONObject(T param) throws JSONException;
+ }
+
+ static JSONArray generateList(List list) {
+ JSONArray result = new JSONArray();
+ if (list == null) return result;
+ for (T t : list)
+ if (t != null)
+ result.put(t);
+
+ return result;
+ }
+
+ static JSONArray generateList(List list, JSONObjectGenerator generator) throws JSONException {
+ JSONArray result = new JSONArray();
+ if (list == null) return result;
+ for (T t : list)
+ if (t != null)
+ result.put(generator.generateJSONObject(t));
+
+ return result;
+ }
+
+ static JSONArray generateList(List list, JSONObjectGeneratorWithContext generator, Context context) throws JSONException {
+ JSONArray result = new JSONArray();
+ if (list == null) return result;
+ for (T t : list)
+ if (t != null)
+ result.put(generator.generateJSONObject(t, context));
+
+ return result;
+ }
+
+ static JSONArray generateArray(T[] array) throws JSONException {
+ JSONArray result = new JSONArray();
+ if (array == null) return result;
+ for (int i = 0; i < array.length; i++)
+ result.put(i, array[i]);
+
+ return result;
+ }
+
+ static JSONArray generateArray(T[] array, JSONObjectGenerator generator) throws JSONException {
+ JSONArray result = new JSONArray();
+ if (array == null) return result;
+ for (int i = 0; i < array.length; i++)
+ result.put(i, generator.generateJSONObject(array[i]));
+
+ return result;
+ }
+
+ static JSONObject generateMap(Map map) throws JSONException {
+ JSONObject result = new JSONObject();
+ if (map == null) return result;
+ for (Map.Entry entry : map.entrySet())
+ if (entry != null)
+ result.put(entry.getKey().toString(), entry.getValue());
+ return result;
+ }
+
+ static JSONArray generateIntArray(int[] array) throws JSONException {
+ JSONArray result = new JSONArray();
+ if (array == null) return result;
+ for (int i = 0; i < array.length; i++)
+ result.put(i, array[i]);
+
+ return result;
+ }
+
+ static int[] intArrayFromJSON(JSONArray input) throws JSONException {
+ int[] result = new int[input.length()];
+ for (int i = 0; i < input.length(); i++)
+ result[i] = input.getInt(i);
+
+ return result;
+ }
+
+ static JSONArray generateByteArray(byte[] array) throws JSONException {
+ JSONArray result = new JSONArray();
+ if (array == null) return result;
+ for (int i = 0; i < array.length; i++)
+ result.put(i, array[i]);
+
+ return result;
+ }
+
+ static JSONArray generateLongArray(long[] array) throws JSONException {
+ JSONArray result = new JSONArray();
+ if (array == null) return result;
+ for (int i = 0; i < array.length; i++)
+ result.put(i, array[i]);
+
+ return result;
+ }
+
static Bitmap bitmapFromBase64(String base64) {
- byte[] decodedString = Base64.decode(base64, Base64.DEFAULT);
+ byte[] decodedString = Base64.decode(base64, Base64.NO_WRAP);
Bitmap result = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
int sizeMultiplier = result.getByteCount() / 5000000;
if (result.getByteCount() > 5000000)
@@ -63,13 +166,13 @@ static Bitmap bitmapFromDrawable(Drawable drawable) {
}
static String bitmapToBase64String(Bitmap bitmap) {
- if(bitmap == null) return null;
+ if (bitmap == null) return null;
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
byte[] byteArray = byteArrayOutputStream.toByteArray();
- return Base64.encodeToString(byteArray, Base64.DEFAULT);
+ return Base64.encodeToString(byteArray, Base64.NO_WRAP);
}
static Matrix matrixFromFloatArray(float[] floats) {
@@ -142,4 +245,15 @@ static String[] stringArrayFromJson(JSONArray jsonArray) {
result[i] = jsonArray.optString(i);
return result;
}
+
+ static Map stringMapFromJson(JSONObject input) throws JSONException {
+ Map result = new HashMap<>();
+ Iterator keys = input.keys();
+ while (keys.hasNext()) {
+ String key = keys.next();
+ String value = input.getString(key);
+ result.put(key, value);
+ }
+ return result;
+ }
}
\ No newline at end of file
diff --git a/src/android/JSONConstructor.java b/src/android/JSONConstructor.java
index 27ebddb..d70d740 100644
--- a/src/android/JSONConstructor.java
+++ b/src/android/JSONConstructor.java
@@ -1,180 +1,31 @@
package cordova.plugin.documentreader;
-import static com.regula.documentreader.api.completions.IRfidNotificationCompletion.RFID_EXTRA_ERROR_CODE;
+import static cordova.plugin.documentreader.Helpers.*;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Rect;
-import android.os.Bundle;
import android.util.Base64;
-import com.regula.documentreader.api.enums.DocReaderAction;
-import com.regula.documentreader.api.enums.PDF417Info;
-import com.regula.documentreader.api.enums.eGraphicFieldType;
-import com.regula.documentreader.api.enums.eRPRM_Lights;
-import com.regula.documentreader.api.errors.DocumentReaderException;
-import com.regula.documentreader.api.internal.core.CoreDetailedScenario;
-import com.regula.documentreader.api.params.DocReaderConfig;
-import com.regula.documentreader.api.internal.params.FaceMetaData;
-import com.regula.documentreader.api.params.ImageInputData;
-import com.regula.documentreader.api.params.rfid.TccParams;
-import com.regula.documentreader.api.params.rfid.authorization.PAAttribute;
-import com.regula.documentreader.api.params.rfid.authorization.PAResourcesIssuer;
-import com.regula.documentreader.api.params.rfid.authorization.TAChallenge;
-import com.regula.documentreader.api.results.Bounds;
-import com.regula.documentreader.api.results.BytesData;
-import com.regula.documentreader.api.results.Coordinate;
-import com.regula.documentreader.api.results.DocReaderDocumentsDatabase;
-import com.regula.documentreader.api.results.DocReaderFieldRect;
-import com.regula.documentreader.api.results.DocumentReaderBarcodeField;
-import com.regula.documentreader.api.results.DocumentReaderBarcodeResult;
-import com.regula.documentreader.api.results.DocumentReaderComparison;
-import com.regula.documentreader.api.results.DocumentReaderDocumentType;
-import com.regula.documentreader.api.results.DocumentReaderGraphicField;
-import com.regula.documentreader.api.results.DocumentReaderGraphicResult;
-import com.regula.documentreader.api.results.DocumentReaderNotification;
-import com.regula.documentreader.api.results.DocumentReaderResults;
-import com.regula.documentreader.api.results.DocumentReaderResultsStatus;
-import com.regula.documentreader.api.results.DocumentReaderRfidOrigin;
-import com.regula.documentreader.api.results.DocumentReaderScenario;
-import com.regula.documentreader.api.results.DocumentReaderSymbol;
-import com.regula.documentreader.api.results.DocumentReaderTextField;
-import com.regula.documentreader.api.results.DocumentReaderTextResult;
-import com.regula.documentreader.api.results.DocumentReaderTextSource;
-import com.regula.documentreader.api.results.DocumentReaderValidity;
-import com.regula.documentreader.api.results.DocumentReaderValue;
-import com.regula.documentreader.api.results.ElementPosition;
-import com.regula.documentreader.api.results.ImageQuality;
-import com.regula.documentreader.api.results.ImageQualityGroup;
-import com.regula.documentreader.api.results.VDSNCData;
-import com.regula.documentreader.api.results.authenticity.DocumentReaderAuthenticityCheck;
-import com.regula.documentreader.api.results.authenticity.DocumentReaderAuthenticityElement;
-import com.regula.documentreader.api.results.authenticity.DocumentReaderAuthenticityResult;
-import com.regula.documentreader.api.results.rfid.AccessControlProcedureType;
-import com.regula.documentreader.api.results.rfid.Application;
-import com.regula.documentreader.api.results.rfid.Attribute;
-import com.regula.documentreader.api.results.rfid.Authority;
-import com.regula.documentreader.api.results.rfid.CardProperties;
-import com.regula.documentreader.api.results.rfid.CertificateChain;
-import com.regula.documentreader.api.results.rfid.CertificateData;
-import com.regula.documentreader.api.results.rfid.Extension;
-import com.regula.documentreader.api.results.rfid.File;
-import com.regula.documentreader.api.results.rfid.FileData;
-import com.regula.documentreader.api.results.rfid.RFIDSessionData;
-import com.regula.documentreader.api.results.rfid.SecurityObject;
-import com.regula.documentreader.api.results.rfid.SecurityObjectCertificates;
-import com.regula.documentreader.api.results.rfid.SignerInfo;
-import com.regula.documentreader.api.results.rfid.Validity;
-import com.regula.documentreader.api.results.rfid.Value;
+import com.regula.common.exception.RegulaException;
+import com.regula.documentreader.api.config.RecognizeConfig;
+import com.regula.documentreader.api.config.ScannerConfig;
+import com.regula.documentreader.api.enums.*;
+import com.regula.documentreader.api.params.*;
+import com.regula.documentreader.api.params.rfid.*;
+import com.regula.documentreader.api.params.rfid.authorization.*;
+import com.regula.documentreader.api.results.*;
+import com.regula.documentreader.api.results.authenticity.*;
+import com.regula.documentreader.api.results.rfid.*;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
-import java.util.List;
-import java.util.Map;
+import java.util.Arrays;
+@SuppressWarnings("deprecation")
class JSONConstructor {
- interface JSONObjectGeneratorWithContext {
- JSONObject generateJSONObject(T param, Context context) throws JSONException;
- }
-
- interface JSONObjectGenerator {
- JSONObject generateJSONObject(T param) throws JSONException;
- }
-
- static JSONArray generateList(List list) {
- JSONArray result = new JSONArray();
- if (list == null) return result;
- for (T t : list)
- if (t != null)
- result.put(t);
-
- return result;
- }
-
- static JSONArray generateList(List list, JSONObjectGenerator generator) throws JSONException {
- JSONArray result = new JSONArray();
- if (list == null) return result;
- for (T t : list)
- if (t != null)
- result.put(generator.generateJSONObject(t));
-
- return result;
- }
-
- static JSONArray generateList(List list, JSONObjectGeneratorWithContext generator, Context context) throws JSONException {
- JSONArray result = new JSONArray();
- if (list == null) return result;
- for (T t : list)
- if (t != null)
- result.put(generator.generateJSONObject(t, context));
-
- return result;
- }
-
- static JSONArray generateArray(T[] array) throws JSONException {
- JSONArray result = new JSONArray();
- if (array == null) return result;
- for (int i = 0; i < array.length; i++)
- result.put(i, array[i]);
-
- return result;
- }
-
- static JSONArray generateArray(T[] array, JSONObjectGenerator generator) throws JSONException {
- JSONArray result = new JSONArray();
- if (array == null) return result;
- for (int i = 0; i < array.length; i++)
- result.put(i, generator.generateJSONObject(array[i]));
-
- return result;
- }
-
- static JSONObject generateMap(Map map) throws JSONException {
- JSONObject result = new JSONObject();
- if (map == null) return result;
- for (Map.Entry entry : map.entrySet())
- if (entry != null)
- result.put(entry.getKey().toString(), entry.getValue());
- return result;
- }
-
- static JSONArray generateIntArray(int[] array) throws JSONException {
- JSONArray result = new JSONArray();
- if (array == null) return result;
- for (int i = 0; i < array.length; i++)
- result.put(i, array[i]);
-
- return result;
- }
-
- static int[] intArrayFromJSON(JSONArray input) throws JSONException {
- int[] result = new int[input.length()];
- for (int i = 0; i < input.length(); i++)
- result[i] = input.getInt(i);
-
- return result;
- }
-
- static JSONArray generateByteArray(byte[] array) throws JSONException {
- JSONArray result = new JSONArray();
- if (array == null) return result;
- for (int i = 0; i < array.length; i++)
- result.put(i, array[i]);
-
- return result;
- }
-
- static JSONArray generateLongArray(long[] array) throws JSONException {
- JSONArray result = new JSONArray();
- if (array == null) return result;
- for (int i = 0; i < array.length; i++)
- result.put(i, array[i]);
-
- return result;
- }
-
static JSONObject generateVideoEncoderCompletion(String sessionId, java.io.File file) {
JSONObject result = new JSONObject();
@@ -189,41 +40,33 @@ static JSONObject generateVideoEncoderCompletion(String sessionId, java.io.File
return result;
}
- static JSONObject generateCompletion(int action, DocumentReaderResults results, DocumentReaderException error, Context context) {
+ static JSONObject generateCompletion(int action, DocumentReaderResults results, RegulaException error, Context context) {
JSONObject result = new JSONObject();
try {
+ if (Arrays.asList(
+ DocReaderAction.COMPLETE,
+ DocReaderAction.MORE_PAGES_AVAILABLE,
+ DocReaderAction.CANCEL,
+ DocReaderAction.ERROR,
+ DocReaderAction.TIMEOUT
+ ).contains(action))
+ result.put("results", generateDocumentReaderResults(results, context));
result.put("action", action);
- switch (action) {
- case DocReaderAction.COMPLETE:
- case DocReaderAction.MORE_PAGES_AVAILABLE:
- case DocReaderAction.CANCEL:
- case DocReaderAction.ERROR:
- case DocReaderAction.TIMEOUT:
- result.put("results", generateDocumentReaderResults(results, context));
- break;
- case DocReaderAction.NOTIFICATION:
- result.put("results", generateDocumentReaderResultsNotification(results));
- break;
- default:
- break;
- }
- if (error != null)
- result.put("error", generateDocumentReaderException(error));
+ result.put("error", generateRegulaException(error));
} catch (JSONException ignored) {
}
-
return result;
}
- static JSONObject generateRfidNotificationCompletion(int notification, Bundle value) {
+ static JSONObject generateRegulaException(RegulaException input) {
JSONObject result = new JSONObject();
+ if (input == null) return null;
try {
- result.put("notification", notification);
- if (value != null)
- result.put("value", value.get(RFID_EXTRA_ERROR_CODE));
- } catch (JSONException ignored) {
+ result.put("errorCode", input.getErrorCode());
+ result.put("message", input.getMessage());
+ } catch (JSONException e) {
+ e.printStackTrace();
}
-
return result;
}
@@ -238,12 +81,6 @@ static JSONObject generatePACertificateCompletion(byte[] serialNumber, PAResourc
return result;
}
- static JSONObject generateDocumentReaderResultsNotification(DocumentReaderResults results) throws JSONException {
- if (results != null && results.documentReaderNotification != null)
- return new JSONObject().put("documentReaderNotification", generateDocumentReaderNotification(results.documentReaderNotification));
- return new JSONObject();
- }
-
static TccParams TCCParamsFromJSON(JSONObject input) {
TccParams result = new TccParams();
try {
@@ -263,6 +100,28 @@ static TccParams TCCParamsFromJSON(JSONObject input) {
return result;
}
+ static ImageInputData ImageInputDataFromJSON(JSONObject input) {
+ if (input == null) return null;
+ try {
+ Bitmap image;
+ int light = 6;
+ int pageIndex = 0;
+
+ if (input.has("image"))
+ image = bitmapFromBase64(input.getString("image"));
+ else return null;
+ if (input.has("light"))
+ pageIndex = input.getInt("light");
+ if (input.has("pageIndex"))
+ pageIndex = input.getInt("pageIndex");
+ return new ImageInputData(image, light, pageIndex);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
static DocReaderConfig DocReaderConfigFromJSON(JSONObject input) {
DocReaderConfig result;
byte[] license;
@@ -287,34 +146,89 @@ static DocReaderConfig DocReaderConfigFromJSON(JSONObject input) {
return null;
}
- static ImageInputData ImageInputDataFromJSON(JSONObject input) {
- ImageInputData result = null;
- int pageIndex = 0;
- int light = 6;
- int width = 0;
- int height = 0;
- Bitmap bitmap;
- byte[] imgBytes;
+ static ScannerConfig ScannerConfigFromJSON(JSONObject input) {
+ if (!input.has("scenario") && !input.has("onlineProcessingConfig")) return null;
+ try {
+ ScannerConfig.Builder builder;
+ if (input.has("scenario"))
+ builder = new ScannerConfig.Builder(input.getString("scenario"));
+ else
+ builder = new ScannerConfig.Builder(RegulaConfig.OnlineProcessingConfigFromJSON(input.getJSONObject("onlineProcessingConfig")));
+ if (input.has("onlineProcessingConfig"))
+ builder.setOnlineProcessingConfig(RegulaConfig.OnlineProcessingConfigFromJSON(input.getJSONObject("onlineProcessingConfig")));
+ if (input.has("livePortrait"))
+ builder.setLivePortrait(bitmapFromBase64(input.getString("livePortrait")));
+ if (input.has("extPortrait"))
+ builder.setExtPortrait(bitmapFromBase64(input.getString("extPortrait")));
+ if (input.has("cameraId"))
+ builder.setCameraId(input.getInt("cameraId"));
+ return builder.build();
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+ static RecognizeConfig RecognizeConfigFromJSON(JSONObject input) {
+ if (!input.has("scenario") && !input.has("onlineProcessingConfig")) return null;
+ if (!input.has("image") && !input.has("images") && !input.has("imageInputData")) return null;
try {
- if (input.has("pageIndex"))
- pageIndex = input.optInt("pageIndex");
- if (input.has("light"))
- pageIndex = input.optInt("light");
- if (input.has("type"))
- pageIndex = input.optInt("type");
- if (input.has("bitmap")) {
- bitmap = Helpers.bitmapFromBase64(input.getString("bitmap"));
- result = new ImageInputData(bitmap, light, pageIndex);
+ RecognizeConfig.Builder builder;
+ if (input.has("scenario"))
+ builder = new RecognizeConfig.Builder(input.getString("scenario"));
+ else
+ builder = new RecognizeConfig.Builder(RegulaConfig.OnlineProcessingConfigFromJSON(input.getJSONObject("onlineProcessingConfig")));
+ if (input.has("livePortrait"))
+ builder.setLivePortrait(bitmapFromBase64(input.getString("livePortrait")));
+ if (input.has("extPortrait"))
+ builder.setExtPortrait(bitmapFromBase64(input.getString("extPortrait")));
+ if (input.has("image"))
+ builder.setBitmap(bitmapFromBase64(input.getString("image")));
+ if (input.has("oneShotIdentification"))
+ builder.setOneShotIdentification(input.getBoolean("oneShotIdentification"));
+ if (input.has("images")) {
+ JSONArray base64Images = input.getJSONArray("images");
+ Bitmap[] images = new Bitmap[base64Images.length()];
+ for (int i = 0; i < images.length; i++)
+ images[i] = bitmapFromBase64(base64Images.getString(i));
+ builder.setBitmaps(images);
}
- if (input.has("imgBytes")) {
- JSONArray jsonArray_data = input.getJSONArray("data");
- byte[] data = new byte[jsonArray_data.length()];
- for (int i = 0; i < jsonArray_data.length(); i++)
- data[i] = (byte) jsonArray_data.get(i);
- imgBytes = data;
- result = new ImageInputData(imgBytes, width, height, light, pageIndex);
+ if (input.has("imageInputData")) {
+ JSONArray base64InputData = input.getJSONArray("imageInputData");
+ ImageInputData[] inputData = new ImageInputData[base64InputData.length()];
+ for (int i = 0; i < inputData.length; i++)
+ inputData[i] = ImageInputDataFromJSON(base64InputData.getJSONObject(i));
+ builder.setImageInputData(inputData);
}
+ return builder.build();
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ static ImageQA ImageQAFromJSON(JSONObject input) {
+ if (input == null) return null;
+ ImageQA result = new ImageQA();
+ try {
+ if (input.has("dpiThreshold"))
+ result.dpiThreshold = input.getInt("dpiThreshold");
+ if (input.has("angleThreshold"))
+ result.angleThreshold = input.getInt("angleThreshold");
+ if (input.has("focusCheck"))
+ result.focusCheck = input.getBoolean("focusCheck");
+ if (input.has("glaresCheck"))
+ result.glaresCheck = input.getBoolean("glaresCheck");
+ if (input.has("colornessCheck"))
+ result.colornessCheck = input.getBoolean("colornessCheck");
+ if (input.has("moireCheck"))
+ result.moireCheck = input.getBoolean("moireCheck");
+ if (input.has("expectedPass"))
+ result.expectedPass = intArrayFromJSON(input.getJSONArray("expectedPass"));
+ if (input.has("documentPositionIndent"))
+ result.documentPositionIndent = input.getInt("documentPositionIndent");
+ if (input.has("glaresCheckParams"))
+ result.glaresCheckParams = GlaresCheckParamsFromJSON(input.getJSONObject("glaresCheckParams"));
} catch (JSONException e) {
e.printStackTrace();
}
@@ -322,65 +236,71 @@ static ImageInputData ImageInputDataFromJSON(JSONObject input) {
return result;
}
- // To JSON
-
- static JSONObject generateDocumentReaderScenario(DocumentReaderScenario input) {
- JSONObject result = new JSONObject();
+ static ImageQA.GlaresCheckParams GlaresCheckParamsFromJSON(JSONObject input) {
if (input == null) return null;
+ ImageQA.GlaresCheckParams result = new ImageQA.GlaresCheckParams();
try {
- result.put("name", input.name);
- result.put("caption", input.caption);
- result.put("description", input.description);
+ if (input.has("imgMarginPart"))
+ result.imgMarginPart = input.getDouble("imgMarginPart");
+ if (input.has("maxGlaringPart"))
+ result.maxGlaringPart = input.getDouble("maxGlaringPart");
} catch (JSONException e) {
e.printStackTrace();
}
+
return result;
}
- static JSONObject generateCoreDetailedScenario(CoreDetailedScenario input) {
+ static JSONObject generateImageQA(ImageQA input) {
JSONObject result = new JSONObject();
if (input == null) return null;
try {
- result.put("uvTorch", input.uvTorch);
- result.put("frameOrientation", input.frameOrientation);
- result.put("faceExt", input.faceExt);
- result.put("multiPageOff", input.multiPageOff);
- result.put("seriesProcessMode", input.seriesProcessMode);
- result.put("frameKWHLandscape", input.frameKWHLandscape);
- result.put("frameKWHPortrait", input.frameKWHPortrait);
- result.put("frameKWHDoublePageSpreadPortrait", input.frameKWHDoublePageSpreadPortrait);
- result.put("frameKWHDoublePageSpreadLandscape", input.frameKWHDoublePageSpreadLandscape);
- result.put("name", input.name);
- result.put("caption", input.caption);
- result.put("description", input.description);
- result.put("manualCrop", input.manualCrop);
+ result.put("dpiThreshold", input.dpiThreshold);
+ result.put("angleThreshold", input.angleThreshold);
+ result.put("focusCheck", input.focusCheck);
+ result.put("glaresCheck", input.glaresCheck);
+ result.put("colornessCheck", input.colornessCheck);
+ result.put("moireCheck", input.moireCheck);
+ result.put("documentPositionIndent", input.documentPositionIndent);
+ result.put("expectedPass", generateIntArray(input.expectedPass));
+ result.put("glaresCheckParams", generateGlaresCheckParams(input.glaresCheckParams));
} catch (JSONException e) {
e.printStackTrace();
}
return result;
}
- static JSONObject generateFaceMetaData(FaceMetaData input) {
+ static JSONObject generateGlaresCheckParams(ImageQA.GlaresCheckParams input) {
JSONObject result = new JSONObject();
if (input == null) return null;
try {
- result.put("ID", input.ID);
- result.put("rollAngle", input.rollAngle);
- result.put("bounds", generateBounds(input.bounds));
+ result.put("imgMarginPart", input.imgMarginPart);
+ result.put("maxGlaringPart", input.maxGlaringPart);
} catch (JSONException e) {
e.printStackTrace();
}
return result;
}
- static JSONObject generateBounds(Bounds input) {
+ // To JSON
+
+ static JSONObject generateDocumentReaderScenario(DocumentReaderScenario input) {
JSONObject result = new JSONObject();
if (input == null) return null;
try {
- result.put("x", input.x);
- result.put("y", input.y);
- result.put("width", input.width);
- result.put("height", input.height);
+ result.put("name", input.name);
+ result.put("caption", input.caption);
+ result.put("description", input.description);
+ result.put("multiPageOff", input.multiPageOff);
+ result.put("frameKWHLandscape", input.frameKWHLandscape);
+ result.put("frameKWHPortrait", input.frameKWHPortrait);
+ result.put("frameKWHDoublePageSpreadPortrait", input.frameKWHDoublePageSpreadPortrait);
+ result.put("frameKWHDoublePageSpreadLandscape", input.frameKWHDoublePageSpreadLandscape);
+ result.put("frameOrientation", input.frameOrientation);
+ result.put("uvTorch", input.uvTorch);
+ result.put("faceExt", input.faceExt);
+ result.put("seriesProcessMode", input.seriesProcessMode);
+ result.put("manualCrop", input.manualCrop);
} catch (JSONException e) {
e.printStackTrace();
}
@@ -421,7 +341,7 @@ static JSONObject generateDocumentReaderGraphicField(DocumentReaderGraphicField
try {
result.put("sourceType", input.sourceType);
result.put("fieldType", input.fieldType);
- result.put("lightType", input.light);
+ result.put("light", input.light);
result.put("pageIndex", input.pageIndex);
result.put("originalPageIndex", input.originalPageIndex);
result.put("fieldName", eGraphicFieldType.getTranslation(context, input.fieldType));
@@ -593,8 +513,6 @@ static JSONObject generateDocumentReaderNotification(DocumentReaderNotification
JSONObject result = new JSONObject();
if (input == null) return null;
try {
- result.put("code", input.code);
- result.put("value", input.value);
result.put("notificationCode", input.getNotificationCode());
result.put("dataFileType", input.getDataFileType());
result.put("progress", input.getProgress());
@@ -854,6 +772,20 @@ static JSONObject generateRFIDSessionData(RFIDSessionData input) {
result.put("accessControls", generateList(input.accessControls, JSONConstructor::generateAccessControlProcedureType));
result.put("applications", generateList(input.applications, JSONConstructor::generateApplication));
result.put("securityObjects", generateList(input.securityObjects, JSONConstructor::generateSecurityObject));
+ result.put("dataGroups", generateIntArray(input.dataGroups));
+ result.put("dataFields", generateList(input.dataFields, JSONConstructor::generateDataField));
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ return result;
+ }
+
+ static JSONObject generateDataField(DataField input) {
+ JSONObject result = new JSONObject();
+ if (input == null) return null;
+ try {
+ result.put("data", input.getData());
+ result.put("fieldType", input.getFieldType());
} catch (JSONException e) {
e.printStackTrace();
}
@@ -941,18 +873,6 @@ static JSONObject generateDocumentReaderAuthenticityElement(DocumentReaderAuthen
return result;
}
- static JSONObject generateDocumentReaderException(DocumentReaderException input) {
- JSONObject result = new JSONObject();
- if (input == null) return null;
- try {
- result.put("errorCode", input.getErrorCode());
- result.put("message", input.getMessage());
- } catch (JSONException e) {
- e.printStackTrace();
- }
- return result;
- }
-
static JSONObject generatePAResourcesIssuer(PAResourcesIssuer input) {
JSONObject result = new JSONObject();
if (input == null) return null;
@@ -1089,6 +1009,7 @@ static JSONObject generateDocReaderDocumentsDatabase(DocReaderDocumentsDatabase
result.put("databaseDescription", input.databaseDescription);
result.put("countriesNumber", input.countriesNumber);
result.put("documentsNumber", input.documentsNumber);
+ result.put("size", input.size);
} catch (JSONException e) {
e.printStackTrace();
}
diff --git a/src/android/RegulaConfig.java b/src/android/RegulaConfig.java
index cd66e83..e991815 100644
--- a/src/android/RegulaConfig.java
+++ b/src/android/RegulaConfig.java
@@ -1,31 +1,28 @@
package cordova.plugin.documentreader;
-import org.json.JSONArray;
-import org.json.JSONObject;
-import org.json.JSONException;
-
-import com.regula.documentreader.api.DocumentReader;
-import com.regula.documentreader.api.params.ImageQA;
-import com.regula.documentreader.api.params.OnlineProcessingConfig;
-import com.regula.documentreader.api.params.ParamsCustomization;
-import com.regula.documentreader.api.params.Functionality;
-import com.regula.documentreader.api.params.ProcessParam;
-import com.regula.documentreader.api.params.rfid.RFIDParams;
-import com.regula.documentreader.api.params.rfid.ReprocParams;
-import com.regula.documentreader.api.params.rfid.dg.DataGroups;
+import static cordova.plugin.documentreader.Helpers.*;
+import static cordova.plugin.documentreader.JSONConstructor.*;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Paint;
+import android.graphics.Typeface;
import android.text.SpannableString;
import android.widget.ImageView.ScaleType;
-import android.graphics.Typeface;
-import java.math.BigDecimal;
+import com.regula.documentreader.api.DocumentReader;
+import com.regula.documentreader.api.params.*;
+import com.regula.documentreader.api.params.rfid.RFIDParams;
+import com.regula.documentreader.api.params.rfid.ReprocParams;
+import com.regula.documentreader.api.params.rfid.dg.DataGroups;
-import static cordova.plugin.documentreader.Helpers.*;
-import static cordova.plugin.documentreader.JSONConstructor.*;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.math.BigDecimal;
+@SuppressWarnings("deprecation")
class RegulaConfig {
static void setConfig(DocumentReader reader, JSONObject opts, Context context) throws JSONException {
if (opts.has("customization"))
@@ -191,11 +188,8 @@ private static void setProcessParams(ProcessParam processParams, JSONObject opts
processParams.fastDocDetect = opts.getBoolean("fastDocDetect");
if (opts.has("updateOCRValidityByGlare"))
processParams.updateOCRValidityByGlare = opts.getBoolean("updateOCRValidityByGlare");
- if (opts.has("imageQA")) {
- ImageQA img = new ImageQA();
- img.fromJson(opts.getJSONObject("imageQA"));
- processParams.imageQA = img;
- }
+ if (opts.has("imageQA"))
+ processParams.imageQA = ImageQAFromJSON(opts.getJSONObject("imageQA"));
if (opts.has("forceDocFormat"))
processParams.forceDocFormat = opts.getInt("forceDocFormat");
if (opts.has("noGraphics"))
@@ -234,6 +228,12 @@ private static void setProcessParams(ProcessParam processParams, JSONObject opts
processParams.doFlipYAxis = opts.getBoolean("doFlipYAxis");
if (opts.has("rfidParams"))
processParams.rfidParams = RFIDParamsFromJSON(opts.getJSONObject("rfidParams"));
+ if (opts.has("doDetectCan"))
+ processParams.doDetectCan = opts.getBoolean("doDetectCan");
+ if (opts.has("faceApiParams"))
+ processParams.faceApiParams = FaceApiParamsFromJSON(opts.getJSONObject("faceApiParams"));
+ if (opts.has("useFaceApi"))
+ processParams.useFaceApi = opts.getBoolean("useFaceApi");
}
private static void setCustomization(ParamsCustomization customization, JSONObject opts, Context context) throws JSONException {
@@ -308,12 +308,16 @@ private static void setCustomization(ParamsCustomization customization, JSONObje
editor.setMultipageAnimationFrontImageScaleType(ScaleType.valueOf(opts.getString("multipageAnimationFrontImageScaleType")));
if (opts.has("multipageAnimationBackImageScaleType"))
editor.setMultipageAnimationBackImageScaleType(ScaleType.valueOf(opts.getString("multipageAnimationBackImageScaleType")));
+ if (opts.has("borderBackgroundImageScaleType"))
+ editor.setBorderBackgroundImageScaleType(ScaleType.valueOf(opts.getString("borderBackgroundImageScaleType")));
if (opts.has("helpAnimationImageMatrix"))
editor.setHelpAnimationImageMatrix(matrixFromFloatArray(floatArrayFromJson(opts.getJSONArray("helpAnimationImageMatrix"))));
if (opts.has("multipageAnimationFrontImageMatrix"))
editor.setMultipageAnimationFrontImageMatrix(matrixFromFloatArray(floatArrayFromJson(opts.getJSONArray("multipageAnimationFrontImageMatrix"))));
if (opts.has("multipageAnimationBackImageMatrix"))
editor.setMultipageAnimationBackImageMatrix(matrixFromFloatArray(floatArrayFromJson(opts.getJSONArray("multipageAnimationBackImageMatrix"))));
+ if (opts.has("borderBackgroundImageMatrix"))
+ editor.setBorderBackgroundImageMatrix(matrixFromFloatArray(floatArrayFromJson(opts.getJSONArray("borderBackgroundImageMatrix"))));
if (opts.has("customStatusPositionMultiplier"))
editor.setCustomStatusPositionMultiplier((float) opts.getDouble("customStatusPositionMultiplier"));
if (opts.has("cameraFrameVerticalPositionMultiplier"))
@@ -432,9 +436,11 @@ private static JSONObject getCustomization(ParamsCustomization customization) th
object.put("helpAnimationImageScaleType", customization.getHelpAnimationImageScaleType());
object.put("multipageAnimationFrontImageScaleType", customization.getMultipageAnimationFrontImageScaleType());
object.put("multipageAnimationBackImageScaleType", customization.getMultipageAnimationBackImageScaleType());
+ object.put("borderBackgroundImageScaleType", customization.getBorderBackgroundImageScaleType());
object.put("helpAnimationImageMatrix", customization.getHelpAnimationImageMatrix());
object.put("multipageAnimationFrontImageMatrix", customization.getMultipageAnimationFrontImageMatrix());
object.put("multipageAnimationBackImageMatrix", customization.getMultipageAnimationBackImageMatrix());
+ object.put("borderBackgroundImageMatrix", customization.getBorderBackgroundImageMatrix());
object.put("statusTextFont", customization.getStatusTextFont());
object.put("resultStatusTextFont", customization.getResultStatusTextFont());
object.put("statusPositionMultiplier", customization.getStatusPositionMultiplier());
@@ -475,7 +481,6 @@ private static JSONObject getProcessParams(ProcessParam processParams) throws JS
object.put("documentIDList", processParams.documentIDList != null ? generateIntArray(processParams.documentIDList) : null);
object.put("barcodeTypes", processParams.doBarcodes != null ? generateArray(processParams.doBarcodes) : null);
object.put("fieldTypesFilter", processParams.fieldTypesFilter != null ? generateIntArray(processParams.fieldTypesFilter) : null);
- object.put("faceMetaData", processParams.faceMetaData != null ? generateArray(processParams.faceMetaData, JSONConstructor::generateFaceMetaData) : null);
object.put("scenario", processParams.scenario);
object.put("measureSystem", processParams.measureSystem);
object.put("uvTorchEnabled", processParams.uvTorchEnabled);
@@ -512,7 +517,7 @@ private static JSONObject getProcessParams(ProcessParam processParams) throws JS
object.put("matchTextFieldMask", processParams.matchTextFieldMask);
object.put("fastDocDetect", processParams.fastDocDetect);
object.put("updateOCRValidityByGlare", processParams.updateOCRValidityByGlare);
- object.put("imageQA", processParams.imageQA.toJsonObject());
+ object.put("imageQA", generateImageQA(processParams.imageQA));
object.put("forceDocFormat", processParams.forceDocFormat);
object.put("noGraphics", processParams.noGraphics);
object.put("documentAreaMin", processParams.documentAreaMin);
@@ -531,6 +536,8 @@ private static JSONObject getProcessParams(ProcessParam processParams) throws JS
object.put("splitNames", processParams.splitNames);
object.put("convertCase", processParams.convertCase);
object.put("doFlipYAxis", processParams.doFlipYAxis);
+ object.put("doDetectCan", processParams.doDetectCan);
+ object.put("useFaceApi", processParams.useFaceApi);
return object;
}
@@ -695,6 +702,8 @@ private static ReprocParams ReprocParamsFromJSON(JSONObject input) {
else return null;
if (input.has("failIfNoService"))
result.setFailIfNoService(input.getBoolean("failIfNoService"));
+ if (input.has("httpHeaders"))
+ result.setHttpHeaders(stringMapFromJson(input.getJSONObject("httpHeaders")));
return result;
} catch (JSONException e) {
e.printStackTrace();
@@ -702,7 +711,8 @@ private static ReprocParams ReprocParamsFromJSON(JSONObject input) {
return null;
}
- private static OnlineProcessingConfig OnlineProcessingConfigFromJSON(JSONObject input) {
+ static OnlineProcessingConfig OnlineProcessingConfigFromJSON(JSONObject input) {
+ if(input == null) return null;
try {
OnlineProcessingConfig.Builder builder;
if (input.has("mode"))
@@ -731,8 +741,86 @@ private static RFIDParams RFIDParamsFromJSON(JSONObject input) {
RFIDParams result = new RFIDParams();
if (input.has("paIgnoreNotificationCodes"))
- result.setPaIgnoreNotificationCodes(JSONConstructor.intArrayFromJSON(input.getJSONArray("paIgnoreNotificationCodes")));
+ result.setPaIgnoreNotificationCodes(intArrayFromJSON(input.getJSONArray("paIgnoreNotificationCodes")));
+
+ return result;
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ static FaceApiParams FaceApiParamsFromJSON(JSONObject input) {
+ try {
+ FaceApiParams result = new FaceApiParams();
+ String url;
+ if (input.has("url") && !input.isNull("url")) {
+ url = input.getString("url");
+ result.setUrl(url);
+ }
+ String mode;
+ if (input.has("mode") && !input.isNull("mode")) {
+ mode = input.getString("mode");
+ result.setMode(mode);
+ }
+ FaceApiParams.Search search;
+ if (input.has("searchParams") && !input.isNull("searchParams")) {
+ search = SearchFromJSON(input.getJSONObject("searchParams"));
+ result.setSearch(search);
+ }
+ int threshold;
+ if (input.has("threshold") && !input.isNull("threshold")) {
+ threshold = input.getInt("threshold");
+ result.setThreshold(threshold);
+ }
+ int serviceTimeout;
+ if (input.has("serviceTimeout") && !input.isNull("serviceTimeout")) {
+ serviceTimeout = input.getInt("serviceTimeout");
+ result.setServiceTimeout(serviceTimeout);
+ }
+ String proxy;
+ if (input.has("proxy") && !input.isNull("proxy")) {
+ proxy = input.getString("proxy");
+ result.setProxy(proxy);
+ }
+ String proxyUserPwd;
+ if (input.has("proxyPassword") && !input.isNull("proxyPassword")) {
+ proxyUserPwd = input.getString("proxyPassword");
+ result.setProxyUserPwd(proxyUserPwd);
+ }
+ int proxyType;
+ if (input.has("proxyType") && !input.isNull("proxyType")) {
+ proxyType = input.getInt("proxyType");
+ result.setProxyType(proxyType);
+ }
+ return result;
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+ static FaceApiParams.Search SearchFromJSON(JSONObject input) {
+ try {
+ FaceApiParams.Search result = new FaceApiParams.Search();
+ int limit;
+ if (input.has("limit") && !input.isNull("limit")) {
+ limit = input.getInt("limit");
+ result.setLimit(limit);
+ }
+ double threshold;
+ if (input.has("threshold") && !input.isNull("threshold")) {
+ threshold = input.getDouble("threshold");
+ result.setThreshold((float) threshold);
+ }
+ int[] groupIds;
+ if (input.has("groupIds") && !input.isNull("groupIds")) {
+ JSONArray jsonArray_groupIds = input.getJSONArray("groupIds");
+ groupIds = new int[jsonArray_groupIds.length()];
+ for (int i = 0; i < jsonArray_groupIds.length(); i++)
+ groupIds[i] = jsonArray_groupIds.getInt(i);
+ result.setGroupIds(groupIds);
+ }
return result;
} catch (JSONException e) {
e.printStackTrace();
diff --git a/src/android/build.gradle b/src/android/build.gradle
index bd90f3f..6e2d542 100644
--- a/src/android/build.gradle
+++ b/src/android/build.gradle
@@ -1,5 +1,13 @@
apply plugin: 'kotlin-android'
+android {
+ compileSdkVersion 33
+
+ defaultConfig {
+ targetSdkVersion 33
+ }
+}
+
repositories {
maven {
url "https://maven.regulaforensics.com/RegulaDocumentReader"
@@ -8,7 +16,7 @@ repositories {
dependencies {
//noinspection GradleDependency
- implementation ('com.regula.documentreader:api:6.8.8742'){
+ implementation ('com.regula.documentreader:api:6.9.9346'){
transitive = true
}
}
diff --git a/src/ios/RGLWDocumentReader.m b/src/ios/RGLWDocumentReader.m
index 4d143f7..888c872 100644
--- a/src/ios/RGLWDocumentReader.m
+++ b/src/ios/RGLWDocumentReader.m
@@ -6,7 +6,10 @@
RGLRFIDCertificatesCallback RGLWTaCertificateCompletion;
RGLWRFIDSignatureCallback RGLWTaSignatureCompletion;
-NSString* RGLWRfidNotificationCompletionEvent = @"rfidNotificationCompletionEvent";
+NSString* RGLWRfidOnProgressEvent = @"rfidNotificationCompletionEvent";
+NSString* RGLWRfidOnChipDetectedEvent = @"rfidOnChipDetectedEvent";
+NSString* RGLWRfidOnRetryReadChipEvent = @"rfidOnRetryReadChipEvent";
+
NSString* RGLWPaCertificateCompletionEvent = @"paCertificateCompletionEvent";
NSString* RGLWTaCertificateCompletionEvent = @"taCertificateCompletionEvent";
NSString* RGLWTaSignatureCompletionEvent = @"taSignatureCompletionEvent";
@@ -28,11 +31,13 @@ - (void)onRequestTASignatureWithChallenge:(RGLTAChallenge *)challenge callback:(
}
- (void)didChipConnected {
- [RGLWPlugin sendEvent:[NSString stringWithFormat:@"%@%@", RGLWRfidNotificationCompletionEvent, [RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateRfidNotificationCompletion:1]]] :RGLWDocumentReader.command.callbackId]; // int RFID_EVENT_CHIP_DETECTED = 1;
+ [RGLWPlugin sendEvent:[NSString stringWithFormat:@"%@%@", RGLWRfidOnChipDetectedEvent, @""] :RGLWDocumentReader.command.callbackId];
}
- (void)didReceivedError:(RGLRFIDErrorCodes)errorCode {
- [RGLWPlugin sendEvent:[NSString stringWithFormat:@"%@%@", RGLWRfidNotificationCompletionEvent, [RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateRfidNotificationCompletionWithError:2:errorCode]]] :RGLWDocumentReader.command.callbackId]; // int RFID_EVENT_READING_ERROR = 2;
+ NSMutableDictionary *result = [NSMutableDictionary new];
+ result[@"errorCode"] = [NSNumber numberWithInteger:errorCode];
+ [RGLWPlugin sendEvent:[NSString stringWithFormat:@"%@%@", RGLWRfidOnRetryReadChipEvent, [RGLWJSONConstructor dictToString:result]] :RGLWDocumentReader.command.callbackId];
}
@end
@@ -71,21 +76,21 @@ - (void) sendEvent:(NSString*)data :(NSString*)callbackId {
-(RGLDocumentReaderCompletion _Nonnull)getCompletion {
NSString* callbackId = RGLWDocumentReader.command.callbackId;
return ^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {
- [self sendEvent:[RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateCompletion:[RGLWJSONConstructor generateDocReaderAction: action] :results :error :nil]] :callbackId];
+ [self sendEvent:[RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateCompletion:[RGLWJSONConstructor generateDocReaderAction: action] :results :error]] :callbackId];
};
}
-(RGLRFIDProcessCompletion _Nonnull)getRFIDCompletion {
NSString* callbackId = RGLWDocumentReader.command.callbackId;
return ^(RGLRFIDCompleteAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error, RGLRFIDErrorCodes errorCode) {
- [self sendEvent:[RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateCompletion:[RGLWJSONConstructor generateRFIDCompleteAction: action] :results :error :nil]] :callbackId];
+ [self sendEvent:[RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateCompletion:[RGLWJSONConstructor generateRFIDCompleteAction: action] :results :error]] :callbackId];
};
}
-(RGLRFIDNotificationCallback _Nonnull)getRFIDNotificationCallback {
NSString* callbackId = RGLWDocumentReader.command.callbackId;
- return ^(RGLRFIDNotificationAction notificationAction, RGLRFIDNotify* _Nullable notify) {
- [self sendEvent:[RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateCompletion:[RGLWJSONConstructor generateRFIDNotificationAction:notificationAction] :nil :nil :notify]] :callbackId];
+ return ^(RGLRFIDNotificationAction action, RGLRFIDNotify* _Nullable notification) {
+ [self sendEvent:[RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateDocumentReaderNotification:notification]] :callbackId];
};
}
@@ -115,11 +120,13 @@ - (void)onRequestTASignatureWithChallenge:(RGLTAChallenge *)challenge callback:(
}
- (void)didChipConnected {
- [RGLWPlugin sendEvent:[NSString stringWithFormat:@"%@%@", RGLWRfidNotificationCompletionEvent, [RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateRfidNotificationCompletion:1]]] :RGLWDocumentReader.command.callbackId]; // int RFID_EVENT_CHIP_DETECTED = 1;
+ [RGLWPlugin sendEvent:[NSString stringWithFormat:@"%@%@", RGLWRfidOnChipDetectedEvent, @""] :RGLWDocumentReader.command.callbackId];
}
- (void)didReceivedError:(RGLRFIDErrorCodes)errorCode {
- [RGLWPlugin sendEvent:[NSString stringWithFormat:@"%@%@", RGLWRfidNotificationCompletionEvent, [RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateRfidNotificationCompletionWithError:2:errorCode]]] :RGLWDocumentReader.command.callbackId]; // int RFID_EVENT_READING_ERROR = 2;
+ NSMutableDictionary *result = [NSMutableDictionary new];
+ result[@"errorCode"] = [NSNumber numberWithInteger:errorCode];
+ [RGLWPlugin sendEvent:[NSString stringWithFormat:@"%@%@", RGLWRfidOnRetryReadChipEvent, [RGLWJSONConstructor dictToString:result]] :RGLWDocumentReader.command.callbackId];
}
- (void)onCustomButtonTappedWithTag:(NSInteger)tag {
@@ -234,8 +241,10 @@ - (void) exec:(CDVInvokedUrlCommand*)command {
[self setTag :[args objectAtIndex:0] :successCallback :errorCallback];
else if([action isEqualToString:@"checkDatabaseUpdate"])
[self checkDatabaseUpdate :[args objectAtIndex:0] :successCallback :errorCallback];
- else if([action isEqualToString:@"getScenario"])
- [self getScenario :[args objectAtIndex:0] :successCallback :errorCallback];
+ else if([action isEqualToString:@"scan"])
+ [self scan :[args objectAtIndex:0] :successCallback :errorCallback];
+ else if([action isEqualToString:@"recognize"])
+ [self recognize :[args objectAtIndex:0] :successCallback :errorCallback];
else if([action isEqualToString:@"recognizeImages"])
[self recognizeImages :[args objectAtIndex:0] :successCallback :errorCallback];
else if([action isEqualToString:@"showScannerWithCameraID"])
@@ -276,8 +285,6 @@ - (void) exec:(CDVInvokedUrlCommand*)command {
[self recognizeImageWithCameraMode :[args objectAtIndex:0] :[args objectAtIndex:1] :successCallback :errorCallback];
else if([action isEqualToString:@"recognizeImagesWithImageInputs"])
[self recognizeImagesWithImageInputs :[args objectAtIndex:0] :successCallback :errorCallback];
- else if([action isEqualToString:@"setOnCustomButtonTappedListener"])
- [self setOnCustomButtonTappedListener :successCallback :errorCallback];
else if([action isEqualToString:@"setLanguage"])
[self setLanguage :[args objectAtIndex:0] :successCallback :errorCallback];
else if([action isEqualToString:@"textFieldValueByType"])
@@ -373,11 +380,6 @@ - (void) getLicenseMessage:(RGLWCallback)successCallback :(RGLWCallback)errorCal
[self result:@"getLicenseMessage() is an android-only method" :successCallback];
}
-- (void) setOnCustomButtonTappedListener:(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
- RGLDocReader.shared.customization.actionDelegate = self;
- [self result:@"" :successCallback];
-}
-
- (void) setLanguage:(NSString*)language :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
RGLDocReader.shared.localizationHandler = ^NSString * _Nullable(NSString * _Nonnull localizationKey) {
NSString *result = NSLocalizedStringFromTable(localizationKey, language, @"");
@@ -445,7 +447,7 @@ - (void) recognizeData:(NSString*)data :(RGLWCallback)successCallback :(RGLWCall
- (void) recognizeImages:(NSArray*)input :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
NSMutableArray* images = [[NSMutableArray alloc] init];
for(__strong NSMutableString* base64 in input)
- [images addObject:[UIImage imageWithData:[[NSData alloc]initWithBase64EncodedString:base64 options:NSDataBase64DecodingIgnoreUnknownCharacters]]];
+ [images addObject:[RGLWJSONConstructor imageWithBase64:base64]];
dispatch_async(dispatch_get_main_queue(), ^{
[RGLDocReader.shared recognizeImages:images completion:[self getCompletion]];
});
@@ -467,7 +469,7 @@ - (void) recognizeImageWithCameraMode:(NSMutableString*)base64 :(BOOL)cameraMode
- (void) recognizeImageWith:(NSMutableString*)base64 :(BOOL)cameraMode :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
dispatch_async(dispatch_get_main_queue(), ^{
- [RGLDocReader.shared recognizeImage:[UIImage imageWithData:[[NSData alloc]initWithBase64EncodedString:base64 options:NSDataBase64DecodingIgnoreUnknownCharacters]] cameraMode:cameraMode completion:[self getCompletion]];
+ [RGLDocReader.shared recognizeImage:[RGLWJSONConstructor imageWithBase64:base64] cameraMode:cameraMode completion:[self getCompletion]];
});
}
@@ -550,6 +552,21 @@ - (void) startNewPage:(RGLWCallback)successCallback :(RGLWCallback)errorCallback
[self result:@"" :successCallback];
}
+- (void) scan:(NSDictionary*)config :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
+ dispatch_async(dispatch_get_main_queue(), ^{
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
+ #pragma clang diagnostic pop
+ UIViewController *currentViewController = [[[UIApplication sharedApplication] keyWindow] rootViewController];
+ [RGLDocReader.shared showScannerFromPresenter:currentViewController config:[RGLWJSONConstructor RGLScannerConfigFromJson:config] completion:[self getCompletion]];
+ });
+}
+
+- (void) recognize:(NSDictionary*)config :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
+ UIViewController *currentViewController = [[[UIApplication sharedApplication] keyWindow] rootViewController];
+ [RGLDocReader.shared recognizeImageFromPresenter:currentViewController config:[RGLWJSONConstructor RGLRecognizeConfigFromJson:config] completion:[self getCompletion]];
+}
+
- (void) getDocumentReaderIsReady:(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
[self result:[RGLDocReader.shared isDocumentReaderIsReady] ? @YES : @NO :successCallback];
}
@@ -651,18 +668,6 @@ - (void) getSessionLogFolder:(RGLWCallback)successCallback :(RGLWCallback)errorC
[self result:RGLDocReader.shared.processParams.sessionLogFolder :successCallback];
}
-- (void) getScenario:(NSString*)scenarioID :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
- BOOL success = false;
- for(RGLScenario *scenario in RGLDocReader.shared.availableScenarios)
- if([scenario.identifier isEqualToString:scenarioID]){
- [self result:[RGLWJSONConstructor dictToString:[RGLWJSONConstructor generateRGLScenario:scenario]] :successCallback];
- success = true;
- break;
- }
- if(!success)
- [self result:@"Scenario unavailable" :errorCallback];
-}
-
- (void) providePACertificates:(NSArray*)input :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
if(RGLWPaCertificateCompletion == nil){
[self result:@"paCertificateCompletion is nil" :errorCallback];
@@ -796,22 +801,22 @@ - (void) graphicFieldByTypeSourcePageIndexLight:(NSString*)rawResult :(NSNumber*
- (void) graphicFieldImageByType:(NSString*)rawResult :(NSNumber*)fieldType :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
RGLDocumentReaderResults* results = [RGLDocumentReaderResults initWithRawString:rawResult];
- [self result:[UIImageJPEGRepresentation([results getGraphicFieldImageByType:[fieldType integerValue]], 1.0) base64EncodedStringWithOptions:0] :successCallback];
+ [self result:[RGLWJSONConstructor base64WithImage:[results getGraphicFieldImageByType:[fieldType integerValue]]] :successCallback];
}
- (void) graphicFieldImageByTypeSource:(NSString*)rawResult :(NSNumber*)fieldType :(NSNumber*)source :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
RGLDocumentReaderResults* results = [RGLDocumentReaderResults initWithRawString:rawResult];
- [self result:[UIImageJPEGRepresentation([results getGraphicFieldImageByType:[fieldType integerValue] source:[source integerValue]], 1.0) base64EncodedStringWithOptions:0] :successCallback];
+ [self result:[RGLWJSONConstructor base64WithImage:[results getGraphicFieldImageByType:[fieldType integerValue] source:[source integerValue]]] :successCallback];
}
- (void) graphicFieldImageByTypeSourcePageIndex:(NSString*)rawResult :(NSNumber*)fieldType :(NSNumber*)source :(NSNumber*)pageIndex :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
RGLDocumentReaderResults* results = [RGLDocumentReaderResults initWithRawString:rawResult];
- [self result:[UIImageJPEGRepresentation([results getGraphicFieldImageByType:[fieldType integerValue] source:[source integerValue] pageIndex:[pageIndex integerValue]], 1.0) base64EncodedStringWithOptions:0] :successCallback];
+ [self result:[RGLWJSONConstructor base64WithImage:[results getGraphicFieldImageByType:[fieldType integerValue] source:[source integerValue] pageIndex:[pageIndex integerValue]]] :successCallback];
}
- (void) graphicFieldImageByTypeSourcePageIndexLight:(NSString*)rawResult :(NSNumber*)fieldType :(NSNumber*)source :(NSNumber*)pageIndex :(NSNumber*)light :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
RGLDocumentReaderResults* results = [RGLDocumentReaderResults initWithRawString:rawResult];
- [self result:[UIImageJPEGRepresentation([results getGraphicFieldImageByType:[fieldType integerValue] source:[source integerValue] pageIndex:[pageIndex integerValue] light:[light integerValue]], 1.0) base64EncodedStringWithOptions:0] :successCallback];
+ [self result:[RGLWJSONConstructor base64WithImage:[results getGraphicFieldImageByType:[fieldType integerValue] source:[source integerValue] pageIndex:[pageIndex integerValue] light:[light integerValue]]] :successCallback];
}
- (void) containers:(NSString*)rawResult :(NSArray*)resultType :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
@@ -828,6 +833,7 @@ -(RGLDocumentReaderInitializationCompletion)getInitCompletion:(RGLWCallback)succ
return ^(BOOL successful, NSError * _Nullable error ) {
if (successful){
[RGLDocReader shared].functionality.recordScanningProcessDelegate = self;
+ RGLDocReader.shared.customization.actionDelegate = self;
[self result:@"init complete" :successCallback];
}else
[self result:[NSString stringWithFormat:@"%@/%@", @"init failed: ", error.description] :errorCallback];
diff --git a/src/ios/RGLWJSONConstructor.h b/src/ios/RGLWJSONConstructor.h
index 5539739..5975a65 100644
--- a/src/ios/RGLWJSONConstructor.h
+++ b/src/ios/RGLWJSONConstructor.h
@@ -2,27 +2,29 @@
#define RGLWJSONConstructor_h
#import
+#import "RGLWRegulaConfig.h"
@import CoreGraphics;
@import UIKit;
@interface RGLWJSONConstructor : NSObject
+(NSString* _Nonnull)dictToString:(NSMutableDictionary* _Nonnull)input;
+(NSString* _Nonnull)arrayToString:(NSMutableArray* _Nonnull)input;
-+(NSMutableDictionary* _Nonnull)generateRfidNotificationCompletion:(NSInteger)notification;
-+(NSMutableDictionary* _Nonnull)generateRfidNotificationCompletionWithError:(NSInteger)notification : (NSInteger)value;
+(NSMutableDictionary* _Nonnull)generateNSDictionary:(NSDictionary* _Nullable)input;
++(UIImage* _Nullable)imageWithBase64:(NSString* _Nullable)input;
++(NSString* _Nullable)base64WithImage:(UIImage* _Nullable)input;
+(RGLPKDCertificate* _Nullable)RGLPKDCertificateFromJson:(NSDictionary* _Nullable) dict;
+(RGLTCCParams* _Nonnull)RGLTCCParamsFromJson:(NSDictionary* _Nonnull)input;
+(RGLConfig* _Nullable)RGLConfigFromJson:(NSDictionary* _Nonnull)input;
++(RGLScannerConfig* _Nullable)RGLScannerConfigFromJson:(NSDictionary* _Nonnull)input;
++(RGLRecognizeConfig* _Nullable)RGLRecognizeConfigFromJson:(NSDictionary* _Nonnull)input;
+(RGLImageInput* _Nonnull)RGLImageInputFromJson:(NSDictionary* _Nonnull)input;
+(NSInteger)generateDocReaderAction:(RGLDocReaderAction)action;
+(NSInteger)generateRFIDCompleteAction:(RGLRFIDCompleteAction)action;
-+(NSInteger)generateRFIDNotificationAction:(RGLRFIDNotificationAction)action;
-+(NSMutableDictionary* _Nullable)generateCompletion:(NSInteger)action :(RGLDocumentReaderResults*_Nullable)results :(NSError*_Nullable)error :(RGLRFIDNotify*_Nullable)notify;
++(NSMutableDictionary* _Nullable)generateCompletion:(NSInteger)action :(RGLDocumentReaderResults*_Nullable)results :(NSError*_Nullable)error;
+(NSMutableDictionary* _Nonnull)generateVideoEncoderCompletion:(NSURL* _Nullable)input :(NSError* _Nullable)error;
+(NSString*_Nonnull)generateNSData:(NSData *_Nullable)input;
+(NSMutableDictionary* _Nonnull)generatePACertificateCompletion:(NSData *_Nullable)serialNumber :(RGLPAResourcesIssuer *_Nullable)issuer;
-+(NSMutableDictionary* _Nonnull)generateRGLRFIDNotify:(RGLRFIDNotify* _Nullable)input;
++(NSMutableDictionary* _Nonnull)generateDocumentReaderNotification:(RGLRFIDNotify* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLDocumentReaderResults:(RGLDocumentReaderResults* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLPosition:(RGLPosition* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLDocumentReaderBarcodeResult:(RGLDocumentReaderBarcodeResult* _Nullable)input;
@@ -41,6 +43,7 @@
+(NSMutableDictionary* _Nonnull)generateRGLDocumentReaderDocumentType:(RGLDocumentReaderDocumentType* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLScenario:(RGLScenario* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLRFIDSessionData:(RGLRFIDSessionData* _Nullable)input;
++(NSMutableDictionary* _Nonnull)generateRGLDataField:(RGLDataField* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLCardProperties:(RGLCardProperties* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLRFIDSessionDataStatus:(RGLRFIDSessionDataStatus* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLAccessControlProcedureType:(RGLAccessControlProcedureType* _Nullable)input;
@@ -57,7 +60,6 @@
+(NSMutableDictionary* _Nonnull)generateRGLExtension:(RGLExtension* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLCertificateChain:(RGLCertificateChain* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLValidity:(RGLValidity* _Nullable)input;
-+(NSMutableDictionary* _Nonnull)generateNSError:(NSError* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLPAResourcesIssuer:(RGLPAResourcesIssuer* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLPAAttribute:(RGLPAAttribute* _Nullable)input;
+(NSMutableDictionary* _Nonnull)generateRGLTAChallenge:(RGLTAChallenge* _Nullable)input;
diff --git a/src/ios/RGLWJSONConstructor.m b/src/ios/RGLWJSONConstructor.m
index 834e2b8..f112497 100644
--- a/src/ios/RGLWJSONConstructor.m
+++ b/src/ios/RGLWJSONConstructor.m
@@ -12,6 +12,16 @@ +(NSString*)arrayToString:(NSMutableArray*)input {
return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:input options:NSJSONWritingPrettyPrinted error:nil] encoding:NSUTF8StringEncoding];
}
++(NSMutableDictionary* _Nonnull)generateNSError:(NSError* _Nullable)input {
+ NSMutableDictionary *result = [NSMutableDictionary new];
+ if(input == nil) return result;
+
+ result[@"errorCode"] = [NSNumber numberWithInteger:input.code];
+ result[@"message"] = input.localizedDescription;
+
+ return result;
+}
+
+(NSMutableDictionary* _Nonnull)generateNSDictionary:(NSDictionary* _Nullable)input {
NSMutableDictionary *result = [NSMutableDictionary new];
if(input == nil) return result;
@@ -22,6 +32,16 @@ +(NSMutableDictionary* _Nonnull)generateNSDictionary:(NSDictionary* images = [[NSMutableArray alloc] init];
+ for(NSMutableString* base64 in [input valueForKey:@"images"])
+ [images addObject:[RGLWJSONConstructor imageWithBase64:base64]];
+ config = [config initWithImages:images];
+ } else if([input valueForKey:@"imageInputs"] != nil){
+ NSMutableArray* images = [[NSMutableArray alloc] init];
+ for(NSDictionary* image in [input valueForKey:@"imageInputs"])
+ [images addObject:[RGLWJSONConstructor RGLImageInputFromJson: image]];
+ config = [config initWithImageInputs:images];
+ }
+
+ if([input valueForKey:@"scenario"] != nil)
+ config.scenario = [input valueForKey:@"scenario"];
+ if([input valueForKey:@"onlineProcessingConfig"] != nil)
+ config.onlineProcessingConfig = [RGLWRegulaConfig RGLOnlineProcessingConfigFromJSON:[input valueForKey:@"onlineProcessingConfig"]];
+ if([input valueForKey:@"livePortrait"] != nil)
+ config.livePortrait = [self imageWithBase64:[input valueForKey:@"livePortrait"]];
+ if([input valueForKey:@"extPortrait"] != nil)
+ config.extPortrait = [self imageWithBase64:[input valueForKey:@"extPortrait"]];
+ if([input valueForKey:@"oneShotIdentification"] != nil)
+ config.oneShotIdentification = [input valueForKey:@"oneShotIdentification"];
+
+ return config;
+}
+(RGLImageInput*)RGLImageInputFromJson:(NSDictionary*)input {
NSInteger pageIndex = 0;
@@ -68,11 +129,9 @@ +(RGLImageInput*)RGLImageInputFromJson:(NSDictionary*)input {
pageIndex = [[input valueForKey:@"pageIndex"] integerValue];
NSInteger light = 6;
if([input valueForKey:@"light"] != nil)
- pageIndex = [[input valueForKey:@"light"] integerValue];
- if([input valueForKey:@"bitmap"] != nil){
- UIImage* image = [UIImage imageWithData:[[NSData alloc]initWithBase64EncodedString:[input valueForKey:@"bitmap"] options:NSDataBase64DecodingIgnoreUnknownCharacters]];
- return [[RGLImageInput alloc] initWithImage:image light:light pageIndex:pageIndex];
- }
+ light = [[input valueForKey:@"light"] integerValue];
+ if([input valueForKey:@"image"] != nil)
+ return [[RGLImageInput alloc] initWithImage:[self imageWithBase64:[input valueForKey:@"image"]] light:light pageIndex:pageIndex];
return nil;
}
@@ -113,23 +172,6 @@ +(NSMutableDictionary*)generateVideoEncoderCompletion:(NSURL*)input :(NSError*)e
return result;
}
-+(NSMutableDictionary*)generateRfidNotificationCompletion:(NSInteger)notification {
- NSMutableDictionary *result = [NSMutableDictionary new];
-
- result[@"notification"] = [NSNumber numberWithInteger:notification];
-
- return result;
-}
-
-+(NSMutableDictionary*)generateRfidNotificationCompletionWithError:(NSInteger)notification :(NSInteger)value {
- NSMutableDictionary *result = [NSMutableDictionary new];
-
- result[@"notification"] = [NSNumber numberWithInteger:notification];
- result[@"value"] = [NSNumber numberWithInteger:value];
-
- return result;
-}
-
+(NSInteger)generateDocReaderAction:(RGLDocReaderAction)input {
NSInteger result = -1;
switch (input) {
@@ -168,7 +210,7 @@ +(NSInteger)generateRFIDCompleteAction:(RGLRFIDCompleteAction)input {
NSInteger result = 0;
switch (input) {
case RGLRFIDCompleteActionComplete:
- result = 999;
+ result = 0;
break;
case RGLRFIDCompleteActionError:
result = 4;
@@ -186,51 +228,13 @@ +(NSInteger)generateRFIDCompleteAction:(RGLRFIDCompleteAction)input {
return result;
}
-+(NSInteger)generateRFIDNotificationAction:(RGLRFIDNotificationAction)input {
- return 101;
-}
-
-+(NSMutableDictionary*)generateCompletion:(NSInteger)action :(RGLDocumentReaderResults*)results :(NSError*)error :(RGLRFIDNotify*)notify {
++(NSMutableDictionary*)generateCompletion:(NSInteger)action :(RGLDocumentReaderResults*)results :(NSError*)error {
NSMutableDictionary *result = [NSMutableDictionary new];
- switch (action) {
- case 0:
- case 2:
- case 3:
- case 4:
- case 6:
- result[@"results"] = [self generateRGLDocumentReaderResults:results];
- break;
- case 101:
- result[@"results"] = [self generateResultsWithNotification:[self generateRGLRFIDNotify:notify]];
- break;
- case 999:
- result[@"results"] = [self generateResultsWithRFID :results :1];
- action = 0;
- break;
- default:
- break;
- }
-
+ if(action == 0 || action == 2 || action == 3 || action == 4 || action == 6)
+ result[@"results"] = [self generateRGLDocumentReaderResults:results];
result[@"action"] = [NSNumber numberWithInteger:action];
- if(error != nil)
- result[@"error"] = [self generateNSError:error];
-
- return result;
-}
-
-+(NSMutableDictionary*)generateResultsWithNotification:(NSMutableDictionary*)input {
- NSMutableDictionary *result = [NSMutableDictionary new];
-
- result[@"documentReaderNotification"] = input;
-
- return result;
-}
-
-+(NSMutableDictionary*)generateResultsWithRFID:(RGLDocumentReaderResults*)results :(NSInteger)input {
- NSMutableDictionary *result = [self generateRGLDocumentReaderResults:results];
-
- result[@"rfidResult"] = [NSNumber numberWithInteger:input];
+ result[@"error"] = [self generateNSError:error];
return result;
}
@@ -271,15 +275,13 @@ +(NSMutableDictionary* _Nonnull)generatePACertificateCompletion:(NSData *)serial
return result;
}
-+(NSMutableDictionary* _Nonnull)generateRGLRFIDNotify:(RGLRFIDNotify* _Nullable)input {
++(NSMutableDictionary* _Nonnull)generateDocumentReaderNotification:(RGLRFIDNotify* _Nullable)input{
NSMutableDictionary *result = [NSMutableDictionary new];
if(input == nil) return result;
- result[@"code"] = @(input.code);
- result[@"value"] = @(input.value);
result[@"notificationCode"] = @(input.code & 0xFFFF0000);
result[@"dataFileType"] = @(input.code & 0x0000FFFF);
-// result[@"progress"] = @(input.value & 0xFFFFFFF0);
+ result[@"progress"] = @((int)input.value & 0xFFFFFFF0);
return result;
}
@@ -506,7 +508,7 @@ +(NSMutableDictionary* _Nonnull)generateRGLDocumentReaderGraphicField:(RGLDocume
result[@"fieldName"] = input.fieldName;
result[@"fieldRect"] = [self generateCGRect:input.boundRect];
result[@"value"] = [UIImageJPEGRepresentation(input.value, 1.0) base64EncodedStringWithOptions:0];
- result[@"lightType"] = @(input.lightType);
+ result[@"light"] = @(input.lightType);
result[@"lightName"] = input.lightName;
result[@"pageIndex"] = @(input.pageIndex);
result[@"originalPageIndex"] = @(input.originalPageIndex);
@@ -679,6 +681,30 @@ +(NSMutableDictionary* _Nonnull)generateRGLRFIDSessionData:(RGLRFIDSessionData*
result[@"status"] = @(input.status);
result[@"extLeSupport"] = @(input.extLeSupport);
result[@"processTime"] = @(input.processTime);
+ if(input.dataGroups != nil){
+ NSMutableArray *array = [NSMutableArray new];
+ for(NSNumber* item in input.dataGroups)
+ if(item != nil)
+ [array addObject:item];
+ result[@"dataGroups"] = array;
+ }
+ if(input.dataFields != nil){
+ NSMutableArray *array = [NSMutableArray new];
+ for(RGLDataField* item in input.dataFields)
+ if(item != nil)
+ [array addObject:[self generateRGLDataField:item]];
+ result[@"dataFields"] = array;
+ }
+
+ return result;
+}
+
++(NSMutableDictionary* _Nonnull)generateRGLDataField:(RGLDataField* _Nullable)input {
+ NSMutableDictionary *result = [NSMutableDictionary new];
+ if(input == nil) return result;
+
+ result[@"data"] = input.data;
+ result[@"fieldType"] = @(input.fieldType);
return result;
}
@@ -990,16 +1016,6 @@ +(NSMutableDictionary* _Nonnull)generateRGLValidity:(RGLValidity* _Nullable)inpu
return result;
}
-+(NSMutableDictionary* _Nonnull)generateNSError:(NSError* _Nullable)input {
- NSMutableDictionary *result = [NSMutableDictionary new];
- if(input == nil) return result;
-
- result[@"code"] = @(input.code);
- result[@"localizedDescription"] = input.localizedDescription;
-
- return result;
-}
-
+(NSMutableDictionary* _Nonnull)generateRGLPAResourcesIssuer:(RGLPAResourcesIssuer* _Nullable)input {
NSMutableDictionary *result = [NSMutableDictionary new];
if(input == nil) return result;
@@ -1173,6 +1189,7 @@ +(NSMutableDictionary* _Nonnull)generateRGLDocReaderDocumentsDatabase:(RGLDocRea
result[@"databaseDescription"] = input.databaseDescription;
result[@"countriesNumber"] = @(input.countriesNumber);
result[@"documentsNumber"] = @(input.documentsNumber);
+ result[@"size"] = input.size;
return result;
}
diff --git a/src/ios/RGLWRegulaConfig.h b/src/ios/RGLWRegulaConfig.h
index 71a5338..df5d141 100644
--- a/src/ios/RGLWRegulaConfig.h
+++ b/src/ios/RGLWRegulaConfig.h
@@ -1,6 +1,7 @@
#ifndef RGLWRegulaConfig_h
#define RGLWRegulaConfig_h
#import
+#import "RGLWJSONConstructor.h"
@import CoreGraphics;
@import UIKit;
@import AVFoundation;
@@ -15,11 +16,11 @@
+(void)setProcessParams:(NSDictionary*) options : (RGLProcessParams*) processParams;
+(UIColor *)getUIColorObjectFromHexString:(NSString *)hexStr alpha:(CGFloat)alpha;
+(unsigned int)intFromHexString:(NSString *)hexStr;
-+(UIImage*)imageFromBase64:(NSString *)base64image;
+(RGLePassportDataGroup*)RGLePassportDataGroupFromJson:(NSDictionary *) dict;
+(RGLeIDDataGroup*)RGLeIDDataGroupFromJson:(NSDictionary*) dict;
+(RGLeDLDataGroup*)RGLeDLDataGroupFromJson:(NSDictionary*) dict;
+(RGLImageQA*)ImageQAFromJson:(NSDictionary*) dict;
+(NSDictionary*)ImageQAToJson:(RGLImageQA*) input;
++(RGLOnlineProcessingConfig*)RGLOnlineProcessingConfigFromJSON:(NSDictionary*) dict;
@end
#endif
diff --git a/src/ios/RGLWRegulaConfig.m b/src/ios/RGLWRegulaConfig.m
index d602fb2..996e091 100644
--- a/src/ios/RGLWRegulaConfig.m
+++ b/src/ios/RGLWRegulaConfig.m
@@ -114,16 +114,6 @@ + (unsigned int)intFromHexString:(NSString *)hexStr {
return hexInt;
}
-+(UIImage*)imageFromBase64:(NSString *)base64image {
- NSMutableString *base64 = [NSMutableString stringWithString: base64image];
- if(![[base64image substringToIndex:10] isEqualToString:@"data:image"])
- base64 = [NSMutableString stringWithFormat: @"%@%@", @"data:image/jpeg;base64,", base64image];
- NSURL *url = [NSURL URLWithString:base64];
- NSData *imageData = [NSData dataWithContentsOfURL:url];
- UIImage *image = [UIImage imageWithData:imageData];
- return image;
-}
-
+(CGLineCap)CGLineCapWithNSInteger:(NSInteger)value {
switch(value){
case 0:
@@ -205,6 +195,33 @@ +(AVCaptureDevicePosition)AVCaptureDevicePositionWithNSInteger:(NSInteger)value
}
}
++(NSNumber*)NSNumberWithRGLTextProcessing:(RGLTextProcessing*)value {
+ if(value == RGLTextProcessing.noChange)
+ return @0;
+ if(value == RGLTextProcessing.uppercase)
+ return @1;
+ if(value == RGLTextProcessing.lowercase)
+ return @2;
+ if(value == RGLTextProcessing.capital)
+ return @3;
+ return @0;
+}
+
++(RGLTextProcessing*)RGLTextProcessingWithNSInteger:(NSNumber*)value {
+ switch([value integerValue]){
+ case 0:
+ return RGLTextProcessing.noChange;
+ case 1:
+ return RGLTextProcessing.uppercase;
+ case 2:
+ return RGLTextProcessing.lowercase;
+ case 3:
+ return RGLTextProcessing.capital;
+ default:
+ return RGLTextProcessing.noChange;
+ }
+}
+
+(NSInteger)NSIntegerWithAVCaptureDevicePosition:(AVCaptureDevicePosition)value {
switch(value){
case AVCaptureDevicePositionFront:
@@ -301,8 +318,8 @@ +(RGLImageQA*)ImageQAFromJson:(NSDictionary*)dict {
image.moireCheck = [dict valueForKey:@"moireCheck"];
if([dict valueForKey:@"expectedPass"] != nil){
NSMutableArray *expectedPass = [NSMutableArray new];
- for(NSString* str in [dict valueForKey:@"expectedPass"])
- [expectedPass addObject:str];
+ for(NSNumber* item in [dict valueForKey:@"expectedPass"])
+ [expectedPass addObject:[self RGLImageQualityCheckTypeWithNSNumber: item]];
image.expectedPass = expectedPass;
}
if([dict valueForKey:@"documentPositionIndent"] != nil)
@@ -321,12 +338,44 @@ +(NSDictionary*)ImageQAToJson:(RGLImageQA*)input {
result[@"glaresCheck"] = input.glaresCheck;
result[@"colornessCheck"] = input.colornessCheck;
result[@"moireCheck"] = input.moireCheck;
- result[@"expectedPass"] = input.expectedPass;
+ if(input.expectedPass != nil) {
+ NSMutableArray* array = [NSMutableArray new];
+ for(RGLImageQualityCheckType item in input.expectedPass)
+ [array addObject:[self NSNumberWithRGLImageQualityCheckType:item]];
+ result[@"expectedPass"] = array;
+ } else result[@"expectedPass"] = nil;
result[@"documentPositionIndent"] = input.documentPositionIndent;
return result;
}
++(NSNumber*)NSNumberWithRGLImageQualityCheckType:(RGLImageQualityCheckType)value {
+ if(value == RGLImageQualityCheckTypeImageGlares) return @0;
+ if(value == RGLImageQualityCheckTypeImageFocus) return @1;
+ if(value == RGLImageQualityCheckTypeImageResolution) return @2;
+ if(value == RGLImageQualityCheckTypeImageColorness) return @3;
+ if(value == RGLImageQualityCheckTypeImagePerspective) return @4;
+ if(value == RGLImageQualityCheckTypeImageBounds) return @5;
+ if(value == RGLImageQualityCheckTypeScreenCapture) return @6;
+ if(value == RGLImageQualityCheckTypePortrait) return @7;
+ if(value == RGLImageQualityCheckTypeHandwritten) return @8;
+ return 0;
+}
+
++(RGLImageQualityCheckType)RGLImageQualityCheckTypeWithNSNumber:(NSNumber*)input {
+ int value = [input intValue];
+ if(value == 0) return RGLImageQualityCheckTypeImageGlares;
+ if(value == 1) return RGLImageQualityCheckTypeImageFocus;
+ if(value == 2) return RGLImageQualityCheckTypeImageResolution;
+ if(value == 3) return RGLImageQualityCheckTypeImageColorness;
+ if(value == 4) return RGLImageQualityCheckTypeImagePerspective;
+ if(value == 5) return RGLImageQualityCheckTypeImageBounds;
+ if(value == 6) return RGLImageQualityCheckTypeScreenCapture;
+ if(value == 7) return RGLImageQualityCheckTypePortrait;
+ if(value == 8) return RGLImageQualityCheckTypeHandwritten;
+ return RGLImageQualityCheckTypeImageGlares;
+}
+
+(RGLePassportDataGroup*)RGLePassportDataGroupFromJson:(NSDictionary*)dict {
RGLePassportDataGroup *group = [[RGLePassportDataGroup alloc] init];
@@ -451,9 +500,12 @@ +(RGLeDLDataGroup*)RGLeDLDataGroupFromJson:(NSDictionary*)dict {
}
+(RGLOnlineProcessingConfig*)RGLOnlineProcessingConfigFromJSON:(NSDictionary*)dict {
+ if(dict == nil) return nil;
if([dict valueForKey:@"mode"] == nil) return nil;
RGLOnlineProcessingConfig *result = [[RGLOnlineProcessingConfig alloc] initWithMode:[[dict valueForKey:@"mode"] integerValue]];
+ if([dict valueForKey:@"url"] != nil)
+ result.serviceURL = [dict valueForKey:@"url"];
if([dict valueForKey:@"imageFormat"] != nil)
result.imageFormat = [[dict valueForKey:@"imageFormat"] integerValue];
@@ -477,6 +529,8 @@ +(RGLReprocParams*)RGLReprocParamsFromJSON:(NSDictionary*)dict {
result.serviceURL = [dict valueForKey:@"serviceUrl"];
if([dict valueForKey:@"failIfNoService"] != nil)
result.failIfNoService = [dict valueForKey:@"failIfNoService"];
+ if([dict valueForKey:@"httpHeaders"] != nil)
+ result.httpHeaders = [dict valueForKey:@"httpHeaders"];
return result;
}
@@ -519,11 +573,11 @@ +(void)setCustomization:(NSDictionary*)options :(RGLCustomization*)customization
if([options valueForKey:@"showNextPageAnimation"] != nil)
customization.showNextPageAnimation = [[options valueForKey:@"showNextPageAnimation"] boolValue];
if([options valueForKey:@"helpAnimationImage"] != nil)
- customization.helpAnimationImage = [self imageFromBase64:[options valueForKey:@"helpAnimationImage"]];
+ customization.helpAnimationImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"helpAnimationImage"]];
if([options valueForKey:@"multipageAnimationFrontImage"] != nil)
- customization.multipageAnimationFrontImage = [self imageFromBase64:[options valueForKey:@"multipageAnimationFrontImage"]];
+ customization.multipageAnimationFrontImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"multipageAnimationFrontImage"]];
if([options valueForKey:@"multipageAnimationBackImage"] != nil)
- customization.multipageAnimationBackImage = [self imageFromBase64:[options valueForKey:@"multipageAnimationBackImage"]];
+ customization.multipageAnimationBackImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"multipageAnimationBackImage"]];
if([options valueForKey:@"tintColor"] != nil)
customization.tintColor = [self getUIColorObjectFromHexString:[options valueForKey:@"tintColor"] alpha:1];
if([options valueForKey:@"multipageButtonBackgroundColor"] != nil)
@@ -533,7 +587,7 @@ +(void)setCustomization:(NSDictionary*)options :(RGLCustomization*)customization
if([options valueForKey:@"showBackgroundMask"] != nil)
customization.showBackgroundMask = [[options valueForKey:@"showBackgroundMask"] boolValue];
if([options valueForKey:@"borderBackgroundImage"] != nil)
- customization.borderBackgroundImage = [self imageFromBase64:[options valueForKey:@"borderBackgroundImage"]];
+ customization.borderBackgroundImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"borderBackgroundImage"]];
if([options valueForKey:@"backgroundMaskAlpha"] != nil)
customization.backgroundMaskAlpha = [[options valueForKey:@"backgroundMaskAlpha"] floatValue];
if([options valueForKey:@"helpAnimationImageContentMode"] != nil)
@@ -553,19 +607,19 @@ +(void)setCustomization:(NSDictionary*)options :(RGLCustomization*)customization
if([options valueForKey:@"cameraFrameCornerRadius"] != nil)
customization.cameraFrameCornerRadius = [[options valueForKey:@"cameraFrameCornerRadius"] floatValue];
if([options valueForKey:@"torchButtonOnImage"] != nil)
- customization.torchButtonOnImage = [self imageFromBase64:[options valueForKey:@"torchButtonOnImage"]];
+ customization.torchButtonOnImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"torchButtonOnImage"]];
if([options valueForKey:@"torchButtonOffImage"] != nil)
- customization.torchButtonOffImage = [self imageFromBase64:[options valueForKey:@"torchButtonOffImage"]];
+ customization.torchButtonOffImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"torchButtonOffImage"]];
if([options valueForKey:@"closeButtonImage"] != nil)
- customization.closeButtonImage = [self imageFromBase64:[options valueForKey:@"closeButtonImage"]];
+ customization.closeButtonImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"closeButtonImage"]];
if([options valueForKey:@"captureButtonImage"] != nil)
- customization.captureButtonImage = [self imageFromBase64:[options valueForKey:@"captureButtonImage"]];
+ customization.captureButtonImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"captureButtonImage"]];
if([options valueForKey:@"changeFrameButtonCollapseImage"] != nil)
- customization.changeFrameButtonCollapseImage = [self imageFromBase64:[options valueForKey:@"changeFrameButtonCollapseImage"]];
+ customization.changeFrameButtonCollapseImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"changeFrameButtonCollapseImage"]];
if([options valueForKey:@"changeFrameButtonExpandImage"] != nil)
- customization.changeFrameButtonExpandImage = [self imageFromBase64:[options valueForKey:@"changeFrameButtonExpandImage"]];
+ customization.changeFrameButtonExpandImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"changeFrameButtonExpandImage"]];
if([options valueForKey:@"cameraSwitchButtonImage"] != nil)
- customization.cameraSwitchButtonImage = [self imageFromBase64:[options valueForKey:@"cameraSwitchButtonImage"]];
+ customization.cameraSwitchButtonImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"cameraSwitchButtonImage"]];
if([options valueForKey:@"cameraFrameLineCap"] != nil)
customization.cameraFrameLineCap = [self CGLineCapWithNSInteger:[[options valueForKey:@"cameraFrameLineCap"] integerValue]];
if([options valueForKey:@"cameraFrameOffsetWidth"] != nil)
@@ -585,7 +639,7 @@ +(void)setCustomization:(NSDictionary*)options :(RGLCustomization*)customization
if([options valueForKey:@"hologramAnimationPositionMultiplier"] != nil)
customization.hologramAnimationPositionMultiplier = [[options valueForKey:@"hologramAnimationPositionMultiplier"] floatValue];
if([options valueForKey:@"hologramAnimationImage"] != nil)
- customization.hologramAnimationImage = [self imageFromBase64:[options valueForKey:@"hologramAnimationImage"]];
+ customization.hologramAnimationImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"hologramAnimationImage"]];
if([options valueForKey:@"uiCustomizationLayer"] != nil)
customization.customUILayerJSON = [options valueForKey:@"uiCustomizationLayer"];
}
@@ -764,18 +818,24 @@ +(void)setProcessParams:(NSDictionary*)options :(RGLProcessParams*)processParams
if([options valueForKey:@"processAuth"] != nil)
processParams.processAuth = [options valueForKey:@"processAuth"];
if([options valueForKey:@"documentGroupFilter"] != nil)
- processParams.documentGroupFilter = [options mutableArrayValueForKey:@"documentGroupFilter"];
+ processParams.documentGroupFilter = [options valueForKey:@"documentGroupFilter"];
if([options valueForKey:@"convertCase"] != nil)
- processParams.convertCase = [options valueForKey:@"convertCase"];
+ processParams.convertCase = [RGLWRegulaConfig RGLTextProcessingWithNSInteger:[options valueForKey:@"convertCase"]];
if([options valueForKey:@"rfidParams"] != nil)
processParams.rfidParams = [self RGLRFIDParamsFromJSON:[options valueForKey:@"rfidParams"]];
+ if([options valueForKey:@"doDetectCan"] != nil)
+ processParams.doDetectCan = [NSNumber numberWithBool:[[options valueForKey:@"doDetectCan"] boolValue]];
+ if([options valueForKey:@"useFaceApi"] != nil)
+ processParams.useFaceApi = [NSNumber numberWithBool:[[options valueForKey:@"useFaceApi"] boolValue]];
+ if([options valueForKey:@"faceApiParams"] != nil)
+ processParams.faceApiParams = [self RGLFaceAPIParamsFromJSON:[options valueForKey:@"faceApiParams"]];
}
+(NSMutableDictionary *)getCustomization:(RGLCustomization*)customization {
NSMutableDictionary *result = [[NSMutableDictionary alloc] init];
result[@"showHelpAnimation"] = [NSNumber numberWithBool:customization.showHelpAnimation];
- result[@"helpAnimationImage"] = [UIImageJPEGRepresentation(customization.helpAnimationImage, 1.0) base64EncodedStringWithOptions:0];
+ result[@"helpAnimationImage"] = [RGLWJSONConstructor base64WithImage:customization.helpAnimationImage];
result[@"showStatusMessages"] = [NSNumber numberWithBool:customization.showStatusMessages];
result[@"status"] = customization.status;
result[@"resultStatus"] = customization.resultStatus;
@@ -785,12 +845,12 @@ +(NSMutableDictionary *)getCustomization:(RGLCustomization*)customization {
result[@"resultStatusTextFont"] = customization.resultStatusTextFont.fontName;
result[@"cameraFrameBorderWidth"] = [NSNumber numberWithFloat:customization.cameraFrameBorderWidth];
result[@"statusTextFont"] = customization.statusTextFont.fontName;
- result[@"multipageAnimationFrontImage"] = [UIImageJPEGRepresentation(customization.multipageAnimationFrontImage, 1.0) base64EncodedStringWithOptions:0];
- result[@"multipageAnimationBackImage"] = [UIImageJPEGRepresentation(customization.multipageAnimationBackImage, 1.0) base64EncodedStringWithOptions:0];
+ result[@"multipageAnimationFrontImage"] = [RGLWJSONConstructor base64WithImage:customization.multipageAnimationFrontImage];
+ result[@"multipageAnimationBackImage"] = [RGLWJSONConstructor base64WithImage:customization.multipageAnimationBackImage];
result[@"cameraFrameLineLength"] = [NSNumber numberWithFloat:customization.cameraFrameLineLength];
result[@"showNextPageAnimation"] = [NSNumber numberWithBool:customization.showNextPageAnimation];
result[@"showBackgroundMask"] = [NSNumber numberWithBool:customization.showBackgroundMask];
- result[@"borderBackgroundImage"] = [UIImageJPEGRepresentation(customization.borderBackgroundImage, 1.0) base64EncodedStringWithOptions:0];
+ result[@"borderBackgroundImage"] = [RGLWJSONConstructor base64WithImage:customization.borderBackgroundImage];
result[@"backgroundMaskAlpha"] = [NSNumber numberWithFloat:customization.backgroundMaskAlpha];
result[@"helpAnimationImageContentMode"] = [NSNumber numberWithInteger:[self NSIntegerWithUIViewContentMode:customization.helpAnimationImageContentMode]];
result[@"multipageAnimationFrontImageContentMode"] = [NSNumber numberWithInteger:[self NSIntegerWithUIViewContentMode:customization.multipageAnimationFrontImageContentMode]];
@@ -799,13 +859,13 @@ +(NSMutableDictionary *)getCustomization:(RGLCustomization*)customization {
result[@"cameraFrameVerticalPositionMultiplier"] = [NSNumber numberWithFloat:customization.cameraFrameVerticalPositionMultiplier];
result[@"customStatusPositionMultiplier"] = [NSNumber numberWithFloat:customization.customStatusPositionMultiplier];
result[@"cameraFrameCornerRadius"] = [NSNumber numberWithFloat:customization.cameraFrameCornerRadius];
- result[@"torchButtonOnImage"] = [UIImageJPEGRepresentation(customization.torchButtonOnImage, 1.0) base64EncodedStringWithOptions:0];
- result[@"torchButtonOffImage"] = [UIImageJPEGRepresentation(customization.torchButtonOffImage, 1.0) base64EncodedStringWithOptions:0];
- result[@"closeButtonImage"] = [UIImageJPEGRepresentation(customization.closeButtonImage, 1.0) base64EncodedStringWithOptions:0];
- result[@"captureButtonImage"] = [UIImageJPEGRepresentation(customization.captureButtonImage, 1.0) base64EncodedStringWithOptions:0];
- result[@"changeFrameButtonCollapseImage"] = [UIImageJPEGRepresentation(customization.changeFrameButtonCollapseImage, 1.0) base64EncodedStringWithOptions:0];
- result[@"changeFrameButtonExpandImage"] = [UIImageJPEGRepresentation(customization.changeFrameButtonExpandImage, 1.0) base64EncodedStringWithOptions:0];
- result[@"cameraSwitchButtonImage"] = [UIImageJPEGRepresentation(customization.cameraSwitchButtonImage, 1.0) base64EncodedStringWithOptions:0];
+ result[@"torchButtonOnImage"] = [RGLWJSONConstructor base64WithImage:customization.torchButtonOnImage];
+ result[@"torchButtonOffImage"] = [RGLWJSONConstructor base64WithImage:customization.torchButtonOffImage];
+ result[@"closeButtonImage"] = [RGLWJSONConstructor base64WithImage:customization.closeButtonImage];
+ result[@"captureButtonImage"] = [RGLWJSONConstructor base64WithImage:customization.captureButtonImage];
+ result[@"changeFrameButtonCollapseImage"] = [RGLWJSONConstructor base64WithImage:customization.changeFrameButtonCollapseImage];
+ result[@"changeFrameButtonExpandImage"] = [RGLWJSONConstructor base64WithImage:customization.changeFrameButtonExpandImage];
+ result[@"cameraSwitchButtonImage"] = [RGLWJSONConstructor base64WithImage:customization.cameraSwitchButtonImage];
result[@"cameraFrameLineCap"] = [NSNumber numberWithInteger:[self NSIntegerWithCGLineCap:customization.cameraFrameLineCap]];
result[@"cameraFrameOffsetWidth"] = [NSNumber numberWithFloat:customization.cameraFrameOffsetWidth];
result[@"cameraFramePortraitAspectRatio"] = [NSNumber numberWithFloat:customization.cameraFramePortraitAspectRatio];
@@ -814,7 +874,7 @@ +(NSMutableDictionary *)getCustomization:(RGLCustomization*)customization {
result[@"hologramAnimationImageContentMode"] = [NSNumber numberWithInteger:[self NSIntegerWithUIViewContentMode:customization.hologramAnimationImageContentMode]];
result[@"hologramAnimationPositionMultiplier"] = [NSNumber numberWithFloat:customization.hologramAnimationPositionMultiplier];
result[@"uiCustomizationLayer"] = customization.customUILayerJSON;
- result[@"hologramAnimationImage"] = [UIImageJPEGRepresentation(customization.hologramAnimationImage, 1.0) base64EncodedStringWithOptions:0];
+ result[@"hologramAnimationImage"] = [RGLWJSONConstructor base64WithImage:customization.hologramAnimationImage];
if(customization.customLabelStatus != nil)
result[@"customLabelStatus"] = customization.customLabelStatus.string;
if(customization.activityIndicatorColor != nil)
@@ -932,7 +992,9 @@ +(NSMutableDictionary *)getProcessParams:(RGLProcessParams*)processParams {
result[@"splitNames"] = processParams.splitNames;
result[@"processAuth"] = processParams.processAuth;
result[@"documentGroupFilter"] = processParams.documentGroupFilter;
- result[@"convertCase"] = processParams.convertCase;
+ result[@"convertCase"] = [RGLWRegulaConfig NSNumberWithRGLTextProcessing:processParams.convertCase];
+ result[@"doDetectCan"] = [NSNumber numberWithBool:processParams.doDetectCan];
+ result[@"useFaceApi"] = [NSNumber numberWithBool:processParams.useFaceApi];
return result;
}
@@ -1037,7 +1099,7 @@ +(void)setRfidScenario:(NSDictionary*)options :(RGLRFIDScenario*)rfidScenario {
if([options valueForKey:@"authorizedInstallQCert"] != nil)
rfidScenario.authorizedInstallQCert = [[options valueForKey:@"authorizedInstallQCert"] boolValue];
if([options valueForKey:@"reprocessParams"] != nil)
- rfidScenario.reprocParams = [self RGLReprocParamsFromJSON: [options valueForKey:@"reprocessParams"]];
+ rfidScenario.reprocParams = [self RGLReprocParamsFromJSON:[options valueForKey:@"reprocessParams"]];
if([options valueForKey:@"defaultReadingBufferSize"] != nil)
rfidScenario.defaultReadingBufferSize = [[options valueForKey:@"defaultReadingBufferSize"] intValue];
}
@@ -1051,4 +1113,40 @@ +(RGLRFIDParams*)RGLRFIDParamsFromJSON:(NSDictionary*)input {
return result;
}
++(RGLFaceAPIParams*)RGLFaceAPIParamsFromJSON:(NSDictionary*)input {
+ RGLFaceAPIParams* result = [RGLFaceAPIParams new];
+
+ if([input valueForKey:@"url"] != nil)
+ result.url = [input valueForKey:@"url"];
+ if([input valueForKey:@"mode"] != nil)
+ result.mode = [input valueForKey:@"mode"];
+ if([input valueForKey:@"threshold"] != nil)
+ result.threshold = [input valueForKey:@"threshold"];
+ if([input valueForKey:@"searchParams"] != nil)
+ result.searchParams = [self RGLFaceAPISearchParamsFromJSON:[input valueForKey:@"searchParams"]];
+ if([input valueForKey:@"serviceTimeout"] != nil)
+ result.serviceTimeout = [input valueForKey:@"serviceTimeout"];
+ if([input valueForKey:@"proxy"] != nil)
+ result.proxy = [input valueForKey:@"proxy"];
+ if([input valueForKey:@"proxyPassword"] != nil)
+ result.proxyPassword = [input valueForKey:@"proxyPassword"];
+ if([input valueForKey:@"proxyType"] != nil)
+ result.proxyType = [input valueForKey:@"proxyType"];
+
+ return result;
+}
+
++(RGLFaceAPISearchParams*)RGLFaceAPISearchParamsFromJSON:(NSDictionary*)input {
+ RGLFaceAPISearchParams* result = [RGLFaceAPISearchParams new];
+
+ if([input valueForKey:@"limit"] != nil)
+ result.limit = [input valueForKey:@"limit"];
+ if([input valueForKey:@"threshold"] != nil)
+ result.threshold = [input valueForKey:@"threshold"];
+ if([input valueForKey:@"groupIds"] != nil)
+ result.groupIDs = [input valueForKey:@"groupIds"];
+
+ return result;
+}
+
@end
diff --git a/www/DocumentReader.js b/www/DocumentReader.js
index 2595997..c883938 100644
--- a/www/DocumentReader.js
+++ b/www/DocumentReader.js
@@ -9,61 +9,21 @@ class DocumentReaderScenario {
result.name = jsonObject["name"]
result.caption = jsonObject["caption"]
result.description = jsonObject["description"]
-
- return result
- }
-}
-
-class CoreDetailedScenario {
- static fromJson(jsonObject) {
- if (jsonObject == null) return null
- const result = new CoreDetailedScenario()
-
- result.uvTorch = jsonObject["uvTorch"]
- result.frameOrientation = jsonObject["frameOrientation"]
- result.faceExt = jsonObject["faceExt"]
result.multiPageOff = jsonObject["multiPageOff"]
- result.seriesProcessMode = jsonObject["seriesProcessMode"]
result.frameKWHLandscape = jsonObject["frameKWHLandscape"]
result.frameKWHPortrait = jsonObject["frameKWHPortrait"]
result.frameKWHDoublePageSpreadPortrait = jsonObject["frameKWHDoublePageSpreadPortrait"]
result.frameKWHDoublePageSpreadLandscape = jsonObject["frameKWHDoublePageSpreadLandscape"]
- result.name = jsonObject["name"]
- result.caption = jsonObject["caption"]
- result.description = jsonObject["description"]
+ result.frameOrientation = jsonObject["frameOrientation"]
+ result.uvTorch = jsonObject["uvTorch"]
+ result.faceExt = jsonObject["faceExt"]
+ result.seriesProcessMode = jsonObject["seriesProcessMode"]
result.manualCrop = jsonObject["manualCrop"]
return result
}
}
-class FaceMetaData {
- static fromJson(jsonObject) {
- if (jsonObject == null) return null
- const result = new FaceMetaData()
-
- result.ID = jsonObject["ID"]
- result.rollAngle = jsonObject["rollAngle"]
- result.bounds = Bounds.fromJson(jsonObject["bounds"])
-
- return result
- }
-}
-
-class Bounds {
- static fromJson(jsonObject) {
- if (jsonObject == null) return null
- const result = new Bounds()
-
- result.x = jsonObject["x"]
- result.y = jsonObject["y"]
- result.width = jsonObject["width"]
- result.height = jsonObject["height"]
-
- return result
- }
-}
-
class Rect {
static fromJson(jsonObject) {
if (jsonObject == null) return null
@@ -99,7 +59,7 @@ class DocumentReaderGraphicField {
result.sourceType = jsonObject["sourceType"]
result.fieldType = jsonObject["fieldType"]
- result.lightType = jsonObject["lightType"]
+ result.light = jsonObject["light"]
result.pageIndex = jsonObject["pageIndex"]
result.originalPageIndex = jsonObject["originalPageIndex"]
result.fieldName = jsonObject["fieldName"]
@@ -301,8 +261,6 @@ class DocumentReaderNotification {
if (jsonObject == null) return null
const result = new DocumentReaderNotification()
- result.code = jsonObject["code"]
- result.value = jsonObject["value"]
result.notificationCode = jsonObject["notificationCode"]
result.dataFileType = jsonObject["dataFileType"]
result.progress = jsonObject["progress"]
@@ -613,6 +571,26 @@ class RFIDSessionData {
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
}
@@ -718,7 +696,7 @@ class DocumentReaderCompletion {
result.action = jsonObject["action"]
result.results = DocumentReaderResults.fromJson(jsonObject["results"])
- result.error = DocumentReaderException.fromJson(jsonObject["error"])
+ result.error = RegulaException.fromJson(jsonObject["error"])
return result
}
@@ -736,10 +714,10 @@ class RfidNotificationCompletion {
}
}
-class DocumentReaderException {
+class RegulaException {
static fromJson(jsonObject) {
if (jsonObject == null) return null
- const result = new DocumentReaderException()
+ const result = new RegulaException()
result.errorCode = jsonObject["errorCode"]
result.message = jsonObject["message"]
@@ -948,6 +926,7 @@ class DocReaderDocumentsDatabase {
result.databaseDescription = jsonObject["databaseDescription"]
result.countriesNumber = jsonObject["countriesNumber"]
result.documentsNumber = jsonObject["documentsNumber"]
+ result.size = jsonObject["size"]
return result
}
@@ -1018,6 +997,142 @@ class DocumentReaderValidity {
}
}
+class FaceApiParams {
+ static fromJson(jsonObject) {
+ if (jsonObject == null) return null
+ const result = new FaceApiParams()
+
+ result.url = jsonObject["url"]
+ result.mode = jsonObject["mode"]
+ result.searchParams = Search.fromJson(jsonObject["searchParams"])
+ result.threshold = jsonObject["threshold"]
+ result.serviceTimeout = jsonObject["serviceTimeout"]
+ result.proxy = jsonObject["proxy"]
+ result.proxyPassword = jsonObject["proxyPassword"]
+ result.proxyType = jsonObject["proxyType"]
+
+ return result
+ }
+}
+
+class Search {
+ static fromJson(jsonObject) {
+ if (jsonObject == null) return null
+ const result = new Search()
+
+ 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 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.colornessCheck = jsonObject["colornessCheck"]
+ result.moireCheck = jsonObject["moireCheck"]
+ result.expectedPass = []
+ if (jsonObject["expectedPass"] != null)
+ for (const i in jsonObject["expectedPass"])
+ result.expectedPass.push(jsonObject["expectedPass"][i])
+ result.glaresCheckParams = GlaresCheckParams.fromJson(jsonObject["glaresCheckParams"])
+ result.documentPositionIndent = jsonObject["documentPositionIndent"]
+
+ 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 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 OnlineProcessingConfig {
+ static fromJson(jsonObject) {
+ if (jsonObject == null) return null
+ const result = new OnlineProcessingConfig()
+
+ result.mode = jsonObject["mode"]
+ result.url = jsonObject["url"]
+ result.processParam = jsonObject["processParam"]
+ result.imageFormat = jsonObject["imageFormat"]
+ result.imageCompressionQuality = jsonObject["imageCompressionQuality"]
+
+ 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.livePortrait = jsonObject["livePortrait"]
+ result.extPortrait = jsonObject["extPortrait"]
+ result.onlineProcessingConfig = OnlineProcessingConfig.fromJson(jsonObject["onlineProcessingConfig"])
+ result.image = jsonObject["image"]
+ result.oneShotIdentification = jsonObject["oneShotIdentification"]
+ 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 DocumentReaderResults {
static fromJson(jsonObject) {
@@ -1066,173 +1181,6 @@ class DocumentReaderResults {
return result
}
-
- /**
- * @deprecated Use DocumentReader.textFieldValueBy...()
- */
- getTextFieldValueByType({ fieldType, lcid = 0, source = -1, original = false }) {
- if (this.textResult == null) return null
- const field = this.findByTypeAndLcid(fieldType, lcid)
- if (field == null) return null
- const value = this.findBySource(field, source)
- if (value == null) return null
- return original ? value.originalValue : value.value
- }
-
- /**
- * @deprecated
- */
- getTextFieldStatusByType(fieldType, lcid = 0) {
- if (this.textResult == null) return 0
- const field = this.findByTypeAndLcid(fieldType, lcid)
- return field != null ? field.status : 0
- }
-
- /**
- * @deprecated Use DocumentReader.graphicFieldImageBy...()
- */
- getGraphicFieldImageByType({ fieldType, source = -1, pageIndex = -1, light = -1 }) {
- if (this.graphicResult == null) return null
- const foundFields = []
-
- for (const field of this.graphicResult.fields)
- if (field.fieldType === fieldType)
- foundFields.push(field)
- if (source !== -1)
- for (const index in foundFields)
- if (foundFields[index].sourceType !== source)
- foundFields.splice(index, 1)
- if (light !== -1)
- for (const index in foundFields)
- if (foundFields[index].lightType !== light)
- foundFields.splice(index, 1)
- if (pageIndex !== -1)
- for (const index in foundFields)
- if (foundFields[index].pageIndex !== pageIndex)
- foundFields.splice(index, 1)
- if (foundFields.length > 0)
- return foundFields[0].value
- }
-
- /**
- * @deprecated
- */
- getQualityResult(imageQualityCheckType, securityFeature = -1, pageIndex = 0) {
- let resultSum = 2
- if (this.imageQuality == null) return resultSum
-
- let imageQualityGroup
-
- for (const iq of this.imageQuality)
- if (iq != null && iq.pageIndex === pageIndex)
- imageQualityGroup = iq
- if (imageQualityGroup == null)
- return resultSum
-
- for (const field of imageQualityGroup.imageQualityList)
- if (field.type === imageQualityCheckType)
- if (securityFeature === -1) {
- if (field.result === 0) {
- resultSum = 0
- break
- }
- if (field.result === 1)
- resultSum = field.result
- } else if (field.featureType === securityFeature) {
- resultSum = field.result
- break
- }
-
- return resultSum
- }
-
- /**
- * @deprecated
- */
- findByTypeAndLcid(type, lcid) {
- let field
- const foundFields = []
-
- for (field of this.textResult.fields)
- if (field.fieldType === type)
- foundFields.push(field)
- if (foundFields.length <= 0)
- return null
-
- let foundField = null
-
- for (field of foundFields)
- if (lcid === 0) {
- foundField = field
- if (field.lcid === lcid)
- break
- } else if (field.lcid === lcid)
- return field
-
- return foundField
- }
-
- /**
- * @deprecated
- */
- findBySource(field, sourceType) {
- let value
- if (sourceType === -1) {
- const mrzVal = this.findBySource(field, 3)
- if (mrzVal != null)
- return mrzVal
- value = this.findBySource(field, 18)
- if (value != null)
- return value
- const visualVal = this.findBySource(field, 17)
- return visualVal != null ? visualVal : null
- }
- for (const item of field.values)
- if (item.sourceType === sourceType)
- return item
-
- return null
- }
-
- /**
- * @deprecated Use DocumentReader.containers()
- */
- getContainers(resultTypes) {
- try {
- const json = JSON.parse(this.rawResult)
- const containerList = json.List
- const resultArray = []
- for (const container of containerList){
- if (container == null || container.length == 0)
- continue
- for (const resultType of resultTypes)
- if(resultType == container.result_type){
- resultArray.push(container)
- break
- }
- }
- if (resultArray.length == 0)
- return null
- const newContainerList = {}
- newContainerList.List = resultArray
- const newJson = {}
- newJson.ContainerList = newContainerList
- newJson.TransactionInfo = json.TransactionInfo
- } catch (error) {
- return null
- }
- }
-
- /**
- * @deprecated DocumentReader.encryptedContainers()
- */
- getEncryptedContainers() {
- return this.getContainers([
- eRPRM_ResultType.RPRM_RESULT_TYPE_INTERNAL_RFID_SESSION,
- eRPRM_ResultType.RPRM_RESULT_TYPE_INTERNAL_ENCRYPTED_RCL,
- eRPRM_ResultType.RPRM_RESULT_TYPE_INTERNAL_LICENSE
- ])
- }
}
// Enum
@@ -1263,10 +1211,9 @@ const eRPRM_Authenticity = {
HOLOGRAMS_DETECTION: 524288,
MRZ: 8388608,
STATUS_ONLY: 0x80000000,
- OVI: 0x00000400,
- LIVENESS: 0x00200000,
- OCR: 0x00400000,
- UV: 1 | 4 | 16,
+ OVI: 1024,
+ LIVENESS: 2097152,
+ OCR: 4194304,
}
const eRFID_ErrorCodes = {
@@ -1384,241 +1331,6 @@ const eRFID_ErrorCodes = {
RFID_ERROR_LAYER34_SAM_ERROR: 0x840D0000,
RFID_ERROR_LAYER34_SAM_COLLISION: 0x840E0000,
RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE: 0x840F0000,
-
- getTranslation: function (value) {
- switch (value) {
- case this.RFID_ERROR_NO_ERROR:
- return "RFID: No error"
- case this.RFID_ERROR_ALREADY_DONE:
- return "RFID: The requested operation is already performed"
- case this.RFID_ERROR_FAILED:
- return "RFID: Failed"
- case this.RFID_ERROR_NO_CHIP_DETECTED:
- return "RFID: No chip is detected"
- case this.RFID_ERROR_NOT_AVAILABLE:
- return "RFID: Unavailable"
- case this.RFID_ERROR_INVALID_PARAMETER:
- return "RFID: Invalid parameter in ExecuteCommand() call found"
- case this.RFID_ERROR_NOT_INITIALIZED:
- return "RFID: Device is uninitialized"
- case this.RFID_ERROR_NOT_ENOUGH_MEMORY:
- return "RFID: Out of memory"
- case this.RFID_ERROR_INVALID_DIRECTORY:
- return "RFID: Invalid directory"
- case this.RFID_ERROR_UNKNOWN_COMMAND:
- return "RFID: Unknown command"
- case this.RFID_ERROR_FILE_IO_ERROR:
- return "RFID File: IO Error"
- case this.RFID_ERROR_BUSY:
- return "RFID: RFID is busy"
- case this.RFID_ERROR_OLD_FIRMWARE:
- return "RFID: The firmware needs to be updated to a newer version"
- case this.RFID_ERROR_PCSC_FAILED:
- return "PCSC: Failed"
- case this.RFID_ERROR_PCSC_READER_NOT_AVAILABLE:
- return "PCSC: The reader is unavailable"
- case this.RFID_ERROR_PCSC_CANT_CONNECT_CARD:
- return "PCSC: The card cannot be connected"
- case this.RFID_ERROR_PCSC_CARD_IS_NOT_CONNECTED:
- return "PCSC: The card is not connected"
- case this.RFID_ERROR_PCSC_OPERATION_CANCELLED:
- return "PCSC: Operation is cancelled"
- case this.RFID_ERROR_PCSC_CARD_IS_BUSY:
- return "PCSC: The card is busy"
- case this.RFID_ERROR_PCSC_FAILED_SCARD:
- return "PCSC: Failed Smart Card"
- case this.RFID_ERROR_PCSC_EXT_LE_FAILED:
- return "PCSC: ExtLe Failed"
- case this.RFID_ERROR_LAYER6_SECURITY_MANAGER:
- return "LAYER6: Secure Messaging was not activated"
- case this.RFID_ERROR_LAYER6_APP_SELECTION_FAILURE:
- return "LAYER6: ISO7816_A_03 \"Application selection failure\""
- case this.RFID_ERROR_LAYER6_MUTUAL_AUTH_MAC_FAIL:
- return "LAYER6: ISO7816_B_01 \"Mutual authentication MAC failure\""
- case this.RFID_ERROR_LAYER6_MUTUAL_AUTH_ENC_FAIL:
- return "LAYER6: ISO7816_B_02 \"Mutual authentication encryption failure\""
- case this.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE:
- return "LAYER6: ISO7816_B_03 \"Mutual authentication failure\""
- case this.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE_DATA:
- return "LAYER6: ISO7816_B_03 \"Mutual authentication failure data\""
- case this.RFID_ERROR_LAYER6_SM_DO_8E_MISSING:
- return "LAYER6: SM failure – MAC missing"
- case this.RFID_ERROR_LAYER6_SM_DO_87_MISSING:
- return "LAYER6: SM failure – cryptogram missing"
- case this.RFID_ERROR_LAYER6_SM_DO_99_MISSING:
- return "LAYER6: SM failure – secured status bytes missing"
- case this.RFID_ERROR_LAYER6_SM_MAC_INCORRECT:
- return "LAYER6: SM failure – incorrect MAC"
- case this.RFID_ERROR_LAYER6_SM_DO_87_INCORRECT:
- return "LAYER6: SM failure – incorrect cryptogram"
- case this.RFID_ERROR_LAYER6_NON_TLV_RESPONSE_DATA:
- return "LAYER6: Not TLV response data"
- case this.RFID_ERROR_LAYER6_WRONG_RND_ICC_LENGTH:
- return "LAYER6: Wrong data length (APDU_INS_GET_CHALLENGE)"
- case this.RFID_ERROR_LAYER6_INT_AUTH_FAILURE:
- return "LAYER6: APDU_INS_INTERNAL_AUTHENTICATE failure"
- case this.RFID_ERROR_LAYER6_MSE_SET_KAT_FAILURE:
- return "LAYER6: MSE:Set KAT failure"
- case this.RFID_ERROR_LAYER6_MSE_SET_DST_FAILURE:
- return "LAYER6: MSE:Set DST failure"
- case this.RFID_ERROR_LAYER6_PSO_CERTIFICATE_FAILURE:
- return "LAYER6: PSO CERTIFICATE failure"
- case this.RFID_ERROR_LAYER6_MSE_SET_AT_FAILURE:
- return "LAYER6: MSE:Set AT failure"
- case this.RFID_ERROR_LAYER6_GET_CHALLENGE_FAILURE:
- return "LAYER6: GET CHALLENGE failure"
- case this.RFID_ERROR_LAYER6_EXT_AUTH_FAILURE:
- return "LAYER6: APDU_INS_EXTERNAL_AUTHENTICATE (external authentication) failure"
- case this.RFID_ERROR_LAYER6_GENERAL_AUTH_FAILURE:
- return "LAYER6: General Authenticity Failure"
- case this.RFID_ERROR_LAYER6_FILE_NOT_FOUND:
- return "LAYER6: File selection failure / file not found"
- case this.RFID_ERROR_LAYER6_FILE_EOF1:
- return "LAYER6: Reading beyond EOF / Unexpected EOF"
- case this.RFID_ERROR_LAYER6_FILE_EOF2:
- return "LAYER6: Reading beyond EOF / Unexpected EOF"
- case this.RFID_ERROR_LAYER6_INCORRECT_PARAMS:
- return "LAYER6: Incorrect params"
- case this.RFID_ERROR_LAYER6_NO_REFERENCE_DATA:
- return "LAYER6: No reference data"
- case this.RFID_ERROR_LAYER6_PWD_SUSPEND:
- return "LAYER6: PWD suspended"
- case this.RFID_ERROR_LAYER6_PWD_BLOCKED:
- return "LAYER6: PWD blocked"
- case this.RFID_ERROR_LAYER6_PWD_DEACTIVATED:
- return "LAYER6: PWD deactivated"
- case this.RFID_ERROR_LAYER6_PWD_BLOCKED2:
- return "LAYER6: PWD blocked 2"
- case this.RFID_ERROR_LAYER6_PWD_DEACTIVATED2:
- return "LAYER6: PWD deactivated 2"
- case this.RFID_ERROR_LAYER6_PWD_SUSPEND2:
- return "LAYER6: PWD suspended 2"
- case this.RFID_ERROR_LAYER6_PWD_FAILED:
- return "LAYER6: PWD failed"
- case this.RFID_ERROR_NOT_PERFORMED:
- return "RFID: Not performed"
- case this.RFID_ERROR_SESSION_IS_CLOSED:
- return "RFID: Session is closed"
- case this.RFID_ERROR_SESSION_TERMINAL_UNSUPPORTED_OPERATION:
- return "RFID: Unsupported terminal operation"
- case this.RFID_ERROR_SESSION_TERMINAL_TYPE_UNKNOWN:
- return "RFID: Terminal type unknown"
- case this.RFID_ERROR_SESSION_TERMINAL_TYPE_BAD_CERTIFICATE:
- return "RFID: Terminal type bad certificate"
- case this.RFID_ERROR_SESSION_TERMINAL_TYPE_NOT_SET:
- return "RFID: Terminal type not set"
- case this.RFID_ERROR_SESSION_PROCEDURE_TYPE_UNKNOWN:
- return "RFID: Unknown procedure type"
- case this.RFID_ERROR_Session_Procedure_Type_Unsupported:
- return "RFID: Unsupported procedure type"
- case this.RFID_ERROR_SESSION_PROCEDURE_TYPE_NOT_SET:
- return "RFID: Procedure type not set"
- case this.RFID_ERROR_SESSION_ACCESS_KEY_UNKNOWN_TYPE:
- return "RFID: Access key unknown type"
- case this.RFID_ERROR_SESSION_ACCESS_KEY_UNSUPPORTED_SM_TYPE:
- return "RFID: Access key unsupported SM type"
- case this.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_SM_TYPE:
- return "RFID: Access key incorrect SM type"
- case this.RFID_ERROR_SESSION_ACCESS_KEY_RESTRICTED:
- return "RFID: Access key restricted"
- case this.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_DATA:
- return "RFID: Access key incorrect data"
- case this.RFID_ERROR_SESSION_ACCESS_KEY_NOT_SET:
- return "RFID: Access key not set"
- case this.RFID_ERROR_SESSION_PWD_MANAGEMENT_NOT_AUTHORIZED:
- return "RFID: PWD management not authorized"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_UNKNOWN_TYPE:
- return "RFID: Access control unknown type"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_SM:
- return "RFID: Access control unknown type"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_PACE:
- return "RFID: PACE required"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA_KEYS:
- return "RFID: CA keys required"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_TA:
- return "RFID: TA required"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA:
- return "RFID: CA required"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_INCORRECT_OPTION_CA:
- return "RFID: Incorrect option CA"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_CA_FAILED:
- return "RFID: CA failed"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_TA_FAILED:
- return "RFID: TA failed"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_AA_FAILED:
- return "RFID: AA failed"
- case this.RFID_ERROR_SESSION_ACCESS_CONTROL_RI_FAILED:
- return "RFID: RI failed"
- case this.RFID_ERROR_SESSION_PA_SIGNATURE_CHECK_FAILED:
- return "RFID: SO signature check failed"
- case this.RFID_ERROR_SESSION_PA_HASH_CHECK_FAILED:
- return "RFID: Hash check failed"
- case this.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_EXPIRY:
- return "RFID: Invalid aux data - date of expiry"
- case this.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_BIRTH:
- return "RFID: Invalid aux data - date of birth"
- case this.RFID_ERROR_SESSION_INVALID_AUX_DATA_COMMUNITY_ID:
- return "RFID: Invalid aux data - community ID"
- case this.RFID_ERROR_SESSION_E_SIGN_REQUIRES_APP_SELECTION:
- return "RFID: eSign requires app selection"
- case this.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_SET:
- return "RFID: eSign PIN not set"
- case this.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_VERIFIED:
- return "RFID: eSign PIN not verified"
- case this.RFID_ERROR_SESSION_INCORRECT_DATA:
- return "RFID: Incorrect data"
- case this.RFID_ERROR_SESSION_FILE_NOT_ENOUGH_DATA:
- return "RFID file: Insufficient data"
- case this.RFID_ERROR_SESSION_FILE_INCORRECT_DATA:
- return "RFID file: Incorrect data"
- case this.RFID_ERROR_SESSION_FILE_UNEXPECTED_DATA:
- return "RFID file: Unexpected data"
- case this.RFID_ERROR_SESSION_FILE_CONTENTS_UNEXPECTED_DATA:
- return "RFID file: Contains unexpected data"
- case this.RFID_ERROR_SESSION_FILE_WRONG_TAG:
- return "RFID file: Wrong tag"
- case this.RFID_ERROR_SESSION_FILE_CANT_USE_DATA:
- return "RFID file: Cannot use data"
- case this.RFID_ERROR_SESSION_FILE_CANT_READ_DATA:
- return "RFID file: Cannot read data"
- case this.RFID_ERROR_SESSION_FILE_ACCESS_DENIED:
- return "RFID file: Access denied"
- case this.RFID_ERROR_LAYER34_NO_ERROR:
- return "RFID: Layer 34 - No error"
- case this.RFID_ERROR_LAYER34_TIME_OUT:
- return "RFID: Layer 34 - Timeout"
- case this.RFID_ERROR_LAYER34_COLLISION:
- return "RFID: Layer 34 - Collision"
- case this.RFID_ERROR_LAYER34_CRC:
- return "RFID: Layer 34 - CRC"
- case this.RFID_ERROR_LAYER34_DATA_INTEGRITY:
- return "RFID: Layer 34 - Data integrity"
- case this.RFID_ERROR_LAYER34_DATA_LENGTH:
- return "RFID: Layer 34 - Data length"
- case this.RFID_ERROR_Layer34_RFU:
- return "RFID: Layer 34 - RFU"
- case this.RFID_ERROR_LAYER34_COLLISION_TOO_MANY:
- return "RFID: Layer 34 - Too many collision"
- case this.RFID_ERROR_LAYER34_PROTOCOL_B:
- return "RFID: Layer 34 - Protocol B"
- case this.RFID_ERROR_LAYER34_DATA_CONTENTS:
- return "RFID: Layer 34 - Data contents"
- case this.RFID_ERROR_LAYER34_PROTOCOL:
- return "RFID: Layer 34 - Protocol"
- case this.RFID_ERROR_LAYER34_GLOBAL_TIME_OUT:
- return "RFID: Layer 34 - Globa timeout"
- case this.RFID_ERROR_LAYER34_MIFARE_AUTH:
- return "RFID: Layer 34 - MIFARE auth"
- case this.RFID_ERROR_LAYER34_SAM_ERROR:
- return "RFID: Layer 34 - SAM error"
- case this.RFID_ERROR_LAYER34_SAM_COLLISION:
- return "RFID: Layer 34 - SAM collision"
- case this.RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE:
- return "RFID: Layer 34 - SAM acknowledge"
- default:
- return value
- }
- }
}
const eLDS_ParsingErrorCodes = {
@@ -1748,267 +1460,6 @@ const eLDS_ParsingErrorCodes = {
ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_SIG_ALGORITHM: 0x81000308,
ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_CERTIFICATE: 0x81000309,
ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_SIG_VALUE: 0x8100030A,
-
- getTranslation: function (value) {
- switch (value) {
- case this.ERR_LDS_OK:
- return "OK"
- case this.ERR_LDS_ASN_INCORRECT_DATA:
- return "Error - ASN: Incorrect data"
- case this.RR_LDS_ASN_NOT_ENOUGH_DATA:
- return "Error - ASN: Not enough data"
- case this.ERR_LDS_ASN_CONTENTS_UNEXPECTED_DATA:
- return "Error - ASN: Contents unexpected data"
- case this.ERR_LDS_ASN_SIGNED_DATA_INCORRECT_DATA:
- return "Error - ASN Signed data: Incorrect data"
- case this.ERR_LDS_ASN_SIGNED_DATA_ENCAP_CONTENTS_INCORRECT_DATA:
- return "Error - ASN Signed data: Encap contents incorrect data"
- case this.ERR_LDS_ASN_SIGNED_DATA_VERSION_INCORRECT_DATA:
- return "Error - ASN Signed data: Version incorrect data"
- case this.ERR_LDS_ASN_SIGNED_DATA_DIGEST_ALGORITHMS_INCORRECT_DATA:
- return "Error - ASN Signed data: Digest algorithms incorrect data"
- case this.ERR_LDS_ASN_LDS_OBJECT_INCORRECT_DATA:
- return "Error - ASN LDS object: Incorrect data"
- case this.ERR_LDS_ASN_LDS_OBJECT_VERSION_INCORRECT_DATA:
- return "Error - ASN LDS object: Version incorrect data"
- case this.ERR_LDS_ASN_LDS_OBJECT_DIGEST_ALGORITHM_INCORRECT_DATA:
- return "Error - ASN LDS object: Digest algorithm incorrect data"
- case this.ERR_LDS_ASN_LDS_OBJECT_DG_HASHES_INCORRECT_DATA:
- return "Error - ASN LDS object: DG hashes incorrect data"
- case this.ERR_LDS_ASN_LDS_OBJECT_VERSION_INFO_INCORRECT_DATA:
- return "Error - ASN LDS object: Version info incorrect data"
- case this.ERR_LDS_ASN_CERTIFICATE_INCORRECT_DATA:
- return "Error - ASN Certificate: Incorrect data"
- case this.ERR_LDS_ASN_CERTIFICATE_VERSION_INCORRECT_DATA:
- return "Error - ASN Certificate: Version incorrect data"
- case this.ERR_LDS_ASN_CERTIFICATE_SN_INCORRECT_DATA:
- return "Error - ASN Certificate: SN incorrect data"
- case this.ERR_LDS_ASN_CERTIFICATE_SIGNATURE_INCORRECT_DATA:
- return "Error - ASN Certificate: Signature incorrect data"
- case this.ERR_LDS_ASN_CERTIFICATE_ISSUER_INCORRECT_DATA:
- return "Error - ASN Certificate: Issuer incorrect data"
- case this.ERR_LDS_ASN_CERTIFICATE_VALIDITY_INCORRECT_DATA:
- return "Error - ASN Certificate: Validity incorrect data"
- case this.ERR_LDS_ASN_CERTIFICATE_SUBJECT_INCORRECT_DATA:
- return "Error - ASN Certificate: Subject incorrect data"
- case this.ERR_LDS_ASN_CERTIFICATE_SUBJECT_PK_INCORRECT_DATA:
- return "Error - ASN Certificate: Subject PK incorrect data"
- case this.ERR_LDS_ASN_CERTIFICATE_EXTENSIONS_INCORRECT_DATA:
- return "Error - ASN Certificate: Extensions incorrect data"
- case this.ERR_LDS_ASN_SIGNER_INFO_INCORRECT_DATA:
- return "Error - ASN Signer info: Incorrect data"
- case this.ERR_LDS_ASN_SIGNER_INFO_VERSION_INCORRECT_DATA:
- return "Error - ASN Signer info: Version incorrect data"
- case this.ERR_LDS_ASN_SIGNER_INFO_SID_INCORRECT_DATA:
- return "Error - ASN Signer info: SID incorrect data"
- case this.ERR_LDS_ASN_SIGNER_INFO_DIGEST_ALG_INCORRECT_DATA:
- return "Error - ASN Signer info: Digest algorithms incorrect data"
- case this.ERR_LDS_ASN_SIGNER_INFO_SIGNED_ATTRS_INCORRECT_DATA:
- return "Error - ASN Signer info: Signed attributes incorrect data"
- case this.ERR_LDS_ASN_SIGNER_INFO_SIGN_ALG_INCORRECT_DATA:
- return "Error - ASN Signer info: Sign algorithms incorrect data"
- case this.ERR_LDS_ASN_SIGNER_INFO_SIGNATURE_INCORRECT_DATA:
- return "Error - ASN Signer info: Signature incorrect data"
- case this.ERR_LDS_ASN_SIGNER_INFO_UNSIGNED_ATTRS_INCORRECT_DATA:
- return "Error - ASN Signer info: Unsigned attributes incorrect data"
- case this.ERR_LDS_ICAO_LDS_OBJECT_UNSUPPORTED_DIGEST_ALGORITHM:
- return "Error - ICAO LDS object: Unsupported digest algorithm"
- case -this.ERR_LDS_ICAO_SIGNED_DATA_SIGNER_INFOS_EMPTY:
- return "Error - ICAO Signed data: Signer info empty"
- case this.ERR_LDS_ICAO_SIGNER_INFO_UNSUPPORTED_DIGEST_ALGORITHM:
- return "Error - ICAO Signer info: Unsupported digest algorithm"
- case this.ERR_LDS_ICAO_SIGNER_INFO_UNSUPPORTED_SIGNATURE_ALGORITHM:
- return "Error - ICAO Signer info: Unsupported signature algorithm"
- case this.ERR_LDS_ICAO_SIGNER_INFO_MESSAGE_DIGEST_ERROR:
- return "Error - ICAO Signer info: Message digest error"
- case this.ERR_LDS_ICAO_SIGNER_INFO_SIGNED_ATTRS_MISSED:
- return "Error - ICAO Signer info: Signed attributes missed"
- case this.ERR_LDS_AUTH_SIGNER_INFO_CANT_FIND_CERTIFICATE:
- return "Error - Auth: Signer info cannot find certificate"
- case this.ERR_LDS_AUTH_ERROR:
- return "Error - Auth: Error"
- case this.ERR_LDS_AUTH_UNSUPPORTED_SIGNATURE_ALGORITHM:
- return "Error - Auth: Unsupported signature algorithm"
- case this.ERR_LDS_AUTH_UNSUPPORTED_PUBLIC_KEY_ALGORITHM:
- return "Error - Auth: Unsupported public key algorithm"
- case this.ERR_LDS_AUTH_MESSED_ALGORITHMS:
- return "Error - Auth: Messed algorithms"
- case this.ERR_LDS_AUTH_PUBLIC_KEY_DATA_INVALID:
- return "Error - Auth: Public key data invalid"
- case this.ERR_LDS_AUTH_ALGORITHM_PARAMETERS_DATA_INVALID:
- return "Error - Auth: Algorithm parameters data invalid"
- case this.ERR_LDS_AUTH_SIGNATURE_DATA_INVALID:
- return "Error - Auth: Signature data invalid"
- case this.ERR_LDS_AUTH_UNSUPPORTED_DIGEST_ALGORITHM:
- return "Error - Auth: Unsupported digest algorithm"
- case this.ERR_LDS_AUTH_SIGNATURE_DATA_INCORRECT:
- return "Error - Auth: Signature data incorrect"
- case this.ERR_LDS_AUTH_ALGORITHM_PARAMETERS_NOT_DEFINED:
- return "Error - Auth: Algorithm parameters not defined"
- case this.ERR_LDS_AUTH_SIGNATURE_CHECK_FAILED:
- return "Error - Auth: Signature check failed"
- case this.ERR_LDS_DG_WRONG_TAH:
- return "Error - DG: Wrong Tag"
- case this.ERR_LDS_PACE_INFO_NOT_AVAILABLE:
- return "Error - PACE: Info Not Available"
- case this.ERR_LDS_PACE_SYMMETRIC_CYPHER_CANT_INITIALIZE:
- return "Error - PACE: Symmetric Cypher Cannot Initialize"
- case this.ERR_LDS_PACE_KEY_AGREEMENT_CANT_INITIALIZE:
- return "Error - PACE: Key Agreement Cannot Initialize"
- case this.ERR_LDS_PACE_EPHEMERAL_KEYS_CANT_CREATE:
- return "Error - PACE: Ephemeral Keys Cannot Create"
- case this.ERR_LDS_PACE_MAPPING_CANT_DECODE_NONCE:
- return "Error - PACE: Mapping Cannot Decode Nonce"
- case this.ERR_LDS_PACE_SHARED_SECRET_CANT_CREATE:
- return "Error - PACE: Shared Secret Cannot Create"
- case this.ERR_LDS_PACE_DOMAIN_PARAMS_UNSUPPORTED_FORMAT:
- return "Error - PACE: Domain Params Unsupported Format"
- case this.ERR_LDS_PACE_EPHEMERAL_KEYS_INCORRECT:
- return "Error - PACE: Ephemeral Keys Incorrect"
- case this.ERR_LDS_PACE_MAPPING_EPHEMERAL_KEYS_INCORRECT:
- return "Error - PACE: Mapping Ephemeral Keys Incorrect"
- case this.ERR_LDS_PACE_MAPPING_CANT_PERFORM:
- return "Error - PACE: Mapping Cannot Perform"
- case this.ERR_LDS_PACE_NON_MATCHING_AUTH_TOKENS:
- return "Error - PACE: Non-Matching Auth Tokens"
- case this.ERR_LDS_CA_CANT_FIND_PUBLIC_KEY:
- return "Error - CA: Cannot Find Public Key"
- case this.ERR_LDS_CA_CANT_FIND_INFO:
- return "Error - CA: Cannot Find Info"
- case this.ERR_LDS_CA_INCORRECT_VERSION:
- return "Error - CA: Incorrect Version"
- case this.ERR_LDS_CA_CANT_FIND_DOMAIN_PARAMETERS:
- return "Error - CA: Cannot Find Domain Parameters"
- case this.ERR_LDS_CA_KEY_AGREEMENT_CANT_INITIALIZE:
- return "Error - CA: Key Agreement Cannot Initialize"
- case this.ERR_LDS_CA_PUBLIC_KEY_UNSUPPORTED_ALGORITHM:
- return "Error - CA: Public Key Unsupported Algorithm"
- case this.ERR_LDS_CA_EPHEMERAL_KEYS_CANT_CREATE:
- return "Error - CA: Ephemeral Keys Cannot Create"
- case this.ERR_LDS_CA_SHARED_SECRET_CANT_CREATE:
- return "Error - CA: Shared Secret Cannot Create"
- case this.ERR_LDS_CA_NON_MATCHING_AUTH_TOKENS:
- return "Error - CA: Non-Matching Auth Tokens"
- case this.ERR_LDS_TA_INCORRECT_VERSION:
- return "Error - TA: Incorrect Version"
- case this.ERR_LDS_TA_CANT_BUILD_CERTIFICATE_CHAIN:
- return "Error - TA: Cannot Build Certificate Chain"
- case this.ERR_LDS_TA_CANT_FIND_IS_PRIVATE_KEY:
- return "Error - TA: Cannot Find IS Private Key"
- case this.ERR_LDS_TA_PUBLIC_KEY_UNSUPPORTED_ALGORITHM:
- return "Error - TA: Public Key Unsupported Algorithm"
- case this.ERR_LDS_TA_SIGNATURE_BUILDING_ERROR:
- return "Error - TA: Signature Building Error"
- case this.ERR_LDS_TA_INVALID_KEY_ALGORITHM_PARAMETERS:
- return "Error - TA: Invalid Key Algorithm Parameters"
- case this.ERR_LDS_AA_PUBLIC_KEY_UNSUPPORTED_ALGORITHM:
- return "Error - AA: Public Key Unsupported Algorithm"
- case this.ERR_LDS_AA_PUBLIC_KEY_INCORRECT_DATA:
- return "Error - AA: Public Key Incorrect Data"
- case this.ERR_LDS_AA_PUBLIC_KEY_INCORRECT_PARAMETERS:
- return "Error - AA: Public Key Incorrect Parameters"
- case this.ERR_LDS_AA_PUBLIC_KEY_UNDEFINED_PARAMETERS:
- return "Error - AA: Public Key Undefined Parameters"
- case this.ERR_LDS_AA_SIGNATURE_INCORRECT_DATA:
- return "Error - AA: Signature Incorrect Data"
- case this.ERR_LDS_AA_UNSUPPORTED_RECOVERY_SCHEME:
- return "Error - AA: Unsupported recovery scheme"
- case this.ERR_LDS_AA_INCORRECT_TRAILER:
- return "Error - AA: Incorrect Trailer"
- case this.ERR_LDS_AA_UNSUPPORTED_DIGEST_ALGORITHM:
- return "Error - AA: Unsupported Digest Algorithm"
- case this.ERR_LDS_RI_SECTOR_KEY_CANT_FIND:
- return "Error - RI: Sector Key Cannot Find"
- case this.ERR_LDS_RI_SECTOR_KEY_INCORRECT_DATA:
- return "Error - RI: Sector Key Incorrect Data"
- case this.ERR_LDS_RI_SECTOR_KEY_INCOMPLETE_DATA:
- return "Error - RI: Sector Key Incomplete Data"
- case this.ERR_LDS_CV_CERTIFICATE_MISSING_MANDATORY_DATA_PK:
- return "Error - CV Certificate: Missing mandatory data PK"
- case this.ERR_LDS_CV_CERTIFICATE_PUBLIC_KEY_UNSUPPORTED:
- return "Error - CV Certificate: Public key unsupported"
- case this.ERR_LDS_CV_CERTIFICATE_CHAT_UNSUPPORTED_TERMINAL_TYPE:
- return "Error - CV Certificate: CHAT unsupported terminal type"
- case this.ERR_LDS_CV_CERTIFICATE_PRIVATE_KEY_UNSUPPORTED:
- return "Error - CV Certificate: Private key unsupported"
- case this.ERR_LDS_CV_CERTIFICATE_PRIVATE_KEY_INVALID_PARAMS:
- return "Error - CV Certificate: Private key invalid params"
- case this.ERR_LDS_CV_CERTIFICATE_INCORRECT_DATA:
- return "Error - CV Certificate: Incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_CPI_INCORRECT_DATA:
- return "Error - CV Certificate: CPI incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_CAR_INCORRECT_DATA:
- return "Error - CV Certificate: CAR incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_PUBLIC_KEY_INCORRECT_DATA:
- return "Error - CV Certificate: Public key incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_CHR_INCORRECT_DATA:
- return "Error - CV Certificate: CHR incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_CHAT_INCORRECT_DATA:
- return "Error - CV Certificate: CHAT incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_VALID_FROM_INCORRECT_DATA:
- return "Error - CV Certificate: Valid from incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_VALID_TO_INCORRECT_DATA:
- return "Error - CV Certificate: Valid to incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_EXTENSIONS_INCORRECT_DATA:
- return "Error - CV Certificate: Extensions incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_PRIVATE_KEY_INCORRECT_DATA:
- return "Error - CV Certificate: Private key incorrect data"
- case this.ERR_LDS_CV_CERTIFICATE_PRIVATE_KEY_MISSING:
- return "Error - CV Certificate: Private key missing"
- case this.ERR_LDS_BAP_SYMMETRIC_CYPHER_CANT_INITIALIZE:
- return "Error - BAP: Symmetric Cypher Cannot Initialize"
- case this.ERR_LDS_DG_CONTENTS_UNEXPECTED_DATA:
- return "Error - DG: Contents unexpected data"
- case this.ERR_LDS_ICAO_SIGNED_DATA_SIGNER_INFOS_EMPTY:
- return "Error - ICAO Signed data: Signer info empty"
- case this.ERR_LDS_PACE_CAM_DATA_CANT_VERIFY:
- return "Error - PACE: CAM data cannot verify"
- case this.ERR_LDS_PACE_CAM_DATA_INCORRECT:
- return "Error - PACE: CAM data incorrect"
- case this.ERR_LDS_PACE_CAM_DATA_NON_MATCHING:
- return "Error - PACE: CAM data non-matching"
- case this.ERR_LDS_PACE_IM_RANDOM_MAPPING_FAILED:
- return "Error - PACE: Random mapping failed"
- case this.ERR_LDS_PACE_IM_SCHEME_INCORRECT:
- return "Error - PACE: IM scheme incorrect"
- case this.ERR_LDS_VDS_ISSUING_COUNTRY_INCORRECT_DATA:
- return "Error - VDS: Issuing country incorrect data"
- case this.ERR_LDS_VDS_ISSUING_COUNTRY_SIZE:
- return "Error - VDS: Issuing country size"
- case this.ERR_LDS_VDS_NC_INCORRECT_DATA:
- return "Error - VDS: Incorrect data"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_CERTIFICATE:
- return "Error - VDS: Missing or incorrect certificate"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_DATA:
- return "Error - VDS: Missing or incorrect data"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_HEADER:
- return "Error - VDS: Missing or incorrect header"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_ISSUING_COUNTRY:
- return "Error - VDS: Missing or incorrect issuing country"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_MESSAGE:
- return "Error - VDS: Missing or incorrect message"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_SIGNATURE:
- return "Error - VDS: Missing or incorrect signature"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_SIG_ALGORITHM:
- return "Error - VDS: Missing or incorrect signature algorithm"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_SIG_VALUE:
- return "Error - VDS: Missing or incorrect signature value"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_TYPE:
- return "Error - VDS: Missing or incorrect type"
- case this.ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_VERSION:
- return "Error - VDS: Missing or incorrect version"
- case this.ERR_LDS_VDS_SIGNATURE_INCORRECT_DATA:
- return "Error - VDS: Signature incorrect data"
- case this.ERR_LDS_VDS_SIGNER_CERTIFICATE_DATA:
- return "Error - VDS: Signature certificate data"
- case this.ERR_LDS_VDS_SIGNER_CERTIFICATE_SIZE:
- return "Error - VDS: Signature certificate size"
- case this.ERR_LDS_VDS_UNSUPPORTED_VERSION:
- return "Error - VDS: Unsupported version"
- default:
- return value
- }
- }
}
const eRFID_CertificateType = {
@@ -2071,7 +1522,10 @@ const eRPRM_ResultType = {
RFID_RESULT_TYPE_RFID_ORIGINAL_GRAPHICS: 105,
RPRM_RESULT_TYPE_BARCODE_POSITION: 62,
RPRM_RESULT_TYPE_MRZ_POSITION: 61,
+ RPRM_RESULT_TYPE_LIVE_PORTRAIT: 32,
RPRM_RESULT_TYPE_STATUS: 33,
+ RPRM_RESULT_TYPE_PORTRAIT_COMPARISON: 34,
+ RPRM_RESULT_TYPE_EXT_PORTRAIT: 35,
}
const CameraTypes = {
@@ -2169,6 +1623,41 @@ const eRFID_AuthenticationProcedureType = {
aptGeneral: 3,
}
+const DocumentReaderErrorCodes = {
+ INITIALIZATION_CORE_ABSENT: 0,
+ INITIALIZATION_FAILED: 1,
+ INCORRECT_SCENARIO: 2,
+ NO_RESULT: 3,
+ REMOVE_DATABASE: 4,
+ FETCHING_DATABASE: 5,
+ DB_ID_NOT_FOUND: 6,
+ DB_DESCRIPTION_NOT_FOUND: 7,
+ SAVE_DB: 8,
+ DOWNLOAD_DB_INCORRECT_CHECKSUM: 9,
+ DB_DOWNLOAD: 10,
+ LICENSE_ABSENT_OR_CORRUPTED: 13,
+ LICENSE_INVALID_DATE: 14,
+ LICENSE_INVALID_VERSION: 15,
+ LICENSE_INVALID_DEVICE_ID: 16,
+ LICENSE_INVALID_SYSTEM_OR_APP_ID: 17,
+ LICENSE_NO_CAPABILITIES: 18,
+ LICENSE_NO_AUTHENTICITY: 19,
+ RECORD_PROCESS_INVALID_OUTPUT_URL: 20,
+ LICENSE_ONLINE_ERROR: 21,
+ LICENSE_NO_DATABASE: 22,
+ LICENSE_DATABASE_INCORRECT: 23,
+ INVALID_TCC_PARAMS: 24,
+ RFID_IN_PROGRESS: 25,
+ NATIVE_JAVA_EXCEPTION: 1000,
+ BACKEND_ONLINE_PROCESSING: 303,
+ WRONG_INPUT: 400,
+ STATE_EXCEPTION: 500,
+ BLE_EXCEPTION: 600,
+ FEATURE_BLUETOOTH_LE_NOT_SUPPORTED: 601,
+ APP_BACKGROUND: 700,
+ ONLINE_PROCESSING_WRONG_INPUT: 800,
+}
+
const ScenarioIdentifier = {
SCENARIO_MRZ: "Mrz",
SCENARIO_BARCODE: "Barcode",
@@ -2372,6 +1861,7 @@ const eCheckDiagnose = {
BARCODE_DATA_FORMAT_ERROR: 141,
BARCODE_SIZE_PARAMS_ERROR: 142,
NOT_ALL_BARCODES_READ: 143,
+ GLARES_IN_BARCODE_AREA: 144,
PORTRAIT_COMPARISON_PORTRAITS_DIFFER: 150,
PORTRAIT_COMPARISON_NO_SERVICE_REPLY: 151,
PORTRAIT_COMPARISON_SERVICE_ERROR: 152,
@@ -2401,8 +1891,9 @@ const eCheckDiagnose = {
OCR_QUALITY_INVALID_FONT: 221,
OCR_QUALITY_INVALID_BACKGROUND: 222,
LAS_INK_INVALID_LINES_FREQUENCY: 230,
- LAST_DIAGNOSE_VALUE: 250,
DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
+ DOC_LIVENESS_INVALID_BARCODE_BACKGROUND: 241,
+ LAST_DIAGNOSE_VALUE: 250,
}
const RFIDDelegate = {
@@ -2662,449 +2153,6 @@ const eLDS_ParsingNotificationCodes = {
NTF_LDS_AUTH_ML_SIGNER_INFO_CERTIFICATE_CANT_FIND_CSCA: 0x92000117,
NTF_LDS_AUTH_ML_SIGNER_INFO_CERTIFICATE_REVOKED: 0x92000118,
NTF_LDS_AUTH_ML_SIGNER_INFO_CERTIFICATE_SIGNATURE_INVALID: 0x92000119,
-
- getTranslation: function (value) {
- switch (value) {
- case this.NTF_LDS_ASN_CERTIFICATE_INCORRECT_VERSION:
- return "Notification - ASN certificate: Incorrect version"
- case this.NTF_LDS_ASN_CERTIFICATE_NON_MATCHING_SIGNATURE_ALGORITHM:
- return "Notification - ASN certificate: Non-matching signature algorithm"
- case this.NTF_LDS_ASN_CERTIFICATE_INCORRECT_TIME_CODING:
- return "Notification - ASN certificate: Incorrect time coding"
- case this.NTF_LDS_ASN_CERTIFICATE_INCORRECT_USE_OF_GENERALIZED_TIME:
- return "Notification - ASN certificate: Incorrect use of generalized time"
- case this.NTF_LDS_ASN_CERTIFICATE_EMPTY_ISSUER:
- return "Notification - ASN certificate: Empty issuer"
- case this.NTF_LDS_ASN_CERTIFICATE_EMPTY_SUBJECT:
- return "Notification - ASN certificate: Empty subject"
- case this.NTF_LDS_ASN_CERTIFICATE_UNSUPPORTED_CRITICAL_EXTENSION:
- return "Notification - ASN certificate: Unsupported critical extension"
- case this.NTF_LDS_ASN_CERTIFICATE_FORCED_DEFAULT_CSCA_ROLE:
- return "Notification - ASN certificate: Forced default CSCA role"
- case this.NTF_LDS_ASN_CERTIFICATE_FORCED_DEFAULT_DS_ROLE:
- return "Notification - ASN certificate: Forced Default DS role"
- case this.NTF_LDS_ASN_CERTIFICATE_INCORRECT_ISSUER_SUBJECT_DS:
- return "Notification - ASN certificate: Incorrect issuer subject DS"
- case this.NTF_LDS_ASN_CERTIFICATE_DUPLICATING_EXTENSIONS:
- return "Notification - ASN certificate: Duplicating extensions"
- case this.NTF_LDS_ICAO_CERTIFICATE_VERSION_MISSED:
- return "Notification - ICAO certificate: Version missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_VERSION_INCORRECT:
- return "Notification - ICAO certificate: Version incorrect"
- case this.NTF_LDS_ICAO_CERTIFICATE_ISSUER_COUNTRY_MISSED:
- return "Notification - ICAO certificate: Issuer country missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_ISSUER_COMMON_NAME_MISSED:
- return "Notification - ICAO certificate: Issuer common name missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_ISSUER_COUNTRY_NON_COMPLIANT:
- return "Notification - ICAO certificate: Issuer country non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_SUBJECT_COUNTRY_MISSED:
- return "Notification - ICAO certificate: Subject country missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_SUBJECT_COMMON_NAME_MISSED:
- return "Notification - ICAO certificate: Subject common name missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_SUBJECT_COUNTRY_NON_COMPLIANT:
- return "Notification - ICAO certificate: Subject country non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_USING_NON_COMPLIANT_DATA:
- return "Notification - ICAO certificate: Using non-compliant data"
- case this.NTF_LDS_ICAO_CERTIFICATE_UNSUPPORTED_SIGNATURE_ALGORITHM:
- return "Notification - ICAO certificate: Unsupported signature algorithm"
- case this.NTF_LDS_ICAO_CERTIFICATE_UNSUPPORTED_PUBLIC_KEY_ALGORITHM:
- return "Notification - ICAO certificate: Unsupported public key algorithm"
- case this.NTF_LDS_ICAO_CERTIFICATE_MISSED_EXTENSIONS:
- return "Notification - ICAO certificate: Missed extensions"
- case this.NTF_LDS_ICAO_CERTIFICATE_VALIDITY:
- return "Notification - ICAO certificate: Validity"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_USING_NON_COMPLIANT_DATA:
- return "Notification - ICAO certificate extension: Using non-compliant data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_KEY_USAGE_MISSED:
- return "Notification - ICAO certificate extension: Key usage missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_KEY_USAGE_NOT_CRITICAL:
- return "Notification - ICAO certificate extension: Key usage not critical"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_KEY_USAGE_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: Key usage incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_BASIC_C_MISSED:
- return "Notification - ICAO certificate extension: Basic constraints missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_BASIC_C_INCORRECT_USAGE1:
- return "Notification - ICAO certificate extension: Basic constraints incorrect usage 1"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_BASIC_C_INCORRECT_USAGE2:
- return "Notification - ICAO certificate extension: Basic constraints incorrect usage 2"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_BASIC_C_NOT_CRITICAL:
- return "Notification - ICAO certificate extension: Basic constraints not critical"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_BASIC_C_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: Basic constraints incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_BASIC_C_PATH_LEN_C_MISSED:
- return "Notification - ICAO certificate extension: Basic constraints path LenC missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_BASIC_C_PATH_LEN_C_INCORRECT:
- return "Notification - ICAO certificate extension: Basic constraints path LenC incorrect"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_EXT_KEY_USAGE_NOT_CRITICAL:
- return "Notification - ICAO certificate extension: Ext key usage not critical"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_EXT_KEY_USAGE_INCORRECT_USAGE:
- return "Notification - ICAO certificate extension: Ext key usage incorrect usage"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_EXT_KEY_USAGE_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: Ext key usage incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_AUTH_KEY_ID_MISSED:
- return "Notification - ICAO certificate extension Auth key: ID missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_AUTH_KEY_ID_INCORRECT_DATA:
- return "Notification - ICAO certificate extension Auth key: Incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_AUTH_KEY_ID_KEY_ID_MISSED:
- return "Notification - ICAO certificate extension Auth key: Key ID missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_KEY_ID_MISSED:
- return "Notification - ICAO certificate extension: Subject key ID missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_KEY_ID_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: Subject key ID incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_PRIVATE_KEY_UP_MISSED:
- return "Notification - ICAO certificate extension: Private key UP missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_PRIVATE_KEY_UP_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: Private key UP incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_PRIVATE_KEY_UP_EMPTY:
- return "Notification - ICAO certificate extension: Private key UP empty"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_ALT_NAME_MISSED:
- return "Notification - ICAO certificate extension: Subject alt name missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_ALT_NAME_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: Subject alt name incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_ALT_NAME_EMPTY:
- return "Notification - ICAO certificate extension: Subject alt name empty"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_ALT_NAME_NON_COMPLIANT:
- return "Notification - ICAO certificate extension: Subject alt name non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_ALT_NAME_CRITICAL:
- return "Notification - ICAO certificate extension: Subject alt name critical"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_ALT_NAME_DN_EMPTY:
- return "Notification - ICAO certificate extension: Subject alt name DN empty"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_ALT_NAME_DN_INCORRECT:
- return "Notification - ICAO certificate extension: Subject alt name DN incorrect"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_SUBJECT_ALT_NAME_DN_NON_COMPLIANT:
- return "Notification - ICAO certificate extension: Subject alt name DN non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_ISSUER_ALT_NAME_MISSED:
- return "Notification - ICAO certificate extension: Issuer alt name missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_ISSUER_ALT_NAME_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: Issuer alt name incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_ISSUER_ALT_NAME_EMPTY:
- return "Notification - ICAO certificate extension: Issuer alt name empty"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_ISSUER_ALT_NAME_NON_COMPLIANT:
- return "Notification - ICAO certificate extension: Issuer alt name non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_ISSUER_ALT_NAME_DN_EMPTY:
- return "Notification - ICAO certificate extension: Issuer alt name DN empty"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_ISSUER_ALT_NAME_DN_INCORRECT:
- return "Notification - ICAO certificate extension: Issuer alt name DN incorrect"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_ISSUER_ALT_NAME_DN_NON_COMPLIANT:
- return "Notification - ICAO certificate extension: Issuer alt name DN non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_DOC_TYPE_LIST_MISSED:
- return "Notification - ICAO certificate extension Doc type list: Missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_DOC_TYPE_LIST_INCORRECT_DATA:
- return "Notification - ICAO certificate extension Doc type list: Incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_DOC_TYPE_LIST_VERSION:
- return "Notification - ICAO certificate extension Doc type list: Version"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_DOC_TYPE_LIST_DOC_TYPES:
- return "Notification - ICAO certificate extension Doc type list: Doc types"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_DOC_TYPE_LIST_DOC_TYPES_EMPTY:
- return "Notification - ICAO certificate extension Doc type list: Doc types empty"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_CERT_POLICIES_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: Dert policies incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_CERT_POLICIES_EMPTY:
- return "Notification - ICAO certificate extension: Cert policies empty"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_CERT_POLICIES_POLICY_ID_MISSED:
- return "Notification - ICAO certificate extension: Cert policies policy ID missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_CRL_DIST_POINT_MISSED:
- return "Notification - ICAO certificate extension: CRL dist point missed"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_CRL_DIST_POINT_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: CRL dist point incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_CRL_DIST_POINT_EMPTY:
- return "Notification - ICAO certificate extension: CRL dist point empty"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_CRL_DIST_POINT_POINT_MISSED:
- return "Notification - ICAO certificate extension: CRL dist point point missed"
- case this.NTF_LDS_ICAO_COM_LDS_VERSION_INCORRECT:
- return "Notification - ICAO COM: LDS version incorrect"
- case this.NTF_LDS_ICAO_COM_LDS_VERSION_MISSING:
- return "Notification - ICAO COM: LDS version missing"
- case this.NTF_LDS_ICAO_COM_UNICODE_VERSION_INCORRECT:
- return "Notification - ICAO COM: Unicode version incorrect"
- case this.NTF_LDS_ICAO_COM_UNICODE_VERSION_MISSING:
- return "Notification - ICAO COM: Unicode version missing"
- case this.NTF_LDS_ICAO_COM_DGPM_INCORRECT:
- return "Notification - ICAO COM: DGPM incorrect"
- case this.NTF_LDS_ICAO_COM_DGPM_MISSING:
- return "Notification - ICAO COM: DGPM missing"
- case this.NTF_LDS_ICAO_COM_DGPM_UNEXPECTED:
- return "Notification - ICAO COM: DGPM unexpected"
- case this.NTF_LDS_ICAO_APPLICATION_LDS_VERSION_UNSUPPORTED:
- return "Notification - ICAO application: LDS version unsupported"
- case this.NTF_LDS_ICAO_APPLICATION_UNICODE_VERSION_UNSUPPORTED:
- return "Notification - ICAO application: Unicode version unsupported"
- case this.NTF_LDS_ICAO_APPLICATION_LDS_VERSION_INCONSISTENT:
- return "Notification - ICAO application: LDS version inconsistent"
- case this.NTF_LDS_ICAO_APPLICATION_UNICODE_VERSION_INCONSISTENT:
- return "Notification - ICAO application: Unicode version inconsistent"
- case this.NTF_LDS_ASN_SIGNED_DATA_OID_INCORRECT:
- return "Notification - ASN signed data: OID incorrect"
- case this.NTF_LDS_ASN_SIGNED_DATA_VERSION_INCORRECT:
- return "Notification - ASN signed data: Version incorrect"
- case this.NTF_LDS_ICAO_SIGNED_DATA_VERSION_INCORRECT:
- return "Notification - ICAO signed data: Version incorrect"
- case this.NTF_LDS_ICAO_SIGNED_DATA_DIGEST_ALGORITHMS_EMPTY:
- return "Notification - ICAO signed data: Digest algorithms empty"
- case this.NTF_LDS_ICAO_SIGNED_DATA_DIGEST_ALGORITHMS_UNSUPPORTED:
- return "Notification - ICAO signed data: Digest algorithms unsupported"
- case this.NTF_LDS_ICAO_SIGNED_DATA_SIGNER_INFOS_MULTIPLE_ENTRIES:
- return "Notification - ICAO signed data: Signer infos multiple entries"
- case this.NTF_LDS_ICAO_SIGNED_DATA_CERTIFICATES_MISSED:
- return "Notification - ICAO signed data: Certificates missed"
- case this.NTF_LDS_ICAO_SIGNED_DATA_CERTIFICATES_EMPTY:
- return "Notification - ICAO signed data: Certificates empty"
- case this.NTF_LDS_ICAO_SIGNED_DATA_CRLS_INCORRECT_USAGE:
- return "Notification - ICAO signed data: CRLs incorrect usage"
- case this.NTF_LDS_ICAO_LDS_OBJECT_INCORRECT_CONTENT_OID:
- return "Notification - ICAO LDS object: Incorrect content OID"
- case this.NTF_LDS_ICAO_LDS_OBJECT_DG_NUMBER_INCORRECT:
- return "Notification - ICAO LDS object: DG number incorrect"
- case this.NTF_LDS_ICAO_LDS_OBJECT_DG_HASH_MISSING:
- return "Notification - ICAO LDS object: DG hash missing"
- case this.NTF_LDS_ICAO_LDS_OBJECT_DG_HASH_EXTRA:
- return "Notification - ICAO LDS object: DG hash extra"
- case this.NTF_LDS_ICAO_LDS_OBJECT_VERSION_INCORRECT:
- return "Notification - ICAO LDS object: Version incorrect"
- case this.NTF_LDS_ICAO_MASTER_LIST_VERSION_INCORRECT:
- return "Notification - ICAO master list: Version incorrect"
- case this.NTF_LDS_ASN_SIGNER_INFO_VERSION_INCORRECT:
- return "Notification - ASN signer info: Version incorrect"
- case this.NTF_LDS_ASN_SIGNER_INFO_SID_INCORRECT_CHOICE:
- return "Notification - ASN signer info: SID incorrect choice"
- case this.NTF_LDS_ASN_SIGNER_INFO_SID_DIGEST_ALGORITHM_NOT_LISTED:
- return "Notification - ASN signer info: SID digest algorithm not listed"
- case this.NTF_LDS_ASN_SIGNER_INFO_MESSAGE_DIGEST_ATTR_MISSING:
- return "Notification - ASN signer info: Message digest attr missing"
- case this.NTF_LDS_ASN_SIGNER_INFO_MESSAGE_DIGEST_ATTR_DATA:
- return "Notification - ASN signer info: Message digest attr data"
- case this.NTF_LDS_ASN_SIGNER_INFO_MESSAGE_DIGEST_ATTR_Value:
- return "Notification - ASN signer info: Message digest attr value"
- case this.NTF_LDS_ASN_SIGNER_INFO_CONTENT_TYPE_ATTR_MISSING:
- return "Notification - ASN signer info: Content type attr missing"
- case this.NTF_LDS_ASN_SIGNER_INFO_CONTENT_TYPE_ATTR_DATA:
- return "Notification - ASN signer info: Content type attr data"
- case this.NTF_LDS_ASN_SIGNER_INFO_CONTENT_TYPE_ATTR_VALUE:
- return "Notification - ASN signer info: Content type attr value"
- case this.NTF_LDS_ASN_SIGNER_INFO_SIGNING_TIME_ATTR_MISSING:
- return "Notification - ASN signer info: Signing time attr missing"
- case this.NTF_LDS_ASN_SIGNER_INFO_SIGNING_TIME_ATTR_DATA:
- return "Notification - ASN signer info: Signing time attr data"
- case this.NTF_LDS_ASN_SIGNER_INFO_SIGNING_TIME_ATTR_VALUE:
- return "Notification - ASN signer info: Signing time attr value"
- case this.NTF_LDS_AUTH_SIGNER_INFO_CERTIFICATE_VALIDITY:
- return "Notification - Auth signer info: Certificate validity"
- case this.NTF_LDS_AUTH_SIGNER_INFO_CERTIFICATE_ROOT_IS_NOT_TRUSTED:
- return "Notification - Auth signer info: Certificate root is not trusted"
- case this.NTF_LDS_AUTH_SIGNER_INFO_CERTIFICATE_CANT_FIND_CSCA:
- return "Notification - Auth signer info: Certificate cannot find CSCA"
- case this.NTF_LDS_AUTH_SIGNER_INFO_CERTIFICATE_REVOKED:
- return "Notification - Auth signer info: Certificate revoked"
- case this.NTF_LDS_AUTH_SIGNER_INFO_CERTIFICATE_SIGNATURE_INVALID:
- return "Notification - Auth signer info: Certificate signature invalid"
- case this.NTF_LDS_UNSUPPORTED_IMAGE_FORMAT:
- return "Notification: Unsupported image format"
- case this.NTF_LDS_MRZ_DOCUMENT_TYPE_UNKNOWN:
- return "Notification - MRZ: Document type unknown"
- case this.NTF_LDS_MRZ_ISSUING_STATE_SYNTAX_ERROR:
- return "Notification - MRZ: Issuing state syntax error"
- case this.NTF_LDS_MRZ_NAME_IS_VOID:
- return "Notification - MRZ: Name is void"
- case this.NTF_LDS_MRZ_NUMBER_INCORRECT_CHECKSUM:
- return "Notification - MRZ: Number incorrect checksum"
- case this.NTF_LDS_MRZ_NATIONALITY_SYNTAX_ERROR:
- return "Notification - MRZ: Nationality syntax error"
- case this.NTF_LDS_MRZ_DOB_SYNTAX_ERROR:
- return "Notification - MRZ: DOB syntax error"
- case this.NTF_LDS_MRZ_DOB_ERROR:
- return "Notification - MRZ: DOB error"
- case this.NTF_LDS_MRZ_DOB_INCORRECT_CHECKSUM:
- return "Notification - MRZ: DOB incorrect checksum"
- case this.NTF_LDS_MRZ_SEX_INCORRECT:
- return "Notification - MRZ: Sex incorrect"
- case this.NTF_LDS_MRZ_DOE_SYNTAX_ERROR:
- return "Notification - MRZ: DOE syntax error"
- case this.NTF_LDS_MRZ_DOE_ERROR:
- return "Notification - MRZ: DOE error"
- case this.NTF_LDS_MRZ_DOE_INCORRECT_CHECKSUM:
- return "Notification - MRZ: DOE incorrect checksum"
- case this.NTF_LDS_MRZ_OPTIONAL_DATA_INCORRECT_CHECKSUM:
- return "Notification - MRZ: Optional data incorrect checksum"
- case this.NTF_LDS_MRZ_INCORRECT_CHECKSUM:
- return "Notification - MRZ: Incorrect checksum"
- case this.NTF_LDS_MRZ_INCORRECT:
- return "Notification - MRZ: Incorrect"
- case this.NTF_LDS_BIOMETRICS_FORMAT_OWNER_MISSING:
- return "Notification - Biometrics: Format owner missing"
- case this.NTF_LDS_BIOMETRICS_FORMAT_OWNER_INCORRECT:
- return "Notification - Biometrics: Format owner incorrect"
- case this.NTF_LDS_BIOMETRICS_FORMAT_TYPE_MISSING:
- return "Notification - Biometrics: Format type missing"
- case this.NTF_LDS_BIOMETRICS_FORMAT_TYPE_INCORRECT:
- return "Notification - Biometrics: Format type incorrect"
- case this.NTF_LDS_BIOMETRICS_TYPE_INCORRECT:
- return "Notification - Biometrics: Type incorrect"
- case this.NTF_LDS_BIOMETRICS_SUB_TYPE_MISSING:
- return "Notification - Biometrics: Subtype missing"
- case this.NTF_LDS_BIOMETRICS_SUB_TYPE_INCORRECT:
- return "Notification - Biometrics: Subtype incorrect"
- case this.NTF_LDS_BIOMETRICS_BDB_IMAGE_MISSING:
- return "Notification - Biometrics: BDB image missing"
- case this.NTF_LDS_BIOMETRICS_BDB_FORMAT_ID_INCORRECT:
- return "Notification - Biometrics: BDB format ID incorrect"
- case this.NTF_LDS_BIOMETRICS_BDB_VERSION_INCORRECT:
- return "Notification - Biometrics: BDB version incorrect"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_LENGTH_INCORRECT:
- return "Notification - Biometrics: BDB data length incorrect"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_GENDER:
- return "Notification - Biometrics: BDB Data Gender"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_EYE_COLOR:
- return "Notification - Biometrics: BDB Data Eye Color"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_HAIR_COLOR:
- return "Notification - Biometrics: BDB Data Hair Color"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_POSE_ANGLE_YAW:
- return "Notification - Biometrics: BDB Data Pose Angle Yaw"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_POSE_ANGLE_PITCH:
- return "Notification - Biometrics: BDB Data Pose Angle Pitch"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_POSE_ANGLE_ROLL:
- return "Notification - Biometrics: BDB Data Pose Angle Roll"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_POSE_ANGLE_U_YAW:
- return "Notification - Biometrics: BDB Data Pose Angle U Yaw"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_POSE_ANGLE_U_PITCH:
- return "Notification - Biometrics: BDB Data Pose Angle U Pitch"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_POSE_ANGLE_U_ROLL:
- return "Notification - Biometrics: BDB Data Pose Angle U Roll"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_FACE_IMAGE_TYPE:
- return "Notification - Biometrics: BDB Data Face Image Type"
- case this.NTF_LDS_BIOMETRICS_BDB_DATA_IMAGE_DATA_TYPE:
- return "Notification - Biometrics: BDB Data Image Data Type"
- case this.NTF_LDS_SI_PACE_INFO_UNSUPPORTED_STD_PARAMETERS:
- return "Notification - SI: PACE Info Unsupported Std Parameters"
- case this.NTF_LDS_SI_PACE_INFO_DEPRECATED_VERSION:
- return "Notification - SI: PACE Info Deprecated Version"
- case this.NTF_LDS_SI_PACE_DOMAIN_PARAMS_USING_STD_REF:
- return "Notification - SI: PACE Domain Params Using Std Ref"
- case this.NTF_LDS_SI_PACE_DOMAIN_PARAMS_UNSUPPORTED_ALGORITHM:
- return "Notification - SI: PACE Domain Params Unsupported Algorithm"
- case this.NTF_LDS_SI_CA_INFO_INCORRECT_VERSION:
- return "Notification - SI: CA Info Incorrect Version"
- case this.NTF_LDS_SI_CA_PUBLIC_KEY_UNSUPPORTED_ALGORITHM:
- return "Notification - SI: CA PublicKey Unsupported Algorithm"
- case this.NTF_LDS_SI_CA_DOMAIN_PARAMS_UNSUPPORTED_ALGORITHM:
- return "Notification - SI: CA Domain Params Unsupported Algorithm"
- case this.NTF_LDS_SI_TA_INFO_INCORRECT_VERSION:
- return "Notification - SI: TA Info Incorrect Version"
- case this.NTF_LDS_SI_TA_INFO_FILE_ID_FOR_VERSION2:
- return "Notification - SI: TA Info File ID For Version 2"
- case this.NTF_LDS_SI_EID_SECURITY_UNSUPPORTED_DIGEST_ALGORITHM:
- return "Notification - SI: eID Security Unsupported Digest Algorithm"
- case this.NTF_LDS_SI_RI_INFO_INCORRECT_VERSION:
- return "Notification - SI: RI info incorrect version"
- case this.NTF_LDS_SI_RI_DOMAIN_PARAMS_UNSUPPORTED_ALGORITHM:
- return "Notification - SI: RI domain params unsupported algorithm"
- case this.NTF_LDS_SI_AA_INFO_INCORRECT_VERSION:
- return "Notification - SI: AA info incorrect version"
- case this.NTF_LDS_SI_AA_INFO_UNSUPPORTED_ALGORITHM:
- return "Notification - SI: AA info unsupported algorithm"
- case this.NTF_LDS_SI_AA_INFO_INCONSISTENT_ALGORITHM_REFERENCE:
- return "Notification - SI: AA info inconsistent algorithm reference"
- case this.NTF_LDS_SI_STORAGE_PACE_INFO_NOT_AVAILABLE:
- return "Notification - SI: PACE Info Not Available"
- case this.NTF_LDS_SI_STORAGE_PACE_INFO_NO_STD_PARAMETERS:
- return "Notification - SI: PACE Info No Std Parameters"
- case this.NTF_LDS_SI_STORAGE_PACE_INFO_NO_MATCHING_DOMAIN_PARAMS:
- return "Notification - SI: PACE Info No Matching Domain Params"
- case this.NTF_LDS_SI_STORAGE_CA_INFO_NOT_AVAILABLE:
- return "Notification - SI: CA Info Not Available"
- case this.NTF_LDS_SI_STORAGE_CA_DOMAIN_PARAMS_NO_REQUIRED_OPTION:
- return "Notification - SI: CA Domain Params No Required Option"
- case this.NTF_LDS_SI_STORAGE_CA_DOMAIN_PARAMS_NOT_AVAILABLE:
- return "Notification - SI: CA Domain Params Not Available"
- case this.NTF_LDS_SI_STORAGE_CA_ANONYMOUS_INFOS:
- return "Notification - SI: CA Anonymous Infos"
- case this.NTF_LDS_SI_STORAGE_CA_INFO_NO_MATCHING_DOMAIN_PARAMS:
- return "Notification - SI: CA Info No Matching Domain Params"
- case this.NTF_LDS_SI_STORAGE_CA_INFO_NO_MATCHING_PUBLIC_KEY:
- return "Notification - SI: CA Info No Matching Public Key"
- case this.NTF_LDS_SI_STORAGE_CA_INCORRECT_INFOS_QUANTITY:
- return "Notification - SI: CA Incorrect Infos Quantity"
- case this.NTF_LDS_SI_STORAGE_TA_INFO_NOT_AVAILABLE:
- return "Notification - SI: TA Info Not Available"
- case this.NTF_LDS_SI_STORAGE_CARD_INFO_LOCATOR_MULTIPLE_ENTRIES:
- return "Notification - SI: Card Info Locator Multiple Entries"
- case this.NTF_LDS_SI_STORAGE_EID_SECURITY_INFO_MULTIPLE_ENTRIES:
- return "Notification - SI: eID Security Info Multiple Entries"
- case this.NTF_LDS_SI_STORAGE_PRIVILEGED_TI_MULTIPLE_ENTRIES:
- return "Notification - SI: Privileged TI Multiple Entries"
- case this.NTF_LDS_SI_STORAGE_PRIVILEGED_TI_INCORRECT_USAGE:
- return "Notification - SI: Privileged TI Incorrect Usage"
- case this.NTF_LDS_SI_STORAGE_RI_DOMAIN_PARAMS_MULTIPLE_ENTRIES:
- return "Notification - SI: RI domain params multiple entries"
- case this.NTF_LDS_SI_STORAGE_PACE_INFOS_NON_CONSISTANT:
- return "Notification - SI: Storage PACE Info Non Consistant"
- case this.NTF_LDS_CV_CERTIFICATE_PROFILE_INCORRECT_VERSION:
- return "Notification - CV Certificate: Profile incorrect version"
- case this.NTF_LDS_CV_CERTIFICATE_VALIDITY:
- return "Notification - CV Certificate: Validity"
- case this.NTF_LDS_CV_CERTIFICATE_NON_CV_CA_DOMAIN_PARAMETERS:
- return "Notification - CV Certificate: Non CVCA domain parameters"
- case this.NTF_LDS_CV_CERTIFICATE_PRIVATE_KEY_INCORRECT_VERSION:
- return "Notification - CV Certificate: Private key incorrect version"
- case this.NTF_LDS_TA_PACE_STATIC_BINDING_USED:
- return "Notification - TA: PACE static binding used"
- case this.NTF_LDS_AUTH_ML_SIGNER_INFO_CERTIFICATE_VALIDITY:
- return "Notification - Auth ML signer info: Certificate validity"
- case this.NTF_LDS_AUTH_ML_SIGNER_INFO_CERTIFICATE_ROOT_IS_NOT_TRUSTED:
- return "Notification - Auth ML signer info: Certificate root is not trusted"
- case this.NTF_LDS_AUTH_ML_SIGNER_INFO_CERTIFICATE_CANT_FIND_CSCA:
- return "Notification - Auth ML signer info: Certificate cannot find CSCA"
- case this.NTF_LDS_AUTH_ML_SIGNER_INFO_CERTIFICATE_REVOKED:
- return "Notification - Auth ML signer info: Certificate revoked"
- case this.NTF_LDS_AUTH_ML_SIGNER_INFO_CERTIFICATE_SIGNATURE_INVALID:
- return "Notification - Auth ML signer info: Certificate signature invalid"
- case this.NTF_LDS_ASN_SIGNED_DATA_CONTENT_OID_INCORRECT:
- return "Notification - ASN signed data: Content OID incorrect"
- case this.NTF_LDS_ASN_SIGNER_INFO_LIST_CONTENT_DESCRIPTION_ATTR_DATA:
- return "Notification - ASN signer info: List content description attr data"
- case this.NTF_LDS_ASN_SIGNER_INFO_LIST_CONTENT_DESCRIPTION_ATTR_MISSING:
- return "Notification - ASN signer info: List content description attr missing"
- case this.NTF_LDS_BSI_BLACK_LIST_VERSION_INCORRECT:
- return "Notification - BSI: Black list version incorrect"
- case this.NTF_LDS_BSI_DEFECT_LIST_VERSION_INCORRECT:
- return "Notification - BSI: Defect list version incorrect"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_CSCA_ALT_NAMES_NON_MATCHING:
- return "Notification - ICAO certificate extension: CSCA alt names non-matching"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_DOC_TYPE_LIST_CRITICAL:
- return "Notification - ICAO certificate extension Doc type list: Critical"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_DOC_TYPE_LIST_NON_COMPLIANT:
- return "Notification - ICAO certificate extension Doc type list: non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_ISSUER_ALT_NAME_CRITICAL:
- return "Notification - ICAO certificate extension: Issuer alt name critical"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_NAME_CHANGE_CRITICAL:
- return "Notification - ICAO certificate extension: Name change critical"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_NAME_CHANGE_INCORRECT_DATA:
- return "Notification - ICAO certificate extension: Name change incorrect data"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_NAME_CHANGE_NON_COMPLIANT:
- return "Notification - ICAO certificate extension: Name change non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_EXT_OPTIONAL_CRITICAL:
- return "Notification - ICAO certificate extension: Optional critical"
- case this.NTF_LDS_ICAO_CERTIFICATE_ISSUER_ATTRIBUTE_NON_COMPLIANT:
- return "Notification - ICAO certificate: Issuer attribute non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_ISSUER_SN_NON_COMPLIANT:
- return "Notification - ICAO certificate: Issuer SN non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_ISSUER_SUBJECT_COUNTRY_NON_MATCHING:
- return "Notification - ICAO certificate: Issuer subject country non-matching"
- case this.NTF_LDS_ICAO_CERTIFICATE_SN_NON_COMPLIANT:
- return "Notification - ICAO certificate: SN non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_SUBJECT_ATTRIBUTE_NON_COMPLIANT:
- return "Notification - ICAO certificate: Subject attribute non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_SUBJECT_COMMON_NAME_NON_COMPLIANT:
- return "Notification - ICAO certificate: Subject common name non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_SUBJECT_NON_COMPLIANT:
- return "Notification - ICAO certificate: Subject non-compliant"
- case this.NTF_LDS_ICAO_CERTIFICATE_SUBJECT_SN_NON_COMPLIANT:
- return "Notification - ICAO certificate: Subject SN non-compliant"
- case this.NTF_LDS_ICAO_DEVIATION_LIST_VERSION_INCORRECT:
- return "Notification - ICAO Deviation list: Version incorrect"
- default:
- return value
- }
- }
}
const eImageQualityCheckType = {
@@ -3117,31 +2165,6 @@ const eImageQualityCheckType = {
IQC_SCREEN_CAPTURE: 6,
IQC_PORTRAIT: 7,
IQC_HANDWRITTEN: 8,
-
- getTranslation: function (value) {
- switch (value) {
- case this.IQC_IMAGE_GLARES:
- return "Glares"
- case this.IQC_IMAGE_FOCUS:
- return "Focus"
- case this.IQC_IMAGE_RESOLUTION:
- return "Resolution"
- case this.IQC_IMAGE_COLORNESS:
- return "Color"
- case this.IQC_PERSPECTIVE:
- return "Perspective angle"
- case this.IQC_BOUNDS:
- return "Bounds"
- case this.IQC_SCREEN_CAPTURE:
- return "Moire pattern"
- case this.IQC_PORTRAIT:
- return "Portrait"
- case this.IQC_HANDWRITTEN:
- return "Handwritten"
- default:
- return value
- }
- }
}
const MRZFormat = {
@@ -3173,10 +2196,11 @@ const BarcodeType = {
DATAMATRIX: 16,
ALL_1D: 17,
CODE11: 18,
+ JABCODE: 19,
}
const eRPRM_SecurityFeatureType = {
- SECURITY_FEATURE_TYPE_NONE: -1,
+ NONE: -1,
SECURITY_FEATURE_TYPE_BLANK: 0,
SECURITY_FEATURE_TYPE_FILL: 1,
SECURITY_FEATURE_TYPE_PHOTO: 2,
@@ -3221,6 +2245,7 @@ const eRPRM_SecurityFeatureType = {
SECURITY_FEATURE_TYPE_BARCODE_SIZE_CHECK: 42,
SECURITY_FEATURE_TYPE_LAS_INK: 43,
SECURITY_FEATURE_TYPE_LIVENESS_MLI: 44,
+ SECURITY_FEATURE_TYPE_LIVENESS_BARCODE_BACKGROUND: 45,
}
const OnlineMode = {
@@ -3512,57 +2537,6 @@ const eGraphicFieldType = {
GF_FINGER_RIGHT_MIDDLE: 307,
GF_FINGER_RIGHT_RING: 308,
GF_FINGER_RIGHT_LITTLE: 309,
-
- getTranslation: function (value) {
- switch (value) {
- case this.GF_PORTRAIT:
- return "Portrait"
- case this.GF_FINGERPR:
- return "Fingerprint"
- case this.GF_EYE:
- return "Iris"
- case this.GF_SIGNATURE:
- return "Signature"
- case this.GF_BAR_CODE:
- return "Barcode"
- case this.GF_PROOF_OF_CITIZENSHIP:
- return "Proof of citizenship"
- case this.GF_DOCUMENT_IMAGE:
- return "Document image"
- case this.GF_COLOR_DYNAMIC:
- return "Color dynamics"
- case this.GF_GHOST_PORTRAIT:
- return "Ghost portrait"
- case this.GF_STAMP:
- return "Stamp"
- case this.GF_PORTRAIT_OF_CHILD:
- return "Portrait of child"
- case this.GF_OTHER:
- return "Other"
- case this.GF_FINGER_LEFT_THUMB:
- return "Left thumb"
- case this.GF_FINGER_LEFT_INDEX:
- return "Left index finger"
- case this.GF_FINGER_LEFT_MIDDLE:
- return "Left middle finger"
- case this.GF_FINGER_LEFT_RING:
- return "Left ring finger"
- case this.GF_FINGER_LEFT_LITTLE:
- return "Left little finger"
- case this.GF_FINGER_RIGHT_THUMB:
- return "Right thumb"
- case this.GF_FINGER_RIGHT_INDEX:
- return "Right index finger"
- case this.GF_FINGER_RIGHT_MIDDLE:
- return "Right middle finger"
- case this.GF_FINGER_RIGHT_RING:
- return "Right ring finger"
- case this.GF_FINGER_RIGHT_LITTLE:
- return "Right little finger"
- default:
- return value
- }
- }
}
const RegDeviceConfigType = {
@@ -3681,169 +2655,6 @@ const eRFID_DataFile_Type = {
DFT_VDS: 900,
DFT_VDSNC: 901,
DFT_USERDEFINED: 1000,
-
- getTranslation: function (value) {
- switch (value) {
- case this.DFT_MIFARE_DATA:
- return "MIFARE data"
- case this.DFT_DL_COM:
- return "EF.COM"
- case this.DFT_PASSPORT_DG1:
- return "Machine Readable Zone (DG1)"
- case this.DFT_ID_DG1:
- return "Document type" + " (DG1)"
- case this.DFT_DL_DG1:
- return "Text data elements (DG1)"
- case this.DFT_PASSPORT_DG2:
- return "Biometry - Facial data (DG2)"
- case this.DFT_ID_DG2:
- return "Issuing state" + " (DG2)"
- case this.DFT_DL_DG2:
- return "License holder information (DG2)"
- case this.DFT_PASSPORT_DG3:
- return "Biometry - Fingerprint(s) (DG3)"
- case this.DFT_ID_DG3:
- return "Date of expiry" + " (DG3)"
- case this.DFT_DL_DG3:
- return "Issuing authority details (DG3)"
- case this.DFT_PASSPORT_DG4:
- return "Biometry - Iris Data (DG4)"
- case this.DFT_ID_DG4:
- return "Given name" + " (DG4)"
- case this.DFT_DL_DG4:
- return "Portrait image (DG4)"
- case this.DFT_PASSPORT_DG5:
- return "Portrait(s) (DG5)"
- case this.DFT_ID_DG5:
- return "Family name" + " (DG5)"
- case this.DFT_DL_DG5:
- return "Signature / usual mark image (DG5)"
- case this.DFT_PASSPORT_DG6:
- return "not defined (DG6)"
- case this.DFT_ID_DG6:
- return "Pseudonym" + " (DG6)"
- case this.DFT_DL_DG6:
- return "Biometry - Facial data (DG6)"
- case this.DFT_PASSPORT_DG7:
- return "Signature / usual mark image (DG7)"
- case this.DFT_ID_DG7:
- return "Academic title" + " (DG7)"
- case this.DFT_DL_DG7:
- return "Biometry - Fingerprint(s) (DG7)"
- case this.DFT_PASSPORT_DG8:
- return "not defined (DG8)"
- case this.DFT_ID_DG8:
- return "Date of birth" + " (DG8)"
- case this.DFT_DL_DG8:
- return "Biometry - Iris Data (DG8)"
- case this.DFT_PASSPORT_DG9:
- return "not defined (DG9)"
- case this.DFT_ID_DG9:
- return "Place of birth" + " (DG9)"
- case this.DFT_DL_DG9:
- return "Biometry - Other (DG9)"
- case this.DFT_PASSPORT_DG10:
- return "not defined (DG10)"
- case this.DFT_ID_DG10:
- return "Nationality" + " (DG10)"
- case this.DFT_DL_DG10:
- return "not defined (DG10)"
- case this.DFT_PASSPORT_DG11:
- return "Additional personal detail(s) (DG11)"
- case this.DFT_ID_DG11:
- return "Sex" + " (DG11)"
- case this.DFT_DL_DG11:
- return "Optional domestic data (DG11)"
- case this.DFT_PASSPORT_DG12:
- return "Additional document details (DG12)"
- case this.DFT_ID_DG12:
- return "Optional details" + " (DG12)"
- case this.DFT_DL_DG12:
- return "Non-match alert (DG12)"
- case this.DFT_PASSPORT_DG13:
- return "Optional detail(s) (DG13)"
- case this.DFT_ID_DG13:
- return "Undefined" + " (DG13)"
- case this.DFT_DL_DG13:
- return "Active Authentication info (DG13)"
- case this.DFT_PASSPORT_DG14:
- return "EAC info (DG14)"
- case this.DFT_ID_DG14:
- return "Undefined" + " (DG14)"
- case this.DFT_DL_DG14:
- return "EAC info (DG14)"
- case this.DFT_PASSPORT_DG15:
- return "Active Authentication info (DG15)"
- case this.DFT_ID_DG15:
- return "Undefined" + " (DG15)"
- case this.DFT_PASSPORT_DG16:
- return "Person(s) to notify (DG16)"
- case this.DFT_ID_DG16:
- return "Undefined" + " (DG16)"
- case this.DFT_PASSPORT_DG17:
- return "DG17"
- case this.DFT_ID_DG17:
- return "Place of registration" + " (DG17)"
- case this.DFT_PASSPORT_DG18:
- return "DG18"
- case this.DFT_ID_DG18:
- return "Place of registration" + " (DG18)"
- case this.DFT_PASSPORT_DG19:
- return "DG19"
- case this.DFT_ID_DG19:
- return "Residence permit 1" + " (DG19)"
- case this.DFT_PASSPORT_DG20:
- return "DG20"
- case this.DFT_ID_DG20:
- return "Residence permit 2" + " (DG20)"
- case this.DFT_ID_DG21:
- return "Optional details" + " (DG21)"
- case this.DFT_DL_SOD:
- return "EF.SOD"
- case this.DFT_PASSPORT_CVCA:
- return "EF.CVCA"
- case this.DFT_MIFARE_VALIDITY:
- return "MIFARE validity"
- case this.DFT_PACE_CARDACCESS:
- return "EF.CardAccess"
- case this.DFT_PACE_CARDSECURITY:
- return "EF.CardSecurity"
- case this.DFT_PACE_CHIPSECURITY:
- return "EF.ChipSecurity"
- case this.DFT_CERTIFICATE:
- return "Certificate"
- case this.DFT_APP_DIRECTORY:
- return "App directory"
- case this.DFT_ATR:
- return "DFT_ATR"
- case this.DFT_CHIP_PROPERTIES:
- return "DFT_CHIP_PROPERTIES"
- case this.DFT_DEFECTLIST:
- return "DFT_DEFECTLIST"
- case this.DFT_DEVIATIONLIST:
- return "DFT_DEVIATIONLIST"
- case this.DFT_DL_CE:
- return "DFT_DL_CE"
- case this.DFT_DL_CVCA:
- return "DFT_DL_CVCA"
- case this.DFT_ESIGN_PK:
- return "DFT_ESIGN_PK"
- case this.DFT_ESIGN_SIGNEDDATA:
- return "DFT_ESIGN_SIGNEDDATA"
- case this.DFT_LOGDATA:
- return "DFT_LOGDATA"
- case this.DFT_MASTERLIST:
- return "DFT_MASTERLIST"
- case this.DFT_SESSION:
- return "DFT_SESSION"
- case this.DFT_UNSPECIFIED:
- return "DFT_UNSPECIFIED"
- case this.DFT_USERDEFINED:
- return "DFT_USERDEFINED"
- default:
- return value
- }
- }
}
const eVisualFieldType = {
@@ -4463,1225 +3274,20 @@ const eVisualFieldType = {
FT_DLCLASSCODE_EC1_NOTES: 664,
FT_DLCLASSCODE_EC1_TO: 665,
FT_PLACE_OF_BIRTH_CITY: 666,
-
- getTranslation: function (value) {
- switch (value) {
- case this.FT_DOCUMENT_CLASS_CODE:
- return "Document class code"
- case this.FT_ISSUING_STATE_CODE:
- return "Issuing state code"
- case this.FT_DOCUMENT_NUMBER:
- return "Document number"
- case this.FT_DATE_OF_EXPIRY:
- return "Date of expiry"
- case this.FT_DATE_OF_ISSUE:
- return "Date of issue"
- case this.FT_DATE_OF_BIRTH:
- return "Date of birth"
- case this.FT_PLACE_OF_BIRTH:
- return "Place of birth"
- case this.FT_PERSONAL_NUMBER:
- return "Personal number"
- case this.FT_SURNAME:
- return "Surname"
- case this.FT_GIVEN_NAMES:
- return "Given name"
- case this.FT_MOTHERS_NAME:
- return "Mother\'s name"
- case this.FT_NATIONALITY:
- return "Nationality"
- case this.FT_SEX:
- return "Sex"
- case this.FT_HEIGHT:
- return "Height"
- case this.FT_WEIGHT:
- return "Weight"
- case this.FT_EYES_COLOR:
- return "Eye color"
- case this.FT_HAIR_COLOR:
- return "Hair color"
- case this.FT_ADDRESS:
- return "Address"
- case this.FT_DONOR:
- return "Donor"
- case this.FT_SOCIAL_SECURITY_NUMBER:
- return "Social insurance number"
- case this.FT_DL_CLASS:
- return "DL category"
- case this.FT_DL_ENDORSED:
- return "DL endorsement code"
- case this.FT_DL_RESTRICTION_CODE:
- return "DL Restriction Code"
- case this.FT_DL_UNDER_21_DATE:
- return "Date of 21st birthday"
- case this.FT_AUTHORITY:
- return "Issuing authority"
- case this.FT_SURNAME_AND_GIVEN_NAMES:
- return "Surname and given names"
- case this.FT_NATIONALITY_CODE:
- return "Nationality code"
- case this.FT_PASSPORT_NUMBER:
- return "Passport number"
- case this.FT_INVITATION_NUMBER:
- return "Invitation number"
- case this.FT_VISA_ID:
- return "Visa ID"
- case this.FT_VISA_CLASS:
- return "Visa Class"
- case this.FT_VISA_SUB_CLASS:
- return "Visa subclass"
- case this.FT_MRZ_STRING_1:
- return "MRZ line 1"
- case this.FT_MRZ_STRING_2:
- return "MRZ line 2"
- case this.FT_MRZ_STRING_3:
- return "MRZ line 3"
- case this.FT_MRZ_TYPE:
- return "MRZ Type"
- case this.FT_OPTIONAL_DATA:
- return "Optional data"
- case this.FT_DOCUMENT_CLASS_NAME:
- return "Document class"
- case this.FT_ISSUING_STATE_NAME:
- return "Issuing state"
- case this.FT_PLACE_OF_ISSUE:
- return "Place of issue"
- case this.FT_DOCUMENT_NUMBER_CHECKSUM:
- return "Checksum for document number"
- case this.FT_DATE_OF_BIRTH_CHECKSUM:
- return "Checksum for date of birth"
- case this.FT_DATE_OF_EXPIRY_CHECKSUM:
- return "Checksum for date of expiry"
- case this.FT_PERSONAL_NUMBER_CHECKSUM:
- return "Checksum for personal number"
- case this.FT_FINAL_CHECKSUM:
- return "Final checksum"
- case this.FT_PASSPORT_NUMBER_CHECKSUM:
- return "Checksum for passport number"
- case this.FT_INVITATION_NUMBER_CHECKSUM:
- return "Checksum for invitation number"
- case this.FT_VISA_ID_CHECKSUM:
- return "Checksum for visa ID"
- case this.FT_SURNAME_AND_GIVEN_NAMES_CHECKSUM:
- return "Checksum for surname and given names"
- case this.FT_VISA_VALID_UNTIL_CHECKSUM:
- return "Checksum for visa expiry date"
- case this.FT_OTHER:
- return "Other"
- case this.FT_MRZ_STRINGS:
- return "MRZ lines"
- case this.FT_NAME_SUFFIX:
- return "Name suffix"
- case this.FT_NAME_PREFIX:
- return "Name prefix"
- case this.FT_DATE_OF_ISSUE_CHECKSUM:
- return "Checksum for date of issue"
- case this.FT_DATE_OF_ISSUE_CHECK_DIGIT:
- return "Check digit for date of issue"
- case this.FT_DOCUMENT_SERIES:
- return "Document series"
- case this.FT_REG_CERT_REG_NUMBER:
- return "Registration number"
- case this.FT_REG_CERT_CAR_MODEL:
- return "Vehicle model"
- case this.FT_REG_CERT_CAR_COLOR:
- return "Vehicle color"
- case this.FT_REG_CERT_BODY_NUMBER:
- return "Body number"
- case this.FT_REG_CERT_CAR_TYPE:
- return "Vehicle type"
- case this.FT_REG_CERT_MAX_WEIGHT:
- return "Max permissible weight"
- case this.FT_REG_CERT_WEIGHT:
- return "Unladen mass"
- case this.FT_ADDRESS_AREA:
- return "Area"
- case this.FT_ADDRESS_STATE:
- return "State"
- case this.FT_ADDRESS_BUILDING:
- return "Unit"
- case this.FT_ADDRESS_HOUSE:
- return "Building"
- case this.FT_ADDRESS_FLAT:
- return "Apartment"
- case this.FT_PLACE_OF_REGISTRATION:
- return "Place of registration"
- case this.FT_DATE_OF_REGISTRATION:
- return "Date of registration"
- case this.FT_RESIDENT_FROM:
- return "Resident from"
- case this.FT_RESIDENT_UNTIL:
- return "Resident until"
- case this.FT_AUTHORITY_CODE:
- return "Issuing authority code"
- case this.FT_PLACE_OF_BIRTH_AREA:
- return "Country/region of birth"
- case this.FT_PLACE_OF_BIRTH_STATE_CODE:
- return "Birth state code"
- case this.FT_ADDRESS_STREET:
- return "Street"
- case this.FT_ADDRESS_CITY:
- return "City"
- case this.FT_ADDRESS_JURISDICTION_CODE:
- return "Jurisdiction code"
- case this.FT_ADDRESS_POSTAL_CODE:
- return "Postal code"
- case this.FT_DOCUMENT_NUMBER_CHECK_DIGIT:
- return "Check digit for document number"
- case this.FT_DATE_OF_BIRTH_CHECK_DIGIT:
- return "Check digit for date of birth"
- case this.FT_DATE_OF_EXPIRY_CHECK_DIGIT:
- return "Check digit for date of expiry"
- case this.FT_PERSONAL_NUMBER_CHECK_DIGIT:
- return "Check digit for personal number"
- case this.FT_FINAL_CHECK_DIGIT:
- return "Final check digit"
- case this.FT_PASSPORT_NUMBER_CHECK_DIGIT:
- return "Check digit for passport number"
- case this.FT_INVITATION_NUMBER_CHECK_DIGIT:
- return "Check digit for invitation number"
- case this.FT_VISA_ID_CHECK_DIGIT:
- return "Check digit for visa ID"
- case this.FT_SURNAME_AND_GIVEN_NAMES_CHECK_DIGIT:
- return "Check digit for surname and given names"
- case this.FT_VISA_VALID_UNTIL_CHECK_DIGIT:
- return "Check digit for visa expiry date"
- case this.FT_PERMIT_DL_CLASS:
- return "Permit class"
- case this.FT_PERMIT_DATE_OF_EXPIRY:
- return "Permit expiry date"
- case this.FT_PERMIT_IDENTIFIER:
- return "Permit identifier"
- case this.FT_PERMIT_DATE_OF_ISSUE:
- return "Permit issue date"
- case this.FT_PERMIT_RESTRICTION_CODE:
- return "Permit restriction code"
- case this.FT_PERMIT_ENDORSED:
- return "Permit endorsement code"
- case this.FT_ISSUE_TIMESTAMP:
- return "Issue time"
- case this.FT_NUMBER_OF_DUPLICATES:
- return "Number of duplicates"
- case this.FT_MEDICAL_INDICATOR_CODES:
- return "Medical notes/codes"
- case this.FT_NON_RESIDENT_INDICATOR:
- return "Non-resident indicator"
- case this.FT_VISA_TYPE:
- return "Visa type"
- case this.FT_VISA_VALID_FROM:
- return "Visa valid from"
- case this.FT_VISA_VALID_UNTIL:
- return "Visa valid until"
- case this.FT_DURATION_OF_STAY:
- return "Duration of stay"
- case this.FT_NUMBER_OF_ENTRIES:
- return "Number of entries"
- case this.FT_DAY:
- return "Day"
- case this.FT_MONTH:
- return "Month"
- case this.FT_YEAR:
- return "Year"
- case this.FT_UNIQUE_CUSTOMER_IDENTIFIER:
- return "Unique customer identifier"
- case this.FT_COMMERCIAL_VEHICLE_CODES:
- return "Commercial vehicle code"
- case this.FT_AKA_DATE_OF_BIRTH:
- return "AKA: Date of birth"
- case this.FT_AKA_SOCIAL_SECURITY_NUMBER:
- return "AKA: Social Insurance Number"
- case this.FT_AKA_SURNAME:
- return "AKA: Surname"
- case this.FT_AKA_GIVEN_NAMES:
- return "AKA: Given name"
- case this.FT_AKA_NAME_SUFFIX:
- return "AKA: Name suffix"
- case this.FT_AKA_NAME_PREFIX:
- return "AKA: Name prefix"
- case this.FT_MAILING_ADDRESS_STREET:
- return "Mailing address - street"
- case this.FT_MAILING_ADDRESS_CITY:
- return "Mailing address - city"
- case this.FT_MAILING_ADDRESS_JURISDICTION_CODE:
- return "Mailing address - jurisdiction code"
- case this.FT_MAILING_ADDRESS_POSTAL_CODE:
- return "Mailing address - postal code"
- case this.FT_AUDIT_INFORMATION:
- return "Number for validation"
- case this.FT_INVENTORY_NUMBER:
- return "Inventory number"
- case this.FT_RACE_ETHNICITY:
- return "Race/ethnicity"
- case this.FT_JURISDICTION_VEHICLE_CLASS:
- return "Jurisdiction vehicle class"
- case this.FT_JURISDICTION_ENDORSEMENT_CODE:
- return "Jurisdiction endorsement code"
- case this.FT_JURISDICTION_RESTRICTION_CODE:
- return "Jurisdiction restriction code"
- case this.FT_FAMILY_NAME:
- return "Family name"
- case this.FT_GIVEN_NAMES_RUS:
- return "Given name (National)"
- case this.FT_VISA_ID_RUS:
- return "Visa ID (National)"
- case this.FT_FATHERS_NAME:
- return "Father\'s name"
- case this.FT_FATHERS_NAME_RUS:
- return "Father\'s name (National)"
- case this.FT_SURNAME_AND_GIVEN_NAMES_RUS:
- return "Surname and given names (National)"
- case this.FT_PLACE_OF_BIRTH_RUS:
- return "Place of birth (National)"
- case this.FT_AUTHORITY_RUS:
- return "Issuing authority (National)"
- case this.FT_ISSUING_STATE_CODE_NUMERIC:
- return "Numeric issuing state code"
- case this.FT_NATIONALITY_CODE_NUMERIC:
- return "Numeric nationality code"
- case this.FT_ENGINE_POWER:
- return "Engine power"
- case this.FT_ENGINE_VOLUME:
- return "Engine volume"
- case this.FT_CHASSIS_NUMBER:
- return "Chassis number"
- case this.FT_ENGINE_NUMBER:
- return "Engine number"
- case this.FT_ENGINE_MODEL:
- return "Engine model"
- case this.FT_VEHICLE_CATEGORY:
- return "Vehicle category"
- case this.FT_IDENTITY_CARD_NUMBER:
- return "Identity card number"
- case this.FT_CONTROL_NO:
- return "Control number"
- case this.FT_PARRENTS_GIVEN_NAMES:
- return "Parents\' given names"
- case this.FT_SECOND_SURNAME:
- return "Second surname"
- case this.FT_MIDDLE_NAME:
- return "Middle name"
- case this.FT_REG_CERT_VIN:
- return "Vehicle identification number"
- case this.FT_REG_CERT_VIN_CHECK_DIGIT:
- return "Check digit for VIN"
- case this.FT_REG_CERT_VIN_CHECKSUM:
- return "Checksum for VIN"
- case this.FT_LINE_1_CHECK_DIGIT:
- return "Check digit for line 1"
- case this.FT_LINE_2_CHECK_DIGIT:
- return "Check digit for line 2"
- case this.FT_LINE_3_CHECK_DIGIT:
- return "Check digit for line 3"
- case this.FT_LINE_1_CHECKSUM:
- return "Checksum for line 1"
- case this.FT_LINE_2_CHECKSUM:
- return "Checksum for line 2"
- case this.FT_LINE_3_CHECKSUM:
- return "Checksum for line 3"
- case this.FT_REG_CERT_REG_NUMBER_CHECK_DIGIT:
- return "Check digit for registration number"
- case this.FT_REG_CERT_REG_NUMBER_CHECKSUM:
- return "Checksum for registration number"
- case this.FT_REG_CERT_VEHICLE_ITS_CODE:
- return "Vehicle ITS code"
- case this.FT_CARD_ACCESS_NUMBER:
- return "Card access number"
- case this.FT_MARITAL_STATUS:
- return "Marital status"
- case this.FT_COMPANY_NAME:
- return "Company name"
- case this.FT_SPECIAL_NOTES:
- return "Special notes"
- case this.FT_SURNAME_OF_SPOSE:
- return "Spouse\'s surname"
- case this.FT_TRACKING_NUMBER:
- return "Tracking number"
- case this.FT_BOOKLET_NUMBER:
- return "Booklet number"
- case this.FT_CHILDREN:
- return "Children"
- case this.FT_COPY:
- return "Copy"
- case this.FT_SERIAL_NUMBER:
- return "Serial number"
- case this.FT_DOSSIER_NUMBER:
- return "Dossier number"
- case this.FT_AKA_SURNAME_AND_GIVEN_NAMES:
- return "AKA: Surname and given names"
- case this.FT_TERRITORIAL_VALIDITY:
- return "Territorial validity"
- case this.FT_MRZ_STRINGS_WITH_CORRECT_CHECK_SUMS:
- return "MRZ lines with correct checksums"
- case this.FT_DL_CDL_RESTRICTION_CODE:
- return "CDL Restriction Code"
- case this.FT_DL_UNDER_18_DATE:
- return "Date of 18th birthday"
- case this.FT_DL_RECORD_CREATED:
- return "Record created"
- case this.FT_DL_DUPLICATE_DATE:
- return "Date of duplicate issue"
- case this.FT_DL_ISS_TYPE:
- return "Card type"
- case this.FT_MILITARY_BOOK_NUMBER:
- return "Military ID number"
- case this.FT_DESTINATION:
- return "Destination"
- case this.FT_BLOOD_GROUP:
- return "Blood group"
- case this.FT_SEQUENCE_NUMBER:
- return "Sequence number"
- case this.FT_REG_CERT_BODY_TYPE:
- return "Body type"
- case this.FT_REG_CERT_CAR_MARK:
- return "Vehicle make"
- case this.FT_TRANSACTION_NUMBER:
- return "Transaction number"
- case this.FT_AGE:
- return "Age"
- case this.FT_FOLIO_NUMBER:
- return "Folio number"
- case this.FT_VOTER_KEY:
- return "Voter Key"
- case this.FT_ADDRESS_MUNICIPALITY:
- return "Municipality"
- case this.FT_ADDRESS_LOCATION:
- return "Location"
- case this.FT_SECTION:
- return "Section"
- case this.FT_OCR_NUMBER:
- return "OCR number"
- case this.FT_FEDERAL_ELECTIONS:
- return "Federal elections"
- case this.FT_REFERENCE_NUMBER:
- return "Unique number"
- case this.FT_OPTIONAL_DATA_CHECKSUM:
- return "Checksum for optional data"
- case this.FT_OPTIONAL_DATA_CHECK_DIGIT:
- return "Check digit for optional data"
- case this.FT_VISA_NUMBER:
- return "Visa Number"
- case this.FT_VISA_NUMBER_CHECKSUM:
- return "Checksum for visa number"
- case this.FT_VISA_NUMBER_CHECK_DIGIT:
- return "Check digit for visa number"
- case this.FT_VOTER:
- return "Voter"
- case this.FT_PREVIOUS_TYPE:
- return "Type/number of the previous document"
- case this.FT_FIELD_FROM_MRZ:
- return "Field from MRZ"
- case this.FT_CURRENT_DATE:
- return "Current date"
- case this.FT_STATUS_DATE_OF_EXPIRY:
- return "Status Expiry Date"
- case this.FT_BANKNOTE_NUMBER:
- return "Banknote number"
- case this.FT_CSC_CODE:
- return "CSC Code"
- case this.FT_ARTISTIC_NAME:
- return "Pseudonym"
- case this.FT_ACADEMIC_TITLE:
- return "Academic title"
- case this.FT_ADDRESS_COUNTRY:
- return "Country"
- case this.FT_ADDRESS_ZIPCODE:
- return "ZIP code"
- case this.FT_E_ID_RESIDENCE_PERMIT_1:
- return "Residence permit 1"
- case this.FT_E_ID_RESIDENCE_PERMIT_2:
- return "Residence permit 2"
- case this.FT_E_ID_PLACE_OF_BIRTH_STREET:
- return "Place of birth: Street"
- case this.FT_E_ID_PLACE_OF_BIRTH_CITY:
- return "Place of birth: City"
- case this.FT_E_ID_PLACE_OF_BIRTH_STATE:
- return "Place of birth: State"
- case this.FT_E_ID_PLACE_OF_BIRTH_COUNTRY:
- return "Place of birth: Country"
- case this.FT_E_ID_PLACE_OF_BIRTH_ZIPCODE:
- return "Place of birth: Postal code"
- case this.FT_CDL_CLASS:
- return "CDL Class"
- case this.FT_DL_UNDER_19_DATE:
- return "Date of 19th birthday"
- case this.FT_WEIGHT_POUNDS:
- return "Weight (pound)"
- case this.FT_LIMITED_DURATION_DOCUMENT_INDICATOR:
- return "Indicator of document limited duration"
- case this.FT_ENDORSEMENT_EXPIRATION_DATE:
- return "Endorsement expiration date"
- case this.FT_REVISION_DATE:
- return "Revision date"
- case this.FT_COMPLIANCE_TYPE:
- return "Compliance type"
- case this.FT_FAMILY_NAME_TRUNCATION:
- return "Truncated surname/given name at birth"
- case this.FT_FIRST_NAME_TRUNCATION:
- return "First name truncation"
- case this.FT_MIDDLE_NAME_TRUNCATION:
- return "Middle name truncation"
- case this.FT_EXAM_DATE:
- return "Exam date"
- case this.FT_ORGANIZATION:
- return "Organization"
- case this.FT_DEPARTMENT:
- return "Department"
- case this.FT_PAY_GRADE:
- return "Pay grade"
- case this.FT_RANK:
- return "Rank"
- case this.FT_BENEFITS_NUMBER:
- return "Benefits number"
- case this.FT_SPONSOR_SERVICE:
- return "Sponsor service"
- case this.FT_SPONSOR_STATUS:
- return "Sponsor status"
- case this.FT_SPONSOR:
- return "Sponsor"
- case this.FT_RELATIONSHIP:
- return "Relationship"
- case this.FT_USCIS:
- return "USCIS"
- case this.FT_CATEGORY:
- return "Category"
- case this.FT_CONDITIONS:
- return "Conditions"
- case this.FT_IDENTIFIER:
- return "Identifier"
- case this.FT_CONFIGURATION:
- return "Configuration"
- case this.FT_DISCRETIONARY_DATA:
- return "Discretionary data"
- case this.FT_LINE_1_OPTIONAL_DATA:
- return "Optional data from line 1"
- case this.FT_LINE_2_OPTIONAL_DATA:
- return "Optional data from line 2"
- case this.FT_LINE_3_OPTIONAL_DATA:
- return "Optional data from line 3"
- case this.FT_EQV_CODE:
- return "EQV code"
- case this.FT_ALT_CODE:
- return "ALT code"
- case this.FT_BINARY_CODE:
- return "Binary code"
- case this.FT_PSEUDO_CODE:
- return "Pseudocode"
- case this.FT_FEE:
- return "Fee"
- case this.FT_STAMP_NUMBER:
- return "Stamp number"
- case this.FT_GNIB_NUMBER:
- return "GNIB number"
- case this.FT_DEPT_NUMBER:
- return "Department number"
- case this.FT_TELEX_CODE:
- return "Telegraph code"
- case this.FT_ALLERGIES:
- return "Allergies"
- case this.FT_SP_CODE:
- return "Special code"
- case this.FT_COURT_CODE:
- return "Court code"
- case this.FT_CTY:
- return "County"
- case this.FT_SPONSOR_SSN:
- return "Sponsor SSN"
- case this.FT_DO_D_NUMBER:
- return "DoD number"
- case this.FT_MC_NOVICE_DATE:
- return "Expiry date of Motorcycle Novice status"
- case this.FT_DUF_NUMBER:
- return "DUF number"
- case this.FT_AGY:
- return "AGY"
- case this.FT_PNR_CODE:
- return "PNR code"
- case this.FT_FROM_AIRPORT_CODE:
- return "Code of the airport of departure"
- case this.FT_TO_AIRPORT_CODE:
- return "Code of the airport of arrival"
- case this.FT_FLIGHT_NUMBER:
- return "Flight number"
- case this.FT_DATE_OF_FLIGHT:
- return "Date of flight"
- case this.FT_SEAT_NUMBER:
- return "Seat number"
- case this.FT_DATE_OF_ISSUE_BOARDING_PASS:
- return "Date of boarding pass issue"
- case this.FT_CCW_UNTIL:
- return "CCW until"
- case this.FT_REFERENCE_NUMBER_CHECKSUM:
- return "Unique number checksum"
- case this.FT_REFERENCE_NUMBER_CHECK_DIGIT:
- return "Unique number check digit"
- case this.FT_ROOM_NUMBER:
- return "Room number"
- case this.FT_RELIGION:
- return "Religion"
- case this.FT_REMAINDER_TERM:
- return "Months to expire"
- case this.FT_ELECTRONIC_TICKET_INDICATOR:
- return "Electronic ticket indicator"
- case this.FT_COMPARTMENT_CODE:
- return "Compartment code"
- case this.FT_CHECK_IN_SEQUENCE_NUMBER:
- return "Check-in sequence number"
- case this.FT_AIRLINE_DESIGNATOR_OF_BOARDING_PASS_ISSUER:
- return "Airline designator of boarding pass issuer"
- case this.FT_AIRLINE_NUMERIC_CODE:
- return "Airline numeric code"
- case this.FT_TICKET_NUMBER:
- return "Ticket number"
- case this.FT_FREQUENT_FLYER_AIRLINE_DESIGNATOR:
- return "Frequent flyer airline designator"
- case this.FT_FREQUENT_FLYER_NUMBER:
- return "Frequent flyer number"
- case this.FT_FREE_BAGGAGE_ALLOWANCE:
- return "Free baggage allowance"
- case this.FT_PDF_417_CODEC:
- return "PDF417 codec"
- case this.FT_IDENTITY_CARD_NUMBER_CHECKSUM:
- return "Checksum for identity card number"
- case this.FT_IDENTITY_CARD_NUMBER_CHECK_DIGIT:
- return "Check digit for identity card number"
- case this.FT_VETERAN:
- return "Veteran"
- case this.FT_DL_CLASS_CODE_A_1_FROM:
- return "DL category A1 valid from"
- case this.FT_DL_CLASS_CODE_A_1_TO:
- return "DL category A1 valid to"
- case this.FT_DL_CLASS_CODE_A_1_NOTES:
- return "DL category A1 codes"
- case this.FT_DL_CLASS_CODE_A_FROM:
- return "DL category A valid from"
- case this.FT_DL_CLASS_CODE_A_TO:
- return "DL category A valid to"
- case this.FT_DL_CLASS_CODE_A_NOTES:
- return "DL category A codes"
- case this.FT_DL_CLASS_CODE_B_FROM:
- return "DL category B valid from"
- case this.FT_DL_CLASS_CODE_B_TO:
- return "DL category B valid to"
- case this.FT_DL_CLASS_CODE_B_NOTES:
- return "DL category B codes"
- case this.FT_DL_CLASS_CODE_C_1_FROM:
- return "DL category C1 valid from"
- case this.FT_DL_CLASS_CODE_C_1_TO:
- return "DL category C1 valid to"
- case this.FT_DL_CLASS_CODE_C_1_NOTES:
- return "DL category C1 codes"
- case this.FT_DL_CLASS_CODE_C_FROM:
- return "DL category C valid from"
- case this.FT_DL_CLASS_CODE_C_TO:
- return "DL category C valid to"
- case this.FT_DL_CLASS_CODE_C_NOTES:
- return "DL category C codes"
- case this.FT_DL_CLASS_CODE_D_1_FROM:
- return "DL category D1 valid from"
- case this.FT_DL_CLASS_CODE_D_1_TO:
- return "DL category D1 valid to"
- case this.FT_DL_CLASS_CODE_D_1_NOTES:
- return "DL category D1 codes"
- case this.FT_DL_CLASS_CODE_D_FROM:
- return "DL category D valid from"
- case this.FT_DL_CLASS_CODE_D_TO:
- return "DL category D valid to"
- case this.FT_DL_CLASS_CODE_D_NOTES:
- return "DL category D codes"
- case this.FT_DL_CLASS_CODE_BE_FROM:
- return "DL category BE valid from"
- case this.FT_DL_CLASS_CODE_BE_TO:
- return "DL category BE valid to"
- case this.FT_DL_CLASS_CODE_BE_NOTES:
- return "DL category BE codes"
- case this.FT_DL_CLASS_CODE_C_1_E_FROM:
- return "DL category C1E valid from"
- case this.FT_DL_CLASS_CODE_C_1_E_TO:
- return "DL category C1E valid to"
- case this.FT_DL_CLASS_CODE_C_1_E_NOTES:
- return "DL category C1E codes"
- case this.FT_DL_CLASS_CODE_CE_FROM:
- return "DL category CE valid from"
- case this.FT_DL_CLASS_CODE_CE_TO:
- return "DL category CE valid to"
- case this.FT_DL_CLASS_CODE_CE_NOTES:
- return "DL category CE codes"
- case this.FT_DL_CLASS_CODE_D_1_E_FROM:
- return "DL category D1E valid from"
- case this.FT_DL_CLASS_CODE_D_1_E_TO:
- return "DL category D1E valid to"
- case this.FT_DL_CLASS_CODE_D_1_E_NOTES:
- return "DL category D1E codes"
- case this.FT_DL_CLASS_CODE_DE_FROM:
- return "DL category DE valid from"
- case this.FT_DL_CLASS_CODE_DE_TO:
- return "DL category DE valid to"
- case this.FT_DL_CLASS_CODE_DE_NOTES:
- return "DL category DE codes"
- case this.FT_DL_CLASS_CODE_M_FROM:
- return "DL category M valid from"
- case this.FT_DL_CLASS_CODE_M_TO:
- return "DL category M valid to"
- case this.FT_DL_CLASS_CODE_M_NOTES:
- return "DL category M codes"
- case this.FT_DL_CLASS_CODE_L_FROM:
- return "DL category L valid from"
- case this.FT_DL_CLASS_CODE_L_TO:
- return "DL category L valid to"
- case this.FT_DL_CLASS_CODE_L_NOTES:
- return "DL category L codes"
- case this.FT_DL_CLASS_CODE_T_FROM:
- return "DL category T valid from"
- case this.FT_DL_CLASS_CODE_T_TO:
- return "DL category T valid to"
- case this.FT_DL_CLASS_CODE_T_NOTES:
- return "DL category T codes"
- case this.FT_DL_CLASS_CODE_AM_FROM:
- return "DL category AM valid from"
- case this.FT_DL_CLASS_CODE_AM_TO:
- return "DL category AM valid to"
- case this.FT_DL_CLASS_CODE_AM_NOTES:
- return "DL category AM codes"
- case this.FT_DL_CLASS_CODE_A_2_FROM:
- return "DL category A2 valid from"
- case this.FT_DL_CLASS_CODE_A_2_TO:
- return "DL category A2 valid to"
- case this.FT_DL_CLASS_CODE_A_2_NOTES:
- return "DL category A2 codes"
- case this.FT_DL_CLASS_CODE_B_1_FROM:
- return "DL category B1 valid from"
- case this.FT_DL_CLASS_CODE_B_1_TO:
- return "DL category B1 valid to"
- case this.FT_DL_CLASS_CODE_B_1_NOTES:
- return "DL category B1 codes"
- case this.FT_SURNAME_AT_BIRTH:
- return "Surname at birth"
- case this.FT_CIVIL_STATUS:
- return "Civil status"
- case this.FT_NUMBER_OF_SEATS:
- return "Number of seats"
- case this.FT_NUMBER_OF_STANDING_PLACES:
- return "Number of standing places"
- case this.FT_MAX_SPEED:
- return "Max speed"
- case this.FT_FUEL_TYPE:
- return "Fuel type"
- case this.FT_EC_ENVIRONMENTAL_TYPE:
- return "Vehicle environmental type"
- case this.FT_POWER_WEIGHT_RATIO:
- return "Power-to-weight ratio"
- case this.FT_MAX_MASS_OF_TRAILER_BRAKED:
- return "Max mass of trailer (braked)"
- case this.FT_MAX_MASS_OF_TRAILER_UNBRAKED:
- return "Max mass of trailer (unbraked)"
- case this.FT_TRANSMISSION_TYPE:
- return "Transmission type"
- case this.FT_TRAILER_HITCH:
- return "Trailer hitch"
- case this.FT_ACCOMPANIED_BY:
- return "Accompanied by"
- case this.FT_POLICE_DISTRICT:
- return "Police district"
- case this.FT_FIRST_ISSUE_DATE:
- return "First issue date"
- case this.FT_PAYLOAD_CAPACITY:
- return "Payload capacity"
- case this.FT_NUMBER_OF_AXELS:
- return "Number of axles"
- case this.FT_PERMISSIBLE_AXLE_LOAD:
- return "Permissible axle load"
- case this.FT_PRECINCT:
- return "Precinct"
- case this.FT_INVITED_BY:
- return "Invited by"
- case this.FT_PURPOSE_OF_ENTRY:
- return "Purpose of entry"
- case this.FT_SKIN_COLOR:
- return "Skin color"
- case this.FT_COMPLEXION:
- return "Complexion"
- case this.FT_AIRPORT_FROM:
- return "Airport of departure"
- case this.FT_AIRPORT_TO:
- return "Airport of arrival"
- case this.FT_AIRLINE_NAME:
- return "Airline name"
- case this.FT_AIRLINE_NAME_FREQUENT_FLYER:
- return "Airline loyalty program for frequent flyers"
- case this.FT_LICENSE_NUMBER:
- return "License number"
- case this.FT_IN_TANKS:
- return "In tanks"
- case this.FT_EXEPT_IN_TANKS:
- return "Other than tanks"
- case this.FT_FAST_TRACK:
- return "Fast Track service"
- case this.FT_OWNER:
- return "Owner"
- case this.FT_MRZ_STRINGS_ICAO_RFID:
- return "MRZ lines from ICAO RFID"
- case this.FT_NUMBER_OF_CARD_ISSUANCE:
- return "Number of card issuances"
- case this.FT_NUMBER_OF_CARD_ISSUANCE_CHECKSUM:
- return "Checksum for number of card issuances"
- case this.FT_NUMBER_OF_CARD_ISSUANCE_CHECK_DIGIT:
- return "Check digit for number of card issuances"
- case this.FT_CENTURY_DATE_OF_BIRTH:
- return "Century of birth"
- case this.FT_DL_CLASSCODE_A3_FROM:
- return "DL category A3 valid from"
- case this.FT_DL_CLASSCODE_A3_TO:
- return "DL category A3 valid to"
- case this.FT_DL_CLASSCODE_A3_NOTES:
- return "DL category A3 codes"
- case this.FT_DL_CLASSCODE_C2_FROM:
- return "DL category C2 valid from"
- case this.FT_DL_CLASSCODE_C2_TO:
- return "DL category C2 valid to"
- case this.FT_DL_CLASSCODE_C2_NOTES:
- return "DL category C2 codes"
- case this.FT_DL_CLASSCODE_B2_FROM:
- return "DL category B2 valid from"
- case this.FT_DL_CLASSCODE_B2_TO:
- return "DL category B2 valid to"
- case this.FT_DL_CLASSCODE_B2_NOTES:
- return "DL category B2 codes"
- case this.FT_DL_CLASSCODE_D2_FROM:
- return "DL category D2 valid from"
- case this.FT_DL_CLASSCODE_D2_TO:
- return "DL category D2 valid to"
- case this.FT_DL_CLASSCODE_D2_NOTES:
- return "DL category D2 codes"
- case this.FT_DL_CLASSCODE_B2E_FROM:
- return "DL category B2E valid from"
- case this.FT_DL_CLASSCODE_B2E_TO:
- return "DL category B2E valid to"
- case this.FT_DL_CLASSCODE_B2E_NOTES:
- return "DL category B2E codes"
- case this.FT_DL_CLASSCODE_G_FROM:
- return "DL category G valid from"
- case this.FT_DL_CLASSCODE_G_TO:
- return "DL category G valid to"
- case this.FT_DL_CLASSCODE_G_NOTES:
- return "DL category G codes"
- case this.FT_DL_CLASSCODE_J_FROM:
- return "DL category J valid from"
- case this.FT_DL_CLASSCODE_J_TO:
- return "DL category J valid to"
- case this.FT_DL_CLASSCODE_J_NOTES:
- return "DL category J codes"
- case this.FT_DL_CLASSCODE_LC_FROM:
- return "DL category LC valid from"
- case this.FT_DL_CLASSCODE_LC_TO:
- return "DL category LC valid to"
- case this.FT_DLC_LASSCODE_LC_NOTES:
- return "DL category LC codes"
- case this.FT_BANKCARDNUMBER:
- return "Bank card number"
- case this.FT_BANKCARDVALIDTHRU:
- return "Bank card validity"
- case this.FT_TAX_NUMBER:
- return "Tax number"
- case this.FT_SBH_SECURITYOPTIONS:
- return "SBH security options"
- case this.FT_SBH_INTEGRITYOPTIONS:
- return "SBH integrity options"
- case this.FT_DATE_OF_CREATION:
- return "Creation date"
- case this.FT_VALIDITY_PERIOD:
- return "Validity period"
- case this.FT_PATRON_HEADER_VERSION:
- return "Patron header version"
- case this.FT_BDB_TYPE:
- return "BDB type"
- case this.FT_BIOMETRIC_TYPE:
- return "Biometric type"
- case this.FT_BIOMETRIC_SUBTYPE:
- return "Biometric subtype"
- case this.FT_BIOMETRIC_PRODUCTID:
- return "Biometric product ID"
- case this.FT_BIOMETRIC_FORMAT_OWNER:
- return "Biometric format owner"
- case this.FT_BIOMETRIC_FORMAT_TYPE:
- return "Biometric format type"
- case this.FT_PHONE:
- return "Phone"
- case this.FT_PROFESSION:
- return "Profession"
- case this.FT_TITLE:
- return "Position"
- case this.FT_PERSONAL_SUMMARY:
- return "Personal data summary"
- case this.FT_OTHER_VALID_ID:
- return "Other valid IDs"
- case this.FT_CUSTODY_INFO:
- return "Custody info"
- case this.FT_OTHER_NAME:
- return "Other name"
- case this.FT_OBSERVATIONS:
- return "Observations"
- case this.FT_TAX:
- return "Tax"
- case this.FT_DATE_OF_PERSONALIZATION:
- return "Personalization date"
- case this.FT_PERSONALIZATION_SN:
- return "Serial number of personalization"
- case this.FT_OTHERPERSON_NAME:
- return "Other person, name"
- case this.FT_PERSONTONOTIFY_DATE_OF_RECORD:
- return "Notify person: Date of record"
- case this.FT_PERSONTONOTIFY_NAME:
- return "Notify person: Name"
- case this.FT_PERSONTONOTIFY_PHONE:
- return "Notify person: Phone"
- case this.FT_PERSONTONOTIFY_ADDRESS:
- return "Notify person: Address"
- case this.FT_DS_CERTIFICATE_ISSUER:
- return "DS certificate issuer"
- case this.FT_DS_CERTIFICATE_SUBJECT:
- return "DS certificate subject"
- case this.FT_DS_CERTIFICATE_VALIDFROM:
- return "DS certificate valid from"
- case this.FT_DS_CERTIFICATE_VALIDTO:
- return "DS certificate valid to"
- case this.FT_VRC_DATAOBJECT_ENTRY:
- return "Vehicle data from the DG1 data group"
- case this.FT_GRANDFATHERNAME:
- return "Grandfather\'s name"
- case this.FT_HEALTH_NUMBER:
- return "Health insurance number"
- case this.FT_TYPE_APPROVAL_NUMBER:
- return "Type of approval number"
- case this.FT_ADMINISTRATIVE_NUMBER:
- return "Administrative number"
- case this.FT_DOCUMENT_DISCRIMINATOR:
- return "Document discriminator"
- case this.FT_DATA_DISCRIMINATOR:
- return "Data discriminator"
- case this.FT_ISO_ISSUER_ID_NUMBER:
- return "ID number of ISO issuer"
- case this.FT_SELECTEE_INDICATOR:
- return "Selectee indicator"
- case this.FT_MOTHER_SURNAME:
- return "Mother\'s surname"
- case this.FT_MOTHER_GIVENNAME:
- return "Mother\'s given name"
- case this.FT_FATHER_SURNAME:
- return "Father\'s surname"
- case this.FT_FATHER_GIVENNAME:
- return "Father\'s given name"
- case this.FT_MOTHER_DATEOFBIRTH:
- return "Mother\'s date of birth"
- case this.FT_FATHER_DATEOFBIRTH:
- return "Father\'s date of birth"
- case this.FT_MOTHER_PERSONALNUMBER:
- return "Mother\'s personal number"
- case this.FT_FATHER_PERSONALNUMBER:
- return "Father\'s personal number"
- case this.FT_MOTHER_PLACEOFBIRTH:
- return "Mother\'s place of birth"
- case this.FT_FATHER_PLACEOFBIRTH:
- return "Father\'s place of birth"
- case this.FT_MOTHER_COUNTRYOFBIRTH:
- return "Mother\'s country of birth"
- case this.FT_FATHER_COUNTRYOFBIRTH:
- return "Father\'s country of birth"
- case this.FT_DATE_FIRST_RENEWAL:
- return "Date of first renewal"
- case this.FT_DATE_SECOND_RENEWAL:
- return "Date of second renewal"
- case this.FT_PLACE_OF_EXAMINATION:
- return "Place of examination"
- case this.FT_APPLICATION_NUMBER:
- return "Application number"
- case this.FT_VOUCHER_NUMBER:
- return "Voucher number"
- case this.FT_AUTHORIZATION_NUMBER:
- return "Authorization number"
- case this.FT_FACULTY:
- return "Faculty"
- case this.FT_FORM_OF_EDUCATION:
- return "Form of education"
- case this.FT_DNI_NUMBER:
- return "DNI number"
- case this.FT_RETIREMENT_NUMBER:
- return "Retirement number"
- case this.FT_PROFESSIONAL_ID_NUMBER:
- return "Professional ID number"
- case this.FT_AGE_AT_ISSUE:
- return "Age at issue"
- case this.FT_YEARS_SINCE_ISSUE:
- return "Years since issue"
- case this.FT_DLCLASSCODE_BTP_FROM:
- return "DL category BTP valid from"
- case this.FT_DLCLASSCODE_BTP_NOTES:
- return "DL category BTP codes"
- case this.FT_DLCLASSCODE_BTP_TO:
- return "DL category BTP valid to"
- case this.FT_DLCLASSCODE_C3_FROM:
- return "DL category C3 valid from"
- case this.FT_DLCLASSCODE_C3_NOTES:
- return "DL category C3 codes"
- case this.FT_DLCLASSCODE_C3_TO:
- return "DL category C3 valid to"
- case this.FT_DLCLASSCODE_E_FROM:
- return "DL category E valid from"
- case this.FT_DLCLASSCODE_E_NOTES:
- return "DL category E codes"
- case this.FT_DLCLASSCODE_E_TO:
- return "DL category E valid to"
- case this.FT_DLCLASSCODE_F_FROM:
- return "DL category F valid from"
- case this.FT_DLCLASSCODE_F_NOTES:
- return "DL category F codes"
- case this.FT_DLCLASSCODE_F_TO:
- return "DL category F valid to"
- case this.FT_DLCLASSCODE_FA_FROM:
- return "DL category FA valid from"
- case this.FT_DLCLASSCODE_FA_NOTES:
- return "DL category FA codes"
- case this.FT_DLCLASSCODE_FA_TO:
- return "DL category FA valid to"
- case this.FT_DLCLASSCODE_FA1_FROM:
- return "DL category FA1 valid from"
- case this.FT_DLCLASSCODE_FA1_NOTES:
- return "DL category FA1 codes"
- case this.FT_DLCLASSCODE_FA1_TO:
- return "DL category FA1 valid to"
- case this.FT_DLCLASSCODE_FB_FROM:
- return "DL category FB valid from"
- case this.FT_DLCLASSCODE_FB_NOTES:
- return "DL category FB codes"
- case this.FT_DLCLASSCODE_FB_TO:
- return "DL category FB valid to"
- case this.FT_DLCLASSCODE_G1_FROM:
- return "DL category G1 valid from"
- case this.FT_DLCLASSCODE_G1_NOTES:
- return "DL category G1 codes"
- case this.FT_DLCLASSCODE_G1_TO:
- return "DL category G1 valid to"
- case this.FT_DLCLASSCODE_H_FROM:
- return "DL category H valid from"
- case this.FT_DLCLASSCODE_H_NOTES:
- return "DL category H codes"
- case this.FT_DLCLASSCODE_H_TO:
- return "DL category H valid to"
- case this.FT_DLCLASSCODE_I_FROM:
- return "DL category I valid from"
- case this.FT_DLCLASSCODE_I_NOTES:
- return "DL category I codes"
- case this.FT_DLCLASSCODE_I_TO:
- return "DL category I valid to"
- case this.FT_DLCLASSCODE_K_FROM:
- return "DL category K valid from"
- case this.FT_DLCLASSCODE_K_NOTES:
- return "DL category K codes"
- case this.FT_DLCLASSCODE_K_TO:
- return "DL category K valid to"
- case this.FT_DLCLASSCODE_LK_FROM:
- return "DL category LK valid from"
- case this.FT_DLCLASSCODE_LK_NOTES:
- return "DL category LK codes"
- case this.FT_DLCLASSCODE_LK_TO:
- return "DL category LK valid to"
- case this.FT_DLCLASSCODE_N_FROM:
- return "DL category N valid from"
- case this.FT_DLCLASSCODE_N_NOTES:
- return "DL category N codes"
- case this.FT_DLCLASSCODE_N_TO:
- return "DL category N valid to"
- case this.FT_DLCLASSCODE_S_FROM:
- return "DL category S valid from"
- case this.FT_DLCLASSCODE_S_NOTES:
- return "DL category S codes"
- case this.FT_DLCLASSCODE_S_TO:
- return "DL category S valid to"
- case this.FT_DLCLASSCODE_TB_FROM:
- return "DL category TB valid from"
- case this.FT_DLCLASSCODE_TB_NOTES:
- return "DL category TB codes"
- case this.FT_DLCLASSCODE_TB_TO:
- return "DL category TB valid to"
- case this.FT_DLCLASSCODE_TM_FROM:
- return "DL category TM valid from"
- case this.FT_DLCLASSCODE_TM_NOTES:
- return "DL category TM codes"
- case this.FT_DLCLASSCODE_TM_TO:
- return "DL category TM valid to"
- case this.FT_DLCLASSCODE_TR_FROM:
- return "DL category TR valid from"
- case this.FT_DLCLASSCODE_TR_NOTES:
- return "DL category TR codes"
- case this.FT_DLCLASSCODE_TR_TO:
- return "DL category TR valid to"
- case this.FT_DLCLASSCODE_TV_FROM:
- return "DL category TV valid from"
- case this.FT_DLCLASSCODE_TV_NOTES:
- return "DL category TV codes"
- case this.FT_DLCLASSCODE_TV_TO:
- return "DL category TV valid to"
- case this.FT_DLCLASSCODE_V_FROM:
- return "DL category V valid from"
- case this.FT_DLCLASSCODE_V_NOTES:
- return "DL category V codes"
- case this.FT_DLCLASSCODE_V_TO:
- return "DL category V valid to"
- case this.FT_DLCLASSCODE_W_FROM:
- return "DL category W valid from"
- case this.FT_DLCLASSCODE_W_NOTES:
- return "DL category W codes"
- case this.FT_DLCLASSCODE_W_TO:
- return "DL category W valid to"
- case this.FT_CALIBER:
- return "Caliber"
- case this.FT_CITIZENSHIP_OF_FIRST_PERSON:
- return "Citizenship of the first person"
- case this.FT_CITIZENSHIP_OF_SECOND_PERSON:
- return "Citizenship of the second person"
- case this.FT_CVV:
- return "CVV/CVC"
- case this.FT_DATE_OF_BIRTH_OF_HUSBAND:
- return "Date of birth of husband"
- case this.FT_DATE_OF_BIRTH_OF_WIFE:
- return "Date of birth of wife"
- case this.FT_MAKE:
- return "Make"
- case this.FT_MODEL:
- return "Model"
- case this.FT_NUMBER_OF_CYLINDERS:
- return "Number of cylinders"
- case this.FT_SURNAME_OF_HUSBAND_AFTER_REGISTRATION:
- return "Surname of husband after registration"
- case this.FT_SURNAME_OF_WIFE_AFTER_REGISTRATION:
- return "Surname of wife after registration"
- case this.FT_URL:
- return "URL"
- case this.FT_DATE_OF_INSURANCE_EXPIRY:
- return "Expiry date of insurance"
- case this.FT_MORTGAGE_BY:
- return "Mortgage by"
- case this.FT_OLD_DOCUMENT_NUMBER:
- return "Old document number"
- case this.FT_OLD_DATE_OF_ISSUE:
- return "Old date of issue"
- case this.FT_OLD_PLACE_OF_ISSUE:
- return "Old place of issue"
- case this.FT_DLCLASSCODE_LR_FROM:
- return "DL category LR valid from"
- case this.FT_DLCLASSCODE_LR_TO:
- return "DL category LR valid to"
- case this.FT_DLCLASSCODE_LR_NOTES:
- return "DL category LR codes"
- case this.FT_DLCLASSCODE_MR_FROM:
- return "DL category MR valid from"
- case this.FT_DLCLASSCODE_MR_TO:
- return "DL category MR valid to"
- case this.FT_DLCLASSCODE_MR_NOTES:
- return "DL category MR codes"
- case this.FT_DLCLASSCODE_HR_FROM:
- return "DL category HR valid from"
- case this.FT_DLCLASSCODE_HR_TO:
- return "DL category HR valid to"
- case this.FT_DLCLASSCODE_HR_NOTES:
- return "DL category HR codes"
- case this.FT_DLCLASSCODE_HC_FROM:
- return "DL category HC valid from"
- case this.FT_DLCLASSCODE_HC_TO:
- return "DL category HC valid to"
- case this.FT_DLCLASSCODE_HC_NOTES:
- return "DL category HC codes"
- case this.FT_DLCLASSCODE_MC_FROM:
- return "DL category MC valid from"
- case this.FT_DLCLASSCODE_MC_TO:
- return "DL category MC valid to"
- case this.FT_DLCLASSCODE_MC_NOTES:
- return "DL category MC codes"
- case this.FT_DLCLASSCODE_RE_FROM:
- return "DL category RE valid from"
- case this.FT_DLCLASSCODE_RE_TO:
- return "DL category RE valid to"
- case this.FT_DLCLASSCODE_RE_NOTES:
- return "DL category RE codes"
- case this.FT_DLCLASSCODE_R_FROM:
- return "DL category R valid from"
- case this.FT_DLCLASSCODE_R_TO:
- return "DL category R valid to"
- case this.FT_DLCLASSCODE_R_NOTES:
- return "DL category R codes"
- case this.FT_DLCLASSCODE_CA_FROM:
- return "DL category CA valid from"
- case this.FT_DLCLASSCODE_CA_TO:
- return "DL category CA valid to"
- case this.FT_DLCLASSCODE_CA_NOTES:
- return "DL category CA codes"
- case this.FT_CITIZENSHIP_STATUS:
- return "Citizenship status"
- case this.FT_MILITARY_SERVICE_FROM:
- return "Military service from"
- case this.FT_MILITARY_SERVICE_TO:
- return "Military service to"
- case this.FT_DLCLASSCODE_D3_FROM:
- return "DL category D3 valid from"
- case this.FT_DLCLASSCODE_D3_NOTES:
- return "DL category D3 codes"
- case this.FT_DLCLASSCODE_D3_TO:
- return "DL category D3 valid to"
- case this.FT_DLCLASSCODE_NT_FROM:
- return "DL category NT valid from"
- case this.FT_DLCLASSCODE_NT_NOTES:
- return "DL category NT codes"
- case this.FT_DLCLASSCODE_NT_TO:
- return "DL category NT valid to"
- case this.FT_DLCLASSCODE_TN_FROM:
- return "DL category TN valid from"
- case this.FT_DLCLASSCODE_TN_NOTES:
- return "DL category TN codes"
- case this.FT_DLCLASSCODE_TN_TO:
- return "DL category TN valid to"
- case this.FT_ALT_DATE_OF_EXPIRY:
- return "Alternative date of expiry"
- case this.FT_DLCLASSCODE_CD_FROM:
- return "DL category CD valid from"
- case this.FT_DLCLASSCODE_CD_TO:
- return "DL category CD valid to"
- case this.FT_DLCLASSCODE_CD_NOTES:
- return "DL category CD codes"
- case this.FT_FIRST_NAME:
- return "First name"
- case this.FT_DATE_OF_ARRIVAL:
- return "Date of arrival"
- case this.FT_ISSUER_IDENTIFICATION_NUMBER:
- return "Issuer identification number"
- case this.FT_PAYMENT_PERIOD_FROM:
- return "Payment period from"
- case this.FT_PAYMENT_PERIOD_TO:
- return "Payment period to"
- case this.FT_VACCINATION_CERTIFICATE_IDENTIFIER:
- return "Unique vaccination certificate identifier"
- case this.FT_SECOND_NAME:
- return "Second name"
- case this.FT_THIRD_NAME:
- return "Third name"
- case this.FT_FOURTH_NAME:
- return "Fourth name"
- case this.FT_LAST_NAME:
- return "Last name"
- case this.FT_DLCLASSCODE_PW_FROM:
- return "DL class code PW valid from"
- case this.FT_DLCLASSCODE_PW_NOTES:
- return "DL class code PW notes"
- case this.FT_DLCLASSCODE_PW_TO:
- return "DL class code PW valid to"
- case this.FT_DLCLASSCODE_RM_FROM:
- return "DL class code RM valid from"
- case this.FT_DLCLASSCODE_RM_NOTES:
- return "DL class code RM notes"
- case this.FT_DLCLASSCODE_RM_TO:
- return "DL class code RM valid to"
- default:
- return value
- }
- }
+ FT_YEAR_OF_BIRTH: 667,
+ FT_YEAR_OF_EXPIRY: 668,
+ FT_GRANDFATHER_NAME_MATERNAL: 669,
+ FT_FIRST_SURNAME: 670,
+ FT_MONTH_OF_BIRTH: 671,
+ FT_ADDRESS_FLOOR_NUMBER: 672,
+ FT_ADDRESS_ENTRANCE: 673,
+ FT_ADDRESS_BLOCK_NUMBER: 674,
+ FT_ADDRESS_STREET_NUMBER: 675,
+ FT_ADDRESS_STREET_TYPE: 676,
+ FT_ADDRESS_CITY_SECTOR: 677,
+ FT_ADDRESS_COUNTY_TYPE: 678,
+ FT_ADDRESS_CITY_TYPE: 679,
+ FT_ADDRESS_BUILDING_TYPE: 680,
}
const DocReaderOrientation = {
@@ -5849,325 +3455,6 @@ const LCID = {
VIETNAMESE: 1066,
CTC_SIMPLIFIED: 50001,
CTC_TRADITIONAL: 50002,
-
- getTranslation: function (value) {
- switch (value) {
- case this.LATIN:
- return "Latin"
- case this.AFRIKAANS:
- return "Afrikaans"
- case this.ABKHAZIAN_CYRILLIC:
- return "Abkhazian (Cyrillic)"
- case this.ALBANIAN:
- return "Albanian"
- case this.AMHARIC:
- return "Amharic"
- case this.ARABIC_ALGERIA:
- return "Arabic (Algeria)"
- case this.ARABIC_BAHRAIN:
- return "Arabic (Bahrain)"
- case this.ARABIC_EGYPT:
- return "Arabic (Egypt)"
- case this.ARABIC_IRAQ:
- return "Arabic (Iraq)"
- case this.ARABIC_JORDAN:
- return "Arabic (Jordan)"
- case this.ARABIC_KUWAIT:
- return "Arabic (Kuwait)"
- case this.ARABIC_LEBANON:
- return "Arabic (Lebanon)"
- case this.ARABIC_LIBYA:
- return "Arabic (Libya)"
- case this.ARABIC_MOROCCO:
- return "Arabic (Morocco)"
- case this.ARABIC_OMAN:
- return "Arabic (Oman)"
- case this.ARABIC_QATAR:
- return "Arabic (Qatar)"
- case this.ARABIC_SAUDI_ARABIA:
- return "Arabic (Saudi Arabia)"
- case this.ARABIC_SYRIA:
- return "Arabic (Syria)"
- case this.ARABIC_TUNISIA:
- return "Arabic (Tunisia)"
- case this.ARABIC_UAE:
- return "Arabic (U.A.E.)"
- case this.ARABIC_YEMEN:
- return "Arabic (Yemen)"
- case this.ARABIC_ARMENIAN:
- return "Armenian"
- case this.ARABIC_WORLD:
- return "Arabic (World)"
- case this.AZERI_CYRILIC:
- return "Azeri (Cyrillic)"
- case this.AZERI_LATIN:
- return "Azeri (Latin)"
- case this.BASQUE:
- return "Basque"
- case this.BANK_CARD:
- return "Bank Card"
- case this.BANK_CARD_CVV2:
- return "Bank Card CVV2"
- case this.BANK_CARD_NAME:
- return "Bank Card Name"
- case this.BANK_CARD_NUMBER:
- return "Bank Card Number"
- case this.BANK_CARD_VALID_THRU:
- return "Bank Card Valid Thru"
- case this.BELARUSIAN:
- return "Belarusian"
- case this.BENGALI:
- return "Bengali"
- case this.BULGARIAN:
- return "Bulgarian"
- case this.CATALAN:
- return "Catalan"
- case this.CHINESE_HONGKONG_SAR:
- return "Chinese (HongKong S.A.R.)"
- case this.CHINESE_MACAO_SAR:
- return "Chinese (Macao S.A.R.)"
- case this.CHINESE:
- return "Chinese"
- case this.CHINESE_SINGAPORE:
- return "Chinese (Singapore)"
- case this.CHINESE_TAIWAN:
- return "Chinese (Taiwan)"
- case this.CROATIAN:
- return "Croatian"
- case this.CZECH:
- return "Czech"
- case this.DANISH:
- return "Danish"
- case this.DIVEHI:
- return "Divehi"
- case this.DUTCH_BELGIUM:
- return "Dutch (Belgium)"
- case this.DUTCH_NETHERLANDS:
- return "Dutch (Netherlands)"
- case this.ENGLISH_AUSTRALIA:
- return "English (Australia)"
- case this.ENGLISH_BELIZE:
- return "English (Belize)"
- case this.ENGLISH_CANADA:
- return "English (Canada)"
- case this.ENGLISH_CARRIBEAN:
- return "English (Caribbean)"
- case this.ENGLISH_IRELAND:
- return "English (Ireland)"
- case this.ENGLISH_JAMAICA:
- return "English (Jamaica)"
- case this.ENGLISH_NEW_ZEALAND:
- return "English (New Zealand)"
- case this.ENGLISH_PHILIPPINES:
- return "English (Philippines)"
- case this.ENGLISH_SOUTH_AFRICA:
- return "English (South Africa)"
- case this.ENGLISH_TRINIDAD:
- return "English (Trinidad)"
- case this.ENGLISH_UK:
- return "English (United Kingdom)"
- case this.ENGLISH_US:
- return "English (United States)"
- case this.ENGLISH_ZIMBABWE:
- return "English (Zimbabwe)"
- case this.ESTONIAN:
- return "Estonian"
- case this.FAEROESE:
- return "Faeroese"
- case this.FARSI:
- return "Farsi"
- case this.FINNISH:
- return "Finnish"
- case this.FRENCH_BELGIUM:
- return "French (Belgium)"
- case this.FRENCH_CANADA:
- return "French (Canada)"
- case this.FRENCH_FRANCE:
- return "French (France)"
- case this.FRENCH_LUXEMBOURG:
- return "French (Luxembourg)"
- case this.FRENCH_MONACO:
- return "French (Monaco)"
- case this.FRENCH_SWITZERLAND:
- return "French (Switzerland)"
- case this.GALICIAN:
- return "Galician"
- case this.GEORGIAN:
- return "Georgian"
- case this.GERMAN_AUSTRIA:
- return "German (Austria)"
- case this.GERMAN_GERMANY:
- return "German (Germany)"
- case this.GERMAN_LIECHTENSTEIN:
- return "German (Liechtenstein)"
- case this.GERMAN_LUXEMBOURG:
- return "German (Luxembourg)"
- case this.GERMAN_SWITZERLAND:
- return "German (Switzerland)"
- case this.GREEK:
- return "Greek"
- case this.GUJARATI:
- return "Gujarati"
- case this.HEBREW:
- return "Hebrew"
- case this.HINDI_INDIA:
- return "Hindi (India)"
- case this.HUNGARIAN:
- return "Hungarian"
- case this.ICELANDIC:
- return "Icelandic"
- case this.INDONESIAN:
- return "Indonesian"
- case this.ITALIAN_ITALY:
- return "Italian (Italy)"
- case this.ITALIAN_SWITZERLAND:
- return "Italian (Switzerland)"
- case this.JAPANESE:
- return "Japanese"
- case this.KANNADA:
- return "Kannada"
- case this.KASHMIRI:
- return "Kashmiri"
- case this.KAZAKH:
- return "Kazakh"
- case this.KONKANI:
- return "Konkani"
- case this.KOREAN:
- return "Korean"
- case this.KYRGYZ_CYRILICK:
- return "Kyrgyz (Cyrillic)"
- case this.LAO:
- return "Lao"
- case this.LATVIAN:
- return "Latvian"
- case this.LITHUANIAN:
- return "Lithuanian"
- case this.FYRO_MACEDONIAN:
- return "FYRO Macedonian"
- case this.MALAY_MALAYSIA:
- return "Malay (Malaysia)"
- case this.MALAY_BRUNEI_DARUSSALAM:
- return "Malay (Brunei Darussalam)"
- case this.MARATHI:
- return "Marathi"
- case this.MONGOLIAN_CYRILIC:
- return "Mongolian (Cyrillic)"
- case this.NORWEGIAN_BOKMAL:
- return "Norwegian (Bokmal)"
- case this.NORWEGIAN_NYORSK:
- return "Norwegian (Nynorsk)"
- case this.PASHTO:
- return "Pashto"
- case this.POLISH:
- return "Polish"
- case this.PORTUGUESE_BRAZIL:
- return "Portuguese (Brazil)"
- case this.PORTUGUESE_PORTUGAL:
- return "Portuguese (Portugal)"
- case this.PUNJABI:
- return "Punjabi"
- case this.RHAETO_ROMANIC:
- return "Rhaeto-Romanic"
- case this.ROMANIAN:
- return "Romanian"
- case this.RUSSIAN:
- return "Russian"
- case this.SANSKRIT:
- return "Sanskrit"
- case this.SINDHI:
- return "Sindhi"
- case this.SINDHI_INDIA:
- return "Sindhi (India)"
- case this.SINHALA:
- return "Sinhala"
- case this.SERBIAN_CYRILIC:
- return "Serbian (Cyrillic)"
- case this.SERBIAN_LATIN:
- return "Serbian (Latin)"
- case this.SLOVAK:
- return "Slovak"
- case this.SLOVENIAN:
- return "Slovenian"
- case this.SPANISH_ARGENTINA:
- return "Spanish (Argentina)"
- case this.SPANISH_BOLIVIA:
- return "Spanish (Bolivia)"
- case this.SPANISH_CHILE:
- return "Spanish (Chile)"
- case this.SPANICH_COLOMBIA:
- return "Spanish (Colombia)"
- case this.SPANISH_COSTA_RICA:
- return "Spanish (Costa Rica)"
- case this.SPANISH_DOMINICAN_REPUBLIC:
- return "Spanish (Dominican Republic)"
- case this.SPANISH_ECUADOR:
- return "Spanish (Ecuador)"
- case this.SPANISH_EL_SALVADOR:
- return "Spanish (El Salvador)"
- case this.SPANISH_GUATEMALA:
- return "Spanish (Guatemala)"
- case this.SPANISH_HONDURAS:
- return "Spanish (Honduras)"
- case this.SPANISH_MEXICO:
- return "Spanish (Mexico)"
- case this.SPANISH_NICARAGUA:
- return "Spanish (Nicaragua)"
- case this.SPANISH_PANAMA:
- return "Spanish (Panama)"
- case this.SPANISH_PARAGUAY:
- return "Spanish (Paraguay)"
- case this.SPANISH_PERU:
- return "Spanish (Peru)"
- case this.SPANISH_PUERTO_RICO:
- return "Spanish (Puerto Rico)"
- case this.SPANISH_TRADITIONAL_SORT:
- return "Spanish (Traditional Sort)"
- case this.SPANISH_INTERNATIONAL_SORT:
- return "Spanish (International Sort)"
- case this.SPANISH_URUGUAY:
- return "Spanish (Uruguay)"
- case this.SPANISH_VENEZUELA:
- return "Spanish (Venezuela)"
- case this.SWAHILI:
- return "Swahili"
- case this.SWEDISH:
- return "Swedish"
- case this.SWEDISH_FINLAND:
- return "Swedish (Finland)"
- case this.SYRIAC:
- return "Syriac"
- case this.TAMIL:
- return "Tamil"
- case this.TATAR:
- return "Tatar"
- case this.TELUGU:
- return "Telugu"
- case this.THAI_THAILAND:
- return "Thai (Thailand)"
- case this.TURKISH:
- return "Turkish"
- case this.TAJIK_CYRILLIC:
- return "Tajik (Cyrillic)"
- case this.TURKMEN:
- return "Turkmen"
- case this.UKRAINIAN:
- return "Ukrainian"
- case this.URDU:
- return "Urdu"
- case this.UZBEK_CYRILIC:
- return "Uzbek (Cyrillic)"
- case this.UZBEK_LATIN:
- return "Uzbek (Latin)"
- case this.VIETNAMESE:
- return "Vietnamese"
- case this.CTC_SIMPLIFIED:
- return "CTC Simplified"
- case this.CTC_TRADITIONAL:
- return "CTC Traditional"
- default:
- return value
- }
- }
}
const DocReaderFrame = {
@@ -6187,19 +3474,6 @@ const eRPRM_Lights = {
RPRM_Light_IR_Full: (8 | 16),
RPRM_LIGHT_OVD: 67108864,
RPRM_LIGHT_WHITE_FULL_OVD: (6 | 67108864),
-
- getTranslation: function (value) {
- switch (value) {
- case this.RPRM_LIGHT_UV:
- return "UV"
- case this.RPRM_Light_IR_Full:
- return "IR"
- case this.RPRM_LIGHT_WHITE_FULL:
- return "Visible light"
- default:
- return value
- }
- }
}
const LineCap = {
@@ -6273,6 +3547,7 @@ const Enum = {
eProcessGLCommands,
PKDResourceType,
eRFID_AuthenticationProcedureType,
+ DocumentReaderErrorCodes,
ScenarioIdentifier,
eRFID_AccessControl_ProcedureType,
eRFID_NotificationCodes,
@@ -6336,6 +3611,9 @@ DocumentReader.getDatabaseDocumentsNumber = (successCallback, errorCallback) =>
DocumentReader.selectedScenario = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["selectedScenario"])
DocumentReader.getSessionLogFolder = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getSessionLogFolder"])
DocumentReader.getDatabaseDescription = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getDatabaseDescription"])
+/**
+ * @deprecated
+ */
DocumentReader.showScanner = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["showScanner"])
DocumentReader.startNewPage = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startNewPage"])
DocumentReader.startNewSession = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startNewSession"])
@@ -6363,15 +3641,28 @@ DocumentReader.addPKDCertificates = (certificates, successCallback, errorCallbac
DocumentReader.setCameraSessionIsPaused = (paused, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setCameraSessionIsPaused", paused])
DocumentReader.setTag = (tag, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setTag", tag])
DocumentReader.checkDatabaseUpdate = (databaseId, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["checkDatabaseUpdate", databaseId])
-DocumentReader.getScenario = (scenario, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getScenario", scenario])
+DocumentReader.scan = (config, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["scan", config])
+DocumentReader.recognize = (config, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognize", config])
+/**
+ * @deprecated
+ */
DocumentReader.recognizeImages = (images, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImages", images])
+/**
+ * @deprecated
+ */
DocumentReader.showScannerWithCameraID = (cameraID, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["showScannerWithCameraID", cameraID])
DocumentReader.runAutoUpdate = (databaseType, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["runAutoUpdate", databaseType])
DocumentReader.setConfig = (config, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setConfig", config])
DocumentReader.setRfidScenario = (scenario, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setRfidScenario", scenario])
DocumentReader.initializeReader = (config, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["initializeReader", config])
DocumentReader.prepareDatabase = (databaseType, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["prepareDatabase", databaseType])
+/**
+ * @deprecated
+ */
DocumentReader.recognizeImage = (image, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImage", image])
+/**
+ * @deprecated
+ */
DocumentReader.recognizeData = (data, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeData", data])
DocumentReader.setRfidSessionStatus = (status, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setRfidSessionStatus", status])
DocumentReader.providePACertificates = (certificates, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["providePACertificates", certificates])
@@ -6379,12 +3670,20 @@ DocumentReader.provideTACertificates = (certificates, successCallback, errorCall
DocumentReader.provideTASignature = (signature, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["provideTASignature", signature])
DocumentReader.parseCoreResults = (json, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["parseCoreResults", json])
DocumentReader.setTCCParams = (params, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setTCCParams", params])
+/**
+ * @deprecated
+ */
DocumentReader.recognizeImageWithOpts = (image, options, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImageWithOpts", image, options])
DocumentReader.recognizeVideoFrame = (byteString, params, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeVideoFrame", byteString, params])
+/**
+ * @deprecated
+ */
DocumentReader.showScannerWithCameraIDAndOpts = (cameraID, options, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["showScannerWithCameraIDAndOpts", cameraID, options])
DocumentReader.recognizeImageWithCameraMode = (image, mode, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImageWithCameraMode", image, mode])
+/**
+ * @deprecated
+ */
DocumentReader.recognizeImagesWithImageInputs = (images, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImagesWithImageInputs", images])
-DocumentReader.setOnCustomButtonTappedListener = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setOnCustomButtonTappedListener"])
DocumentReader.setLanguage = (language, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setLanguage", language])
DocumentReader.textFieldValueByType = (results, fieldType, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["textFieldValueByType", results.rawResult, fieldType])
@@ -6411,9 +3710,6 @@ DocumentReaderPlugin.DocumentReader = DocumentReader
DocumentReaderPlugin.Enum = Enum
DocumentReaderPlugin.DocumentReaderScenario = DocumentReaderScenario
-DocumentReaderPlugin.CoreDetailedScenario = CoreDetailedScenario
-DocumentReaderPlugin.FaceMetaData = FaceMetaData
-DocumentReaderPlugin.Bounds = Bounds
DocumentReaderPlugin.Rect = Rect
DocumentReaderPlugin.DocReaderFieldRect = DocReaderFieldRect
DocumentReaderPlugin.DocumentReaderGraphicField = DocumentReaderGraphicField
@@ -6443,6 +3739,7 @@ DocumentReaderPlugin.SignerInfo = SignerInfo
DocumentReaderPlugin.SecurityObject = SecurityObject
DocumentReaderPlugin.CardProperties = CardProperties
DocumentReaderPlugin.RFIDSessionData = RFIDSessionData
+DocumentReaderPlugin.DataField = DataField
DocumentReaderPlugin.DocumentReaderAuthenticityCheck = DocumentReaderAuthenticityCheck
DocumentReaderPlugin.PDF417Info = PDF417Info
DocumentReaderPlugin.DocumentReaderBarcodeResult = DocumentReaderBarcodeResult
@@ -6451,7 +3748,7 @@ DocumentReaderPlugin.DocumentReaderAuthenticityResult = DocumentReaderAuthentici
DocumentReaderPlugin.DocumentReaderAuthenticityElement = DocumentReaderAuthenticityElement
DocumentReaderPlugin.DocumentReaderCompletion = DocumentReaderCompletion
DocumentReaderPlugin.RfidNotificationCompletion = RfidNotificationCompletion
-DocumentReaderPlugin.DocumentReaderException = DocumentReaderException
+DocumentReaderPlugin.RegulaException = RegulaException
DocumentReaderPlugin.PKDCertificate = PKDCertificate
DocumentReaderPlugin.ImageInputParam = ImageInputParam
DocumentReaderPlugin.PAResourcesIssuer = PAResourcesIssuer
@@ -6469,6 +3766,14 @@ DocumentReaderPlugin.DocumentReaderRfidOrigin = DocumentReaderRfidOrigin
DocumentReaderPlugin.DocumentReaderTextSource = DocumentReaderTextSource
DocumentReaderPlugin.DocumentReaderSymbol = DocumentReaderSymbol
DocumentReaderPlugin.DocumentReaderValidity = DocumentReaderValidity
+DocumentReaderPlugin.FaceApiParams = FaceApiParams
+DocumentReaderPlugin.Search = Search
+DocumentReaderPlugin.ImageQA = ImageQA
+DocumentReaderPlugin.GlaresCheckParams = GlaresCheckParams
+DocumentReaderPlugin.RFIDParams = RFIDParams
+DocumentReaderPlugin.OnlineProcessingConfig = OnlineProcessingConfig
+DocumentReaderPlugin.ScannerConfig = ScannerConfig
+DocumentReaderPlugin.RecognizeConfig = RecognizeConfig
DocumentReaderPlugin.DocumentReaderResults = DocumentReaderResults
module.exports = DocumentReaderPlugin
\ No newline at end of file