@regulaforensics/idv-capture-web 0.1.115-nightly → 0.1.116-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/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import { IdvMessageEvent as IdvMessageEvent_2 } from '../../dist';
2
-
3
1
  declare class BaseDeinitializationError extends BaseError {
4
2
  private static readonly MODULE;
5
3
  private static readonly ERROR_ENUM_NAME;
@@ -123,15 +121,12 @@ export declare type DeinitializeCompletion = {
123
121
  error?: BaseDeinitializationError;
124
122
  };
125
123
 
126
- export declare enum IdvEventTargets {
127
- WEB_COMPONENT = "WEB_COMPONENT",
128
- SERVICE = "SERVICE"
129
- }
124
+ export declare type IdvEventTypes = (typeof IdvEventTypesEnum)[keyof typeof IdvEventTypesEnum];
130
125
 
131
- declare enum IdvEventTypes {
132
- MESSAGE = "MESSAGE",
133
- ERROR = "ERROR"
134
- }
126
+ export declare const IdvEventTypesEnum: {
127
+ readonly MESSAGE: "MESSAGE";
128
+ readonly ERROR: "ERROR";
129
+ };
135
130
 
136
131
  export declare class IdvIntegrationService {
137
132
  /** main commands */
@@ -147,46 +142,28 @@ export declare class IdvIntegrationService {
147
142
  deinitialize(): Promise<DeinitializeCompletion>;
148
143
  /** service commands */
149
144
  setNonce(id: string): void;
150
- set eventListener(callback: (message: IdvMessageEvent_2) => void);
145
+ set eventListener(callback: (message: IdvMessageEvent) => void);
151
146
  set sessionRestoreMode(isEnabled: boolean);
152
147
  get currentSessionId(): string | null;
153
148
  }
154
149
 
155
150
  export declare type IdvMessageEvent = {
156
- target: IdvEventTargets;
157
151
  eventType: IdvEventTypes;
158
152
  module?: string | 'IDV';
159
153
  message?: IdvServiceMessages;
160
- error?: IdvServiceErrors;
161
- details?: any;
162
154
  };
163
155
 
164
- export declare enum IdvModules {
165
- LIVENESS = "LIVENESS",
166
- DOC_READER = "DOC_READER"
167
- }
156
+ export declare const IdvModules: {
157
+ readonly LIVENESS: "LIVENESS";
158
+ readonly DOC_READER: "DOC_READER";
159
+ };
168
160
 
169
- export declare enum IdvServiceErrors {
170
- CONNECT_TO_IDV_ERROR = "CONNECT_TO_IDV_ERROR",
171
- PLAY_WORKFLOW_ERROR = "PLAY_WORKFLOW_ERROR",
172
- SERVICE_NOT_RUNNING_ERROR = "SERVICE_NOT_RUNNING_ERROR",
173
- WASM_ERROR = "WASM_ERROR",
174
- GET_SESSION_STATE_ERROR = "GET_SESSION_STATE_ERROR",
175
- PUSH_DATA_ERROR = "PUSH_DATA_ERROR",
176
- SET_MODULES_ERROR = "SET_MODULES_ERROR"
177
- }
161
+ export declare type IdvModulesType = (typeof IdvModules)[keyof typeof IdvModules];
178
162
 
179
163
  export declare enum IdvServiceMessages {
180
- INITIALIZED = "INITIALIZED",
181
164
  DID_START_SESSION = "DID_START_SESSION",
182
165
  DID_END_SESSION = "DID_END_SESSION",
183
- DID_START_RESTORE_SESSION = "DID_START_RESTORE_SESSION",
184
- READY_TO_PLAY = "READY_TO_PLAY",
185
- CONNECT_TO_IDV = "CONNECT_TO_IDV",
186
- START_SESSION = "START_SESSION",
187
- SHUT_DOWN = "SHUT_DOWN",
188
- CURRENT_STEP = "CURRENT_STEP",
189
- FINAL = "FINAL"
166
+ DID_START_RESTORE_SESSION = "DID_START_RESTORE_SESSION"
190
167
  }
191
168
 
192
169
  export declare class IdvWebComponent extends HTMLElement {
@@ -207,7 +184,7 @@ declare type InitConfig = {
207
184
  };
208
185
  face?: Record<string, any>;
209
186
  };
210
- includedModules: IdvModules[];
187
+ includedModules: IdvModulesType[];
211
188
  };
212
189
 
213
190
  export declare type InitializeCompletion = {