@regulaforensics/idv-capture-web 0.1.83-nightly → 0.1.84-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,66 +1,56 @@
1
- export declare enum ErrorTypes {
2
- WASM_ERROR = "WASM_ERROR"
3
- }
4
-
5
- declare type GetWorkFlowsRequest = {
6
- limit: number;
7
- skip: number;
8
- };
9
-
10
- declare type GetWorkFlowsResult = {
11
- count: number;
12
- items: unknown[];
13
- };
14
-
15
- declare enum IDV_TEMPLATES {
16
- FACE_LIVENESS = "LIVENESS",
17
- INFO = "INFO",
18
- INFO_DETAILS = "INFO_DETAILS",
19
- DOC_READER = "DOC_READER",
20
- STATUS = "STATUS",
21
- PROGRESS = "PROGRESS"
22
- }
23
-
24
1
  export declare enum IdvEventTargets {
25
2
  WEB_COMPONENT = "WEB_COMPONENT",
26
3
  SERVICE = "SERVICE"
27
4
  }
28
5
 
6
+ declare enum IdvEventTypes {
7
+ MESSAGE = "MESSAGE",
8
+ ERROR = "ERROR"
9
+ }
10
+
29
11
  export declare class IdvIntegrationService {
30
- getWorkFlows(params?: GetWorkFlowsRequest): Promise<GetWorkFlowsResult>;
31
- initialize(config: IIdvConfig): void;
12
+ initialize(config: IIdvConfig): Promise<{
13
+ error?: string;
14
+ }>;
32
15
  setNonce(id: string): void;
16
+ getWorkFlows(params?: WorkflowListRequest): Promise<WorkflowListCompletion>;
33
17
  prepareWorkflow({ workfowId }: {
34
18
  workfowId: string;
35
- }): Promise<void>;
36
- startWorkflow(): Promise<void>;
37
- isIdvServiceRunning(): boolean | undefined;
38
- deinitialize(): void;
19
+ }): Promise<PrepareWorkflowCompletion>;
20
+ startWorkflow(): Promise<WorkflowCompetion>;
21
+ deinitialize(): Promise<void>;
39
22
  }
40
23
 
41
24
  export declare type IdvMessageEvent = {
42
- target: 'SERVICE' | 'WEB_COMPONENT';
43
- eventType: 'ERROR' | 'MESSAGE';
44
- module?: IDV_TEMPLATES | 'IDV';
45
- message: any;
25
+ target: IdvEventTargets;
26
+ eventType: IdvEventTypes;
27
+ module?: string | 'IDV';
28
+ message?: IdvServiceMessages;
29
+ error?: IdvServiceErrors;
46
30
  details?: any;
47
31
  };
48
32
 
33
+ declare enum IdvServiceErrors {
34
+ CONNECT_TO_IDV_ERROR = "CONNECT_TO_IDV_ERROR",
35
+ PLAY_WORKFLOW_ERROR = "PLAY_WORKFLOW_ERROR",
36
+ SERVICE_NOT_RUNNING_ERROR = "SERVICE_NOT_RUNNING_ERROR",
37
+ WASM_ERROR = "WASM_ERROR",
38
+ GET_SESSION_STATE_ERROR = "GET_SESSION_STATE_ERROR",
39
+ PUSH_DATA_ERROR = "PUSH_DATA_ERROR",
40
+ SET_MODULES_ERROR = "SET_MODULES_ERROR"
41
+ }
42
+
49
43
  export declare enum IdvServiceMessages {
50
44
  INITIALIZED = "INITIALIZED",
51
45
  READY_TO_PLAY = "READY_TO_PLAY",
52
46
  CONNECT_TO_IDV = "CONNECT_TO_IDV",
53
47
  START_SESSION = "START_SESSION",
54
48
  SHUT_DOWN = "SHUT_DOWN",
55
- WASM_ERROR = "WASM_ERROR",
56
- PLAY_WORKFLOW_ERROR = "PLAY_WORKFLOW_ERROR",
57
- SERVICE_NOT_RUNNING_ERROR = "SERVICE_NOT_RUNNING_ERROR",
58
49
  CURRENT_STEP = "CURRENT_STEP",
59
- GET_SESSION_STATE_ERROR = "GET_SESSION_STATE_ERROR",
60
- PUSH_DATA_ERROR = "PUSH_DATA_ERROR"
50
+ FINAL = "FINAL"
61
51
  }
62
52
 
63
- export declare class IdvWebComponent extends HTMLElement implements IdvWebComponent_2 {
53
+ export declare class IdvWebComponent extends HTMLElement {
64
54
  private _root;
65
55
  private _mounted;
66
56
  private _nonce?;
@@ -73,21 +63,12 @@ export declare class IdvWebComponent extends HTMLElement implements IdvWebCompon
73
63
  disconnectedCallback(): void;
74
64
  }
75
65
 
76
- declare class IdvWebComponent_2 extends HTMLElement {
77
- }
78
-
79
- export declare enum IdvWebComponentMessages {
80
- ELEMENT_VISIBLE = "IDV_VISIBLE",
81
- DOC_READER = "DOC_READER",
82
- LIVENESS = "LIVENESS",
83
- CLOSE_BUTTON_CLICKED = "CLOSE_BUTTON_WAS_CLICKED"
84
- }
85
-
86
66
  declare type IIdvConfig = {
87
67
  connectionConfig: IIdvOptions;
88
68
  modulesConfig: Record<string, any>;
89
- includedModules: string[];
90
- listener: (message: IdvMessageEvent) => void;
69
+ includedModules: any[];
70
+ licenseConfig?: Record<string, any>;
71
+ listener?: (message: IdvMessageEvent) => void;
91
72
  };
92
73
 
93
74
  declare type IIdvOptions = {
@@ -101,4 +82,59 @@ declare type IIdvOptions = {
101
82
  userName: string;
102
83
  };
103
84
 
85
+ declare type PrepareWorkflowCompletion = {
86
+ workflow?: Workflow;
87
+ error?: PrepareWorkflowError;
88
+ };
89
+
90
+ declare enum PrepareWorkflowError {
91
+ CONNECTION_ISSUE = "CONNECTION_ISSUE",
92
+ WORKFLOW_ISSUE = "WORKFLOW_ISSUE",
93
+ INTERNAL_ISSUE = "INTERNAL_ISSUE"
94
+ }
95
+
96
+ declare enum ScenarioError {
97
+ SESSION_ISSUE = "SESSION_ISSUE",
98
+ ALREADY_STARTED = "ALREADY_STARTED",
99
+ NOT_PREPARED = "NOT_PREPARED",
100
+ STEP_ISSUE = "STEP_ISSUE",
101
+ INTERNAL_ISSUE = "INTERNAL_ISSUE"
102
+ }
103
+
104
+ declare type ScenarioResults = {
105
+ status: ScenarioStatus;
106
+ results?: Record<string, any>;
107
+ };
108
+
109
+ declare enum ScenarioStatus {
110
+ FINISHED = "FINISHED",
111
+ CANCELLED = "CANCELLED",
112
+ ERROR = "ERROR"
113
+ }
114
+
115
+ declare type Workflow = {
116
+ id: string;
117
+ currentStep: string;
118
+ steps: Array<any>;
119
+ client: {
120
+ layout: Record<string, any>;
121
+ steps: Array<any>;
122
+ };
123
+ } & Record<string, any>;
124
+
125
+ declare type WorkflowCompetion = {
126
+ results?: ScenarioResults;
127
+ error?: ScenarioError;
128
+ };
129
+
130
+ declare type WorkflowListCompletion = {
131
+ results?: Workflow[];
132
+ error?: PrepareWorkflowError;
133
+ };
134
+
135
+ declare type WorkflowListRequest = {
136
+ limit: number;
137
+ skip: number;
138
+ };
139
+
104
140
  export { }