@regulaforensics/idv-capture-web 0.1.86-nightly → 0.1.88-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/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { IdvMessageEvent as IdvMessageEvent_2 } from '../../dist';
2
+
1
3
  declare class BaseDeinitializationError extends BaseError {
2
4
  private static readonly MODULE;
3
5
  private static readonly ERROR_ENUM_NAME;
@@ -74,13 +76,41 @@ declare class BaseScenarioError extends BaseError {
74
76
  });
75
77
  }
76
78
 
79
+ declare class BaseTokenInitializationError extends BaseError {
80
+ private static readonly MODULE;
81
+ private static readonly ERROR_ENUM_NAME;
82
+ private static readonly SHORT_CODE;
83
+ constructor({ errorCode, message, underlyingError, underlyingBaseError, }: {
84
+ errorCode: TokenInitializeError;
85
+ message?: string;
86
+ underlyingError?: string;
87
+ underlyingBaseError?: BaseError;
88
+ });
89
+ }
90
+
91
+ declare type ConfigureCompletion = {
92
+ error?: BaseInitializationError;
93
+ };
94
+
95
+ declare type ConnectionConfig = {
96
+ host: string;
97
+ httpRetryCount?: number;
98
+ httpTimeoutMs?: number;
99
+ isSecure?: boolean;
100
+ password: string;
101
+ port?: number;
102
+ schema?: string;
103
+ userName: string;
104
+ };
105
+
77
106
  export declare enum ConnectionError {
78
107
  HTTP_ISSUE = 0,
79
108
  PROVIDER_ERROR = 1
80
109
  }
81
110
 
82
111
  export declare enum DeinitializationError {
83
- SERVICE_NOT_CONNECTED = 0
112
+ INITIALIZATION_REQUIRED = 0,
113
+ SCENARIO_IN_PROGRESS = 3
84
114
  }
85
115
 
86
116
  export declare type DeinitializeCompletion = {
@@ -98,16 +128,22 @@ declare enum IdvEventTypes {
98
128
  }
99
129
 
100
130
  export declare class IdvIntegrationService {
101
- initialize(config: IIdvConfig): Promise<{
131
+ /** main commands */
132
+ initialize(config: InitConfig): Promise<{
102
133
  error?: BaseInitializationError;
103
134
  }>;
104
- setNonce(id: string): void;
135
+ configure(config: ConnectionConfig | UrlConnectionConfig): Promise<ConfigureCompletion | UrlConfigureCompelition>;
105
136
  getWorkFlows(params?: WorkflowListRequest): Promise<WorkflowListCompletion>;
106
137
  prepareWorkflow({ workfowId }: {
107
138
  workfowId: string;
108
139
  }): Promise<PrepareWorkflowCompletion>;
109
140
  startWorkflow(): Promise<WorkflowCompetion>;
110
141
  deinitialize(): Promise<DeinitializeCompletion>;
142
+ /** service commands */
143
+ setNonce(id: string): void;
144
+ set eventListener(callback: (message: IdvMessageEvent_2) => void);
145
+ set sessionRestoreMode(isEnabled: boolean);
146
+ get currentSessionId(): string | null;
111
147
  }
112
148
 
113
149
  export declare type IdvMessageEvent = {
@@ -119,6 +155,11 @@ export declare type IdvMessageEvent = {
119
155
  details?: any;
120
156
  };
121
157
 
158
+ export declare enum IdvModules {
159
+ LIVENESS = "LIVENESS",
160
+ DOC_READER = "DOC_READER"
161
+ }
162
+
122
163
  export declare enum IdvServiceErrors {
123
164
  CONNECT_TO_IDV_ERROR = "CONNECT_TO_IDV_ERROR",
124
165
  PLAY_WORKFLOW_ERROR = "PLAY_WORKFLOW_ERROR",
@@ -131,6 +172,9 @@ export declare enum IdvServiceErrors {
131
172
 
132
173
  export declare enum IdvServiceMessages {
133
174
  INITIALIZED = "INITIALIZED",
175
+ DID_START_SESSION = "DID_START_SESSION",
176
+ DID_END_SESSION = "DID_END_SESSION",
177
+ DID_START_RESTORE_SESSION = "DID_START_RESTORE_SESSION",
134
178
  READY_TO_PLAY = "READY_TO_PLAY",
135
179
  CONNECT_TO_IDV = "CONNECT_TO_IDV",
136
180
  START_SESSION = "START_SESSION",
@@ -142,33 +186,17 @@ export declare enum IdvServiceMessages {
142
186
  export declare class IdvWebComponent extends HTMLElement {
143
187
  private _root;
144
188
  private _mounted;
145
- private _nonce?;
146
189
  constructor();
147
190
  static get observedAttributes(): Array<string>;
148
- private setNonce;
149
191
  connectedCallback(): void;
150
192
  get version(): string;
151
193
  private render;
152
194
  disconnectedCallback(): void;
153
195
  }
154
196
 
155
- export declare type IIdvConfig = {
156
- connectionConfig: IIdvOptions;
197
+ declare type InitConfig = {
157
198
  modulesConfig?: Record<string, any>;
158
199
  includedModules: any[];
159
- licenseConfig?: Record<string, any>;
160
- listener?: (message: IdvMessageEvent) => void;
161
- };
162
-
163
- export declare type IIdvOptions = {
164
- host: string;
165
- httpRetryCount?: number;
166
- httpTimeoutMs?: number;
167
- isSecure?: boolean;
168
- password: string;
169
- port?: number;
170
- schema?: string;
171
- userName: string;
172
200
  };
173
201
 
174
202
  export declare type InitializeCompletion = {
@@ -224,6 +252,18 @@ export declare enum StartSessionError {
224
252
  DECODING_FAILED = 2
225
253
  }
226
254
 
255
+ declare enum TokenInitializeError {
256
+ CONNECTION_ISSUE = 0,
257
+ WORKFLOW_ISSUE = 1
258
+ }
259
+
260
+ declare type UrlConfigureCompelition = {
261
+ workflows: string[];
262
+ error?: BaseTokenInitializationError;
263
+ };
264
+
265
+ declare type UrlConnectionConfig = string;
266
+
227
267
  declare type Workflow = {
228
268
  id: string;
229
269
  steps: Array<WorkflowStep>;