@regulaforensics/idv-capture-web 4.0.690-rc → 4.0.691-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 +145 -141
- package/dist/main.iife.js +15 -10
- package/dist/main.js +3048 -2422
- package/package.json +6 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import { BaseError } from '../../interfaces-idv/src';
|
|
2
|
-
import { BaseError as BaseError_2 } from '../../../interfaces-idv/src';
|
|
3
|
-
import { BaseModule } from '../../interfaces-idv/src';
|
|
4
1
|
import { CSSResult } from 'lit';
|
|
5
|
-
import { FailedAssets } from '../../interfaces-idv/src';
|
|
6
|
-
import { IdvModuleProps } from '../../interfaces-idv/src';
|
|
7
|
-
import { IdvModuleStaticMethods } from '../../interfaces-idv/src';
|
|
8
2
|
import { LitElement } from 'lit';
|
|
9
|
-
import { ModuleClass } from '../../interfaces-idv/src';
|
|
10
3
|
import { nothing } from 'lit';
|
|
11
|
-
import { PerformType } from '../../../interfaces-idv/src';
|
|
12
|
-
import { PerformType as PerformType_2 } from '../../../../interfaces-idv/src';
|
|
13
|
-
import { registerModule } from '../../interfaces-idv/src';
|
|
14
4
|
import { TemplateResult } from 'lit-html';
|
|
15
5
|
|
|
16
6
|
export declare type ApiKeyConnectionConfig = {
|
|
@@ -20,13 +10,18 @@ export declare type ApiKeyConnectionConfig = {
|
|
|
20
10
|
httpTimeoutMs?: number;
|
|
21
11
|
};
|
|
22
12
|
|
|
13
|
+
declare type ApiKeyConnectResult = {
|
|
14
|
+
authToken: string;
|
|
15
|
+
workflows: string[];
|
|
16
|
+
};
|
|
17
|
+
|
|
23
18
|
declare type AuthTokenStoreData = {
|
|
24
19
|
apiKey: string;
|
|
25
20
|
authToken: string;
|
|
26
21
|
tokenExpiresAt: number;
|
|
27
22
|
};
|
|
28
23
|
|
|
29
|
-
declare class BaseConfigureError extends
|
|
24
|
+
declare class BaseConfigureError extends BaseError {
|
|
30
25
|
private static readonly MODULE;
|
|
31
26
|
private static readonly ERROR_ENUM_NAME;
|
|
32
27
|
private static readonly SHORT_CODE;
|
|
@@ -34,11 +29,11 @@ declare class BaseConfigureError extends BaseError_2 {
|
|
|
34
29
|
errorCode: ConfigureError;
|
|
35
30
|
message?: string;
|
|
36
31
|
underlyingError?: string;
|
|
37
|
-
underlyingBaseError?:
|
|
32
|
+
underlyingBaseError?: BaseError;
|
|
38
33
|
});
|
|
39
34
|
}
|
|
40
35
|
|
|
41
|
-
declare class BaseConnectionError extends
|
|
36
|
+
declare class BaseConnectionError extends BaseError {
|
|
42
37
|
private static readonly MODULE;
|
|
43
38
|
private static readonly ERROR_ENUM_NAME;
|
|
44
39
|
private static readonly SHORT_CODE;
|
|
@@ -46,11 +41,11 @@ declare class BaseConnectionError extends BaseError_2 {
|
|
|
46
41
|
errorCode: ConnectionError;
|
|
47
42
|
message?: string;
|
|
48
43
|
underlyingError?: string;
|
|
49
|
-
underlyingBaseError?:
|
|
44
|
+
underlyingBaseError?: BaseError;
|
|
50
45
|
});
|
|
51
46
|
}
|
|
52
47
|
|
|
53
|
-
declare class BaseDeinitializationError extends
|
|
48
|
+
declare class BaseDeinitializationError extends BaseError {
|
|
54
49
|
private static readonly MODULE;
|
|
55
50
|
private static readonly ERROR_ENUM_NAME;
|
|
56
51
|
private static readonly SHORT_CODE;
|
|
@@ -58,13 +53,39 @@ declare class BaseDeinitializationError extends BaseError_2 {
|
|
|
58
53
|
errorCode: DeinitializationError;
|
|
59
54
|
message?: string;
|
|
60
55
|
underlyingError?: string;
|
|
61
|
-
underlyingBaseError?:
|
|
56
|
+
underlyingBaseError?: BaseError;
|
|
62
57
|
});
|
|
63
58
|
}
|
|
64
59
|
|
|
65
|
-
export
|
|
60
|
+
export declare class BaseError {
|
|
61
|
+
errorCode: number | string;
|
|
62
|
+
errorCodeKey: string;
|
|
63
|
+
message?: string;
|
|
64
|
+
underlyingError?: string;
|
|
65
|
+
underlyingBaseError?: BaseError;
|
|
66
|
+
domain?: string;
|
|
67
|
+
module: string;
|
|
68
|
+
errorEnumName: string;
|
|
69
|
+
shortDomainCode: string;
|
|
70
|
+
constructor({ errorCode, errorCodeKey, message, underlyingError, underlyingBaseError, domain, module, errorEnumName, shortDomainCode, }: {
|
|
71
|
+
errorCode: number | string;
|
|
72
|
+
errorCodeKey: string;
|
|
73
|
+
module: string;
|
|
74
|
+
message?: string;
|
|
75
|
+
underlyingError?: string;
|
|
76
|
+
underlyingBaseError?: BaseError;
|
|
77
|
+
domain?: string;
|
|
78
|
+
errorEnumName: string;
|
|
79
|
+
shortDomainCode: string;
|
|
80
|
+
});
|
|
81
|
+
static getErrorKey<T extends Record<string, any>>(errorCode: number | string, errorEnum: T): string;
|
|
82
|
+
get lastUnderlyingError(): string | undefined;
|
|
83
|
+
toObject(): Record<string, any>;
|
|
84
|
+
get shortChain(): string;
|
|
85
|
+
get fullChain(): string;
|
|
86
|
+
}
|
|
66
87
|
|
|
67
|
-
declare class BaseInitializationError extends
|
|
88
|
+
declare class BaseInitializationError extends BaseError {
|
|
68
89
|
private static readonly MODULE;
|
|
69
90
|
private static readonly ERROR_ENUM_NAME;
|
|
70
91
|
private static readonly SHORT_CODE;
|
|
@@ -72,11 +93,11 @@ declare class BaseInitializationError extends BaseError_2 {
|
|
|
72
93
|
errorCode: InitializeError;
|
|
73
94
|
message?: string;
|
|
74
95
|
underlyingError?: string;
|
|
75
|
-
underlyingBaseError?:
|
|
96
|
+
underlyingBaseError?: BaseError;
|
|
76
97
|
});
|
|
77
98
|
}
|
|
78
99
|
|
|
79
|
-
export declare class BaseLoginError extends
|
|
100
|
+
export declare class BaseLoginError extends BaseError {
|
|
80
101
|
private static readonly MODULE;
|
|
81
102
|
private static readonly ERROR_ENUM_NAME;
|
|
82
103
|
private static readonly SHORT_CODE;
|
|
@@ -84,13 +105,16 @@ export declare class BaseLoginError extends BaseError_2 {
|
|
|
84
105
|
errorCode: LoginError;
|
|
85
106
|
message?: string;
|
|
86
107
|
underlyingError?: string;
|
|
87
|
-
underlyingBaseError?:
|
|
108
|
+
underlyingBaseError?: BaseError;
|
|
88
109
|
});
|
|
89
110
|
}
|
|
90
111
|
|
|
91
|
-
export
|
|
112
|
+
export declare abstract class BaseModule<TModuleProps = unknown, TModulesConfig = unknown> extends HTMLElement {
|
|
113
|
+
abstract props: IdvModuleProps<TModuleProps, TModulesConfig> | null;
|
|
114
|
+
abstract setProps(config: IdvModuleProps<TModuleProps, TModulesConfig>): void;
|
|
115
|
+
}
|
|
92
116
|
|
|
93
|
-
declare class BasePrepareWorkflowError extends
|
|
117
|
+
declare class BasePrepareWorkflowError extends BaseError {
|
|
94
118
|
private static readonly MODULE;
|
|
95
119
|
private static readonly ERROR_ENUM_NAME;
|
|
96
120
|
private static readonly SHORT_CODE;
|
|
@@ -98,11 +122,11 @@ declare class BasePrepareWorkflowError extends BaseError_2 {
|
|
|
98
122
|
errorCode: PrepareWorkflowError;
|
|
99
123
|
message?: string;
|
|
100
124
|
underlyingError?: string;
|
|
101
|
-
underlyingBaseError?:
|
|
125
|
+
underlyingBaseError?: BaseError;
|
|
102
126
|
});
|
|
103
127
|
}
|
|
104
128
|
|
|
105
|
-
declare class BaseTokenInitializationError extends
|
|
129
|
+
declare class BaseTokenInitializationError extends BaseError {
|
|
106
130
|
private static readonly MODULE;
|
|
107
131
|
private static readonly ERROR_ENUM_NAME;
|
|
108
132
|
private static readonly SHORT_CODE;
|
|
@@ -110,11 +134,11 @@ declare class BaseTokenInitializationError extends BaseError_2 {
|
|
|
110
134
|
errorCode: TokenInitializeError;
|
|
111
135
|
message?: string;
|
|
112
136
|
underlyingError?: string;
|
|
113
|
-
underlyingBaseError?:
|
|
137
|
+
underlyingBaseError?: BaseError;
|
|
114
138
|
});
|
|
115
139
|
}
|
|
116
140
|
|
|
117
|
-
declare class BaseWorkflowError extends
|
|
141
|
+
declare class BaseWorkflowError extends BaseError {
|
|
118
142
|
private static readonly MODULE;
|
|
119
143
|
private static readonly ERROR_ENUM_NAME;
|
|
120
144
|
private static readonly SHORT_CODE;
|
|
@@ -122,7 +146,7 @@ declare class BaseWorkflowError extends BaseError_2 {
|
|
|
122
146
|
errorCode: WorkflowError;
|
|
123
147
|
message?: string;
|
|
124
148
|
underlyingError?: string;
|
|
125
|
-
underlyingBaseError?:
|
|
149
|
+
underlyingBaseError?: BaseError;
|
|
126
150
|
});
|
|
127
151
|
}
|
|
128
152
|
|
|
@@ -165,6 +189,10 @@ export declare enum ConnectionError {
|
|
|
165
189
|
DECODING_FAILED = 2
|
|
166
190
|
}
|
|
167
191
|
|
|
192
|
+
declare type ConnectResult = {
|
|
193
|
+
workflows: string[];
|
|
194
|
+
};
|
|
195
|
+
|
|
168
196
|
declare type ContinueSessionResults = {
|
|
169
197
|
error: BaseWorkflowError;
|
|
170
198
|
} | {
|
|
@@ -206,11 +234,6 @@ declare type CurrentScreenConfig = {
|
|
|
206
234
|
preloadAssetsRequired?: boolean;
|
|
207
235
|
} & Record<string, any>;
|
|
208
236
|
|
|
209
|
-
declare type DataOrError<T extends object, E = BaseWorkflowError> = T | {
|
|
210
|
-
error?: E;
|
|
211
|
-
shouldRetry?: boolean;
|
|
212
|
-
};
|
|
213
|
-
|
|
214
237
|
export declare enum DeinitializationError {
|
|
215
238
|
INITIALIZATION_REQUIRED = 0,
|
|
216
239
|
SCENARIO_IN_PROGRESS = 3
|
|
@@ -220,11 +243,22 @@ export declare type DeinitializeCompletion = {
|
|
|
220
243
|
error?: BaseDeinitializationError;
|
|
221
244
|
};
|
|
222
245
|
|
|
246
|
+
declare type FailedAssets = {
|
|
247
|
+
imageURL: Set<string>;
|
|
248
|
+
base64: Set<string>;
|
|
249
|
+
blockingAssets: Set<string>;
|
|
250
|
+
};
|
|
251
|
+
|
|
223
252
|
declare type FetchErrorResult = {
|
|
224
253
|
code: FetchResultCode.HTTP_ISSUE | FetchResultCode.PROVIDER_ERROR | FetchResultCode.DECODING_FAILED;
|
|
225
254
|
data: FetchState;
|
|
226
255
|
};
|
|
227
256
|
|
|
257
|
+
declare type FetchResult<T> = {
|
|
258
|
+
code: FetchResultCode.SUCCESS;
|
|
259
|
+
data: T;
|
|
260
|
+
} | FetchErrorResult;
|
|
261
|
+
|
|
228
262
|
declare enum FetchResultCode {
|
|
229
263
|
SUCCESS = 0,
|
|
230
264
|
HTTP_ISSUE = 4,
|
|
@@ -249,6 +283,7 @@ declare const IDV_MODULE_NAME = "IDV";
|
|
|
249
283
|
declare type IdvBusinessLogicControllerProps = {
|
|
250
284
|
connectByUserPass: (config: ConnectionConfigCore) => Promise<{
|
|
251
285
|
error?: BaseConnectionError;
|
|
286
|
+
workflows?: string[];
|
|
252
287
|
}>;
|
|
253
288
|
connectByApiKey: (config: ConnectionByApiKeyConfigCore) => Promise<{
|
|
254
289
|
error?: BaseTokenInitializationError;
|
|
@@ -297,7 +332,12 @@ declare type IdvBusinessLogicControllerProps = {
|
|
|
297
332
|
cancel: () => void;
|
|
298
333
|
};
|
|
299
334
|
_stepSocketListenerWhenStepIsRunning: (isStepRunning: boolean) => void;
|
|
300
|
-
_getSessionStateNextStepConditionResult: () => Promise<
|
|
335
|
+
_getSessionStateNextStepConditionResult: () => Promise<{
|
|
336
|
+
session: SessionModel;
|
|
337
|
+
} | {
|
|
338
|
+
error: BaseWorkflowError;
|
|
339
|
+
shouldRetry: boolean;
|
|
340
|
+
}>;
|
|
301
341
|
_findStepById: (stepId: string) => WorkflowStep | null;
|
|
302
342
|
pushStepWaitNextStepAndSet: (data: Record<string, any>, type?: PerformType) => void;
|
|
303
343
|
setNextStep: (props: {
|
|
@@ -316,10 +356,11 @@ declare type IdvBusinessLogicControllerProps = {
|
|
|
316
356
|
setFinalWaitingUi: (isWaitingUi: boolean) => void;
|
|
317
357
|
_setFinalStepAndStopProcess: (stepId?: string) => void;
|
|
318
358
|
_setIamAuthCodeAndStopProcess: (step: WorkflowStep) => void;
|
|
359
|
+
_redirectUsingFormSubmit: (url: string, authorizationToken: string) => void;
|
|
360
|
+
_redirectAndStopProcess: (step: WorkflowStep) => Promise<void>;
|
|
319
361
|
resetSession: () => void;
|
|
320
362
|
resetFetchService: () => void;
|
|
321
|
-
|
|
322
|
-
_validateSession: (session?: SessionData) => SessionModel | {
|
|
363
|
+
_validateSession: (session: unknown) => SessionModel | {
|
|
323
364
|
validationErrorMessage: string;
|
|
324
365
|
};
|
|
325
366
|
};
|
|
@@ -344,121 +385,62 @@ declare class IdvFetchService {
|
|
|
344
385
|
private _setConnectionToken;
|
|
345
386
|
private _getOriginFromConfig;
|
|
346
387
|
private _getOriginFromUrl;
|
|
347
|
-
private _getSessionIdFromUrl;
|
|
348
388
|
private _getExpiresAtFromTtl;
|
|
349
389
|
private _getAuthorizationHeaderFromConnectionToken;
|
|
350
390
|
private _getAuthorizationHeaderFromBasicToken;
|
|
351
391
|
private _getAuthorizationHeaderFromAuthToken;
|
|
352
392
|
private _getApiKeyAuthTokenFromLs;
|
|
353
393
|
private _getApiKeyAuthTokenFromHeader;
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
deviceDescriptor: {
|
|
357
|
-
ttl: number;
|
|
358
|
-
};
|
|
359
|
-
}, isFromSession: boolean): Promise<{
|
|
360
|
-
code: FetchResultCode.SUCCESS;
|
|
361
|
-
data: {
|
|
362
|
-
token: string;
|
|
363
|
-
expiresAt: number;
|
|
364
|
-
};
|
|
365
|
-
} | FetchErrorResult>;
|
|
366
|
-
private _getAuthorizationSearchParam;
|
|
394
|
+
private _requestEphemeralAuthToken;
|
|
395
|
+
private _getValidApiKeyAuthToken;
|
|
367
396
|
private _getResponseTextFromBadResponse;
|
|
368
397
|
private _applyHttpTimeout;
|
|
369
398
|
private _getRequestSignal;
|
|
370
399
|
private _httpFetch;
|
|
400
|
+
private _fetchAndHandleResponse;
|
|
371
401
|
private _fetchPing;
|
|
372
402
|
private _fetchMe;
|
|
373
403
|
private _fetchConnection;
|
|
374
404
|
private _fetchEphemeral;
|
|
375
|
-
private _fetchSessionByWorkflowId;
|
|
376
405
|
private _fetchSessionState;
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
private _fetchSessionLogs;
|
|
381
|
-
private _fetchStartIamAuth;
|
|
382
|
-
connectByUserPass(config: ConnectionConfigCore): Promise<{
|
|
383
|
-
code: FetchResultCode.SUCCESS;
|
|
384
|
-
data: {
|
|
385
|
-
workflows: string[];
|
|
386
|
-
};
|
|
387
|
-
} | FetchErrorResult>;
|
|
388
|
-
connectByApiKey(config: ConnectionByApiKeyConfigCore, isFromSession: boolean): Promise<{
|
|
389
|
-
code: FetchResultCode.SUCCESS;
|
|
390
|
-
data: {
|
|
391
|
-
authToken: string;
|
|
392
|
-
workflows: string[];
|
|
393
|
-
};
|
|
394
|
-
} | FetchErrorResult>;
|
|
395
|
-
connectByUrl(urlWithToken: string): Promise<{
|
|
396
|
-
code: FetchResultCode.SUCCESS;
|
|
397
|
-
data: {
|
|
398
|
-
workflows: string[];
|
|
399
|
-
};
|
|
400
|
-
} | FetchErrorResult>;
|
|
406
|
+
connectByUserPass(config: ConnectionConfigCore): Promise<FetchResult<ConnectResult>>;
|
|
407
|
+
connectByApiKey(config: ConnectionByApiKeyConfigCore, isFromSession: boolean): Promise<FetchResult<ApiKeyConnectResult>>;
|
|
408
|
+
connectByUrl(urlWithToken: string): Promise<FetchResult<ConnectResult>>;
|
|
401
409
|
getConnectionToken(isFromSession: boolean): Promise<string>;
|
|
402
410
|
startSession({ workflowId, locale, metadata, location, }: {
|
|
403
411
|
workflowId: string;
|
|
404
412
|
locale: string;
|
|
405
413
|
metadata?: Record<string, unknown>;
|
|
406
414
|
location?: GeoCoords | null;
|
|
407
|
-
}): Promise<
|
|
408
|
-
|
|
409
|
-
data: SessionData;
|
|
410
|
-
} | FetchErrorResult>;
|
|
411
|
-
continueSession({ sessionId, locale, }: {
|
|
415
|
+
}): Promise<FetchResult<unknown>>;
|
|
416
|
+
continueSession({ sessionId, locale }: {
|
|
412
417
|
sessionId: string;
|
|
413
418
|
locale: string;
|
|
414
|
-
}): Promise<
|
|
415
|
-
code: FetchResultCode.SUCCESS;
|
|
416
|
-
data: SessionData;
|
|
417
|
-
} | FetchErrorResult>;
|
|
419
|
+
}): Promise<FetchResult<unknown>>;
|
|
418
420
|
listWorkflows(params?: {
|
|
419
421
|
limit: number;
|
|
420
422
|
skip: number;
|
|
421
|
-
}): Promise<
|
|
422
|
-
|
|
423
|
-
data: {
|
|
424
|
-
count: number;
|
|
425
|
-
items: Workflow[];
|
|
426
|
-
};
|
|
427
|
-
} | FetchErrorResult>;
|
|
428
|
-
getWorkflow(workflowId: string, sessionIdFromUrl?: string | null, locale?: string): Promise<{
|
|
429
|
-
code: FetchResultCode.SUCCESS;
|
|
430
|
-
data: Workflow;
|
|
431
|
-
} | FetchErrorResult>;
|
|
423
|
+
}): Promise<FetchResult<WorkflowsData>>;
|
|
424
|
+
getWorkflow(workflowId: string, sessionIdFromUrl?: string | null, locale?: string): Promise<FetchResult<unknown>>;
|
|
432
425
|
pushData({ sessionId, stepId, data, type, }: {
|
|
433
426
|
sessionId: string;
|
|
434
427
|
stepId: string;
|
|
435
428
|
data: any;
|
|
436
429
|
type?: PerformType;
|
|
437
|
-
}): Promise<
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
} | FetchErrorResult>;
|
|
441
|
-
getSessionState(sessionId: string, locale?: string): Promise<{
|
|
442
|
-
code: FetchResultCode.SUCCESS;
|
|
443
|
-
data: SessionData;
|
|
444
|
-
} | FetchErrorResult>;
|
|
445
|
-
pushLogs(sessionId: string, pushLogsParams: PushLogsParams): Promise<Record<string, unknown>>;
|
|
430
|
+
}): Promise<FetchResult<Record<string, unknown>>>;
|
|
431
|
+
getSessionState(sessionId: string, locale?: string): Promise<FetchResult<unknown>>;
|
|
432
|
+
pushLogs(sessionId: string, pushLogsParams: PushLogsParams): Promise<FetchResult<Record<string, unknown>>>;
|
|
446
433
|
startIamAuth({ applicationId, baseUrl, metadata, locale, httpTimeoutMs, }: {
|
|
447
434
|
applicationId: string;
|
|
448
435
|
baseUrl: string;
|
|
449
436
|
metadata?: Record<string, unknown>;
|
|
450
437
|
locale?: string;
|
|
451
438
|
httpTimeoutMs?: number;
|
|
452
|
-
}): Promise<Record<string, unknown
|
|
453
|
-
private
|
|
454
|
-
private
|
|
439
|
+
}): Promise<FetchResult<Record<string, unknown>>>;
|
|
440
|
+
private _startUpload;
|
|
441
|
+
private _uploadFileChunk;
|
|
455
442
|
private _uploadFileInChunks;
|
|
456
|
-
uploadFileToTemp(file: File, onProgress: (sentBytes: number, total: number) => void): Promise<
|
|
457
|
-
code: FetchResultCode.SUCCESS;
|
|
458
|
-
data: {
|
|
459
|
-
tempFileId: string;
|
|
460
|
-
};
|
|
461
|
-
} | FetchErrorResult>;
|
|
443
|
+
uploadFileToTemp(file: File, onProgress: (sentBytes: number, total: number) => void): Promise<FetchResult<TempFileIdResult>>;
|
|
462
444
|
abortRequest(): void;
|
|
463
445
|
}
|
|
464
446
|
|
|
@@ -527,13 +509,15 @@ declare enum IdvLogLevelConfigEnum {
|
|
|
527
509
|
INFO = "INFO"
|
|
528
510
|
}
|
|
529
511
|
|
|
530
|
-
declare
|
|
531
|
-
DEBUG
|
|
532
|
-
ERROR
|
|
533
|
-
INFO
|
|
534
|
-
WARNING
|
|
535
|
-
CRITICAL
|
|
536
|
-
}
|
|
512
|
+
export declare const IdvLogLevelEnum: {
|
|
513
|
+
readonly DEBUG: "DEBUG";
|
|
514
|
+
readonly ERROR: "ERROR";
|
|
515
|
+
readonly INFO: "INFO";
|
|
516
|
+
readonly WARNING: "WARNING";
|
|
517
|
+
readonly CRITICAL: "CRITICAL";
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
export declare type IdvLogLevelEnum = (typeof IdvLogLevelEnum)[keyof typeof IdvLogLevelEnum];
|
|
537
521
|
|
|
538
522
|
export declare type IdvMessageEvent = {
|
|
539
523
|
/** @deprecated Prefer `logLevel` and `message`; scheduled for removal. */
|
|
@@ -543,9 +527,24 @@ export declare type IdvMessageEvent = {
|
|
|
543
527
|
message?: IdvServiceMessages | string;
|
|
544
528
|
};
|
|
545
529
|
|
|
546
|
-
export
|
|
530
|
+
export declare type IdvModuleProps<TModuleProps, TModulesConfig> = {
|
|
531
|
+
isProcessing?: (isProcessing: boolean) => void;
|
|
532
|
+
moduleProps: TModuleProps;
|
|
533
|
+
modulesConfig?: TModulesConfig;
|
|
534
|
+
perform: (data: any, type?: PerformType) => void;
|
|
535
|
+
idvEventListener: (module: string, data: any, logLevel?: 'INFO' | 'DEBUG') => void;
|
|
536
|
+
nonce?: string;
|
|
537
|
+
};
|
|
547
538
|
|
|
548
|
-
export
|
|
539
|
+
export declare interface IdvModuleStaticMethods {
|
|
540
|
+
displayName: string;
|
|
541
|
+
isReady(): boolean;
|
|
542
|
+
getSupportedTemplates(): string[];
|
|
543
|
+
initialize(modulesConfig: Record<string, unknown>): void;
|
|
544
|
+
deinitialize(): void;
|
|
545
|
+
getIdentifier(): string;
|
|
546
|
+
cancel(): void;
|
|
547
|
+
}
|
|
549
548
|
|
|
550
549
|
export declare enum IdvServiceMessages {
|
|
551
550
|
DID_START_SESSION = "DID_START_SESSION",
|
|
@@ -616,9 +615,9 @@ export declare class IdvWebComponent extends LitElement {
|
|
|
616
615
|
modulesConfig: Record<string, any>;
|
|
617
616
|
storeNonce: string | undefined;
|
|
618
617
|
connectedCallback(): void;
|
|
619
|
-
_listenerFromModule: (module: string, data: any) => void;
|
|
618
|
+
_listenerFromModule: (module: string, data: any, logLevel?: IdvLogLevelEnum) => void;
|
|
620
619
|
_isProcessingCallback: (isProcessing: boolean) => void;
|
|
621
|
-
_performFromModule: (data: any, type?:
|
|
620
|
+
_performFromModule: (data: any, type?: PerformType) => void;
|
|
622
621
|
_processingScreen(): HTMLElement | TemplateResult<1>;
|
|
623
622
|
private _isTheSameModuleAndScreen;
|
|
624
623
|
_currentScreen(): HTMLElement | typeof nothing;
|
|
@@ -673,7 +672,14 @@ export declare enum LoginError {
|
|
|
673
672
|
AUTH_FAILURE = 7
|
|
674
673
|
}
|
|
675
674
|
|
|
676
|
-
export
|
|
675
|
+
export declare type ModuleClass<TModuleProps = unknown, TModulesConfig = unknown> = IdvModuleStaticMethods & (new (...args: any[]) => BaseModule<TModuleProps, TModulesConfig>);
|
|
676
|
+
|
|
677
|
+
declare type PerformType = (typeof PerformTypes)[keyof typeof PerformTypes] | undefined;
|
|
678
|
+
|
|
679
|
+
declare const PerformTypes: {
|
|
680
|
+
readonly FORM: "form";
|
|
681
|
+
readonly DATA: "data";
|
|
682
|
+
};
|
|
677
683
|
|
|
678
684
|
export declare type PrepareWorkflowCompletion = {
|
|
679
685
|
workflow?: Workflow;
|
|
@@ -713,7 +719,7 @@ declare type PushLogsParams = {
|
|
|
713
719
|
};
|
|
714
720
|
};
|
|
715
721
|
|
|
716
|
-
export
|
|
722
|
+
export declare function registerModule<TModuleProps = unknown, TModulesConfig = unknown>(name: string, ModuleClass: ModuleClass<TModuleProps, TModulesConfig>): void;
|
|
717
723
|
|
|
718
724
|
declare type SessionData = {
|
|
719
725
|
id: string;
|
|
@@ -722,6 +728,7 @@ declare type SessionData = {
|
|
|
722
728
|
properties: SessionPropertiesItem[];
|
|
723
729
|
isProcessingFiles: boolean;
|
|
724
730
|
locale?: string;
|
|
731
|
+
connectionQualityAssessment?: unknown;
|
|
725
732
|
};
|
|
726
733
|
|
|
727
734
|
export declare enum SessionError {
|
|
@@ -740,13 +747,13 @@ declare class SessionModel implements SessionData {
|
|
|
740
747
|
properties: PropertyModel[];
|
|
741
748
|
isProcessingFiles: boolean;
|
|
742
749
|
locale?: string;
|
|
750
|
+
connectionQualityAssessment?: unknown;
|
|
743
751
|
isErrorFiles?: boolean;
|
|
744
752
|
shortId?: string;
|
|
745
753
|
deviceId?: string;
|
|
746
754
|
deviceMetadata?: Record<string, unknown>;
|
|
747
755
|
metadata?: Record<string, unknown>;
|
|
748
|
-
static
|
|
749
|
-
static fromPlain: (input?: SessionData) => SessionModel | {
|
|
756
|
+
static fromPlain: (input: unknown) => SessionModel | {
|
|
750
757
|
validationErrorMessage: string;
|
|
751
758
|
};
|
|
752
759
|
}
|
|
@@ -799,6 +806,10 @@ export declare type StartWorkflowConfig = {
|
|
|
799
806
|
locale?: string;
|
|
800
807
|
};
|
|
801
808
|
|
|
809
|
+
declare type TempFileIdResult = {
|
|
810
|
+
tempFileId: string;
|
|
811
|
+
};
|
|
812
|
+
|
|
802
813
|
export declare type TokenConfigureCompletion = {
|
|
803
814
|
workflows: string[];
|
|
804
815
|
error?: BaseTokenInitializationError;
|
|
@@ -813,17 +824,6 @@ declare enum TokenInitializeError {
|
|
|
813
824
|
WORKFLOW_ISSUE = 1
|
|
814
825
|
}
|
|
815
826
|
|
|
816
|
-
declare type WebSocketDecodedSessionMessage = {
|
|
817
|
-
eventType: string;
|
|
818
|
-
options?: {
|
|
819
|
-
session?: SessionData;
|
|
820
|
-
};
|
|
821
|
-
error?: {
|
|
822
|
-
code: number;
|
|
823
|
-
message: string;
|
|
824
|
-
};
|
|
825
|
-
};
|
|
826
|
-
|
|
827
827
|
declare type Workflow = {
|
|
828
828
|
id: string;
|
|
829
829
|
logging?: WorkflowLogging | null;
|
|
@@ -892,8 +892,7 @@ declare class WorkflowModel implements Workflow {
|
|
|
892
892
|
metadata?: Record<any, any>;
|
|
893
893
|
sessionUpdateTimeout?: number;
|
|
894
894
|
trackLocation?: boolean;
|
|
895
|
-
static
|
|
896
|
-
static fromPlain: (input: Workflow) => WorkflowModel | {
|
|
895
|
+
static fromPlain: (input: unknown) => WorkflowModel | {
|
|
897
896
|
validationErrorMessage: string;
|
|
898
897
|
};
|
|
899
898
|
}
|
|
@@ -913,6 +912,11 @@ declare type WorkflowResult = {
|
|
|
913
912
|
};
|
|
914
913
|
} & Record<string, any>;
|
|
915
914
|
|
|
915
|
+
declare type WorkflowsData = {
|
|
916
|
+
count: number;
|
|
917
|
+
items: Workflow[];
|
|
918
|
+
};
|
|
919
|
+
|
|
916
920
|
declare type WorkflowStep = {
|
|
917
921
|
type: string;
|
|
918
922
|
id: string;
|