onfido-sdk-ui 14.53.1 → 14.54.0
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/LICENSE +36 -36
- package/package.json +2 -2
- package/types/Events.d.ts +4 -4
- package/types/Onfido.d.ts +7 -287
- package/types/contract/module/DocumentModule.d.ts +7 -1
- package/types/contract/module/FaceMotionModule.d.ts +1 -0
- package/types/loader.d.ts +1 -1
- package/types/shared/Error.d.ts +11 -2
- package/types/shared/FeatureFlags.d.ts +1 -1
- package/types/shared/Types.d.ts +7 -1
- package/Onfido.iife.js +0 -1
- package/Onfido.umd.cjs +0 -1
package/LICENSE
CHANGED
|
@@ -10,38 +10,18 @@ at https://documentation.onfido.com/sdk/sdk-licenses/.
|
|
|
10
10
|
------------------
|
|
11
11
|
|
|
12
12
|
Name: @onfido/capture-shared
|
|
13
|
-
Version: 2.24.
|
|
13
|
+
Version: 2.24.9
|
|
14
14
|
License: null
|
|
15
15
|
Private: false
|
|
16
16
|
Description: A shared library to use in various capture packages
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
Name: @
|
|
21
|
-
Version:
|
|
22
|
-
License:
|
|
20
|
+
Name: @onfido/sdk-analytics
|
|
21
|
+
Version: 0.0.141
|
|
22
|
+
License: null
|
|
23
23
|
Private: false
|
|
24
|
-
Description:
|
|
25
|
-
Repository: undefined
|
|
26
|
-
Homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/utils
|
|
27
|
-
Author: Sentry
|
|
28
|
-
License Copyright:
|
|
29
|
-
===
|
|
30
|
-
|
|
31
|
-
Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved.
|
|
32
|
-
|
|
33
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
34
|
-
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
|
35
|
-
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
36
|
-
persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
37
|
-
|
|
38
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
|
39
|
-
Software.
|
|
40
|
-
|
|
41
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
42
|
-
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
43
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
44
|
-
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
24
|
+
Description: Contracts for Onfido in-house analytics
|
|
45
25
|
|
|
46
26
|
---
|
|
47
27
|
|
|
@@ -77,8 +57,36 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
77
57
|
|
|
78
58
|
---
|
|
79
59
|
|
|
60
|
+
Name: @sentry/utils
|
|
61
|
+
Version: 7.60.0
|
|
62
|
+
License: MIT
|
|
63
|
+
Private: false
|
|
64
|
+
Description: Utilities for all Sentry JavaScript SDKs
|
|
65
|
+
Repository: undefined
|
|
66
|
+
Homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/utils
|
|
67
|
+
Author: Sentry
|
|
68
|
+
License Copyright:
|
|
69
|
+
===
|
|
70
|
+
|
|
71
|
+
Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved.
|
|
72
|
+
|
|
73
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
74
|
+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
|
75
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
76
|
+
persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
77
|
+
|
|
78
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
|
79
|
+
Software.
|
|
80
|
+
|
|
81
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
82
|
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
83
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
84
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
80
88
|
Name: ua-parser-js
|
|
81
|
-
Version: 1.0.
|
|
89
|
+
Version: 1.0.35
|
|
82
90
|
License: MIT
|
|
83
91
|
Private: false
|
|
84
92
|
Description: Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment
|
|
@@ -213,7 +221,7 @@ License Copyright:
|
|
|
213
221
|
|
|
214
222
|
MIT License
|
|
215
223
|
|
|
216
|
-
Copyright (c) 2012-
|
|
224
|
+
Copyright (c) 2012-2021 Faisal Salman <<f@faisalman.com>>
|
|
217
225
|
|
|
218
226
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
219
227
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -235,14 +243,6 @@ SOFTWARE.
|
|
|
235
243
|
|
|
236
244
|
---
|
|
237
245
|
|
|
238
|
-
Name: @onfido/sdk-analytics
|
|
239
|
-
Version: 0.0.129
|
|
240
|
-
License: null
|
|
241
|
-
Private: false
|
|
242
|
-
Description: Contracts for Onfido in-house analytics
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
246
|
Name: js-cookie
|
|
247
247
|
Version: 3.0.5
|
|
248
248
|
License: MIT
|
|
@@ -278,7 +278,7 @@ SOFTWARE.
|
|
|
278
278
|
---
|
|
279
279
|
|
|
280
280
|
Name: @onfido/capture-contract
|
|
281
|
-
Version: 0.0.0-master.
|
|
281
|
+
Version: 0.0.0-master.2089493
|
|
282
282
|
License: null
|
|
283
283
|
Private: false
|
|
284
284
|
Description: Contracts for the SDKs and modules
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onfido-sdk-ui",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.54.0",
|
|
4
4
|
"description": "JavaScript SDK view layer for Onfido identity verification",
|
|
5
5
|
"author": "Onfido Customer Support <support@onfido.com> (https://documentation.onfido.com/sdk/web/)",
|
|
6
6
|
"repository": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"main": "Onfido.js",
|
|
12
12
|
"types": "types/loader.d.ts",
|
|
13
13
|
"files": [
|
|
14
|
-
"Onfido
|
|
14
|
+
"Onfido.js",
|
|
15
15
|
"types"
|
|
16
16
|
],
|
|
17
17
|
"keywords": [
|
package/types/Events.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CaptureModule } from '
|
|
2
|
-
import type { SdkError } from '
|
|
3
|
-
import type { Event } from '
|
|
4
|
-
import type { CompleteData } from '
|
|
1
|
+
import type { CaptureModule } from '../../../shared/src/Types';
|
|
2
|
+
import type { SdkError } from '../../../shared/src/Error';
|
|
3
|
+
import type { Event } from '../../../shared/src/EventEmitter';
|
|
4
|
+
import type { CompleteData } from '../../../shared/src/SdkParameters';
|
|
5
5
|
export type ModuleEvent<T extends string> = {
|
|
6
6
|
module: CaptureModule;
|
|
7
7
|
id: string;
|
package/types/Onfido.d.ts
CHANGED
|
@@ -1,158 +1,12 @@
|
|
|
1
1
|
import type { CaptureRunEvents } from './Events';
|
|
2
|
+
import { ClassicSdkParameters } from '../../../shared/src/SdkParameters';
|
|
3
|
+
import type { Listener } from '../../../shared/src/EventEmitter';
|
|
4
|
+
import { SdkParameters } from '../../../shared/src/SdkParameters';
|
|
5
|
+
import { StudioSdkParameters } from '../../../shared/src/SdkParameters';
|
|
2
6
|
|
|
3
7
|
export declare const backwardCompatibility: (parameter: SdkParameters) => SdkParameters;
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare enum CaptureModuleType {
|
|
8
|
-
HOSTED = "hosted",
|
|
9
|
-
EXTERNAL = "external"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare type ChallengePayload = {
|
|
13
|
-
type: 'recite';
|
|
14
|
-
query: number[];
|
|
15
|
-
} | {
|
|
16
|
-
type: 'movement';
|
|
17
|
-
query: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export declare type ClassicSdkParameters = {
|
|
21
|
-
steps: LegacyStepDefinition[];
|
|
22
|
-
} & TokenParameters;
|
|
23
|
-
|
|
24
|
-
declare type Common = {
|
|
25
|
-
sdk_metadata: string;
|
|
26
|
-
sdk_source: string;
|
|
27
|
-
sdk_version: string;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
declare type CommonSdkParameters = {
|
|
31
|
-
containerEl?: HTMLElement;
|
|
32
|
-
containerId?: string;
|
|
33
|
-
onError?: ErrorCallback_2;
|
|
34
|
-
onComplete?: (data: CompleteData) => void;
|
|
35
|
-
showExitButton?: boolean;
|
|
36
|
-
onUserExit?: UserExitCallback;
|
|
37
|
-
onExternalLink?: ExternalLinkCallback;
|
|
38
|
-
enterpriseFeatures?: EnterpriseFeatureParameter;
|
|
39
|
-
theme?: Theme;
|
|
40
|
-
customUI?: ThemeConfig;
|
|
41
|
-
language?: string | LegacyLanguageParameter;
|
|
42
|
-
translations?: Translations;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
declare type CompleteData = Record<string, unknown>;
|
|
46
|
-
|
|
47
|
-
declare type CrossDeviceMethod = 'copy_link' | 'qr_code' | 'sms';
|
|
48
|
-
|
|
49
|
-
declare type CrossDevicePolicy = 'enable' | 'force' | 'disable';
|
|
50
|
-
|
|
51
|
-
declare type CrossDeviceSdkParameters = CommonSdkParameters & {
|
|
52
|
-
roomId?: string;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
declare type CustomCallbackFormatterType = 'raw' | 'formData';
|
|
56
|
-
|
|
57
|
-
declare type DocumentImageResponse = {
|
|
58
|
-
applicant_id: string;
|
|
59
|
-
type: DocumentType_2;
|
|
60
|
-
side: DocumentSides;
|
|
61
|
-
issuing_country: string;
|
|
62
|
-
sdk_warnings: ImageQualityWarnings & {
|
|
63
|
-
image_quality: {
|
|
64
|
-
quality: string;
|
|
65
|
-
breakdown: {
|
|
66
|
-
document: {
|
|
67
|
-
has_document: boolean;
|
|
68
|
-
detection_score: number;
|
|
69
|
-
} & Score;
|
|
70
|
-
has_document: boolean;
|
|
71
|
-
cutoff: {
|
|
72
|
-
has_cutoff: boolean;
|
|
73
|
-
score: number;
|
|
74
|
-
} & Score;
|
|
75
|
-
blur: {
|
|
76
|
-
has_blur: boolean;
|
|
77
|
-
score: number;
|
|
78
|
-
blur_model: string;
|
|
79
|
-
} & Score;
|
|
80
|
-
glare: {
|
|
81
|
-
score: number;
|
|
82
|
-
bbox: [number, number, number, number];
|
|
83
|
-
has_glare: boolean;
|
|
84
|
-
threshold: number;
|
|
85
|
-
glare_model: string;
|
|
86
|
-
};
|
|
87
|
-
barcode: {
|
|
88
|
-
result: string;
|
|
89
|
-
properties: Record<string, string>;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
image_quality_uuid: string;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
classification: {
|
|
96
|
-
issuing_country: null;
|
|
97
|
-
document_version: null;
|
|
98
|
-
side?: DocumentSides;
|
|
99
|
-
document_type?: DocumentType_2;
|
|
100
|
-
};
|
|
101
|
-
document_features: {
|
|
102
|
-
has_nfc: boolean;
|
|
103
|
-
};
|
|
104
|
-
} & UploadFileResponse;
|
|
105
|
-
|
|
106
|
-
declare type DocumentSides = 'front' | 'back';
|
|
107
|
-
|
|
108
|
-
declare type DocumentType_2 = 'driving_licence' | 'national_identity_card' | 'residence_permit' | 'passport';
|
|
109
|
-
|
|
110
|
-
declare type EnterpriseCallbackResponse<T> = {
|
|
111
|
-
continueWithOnfidoSubmission?: boolean;
|
|
112
|
-
onfidoSuccessResponse?: T;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
declare type EnterpriseFeatureCallback = {
|
|
116
|
-
useCustomizedApiRequests?: boolean;
|
|
117
|
-
formatter?: CustomCallbackFormatterType;
|
|
118
|
-
onSubmitDocument?: (data: FormData | SubmitDocument) => Promise<EnterpriseCallbackResponse<DocumentImageResponse>>;
|
|
119
|
-
onSubmitSelfie?: (data: FormData | SubmitSelfie) => Promise<EnterpriseCallbackResponse<UploadFileResponse>>;
|
|
120
|
-
onSubmitVideo?: (data: FormData | SubmitVideo) => Promise<EnterpriseCallbackResponse<FaceVideoResponse>>;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
declare type EnterpriseFeatureParameter = EnterpriseFeatures & EnterpriseFeatureCallback;
|
|
124
|
-
|
|
125
|
-
declare type EnterpriseFeatures = {
|
|
126
|
-
hideOnfidoLogo?: boolean;
|
|
127
|
-
cobrand?: {
|
|
128
|
-
text?: string;
|
|
129
|
-
};
|
|
130
|
-
logoCobrand?: {
|
|
131
|
-
lightLogoSrc?: string;
|
|
132
|
-
darkLogoSrc?: string;
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
declare type ErrorCallback_2 = (error: {
|
|
137
|
-
type: SdkErrorTypes;
|
|
138
|
-
message: string;
|
|
139
|
-
exception?: Error | unknown;
|
|
140
|
-
}) => void;
|
|
141
|
-
|
|
142
|
-
declare type Event_2<T extends string> = {
|
|
143
|
-
type: T;
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
declare type ExternalLinkCallback = (url: string) => void;
|
|
147
|
-
|
|
148
|
-
declare type ExternalModule = {
|
|
149
|
-
url: string;
|
|
150
|
-
} & ModuleType<CaptureModuleType.EXTERNAL>;
|
|
151
|
-
|
|
152
|
-
declare type FaceVideoResponse = {
|
|
153
|
-
challenge: ChallengePayload[];
|
|
154
|
-
languages: VideoChallengeLanguage[];
|
|
155
|
-
} & UploadFileResponse;
|
|
9
|
+
export { ClassicSdkParameters }
|
|
156
10
|
|
|
157
11
|
export declare type Handle = {
|
|
158
12
|
addEventListener: <EventName extends keyof CaptureRunEvents>(eventName: EventName, listener: Listener<CaptureRunEvents[EventName]>) => void;
|
|
@@ -161,148 +15,14 @@ export declare type Handle = {
|
|
|
161
15
|
version?: string;
|
|
162
16
|
};
|
|
163
17
|
|
|
164
|
-
declare type HostedModule = {
|
|
165
|
-
version?: string;
|
|
166
|
-
module: string;
|
|
167
|
-
} & ModuleType<CaptureModuleType.HOSTED>;
|
|
168
|
-
|
|
169
|
-
declare type ImageQualityValidationTypes = 'detect_barcode' | 'detect_document' | 'detect_cutoff' | 'detect_glare' | 'detect_blur';
|
|
170
|
-
|
|
171
|
-
declare type ImageQualityWarnings = Partial<Record<ImageQualityValidationTypes, {
|
|
172
|
-
valid: boolean;
|
|
173
|
-
}>>;
|
|
174
|
-
|
|
175
|
-
declare type LegacyLanguageParameter = {
|
|
176
|
-
locale?: string;
|
|
177
|
-
phrases?: Record<string, string>;
|
|
178
|
-
mobilePhrases?: Record<string, string>;
|
|
179
|
-
direction?: LocaleDirection;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
declare type LegacyStepDefinition = LegacyStepType | StepDefinition;
|
|
183
|
-
|
|
184
|
-
declare type LegacyStepType = 'welcome' | 'complete' | 'face' | 'consent' | 'document' | 'poa';
|
|
185
|
-
|
|
186
|
-
declare type Listener<E extends Event_2<any>> = (e: E) => void;
|
|
187
|
-
|
|
188
|
-
declare type LocaleDirection = 'ltr' | 'rtl';
|
|
189
|
-
|
|
190
|
-
declare type ModuleType<T extends CaptureModuleType> = {
|
|
191
|
-
type: T;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
18
|
export declare const Onfido: OnfidoApi;
|
|
195
19
|
|
|
196
20
|
export declare type OnfidoApi = {
|
|
197
21
|
init: (parameter: SdkParameters) => Handle;
|
|
198
22
|
};
|
|
199
23
|
|
|
200
|
-
|
|
201
|
-
min: number;
|
|
202
|
-
max: number;
|
|
203
|
-
threshold: number;
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
declare type SdkErrorTypes = 'invalid_token' | 'expired_token' | 'expired_trial' | 'geoblocked_request' | 'permissions_unavailable' | 'exception' | 'unsupported' | 'unsupported_feature' | 'invalid_sdk_parameter' | 'restart' | 'desktop' | 'unsupported_sdk_version' | 'no_camera' | 'user_consent_denied' | 'uncaught_fetch_error' | 'lazy_component_load_error' | 'api_error' | 'cross_device_verification_invalid' | 'cross_device_verification_abort' | 'workflow_abandoned' | 'workflow_error' | 'workflow_input_error' | 'cross_device_desktop_unavailable' | 'cross_device_connection_lost';
|
|
207
|
-
|
|
208
|
-
export declare type SdkParameters = StudioSdkParameters | ClassicSdkParameters | CrossDeviceSdkParameters;
|
|
209
|
-
|
|
210
|
-
declare type StepDefinition = {
|
|
211
|
-
type: LegacyStepType | string;
|
|
212
|
-
options?: Record<string, unknown>;
|
|
213
|
-
module?: CaptureModule;
|
|
214
|
-
/**
|
|
215
|
-
* the key used to serialize the output for onComplete
|
|
216
|
-
*/
|
|
217
|
-
key?: string;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
export declare type StudioSdkParameters = {
|
|
221
|
-
workflowRunId: string;
|
|
222
|
-
disableWelcomeScreen?: boolean;
|
|
223
|
-
disableCompleteScreen?: boolean;
|
|
224
|
-
onBiometricTokenGenerated?: (customerUserHash: string, biometricToken: string) => void;
|
|
225
|
-
onBiometricTokenRequested?: (customerUserHash: string) => Promise<string>;
|
|
226
|
-
} & TokenParameters;
|
|
24
|
+
export { SdkParameters }
|
|
227
25
|
|
|
228
|
-
|
|
229
|
-
file: Blob;
|
|
230
|
-
side: DocumentSides;
|
|
231
|
-
type: string;
|
|
232
|
-
sdk_validations: string;
|
|
233
|
-
} & Common;
|
|
234
|
-
|
|
235
|
-
declare type SubmitSelfie = {
|
|
236
|
-
file: Blob;
|
|
237
|
-
snapshot: {
|
|
238
|
-
blob: Blob;
|
|
239
|
-
filename: string;
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
declare type SubmitVideo = {
|
|
244
|
-
file: Blob;
|
|
245
|
-
challenge: string;
|
|
246
|
-
challenge_id: string;
|
|
247
|
-
challenge_switch_at: number | undefined;
|
|
248
|
-
languages: string;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
declare type Theme = {
|
|
252
|
-
name: 'light' | 'dark';
|
|
253
|
-
config?: ThemeConfig;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
declare type ThemeConfig = Record<string, any>;
|
|
257
|
-
|
|
258
|
-
declare type TokenParameters = {
|
|
259
|
-
token: string;
|
|
260
|
-
language?: string | LegacyLanguageParameter;
|
|
261
|
-
translations?: Translations;
|
|
262
|
-
theme?: Theme;
|
|
263
|
-
/***
|
|
264
|
-
* You can change the default country for the SMS number input by passing the
|
|
265
|
-
* smsNumberCountryCode option when the SDK is initialized. The value should
|
|
266
|
-
* be a string containing a 2-character ISO Country code. If empty, the SMS
|
|
267
|
-
* number country code will default to GB.
|
|
268
|
-
*/
|
|
269
|
-
smsNumberCountryCode?: string;
|
|
270
|
-
userDetails?: UserDetails;
|
|
271
|
-
_crossDeviceLinkMethods?: CrossDeviceMethod[];
|
|
272
|
-
crossDeviceClientIntroProductLogoSrc?: string;
|
|
273
|
-
crossDevicePolicy?: CrossDevicePolicy;
|
|
274
|
-
disableAnalytics?: boolean;
|
|
275
|
-
disableAnalyticsCookies?: boolean;
|
|
276
|
-
} & CommonSdkParameters;
|
|
277
|
-
|
|
278
|
-
declare type TranslationItem<T> = T | (() => Promise<T>);
|
|
279
|
-
|
|
280
|
-
declare type Translations<T = unknown> = Record<string, TranslationItem<T>>;
|
|
281
|
-
|
|
282
|
-
declare type UploadFileResponse = {
|
|
283
|
-
id: string;
|
|
284
|
-
created_at: string;
|
|
285
|
-
file_name: string;
|
|
286
|
-
file_type: string;
|
|
287
|
-
file_size: number;
|
|
288
|
-
href: string;
|
|
289
|
-
download_href: string;
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
declare enum UserAction {
|
|
293
|
-
USER_EXIT = "user_exit",
|
|
294
|
-
USER_CONSENT_DENIED = "user_consent_denied"
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
declare type UserDetails = {
|
|
298
|
-
smsNumber?: string;
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
declare type UserExitCallback = (action: UserAction) => void;
|
|
302
|
-
|
|
303
|
-
declare type VideoChallengeLanguage = {
|
|
304
|
-
source: string;
|
|
305
|
-
language_code: string;
|
|
306
|
-
};
|
|
26
|
+
export { StudioSdkParameters }
|
|
307
27
|
|
|
308
28
|
export { }
|
|
@@ -25,6 +25,7 @@ export type GenericDocumentType = {
|
|
|
25
25
|
country: string;
|
|
26
26
|
pages: number;
|
|
27
27
|
};
|
|
28
|
+
export type NfcPolicy = 'Disabled' | 'Optional' | 'Required';
|
|
28
29
|
export type DocumentModuleConfiguration = {
|
|
29
30
|
filter?: DocumentSelectionFilter;
|
|
30
31
|
/**
|
|
@@ -32,6 +33,7 @@ export type DocumentModuleConfiguration = {
|
|
|
32
33
|
*/
|
|
33
34
|
hideCountrySelection?: boolean;
|
|
34
35
|
uploadFallback?: boolean;
|
|
36
|
+
nfcPolicy?: NfcPolicy;
|
|
35
37
|
};
|
|
36
38
|
export type DocumentModuleInput = {
|
|
37
39
|
preferredUserCountry?: string;
|
|
@@ -49,8 +51,12 @@ export type DocumentIds = {
|
|
|
49
51
|
back_video?: DocumentSideOutput;
|
|
50
52
|
};
|
|
51
53
|
export type DocumentModuleOutput = {
|
|
52
|
-
|
|
54
|
+
issuingCountry: string;
|
|
55
|
+
documentType: string;
|
|
53
56
|
sides: DocumentIds;
|
|
57
|
+
nfcKey?: string;
|
|
58
|
+
aaChallenge?: number[];
|
|
59
|
+
documentVersion?: string;
|
|
54
60
|
};
|
|
55
61
|
export type EnabledDocumentType = {
|
|
56
62
|
country: string;
|
package/types/loader.d.ts
CHANGED
package/types/shared/Error.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
+
import { FlowStatesFlowErrorStatesEnum } from '@onfido/sdk-analytics/models/FlowStates';
|
|
1
2
|
import type { Configuration } from './Types';
|
|
2
3
|
export declare enum SdkErrorLevel {
|
|
3
4
|
EXTERNAL = "external",
|
|
4
5
|
INTERNAL = "internal"
|
|
5
6
|
}
|
|
6
|
-
export type SdkErrorTypes = 'invalid_token' | 'expired_token' | 'expired_trial' | 'geoblocked_request' | 'permissions_unavailable' | 'exception' | 'unsupported' | 'unsupported_feature' | 'invalid_sdk_parameter' | 'restart' | 'desktop' | 'unsupported_sdk_version' | 'no_camera' | 'user_consent_denied' | 'uncaught_fetch_error' | 'lazy_component_load_error' | 'api_error' | 'cross_device_verification_invalid' | 'cross_device_verification_abort' | 'workflow_abandoned' | 'workflow_error' | 'workflow_input_error' | 'cross_device_desktop_unavailable' | 'cross_device_connection_lost';
|
|
7
|
+
export type SdkErrorTypes = 'invalid_token' | 'expired_token' | 'expired_trial' | 'geoblocked_request' | 'permissions_unavailable' | 'exception' | 'unsupported' | 'unsupported_feature' | 'invalid_sdk_parameter' | 'restart' | 'desktop' | 'unsupported_sdk_version' | 'no_camera' | 'user_consent_denied' | 'uncaught_fetch_error' | 'lazy_component_load_error' | 'api_error' | 'cross_device_verification_invalid' | 'cross_device_verification_abort' | 'workflow_abandoned' | 'workflow_error' | 'workflow_input_error' | 'cross_device_desktop_unavailable' | 'cross_device_connection_lost' | 'module_load_error';
|
|
7
8
|
export declare const isSdkError: (error: unknown) => boolean;
|
|
9
|
+
export declare const isSdkErrorsType: (error: unknown) => boolean;
|
|
8
10
|
export type SdkErrors = {
|
|
9
11
|
type: SdkErrorTypes;
|
|
10
12
|
message: string;
|
|
11
13
|
level: SdkErrorLevel;
|
|
14
|
+
expound?: string;
|
|
15
|
+
analyticsError?: FlowStatesFlowErrorStatesEnum;
|
|
12
16
|
};
|
|
13
17
|
export declare const CrossDeviceDesktopUnavailable: SdkErrors;
|
|
14
18
|
export declare const CrossDeviceConnectionLost: SdkErrors;
|
|
@@ -34,6 +38,7 @@ export declare const UserConsentDeniedError: SdkErrors;
|
|
|
34
38
|
export declare const ApiError: SdkErrors;
|
|
35
39
|
export declare const UncaughtFetchError: SdkErrors;
|
|
36
40
|
export declare const LazyComponentLoadError: SdkErrors;
|
|
41
|
+
export declare const ModuleLoadError: SdkErrors;
|
|
37
42
|
export type ErrorModuleConfiguration = Configuration & {
|
|
38
43
|
type: SdkErrorTypes;
|
|
39
44
|
};
|
|
@@ -43,10 +48,11 @@ export declare class SdkError extends Error {
|
|
|
43
48
|
type: SdkErrorTypes;
|
|
44
49
|
exception?: Error | unknown;
|
|
45
50
|
level: SdkErrorLevel;
|
|
51
|
+
analyticsError?: FlowStatesFlowErrorStatesEnum;
|
|
46
52
|
body?: unknown;
|
|
47
53
|
httpCode?: number;
|
|
48
54
|
stack?: string;
|
|
49
|
-
constructor({ type, message, level, exception, stack, body, httpCode, }: {
|
|
55
|
+
constructor({ type, message, level, exception, stack, body, httpCode, analyticsError, }: {
|
|
50
56
|
type: SdkErrorTypes;
|
|
51
57
|
message: string;
|
|
52
58
|
level: SdkErrorLevel;
|
|
@@ -54,6 +60,7 @@ export declare class SdkError extends Error {
|
|
|
54
60
|
stack?: string;
|
|
55
61
|
body?: unknown;
|
|
56
62
|
httpCode?: number;
|
|
63
|
+
analyticsError?: FlowStatesFlowErrorStatesEnum;
|
|
57
64
|
});
|
|
58
65
|
encode(): {
|
|
59
66
|
name: string;
|
|
@@ -64,6 +71,7 @@ export declare class SdkError extends Error {
|
|
|
64
71
|
exception: unknown;
|
|
65
72
|
body: unknown;
|
|
66
73
|
httpCode: number | undefined;
|
|
74
|
+
analyticsError: FlowStatesFlowErrorStatesEnum | undefined;
|
|
67
75
|
};
|
|
68
76
|
static decode(error: SdkError): SdkError;
|
|
69
77
|
}
|
|
@@ -73,3 +81,4 @@ export type ErrorCallback = (error: {
|
|
|
73
81
|
exception?: Error | unknown;
|
|
74
82
|
}) => void;
|
|
75
83
|
export declare const formatError: (error: SdkError | Error | unknown) => unknown;
|
|
84
|
+
export declare const formatErrorMessage: (errorCategory: string, SdkError: SdkErrors) => SdkErrors;
|
|
@@ -22,9 +22,9 @@ export type SdkFeatures = {
|
|
|
22
22
|
web_disable_has_camera_check?: boolean;
|
|
23
23
|
web_enable_cross_device_confirmation?: boolean;
|
|
24
24
|
web_enable_cross_device_qr_refresh?: boolean;
|
|
25
|
-
web_enable_cross_device_reconnect?: boolean;
|
|
26
25
|
web_enable_cross_device_verification?: boolean;
|
|
27
26
|
web_enable_js_camera_poa?: boolean;
|
|
27
|
+
web_enable_lazy_component?: boolean;
|
|
28
28
|
web_enable_pre_init_permission_check?: boolean;
|
|
29
29
|
web_enable_shared_iframe?: boolean;
|
|
30
30
|
};
|
package/types/shared/Types.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type ModuleFinishOptions = {
|
|
|
21
21
|
export type SharedFrameMethod = 'moduleVisibility' | 'loaderVisibility' | 'tearDown' | 'waitForModule';
|
|
22
22
|
export type ExecutorMethod = 'bootstrap' | 'ping' | 'start';
|
|
23
23
|
export type CrossDeviceExecutorMethod = 'crossDevice.update' | 'crossDevice.abort';
|
|
24
|
-
export type RunnerMethod = 'captureModule.finish' | 'captureModule.error' | 'captureModule.unsupported' | 'crossDevice.start' | 'crossDevice.preload' | 'crossDevice.verify' | 'crossDevice.abort' | 'crossDevice.regenerate' | 'analytics.send' | 'analyticsV2.send' | 'analytics.userAnalytics' | 'navigation.back' | 'navigation.exit' | 'navigation.externalLink' | 'navigation.closeExternalLink' | 'customCallback.invoke' | 'passkey.create' | 'passkey.get' | 'crossDevice.browserReload';
|
|
24
|
+
export type RunnerMethod = 'moduleState.update' | 'captureModule.finish' | 'captureModule.error' | 'captureModule.unsupported' | 'crossDevice.start' | 'crossDevice.preload' | 'crossDevice.verify' | 'crossDevice.abort' | 'crossDevice.regenerate' | 'analytics.send' | 'analyticsV2.send' | 'analytics.userAnalytics' | 'navigation.back' | 'navigation.exit' | 'navigation.externalLink' | 'navigation.closeExternalLink' | 'customCallback.invoke' | 'passkey.create' | 'passkey.get' | 'crossDevice.browserReload';
|
|
25
25
|
export type Configuration<T = unknown> = {
|
|
26
26
|
translations?: T;
|
|
27
27
|
theme?: Theme;
|
|
@@ -55,6 +55,10 @@ export declare enum Platform {
|
|
|
55
55
|
IOS = "ios",
|
|
56
56
|
ANDROID = "android"
|
|
57
57
|
}
|
|
58
|
+
export declare enum OnfidoIntegrationType {
|
|
59
|
+
SmartCaptureLinkGeneric = "smart-capture-link-generic",
|
|
60
|
+
SmartCaptureLinkUnique = "smart-capture-link-unique"
|
|
61
|
+
}
|
|
58
62
|
type ExecutionContextConfiguration = {
|
|
59
63
|
crossDevicePolicy?: CrossDevicePolicy;
|
|
60
64
|
supportsCrossDevice?: boolean;
|
|
@@ -81,6 +85,7 @@ export type ExecutionContext = {
|
|
|
81
85
|
permission?: Permission;
|
|
82
86
|
customCallbacks?: CustomCallbacks;
|
|
83
87
|
currentScriptHostname?: string;
|
|
88
|
+
previousState?: unknown;
|
|
84
89
|
};
|
|
85
90
|
export type UserDetails = {
|
|
86
91
|
smsNumber?: string;
|
|
@@ -106,6 +111,7 @@ export type ClientConfiguration = {
|
|
|
106
111
|
version: string;
|
|
107
112
|
sdk_environment: string;
|
|
108
113
|
distribution_source: string;
|
|
114
|
+
integration_source?: OnfidoIntegrationType;
|
|
109
115
|
pinned_version?: string;
|
|
110
116
|
};
|
|
111
117
|
logger: {
|
package/Onfido.iife.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f=Object.defineProperty;var w=(s,o,d)=>o in s?f(s,o,{enumerable:!0,configurable:!0,writable:!0,value:d}):s[o]=d;var h=(s,o,d)=>(w(s,typeof o!="symbol"?o+"":o,d),d);(function(s){"use strict";class o{constructor(){this.eventListener={}}addEventListener(i,e){return this.eventListener[i]=this.eventListener[i]||[],this.eventListener[i].push(e),this}removeEventListener(i,e){const n=this.eventListener[i];if(n){let r;for(;(r=n.indexOf(e))!==-1;)n.splice(r,1)}}trigger(i,e){(this.eventListener[i]||[]).forEach(n=>{n==null||n(e)})}}const d="v14";window.OnfidoDistribution={name:"NPM"};class c extends o{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(n=>n(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([n,r])=>{e.addEventListener(n,r)}),this.eventListener={}}addEventListener(e,n){return this._handle?(this._handle.addEventListener(e,n),this):super.addEventListener(e,n)}removeEventListener(e,n){if(this._handle)return this._handle.removeEventListener(e,n),this;super.removeEventListener(e,n)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=t=>`v${(t||d).replace(/^v/,"")}`,v={init(t){const i=new c;return import(/* webpackIgnore: true */ /* @vite-ignore */ t.sdkUrl||`https://sdk.onfido.com/${l(t.version)}/Onfido.js`).then(n=>{const{Onfido:r}=n;i._setHandle(r.init(t))}).catch(n=>{var r;i.trigger("error",{error:n}),(r=t.onError)==null||r.call(t,n)}),i}};Object.defineProperty(v,"environment",{get:()=>window==null?void 0:window.Onfido.environment,set:t=>{window.Onfido=window.Onfido||{},window.Onfido.environment=t}});const a=v;s.Onfido=a,s.prefixVersion=l,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})})(this.window=this.window||{});
|
package/Onfido.umd.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.window=t.window||{}))})(this,function(t){"use strict";var a=Object.defineProperty;var u=(t,i,r)=>i in t?a(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r;var h=(t,i,r)=>(u(t,typeof i!="symbol"?i+"":i,r),r);class i{constructor(){this.eventListener={}}addEventListener(o,e){return this.eventListener[o]=this.eventListener[o]||[],this.eventListener[o].push(e),this}removeEventListener(o,e){const n=this.eventListener[o];if(n){let d;for(;(d=n.indexOf(e))!==-1;)n.splice(d,1)}}trigger(o,e){(this.eventListener[o]||[]).forEach(n=>{n==null||n(e)})}}const r="v14";window.OnfidoDistribution={name:"NPM"};class c extends i{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(n=>n(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([n,d])=>{e.addEventListener(n,d)}),this.eventListener={}}addEventListener(e,n){return this._handle?(this._handle.addEventListener(e,n),this):super.addEventListener(e,n)}removeEventListener(e,n){if(this._handle)return this._handle.removeEventListener(e,n),this;super.removeEventListener(e,n)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=s=>`v${(s||r).replace(/^v/,"")}`,f={init(s){const o=new c;return import(/* webpackIgnore: true */ /* @vite-ignore */ s.sdkUrl||`https://sdk.onfido.com/${l(s.version)}/Onfido.js`).then(n=>{const{Onfido:d}=n;o._setHandle(d.init(s))}).catch(n=>{var d;o.trigger("error",{error:n}),(d=s.onError)==null||d.call(s,n)}),o}};Object.defineProperty(f,"environment",{get:()=>window==null?void 0:window.Onfido.environment,set:s=>{window.Onfido=window.Onfido||{},window.Onfido.environment=s}});const v=f;t.Onfido=v,t.prefixVersion=l,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|