@regulaforensics/vp-frontend-document-components 7.5.1924-nightly → 7.5.1925-nightly
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/README.md +15 -7
- package/dist/index.d.ts +8 -1
- package/dist/main.iife.js +20 -20
- package/dist/main.js +1686 -1679
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -268,6 +268,7 @@ After adding `DocumentReaderService` to the global variable, you can change the
|
|
|
268
268
|
| **scenario** | Recognition scenario. | string | 'MrzAndLocate' | 'MrzAndLocate', 'MrzOrLocate', 'Mrz', 'Locate' |
|
|
269
269
|
| **multipageProcessing** | Whether to enable multi-page document processing mode. | boolean | `true` | `true`, `false` |
|
|
270
270
|
| **timeout** | Recognition timeout in milliseconds. After this time process will be finished. | number | 2000 | numbers > 0 |
|
|
271
|
+
| **timeoutFromFirstDetect** | Start the countdown from the moment the document is detected. | number | 5000 | numbers > 0 |
|
|
271
272
|
| **resultTypeOutput** | Types of results to return in response. [] - all available types. | number[] | [] | `1` - DocumentImageResult, `3` - TextDataResult, `5` - DocBarCodeInfo, `6` - GraphicsResult, `8` - DocumentTypesCandidatesResult, `9` - ChosenDocumentTypeResult, `20` - AuthenticityResult, `15` - LexicalAnalysisResult, `17` - TextDataResult, `18` - TextDataResult, `19` - GraphicsResult, `30` - ImageQualityResult, `33` - StatusResult, `36` - TextResult, `37` - ImagesResult, `85` - DocumentPositionResult, `102` - TextDataResult, `103` - GraphicsResult, `50` - LicenseResult, `49` - EncryptedRCLResult |
|
|
272
273
|
| **returnPackageForReprocess** | When enabled, returns the package for reprocessing on the backend. | boolean | `false` | `true`, `false` |
|
|
273
274
|
| **imageQa** | When enabled, image quality checks status affects document optical and overall status. | | | |
|
|
@@ -1062,6 +1063,7 @@ You can send the results to the backend for further processing:
|
|
|
1062
1063
|
```javascript
|
|
1063
1064
|
window.RegulaDocumentSDK.recognizerProcessParam = {
|
|
1064
1065
|
processParam: {
|
|
1066
|
+
scenario: InternalScenarios.MrzAndLocate,
|
|
1065
1067
|
backendProcessing: {
|
|
1066
1068
|
serviceURL: 'YOUR_SERVICE_URL',
|
|
1067
1069
|
httpHeaders: { // you can set http headers if necessary
|
|
@@ -1091,11 +1093,19 @@ For cases when user's main device lacks camera or does not succeed to scan with
|
|
|
1091
1093
|
you have an option to delegate scanning to another available device (i.e. phone).
|
|
1092
1094
|
|
|
1093
1095
|
#### 1. "From other phone" action may be configured on the start screen:
|
|
1094
|
-
-
|
|
1095
|
-
- add 'delegateURL' and 'tag':
|
|
1096
|
+
- add 'delegateProcessing' and 'tag':
|
|
1096
1097
|
```javascript
|
|
1097
1098
|
processor.recognizerProcessParam = {
|
|
1098
|
-
|
|
1099
|
+
processParam: {
|
|
1100
|
+
scenario: InternalScenarios.MrzAndLocate,
|
|
1101
|
+
},
|
|
1102
|
+
delegateProcessing: {
|
|
1103
|
+
delegateURL: 'https://your-page.com?tag={tag}', // the page which will be used by other device
|
|
1104
|
+
serviceURL: 'https://my-service.com', // your backend service
|
|
1105
|
+
httpHeaders: { // http headers if needed
|
|
1106
|
+
header: 'value'
|
|
1107
|
+
}
|
|
1108
|
+
},
|
|
1099
1109
|
tag: 123 // your session id, will be added to delegateURL in place of {tag} substring
|
|
1100
1110
|
}
|
|
1101
1111
|
```
|
|
@@ -1108,14 +1118,12 @@ you have an option to delegate scanning to another available device (i.e. phone)
|
|
|
1108
1118
|
|
|
1109
1119
|
#### 2. Configure Delegate page component on delegateURL:
|
|
1110
1120
|
- configure [backend reprocessing](#backend-reprocessing)
|
|
1121
|
+
- backendProcessing setting for the device and delegateProcessing setting for the main page must match
|
|
1111
1122
|
- use the same tag as on the main page
|
|
1112
1123
|
```javascript
|
|
1113
|
-
window.RegulaDocumentSDK.recognizerProcessParam = {
|
|
1114
|
-
tag: 123 // your session id, i.e. it can be extracted from your delegate page URL
|
|
1115
|
-
};
|
|
1116
|
-
|
|
1117
1124
|
element.settings = {
|
|
1118
1125
|
startScreen: false, // From camera recognition is expected
|
|
1126
|
+
mobileDelegate: true
|
|
1119
1127
|
}
|
|
1120
1128
|
```
|
|
1121
1129
|
- use finalizePackage() to send the data for further reprocessing
|
package/dist/index.d.ts
CHANGED
|
@@ -231,6 +231,7 @@ export declare class DocumentReaderService {
|
|
|
231
231
|
private _initializeListener;
|
|
232
232
|
private _processingListener;
|
|
233
233
|
private _queueService;
|
|
234
|
+
onFinalize: TOnFinalize | null;
|
|
234
235
|
isAutoPrepare: boolean;
|
|
235
236
|
isPrepared: boolean;
|
|
236
237
|
isInitialized: boolean;
|
|
@@ -521,7 +522,11 @@ export declare interface PackageParams {
|
|
|
521
522
|
|
|
522
523
|
export declare interface ProcessingRequest extends BaseRequest {
|
|
523
524
|
metadata?: Record<string, any>;
|
|
524
|
-
|
|
525
|
+
delegateProcessing?: {
|
|
526
|
+
serviceURL: string;
|
|
527
|
+
delegateURL: string;
|
|
528
|
+
httpHeaders?: Record<string, string>;
|
|
529
|
+
};
|
|
525
530
|
processParam: DocumentReaderProcessParam;
|
|
526
531
|
imagesList?: Array<DocumentReaderImage>;
|
|
527
532
|
imageInputParam?: ImageInputParamType;
|
|
@@ -550,6 +555,8 @@ declare type TInitializeListener = ({ isInitialized }: {
|
|
|
550
555
|
isInitialized: boolean;
|
|
551
556
|
}) => void;
|
|
552
557
|
|
|
558
|
+
declare type TOnFinalize = (transaction: TransactionInfo) => void;
|
|
559
|
+
|
|
553
560
|
declare type TPrepareListener = ({ isPrepared }: {
|
|
554
561
|
isPrepared: boolean;
|
|
555
562
|
}) => void;
|