@regulaforensics/idv-capture-web 4.0.511-rc → 4.0.512-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 +70 -81
- package/dist/main.iife.js +14 -14
- package/dist/main.js +4986 -4722
- package/package.json +1 -1
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 {
|
|
@@ -189,6 +173,7 @@ export declare type CredentialConnectionConfig = {
|
|
|
189
173
|
baseUrl: string;
|
|
190
174
|
password: string;
|
|
191
175
|
userName: string;
|
|
176
|
+
httpTimeoutMs?: number;
|
|
192
177
|
};
|
|
193
178
|
|
|
194
179
|
declare type CurrentScreenConfig = {
|
|
@@ -233,12 +218,6 @@ export declare type DeinitializeCompletion = {
|
|
|
233
218
|
error?: BaseDeinitializationError;
|
|
234
219
|
};
|
|
235
220
|
|
|
236
|
-
declare type FailedAssets = {
|
|
237
|
-
imageURL: Set<string>;
|
|
238
|
-
base64: Set<string>;
|
|
239
|
-
blockingAssets: Set<string>;
|
|
240
|
-
};
|
|
241
|
-
|
|
242
221
|
declare type FetchErrorResult = {
|
|
243
222
|
code: FetchResultCode.HTTP_ISSUE | FetchResultCode.PROVIDER_ERROR | FetchResultCode.DECODING_FAILED;
|
|
244
223
|
data: FetchState;
|
|
@@ -349,6 +328,7 @@ export declare const IdvEventTypesEnum: {
|
|
|
349
328
|
|
|
350
329
|
declare class IdvFetchService {
|
|
351
330
|
private _connectionTokenExpirationBufferMs;
|
|
331
|
+
private _httpTimeoutMs;
|
|
352
332
|
private _origin;
|
|
353
333
|
private _apiKeyAuthToken;
|
|
354
334
|
private _connectionToken;
|
|
@@ -380,6 +360,8 @@ declare class IdvFetchService {
|
|
|
380
360
|
} | FetchErrorResult>;
|
|
381
361
|
private _getAuthorizationSearchParam;
|
|
382
362
|
private _getResponseTextFromBadResponse;
|
|
363
|
+
private _applyHttpTimeout;
|
|
364
|
+
private _getRequestSignal;
|
|
383
365
|
private _httpFetch;
|
|
384
366
|
private _fetchPing;
|
|
385
367
|
private _fetchMe;
|
|
@@ -456,11 +438,12 @@ declare class IdvFetchService {
|
|
|
456
438
|
data: SessionData;
|
|
457
439
|
} | FetchErrorResult>;
|
|
458
440
|
pushLogs(sessionId: string, pushLogsParams: PushLogsParams): Promise<Record<string, unknown>>;
|
|
459
|
-
startIamAuth({ applicationId, baseUrl, metadata, locale, }: {
|
|
441
|
+
startIamAuth({ applicationId, baseUrl, metadata, locale, httpTimeoutMs, }: {
|
|
460
442
|
applicationId: string;
|
|
461
443
|
baseUrl: string;
|
|
462
444
|
metadata?: Record<string, unknown>;
|
|
463
445
|
locale?: string;
|
|
446
|
+
httpTimeoutMs?: number;
|
|
464
447
|
}): Promise<Record<string, unknown>>;
|
|
465
448
|
private _postStartUpload;
|
|
466
449
|
private _postFileChunk;
|
|
@@ -498,7 +481,7 @@ declare type IdvIntegrationControllerProps = {
|
|
|
498
481
|
}>;
|
|
499
482
|
getWorkflows: (params?: WorkflowListRequest) => Promise<WorkflowListCompletion>;
|
|
500
483
|
prepareWorkflowAndPrepareUi: (workflowId: string) => Promise<PrepareWorkflowCompletion>;
|
|
501
|
-
|
|
484
|
+
startSession: (params: {
|
|
502
485
|
completion: (data: WorkflowCompletion) => void;
|
|
503
486
|
locale: string;
|
|
504
487
|
metadata?: Record<string, unknown>;
|
|
@@ -510,6 +493,7 @@ declare type IdvIntegrationControllerProps = {
|
|
|
510
493
|
baseUrl: string;
|
|
511
494
|
metadata?: Record<string, unknown>;
|
|
512
495
|
locale?: string;
|
|
496
|
+
httpTimeoutMs?: number;
|
|
513
497
|
}) => Promise<Record<string, unknown>>;
|
|
514
498
|
};
|
|
515
499
|
|
|
@@ -554,23 +538,9 @@ export declare type IdvMessageEvent = {
|
|
|
554
538
|
message?: IdvServiceMessages | string;
|
|
555
539
|
};
|
|
556
540
|
|
|
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
|
-
};
|
|
541
|
+
export { IdvModuleProps }
|
|
565
542
|
|
|
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
|
-
}
|
|
543
|
+
export { IdvModuleStaticMethods }
|
|
574
544
|
|
|
575
545
|
export declare enum IdvServiceMessages {
|
|
576
546
|
DID_START_SESSION = "DID_START_SESSION",
|
|
@@ -643,7 +613,7 @@ export declare class IdvWebComponent extends LitElement {
|
|
|
643
613
|
connectedCallback(): void;
|
|
644
614
|
_listenerFromModule: (module: string, data: any) => void;
|
|
645
615
|
_isProcessingCallback: (isProcessing: boolean) => void;
|
|
646
|
-
_performFromModule: (data: any, type?:
|
|
616
|
+
_performFromModule: (data: any, type?: PerformType_2) => void;
|
|
647
617
|
_processingScreen(): HTMLElement | TemplateResult<1>;
|
|
648
618
|
private _isTheSameModuleAndScreen;
|
|
649
619
|
_currentScreen(): HTMLElement | typeof nothing;
|
|
@@ -684,6 +654,7 @@ export declare type LoginConfig = {
|
|
|
684
654
|
baseUrl: string;
|
|
685
655
|
metadata?: Record<string, unknown>;
|
|
686
656
|
locale?: string;
|
|
657
|
+
httpTimeoutMs?: number;
|
|
687
658
|
};
|
|
688
659
|
|
|
689
660
|
export declare enum LoginError {
|
|
@@ -697,14 +668,7 @@ export declare enum LoginError {
|
|
|
697
668
|
AUTH_FAILURE = 7
|
|
698
669
|
}
|
|
699
670
|
|
|
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
|
-
};
|
|
671
|
+
export { ModuleClass }
|
|
708
672
|
|
|
709
673
|
export declare type PrepareWorkflowCompletion = {
|
|
710
674
|
workflow?: Workflow;
|
|
@@ -744,7 +708,7 @@ declare type PushLogsParams = {
|
|
|
744
708
|
};
|
|
745
709
|
};
|
|
746
710
|
|
|
747
|
-
export
|
|
711
|
+
export { registerModule }
|
|
748
712
|
|
|
749
713
|
declare type SessionData = {
|
|
750
714
|
id: string;
|
|
@@ -805,6 +769,7 @@ declare type StartConfig = {
|
|
|
805
769
|
isSecure?: boolean;
|
|
806
770
|
apiKey?: string;
|
|
807
771
|
port?: number;
|
|
772
|
+
httpTimeoutMs?: number;
|
|
808
773
|
};
|
|
809
774
|
|
|
810
775
|
export declare type StartLoginCompletion = string | BaseLoginError;
|
|
@@ -851,6 +816,7 @@ declare type Workflow = {
|
|
|
851
816
|
id: string;
|
|
852
817
|
logging?: WorkflowLogging | null;
|
|
853
818
|
steps: Array<WorkflowStep>;
|
|
819
|
+
stepTemplateIds?: string[];
|
|
854
820
|
client: WorkflowClient;
|
|
855
821
|
trackLocation?: boolean;
|
|
856
822
|
error?: string | null;
|
|
@@ -905,6 +871,7 @@ declare class WorkflowModel implements Workflow {
|
|
|
905
871
|
id: string;
|
|
906
872
|
steps: WorkflowStepModel[];
|
|
907
873
|
client: WorkflowClientModel;
|
|
874
|
+
stepTemplateIds?: string[];
|
|
908
875
|
name?: string;
|
|
909
876
|
logging?: WorkflowLoggingModel | null;
|
|
910
877
|
error?: string | null;
|
|
@@ -965,3 +932,25 @@ declare class WorkflowStepModel implements WorkflowStep {
|
|
|
965
932
|
}
|
|
966
933
|
|
|
967
934
|
export { }
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
declare global {
|
|
939
|
+
const VERSION: string;
|
|
940
|
+
const ENV: string;
|
|
941
|
+
|
|
942
|
+
interface Window {
|
|
943
|
+
RegulaIdvService: IdvFetchService;
|
|
944
|
+
allowedCameras: InputDeviceInfo[];
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
declare namespace preact.JSX {
|
|
948
|
+
interface IntrinsicElements {
|
|
949
|
+
'face-liveness': IFaceLiveness;
|
|
950
|
+
'document-reader': IDocumentReader;
|
|
951
|
+
'idv-flow': any;
|
|
952
|
+
'idv-document': any;
|
|
953
|
+
'idv-face': any;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|