@regulaforensics/document-reader 8.3.273-beta → 8.3.276-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 +1 -1
- package/examples/capacitor/package.json +1 -1
- package/examples/ionic/package.json +1 -1
- package/examples/react_native/package.json +1 -1
- package/package.json +1 -1
- package/plugin.xml +1 -1
- package/test/json.tsx +92 -92
- package/test/package-lock.json +1 -1
- package/test/package.json +0 -3
- package/test/test.tsx +87 -87
- package/test/utils.tsx +29 -25
- package/www/capacitor/config/OnlineProcessingConfig.js +11 -0
- package/www/capacitor/config/RecognizeConfig.js +23 -0
- package/www/capacitor/config/ScannerConfig.js +10 -0
- package/www/capacitor/info/DocReaderException.js +7 -0
- package/www/capacitor/info/DocReaderScenario.js +18 -0
- package/www/capacitor/info/DocReaderVersion.js +9 -0
- package/www/capacitor/info/DocumentsDatabase.js +12 -0
- package/www/capacitor/info/License.js +8 -0
- package/www/capacitor/info/PrepareProgress.js +8 -0
- package/www/capacitor/info/RFIDException.js +7 -0
- package/www/capacitor/params/Functionality.js +44 -0
- package/www/capacitor/params/customization/Customization.js +76 -0
- package/www/capacitor/params/customization/CustomizationColors.js +13 -0
- package/www/capacitor/params/customization/CustomizationFonts.js +8 -0
- package/www/capacitor/params/customization/CustomizationImages.js +6 -0
- package/www/capacitor/params/customization/Font.js +8 -0
- package/www/capacitor/params/process_params/AuthenticityParams.js +21 -0
- package/www/capacitor/params/process_params/BackendProcessingConfig.js +9 -0
- package/www/capacitor/params/process_params/FaceApiParams.js +13 -0
- package/www/capacitor/params/process_params/FaceApiSearchParams.js +8 -0
- package/www/capacitor/params/process_params/GlaresCheckParams.js +7 -0
- package/www/capacitor/params/process_params/ImageQA.js +16 -0
- package/www/capacitor/params/process_params/LivenessParams.js +12 -0
- package/www/capacitor/params/process_params/ProcessParams.js +82 -2
- package/www/capacitor/params/process_params/RfidParams.js +6 -0
- package/www/capacitor/params/rfid_scenario/DTCDataGroup.js +10 -0
- package/www/capacitor/params/rfid_scenario/EDLDataGroups.js +19 -0
- package/www/capacitor/params/rfid_scenario/EIDDataGroups.js +26 -0
- package/www/capacitor/params/rfid_scenario/EPassportDataGroups.js +21 -0
- package/www/capacitor/params/rfid_scenario/RFIDScenario.js +67 -0
- package/www/capacitor/results/Position.js +28 -0
- package/www/capacitor/results/Results.js +25 -0
- package/www/capacitor/results/TransactionInfo.js +8 -0
- package/www/capacitor/results/authenticity/AuthenticityCheck.js +10 -0
- package/www/capacitor/results/authenticity/AuthenticityElement.js +10 -0
- package/www/capacitor/results/authenticity/AuthenticityResult.js +7 -0
- package/www/capacitor/results/barcode/BarcodeField.js +10 -0
- package/www/capacitor/results/barcode/BarcodeResult.js +6 -0
- package/www/capacitor/results/barcode/PDF417Info.js +8 -0
- package/www/capacitor/results/image_quality/ImageQuality.js +9 -0
- package/www/capacitor/results/image_quality/ImageQualityGroup.js +9 -0
- package/www/capacitor/results/rfid/AccessControlProcedureType.js +9 -0
- package/www/capacitor/results/rfid/Application.js +12 -0
- package/www/capacitor/results/rfid/Attribute.js +7 -0
- package/www/capacitor/results/rfid/Authority.js +8 -0
- package/www/capacitor/results/rfid/CardProperties.js +19 -0
- package/www/capacitor/results/rfid/CertificateChain.js +18 -0
- package/www/capacitor/results/rfid/CertificateData.js +7 -0
- package/www/capacitor/results/rfid/DataField.js +7 -0
- package/www/capacitor/results/rfid/Extension.js +7 -0
- package/www/capacitor/results/rfid/File.js +17 -0
- package/www/capacitor/results/rfid/FileData.js +9 -0
- package/www/capacitor/results/rfid/RFIDSessionData.js +16 -0
- package/www/capacitor/results/rfid/RFIDValidity.js +7 -0
- package/www/capacitor/results/rfid/RFIDValue.js +10 -0
- package/www/capacitor/results/rfid/SecurityObject.js +10 -0
- package/www/capacitor/results/rfid/SecurityObjectCertificates.js +6 -0
- package/www/capacitor/results/rfid/SignerInfo.js +17 -0
- package/www/capacitor/results/status/OpticalStatus.js +14 -0
- package/www/capacitor/results/status/RFIDStatus.js +12 -0
- package/www/capacitor/results/status/ResultsStatus.js +12 -0
- package/www/capacitor/results/visible_digital_seals/BytesData.js +9 -0
- package/www/capacitor/results/visible_digital_seals/VDSNCData.js +14 -0
- package/www/capacitor/results/visual_results/Comparison.js +8 -0
- package/www/capacitor/results/visual_results/GraphicField.js +14 -0
- package/www/capacitor/results/visual_results/GraphicResult.js +6 -0
- package/www/capacitor/results/visual_results/RFIDOrigin.js +9 -0
- package/www/capacitor/results/visual_results/Rect.js +9 -0
- package/www/capacitor/results/visual_results/Symbol.js +8 -0
- package/www/capacitor/results/visual_results/TextField.js +17 -0
- package/www/capacitor/results/visual_results/TextResult.js +10 -0
- package/www/capacitor/results/visual_results/TextSource.js +8 -0
- package/www/capacitor/results/visual_results/Validity.js +7 -0
- package/www/capacitor/results/visual_results/Value.js +13 -0
- package/www/capacitor/rfid/PAAttribute.js +7 -0
- package/www/capacitor/rfid/PAResourcesIssuer.js +8 -0
- package/www/capacitor/rfid/PKDCertificate.js +8 -0
- package/www/capacitor/rfid/RFIDNotification.js +8 -0
- package/www/capacitor/rfid/TAChallenge.js +10 -0
- package/www/capacitor/rfid/TccParams.js +10 -0
- package/www/cordova.js +1122 -2
- package/www/react-native/config/OnlineProcessingConfig.js +11 -0
- package/www/react-native/config/RecognizeConfig.js +23 -0
- package/www/react-native/config/ScannerConfig.js +10 -0
- package/www/react-native/info/DocReaderException.js +7 -0
- package/www/react-native/info/DocReaderScenario.js +18 -0
- package/www/react-native/info/DocReaderVersion.js +9 -0
- package/www/react-native/info/DocumentsDatabase.js +12 -0
- package/www/react-native/info/License.js +8 -0
- package/www/react-native/info/PrepareProgress.js +8 -0
- package/www/react-native/info/RFIDException.js +7 -0
- package/www/react-native/params/Functionality.js +44 -0
- package/www/react-native/params/customization/Customization.js +76 -0
- package/www/react-native/params/customization/CustomizationColors.js +13 -0
- package/www/react-native/params/customization/CustomizationFonts.js +8 -0
- package/www/react-native/params/customization/CustomizationImages.js +6 -0
- package/www/react-native/params/customization/Font.js +8 -0
- package/www/react-native/params/process_params/AuthenticityParams.js +21 -0
- package/www/react-native/params/process_params/BackendProcessingConfig.js +9 -0
- package/www/react-native/params/process_params/FaceApiParams.js +13 -0
- package/www/react-native/params/process_params/FaceApiSearchParams.js +8 -0
- package/www/react-native/params/process_params/GlaresCheckParams.js +7 -0
- package/www/react-native/params/process_params/ImageQA.js +16 -0
- package/www/react-native/params/process_params/LivenessParams.js +12 -0
- package/www/react-native/params/process_params/ProcessParams.js +82 -2
- package/www/react-native/params/process_params/RfidParams.js +6 -0
- package/www/react-native/params/rfid_scenario/DTCDataGroup.js +10 -0
- package/www/react-native/params/rfid_scenario/EDLDataGroups.js +19 -0
- package/www/react-native/params/rfid_scenario/EIDDataGroups.js +26 -0
- package/www/react-native/params/rfid_scenario/EPassportDataGroups.js +21 -0
- package/www/react-native/params/rfid_scenario/RFIDScenario.js +67 -0
- package/www/react-native/results/Position.js +28 -0
- package/www/react-native/results/Results.js +25 -0
- package/www/react-native/results/TransactionInfo.js +8 -0
- package/www/react-native/results/authenticity/AuthenticityCheck.js +10 -0
- package/www/react-native/results/authenticity/AuthenticityElement.js +10 -0
- package/www/react-native/results/authenticity/AuthenticityResult.js +7 -0
- package/www/react-native/results/barcode/BarcodeField.js +10 -0
- package/www/react-native/results/barcode/BarcodeResult.js +6 -0
- package/www/react-native/results/barcode/PDF417Info.js +8 -0
- package/www/react-native/results/image_quality/ImageQuality.js +9 -0
- package/www/react-native/results/image_quality/ImageQualityGroup.js +9 -0
- package/www/react-native/results/rfid/AccessControlProcedureType.js +9 -0
- package/www/react-native/results/rfid/Application.js +12 -0
- package/www/react-native/results/rfid/Attribute.js +7 -0
- package/www/react-native/results/rfid/Authority.js +8 -0
- package/www/react-native/results/rfid/CardProperties.js +19 -0
- package/www/react-native/results/rfid/CertificateChain.js +18 -0
- package/www/react-native/results/rfid/CertificateData.js +7 -0
- package/www/react-native/results/rfid/DataField.js +7 -0
- package/www/react-native/results/rfid/Extension.js +7 -0
- package/www/react-native/results/rfid/File.js +17 -0
- package/www/react-native/results/rfid/FileData.js +9 -0
- package/www/react-native/results/rfid/RFIDSessionData.js +16 -0
- package/www/react-native/results/rfid/RFIDValidity.js +7 -0
- package/www/react-native/results/rfid/RFIDValue.js +10 -0
- package/www/react-native/results/rfid/SecurityObject.js +10 -0
- package/www/react-native/results/rfid/SecurityObjectCertificates.js +6 -0
- package/www/react-native/results/rfid/SignerInfo.js +17 -0
- package/www/react-native/results/status/OpticalStatus.js +14 -0
- package/www/react-native/results/status/RFIDStatus.js +12 -0
- package/www/react-native/results/status/ResultsStatus.js +12 -0
- package/www/react-native/results/visible_digital_seals/BytesData.js +9 -0
- package/www/react-native/results/visible_digital_seals/VDSNCData.js +14 -0
- package/www/react-native/results/visual_results/Comparison.js +8 -0
- package/www/react-native/results/visual_results/GraphicField.js +14 -0
- package/www/react-native/results/visual_results/GraphicResult.js +6 -0
- package/www/react-native/results/visual_results/RFIDOrigin.js +9 -0
- package/www/react-native/results/visual_results/Rect.js +9 -0
- package/www/react-native/results/visual_results/Symbol.js +8 -0
- package/www/react-native/results/visual_results/TextField.js +17 -0
- package/www/react-native/results/visual_results/TextResult.js +10 -0
- package/www/react-native/results/visual_results/TextSource.js +8 -0
- package/www/react-native/results/visual_results/Validity.js +7 -0
- package/www/react-native/results/visual_results/Value.js +13 -0
- package/www/react-native/rfid/PAAttribute.js +7 -0
- package/www/react-native/rfid/PAResourcesIssuer.js +8 -0
- package/www/react-native/rfid/PKDCertificate.js +8 -0
- package/www/react-native/rfid/RFIDNotification.js +8 -0
- package/www/react-native/rfid/TAChallenge.js +10 -0
- package/www/react-native/rfid/TccParams.js +10 -0
package/test/test.tsx
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { compare
|
|
2
|
-
import { AccessControlProcedureType, Application, Attribute, AuthenticityCheck, AuthenticityElement, AuthenticityParams, AuthenticityResult, Authority, BackendProcessingConfig, BarcodeField, BarcodeResult, BytesData, CardProperties, CertificateChain, CertificateData, Comparison, Coordinate, Customization, CustomizationColors, CustomizationFonts, CustomizationImages, DataField, DocReaderException, DocReaderScenario, DocReaderVersion, DocumentsDatabase, DocumentType, EDLDataGroups, EIDDataGroups, DTCDataGroup, EPassportDataGroups, Extension, FaceApiParams, FaceApiSearchParams, File, FileData, Functionality, GlaresCheckParams, RFIDParams, GraphicField, GraphicResult, ImageInputData, ImageQA, ImageQuality, ImageQualityGroup, InitConfig, License, LivenessParams, OnlineProcessingConfig, OpticalStatus, PAAttribute, PAResourcesIssuer, PDF417Info, PKDCertificate, Position, PrepareProgress, ProcessParams, RecognizeConfig, Rect, Results, ResultsStatus, RFIDException, RFIDNotification, RFIDOrigin, RFIDScenario, RFIDSessionData, RFIDStatus, RFIDValidity, RFIDValue, ScannerConfig, SecurityObject, SecurityObjectCertificates, SignerInfo, Symbol, TAChallenge, TccParams, TextField, TextResult, TextSource, TransactionInfo, Validity, Value, VDSNCData } from '@regulaforensics/document-reader'
|
|
3
|
-
import { accessControlProcedureType, application, attribute, authenticityCheck, authenticityElement, authenticityParams, authenticityResult, authority, backendProcessingConfig, barcodeField, barcodeResult, bytesData, cardProperties, certificateChain, certificateData, comparison, coordinate, customization, customizationColors, customizationFonts, customizationImages, dataField, docReaderException, docReaderScenario, docReaderVersion, documentsDatabase, documentType, eDLDataGroups, eIDDataGroups, dtcDataGroup, ePassportDataGroups, extension, faceApiParams, faceApiSearchParams, file, fileData, functionality, glaresCheckParams, rfidParams, graphicField, graphicResult, imageInputData, imageQA, imageQuality, imageQualityGroup, initConfig, license, livenessParams, onlineProcessingConfig, opticalStatus, paAttribute, paResourcesIssuer, pdf417Info, pkdCertificate, position, prepareProgress, processParams, recognizeConfig, recognizeConfig2, rect, results, resultsStatus, rfidException, rfidNotification, rfidOrigin, rfidScenario, rfidSessionData, rfidStatus, rfidValidity, rfidValue, scannerConfig, securityObject, securityObjectCertificates, signerInfo, symbol, taChallenge, tccParams, textField, textResult, textSource, transactionInfo, validity, value, vdsncData } from './json'
|
|
1
|
+
import { compare } from './utils'
|
|
2
|
+
import { AccessControlProcedureType, Application, Attribute, AuthenticityCheck, AuthenticityElement, AuthenticityParams, AuthenticityResult, Authority, BackendProcessingConfig, BarcodeField, BarcodeResult, BytesData, CardProperties, CertificateChain, CertificateData, Comparison, Coordinate, Customization, CustomizationColors, CustomizationFonts, CustomizationImages, DataField, DocReaderException, DocReaderScenario, DocReaderVersion, DocumentsDatabase, DocumentType, EDLDataGroups, EIDDataGroups, DTCDataGroup, EPassportDataGroups, Extension, FaceApiParams, FaceApiSearchParams, File, FileData, Functionality, GlaresCheckParams, RFIDParams, GraphicField, GraphicResult, ImageInputData, ImageQA, ImageQuality, ImageQualityGroup, InitConfig, License, LivenessParams, OnlineProcessingConfig, OpticalStatus, PAAttribute, PAResourcesIssuer, PDF417Info, PKDCertificate, Position, PrepareProgress, ProcessParams, RecognizeConfig, Rect, Results, ResultsStatus, RFIDException, RFIDNotification, RFIDOrigin, RFIDScenario, RFIDSessionData, RFIDStatus, RFIDValidity, RFIDValue, ScannerConfig, SecurityObject, SecurityObjectCertificates, SignerInfo, Symbol, TAChallenge, TccParams, TextField, TextResult, TextSource, TransactionInfo, Validity, Value, VDSNCData } from '@regulaforensics/document-reader'
|
|
3
|
+
import { accessControlProcedureType, application, attribute, authenticityCheck, authenticityElement, authenticityParams, authenticityResult, authority, backendProcessingConfig, barcodeField, barcodeResult, bytesData, cardProperties, certificateChain, certificateData, comparison, coordinate, customization, customizationColors, customizationFonts, customizationImages, dataField, docReaderException, docReaderScenario, docReaderVersion, documentsDatabase, documentType, eDLDataGroups, eIDDataGroups, dtcDataGroup, ePassportDataGroups, extension, faceApiParams, faceApiSearchParams, file, fileData, functionality, glaresCheckParams, rfidParams, graphicField, graphicResult, imageInputData, imageQA, imageQuality, imageQualityGroup, initConfig, license, livenessParams, onlineProcessingConfig, opticalStatus, paAttribute, paResourcesIssuer, pdf417Info, pkdCertificate, position, prepareProgress, processParams, recognizeConfig, recognizeConfig2, rect, results, resultsStatus, rfidException, rfidNotification, rfidOrigin, rfidScenario, rfidSessionData, rfidStatus, rfidValidity, rfidValue, scannerConfig, securityObject, securityObjectCertificates, signerInfo, symbol, taChallenge, tccParams, textField, textResult, textSource, transactionInfo, validity, value, vdsncData } from './json'
|
|
4
4
|
|
|
5
|
-
compare('initConfig', initConfig, InitConfig.fromJson)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
compare('initConfig', initConfig, InitConfig.fromJson)
|
|
6
|
+
compare('onlineProcessingConfig', onlineProcessingConfig, OnlineProcessingConfig.fromJson)
|
|
7
|
+
compare('imageInputData', imageInputData, ImageInputData.fromJson)
|
|
8
|
+
compare('recognizeConfig', recognizeConfig, RecognizeConfig.fromJson)
|
|
9
|
+
compare('recognizeConfig2', recognizeConfig2, RecognizeConfig.fromJson)
|
|
10
|
+
compare('scannerConfig', scannerConfig, ScannerConfig.fromJson)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
compare('faceApiSearchParams', faceApiSearchParams, FaceApiSearchParams.fromJson)
|
|
13
|
+
compare('faceApiParams', faceApiParams, FaceApiParams.fromJson)
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
compare('livenessParams', livenessParams, LivenessParams.fromJson)
|
|
16
|
+
compare('authenticityParams', authenticityParams, AuthenticityParams.fromJson)
|
|
17
|
+
compare('glaresCheckParams', glaresCheckParams, GlaresCheckParams.fromJson)
|
|
18
|
+
compare('rfidParams', rfidParams, RFIDParams.fromJson)
|
|
19
|
+
compare('imageQA', imageQA, ImageQA.fromJson)
|
|
20
|
+
compare('backendProcessingConfig', backendProcessingConfig, BackendProcessingConfig.fromJson)
|
|
21
|
+
compare('processParams', processParams, ProcessParams.fromJson, ['logs'])
|
|
22
|
+
compare('eDLDataGroups', eDLDataGroups, EDLDataGroups.fromJson)
|
|
23
|
+
compare('ePassportDataGroups', ePassportDataGroups, EPassportDataGroups.fromJson)
|
|
24
|
+
compare('eIDDataGroups', eIDDataGroups, EIDDataGroups.fromJson)
|
|
25
|
+
compare('dtcDataGroup', dtcDataGroup, DTCDataGroup.fromJson)
|
|
26
|
+
compare('rfidScenario', rfidScenario, RFIDScenario.fromJson)
|
|
27
|
+
compare('customizationColors', customizationColors, CustomizationColors.fromJson)
|
|
28
|
+
compare('customizationFonts', customizationFonts, CustomizationFonts.fromJson)
|
|
29
|
+
compare('customizationImages', customizationImages, CustomizationImages.fromJson)
|
|
30
|
+
compare('customization', customization, Customization.fromJson)
|
|
31
|
+
compare('functionality', functionality, Functionality.fromJson)
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
compare('documentsDatabase', documentsDatabase, DocumentsDatabase.fromJson)
|
|
34
|
+
compare('docReaderVersion', docReaderVersion, DocReaderVersion.fromJson)
|
|
35
|
+
compare('docReaderScenario', docReaderScenario, DocReaderScenario.fromJson)
|
|
36
|
+
compare('license', license, License.fromJson)
|
|
37
|
+
compare('docReaderException', docReaderException, DocReaderException.fromJson)
|
|
38
|
+
compare('rfidException', rfidException, RFIDException.fromJson)
|
|
39
|
+
compare('prepareProgress', prepareProgress, PrepareProgress.fromJson)
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
41
|
+
compare('authenticityElement', authenticityElement, AuthenticityElement.fromJson)
|
|
42
|
+
compare('authenticityCheck', authenticityCheck, AuthenticityCheck.fromJson)
|
|
43
|
+
compare('authenticityResult', authenticityResult, AuthenticityResult.fromJson)
|
|
44
|
+
compare('pdf417Info', pdf417Info, PDF417Info.fromJson)
|
|
45
|
+
compare('barcodeField', barcodeField, BarcodeField.fromJson)
|
|
46
|
+
compare('barcodeResult', barcodeResult, BarcodeResult.fromJson)
|
|
47
|
+
compare('imageQuality', imageQuality, ImageQuality.fromJson)
|
|
48
|
+
compare('imageQualityGroup', imageQualityGroup, ImageQualityGroup.fromJson)
|
|
49
|
+
compare('accessControlProcedureType', accessControlProcedureType, AccessControlProcedureType.fromJson)
|
|
50
|
+
compare('fileData', fileData, FileData.fromJson)
|
|
51
|
+
compare('certificateData', certificateData, CertificateData.fromJson)
|
|
52
|
+
compare('securityObjectCertificates', securityObjectCertificates, SecurityObjectCertificates.fromJson)
|
|
53
|
+
compare('file', file, File.fromJson)
|
|
54
|
+
compare('application', application, Application.fromJson)
|
|
55
|
+
compare('rfidValue', rfidValue, RFIDValue.fromJson)
|
|
56
|
+
compare('attribute', attribute, Attribute.fromJson)
|
|
57
|
+
compare('authority', authority, Authority.fromJson)
|
|
58
|
+
compare('cardProperties', cardProperties, CardProperties.fromJson)
|
|
59
|
+
compare('extension', extension, Extension.fromJson)
|
|
60
|
+
compare('rfidValidity', rfidValidity, RFIDValidity.fromJson)
|
|
61
|
+
compare('certificateChain', certificateChain, CertificateChain.fromJson)
|
|
62
|
+
compare('dataField', dataField, DataField.fromJson)
|
|
63
|
+
compare('signerInfo', signerInfo, SignerInfo.fromJson)
|
|
64
|
+
compare('securityObject', securityObject, SecurityObject.fromJson)
|
|
65
|
+
compare('rfidSessionData', rfidSessionData, RFIDSessionData.fromJson)
|
|
66
|
+
compare('bytesData', bytesData, BytesData.fromJson)
|
|
67
|
+
compare('vdsncData', vdsncData, VDSNCData.fromJson)
|
|
68
|
+
compare('opticalStatus', opticalStatus, OpticalStatus.fromJson)
|
|
69
|
+
compare('rfidStatus', rfidStatus, RFIDStatus.fromJson)
|
|
70
|
+
compare('resultsStatus', resultsStatus, ResultsStatus.fromJson)
|
|
71
|
+
compare('comparison', comparison, Comparison.fromJson)
|
|
72
|
+
compare('rect', rect, Rect.fromJson)
|
|
73
|
+
compare('graphicField', graphicField, GraphicField.fromJson)
|
|
74
|
+
compare('graphicResult', graphicResult, GraphicResult.fromJson)
|
|
75
|
+
compare('rfidOrigin', rfidOrigin, RFIDOrigin.fromJson)
|
|
76
|
+
compare('symbol', symbol, Symbol.fromJson)
|
|
77
|
+
compare('validity', validity, Validity.fromJson)
|
|
78
|
+
compare('value', value, Value.fromJson)
|
|
79
|
+
compare('textField', textField, TextField.fromJson)
|
|
80
|
+
compare('textSource', textSource, TextSource.fromJson)
|
|
81
|
+
compare('textResult', textResult, TextResult.fromJson)
|
|
82
|
+
compare('documentType', documentType, DocumentType.fromJson)
|
|
83
|
+
compare('coordinate', coordinate, Coordinate.fromJson)
|
|
84
|
+
compare('position', position, Position.fromJson)
|
|
85
|
+
compare('transactionInfo', transactionInfo, TransactionInfo.fromJson)
|
|
86
|
+
compare('results', results, Results.fromJson)
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
compare('rfidNotification', rfidNotification, RFIDNotification.fromJson)
|
|
89
|
+
compare('paAttribute', paAttribute, PAAttribute.fromJson)
|
|
90
|
+
compare('paResourcesIssuer', paResourcesIssuer, PAResourcesIssuer.fromJson)
|
|
91
|
+
compare('pkdCertificate', pkdCertificate, PKDCertificate.fromJson)
|
|
92
|
+
compare('taChallenge', taChallenge, TAChallenge.fromJson)
|
|
93
|
+
compare('tccParams', tccParams, TccParams.fromJson)
|
package/test/utils.tsx
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
import test from 'node:test'
|
|
2
|
-
import * as assert from 'assert'
|
|
1
|
+
import test from 'node:test'
|
|
2
|
+
import * as assert from 'assert'
|
|
3
3
|
|
|
4
4
|
export function compare(
|
|
5
5
|
name: string,
|
|
6
6
|
json: Record<string, any>,
|
|
7
7
|
fromJson: (json: Record<string, any>) => any,
|
|
8
|
+
skip?: string[],
|
|
8
9
|
) {
|
|
9
10
|
test(name, () => {
|
|
10
|
-
var actual = fromJson(json).toJson()
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
var actual = removeUndefineds(fromJson(json).toJson())
|
|
12
|
+
if (skip) for (const item of skip) delete actual[item]
|
|
13
|
+
assert.deepEqual(actual, json)
|
|
14
|
+
})
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
17
|
+
function removeUndefineds(input) {
|
|
18
|
+
const isPlainObject = obj => Object.prototype.toString.call(obj) === '[object Object]';
|
|
19
|
+
|
|
20
|
+
if (input === undefined) return undefined;
|
|
21
|
+
if (input === null || typeof input !== 'object') return input;
|
|
22
|
+
|
|
23
|
+
if (Array.isArray(input)) {
|
|
24
|
+
return input
|
|
25
|
+
.map(item => removeUndefineds(item))
|
|
26
|
+
.filter(item => item !== undefined);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (!isPlainObject(input)) return input;
|
|
30
|
+
|
|
31
|
+
const result = {};
|
|
32
|
+
for (const [key, value] of Object.entries(input)) {
|
|
33
|
+
if (value === undefined) continue;
|
|
34
|
+
const cleaned = removeUndefineds(value);
|
|
35
|
+
if (cleaned !== undefined) result[key] = cleaned;
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
@@ -28,6 +28,17 @@ export class OnlineProcessingConfig {
|
|
|
28
28
|
|
|
29
29
|
return result
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
toJson() {
|
|
33
|
+
return {
|
|
34
|
+
"mode": this.mode,
|
|
35
|
+
"url": this.url,
|
|
36
|
+
"imageFormat": this.imageFormat,
|
|
37
|
+
"imageCompressionQuality": this.imageCompressionQuality,
|
|
38
|
+
"processParams": this.processParams?.toJson(),
|
|
39
|
+
"requestHeaders": this.requestHeaders,
|
|
40
|
+
}
|
|
41
|
+
}
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
export const ImageFormat = {
|
|
@@ -78,6 +78,21 @@ export class RecognizeConfig {
|
|
|
78
78
|
|
|
79
79
|
return result
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
toJson() {
|
|
83
|
+
return {
|
|
84
|
+
"scenario": this.scenario,
|
|
85
|
+
"onlineProcessingConfig": this.onlineProcessingConfig?.toJson(),
|
|
86
|
+
"image": this.image,
|
|
87
|
+
"images": this.images,
|
|
88
|
+
"data": this.data,
|
|
89
|
+
"imageInputData": this.imageInputData?.map(e => e.toJson()),
|
|
90
|
+
"dtc": this.dtc,
|
|
91
|
+
"livePortrait": this.livePortrait,
|
|
92
|
+
"extPortrait": this.extPortrait,
|
|
93
|
+
"oneShotIdentification": this.oneShotIdentification,
|
|
94
|
+
}
|
|
95
|
+
}
|
|
81
96
|
}
|
|
82
97
|
|
|
83
98
|
export class ImageInputData {
|
|
@@ -100,4 +115,12 @@ export class ImageInputData {
|
|
|
100
115
|
|
|
101
116
|
return result
|
|
102
117
|
}
|
|
118
|
+
|
|
119
|
+
toJson() {
|
|
120
|
+
return {
|
|
121
|
+
"image": this.image,
|
|
122
|
+
"light": this.light,
|
|
123
|
+
"pageIndex": this.pageIndex,
|
|
124
|
+
}
|
|
125
|
+
}
|
|
103
126
|
}
|
|
@@ -35,4 +35,14 @@ export class ScannerConfig {
|
|
|
35
35
|
|
|
36
36
|
return result
|
|
37
37
|
}
|
|
38
|
+
|
|
39
|
+
toJson() {
|
|
40
|
+
return {
|
|
41
|
+
"scenario": this.scenario,
|
|
42
|
+
"onlineProcessingConfig": this.onlineProcessingConfig?.toJson(),
|
|
43
|
+
"livePortrait": this.livePortrait,
|
|
44
|
+
"extPortrait": this.extPortrait,
|
|
45
|
+
"cameraId": this.cameraId,
|
|
46
|
+
}
|
|
47
|
+
}
|
|
38
48
|
}
|
|
@@ -36,6 +36,24 @@ export class DocReaderScenario {
|
|
|
36
36
|
|
|
37
37
|
return result
|
|
38
38
|
}
|
|
39
|
+
|
|
40
|
+
toJson() {
|
|
41
|
+
return {
|
|
42
|
+
"uvTorch": this.uvTorch,
|
|
43
|
+
"frameOrientation": this.frameOrientation,
|
|
44
|
+
"faceExt": this.faceExt,
|
|
45
|
+
"multiPageOff": this.multiPageOff,
|
|
46
|
+
"seriesProcessMode": this.seriesProcessMode,
|
|
47
|
+
"frameKWHLandscape": this.frameKWHLandscape,
|
|
48
|
+
"frameKWHPortrait": this.frameKWHPortrait,
|
|
49
|
+
"frameKWHDoublePageSpreadPortrait": this.frameKWHDoublePageSpreadPortrait,
|
|
50
|
+
"frameKWHDoublePageSpreadLandscape": this.frameKWHDoublePageSpreadLandscape,
|
|
51
|
+
"name": this.name,
|
|
52
|
+
"caption": this.caption,
|
|
53
|
+
"description": this.description,
|
|
54
|
+
"manualCrop": this.manualCrop,
|
|
55
|
+
}
|
|
56
|
+
}
|
|
39
57
|
}
|
|
40
58
|
|
|
41
59
|
export const Scenario = {
|
|
@@ -24,4 +24,16 @@ export class DocumentsDatabase {
|
|
|
24
24
|
|
|
25
25
|
return result
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
toJson() {
|
|
29
|
+
return {
|
|
30
|
+
"databaseID": this.databaseID,
|
|
31
|
+
"version": this.version,
|
|
32
|
+
"date": this.date,
|
|
33
|
+
"databaseDescription": this.databaseDescription,
|
|
34
|
+
"countriesNumber": this.countriesNumber,
|
|
35
|
+
"documentsNumber": this.documentsNumber,
|
|
36
|
+
"size": this.size,
|
|
37
|
+
}
|
|
38
|
+
}
|
|
27
39
|
}
|
|
@@ -235,6 +235,43 @@ export class Functionality {
|
|
|
235
235
|
return result;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
+
toJson() {
|
|
239
|
+
return {
|
|
240
|
+
"pictureOnBoundsReady": this.pictureOnBoundsReady,
|
|
241
|
+
"showTorchButton": this.showTorchButton,
|
|
242
|
+
"showCloseButton": this.showCloseButton,
|
|
243
|
+
"videoCaptureMotionControl": this.videoCaptureMotionControl,
|
|
244
|
+
"showCaptureButton": this.showCaptureButton,
|
|
245
|
+
"showChangeFrameButton": this.showChangeFrameButton,
|
|
246
|
+
"showSkipNextPageButton": this.showSkipNextPageButton,
|
|
247
|
+
"useAuthenticator": this.useAuthenticator,
|
|
248
|
+
"skipFocusingFrames": this.skipFocusingFrames,
|
|
249
|
+
"showCameraSwitchButton": this.showCameraSwitchButton,
|
|
250
|
+
"displayMetadata": this.displayMetadata,
|
|
251
|
+
"isZoomEnabled": this.isZoomEnabled,
|
|
252
|
+
"isCameraTorchCheckDisabled": this.isCameraTorchCheckDisabled,
|
|
253
|
+
"recordScanningProcess": this.recordScanningProcess,
|
|
254
|
+
"manualMultipageMode": this.manualMultipageMode,
|
|
255
|
+
"singleResult": this.singleResult,
|
|
256
|
+
"torchTurnedOn": this.torchTurnedOn,
|
|
257
|
+
"showCaptureButtonDelayFromDetect": this.showCaptureButtonDelayFromDetect,
|
|
258
|
+
"showCaptureButtonDelayFromStart": this.showCaptureButtonDelayFromStart,
|
|
259
|
+
"rfidTimeout": this.rfidTimeout,
|
|
260
|
+
"forcePagesCount": this.forcePagesCount,
|
|
261
|
+
"orientation": this.orientation,
|
|
262
|
+
"captureMode": this.captureMode,
|
|
263
|
+
"cameraMode": this.cameraMode,
|
|
264
|
+
"cameraPositionIOS": this.cameraPositionIOS,
|
|
265
|
+
"cameraFrame": this.cameraFrame,
|
|
266
|
+
"btDeviceName": this.btDeviceName,
|
|
267
|
+
"zoomFactor": this.zoomFactor,
|
|
268
|
+
"exposure": this.exposure,
|
|
269
|
+
"excludedCamera2Models": this.excludedCamera2Models,
|
|
270
|
+
"cameraSize": this.cameraResolutionAndroid?.toJson(),
|
|
271
|
+
"videoSessionPreset": this.cameraResolutionIOS,
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
238
275
|
_apply() { this._set(this); }
|
|
239
276
|
_set(json) {
|
|
240
277
|
if (this === DocumentReader.instance.functionality)
|
|
@@ -300,4 +337,11 @@ export class CameraSize {
|
|
|
300
337
|
if (jsonObject == null) return null;
|
|
301
338
|
return new CameraSize(jsonObject["width"], jsonObject["height"]);
|
|
302
339
|
}
|
|
340
|
+
|
|
341
|
+
toJson() {
|
|
342
|
+
return {
|
|
343
|
+
"width": this.width,
|
|
344
|
+
"height": this.height,
|
|
345
|
+
}
|
|
346
|
+
}
|
|
303
347
|
}
|
|
@@ -513,6 +513,82 @@ export class Customization {
|
|
|
513
513
|
return result;
|
|
514
514
|
}
|
|
515
515
|
|
|
516
|
+
toJson() {
|
|
517
|
+
return {
|
|
518
|
+
"showStatusMessages": this.showStatusMessages,
|
|
519
|
+
"showResultStatusMessages": this.showResultStatusMessages,
|
|
520
|
+
"showHelpAnimation": this.showHelpAnimation,
|
|
521
|
+
"showNextPageAnimation": this.showNextPageAnimation,
|
|
522
|
+
"showBackgroundMask": this.showBackgroundMask,
|
|
523
|
+
"cameraFrameBorderWidth": this.cameraFrameBorderWidth,
|
|
524
|
+
"cameraFrameLineLength": this.cameraFrameLineLength,
|
|
525
|
+
"cameraFrameShapeType": this.cameraFrameShapeType,
|
|
526
|
+
"cameraFrameOffsetWidth": this.cameraFrameOffsetWidth,
|
|
527
|
+
"status": this.status,
|
|
528
|
+
"resultStatus": this.resultStatus,
|
|
529
|
+
"multipageButtonText": this.multipageButtonText,
|
|
530
|
+
"cameraFrameDefaultColor": this.cameraFrameDefaultColor,
|
|
531
|
+
"cameraFrameActiveColor": this.cameraFrameActiveColor,
|
|
532
|
+
"statusTextColor": this.statusTextColor,
|
|
533
|
+
"resultStatusTextColor": this.resultStatusTextColor,
|
|
534
|
+
"resultStatusBackgroundColor": this.resultStatusBackgroundColor,
|
|
535
|
+
"multipageButtonBackgroundColor": this.multipageButtonBackgroundColor,
|
|
536
|
+
"tintColor": this.tintColor,
|
|
537
|
+
"activityIndicatorColor": this.activityIndicatorColor,
|
|
538
|
+
"statusBackgroundColor": this.statusBackgroundColor,
|
|
539
|
+
"cameraPreviewBackgroundColor": this.cameraPreviewBackgroundColor,
|
|
540
|
+
"backgroundMaskColor": this.backgroundMaskColor,
|
|
541
|
+
"multipageButtonTextColor": this.multipageButtonTextColor,
|
|
542
|
+
"statusPositionMultiplier": this.statusPositionMultiplier,
|
|
543
|
+
"resultStatusPositionMultiplier": this.resultStatusPositionMultiplier,
|
|
544
|
+
"toolbarSize": this.toolbarSize,
|
|
545
|
+
"backgroundMaskAlpha": this.backgroundMaskAlpha,
|
|
546
|
+
"customStatusPositionMultiplier": this.customStatusPositionMultiplier,
|
|
547
|
+
"cameraFrameVerticalPositionMultiplier": this.cameraFrameVerticalPositionMultiplier,
|
|
548
|
+
"cameraFrameLandscapeAspectRatio": this.cameraFrameLandscapeAspectRatio,
|
|
549
|
+
"cameraFramePortraitAspectRatio": this.cameraFramePortraitAspectRatio,
|
|
550
|
+
"cameraFrameCornerRadius": this.cameraFrameCornerRadius,
|
|
551
|
+
"livenessAnimationPositionMultiplier": this.livenessAnimationPositionMultiplier,
|
|
552
|
+
"nextPageAnimationStartDelay": this.nextPageAnimationStartDelay,
|
|
553
|
+
"nextPageAnimationEndDelay": this.nextPageAnimationEndDelay,
|
|
554
|
+
"activityIndicatorPortraitPositionMultiplier": this.activityIndicatorPortraitPositionMultiplier,
|
|
555
|
+
"activityIndicatorLandscapePositionMultiplier": this.activityIndicatorLandscapePositionMultiplier,
|
|
556
|
+
"cameraPreviewVerticalPositionMultiplier": this.cameraPreviewVerticalPositionMultiplier,
|
|
557
|
+
"multipageAnimationFrontImage": this.multipageAnimationFrontImage,
|
|
558
|
+
"multipageAnimationBackImage": this.multipageAnimationBackImage,
|
|
559
|
+
"borderBackgroundImage": this.borderBackgroundImage,
|
|
560
|
+
"helpAnimationImage": this.helpAnimationImage,
|
|
561
|
+
"closeButtonImage": this.closeButtonImage,
|
|
562
|
+
"captureButtonImage": this.captureButtonImage,
|
|
563
|
+
"cameraSwitchButtonImage": this.cameraSwitchButtonImage,
|
|
564
|
+
"torchButtonOnImage": this.torchButtonOnImage,
|
|
565
|
+
"torchButtonOffImage": this.torchButtonOffImage,
|
|
566
|
+
"changeFrameButtonExpandImage": this.changeFrameButtonExpandImage,
|
|
567
|
+
"changeFrameButtonCollapseImage": this.changeFrameButtonCollapseImage,
|
|
568
|
+
"livenessAnimationImage": this.livenessAnimationImage,
|
|
569
|
+
"multipageButtonImage": this.multipageButtonImage,
|
|
570
|
+
"customLabelStatus": this.customLabelStatus,
|
|
571
|
+
"cameraFrameLineCap": this.cameraFrameLineCap,
|
|
572
|
+
"uiCustomizationLayer": this.uiCustomizationLayer,
|
|
573
|
+
"statusTextFont": this.statusTextFont?.toJson(),
|
|
574
|
+
"resultStatusTextFont": this.resultStatusTextFont?.toJson(),
|
|
575
|
+
"multipageButtonTextFont": this.multipageButtonTextFont?.toJson(),
|
|
576
|
+
"helpAnimationImageContentMode": this.helpAnimationImageTransformsIOS,
|
|
577
|
+
"multipageAnimationFrontImageContentMode": this.multipageAnimationFrontImageTransformsIOS,
|
|
578
|
+
"multipageAnimationBackImageContentMode": this.multipageAnimationBackImageTransformsIOS,
|
|
579
|
+
"livenessAnimationImageContentMode": this.livenessAnimationImageTransformsIOS,
|
|
580
|
+
"borderBackgroundImageContentMode": this.borderBackgroundImageTransformsIOS,
|
|
581
|
+
"helpAnimationImageMatrix": this.helpAnimationImageTransformsAndroid,
|
|
582
|
+
"multipageAnimationFrontImageMatrix": this.multipageAnimationFrontImageTransformsAndroid,
|
|
583
|
+
"multipageAnimationBackImageMatrix": this.multipageAnimationBackImageTransformsAndroid,
|
|
584
|
+
"livenessAnimationImageMatrix": this.livenessAnimationImageTransformsAndroid,
|
|
585
|
+
"borderBackgroundImageMatrix": this.borderBackgroundImageTransformsAndroid,
|
|
586
|
+
"colors": this.colors?.toJson(),
|
|
587
|
+
"fonts": this.fonts?.toJson(),
|
|
588
|
+
"images": this.images?.toJson(),
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
516
592
|
_apply() { this._set(this); }
|
|
517
593
|
_set(json) {
|
|
518
594
|
if (this === DocumentReader.instance.customization)
|
|
@@ -71,4 +71,17 @@ export class CustomizationColors {
|
|
|
71
71
|
var parent = DocumentReader.instance.customization;
|
|
72
72
|
if (this === parent.colors) parent._set(parentJson);
|
|
73
73
|
}
|
|
74
|
+
|
|
75
|
+
toJson() {
|
|
76
|
+
return {
|
|
77
|
+
"rfidProcessingScreenBackground": this.rfidProcessingScreenBackground,
|
|
78
|
+
"rfidProcessingScreenHintLabelText": this.rfidProcessingScreenHintLabelText,
|
|
79
|
+
"rfidProcessingScreenHintLabelBackground": this.rfidProcessingScreenHintLabelBackground,
|
|
80
|
+
"rfidProcessingScreenProgressLabelText": this.rfidProcessingScreenProgressLabelText,
|
|
81
|
+
"rfidProcessingScreenProgressBar": this.rfidProcessingScreenProgressBar,
|
|
82
|
+
"rfidProcessingScreenProgressBarBackground": this.rfidProcessingScreenProgressBarBackground,
|
|
83
|
+
"rfidProcessingScreenResultLabelText": this.rfidProcessingScreenResultLabelText,
|
|
84
|
+
"rfidProcessingScreenLoadingBar": this.rfidProcessingScreenLoadingBar,
|
|
85
|
+
}
|
|
86
|
+
}
|
|
74
87
|
}
|
|
@@ -37,4 +37,12 @@ export class CustomizationFonts {
|
|
|
37
37
|
var parent = DocumentReader.instance.customization;
|
|
38
38
|
if (this === parent.fonts) parent._set(parentJson);
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
toJson() {
|
|
42
|
+
return {
|
|
43
|
+
"rfidProcessingScreenHintLabel": this.rfidProcessingScreenHintLabel?.toJson(),
|
|
44
|
+
"rfidProcessingScreenProgressLabel": this.rfidProcessingScreenProgressLabel?.toJson(),
|
|
45
|
+
"rfidProcessingScreenResultLabel": this.rfidProcessingScreenResultLabel?.toJson(),
|
|
46
|
+
}
|
|
47
|
+
}
|
|
40
48
|
}
|
|
@@ -22,4 +22,10 @@ export class CustomizationImages {
|
|
|
22
22
|
var parent = DocumentReader.instance.customization;
|
|
23
23
|
if (this === parent.images) parent._set(parentJson);
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
toJson() {
|
|
27
|
+
return {
|
|
28
|
+
"rfidProcessingScreenFailureImage": this.rfidProcessingScreenFailureImage,
|
|
29
|
+
}
|
|
30
|
+
}
|
|
25
31
|
}
|