@regulaforensics/document-reader 9.2.556-beta → 9.2.558-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNDocumentReader.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +2 -0
- package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +19 -0
- package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +9 -2
- package/examples/capacitor/package-lock.json +662 -743
- package/examples/capacitor/package.json +15 -15
- package/examples/ionic/package-lock.json +3 -3
- package/examples/ionic/package.json +1 -1
- package/examples/react_native/package.json +1 -1
- package/ios/RGLWConfig.m +4 -0
- package/ios/RGLWJSONConstructor.h +2 -0
- package/ios/RGLWJSONConstructor.m +25 -0
- package/ios/RGLWMain.m +7 -0
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +7 -0
- package/test/package-lock.json +1 -1
- package/test/test.tsx +3 -2
- package/www/capacitor/config/FinalizeConfig.js +31 -0
- package/www/capacitor/index.js +10 -7
- package/www/capacitor/params/process_params/ProcessParams.js +8 -0
- package/www/capacitor/results/Results.js +4 -0
- package/www/capacitor/results/authenticity/CheckDiagnose.js +1 -0
- package/www/capacitor/results/authenticity/SecurityFeatureType.js +4 -0
- package/www/cordova.js +344 -277
- package/www/react-native/config/FinalizeConfig.js +31 -0
- package/www/react-native/index.js +10 -7
- package/www/react-native/params/process_params/ProcessParams.js +8 -0
- package/www/react-native/results/Results.js +4 -0
- package/www/react-native/results/authenticity/CheckDiagnose.js +1 -0
- package/www/react-native/results/authenticity/SecurityFeatureType.js +4 -0
- package/www/types/config/FinalizeConfig.d.ts +5 -0
- package/www/types/index.d.ts +3 -2
- package/www/types/params/customization/Customization.d.ts +1 -1
- package/www/types/params/process_params/ProcessParams.d.ts +1 -4
- package/www/types/results/Results.d.ts +4 -0
- package/www/types/results/authenticity/CheckDiagnose.d.ts +2 -0
- package/www/types/results/authenticity/SecurityFeatureType.d.ts +4 -0
- package/www/types/results/status/ResultsStatus.d.ts +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export class FinalizeConfig {
|
|
2
|
+
rawImages
|
|
3
|
+
video
|
|
4
|
+
rfidSession
|
|
5
|
+
|
|
6
|
+
constructor(options) {
|
|
7
|
+
this.rawImages = options?.rawImages
|
|
8
|
+
this.video = options?.video
|
|
9
|
+
this.rfidSession = options?.rfidSession
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static fromJson(jsonObject) {
|
|
13
|
+
if (jsonObject == null) return null;
|
|
14
|
+
var result = new FinalizeConfig();
|
|
15
|
+
|
|
16
|
+
result.rawImages = jsonObject["rawImages"];
|
|
17
|
+
result.video = jsonObject["video"];
|
|
18
|
+
result.rfidSession = jsonObject["rfidSession"];
|
|
19
|
+
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
toJson() {
|
|
25
|
+
return {
|
|
26
|
+
"rawImages": this.rawImages,
|
|
27
|
+
"video": this.video,
|
|
28
|
+
"rfidSession": this.rfidSession,
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -5,7 +5,8 @@ import { InitConfig } from './config/InitConfig';
|
|
|
5
5
|
import { RFIDConfig } from './config/RFIDConfig';
|
|
6
6
|
import { ScannerConfig } from './config/ScannerConfig';
|
|
7
7
|
import { RecognizeConfig, ImageInputData } from './config/RecognizeConfig';
|
|
8
|
-
|
|
8
|
+
import { FinalizeConfig } from './config/FinalizeConfig';
|
|
9
|
+
export { OnlineProcessingConfig, ImageFormat, OnlineMode, InitConfig, RFIDConfig, ScannerConfig, RecognizeConfig, ImageInputData, FinalizeConfig };
|
|
9
10
|
|
|
10
11
|
import { DocReaderVersion } from './info/DocReaderVersion';
|
|
11
12
|
import { PrepareProgress } from './info/PrepareProgress';
|
|
@@ -367,8 +368,10 @@ export class DocumentReader {
|
|
|
367
368
|
return this._successOrErrorFromJson(response);
|
|
368
369
|
}
|
|
369
370
|
|
|
370
|
-
async finalizePackage() {
|
|
371
|
-
var
|
|
371
|
+
async finalizePackage(options) {
|
|
372
|
+
var funcName = "finalizePackage";
|
|
373
|
+
if (options?.config != null) funcName = "finalizePackageWithFinalizeConfig";
|
|
374
|
+
var response = await exec(funcName, [options?.config?.toJson()]);
|
|
372
375
|
var jsonObject = JSON.parse(response);
|
|
373
376
|
var action = jsonObject["action"];
|
|
374
377
|
var info = TransactionInfo.fromJson(jsonObject["info"]);
|
|
@@ -395,11 +398,11 @@ export class DocumentReader {
|
|
|
395
398
|
var response = "";
|
|
396
399
|
if (options?.withoutUI != true) {
|
|
397
400
|
response = await exec("startEngageDevice", [type.value]);
|
|
398
|
-
|
|
401
|
+
} else if (type == MDLDeviceEngagement.NFC) {
|
|
399
402
|
response = await exec("engageDeviceNFC", []);
|
|
400
|
-
|
|
403
|
+
} else if (type == MDLDeviceEngagement.QR && options?.data != null) {
|
|
401
404
|
response = await exec("engageDeviceData", [options.data]);
|
|
402
|
-
|
|
405
|
+
}
|
|
403
406
|
|
|
404
407
|
var jsonObject = JSON.parse(response);
|
|
405
408
|
return [
|
|
@@ -412,7 +415,7 @@ export class DocumentReader {
|
|
|
412
415
|
var func = "startRetrieveData";
|
|
413
416
|
if (options?.withoutUI == MDLDeviceRetrieval.NFC) func = "engageDeviceNFC";
|
|
414
417
|
if (options?.withoutUI == MDLDeviceRetrieval.BLE) func = "engageDeviceBLE";
|
|
415
|
-
|
|
418
|
+
|
|
416
419
|
var response = await exec(func, [retrieval.toJson(), options?.engagement?.toJson()]);
|
|
417
420
|
var jsonObject = JSON.parse(response);
|
|
418
421
|
|
|
@@ -253,6 +253,12 @@ export class ProcessParams {
|
|
|
253
253
|
this._set({ "checkCaptureProcessIntegrity": val });
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
get bsiTr03135Results() { return this._bsiTr03135Results; }
|
|
257
|
+
set bsiTr03135Results(val) {
|
|
258
|
+
this._bsiTr03135Results = val;
|
|
259
|
+
this._set({ "bsiTr03135Results": val });
|
|
260
|
+
}
|
|
261
|
+
|
|
256
262
|
get barcodeParserType() { return this._barcodeParserType; }
|
|
257
263
|
set barcodeParserType(val) {
|
|
258
264
|
this._barcodeParserType = val;
|
|
@@ -528,6 +534,7 @@ export class ProcessParams {
|
|
|
528
534
|
result._strictSecurityChecks = jsonObject["strictSecurityChecks"];
|
|
529
535
|
result._returnTransliteratedFields = jsonObject["returnTransliteratedFields"];
|
|
530
536
|
result._checkCaptureProcessIntegrity = jsonObject["checkCaptureProcessIntegrity"];
|
|
537
|
+
result._bsiTr03135Results = jsonObject["bsiTr03135Results"];
|
|
531
538
|
result._barcodeParserType = jsonObject["barcodeParserType"];
|
|
532
539
|
result._perspectiveAngle = jsonObject["perspectiveAngle"];
|
|
533
540
|
result._minDPI = jsonObject["minDPI"];
|
|
@@ -613,6 +620,7 @@ export class ProcessParams {
|
|
|
613
620
|
"strictSecurityChecks": this.strictSecurityChecks,
|
|
614
621
|
"returnTransliteratedFields": this.returnTransliteratedFields,
|
|
615
622
|
"checkCaptureProcessIntegrity": this.checkCaptureProcessIntegrity,
|
|
623
|
+
"bsiTr03135Results": this.bsiTr03135Results,
|
|
616
624
|
"measureSystem": this.measureSystem,
|
|
617
625
|
"barcodeParserType": this.barcodeParserType,
|
|
618
626
|
"perspectiveAngle": this.perspectiveAngle,
|
|
@@ -39,6 +39,7 @@ export class Results {
|
|
|
39
39
|
elapsedTime
|
|
40
40
|
elapsedTimeRFID
|
|
41
41
|
rawResult
|
|
42
|
+
bsiTr03135Results
|
|
42
43
|
transactionInfo
|
|
43
44
|
|
|
44
45
|
async textFieldValueByType(fieldType) {
|
|
@@ -202,6 +203,7 @@ export class Results {
|
|
|
202
203
|
result.graphicResult = GraphicResult.fromJson(jsonObject["graphicResult"]);
|
|
203
204
|
result.textResult = TextResult.fromJson(jsonObject["textResult"]);
|
|
204
205
|
result.rawResult = jsonObject["rawResult"];
|
|
206
|
+
result.bsiTr03135Results = jsonObject["bsiTr03135Results"];
|
|
205
207
|
result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"]);
|
|
206
208
|
result.authenticityResult = AuthenticityResult.fromJson(jsonObject["authenticityResult"]);
|
|
207
209
|
result.barcodeResult = BarcodeResult.fromJson(jsonObject["barcodeResult"]);
|
|
@@ -286,6 +288,7 @@ export class Results {
|
|
|
286
288
|
"elapsedTime": this.elapsedTime,
|
|
287
289
|
"elapsedTimeRFID": this.elapsedTimeRFID,
|
|
288
290
|
"rawResult": this.rawResult,
|
|
291
|
+
"bsiTr03135Results": this.bsiTr03135Results,
|
|
289
292
|
"transactionInfo": this.transactionInfo?.toJson(),
|
|
290
293
|
}
|
|
291
294
|
}
|
|
@@ -336,6 +339,7 @@ export const ResultType = {
|
|
|
336
339
|
INTERNAL_LICENSE: 50,
|
|
337
340
|
MRZ_POSITION: 61,
|
|
338
341
|
BARCODE_POSITION: 62,
|
|
342
|
+
RESULT_TYPE_BSI_XML_V2: 73,
|
|
339
343
|
DOCUMENT_POSITION: 85,
|
|
340
344
|
CUSTOM: 100,
|
|
341
345
|
RFID_RAW_DATA: 101,
|
|
@@ -117,6 +117,7 @@ export const CheckDiagnose = {
|
|
|
117
117
|
CHD_DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED: 239,
|
|
118
118
|
DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
|
|
119
119
|
DOC_LIVENESS_INVALID_BARCODE_BACKGROUND: 241,
|
|
120
|
+
DOC_LIVENESS_VIRTUAL_CAMERA_DETECTED: 242,
|
|
120
121
|
ICAO_IDB_BASE_32_ERROR: 243,
|
|
121
122
|
ICAO_IDB_ZIPPED_ERROR: 244,
|
|
122
123
|
ICAO_IDB_MESSAGE_ZONE_EMPTY: 245,
|
|
@@ -58,4 +58,8 @@ export const SecurityFeatureType = {
|
|
|
58
58
|
LIVENESS_GEOMETRY_CHECK: 55,
|
|
59
59
|
AGE_CHECK: 56,
|
|
60
60
|
SEX_CHECK: 57,
|
|
61
|
+
PORTRAIT_COMPARISON_RFIDVSGHOST: 58,
|
|
62
|
+
PORTRAIT_COMPARISON_BARCODEVSGHOST: 59,
|
|
63
|
+
PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
|
|
64
|
+
PORTRAIT_COMPARISON_EXTVSGHOST: 61,
|
|
61
65
|
}
|
package/www/types/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import { InitConfig } from './config/InitConfig';
|
|
|
3
3
|
import { RFIDConfig, RFIDCompletion, RFIDProgressCompletion, ChipDetectedCompletion, RetryReadChipCompletion, PaCertificateCompletion, TaCertificateCompletion, PKDCertificateRequest, TaSignatureCompletion, TASignatureRequest } from './config/RFIDConfig';
|
|
4
4
|
import { ScannerConfig } from './config/ScannerConfig';
|
|
5
5
|
import { RecognizeConfig, ImageInputData } from './config/RecognizeConfig';
|
|
6
|
-
|
|
6
|
+
import { FinalizeConfig } from './config/FinalizeConfig';
|
|
7
|
+
export { OnlineProcessingConfig, ImageFormat, OnlineMode, InitConfig, RFIDConfig, RFIDCompletion, RFIDProgressCompletion, ChipDetectedCompletion, RetryReadChipCompletion, PaCertificateCompletion, TaCertificateCompletion, PKDCertificateRequest, TaSignatureCompletion, TASignatureRequest, ScannerConfig, RecognizeConfig, ImageInputData, FinalizeConfig };
|
|
7
8
|
|
|
8
9
|
import { DocReaderVersion } from './info/DocReaderVersion';
|
|
9
10
|
import { PrepareProgress, DocumentReaderPrepareCompletion } from './info/PrepareProgress';
|
|
@@ -375,7 +376,7 @@ export class DocumentReader {
|
|
|
375
376
|
*
|
|
376
377
|
* @returns Returns action, info and error.
|
|
377
378
|
*/
|
|
378
|
-
finalizePackage(): Promise<[action: DocReaderAction, info: TransactionInfo | null, error: DocReaderException | null]>;
|
|
379
|
+
finalizePackage(config?: FinalizeConfig): Promise<[action: DocReaderAction, info: TransactionInfo | null, error: DocReaderException | null]>;
|
|
379
380
|
|
|
380
381
|
/** It's used to end transaction during backend processing. */
|
|
381
382
|
endBackendTransaction(): void;
|
|
@@ -206,11 +206,8 @@ export declare class ProcessParams {
|
|
|
206
206
|
* Default: `true`.
|
|
207
207
|
*/
|
|
208
208
|
returnTransliteratedFields?: boolean;
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Android only.
|
|
212
|
-
*/
|
|
213
209
|
checkCaptureProcessIntegrity?: boolean;
|
|
210
|
+
bsiTr03135Results?: boolean;
|
|
214
211
|
/**
|
|
215
212
|
* There are documents that contain barcodes which data can be parsed only
|
|
216
213
|
* if document type verification is performed. The following property allows
|
|
@@ -65,6 +65,8 @@ export declare class Results {
|
|
|
65
65
|
readonly elapsedTimeRFID: number;
|
|
66
66
|
/** Raw results, i.e. in their initial view. */
|
|
67
67
|
readonly rawResult: string;
|
|
68
|
+
/** Contains results in accordance with the BSI TR-03135 standard. */
|
|
69
|
+
readonly bsiTr03135Results: string;
|
|
68
70
|
readonly transactionInfo: TransactionInfo | null;
|
|
69
71
|
|
|
70
72
|
/** Allows you to get a value of a text field. */
|
|
@@ -252,6 +254,8 @@ export declare enum ResultType {
|
|
|
252
254
|
MRZ_POSITION = 61,
|
|
253
255
|
/** Used for storing barcode position. */
|
|
254
256
|
BARCODE_POSITION = 62,
|
|
257
|
+
/** Results in accordance with the BSI TR-03135 standard. */
|
|
258
|
+
RESULT_TYPE_BSI_XML_V2 = 73,
|
|
255
259
|
/** Used for storing document position. */
|
|
256
260
|
DOCUMENT_POSITION = 85,
|
|
257
261
|
/** Not used */
|
|
@@ -224,6 +224,8 @@ export declare enum CheckDiagnose {
|
|
|
224
224
|
DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED = 240,
|
|
225
225
|
/** Invalid barcode background. */
|
|
226
226
|
DOC_LIVENESS_INVALID_BARCODE_BACKGROUND = 241,
|
|
227
|
+
/** Virtual camera was detected. */
|
|
228
|
+
DOC_LIVENESS_VIRTUAL_CAMERA_DETECTED = 242,
|
|
227
229
|
ICAO_IDB_BASE_32_ERROR = 243,
|
|
228
230
|
ICAO_IDB_ZIPPED_ERROR = 244,
|
|
229
231
|
ICAO_IDB_MESSAGE_ZONE_EMPTY = 245,
|
|
@@ -101,4 +101,8 @@ export declare enum SecurityFeatureType {
|
|
|
101
101
|
AGE_CHECK = 56,
|
|
102
102
|
/** Sex check. */
|
|
103
103
|
SEX_CHECK = 57,
|
|
104
|
+
PORTRAIT_COMPARISON_RFIDVSGHOST = 58,
|
|
105
|
+
PORTRAIT_COMPARISON_BARCODEVSGHOST = 59,
|
|
106
|
+
PORTRAIT_COMPARISON_GHOSTVSLIVE = 60,
|
|
107
|
+
PORTRAIT_COMPARISON_EXTVSGHOST = 61,
|
|
104
108
|
}
|
|
@@ -23,7 +23,6 @@ export declare class ResultsStatus {
|
|
|
23
23
|
readonly mDL: CheckResult;
|
|
24
24
|
/** Summary of all age results. */
|
|
25
25
|
readonly age: CheckResult;
|
|
26
|
-
/** Android only. */
|
|
27
26
|
readonly captureProcessIntegrity: CheckResult | null;
|
|
28
27
|
/** Container for an age related scanning statuses. */
|
|
29
28
|
readonly ageStatus: AgeStatus;
|