@regulaforensics/idv-capture-web 2.5.183-nightly → 2.5.185-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
@@ -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: [IdvModules.LIVENESS, IdvModules.DOC_READER], //import IdvModules from @regulaforensics/idv-capture-web
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
@@ -86,11 +86,23 @@ declare class BaseTokenInitializationError extends BaseError {
86
86
  });
87
87
  }
88
88
 
89
- declare type ConfigureCompletion = {
89
+ export declare type ConfigureCompletion = {
90
90
  error?: BaseInitializationError;
91
91
  };
92
92
 
93
- declare type ConnectionConfig = {
93
+ export declare type ConnectionByApiKeyConfig = {
94
+ host: string;
95
+ apiKey: string;
96
+ isSecure?: boolean;
97
+ port?: number;
98
+ deviceDescriptor: {
99
+ ttl: number;
100
+ } & Record<string, unknown>;
101
+ httpRetryCount?: number;
102
+ httpTimeoutMs?: number;
103
+ };
104
+
105
+ export declare type ConnectionConfig = {
94
106
  host: string;
95
107
  httpRetryCount?: number;
96
108
  httpTimeoutMs?: number;
@@ -99,6 +111,9 @@ declare type ConnectionConfig = {
99
111
  port?: number;
100
112
  schema?: string;
101
113
  userName: string;
114
+ deviceDescriptor?: {
115
+ ttl?: number;
116
+ } & Record<string, unknown>;
102
117
  };
103
118
 
104
119
  export declare enum ConnectionError {
@@ -127,7 +142,7 @@ export declare class IdvIntegrationService {
127
142
  initialize(config: InitConfig): Promise<{
128
143
  error?: BaseInitializationError;
129
144
  }>;
130
- configure(config: ConnectionConfig | UrlConnectionConfig): Promise<ConfigureCompletion | UrlConfigureCompletion>;
145
+ configure(config: ConnectionConfig | UrlConnectionConfig | ConnectionByApiKeyConfig): Promise<ConfigureCompletion | UrlConfigureCompletion>;
131
146
  getWorkFlows(params?: WorkflowListRequest): Promise<WorkflowListCompletion>;
132
147
  prepareWorkflow({ workflowId }: {
133
148
  workflowId: string;
@@ -171,14 +186,14 @@ export declare class IdvWebComponent extends HTMLElement {
171
186
  disconnectedCallback(): void;
172
187
  }
173
188
 
174
- declare type InitConfig = {
189
+ export declare type InitConfig = {
175
190
  modulesConfig?: {
176
191
  docreader?: {
177
192
  devLicense: string;
178
193
  };
179
194
  face?: Record<string, any>;
180
195
  };
181
- includedModules: IdvModulesType[];
196
+ includedModules: any[];
182
197
  };
183
198
 
184
199
  export declare type InitializeCompletion = {
@@ -239,7 +254,7 @@ export declare enum StartSessionError {
239
254
  TOKEN_ERROR = 3
240
255
  }
241
256
 
242
- declare type StartWorkflowConfig = {
257
+ export declare type StartWorkflowConfig = {
243
258
  metadata?: Record<string, unknown>;
244
259
  locale?: string;
245
260
  };
@@ -249,12 +264,14 @@ declare enum TokenInitializeError {
249
264
  WORKFLOW_ISSUE = 1
250
265
  }
251
266
 
252
- declare type UrlConfigureCompletion = {
267
+ export declare type UrlConfigureCompletion = {
253
268
  workflows: string[];
254
269
  error?: BaseTokenInitializationError;
255
270
  };
256
271
 
257
- declare type UrlConnectionConfig = string;
272
+ export declare type UrlConnectionConfig = {
273
+ url: string;
274
+ };
258
275
 
259
276
  declare type Workflow = {
260
277
  id: string;
@@ -265,11 +282,6 @@ declare type Workflow = {
265
282
  };
266
283
  } & Record<string, any>;
267
284
 
268
- /**
269
- * @deprecated Use `WorkflowCompletion` instead.
270
- */
271
- export declare type WorkflowCompetion = WorkflowCompletion;
272
-
273
285
  export declare type WorkflowCompletion = {
274
286
  results?: ScenarioResults;
275
287
  error?: BaseScenarioError;
@@ -286,7 +298,7 @@ export declare type WorkflowListCompletion = {
286
298
  error?: BasePrepareWorkflowError;
287
299
  };
288
300
 
289
- declare type WorkflowListRequest = {
301
+ export declare type WorkflowListRequest = {
290
302
  limit: number;
291
303
  skip: number;
292
304
  };