@regulaforensics/idv-capture-web 2.3.153-nightly → 2.4.155-rc

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
@@ -118,7 +118,7 @@ service.eventListener = idvEventListener;
118
118
  /** set modules */
119
119
  const initResult = await service.initialize({
120
120
  modulesConfig: { docreader: { devLicense: 'yourBase64license' } },
121
- includedModules: [IdvModules.LIVENESS, IdvModules.DOC_READER],
121
+ includedModules: [IdvModules.LIVENESS, IdvModules.DOC_READER], //import IdvModules from @regulaforensics/idv-capture-web
122
122
  });
123
123
  /** if something goes wrong, the command error will contain an error field. */
124
124
  if (initResult.error) {
@@ -173,4 +173,46 @@ For example:
173
173
 
174
174
  const service = new IdvIntegrationService();
175
175
  service.eventListener = idvEventListener;
176
- ```
176
+ ```
177
+ ## Setters
178
+
179
+ `nonce` - set CSP nonce id to the style tag
180
+
181
+ ```javascript
182
+ const service = new IdvIntegrationService();
183
+ service.nonce = nonceId;
184
+ ```
185
+
186
+ `sessionRestoreMode` - set restore mode to the **idv-capture-web** . restores the session from the current step (for example, if the page was accidentally reloaded)
187
+
188
+ ```javascript
189
+ const service = new IdvIntegrationService();
190
+ service.sessionRestoreMode = true;
191
+ ```
192
+
193
+ ## Getters
194
+
195
+ `version` - returns the version of the component
196
+ ```javascript
197
+ const service = new IdvIntegrationService();
198
+ console.log(service.version);
199
+ ```
200
+
201
+ ## Methods
202
+
203
+ Check types in the `index.d.ts`
204
+
205
+ `async initialize(config: InitConfig): Promise<{ error?: BaseInitializationError }>` - initialize the idv-web-capture worker.
206
+
207
+
208
+ `async configure(
209
+ config: ConnectionConfig | UrlConnectionConfig
210
+ ): Promise<ConfigureCompletion | UrlConfigureCompletion>` - configures the service. accepts input parameters for connecting to the platform
211
+
212
+ `async getWorkFlows(params?: WorkflowListRequest): Promise<WorkflowListCompletion>` - returns list of available workflows
213
+
214
+ `async prepareWorkflow({ workflowId }: { workflowId: string }): Promise<PrepareWorkflowCompletion>` - prepared service with workflowId. In this method, the component checks the compatibility of modules and steps in the workflow.
215
+
216
+ `async startWorkflow(config?: StartWorkflowConfig): Promise<WorkflowCompletion>` - this method starts workflow. We recommend showing the web component immediately before executing this method and deleting the web component after the promise of this method resolves.
217
+
218
+ `async deinitialize(): Promise<DeinitializeCompletion>` - deinitialize the service. After this command you should run `initialize` method if you want to continue working with the service. We recommend executing this command when you have completed the necessary work on the page.