@regulaforensics/idv-capture-web 3.10.597-rc → 3.10.598-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 +85 -84
- package/dist/main.iife.js +13 -32
- package/dist/main.js +5063 -7363
- package/package.json +5 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
import { BaseError } from '../../interfaces-idv/src';
|
|
2
|
+
import { BaseError as BaseError_2 } from '../../../interfaces-idv/src';
|
|
3
|
+
import { BaseModule } from '../../interfaces-idv/src';
|
|
1
4
|
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';
|
|
2
8
|
import { LitElement } from 'lit';
|
|
9
|
+
import { ModuleClass } from '../../interfaces-idv/src';
|
|
3
10
|
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';
|
|
4
14
|
import { TemplateResult } from 'lit-html';
|
|
5
15
|
|
|
6
16
|
export declare type ApiKeyConnectionConfig = {
|
|
7
17
|
baseUrl: string;
|
|
8
18
|
apiKey: string;
|
|
9
19
|
ttl?: number;
|
|
20
|
+
httpTimeoutMs?: number;
|
|
10
21
|
};
|
|
11
22
|
|
|
12
23
|
declare type AuthTokenStoreData = {
|
|
@@ -15,7 +26,7 @@ declare type AuthTokenStoreData = {
|
|
|
15
26
|
tokenExpiresAt: number;
|
|
16
27
|
};
|
|
17
28
|
|
|
18
|
-
declare class BaseConfigureError extends
|
|
29
|
+
declare class BaseConfigureError extends BaseError_2 {
|
|
19
30
|
private static readonly MODULE;
|
|
20
31
|
private static readonly ERROR_ENUM_NAME;
|
|
21
32
|
private static readonly SHORT_CODE;
|
|
@@ -23,11 +34,11 @@ declare class BaseConfigureError extends BaseError {
|
|
|
23
34
|
errorCode: ConfigureError;
|
|
24
35
|
message?: string;
|
|
25
36
|
underlyingError?: string;
|
|
26
|
-
underlyingBaseError?:
|
|
37
|
+
underlyingBaseError?: BaseError_2;
|
|
27
38
|
});
|
|
28
39
|
}
|
|
29
40
|
|
|
30
|
-
declare class BaseConnectionError extends
|
|
41
|
+
declare class BaseConnectionError extends BaseError_2 {
|
|
31
42
|
private static readonly MODULE;
|
|
32
43
|
private static readonly ERROR_ENUM_NAME;
|
|
33
44
|
private static readonly SHORT_CODE;
|
|
@@ -35,11 +46,11 @@ declare class BaseConnectionError extends BaseError {
|
|
|
35
46
|
errorCode: ConnectionError;
|
|
36
47
|
message?: string;
|
|
37
48
|
underlyingError?: string;
|
|
38
|
-
underlyingBaseError?:
|
|
49
|
+
underlyingBaseError?: BaseError_2;
|
|
39
50
|
});
|
|
40
51
|
}
|
|
41
52
|
|
|
42
|
-
declare class BaseDeinitializationError extends
|
|
53
|
+
declare class BaseDeinitializationError extends BaseError_2 {
|
|
43
54
|
private static readonly MODULE;
|
|
44
55
|
private static readonly ERROR_ENUM_NAME;
|
|
45
56
|
private static readonly SHORT_CODE;
|
|
@@ -47,39 +58,13 @@ declare class BaseDeinitializationError extends BaseError {
|
|
|
47
58
|
errorCode: DeinitializationError;
|
|
48
59
|
message?: string;
|
|
49
60
|
underlyingError?: string;
|
|
50
|
-
underlyingBaseError?:
|
|
61
|
+
underlyingBaseError?: BaseError_2;
|
|
51
62
|
});
|
|
52
63
|
}
|
|
53
64
|
|
|
54
|
-
export
|
|
55
|
-
errorCode: number | string;
|
|
56
|
-
errorCodeKey: string;
|
|
57
|
-
message?: string;
|
|
58
|
-
underlyingError?: string;
|
|
59
|
-
underlyingBaseError?: BaseError;
|
|
60
|
-
domain?: string;
|
|
61
|
-
module: string;
|
|
62
|
-
errorEnumName: string;
|
|
63
|
-
shortDomainCode: string;
|
|
64
|
-
constructor({ errorCode, errorCodeKey, message, underlyingError, underlyingBaseError, domain, module, errorEnumName, shortDomainCode, }: {
|
|
65
|
-
errorCode: number | string;
|
|
66
|
-
errorCodeKey: string;
|
|
67
|
-
module: string;
|
|
68
|
-
message?: string;
|
|
69
|
-
underlyingError?: string;
|
|
70
|
-
underlyingBaseError?: BaseError;
|
|
71
|
-
domain?: string;
|
|
72
|
-
errorEnumName: string;
|
|
73
|
-
shortDomainCode: string;
|
|
74
|
-
});
|
|
75
|
-
static getErrorKey<T extends Record<string, any>>(errorCode: number | string, errorEnum: T): string;
|
|
76
|
-
get lastUnderlyingError(): string | undefined;
|
|
77
|
-
toObject(): Record<string, any>;
|
|
78
|
-
get shortChain(): string;
|
|
79
|
-
get fullChain(): string;
|
|
80
|
-
}
|
|
65
|
+
export { BaseError }
|
|
81
66
|
|
|
82
|
-
declare class BaseInitializationError extends
|
|
67
|
+
declare class BaseInitializationError extends BaseError_2 {
|
|
83
68
|
private static readonly MODULE;
|
|
84
69
|
private static readonly ERROR_ENUM_NAME;
|
|
85
70
|
private static readonly SHORT_CODE;
|
|
@@ -87,11 +72,11 @@ declare class BaseInitializationError extends BaseError {
|
|
|
87
72
|
errorCode: InitializeError;
|
|
88
73
|
message?: string;
|
|
89
74
|
underlyingError?: string;
|
|
90
|
-
underlyingBaseError?:
|
|
75
|
+
underlyingBaseError?: BaseError_2;
|
|
91
76
|
});
|
|
92
77
|
}
|
|
93
78
|
|
|
94
|
-
export declare class BaseLoginError extends
|
|
79
|
+
export declare class BaseLoginError extends BaseError_2 {
|
|
95
80
|
private static readonly MODULE;
|
|
96
81
|
private static readonly ERROR_ENUM_NAME;
|
|
97
82
|
private static readonly SHORT_CODE;
|
|
@@ -99,16 +84,13 @@ export declare class BaseLoginError extends BaseError {
|
|
|
99
84
|
errorCode: LoginError;
|
|
100
85
|
message?: string;
|
|
101
86
|
underlyingError?: string;
|
|
102
|
-
underlyingBaseError?:
|
|
87
|
+
underlyingBaseError?: BaseError_2;
|
|
103
88
|
});
|
|
104
89
|
}
|
|
105
90
|
|
|
106
|
-
export
|
|
107
|
-
abstract props: IdvModuleProps<TModuleProps, TModulesConfig> | null;
|
|
108
|
-
abstract setProps(config: IdvModuleProps<TModuleProps, TModulesConfig>): void;
|
|
109
|
-
}
|
|
91
|
+
export { BaseModule }
|
|
110
92
|
|
|
111
|
-
declare class BasePrepareWorkflowError extends
|
|
93
|
+
declare class BasePrepareWorkflowError extends BaseError_2 {
|
|
112
94
|
private static readonly MODULE;
|
|
113
95
|
private static readonly ERROR_ENUM_NAME;
|
|
114
96
|
private static readonly SHORT_CODE;
|
|
@@ -116,11 +98,11 @@ declare class BasePrepareWorkflowError extends BaseError {
|
|
|
116
98
|
errorCode: PrepareWorkflowError;
|
|
117
99
|
message?: string;
|
|
118
100
|
underlyingError?: string;
|
|
119
|
-
underlyingBaseError?:
|
|
101
|
+
underlyingBaseError?: BaseError_2;
|
|
120
102
|
});
|
|
121
103
|
}
|
|
122
104
|
|
|
123
|
-
declare class BaseTokenInitializationError extends
|
|
105
|
+
declare class BaseTokenInitializationError extends BaseError_2 {
|
|
124
106
|
private static readonly MODULE;
|
|
125
107
|
private static readonly ERROR_ENUM_NAME;
|
|
126
108
|
private static readonly SHORT_CODE;
|
|
@@ -128,11 +110,11 @@ declare class BaseTokenInitializationError extends BaseError {
|
|
|
128
110
|
errorCode: TokenInitializeError;
|
|
129
111
|
message?: string;
|
|
130
112
|
underlyingError?: string;
|
|
131
|
-
underlyingBaseError?:
|
|
113
|
+
underlyingBaseError?: BaseError_2;
|
|
132
114
|
});
|
|
133
115
|
}
|
|
134
116
|
|
|
135
|
-
declare class BaseWorkflowError extends
|
|
117
|
+
declare class BaseWorkflowError extends BaseError_2 {
|
|
136
118
|
private static readonly MODULE;
|
|
137
119
|
private static readonly ERROR_ENUM_NAME;
|
|
138
120
|
private static readonly SHORT_CODE;
|
|
@@ -140,7 +122,7 @@ declare class BaseWorkflowError extends BaseError {
|
|
|
140
122
|
errorCode: WorkflowError;
|
|
141
123
|
message?: string;
|
|
142
124
|
underlyingError?: string;
|
|
143
|
-
underlyingBaseError?:
|
|
125
|
+
underlyingBaseError?: BaseError_2;
|
|
144
126
|
});
|
|
145
127
|
}
|
|
146
128
|
|
|
@@ -165,6 +147,7 @@ declare type ConnectionByApiKeyConfigCore = {
|
|
|
165
147
|
deviceDescriptor: {
|
|
166
148
|
ttl: number;
|
|
167
149
|
};
|
|
150
|
+
httpTimeoutMs?: number;
|
|
168
151
|
};
|
|
169
152
|
|
|
170
153
|
declare type ConnectionConfigCore = {
|
|
@@ -173,6 +156,7 @@ declare type ConnectionConfigCore = {
|
|
|
173
156
|
password: string;
|
|
174
157
|
port?: number;
|
|
175
158
|
userName: string;
|
|
159
|
+
httpTimeoutMs?: number;
|
|
176
160
|
};
|
|
177
161
|
|
|
178
162
|
export declare enum ConnectionError {
|
|
@@ -181,14 +165,17 @@ export declare enum ConnectionError {
|
|
|
181
165
|
DECODING_FAILED = 2
|
|
182
166
|
}
|
|
183
167
|
|
|
184
|
-
declare type ContinueSessionResults =
|
|
185
|
-
error
|
|
168
|
+
declare type ContinueSessionResults = {
|
|
169
|
+
error: BaseWorkflowError;
|
|
170
|
+
} | {
|
|
171
|
+
shouldStartNewSession: boolean;
|
|
186
172
|
};
|
|
187
173
|
|
|
188
174
|
export declare type CredentialConnectionConfig = {
|
|
189
175
|
baseUrl: string;
|
|
190
176
|
password: string;
|
|
191
177
|
userName: string;
|
|
178
|
+
httpTimeoutMs?: number;
|
|
192
179
|
};
|
|
193
180
|
|
|
194
181
|
declare type CurrentScreenConfig = {
|
|
@@ -233,12 +220,6 @@ export declare type DeinitializeCompletion = {
|
|
|
233
220
|
error?: BaseDeinitializationError;
|
|
234
221
|
};
|
|
235
222
|
|
|
236
|
-
declare type FailedAssets = {
|
|
237
|
-
imageURL: Set<string>;
|
|
238
|
-
base64: Set<string>;
|
|
239
|
-
blockingAssets: Set<string>;
|
|
240
|
-
};
|
|
241
|
-
|
|
242
223
|
declare type FetchErrorResult = {
|
|
243
224
|
code: FetchResultCode.HTTP_ISSUE | FetchResultCode.PROVIDER_ERROR | FetchResultCode.DECODING_FAILED;
|
|
244
225
|
data: FetchState;
|
|
@@ -311,7 +292,10 @@ declare type IdvBusinessLogicControllerProps = {
|
|
|
311
292
|
sessionData?: undefined;
|
|
312
293
|
error: BaseWorkflowError;
|
|
313
294
|
}>;
|
|
314
|
-
_waitForNextStep: () =>
|
|
295
|
+
_waitForNextStep: () => {
|
|
296
|
+
startHttpTimer: () => void;
|
|
297
|
+
cancel: () => void;
|
|
298
|
+
};
|
|
315
299
|
_stepSocketListenerWhenStepIsRunning: (isStepRunning: boolean) => void;
|
|
316
300
|
_getSessionStateNextStepConditionResult: () => Promise<DataOrError<SessionModel>>;
|
|
317
301
|
_findStepById: (stepId: string) => WorkflowStep | null;
|
|
@@ -349,6 +333,7 @@ export declare const IdvEventTypesEnum: {
|
|
|
349
333
|
|
|
350
334
|
declare class IdvFetchService {
|
|
351
335
|
private _connectionTokenExpirationBufferMs;
|
|
336
|
+
private _httpTimeoutMs;
|
|
352
337
|
private _origin;
|
|
353
338
|
private _apiKeyAuthToken;
|
|
354
339
|
private _connectionToken;
|
|
@@ -380,6 +365,8 @@ declare class IdvFetchService {
|
|
|
380
365
|
} | FetchErrorResult>;
|
|
381
366
|
private _getAuthorizationSearchParam;
|
|
382
367
|
private _getResponseTextFromBadResponse;
|
|
368
|
+
private _applyHttpTimeout;
|
|
369
|
+
private _getRequestSignal;
|
|
383
370
|
private _httpFetch;
|
|
384
371
|
private _fetchPing;
|
|
385
372
|
private _fetchMe;
|
|
@@ -456,11 +443,12 @@ declare class IdvFetchService {
|
|
|
456
443
|
data: SessionData;
|
|
457
444
|
} | FetchErrorResult>;
|
|
458
445
|
pushLogs(sessionId: string, pushLogsParams: PushLogsParams): Promise<Record<string, unknown>>;
|
|
459
|
-
startIamAuth({ applicationId, baseUrl, metadata, locale, }: {
|
|
446
|
+
startIamAuth({ applicationId, baseUrl, metadata, locale, httpTimeoutMs, }: {
|
|
460
447
|
applicationId: string;
|
|
461
448
|
baseUrl: string;
|
|
462
449
|
metadata?: Record<string, unknown>;
|
|
463
450
|
locale?: string;
|
|
451
|
+
httpTimeoutMs?: number;
|
|
464
452
|
}): Promise<Record<string, unknown>>;
|
|
465
453
|
private _postStartUpload;
|
|
466
454
|
private _postFileChunk;
|
|
@@ -498,7 +486,7 @@ declare type IdvIntegrationControllerProps = {
|
|
|
498
486
|
}>;
|
|
499
487
|
getWorkflows: (params?: WorkflowListRequest) => Promise<WorkflowListCompletion>;
|
|
500
488
|
prepareWorkflowAndPrepareUi: (workflowId: string) => Promise<PrepareWorkflowCompletion>;
|
|
501
|
-
|
|
489
|
+
startSession: (params: {
|
|
502
490
|
completion: (data: WorkflowCompletion) => void;
|
|
503
491
|
locale: string;
|
|
504
492
|
metadata?: Record<string, unknown>;
|
|
@@ -510,6 +498,7 @@ declare type IdvIntegrationControllerProps = {
|
|
|
510
498
|
baseUrl: string;
|
|
511
499
|
metadata?: Record<string, unknown>;
|
|
512
500
|
locale?: string;
|
|
501
|
+
httpTimeoutMs?: number;
|
|
513
502
|
}) => Promise<Record<string, unknown>>;
|
|
514
503
|
};
|
|
515
504
|
|
|
@@ -554,23 +543,9 @@ export declare type IdvMessageEvent = {
|
|
|
554
543
|
message?: IdvServiceMessages | string;
|
|
555
544
|
};
|
|
556
545
|
|
|
557
|
-
export
|
|
558
|
-
isProcessing?: (isProcessing: boolean) => void;
|
|
559
|
-
moduleProps: TModuleProps;
|
|
560
|
-
modulesConfig?: TModulesConfig;
|
|
561
|
-
perform: (data: any, type?: PerformType) => void;
|
|
562
|
-
idvEventListener: (module: string, data: any) => void;
|
|
563
|
-
nonce?: string;
|
|
564
|
-
};
|
|
546
|
+
export { IdvModuleProps }
|
|
565
547
|
|
|
566
|
-
export
|
|
567
|
-
displayName: string;
|
|
568
|
-
isReady(): boolean;
|
|
569
|
-
getSupportedTemplates(): string[];
|
|
570
|
-
initialize(modulesConfig: Record<string, unknown>): void;
|
|
571
|
-
deinitialize(): void;
|
|
572
|
-
getIdentifier(): string;
|
|
573
|
-
}
|
|
548
|
+
export { IdvModuleStaticMethods }
|
|
574
549
|
|
|
575
550
|
export declare enum IdvServiceMessages {
|
|
576
551
|
DID_START_SESSION = "DID_START_SESSION",
|
|
@@ -643,7 +618,7 @@ export declare class IdvWebComponent extends LitElement {
|
|
|
643
618
|
connectedCallback(): void;
|
|
644
619
|
_listenerFromModule: (module: string, data: any) => void;
|
|
645
620
|
_isProcessingCallback: (isProcessing: boolean) => void;
|
|
646
|
-
_performFromModule: (data: any, type?:
|
|
621
|
+
_performFromModule: (data: any, type?: PerformType_2) => void;
|
|
647
622
|
_processingScreen(): HTMLElement | TemplateResult<1>;
|
|
648
623
|
private _isTheSameModuleAndScreen;
|
|
649
624
|
_currentScreen(): HTMLElement | typeof nothing;
|
|
@@ -684,6 +659,7 @@ export declare type LoginConfig = {
|
|
|
684
659
|
baseUrl: string;
|
|
685
660
|
metadata?: Record<string, unknown>;
|
|
686
661
|
locale?: string;
|
|
662
|
+
httpTimeoutMs?: number;
|
|
687
663
|
};
|
|
688
664
|
|
|
689
665
|
export declare enum LoginError {
|
|
@@ -697,14 +673,7 @@ export declare enum LoginError {
|
|
|
697
673
|
AUTH_FAILURE = 7
|
|
698
674
|
}
|
|
699
675
|
|
|
700
|
-
export
|
|
701
|
-
|
|
702
|
-
declare type PerformType = (typeof PerformTypes)[keyof typeof PerformTypes] | undefined;
|
|
703
|
-
|
|
704
|
-
declare const PerformTypes: {
|
|
705
|
-
readonly FORM: "form";
|
|
706
|
-
readonly DATA: "data";
|
|
707
|
-
};
|
|
676
|
+
export { ModuleClass }
|
|
708
677
|
|
|
709
678
|
export declare type PrepareWorkflowCompletion = {
|
|
710
679
|
workflow?: Workflow;
|
|
@@ -744,7 +713,7 @@ declare type PushLogsParams = {
|
|
|
744
713
|
};
|
|
745
714
|
};
|
|
746
715
|
|
|
747
|
-
export
|
|
716
|
+
export { registerModule }
|
|
748
717
|
|
|
749
718
|
declare type SessionData = {
|
|
750
719
|
id: string;
|
|
@@ -800,11 +769,19 @@ declare type SessionPropertiesItem = {
|
|
|
800
769
|
object?: unknown;
|
|
801
770
|
};
|
|
802
771
|
|
|
772
|
+
export declare enum SocketError {
|
|
773
|
+
UNKNOWN = 0,
|
|
774
|
+
SESSION_NOT_FOUND_OR_ACCESS_DENIED = 1,
|
|
775
|
+
INVALID_MESSAGE_FORMAT = 2,
|
|
776
|
+
UNSUPPORTED_COMMAND = 3
|
|
777
|
+
}
|
|
778
|
+
|
|
803
779
|
declare type StartConfig = {
|
|
804
780
|
host?: string;
|
|
805
781
|
isSecure?: boolean;
|
|
806
782
|
apiKey?: string;
|
|
807
783
|
port?: number;
|
|
784
|
+
httpTimeoutMs?: number;
|
|
808
785
|
};
|
|
809
786
|
|
|
810
787
|
export declare type StartLoginCompletion = string | BaseLoginError;
|
|
@@ -851,6 +828,7 @@ declare type Workflow = {
|
|
|
851
828
|
id: string;
|
|
852
829
|
logging?: WorkflowLogging | null;
|
|
853
830
|
steps: Array<WorkflowStep>;
|
|
831
|
+
stepTemplateIds?: string[];
|
|
854
832
|
client: WorkflowClient;
|
|
855
833
|
trackLocation?: boolean;
|
|
856
834
|
error?: string | null;
|
|
@@ -905,6 +883,7 @@ declare class WorkflowModel implements Workflow {
|
|
|
905
883
|
id: string;
|
|
906
884
|
steps: WorkflowStepModel[];
|
|
907
885
|
client: WorkflowClientModel;
|
|
886
|
+
stepTemplateIds?: string[];
|
|
908
887
|
name?: string;
|
|
909
888
|
logging?: WorkflowLoggingModel | null;
|
|
910
889
|
error?: string | null;
|
|
@@ -965,3 +944,25 @@ declare class WorkflowStepModel implements WorkflowStep {
|
|
|
965
944
|
}
|
|
966
945
|
|
|
967
946
|
export { }
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
declare global {
|
|
951
|
+
const VERSION: string;
|
|
952
|
+
const ENV: string;
|
|
953
|
+
|
|
954
|
+
interface Window {
|
|
955
|
+
RegulaIdvService: IdvFetchService;
|
|
956
|
+
allowedCameras: InputDeviceInfo[];
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
declare namespace preact.JSX {
|
|
960
|
+
interface IntrinsicElements {
|
|
961
|
+
'face-liveness': IFaceLiveness;
|
|
962
|
+
'document-reader': IDocumentReader;
|
|
963
|
+
'idv-flow': any;
|
|
964
|
+
'idv-document': any;
|
|
965
|
+
'idv-face': any;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
}
|