@regulaforensics/idv-capture-web 3.10.548-nightly → 3.10.549-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 +83 -74
- package/dist/main.iife.js +31 -12
- package/dist/main.js +6951 -4465
- package/package.json +3 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
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 = {
|
|
17
7
|
baseUrl: string;
|
|
18
8
|
apiKey: string;
|
|
19
9
|
ttl?: number;
|
|
20
|
-
httpTimeoutMs?: number;
|
|
21
10
|
};
|
|
22
11
|
|
|
23
12
|
declare type AuthTokenStoreData = {
|
|
@@ -26,7 +15,7 @@ declare type AuthTokenStoreData = {
|
|
|
26
15
|
tokenExpiresAt: number;
|
|
27
16
|
};
|
|
28
17
|
|
|
29
|
-
declare class BaseConfigureError extends
|
|
18
|
+
declare class BaseConfigureError extends BaseError {
|
|
30
19
|
private static readonly MODULE;
|
|
31
20
|
private static readonly ERROR_ENUM_NAME;
|
|
32
21
|
private static readonly SHORT_CODE;
|
|
@@ -34,11 +23,11 @@ declare class BaseConfigureError extends BaseError_2 {
|
|
|
34
23
|
errorCode: ConfigureError;
|
|
35
24
|
message?: string;
|
|
36
25
|
underlyingError?: string;
|
|
37
|
-
underlyingBaseError?:
|
|
26
|
+
underlyingBaseError?: BaseError;
|
|
38
27
|
});
|
|
39
28
|
}
|
|
40
29
|
|
|
41
|
-
declare class BaseConnectionError extends
|
|
30
|
+
declare class BaseConnectionError extends BaseError {
|
|
42
31
|
private static readonly MODULE;
|
|
43
32
|
private static readonly ERROR_ENUM_NAME;
|
|
44
33
|
private static readonly SHORT_CODE;
|
|
@@ -46,11 +35,11 @@ declare class BaseConnectionError extends BaseError_2 {
|
|
|
46
35
|
errorCode: ConnectionError;
|
|
47
36
|
message?: string;
|
|
48
37
|
underlyingError?: string;
|
|
49
|
-
underlyingBaseError?:
|
|
38
|
+
underlyingBaseError?: BaseError;
|
|
50
39
|
});
|
|
51
40
|
}
|
|
52
41
|
|
|
53
|
-
declare class BaseDeinitializationError extends
|
|
42
|
+
declare class BaseDeinitializationError extends BaseError {
|
|
54
43
|
private static readonly MODULE;
|
|
55
44
|
private static readonly ERROR_ENUM_NAME;
|
|
56
45
|
private static readonly SHORT_CODE;
|
|
@@ -58,13 +47,39 @@ declare class BaseDeinitializationError extends BaseError_2 {
|
|
|
58
47
|
errorCode: DeinitializationError;
|
|
59
48
|
message?: string;
|
|
60
49
|
underlyingError?: string;
|
|
61
|
-
underlyingBaseError?:
|
|
50
|
+
underlyingBaseError?: BaseError;
|
|
62
51
|
});
|
|
63
52
|
}
|
|
64
53
|
|
|
65
|
-
export
|
|
54
|
+
export declare class BaseError {
|
|
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
|
+
}
|
|
66
81
|
|
|
67
|
-
declare class BaseInitializationError extends
|
|
82
|
+
declare class BaseInitializationError extends BaseError {
|
|
68
83
|
private static readonly MODULE;
|
|
69
84
|
private static readonly ERROR_ENUM_NAME;
|
|
70
85
|
private static readonly SHORT_CODE;
|
|
@@ -72,11 +87,11 @@ declare class BaseInitializationError extends BaseError_2 {
|
|
|
72
87
|
errorCode: InitializeError;
|
|
73
88
|
message?: string;
|
|
74
89
|
underlyingError?: string;
|
|
75
|
-
underlyingBaseError?:
|
|
90
|
+
underlyingBaseError?: BaseError;
|
|
76
91
|
});
|
|
77
92
|
}
|
|
78
93
|
|
|
79
|
-
export declare class BaseLoginError extends
|
|
94
|
+
export declare class BaseLoginError extends BaseError {
|
|
80
95
|
private static readonly MODULE;
|
|
81
96
|
private static readonly ERROR_ENUM_NAME;
|
|
82
97
|
private static readonly SHORT_CODE;
|
|
@@ -84,13 +99,16 @@ export declare class BaseLoginError extends BaseError_2 {
|
|
|
84
99
|
errorCode: LoginError;
|
|
85
100
|
message?: string;
|
|
86
101
|
underlyingError?: string;
|
|
87
|
-
underlyingBaseError?:
|
|
102
|
+
underlyingBaseError?: BaseError;
|
|
88
103
|
});
|
|
89
104
|
}
|
|
90
105
|
|
|
91
|
-
export
|
|
106
|
+
export declare abstract class BaseModule<TModuleProps = unknown, TModulesConfig = unknown> extends HTMLElement {
|
|
107
|
+
abstract props: IdvModuleProps<TModuleProps, TModulesConfig> | null;
|
|
108
|
+
abstract setProps(config: IdvModuleProps<TModuleProps, TModulesConfig>): void;
|
|
109
|
+
}
|
|
92
110
|
|
|
93
|
-
declare class BasePrepareWorkflowError extends
|
|
111
|
+
declare class BasePrepareWorkflowError extends BaseError {
|
|
94
112
|
private static readonly MODULE;
|
|
95
113
|
private static readonly ERROR_ENUM_NAME;
|
|
96
114
|
private static readonly SHORT_CODE;
|
|
@@ -98,11 +116,11 @@ declare class BasePrepareWorkflowError extends BaseError_2 {
|
|
|
98
116
|
errorCode: PrepareWorkflowError;
|
|
99
117
|
message?: string;
|
|
100
118
|
underlyingError?: string;
|
|
101
|
-
underlyingBaseError?:
|
|
119
|
+
underlyingBaseError?: BaseError;
|
|
102
120
|
});
|
|
103
121
|
}
|
|
104
122
|
|
|
105
|
-
declare class BaseTokenInitializationError extends
|
|
123
|
+
declare class BaseTokenInitializationError extends BaseError {
|
|
106
124
|
private static readonly MODULE;
|
|
107
125
|
private static readonly ERROR_ENUM_NAME;
|
|
108
126
|
private static readonly SHORT_CODE;
|
|
@@ -110,11 +128,11 @@ declare class BaseTokenInitializationError extends BaseError_2 {
|
|
|
110
128
|
errorCode: TokenInitializeError;
|
|
111
129
|
message?: string;
|
|
112
130
|
underlyingError?: string;
|
|
113
|
-
underlyingBaseError?:
|
|
131
|
+
underlyingBaseError?: BaseError;
|
|
114
132
|
});
|
|
115
133
|
}
|
|
116
134
|
|
|
117
|
-
declare class BaseWorkflowError extends
|
|
135
|
+
declare class BaseWorkflowError extends BaseError {
|
|
118
136
|
private static readonly MODULE;
|
|
119
137
|
private static readonly ERROR_ENUM_NAME;
|
|
120
138
|
private static readonly SHORT_CODE;
|
|
@@ -122,7 +140,7 @@ declare class BaseWorkflowError extends BaseError_2 {
|
|
|
122
140
|
errorCode: WorkflowError;
|
|
123
141
|
message?: string;
|
|
124
142
|
underlyingError?: string;
|
|
125
|
-
underlyingBaseError?:
|
|
143
|
+
underlyingBaseError?: BaseError;
|
|
126
144
|
});
|
|
127
145
|
}
|
|
128
146
|
|
|
@@ -147,7 +165,6 @@ declare type ConnectionByApiKeyConfigCore = {
|
|
|
147
165
|
deviceDescriptor: {
|
|
148
166
|
ttl: number;
|
|
149
167
|
};
|
|
150
|
-
httpTimeoutMs?: number;
|
|
151
168
|
};
|
|
152
169
|
|
|
153
170
|
declare type ConnectionConfigCore = {
|
|
@@ -156,7 +173,6 @@ declare type ConnectionConfigCore = {
|
|
|
156
173
|
password: string;
|
|
157
174
|
port?: number;
|
|
158
175
|
userName: string;
|
|
159
|
-
httpTimeoutMs?: number;
|
|
160
176
|
};
|
|
161
177
|
|
|
162
178
|
export declare enum ConnectionError {
|
|
@@ -165,17 +181,14 @@ export declare enum ConnectionError {
|
|
|
165
181
|
DECODING_FAILED = 2
|
|
166
182
|
}
|
|
167
183
|
|
|
168
|
-
declare type ContinueSessionResults = {
|
|
169
|
-
error
|
|
170
|
-
} | {
|
|
171
|
-
shouldStartNewSession: boolean;
|
|
184
|
+
declare type ContinueSessionResults = SessionData | WorkflowResult | {
|
|
185
|
+
error?: BaseWorkflowError;
|
|
172
186
|
};
|
|
173
187
|
|
|
174
188
|
export declare type CredentialConnectionConfig = {
|
|
175
189
|
baseUrl: string;
|
|
176
190
|
password: string;
|
|
177
191
|
userName: string;
|
|
178
|
-
httpTimeoutMs?: number;
|
|
179
192
|
};
|
|
180
193
|
|
|
181
194
|
declare type CurrentScreenConfig = {
|
|
@@ -220,6 +233,12 @@ export declare type DeinitializeCompletion = {
|
|
|
220
233
|
error?: BaseDeinitializationError;
|
|
221
234
|
};
|
|
222
235
|
|
|
236
|
+
declare type FailedAssets = {
|
|
237
|
+
imageURL: Set<string>;
|
|
238
|
+
base64: Set<string>;
|
|
239
|
+
blockingAssets: Set<string>;
|
|
240
|
+
};
|
|
241
|
+
|
|
223
242
|
declare type FetchErrorResult = {
|
|
224
243
|
code: FetchResultCode.HTTP_ISSUE | FetchResultCode.PROVIDER_ERROR | FetchResultCode.DECODING_FAILED;
|
|
225
244
|
data: FetchState;
|
|
@@ -330,7 +349,6 @@ export declare const IdvEventTypesEnum: {
|
|
|
330
349
|
|
|
331
350
|
declare class IdvFetchService {
|
|
332
351
|
private _connectionTokenExpirationBufferMs;
|
|
333
|
-
private _httpTimeoutMs;
|
|
334
352
|
private _origin;
|
|
335
353
|
private _apiKeyAuthToken;
|
|
336
354
|
private _connectionToken;
|
|
@@ -362,8 +380,6 @@ declare class IdvFetchService {
|
|
|
362
380
|
} | FetchErrorResult>;
|
|
363
381
|
private _getAuthorizationSearchParam;
|
|
364
382
|
private _getResponseTextFromBadResponse;
|
|
365
|
-
private _applyHttpTimeout;
|
|
366
|
-
private _getRequestSignal;
|
|
367
383
|
private _httpFetch;
|
|
368
384
|
private _fetchPing;
|
|
369
385
|
private _fetchMe;
|
|
@@ -440,12 +456,11 @@ declare class IdvFetchService {
|
|
|
440
456
|
data: SessionData;
|
|
441
457
|
} | FetchErrorResult>;
|
|
442
458
|
pushLogs(sessionId: string, pushLogsParams: PushLogsParams): Promise<Record<string, unknown>>;
|
|
443
|
-
startIamAuth({ applicationId, baseUrl, metadata, locale,
|
|
459
|
+
startIamAuth({ applicationId, baseUrl, metadata, locale, }: {
|
|
444
460
|
applicationId: string;
|
|
445
461
|
baseUrl: string;
|
|
446
462
|
metadata?: Record<string, unknown>;
|
|
447
463
|
locale?: string;
|
|
448
|
-
httpTimeoutMs?: number;
|
|
449
464
|
}): Promise<Record<string, unknown>>;
|
|
450
465
|
private _postStartUpload;
|
|
451
466
|
private _postFileChunk;
|
|
@@ -483,7 +498,7 @@ declare type IdvIntegrationControllerProps = {
|
|
|
483
498
|
}>;
|
|
484
499
|
getWorkflows: (params?: WorkflowListRequest) => Promise<WorkflowListCompletion>;
|
|
485
500
|
prepareWorkflowAndPrepareUi: (workflowId: string) => Promise<PrepareWorkflowCompletion>;
|
|
486
|
-
|
|
501
|
+
startNewSession: (params: {
|
|
487
502
|
completion: (data: WorkflowCompletion) => void;
|
|
488
503
|
locale: string;
|
|
489
504
|
metadata?: Record<string, unknown>;
|
|
@@ -495,7 +510,6 @@ declare type IdvIntegrationControllerProps = {
|
|
|
495
510
|
baseUrl: string;
|
|
496
511
|
metadata?: Record<string, unknown>;
|
|
497
512
|
locale?: string;
|
|
498
|
-
httpTimeoutMs?: number;
|
|
499
513
|
}) => Promise<Record<string, unknown>>;
|
|
500
514
|
};
|
|
501
515
|
|
|
@@ -540,9 +554,23 @@ export declare type IdvMessageEvent = {
|
|
|
540
554
|
message?: IdvServiceMessages | string;
|
|
541
555
|
};
|
|
542
556
|
|
|
543
|
-
export
|
|
557
|
+
export declare type IdvModuleProps<TModuleProps, TModulesConfig> = {
|
|
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
|
+
};
|
|
544
565
|
|
|
545
|
-
export
|
|
566
|
+
export declare interface IdvModuleStaticMethods {
|
|
567
|
+
displayName: string;
|
|
568
|
+
isReady(): boolean;
|
|
569
|
+
getSupportedTemplates(): string[];
|
|
570
|
+
initialize(modulesConfig: Record<string, unknown>): void;
|
|
571
|
+
deinitialize(): void;
|
|
572
|
+
getIdentifier(): string;
|
|
573
|
+
}
|
|
546
574
|
|
|
547
575
|
export declare enum IdvServiceMessages {
|
|
548
576
|
DID_START_SESSION = "DID_START_SESSION",
|
|
@@ -615,7 +643,7 @@ export declare class IdvWebComponent extends LitElement {
|
|
|
615
643
|
connectedCallback(): void;
|
|
616
644
|
_listenerFromModule: (module: string, data: any) => void;
|
|
617
645
|
_isProcessingCallback: (isProcessing: boolean) => void;
|
|
618
|
-
_performFromModule: (data: any, type?:
|
|
646
|
+
_performFromModule: (data: any, type?: PerformType) => void;
|
|
619
647
|
_processingScreen(): HTMLElement | TemplateResult<1>;
|
|
620
648
|
private _isTheSameModuleAndScreen;
|
|
621
649
|
_currentScreen(): HTMLElement | typeof nothing;
|
|
@@ -656,7 +684,6 @@ export declare type LoginConfig = {
|
|
|
656
684
|
baseUrl: string;
|
|
657
685
|
metadata?: Record<string, unknown>;
|
|
658
686
|
locale?: string;
|
|
659
|
-
httpTimeoutMs?: number;
|
|
660
687
|
};
|
|
661
688
|
|
|
662
689
|
export declare enum LoginError {
|
|
@@ -670,7 +697,14 @@ export declare enum LoginError {
|
|
|
670
697
|
AUTH_FAILURE = 7
|
|
671
698
|
}
|
|
672
699
|
|
|
673
|
-
export
|
|
700
|
+
export declare type ModuleClass<TModuleProps = unknown, TModulesConfig = unknown> = IdvModuleStaticMethods & (new (...args: any[]) => BaseModule<TModuleProps, TModulesConfig>);
|
|
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
|
+
};
|
|
674
708
|
|
|
675
709
|
export declare type PrepareWorkflowCompletion = {
|
|
676
710
|
workflow?: Workflow;
|
|
@@ -710,7 +744,7 @@ declare type PushLogsParams = {
|
|
|
710
744
|
};
|
|
711
745
|
};
|
|
712
746
|
|
|
713
|
-
export
|
|
747
|
+
export declare function registerModule<TModuleProps = unknown, TModulesConfig = unknown>(name: string, ModuleClass: ModuleClass<TModuleProps, TModulesConfig>): void;
|
|
714
748
|
|
|
715
749
|
declare type SessionData = {
|
|
716
750
|
id: string;
|
|
@@ -771,7 +805,6 @@ declare type StartConfig = {
|
|
|
771
805
|
isSecure?: boolean;
|
|
772
806
|
apiKey?: string;
|
|
773
807
|
port?: number;
|
|
774
|
-
httpTimeoutMs?: number;
|
|
775
808
|
};
|
|
776
809
|
|
|
777
810
|
export declare type StartLoginCompletion = string | BaseLoginError;
|
|
@@ -818,7 +851,6 @@ declare type Workflow = {
|
|
|
818
851
|
id: string;
|
|
819
852
|
logging?: WorkflowLogging | null;
|
|
820
853
|
steps: Array<WorkflowStep>;
|
|
821
|
-
stepTemplateIds?: string[];
|
|
822
854
|
client: WorkflowClient;
|
|
823
855
|
trackLocation?: boolean;
|
|
824
856
|
error?: string | null;
|
|
@@ -873,7 +905,6 @@ declare class WorkflowModel implements Workflow {
|
|
|
873
905
|
id: string;
|
|
874
906
|
steps: WorkflowStepModel[];
|
|
875
907
|
client: WorkflowClientModel;
|
|
876
|
-
stepTemplateIds?: string[];
|
|
877
908
|
name?: string;
|
|
878
909
|
logging?: WorkflowLoggingModel | null;
|
|
879
910
|
error?: string | null;
|
|
@@ -934,25 +965,3 @@ declare class WorkflowStepModel implements WorkflowStep {
|
|
|
934
965
|
}
|
|
935
966
|
|
|
936
967
|
export { }
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
declare global {
|
|
941
|
-
const VERSION: string;
|
|
942
|
-
const ENV: string;
|
|
943
|
-
|
|
944
|
-
interface Window {
|
|
945
|
-
RegulaIdvService: IdvFetchService;
|
|
946
|
-
allowedCameras: InputDeviceInfo[];
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
declare namespace preact.JSX {
|
|
950
|
-
interface IntrinsicElements {
|
|
951
|
-
'face-liveness': IFaceLiveness;
|
|
952
|
-
'document-reader': IDocumentReader;
|
|
953
|
-
'idv-flow': any;
|
|
954
|
-
'idv-document': any;
|
|
955
|
-
'idv-face': any;
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
}
|