@regulaforensics/idv-capture-web 2.5.184-nightly → 2.5.186-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 +22 -2
- package/dist/index.d.ts +4 -3
- package/dist/main.iife.js +55 -231
- package/dist/main.js +20597 -14
- package/package.json +1 -2
- package/dist/index-CwUqpoUc.js +0 -16432
- package/dist/index-DZy39UdA.js +0 -27591
- package/dist/index-Dx4lpbtH.js +0 -23775
package/README.md
CHANGED
|
@@ -52,6 +52,12 @@ Install idv-capture-web:
|
|
|
52
52
|
|
|
53
53
|
```
|
|
54
54
|
npm i @regulaforensics/idv-capture-web
|
|
55
|
+
npm i @regulaforensics/idv-gui
|
|
56
|
+
|
|
57
|
+
#optionally
|
|
58
|
+
|
|
59
|
+
npm i @regulaforensics/idv-face
|
|
60
|
+
npm i @regulaforensics/idv-document
|
|
55
61
|
```
|
|
56
62
|
|
|
57
63
|
Create `index.html` and `index.js` files in the root directory of the project.
|
|
@@ -60,6 +66,7 @@ Import `@regulaforensics/idv-capture-web` into your `index.js`:
|
|
|
60
66
|
|
|
61
67
|
```javascript
|
|
62
68
|
import './node_modules/@regulaforensics/idv-capture-web/dist/main.js';
|
|
69
|
+
import './node_modules/@regulaforensics/idv-gui/dist/main.js';
|
|
63
70
|
```
|
|
64
71
|
|
|
65
72
|
In `index.html` connect `index.js` and add the name of the component you want to use. Available components:
|
|
@@ -90,6 +97,11 @@ For example:
|
|
|
90
97
|
|
|
91
98
|
```html
|
|
92
99
|
<script src="https://unpkg.com/@regulaforensics/idv-capture-web@latest/dist/main.iife.js"></script>
|
|
100
|
+
<script src="https://unpkg.com/@regulaforensics/idv-gui@latest/dist/main.iife.js"></script>
|
|
101
|
+
|
|
102
|
+
<script src="https://unpkg.com/@regulaforensics/idv-face@latest/dist/main.iife.js"></script>
|
|
103
|
+
<script src="https://unpkg.com/@regulaforensics/idv-document@latest/dist/main.iife.js"></script>
|
|
104
|
+
|
|
93
105
|
```
|
|
94
106
|
|
|
95
107
|
Add the name of the component to the html, as in the example above.
|
|
@@ -101,6 +113,14 @@ Use `IdvIntegrationService` to setup idv flow.
|
|
|
101
113
|
General example of the integration step by step
|
|
102
114
|
|
|
103
115
|
```javascript
|
|
116
|
+
/** import necessary service & packages */
|
|
117
|
+
import { IdvIntegrationService } from '@regulaforensics/idv-capture-web';
|
|
118
|
+
import { GuiIdv } from "@regulaforensics/idv-gui";
|
|
119
|
+
/** depends of your workflow */
|
|
120
|
+
import { FaceIdv } from "@regulaforensics/idv-face";
|
|
121
|
+
import { DocumentIdv } from "@regulaforensics/idv-document";
|
|
122
|
+
|
|
123
|
+
|
|
104
124
|
/** create service */
|
|
105
125
|
const service = new IdvIntegrationService();
|
|
106
126
|
|
|
@@ -118,7 +138,7 @@ service.eventListener = idvEventListener;
|
|
|
118
138
|
/** set modules */
|
|
119
139
|
const initResult = await service.initialize({
|
|
120
140
|
modulesConfig: { docreader: { devLicense: 'yourBase64license' } },
|
|
121
|
-
includedModules: [
|
|
141
|
+
includedModules: [GuiIdv, FaceIdv, DocumentIdv],
|
|
122
142
|
});
|
|
123
143
|
/** if something goes wrong, the command error will contain an error field. */
|
|
124
144
|
if (initResult.error) {
|
|
@@ -206,7 +226,7 @@ Check types in the `index.d.ts`
|
|
|
206
226
|
|
|
207
227
|
|
|
208
228
|
`async configure(
|
|
209
|
-
config: ConnectionConfig | UrlConnectionConfig
|
|
229
|
+
config: ConnectionConfig | UrlConnectionConfig | ConnectionByApiKeyConfig,
|
|
210
230
|
): Promise<ConfigureCompletion | UrlConfigureCompletion>` - configures the service. accepts input parameters for connecting to the platform
|
|
211
231
|
|
|
212
232
|
`async getWorkFlows(params?: WorkflowListRequest): Promise<WorkflowListCompletion>` - returns list of available workflows
|
package/dist/index.d.ts
CHANGED
|
@@ -193,7 +193,7 @@ export declare type InitConfig = {
|
|
|
193
193
|
};
|
|
194
194
|
face?: Record<string, any>;
|
|
195
195
|
};
|
|
196
|
-
includedModules:
|
|
196
|
+
includedModules: any[];
|
|
197
197
|
};
|
|
198
198
|
|
|
199
199
|
export declare type InitializeCompletion = {
|
|
@@ -222,7 +222,7 @@ export declare enum PrepareWorkflowError {
|
|
|
222
222
|
export declare enum ScenarioError {
|
|
223
223
|
INITIALIZATION_REQUIRED = 0,
|
|
224
224
|
PREPARED_REQUIRED = 1,
|
|
225
|
-
|
|
225
|
+
START_SESSION_FAILED = 2,
|
|
226
226
|
UNKNOWN_STEP = 3,
|
|
227
227
|
MODULES_ISSUE = 4,
|
|
228
228
|
ALREADY_STARTED = 5,
|
|
@@ -251,7 +251,8 @@ export declare enum StartSessionError {
|
|
|
251
251
|
HTTP_ISSUE = 0,
|
|
252
252
|
PROVIDER_ERROR = 1,
|
|
253
253
|
DECODING_FAILED = 2,
|
|
254
|
-
TOKEN_ERROR = 3
|
|
254
|
+
TOKEN_ERROR = 3,
|
|
255
|
+
CONNECTION_ISSUE = 4
|
|
255
256
|
}
|
|
256
257
|
|
|
257
258
|
export declare type StartWorkflowConfig = {
|