@regulaforensics/vp-frontend-document-components 7.5.1834-rc → 7.5.1852-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 CHANGED
@@ -11,14 +11,17 @@
11
11
  * [Events](#events)
12
12
  * [Action Types](#action-types)
13
13
  * [Action Data](#action-data)
14
+ * [Remote action data](#remote-action-data)
14
15
  * [Action Statuses](#action-statuses)
15
16
  * [Action Failure Reasons](#action-failure-reasons)
16
17
  * [Event Generation Logic](#event-generation-logic)
17
18
  * [Event Response](#event-response)
18
19
  * [Settings and Attributes](#settings-and-attributes)
19
20
  * [Backend reprocessing](#backend-reprocessing)
21
+ * [Delegating scan to device with better camera](#delegating-scan-to-device-with-better-camera)
20
22
  * [Appearance Customization](#appearance-customization)
21
23
  * [Font and Colors](#font-and-colors)
24
+ * [Inserting component in Flex and Grid layouts](#inserting-component-in-flex-and-grid-layouts)
22
25
  * [Localized Messages](#localized-messages)
23
26
  * [Document Reader Processor](#document-reader-processor)
24
27
  * [npm Processor Integration](#npm-processor-integration)
@@ -41,8 +44,8 @@ The Document Reader Web Components let you add document verification to your web
41
44
  * Capture a document from the device's camera
42
45
  * Process an uploaded image
43
46
  * Crop the image by document boundaries
44
- * Detect the presence of a machine-readable zone (MRZ)
45
- * Recognize and return the values of MRZ text fields
47
+ * Detect the presence of a machine-readable zone (MRZ), recognize it, and parse into text text fields
48
+ * Read barcodes, and parse them into text fields
46
49
 
47
50
  The Document Reader Web Components package contains:
48
51
 
@@ -232,7 +235,14 @@ After adding `DocumentReaderService` to the global variable, you can change the
232
235
  },
233
236
  };
234
237
  ```
235
-
238
+
239
+ **Session ID** for video processing:
240
+ ```javascript
241
+ window.RegulaDocumentSDK.recognizerProcessParam = {
242
+ tag: 'your session id',
243
+ };
244
+ ```
245
+
236
246
  **Image processing** default settings. The functionality is available via the gallery button.
237
247
  ```javascript
238
248
  window.RegulaDocumentSDK.imageProcessParam = {
@@ -324,26 +334,29 @@ The fields of the `event.detail` object:
324
334
 
325
335
  #### Action Types
326
336
 
327
- | Type of action | Description of the action | Components and events, where present |
328
- |:-----------------------------|:------------------------------------------------------------------|:------------------------------------:|
329
- | `ELEMENT_VISIBLE` | Component is appended in the DOM. | `document-reader`, `camera-snapshot` |
330
- | `PRESS_CAMERA_BUTTON` | The "From camera" button is pressed. | `document-reader`, `camera-snapshot` |
331
- | `PRESS_FILE_BUTTON` | The "From gallery" button is pressed. | `document-reader`, `camera-snapshot` |
332
- | `PRESS_RETRY_BUTTON` | The "Retry" button is pressed. | `document-reader`, `camera-snapshot` |
333
- | `PRESS_SKIP_BUTTON` | The "Skip" button is pressed. | `document-reader` |
334
- | `PRESS_CAPTURE_BUTTON` | The "Capture" button is pressed. | `document-reader`, `camera-snapshot` |
335
- | `PRESS_CHANGE_CAMERA_BUTTON` | The "Change camera" button is pressed. | `document-reader`, `camera-snapshot` |
336
- | `PRESS_MIRRORING_BUTTON` | The "Mirroring" button is pressed. | `document-reader`, `camera-snapshot` |
337
- | `NEW_PAGE_AVAILABLE` | The document contains another page. | `document-reader` |
338
- | `NEW_PAGE_STARTED` | Recognition of a new page has started. | `document-reader` |
339
- | `CLOSE` | The "Close" button is pressed. | `document-reader`, `camera-snapshot` |
340
- | `CAMERA_PROCESS_CLOSED` | The "Close" button is pressed on the document recognition screen. | `document-reader`, `camera-snapshot` |
341
- | `CAMERA_PROCESS_STARTED` | Recognition from the camera has started. | `document-reader` |
342
- | `VIDEO_STARTED` | Video stream started. | `document-reader`, `camera-snapshot` |
343
- | `VIDEO_STOPPED` | Video stream stopped. | `document-reader`, `camera-snapshot` |
344
- | `FILE_PROCESS_STARTED` | File processing has started. | `document-reader`, `camera-snapshot` |
345
- | `PROCESS_FINISHED` | The component has finished its work. | `document-reader`, `camera-snapshot` |
346
- | `SERVICE_INITIALIZED` | The component has started its work. | `document-reader` |
337
+ | Type of action | Description of the action | Components and events, where present |
338
+ |:------------------------------|:------------------------------------------------------------------|:------------------------------------:|
339
+ | `ELEMENT_VISIBLE` | Component is appended in the DOM. | `document-reader`, `camera-snapshot` |
340
+ | `PRESS_CAMERA_BUTTON` | The "From camera" button is pressed. | `document-reader`, `camera-snapshot` |
341
+ | `PRESS_FILE_BUTTON` | The "From gallery" button is pressed. | `document-reader`, `camera-snapshot` |
342
+ | `PRESS_RETRY_BUTTON` | The "Retry" button is pressed. | `document-reader`, `camera-snapshot` |
343
+ | `PRESS_SKIP_BUTTON` | The "Skip" button is pressed. | `document-reader` |
344
+ | `PRESS_CAPTURE_BUTTON` | The "Capture" button is pressed. | `document-reader`, `camera-snapshot` |
345
+ | `PRESS_CHANGE_CAMERA_BUTTON` | The "Change camera" button is pressed. | `document-reader`, `camera-snapshot` |
346
+ | `PRESS_MIRRORING_BUTTON` | The "Mirroring" button is pressed. | `document-reader`, `camera-snapshot` |
347
+ | `NEW_PAGE_AVAILABLE` | The document contains another page. | `document-reader` |
348
+ | `NEW_PAGE_STARTED` | Recognition of a new page has started. | `document-reader` |
349
+ | `CLOSE` | The "Close" button is pressed. | `document-reader`, `camera-snapshot` |
350
+ | `CAMERA_PROCESS_CLOSED` | The "Close" button is pressed on the document recognition screen. | `document-reader`, `camera-snapshot` |
351
+ | `CAMERA_PROCESS_STARTED` | Recognition from the camera has started. | `document-reader` |
352
+ | `VIDEO_STARTED` | Video stream started. | `document-reader`, `camera-snapshot` |
353
+ | `VIDEO_STOPPED` | Video stream stopped. | `document-reader`, `camera-snapshot` |
354
+ | `FILE_PROCESS_STARTED` | File processing has started. | `document-reader`, `camera-snapshot` |
355
+ | `PROCESS_FINISHED` | The component has finished its work. | `document-reader`, `camera-snapshot` |
356
+ | `SERVICE_INITIALIZED` | The component has started its work. | `document-reader` |
357
+ | `PRESS_REMOTE_DEVICE_BUTTON` | The "From other phone" button is pressed. | `document-reader` |
358
+ | `REMOTE_TRANSACTION_UPLOADED` | Remote transaction with current tag was uploaded | `document-reader` |
359
+ | `REMOTE_PROCESS_FINISHED` | Remote transaction with current tag was processed | `document-reader` |
347
360
 
348
361
 
349
362
  #### Action Data
@@ -395,21 +408,38 @@ Available fields of `event.detail.data` object:
395
408
 
396
409
  #### Action Failure Reasons
397
410
 
398
- | Reason | Description of the reason |
399
- |:---------------------------|:-----------------------------------|
400
- | `WASM_ERROR` | Error in WASM |
401
- | `WASM_LICENSE` | Missing or incorrect license |
402
- | `FILE_SIZE` | The file size is too large |
403
- | `INCORRECT_FILE` | Problems with reading the file |
404
- | `INCORRECT_SCENARIO` | Scenario is not supported |
405
- | `MISSING_SCENARIO` | Scenario is missing |
406
- | `UNKNOWN_ERROR` | Unknown error |
407
- | `NOT_SUPPORTED` | The browser is not supported |
408
- | `CAMERA_UNKNOWN_ERROR` | Unknown camera error |
409
- | `CAMERA_PERMISSION_DENIED` | Access to the camera is prohibited |
410
- | `NO_CAMERA` | There is no camera available |
411
- | `INCORRECT_CAMERA_ID` | Camera with this ID was not found |
412
- | `CONNECTION_ERROR` | Connection errors |
411
+ | Reason | Description of the reason |
412
+ |:---------------------------|:-------------------------------------------------------|
413
+ | `WASM_ERROR` | Error in WASM |
414
+ | `WASM_LICENSE` | Missing or incorrect license |
415
+ | `FILE_SIZE` | The file size is too large |
416
+ | `INCORRECT_FILE` | Problems with reading the file |
417
+ | `INCORRECT_SCENARIO` | Scenario is not supported |
418
+ | `MISSING_SCENARIO` | Scenario is missing |
419
+ | `UNKNOWN_ERROR` | Unknown error |
420
+ | `NOT_SUPPORTED` | The browser is not supported |
421
+ | `HTTP_NOT_SUPPORTED` | The web component does not work over the http protocol |
422
+ | `INSECURE_PAGE_CONTEXT` | The web component does not work in insecure context |
423
+ | `CAMERA_UNKNOWN_ERROR` | Unknown camera error |
424
+ | `CAMERA_PERMISSION_DENIED` | Access to the camera is prohibited |
425
+ | `NO_CAMERA` | There is no camera available |
426
+ | `INCORRECT_CAMERA_ID` | Camera with this ID was not found |
427
+ | `CONNECTION_ERROR` | Connection errors |
428
+
429
+ #### Remote action data
430
+
431
+ **1.** In case of remote scan scenario REMOTE_TRANSACTION_UPLOADED `event.detail` will contain the following data:
432
+ ```javascript
433
+ {
434
+ action: EventActions.REMOTE_TRANSACTION_UPLOADED,
435
+ data: {
436
+ id: 1,
437
+ state: 1,
438
+ updatedAt: 'dateStr'
439
+ },
440
+ }
441
+ ```
442
+ Transaction id can be used to trigger reprocessing.
413
443
 
414
444
  #### Event Generation Logic
415
445
 
@@ -976,6 +1006,41 @@ function listener(event) {
976
1006
 
977
1007
  component.addEventListener('document-reader', listener);
978
1008
  ```
1009
+ ### Delegating scan to device with better camera
1010
+
1011
+ For cases when user's main device lacks camera or does not succeed to scan with given camera quality,
1012
+ you have an option to delegate scanning to another available device (i.e. phone).
1013
+
1014
+ #### 1. "From other phone" action may be configured on the start screen:
1015
+ - configure [backend reprocessing](#backend-reprocessing)
1016
+ - add 'delegateURL' and 'tag':
1017
+ ```javascript
1018
+ processor.recognizerProcessParam = {
1019
+ delegateURL: 'https://your-page.com?tag={tag}', // the page which will be used by other device
1020
+ tag: 123 // your session id, will be added to delegateURL in place of {tag} substring
1021
+ }
1022
+ ```
1023
+ - these settings will unlock "From other phone" option
1024
+ that shows the user QR Code with url (i.e. `https://your-page.com?tag=123`)
1025
+ - the component will emit **REMOTE_TRANSACTION_UPLOADED** event with the most recent transaction uploaded with your session tag.
1026
+ Transaction id may be used to trigger full process backend reprocessing (i.e use [Document Reader Webclient](https://www.npmjs.com/package/@regulaforensics/document-reader-webclient))
1027
+ - the component will emit **REMOTE_PROCESS_FINISHED** event with a result of the most recent processed transaction.
1028
+ It is similar to **PROCESS_FINISHED** event but may contain more data due to backend reprocessing
1029
+
1030
+ #### 2. Configure Delegate page component on delegateURL:
1031
+ - configure [backend reprocessing](#backend-reprocessing)
1032
+ - use the same tag as on the main page
1033
+ ```javascript
1034
+ window.RegulaDocumentSDK.recognizerProcessParam = {
1035
+ tag: 123 // your session id, i.e. it can be extracted from your delegate page URL
1036
+ };
1037
+
1038
+ element.settings = {
1039
+ startScreen: false, // From camera recognition is expected
1040
+ }
1041
+ ```
1042
+ - use finalizePackage() to send the data for further reprocessing
1043
+
979
1044
 
980
1045
  ### Appearance Customization
981
1046
 
@@ -1007,6 +1072,19 @@ HTML:
1007
1072
  ```html
1008
1073
  <document-reader class="my-custom-style"></document-reader>
1009
1074
  ```
1075
+ #### Inserting component in Flex and Grid layouts
1076
+
1077
+ document-reader and camera-snapshot components have **width** and **height** set to **100%** by default and therefore try to fit their container element.
1078
+ This should not affect correct CSS Grid positioning, but for Flexbox make sure to style document-reader dimensions and set **flex-basis**, i.e.:
1079
+
1080
+ ```css
1081
+ document-reader.flex-item {
1082
+ width: auto;
1083
+ height: auto;
1084
+ flex-basis: 500px; // distinct width of your choice
1085
+ }
1086
+ ```
1087
+
1010
1088
 
1011
1089
  #### Localized Messages
1012
1090
 
@@ -1033,48 +1111,55 @@ body.append(element);
1033
1111
 
1034
1112
  See the following table with localized labels, used in the components.
1035
1113
 
1036
- | Label | Default message in `en` locale | Used in |
1037
- |:------------------------------|:---------------------------------------------------------------------------------------------|:------------------------------------:|
1038
- | **success** | Success! | `document-reader`, `camera-snapshot` |
1039
- | **fileCorrupt** | This file is corrupt or not supported | `document-reader`, `camera-snapshot` |
1040
- | **selectAnotherFile** | Please select another file | `document-reader`, `camera-snapshot` |
1041
- | **error** | Error! | `document-reader`, `camera-snapshot` |
1042
- | **somethingWentWrong** | Something went wrong | `document-reader`, `camera-snapshot` |
1043
- | **tryAgain** | Try again | `document-reader`, `camera-snapshot` |
1044
- | **fromCamera** | From camera | `document-reader`, `camera-snapshot` |
1045
- | **fromGallery** | From gallery | `document-reader`, `camera-snapshot` |
1046
- | **cameraUnavailable** | Camera unavailable! | `document-reader`, `camera-snapshot` |
1047
- | **preparingCamera** | Preparing the camera... | `document-reader`, `camera-snapshot` |
1048
- | **noCameraAvailable** | No camera available | `document-reader`, `camera-snapshot` |
1049
- | **incorrectCameraId** | No camera with the specified ID found. | `document-reader`, `camera-snapshot` |
1050
- | **allowAccessToCamera** | Allow access to the camera and reload this page to continue. | `document-reader`, `camera-snapshot` |
1051
- | **cameraConnection** | Make sure the camera is connected correctly. | `document-reader`, `camera-snapshot` |
1052
- | **checkCameraId** | Check if the specified camera ID is correct. | `document-reader`, `camera-snapshot` |
1053
- | **scanIDInBrowser** | Scan an ID in your browser | `document-reader` |
1054
- | **useYourDeviceCamera** | Use your device camera to scan a document or select a photo of the document from the gallery | `document-reader` |
1055
- | **processingFinished** | Processing finished. | `document-reader` |
1056
- | **largeFile** | This file is too large to be uploaded | `document-reader` |
1057
- | **selectSmallerFile** | Please select a smaller file | `document-reader` |
1058
- | **versionNotSupported** | Your browser version is not supported | `document-reader` |
1059
- | **updateBrowser** | Update your browser version | `document-reader` |
1060
- | **licenseError** | A license error has occurred | `document-reader` |
1061
- | **licenseExpired** | The license cannot be found or has expired | `document-reader` |
1062
- | **timeout** | Timeout | `document-reader` |
1063
- | **processing** | Processing... | `document-reader` |
1064
- | **preparingService** | Preparing the service... | `document-reader` |
1065
- | **placeDocumentIntoFrame** | Fit the document into the frame | `document-reader` |
1066
- | **noFocus** | No camera focus | `document-reader` |
1067
- | **moveCloser** | Move closer | `document-reader` |
1068
- | **glaresOnDocument** | Avoid glare on the document | `document-reader` |
1069
- | **holdDocumentStraight** | Hold the document straight | `document-reader` |
1070
- | **documentProcessing** | Document processing... | `document-reader` |
1071
- | **flipDocument** | Flip the document | `document-reader` |
1072
- | **verified** | Verified! | `document-reader` |
1073
- | **keepDeviceStill** | Hold the device still | `document-reader` |
1074
- | **positionDocumentCenter** | Position the document in the center | `camera-snapshot` |
1075
- | **photoCapturedSuccessfully** | The photo is captured successfully. | `camera-snapshot` |
1076
- | **uploadPhoto** | Upload a photo | `camera-snapshot` |
1077
- | **useCameraOrGallery** | Use your device camera or select a photo from the gallery | `camera-snapshot` |
1114
+ | Label | Default message in `en` locale | Used in |
1115
+ |:-------------------------------|:---------------------------------------------------------------------------------------------|:------------------------------------:|
1116
+ | **success** | Success! | `document-reader`, `camera-snapshot` |
1117
+ | **fileCorrupt** | This file is corrupt or not supported | `document-reader`, `camera-snapshot` |
1118
+ | **selectAnotherFile** | Please select another file | `document-reader`, `camera-snapshot` |
1119
+ | **error** | Error! | `document-reader`, `camera-snapshot` |
1120
+ | **somethingWentWrong** | Something went wrong | `document-reader`, `camera-snapshot` |
1121
+ | **tryAgain** | Try again | `document-reader`, `camera-snapshot` |
1122
+ | **fromCamera** | From camera | `document-reader`, `camera-snapshot` |
1123
+ | **fromGallery** | From gallery | `document-reader`, `camera-snapshot` |
1124
+ | **fromOtherPhone** | From other phone | `document-reader`, `camera-snapshot` |
1125
+ | **cameraUnavailable** | Camera unavailable! | `document-reader`, `camera-snapshot` |
1126
+ | **preparingCamera** | Preparing the camera... | `document-reader`, `camera-snapshot` |
1127
+ | **noCameraAvailable** | No camera available | `document-reader`, `camera-snapshot` |
1128
+ | **incorrectCameraId** | No camera with the specified ID found. | `document-reader`, `camera-snapshot` |
1129
+ | **allowAccessToCamera** | Allow access to the camera and reload this page to continue. | `document-reader`, `camera-snapshot` |
1130
+ | **cameraConnection** | Make sure the camera is connected correctly. | `document-reader`, `camera-snapshot` |
1131
+ | **checkCameraId** | Check if the specified camera ID is correct. | `document-reader`, `camera-snapshot` |
1132
+ | **scanIDInBrowser** | Scan an ID in your browser | `document-reader` |
1133
+ | **useYourDeviceCamera** | Use your device camera to scan a document or select a photo of the document from the gallery | `document-reader` |
1134
+ | **processingFinished** | Processing finished. | `document-reader` |
1135
+ | **largeFile** | This file is too large to be uploaded | `document-reader` |
1136
+ | **selectSmallerFile** | Please select a smaller file | `document-reader` |
1137
+ | **versionNotSupported** | Your browser version is not supported | `document-reader` |
1138
+ | **httpNotSupported** | HTTPS is not used. | `document-reader` |
1139
+ | **insecurePageContext** | Insecure page context. | `document-reader` |
1140
+ | **updateBrowser** | Update your browser version | `document-reader` |
1141
+ | **licenseError** | A license error has occurred | `document-reader` |
1142
+ | **licenseExpired** | The license cannot be found or has expired | `document-reader` |
1143
+ | **timeout** | Timeout | `document-reader` |
1144
+ | **processing** | Processing... | `document-reader` |
1145
+ | **preparingService** | Preparing the service... | `document-reader` |
1146
+ | **placeDocumentIntoFrame** | Fit the document into the frame | `document-reader` |
1147
+ | **noFocus** | No camera focus | `document-reader` |
1148
+ | **moveCloser** | Move closer | `document-reader` |
1149
+ | **glaresOnDocument** | Avoid glare on the document | `document-reader` |
1150
+ | **holdDocumentStraight** | Hold the document straight | `document-reader` |
1151
+ | **documentProcessing** | Document processing... | `document-reader` |
1152
+ | **flipDocument** | Flip the document | `document-reader` |
1153
+ | **verified** | Verified! | `document-reader` |
1154
+ | **keepDeviceStill** | Hold the device still | `document-reader` |
1155
+ | **otherDeviceCardTitle** | Continue on your phone | `document-reader` |
1156
+ | **otherDeviceCardSubtitle** | The camera quality on the phone is better | `document-reader` |
1157
+ | **otherDeviceCardNote** | Scan QR on your phone | `document-reader` |
1158
+ | **positionDocumentCenter** | Position the document in the center | `camera-snapshot` |
1159
+ | **photoCapturedSuccessfully** | The photo is captured successfully. | `camera-snapshot` |
1160
+ | **uploadPhoto** | Upload a photo | `camera-snapshot` |
1161
+ | **useCameraOrGallery** | Use your device camera or select a photo from the gallery | `camera-snapshot` |
1162
+ | **statusAwaitingReprocessing** | Awaiting reprocessing | `camera-snapshot` |
1078
1163
 
1079
1164
  ## Document Reader Processor
1080
1165
 
@@ -1409,8 +1494,7 @@ By default, these files are downloaded from Regula servers, but you can set your
1409
1494
 
1410
1495
  **1.** To download these files from our server to local machine, you can get the link in the `window.RegulaDocumentSDK.workerPath` field.
1411
1496
 
1412
- **2.** Then, in the `ProcMgr.worker.js` file, use the search to find `https://wasm.regulaforensics.com` and replace the full link with your custom URL.
1413
- Upload all three files (`ProcMgr.worker.js`, `ProcMgr.wasm`, `ProcMgr.data`) to the location you specified. Also, change the address in `windows.RegulaDocumentSDK`.
1497
+ **2.** Upload all three files (`ProcMgr.worker.js`, `ProcMgr.wasm`, `ProcMgr.data`) to the location you specified. Also, change the address in `windows.RegulaDocumentSDK`.
1414
1498
 
1415
1499
  For Predefined UI Components:
1416
1500
 
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ declare enum CameraSnapshotAttributes {
27
27
  closeButton = "close-button"
28
28
  }
29
29
 
30
- export declare type CameraSnapshotDetailType = DetailEvent<EventActions, CameraSnapshotResponseType>;
30
+ export declare type CameraSnapshotDetailType = DetailEvent<Exclude<EventActions, EventActions.REMOTE_TRANSACTION_UPLOADED>, CameraSnapshotResponseType>;
31
31
 
32
32
  export declare type CameraSnapshotResponseType = Array<{
33
33
  raw: string;
@@ -118,7 +118,7 @@ export declare class DocumentReaderCaptureWebComponent extends HTMLElement {
118
118
  disconnectedCallback(): void;
119
119
  }
120
120
 
121
- export declare type DocumentReaderDetailType = DetailEvent<EventActions, DocumentReaderResponseType>;
121
+ export declare type DocumentReaderDetailType = DetailEvent<Exclude<EventActions, EventActions.REMOTE_TRANSACTION_UPLOADED>, DocumentReaderResponseType>;
122
122
 
123
123
  export declare interface DocumentReaderImage {
124
124
  data: string;
@@ -320,6 +320,8 @@ export declare interface DocumentTranslations {
320
320
  largeFile?: string;
321
321
  selectSmallerFile?: string;
322
322
  versionNotSupported?: string;
323
+ httpNotSupported?: string;
324
+ insecurePageContext?: string;
323
325
  updateBrowser?: string;
324
326
  licenseError?: string;
325
327
  licenseExpired?: string;
@@ -384,6 +386,7 @@ export declare enum EventActions {
384
386
  PRESS_SKIP_BUTTON = "PRESS_SKIP_BUTTON",
385
387
  PRESS_CAPTURE_BUTTON = "PRESS_CAPTURE_BUTTON",
386
388
  PRESS_CHANGE_CAMERA_BUTTON = "PRESS_CHANGE_CAMERA_BUTTON",
389
+ PRESS_REMOTE_DEVICE_BUTTON = "PRESS_REMOTE_DEVICE_BUTTON",
387
390
  PRESS_MIRRORING_BUTTON = "PRESS_MIRRORING_BUTTON",
388
391
  PRESS_CONNECT_BUTTON = "PRESS_CONNECT_BUTTON",
389
392
  PRESS_DISCONNECT_BUTTON = "PRESS_DISCONNECT_BUTTON",
@@ -399,7 +402,9 @@ export declare enum EventActions {
399
402
  FILE_PROCESS_STARTED = "FILE_PROCESS_STARTED",
400
403
  PROCESS_STARTED = "PROCESS_STARTED",
401
404
  PROCESS_FINISHED = "PROCESS_FINISHED",
402
- SERVICE_INITIALIZED = "SERVICE_INITIALIZED"
405
+ SERVICE_INITIALIZED = "SERVICE_INITIALIZED",
406
+ REMOTE_TRANSACTION_UPLOADED = "REMOTE_TRANSACTION_UPLOADED",
407
+ REMOTE_PROCESS_FINISHED = "REMOTE_PROCESS_FINISHED"
403
408
  }
404
409
 
405
410
  export declare enum FrameLineCap {
@@ -507,6 +512,7 @@ export declare interface PackageParams {
507
512
 
508
513
  export declare interface ProcessingRequest extends BaseRequest {
509
514
  metadata?: Record<string, any>;
515
+ delegateURL?: string;
510
516
  processParam: DocumentReaderProcessParam;
511
517
  imagesList?: Array<DocumentReaderImage>;
512
518
  imageInputParam?: ImageInputParamType;
@@ -543,11 +549,32 @@ declare type TProcessingListener = ({ isProcessing }: {
543
549
  isProcessing: boolean;
544
550
  }) => void;
545
551
 
552
+ export declare interface TransactionEvent {
553
+ action: EventActions.REMOTE_TRANSACTION_UPLOADED;
554
+ data: TransactionStatusInfo;
555
+ }
556
+
546
557
  export declare interface TransactionInfo {
547
558
  tag: string;
548
559
  transactionId: string;
549
560
  }
550
561
 
562
+ export declare type TransactionsListResponse = {
563
+ items: TransactionStatusInfo[];
564
+ };
565
+
566
+ export declare enum TransactionStateStatus {
567
+ STARTED = 0,
568
+ UPLOADED = 1,
569
+ PROCESSED = 2
570
+ }
571
+
572
+ export declare type TransactionStatusInfo = {
573
+ id: number;
574
+ state: TransactionStateStatus;
575
+ updatedAt: string;
576
+ };
577
+
551
578
  export declare type TScenarioParams = {
552
579
  name: string;
553
580
  desc: string;
@@ -585,11 +612,10 @@ export { }
585
612
 
586
613
  declare global {
587
614
  interface HTMLElementEventMap {
588
- 'document-reader': CustomEvent<DocumentReaderDetailType>;
615
+ 'document-reader': CustomEvent<DocumentReaderDetailType | TransactionEvent>;
589
616
  'camera-snapshot': CustomEvent<CameraSnapshotDetailType>;
590
617
  }
591
618
  interface Window {
592
619
  RegulaDocumentSDK: DocumentReaderService;
593
620
  }
594
621
  }
595
-