onfido-sdk-ui 14.13.0-rc.0 → 14.15.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/Onfido.iife.js +1 -1
- package/Onfido.js +1 -1
- package/Onfido.umd.cjs +1 -1
- package/license +3 -3
- package/package.json +2 -2
- package/types/Events.d.ts +4 -0
- package/types/Types.d.ts +6 -5
- package/types/loader.d.ts +20 -0
- package/types/shared/Enterprise.d.ts +51 -3
- package/types/shared/Types.d.ts +6 -1
package/Onfido.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var v=Object.defineProperty;var L=(i,r,d)=>r in i?v(i,r,{enumerable:!0,configurable:!0,writable:!0,value:d}):i[r]=d;var o=(i,r,d)=>(L(i,typeof r!="symbol"?r+"":r,d),d);(function(i){"use strict";class r{constructor(){this.eventListener={}}addEventListener(n,e){return this.eventListener[n]=this.eventListener[n]||[],this.eventListener[n].push(e),this}removeEventListener(n,e){const t=this.eventListener[n];if(t){let h;for(;(h=t.indexOf(e))!==-1;)t.splice(h,1)}}trigger(n,e){e.type=n,(this.eventListener[n]||[]).forEach(t=>{t(e)})}}const d="v14";class c extends r{constructor(){super(...arguments);o(this,"_handle");o(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,h])=>{e.addEventListener(t,h)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}tearDown(){var e;this._handle?(e=this._handle)==null||e.tearDown():this._handleSetCallbacks.push(()=>{this.tearDown()})}}const l=s=>`v${(s||d).replace(/^v/,"")}`,a={init(s){const n=new c;return import(s.sdkUrl||`https://sdk.onfido.com/${l(s.version)}/Onfido.js`).then(t=>{const{Onfido:h}=t;n._setHandle(h.init(s))}).catch(t=>{var h;n.trigger("error",{error:t}),(h=s.onError)==null||h.call(s,t)}),n}};i.Onfido=a,i.prefixVersion=l,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})})(this.window=this.window||{});
|
|
1
|
+
var v=Object.defineProperty;var L=(i,r,d)=>r in i?v(i,r,{enumerable:!0,configurable:!0,writable:!0,value:d}):i[r]=d;var o=(i,r,d)=>(L(i,typeof r!="symbol"?r+"":r,d),d);(function(i){"use strict";class r{constructor(){this.eventListener={}}addEventListener(n,e){return this.eventListener[n]=this.eventListener[n]||[],this.eventListener[n].push(e),this}removeEventListener(n,e){const t=this.eventListener[n];if(t){let h;for(;(h=t.indexOf(e))!==-1;)t.splice(h,1)}}trigger(n,e){e.type=n,(this.eventListener[n]||[]).forEach(t=>{t(e)})}}const d="v14";class c extends r{constructor(){super(...arguments);o(this,"_handle");o(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,h])=>{e.addEventListener(t,h)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}tearDown(){var e;this._handle?(e=this._handle)==null||e.tearDown():this._handleSetCallbacks.push(()=>{this.tearDown()})}}const l=s=>`v${(s||d).replace(/^v/,"")}`,a={init(s){const n=new c;return import(/* webpackIgnore: true */ s.sdkUrl||`https://sdk.onfido.com/${l(s.version)}/Onfido.js`).then(t=>{const{Onfido:h}=t;n._setHandle(h.init(s))}).catch(t=>{var h;n.trigger("error",{error:t}),(h=s.onError)==null||h.call(s,t)}),n}};i.Onfido=a,i.prefixVersion=l,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})})(this.window=this.window||{});
|
package/Onfido.js
CHANGED
|
@@ -52,7 +52,7 @@ class c extends o {
|
|
|
52
52
|
const v = (s) => `v${(s || l).replace(/^v/, "")}`, L = {
|
|
53
53
|
init(s) {
|
|
54
54
|
const t = new c();
|
|
55
|
-
return import(s.sdkUrl || `https://sdk.onfido.com/${v(s.version)}/Onfido.js`).then((n) => {
|
|
55
|
+
return import(/* webpackIgnore: true */ s.sdkUrl || `https://sdk.onfido.com/${v(s.version)}/Onfido.js`).then((n) => {
|
|
56
56
|
const { Onfido: i } = n;
|
|
57
57
|
t._setHandle(i.init(s));
|
|
58
58
|
}).catch((n) => {
|
package/Onfido.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.window=n.window||{}))})(this,function(n){"use strict";var v=Object.defineProperty;var a=(n,i,o)=>i in n?v(n,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[i]=o;var h=(n,i,o)=>(a(n,typeof i!="symbol"?i+"":i,o),o);class i{constructor(){this.eventListener={}}addEventListener(s,e){return this.eventListener[s]=this.eventListener[s]||[],this.eventListener[s].push(e),this}removeEventListener(s,e){const t=this.eventListener[s];if(t){let r;for(;(r=t.indexOf(e))!==-1;)t.splice(r,1)}}trigger(s,e){e.type=s,(this.eventListener[s]||[]).forEach(t=>{t(e)})}}const o="v14";class c extends i{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,r])=>{e.addEventListener(t,r)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}tearDown(){var e;this._handle?(e=this._handle)==null||e.tearDown():this._handleSetCallbacks.push(()=>{this.tearDown()})}}const l=d=>`v${(d||o).replace(/^v/,"")}`,f={init(d){const s=new c;return import(d.sdkUrl||`https://sdk.onfido.com/${l(d.version)}/Onfido.js`).then(t=>{const{Onfido:r}=t;s._setHandle(r.init(d))}).catch(t=>{var r;s.trigger("error",{error:t}),(r=d.onError)==null||r.call(d,t)}),s}};n.Onfido=f,n.prefixVersion=l,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.window=n.window||{}))})(this,function(n){"use strict";var v=Object.defineProperty;var a=(n,i,o)=>i in n?v(n,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[i]=o;var h=(n,i,o)=>(a(n,typeof i!="symbol"?i+"":i,o),o);class i{constructor(){this.eventListener={}}addEventListener(s,e){return this.eventListener[s]=this.eventListener[s]||[],this.eventListener[s].push(e),this}removeEventListener(s,e){const t=this.eventListener[s];if(t){let r;for(;(r=t.indexOf(e))!==-1;)t.splice(r,1)}}trigger(s,e){e.type=s,(this.eventListener[s]||[]).forEach(t=>{t(e)})}}const o="v14";class c extends i{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,r])=>{e.addEventListener(t,r)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}tearDown(){var e;this._handle?(e=this._handle)==null||e.tearDown():this._handleSetCallbacks.push(()=>{this.tearDown()})}}const l=d=>`v${(d||o).replace(/^v/,"")}`,f={init(d){const s=new c;return import(/* webpackIgnore: true */ d.sdkUrl||`https://sdk.onfido.com/${l(d.version)}/Onfido.js`).then(t=>{const{Onfido:r}=t;s._setHandle(r.init(d))}).catch(t=>{var r;s.trigger("error",{error:t}),(r=d.onError)==null||r.call(d,t)}),s}};n.Onfido=f,n.prefixVersion=l,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
package/license
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
Please see the terms of your Onfido Services Agreement which you are bound by with respect to your use of the Onfido
|
|
2
2
|
SDK. To the extent the Onfido SDK includes copies or substantial portions of software licenced under third party terms
|
|
3
|
-
and conditions this will be set out at https://sdk.onfido.com/capture/core/14.
|
|
3
|
+
and conditions this will be set out at https://sdk.onfido.com/capture/core/14.15.0/license.
|
|
4
4
|
|
|
5
5
|
In the event of any inconsistency between the Onfido Services Agreement and any third party terms and conditions, the
|
|
6
6
|
third party terms and conditions shall take precedence over the rights and
|
|
7
7
|
restrictions granted in the Onfido Services Agreement solely in respect of such third party dependencies set out
|
|
8
|
-
at https://sdk.onfido.com/capture/core/14.
|
|
8
|
+
at https://sdk.onfido.com/capture/core/14.15.0/license.
|
|
9
9
|
|
|
10
10
|
3rd party licenses
|
|
11
11
|
------------------
|
|
12
12
|
|
|
13
13
|
Name: @onfido/capture-shared
|
|
14
|
-
Version: 1.
|
|
14
|
+
Version: 1.22.0
|
|
15
15
|
License: null
|
|
16
16
|
Private: false
|
|
17
17
|
Description: A shared library to use in various capture packages
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onfido-sdk-ui",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.15.0",
|
|
4
4
|
"description": "JavaScript SDK view layer for Onfido identity verification",
|
|
5
5
|
"author": "Web SDK Customer Support <web-sdk@onfido.com> (https://github.com/onfido)",
|
|
6
6
|
"repository": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"license": "SEE LICENSE in LICENSE",
|
|
11
11
|
"main": "Onfido.js",
|
|
12
|
-
"types": "types/
|
|
12
|
+
"types": "types/loader.d.ts",
|
|
13
13
|
"files": [
|
|
14
14
|
"Onfido.*",
|
|
15
15
|
"types"
|
package/types/Events.d.ts
CHANGED
|
@@ -19,10 +19,14 @@ export type UserAnalyticsEvent = Event<'userAnalytics'> & {
|
|
|
19
19
|
export type ErrorEvent = {
|
|
20
20
|
error: ErrorType;
|
|
21
21
|
} & Event<'error'>;
|
|
22
|
+
export type PermissionUnknownEvent = Event<'permissionUnknown'> & {
|
|
23
|
+
permissionsRequired: string[];
|
|
24
|
+
};
|
|
22
25
|
export type CaptureRunEvents = {
|
|
23
26
|
complete: CompleteEvent;
|
|
24
27
|
error: ErrorEvent;
|
|
25
28
|
moduleStart: ModuleStartEvent;
|
|
26
29
|
moduleComplete: ModuleCompleteEvent;
|
|
27
30
|
userAnalytics: UserAnalyticsEvent;
|
|
31
|
+
permissionUnknown: PermissionUnknownEvent;
|
|
28
32
|
};
|
package/types/Types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LegacyStepDefinition, LegacyStepType, CrossDevicePolicy, EnterpriseFeatures, LocaleDirection, Theme, ThemeConfig, Translations } from './shared/Types';
|
|
1
|
+
import type { LegacyStepDefinition, LegacyStepType, CrossDevicePolicy, EnterpriseFeatures, LocaleDirection, Theme, ThemeConfig, Translations, UserDetails } from './shared/Types';
|
|
2
2
|
import type { CrossDeviceMethod } from './shared/CrossDeviceConnect.types';
|
|
3
3
|
import type { EnterpriseFeatureCallback } from './shared/Enterprise';
|
|
4
4
|
export declare const legacySteps: LegacyStepType[];
|
|
@@ -11,9 +11,11 @@ export type CommonSdkParameters = {
|
|
|
11
11
|
containerId?: string;
|
|
12
12
|
onError?: (error: ErrorType) => void;
|
|
13
13
|
onComplete?: (data: CompleteData) => void;
|
|
14
|
+
enterpriseFeatures?: EnterpriseFeatureParameter;
|
|
14
15
|
theme?: Theme;
|
|
15
16
|
customUI?: ThemeConfig;
|
|
16
|
-
|
|
17
|
+
language?: string | LegacyLanguageParameter;
|
|
18
|
+
translations?: Translations;
|
|
17
19
|
};
|
|
18
20
|
export type LegacyLanguageParameter = {
|
|
19
21
|
locale?: string;
|
|
@@ -33,9 +35,7 @@ export type TokenParameters = {
|
|
|
33
35
|
* number country code will default to GB.
|
|
34
36
|
*/
|
|
35
37
|
smsNumberCountryCode?: string;
|
|
36
|
-
userDetails?:
|
|
37
|
-
smsNumber?: string;
|
|
38
|
-
};
|
|
38
|
+
userDetails?: UserDetails;
|
|
39
39
|
_crossDeviceLinkMethods?: CrossDeviceMethod[];
|
|
40
40
|
crossDevicePolicy?: CrossDevicePolicy;
|
|
41
41
|
disableAnalytics?: boolean;
|
|
@@ -43,6 +43,7 @@ export type TokenParameters = {
|
|
|
43
43
|
} & CommonSdkParameters;
|
|
44
44
|
export type StudioSdkParameters = {
|
|
45
45
|
workflowRunId: string;
|
|
46
|
+
disableWelcomeScreen?: boolean;
|
|
46
47
|
} & TokenParameters;
|
|
47
48
|
export type ClassicSdkParameters = {
|
|
48
49
|
steps: LegacyStepDefinition[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Handle } from './Onfido';
|
|
2
|
+
import type { SdkParameters } from './Types';
|
|
3
|
+
export type LoaderParameter = {
|
|
4
|
+
/**
|
|
5
|
+
* This is a developer feature, if the sdk is hosted on a different url
|
|
6
|
+
* @deprecated
|
|
7
|
+
* @type {string}
|
|
8
|
+
*/
|
|
9
|
+
sdkUrl?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The version of the sdk to be loaded, by default v14 is used, which
|
|
12
|
+
* is always fresh. Valid examples are 14 (default), 14.x (which pins the version to a minor version
|
|
13
|
+
* and still accepts hotfixes or 14.x.y which pins it to exactly this version
|
|
14
|
+
*/
|
|
15
|
+
version?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const prefixVersion: (version?: string) => string;
|
|
18
|
+
export declare const Onfido: {
|
|
19
|
+
init(parameter: SdkParameters & LoaderParameter): Handle;
|
|
20
|
+
};
|
|
@@ -40,13 +40,60 @@ export declare type UploadFileResponse = {
|
|
|
40
40
|
href: string;
|
|
41
41
|
download_href: string;
|
|
42
42
|
};
|
|
43
|
+
type Score = {
|
|
44
|
+
min: number;
|
|
45
|
+
max: number;
|
|
46
|
+
threshold: number;
|
|
47
|
+
};
|
|
43
48
|
export declare type DocumentSides = 'front' | 'back';
|
|
49
|
+
export declare type DocumentType = 'driving_licence' | 'national_identity_card' | 'residence_permit' | 'passport';
|
|
44
50
|
export declare type DocumentImageResponse = {
|
|
45
51
|
applicant_id: string;
|
|
46
|
-
type:
|
|
52
|
+
type: DocumentType;
|
|
47
53
|
side: DocumentSides;
|
|
48
|
-
issuing_country: string
|
|
49
|
-
sdk_warnings
|
|
54
|
+
issuing_country: string;
|
|
55
|
+
sdk_warnings: ImageQualityWarnings & {
|
|
56
|
+
image_quality: {
|
|
57
|
+
quality: string;
|
|
58
|
+
breakdown: {
|
|
59
|
+
document: {
|
|
60
|
+
has_document: boolean;
|
|
61
|
+
detection_score: number;
|
|
62
|
+
} & Score;
|
|
63
|
+
has_document: boolean;
|
|
64
|
+
cutoff: {
|
|
65
|
+
has_cutoff: boolean;
|
|
66
|
+
score: number;
|
|
67
|
+
} & Score;
|
|
68
|
+
blur: {
|
|
69
|
+
has_blur: boolean;
|
|
70
|
+
score: number;
|
|
71
|
+
blur_model: string;
|
|
72
|
+
} & Score;
|
|
73
|
+
glare: {
|
|
74
|
+
score: number;
|
|
75
|
+
bbox: [number, number, number, number];
|
|
76
|
+
has_glare: boolean;
|
|
77
|
+
threshold: number;
|
|
78
|
+
glare_model: string;
|
|
79
|
+
};
|
|
80
|
+
barcode: {
|
|
81
|
+
result: string;
|
|
82
|
+
properties: Record<string, string>;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
image_quality_uuid: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
classification: {
|
|
89
|
+
issuing_country: null;
|
|
90
|
+
document_version: null;
|
|
91
|
+
side?: DocumentSides;
|
|
92
|
+
document_type?: DocumentType;
|
|
93
|
+
};
|
|
94
|
+
document_features: {
|
|
95
|
+
has_nfc: boolean;
|
|
96
|
+
};
|
|
50
97
|
} & UploadFileResponse;
|
|
51
98
|
export declare type VideoChallengeLanguage = {
|
|
52
99
|
source: string;
|
|
@@ -71,3 +118,4 @@ export type EnterpriseFeatureCallback = {
|
|
|
71
118
|
onSubmitSelfie?: (data: FormData | SubmitSelfie) => Promise<EnterpriseCallbackResponse<UploadFileResponse>>;
|
|
72
119
|
onSubmitVideo?: (data: FormData | SubmitVideo) => Promise<EnterpriseCallbackResponse<FaceVideoResponse>>;
|
|
73
120
|
};
|
|
121
|
+
export {};
|
package/types/shared/Types.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type ModuleUnsupported = {
|
|
|
14
14
|
export type Outputs = ModuleFinish | ModuleUnsupported;
|
|
15
15
|
export type Output = unknown | ModuleError;
|
|
16
16
|
export type ExecutorMethod = 'bootstrap' | 'ping' | 'start';
|
|
17
|
-
export type RunnerMethod = 'captureModule.finish' | 'captureModule.error' | 'captureModule.unsupported' | 'crossDevice.start' | 'crossDevice.preload' | 'analytics.send' | 'analytics.userAnalytics' | 'navigation.back' | 'navigation.externalLink' | 'customCallback.invoke';
|
|
17
|
+
export type RunnerMethod = 'captureModule.finish' | 'captureModule.error' | 'captureModule.unsupported' | 'crossDevice.start' | 'crossDevice.preload' | 'analytics.send' | 'analytics.userAnalytics' | 'navigation.back' | 'navigation.externalLink' | 'customCallback.invoke' | 'passkey.create' | 'passkey.get';
|
|
18
18
|
export type Configuration<T = unknown> = {
|
|
19
19
|
translations: T;
|
|
20
20
|
theme?: Theme;
|
|
@@ -61,6 +61,9 @@ export type ExecutionContext = {
|
|
|
61
61
|
customCallbacks?: CustomCallbacks;
|
|
62
62
|
currentScriptHostname?: string;
|
|
63
63
|
};
|
|
64
|
+
export type UserDetails = {
|
|
65
|
+
smsNumber?: string;
|
|
66
|
+
};
|
|
64
67
|
export type ClientConfiguration = {
|
|
65
68
|
token: string;
|
|
66
69
|
sdkToken: SdkToken;
|
|
@@ -78,6 +81,8 @@ export type ClientConfiguration = {
|
|
|
78
81
|
enterpriseFeatures?: EnterpriseFeatures;
|
|
79
82
|
crossDeviceClientIntroProductName?: string;
|
|
80
83
|
crossDeviceClientIntroProductLogoSrc?: string;
|
|
84
|
+
smsNumberCountryCode?: string;
|
|
85
|
+
userDetails?: UserDetails;
|
|
81
86
|
};
|
|
82
87
|
export type SdkToken = {
|
|
83
88
|
exp: number;
|