onfido-sdk-ui 14.55.0 → 14.57.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 +16 -1
- package/package.json +2 -2
- package/types/Events.d.ts +4 -4
- package/types/Onfido.d.ts +7 -4
- package/types/analytics/FlowStates.d.ts +81 -0
- package/types/capture-api/CrossDevice.d.ts +21 -0
- package/types/capture-api/CrossDevice.js +12 -0
- package/types/capture-api/Localisation.d.ts +5 -0
- package/types/capture-api/Localisation.js +1 -0
- package/types/capture-api/Module.d.ts +8 -0
- package/types/capture-api/Module.js +1 -0
- package/types/capture-api/SdkParameters.d.ts +41 -0
- package/types/capture-api/SdkParameters.js +6 -0
- package/types/capture-api/callbacks/analytics.d.ts +9 -0
- package/types/capture-api/callbacks/analytics.js +1 -0
- package/types/capture-api/callbacks/biometricsToken.d.ts +6 -0
- package/types/capture-api/callbacks/biometricsToken.js +1 -0
- package/types/capture-api/callbacks/callbacks.d.ts +13 -0
- package/types/capture-api/callbacks/callbacks.js +1 -0
- package/types/capture-api/callbacks/complete.d.ts +34 -0
- package/types/capture-api/callbacks/complete.js +1 -0
- package/types/capture-api/callbacks/error.d.ts +247 -0
- package/types/capture-api/callbacks/error.js +241 -0
- package/types/capture-api/callbacks/exit.d.ts +6 -0
- package/types/capture-api/callbacks/exit.js +6 -0
- package/types/capture-api/callbacks/media.d.ts +20 -0
- package/types/capture-api/callbacks/media.js +1 -0
- package/types/capture-api/index.d.ts +23 -0
- package/types/capture-api/index.js +24 -0
- package/types/capture-api/steps/Complete.d.ts +4 -0
- package/types/capture-api/steps/Complete.js +6 -0
- package/types/capture-api/steps/Document.d.ts +36 -0
- package/types/capture-api/steps/Document.js +21 -0
- package/types/capture-api/steps/Face.d.ts +23 -0
- package/types/capture-api/steps/Face.js +37 -0
- package/types/capture-api/steps/ProofOfAddress.d.ts +35 -0
- package/types/capture-api/steps/ProofOfAddress.js +30 -0
- package/types/capture-api/steps/Step.d.ts +15 -0
- package/types/capture-api/steps/Step.js +10 -0
- package/types/capture-api/steps/Welcome.d.ts +4 -0
- package/types/capture-api/steps/Welcome.js +6 -0
- package/types/capture-api/steps/index.d.ts +6 -0
- package/types/capture-api/steps/index.js +1 -0
- package/types/capture-api/theming/Branding.d.ts +8 -0
- package/types/capture-api/theming/Branding.js +1 -0
- package/types/capture-api/theming/ColorTokens.d.ts +3 -0
- package/types/capture-api/theming/ColorTokens.js +1 -0
- package/types/capture-api/theming/MediaResources.d.ts +34 -0
- package/types/capture-api/theming/MediaResources.js +26 -0
- package/types/capture-api/theming/Theme.d.ts +27 -0
- package/types/capture-api/theming/Theme.js +5 -0
- package/types/contract/module/Common.d.ts +1 -0
- package/types/contract/module/DocumentModule.d.ts +7 -2
- package/types/index.d.ts +1 -1
- package/types/loader.d.ts +17 -14
- package/types/shared/Error.d.ts +1 -1
- package/types/shared/Public.types.d.ts +47 -0
- package/types/shared/SdkParameters.d.ts +5 -5
- package/types/shared/Types.d.ts +3 -6
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export var ResourceType;
|
|
2
|
+
(function (ResourceType) {
|
|
3
|
+
ResourceType["Icons"] = "icons";
|
|
4
|
+
ResourceType["Images"] = "images";
|
|
5
|
+
ResourceType["Animations"] = "animations";
|
|
6
|
+
ResourceType["Videos"] = "videos";
|
|
7
|
+
})(ResourceType || (ResourceType = {}));
|
|
8
|
+
export var IconTokens;
|
|
9
|
+
(function (IconTokens) {
|
|
10
|
+
IconTokens["NavigationBack"] = "Navigation.Back";
|
|
11
|
+
IconTokens["NavigationExit"] = "Navigation.Close";
|
|
12
|
+
})(IconTokens || (IconTokens = {}));
|
|
13
|
+
export var ImageTokens;
|
|
14
|
+
(function (ImageTokens) {
|
|
15
|
+
})(ImageTokens || (ImageTokens = {}));
|
|
16
|
+
export var VideoTokens;
|
|
17
|
+
(function (VideoTokens) {
|
|
18
|
+
})(VideoTokens || (VideoTokens = {}));
|
|
19
|
+
export var AnimationTokens;
|
|
20
|
+
(function (AnimationTokens) {
|
|
21
|
+
})(AnimationTokens || (AnimationTokens = {}));
|
|
22
|
+
export var MediaLocationType;
|
|
23
|
+
(function (MediaLocationType) {
|
|
24
|
+
MediaLocationType["Local"] = "local";
|
|
25
|
+
MediaLocationType["Remote"] = "remote";
|
|
26
|
+
})(MediaLocationType || (MediaLocationType = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Branding } from './Branding';
|
|
2
|
+
import type { SdkColors } from './ColorTokens';
|
|
3
|
+
import type { MediaResources } from './MediaResources';
|
|
4
|
+
export declare enum ThemeMode {
|
|
5
|
+
Light = "Light",
|
|
6
|
+
Dark = "Dark"
|
|
7
|
+
}
|
|
8
|
+
export type Theme = {
|
|
9
|
+
id?: string;
|
|
10
|
+
mode?: ThemeMode;
|
|
11
|
+
branding?: Branding;
|
|
12
|
+
lightColors?: SdkColors;
|
|
13
|
+
darkColors?: SdkColors;
|
|
14
|
+
mediaResources?: MediaResources;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Internal type: Temporary until fonts are officially supported through the theming API
|
|
17
|
+
*/
|
|
18
|
+
googleFonts?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Internal type: Temporary until fonts are officially supported through the theming API
|
|
21
|
+
*/
|
|
22
|
+
customFonts?: string[];
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Internal type only
|
|
25
|
+
*/
|
|
26
|
+
version?: 'v2' | 'v3';
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Empty = Record<string, never>;
|
|
@@ -34,6 +34,8 @@ export type DocumentModuleConfiguration = {
|
|
|
34
34
|
hideCountrySelection?: boolean;
|
|
35
35
|
uploadFallback?: boolean;
|
|
36
36
|
nfcPolicy?: NfcPolicy;
|
|
37
|
+
allowModuleFinishViaBackend?: boolean;
|
|
38
|
+
classifyDocument?: boolean;
|
|
37
39
|
};
|
|
38
40
|
export type DocumentModuleInput = {
|
|
39
41
|
preferredUserCountry?: string;
|
|
@@ -54,8 +56,11 @@ export type DocumentModuleOutput = {
|
|
|
54
56
|
issuingCountry: string;
|
|
55
57
|
documentType: string;
|
|
56
58
|
sides: DocumentIds;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
nfc?: {
|
|
60
|
+
aaChallenge?: number[];
|
|
61
|
+
can?: string;
|
|
62
|
+
key: string;
|
|
63
|
+
};
|
|
59
64
|
documentVersion?: string;
|
|
60
65
|
};
|
|
61
66
|
export type EnabledDocumentType = {
|
package/types/index.d.ts
CHANGED
package/types/loader.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Handle, OnfidoApi as OnfidoBaseApi } from './Onfido'
|
|
2
|
+
import type { SdkParameters } from './shared/SdkParameters'
|
|
3
|
+
|
|
3
4
|
export type LoaderParameter = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
5
|
+
/**
|
|
6
|
+
* The version of the sdk to be loaded, by default v14 is used, which
|
|
7
|
+
* is always fresh. Valid examples are 14 (default), 14.x (which pins the version to a minor version
|
|
8
|
+
* and still accepts hotfixes or 14.x.y which pins it to exactly this version
|
|
9
|
+
*/
|
|
10
|
+
version?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type OnfidoApi = Omit<OnfidoBaseApi, 'init'> & {
|
|
14
|
+
init: (parameter: SdkParameters & LoaderParameter) => Handle
|
|
15
|
+
environment?: 'INSECURE'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare const Onfido: OnfidoApi
|
package/types/shared/Error.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FlowStatesFlowErrorStatesEnum } from '
|
|
1
|
+
import { FlowStatesFlowErrorStatesEnum } from '../analytics/FlowStates';
|
|
2
2
|
import type { Configuration } from './Types';
|
|
3
3
|
export declare enum SdkErrorLevel {
|
|
4
4
|
EXTERNAL = "external",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { CrossDeviceMethod } from './CrossDeviceConnect.types';
|
|
2
|
+
import type { CompleteData, EnterpriseFeatureParameter, ExternalLinkCallback, LegacyLanguageParameter, UserExitCallback } from './SdkParameters';
|
|
3
|
+
import type { CrossDevicePolicy, LegacyStepDefinition, Translations, UserDetails } from './Types';
|
|
4
|
+
import type { ErrorCallback } from './Error';
|
|
5
|
+
export type ThemeConfig = Record<string, any>;
|
|
6
|
+
export type Theme = {
|
|
7
|
+
name: 'light' | 'dark';
|
|
8
|
+
config?: ThemeConfig;
|
|
9
|
+
};
|
|
10
|
+
type CommonSdkParameters = {
|
|
11
|
+
containerEl?: HTMLElement;
|
|
12
|
+
containerId?: string;
|
|
13
|
+
onError?: ErrorCallback;
|
|
14
|
+
onComplete?: (data: CompleteData) => void;
|
|
15
|
+
showExitButton?: boolean;
|
|
16
|
+
onUserExit?: UserExitCallback;
|
|
17
|
+
onExternalLink?: ExternalLinkCallback;
|
|
18
|
+
enterpriseFeatures?: EnterpriseFeatureParameter;
|
|
19
|
+
theme?: Theme;
|
|
20
|
+
customUI?: ThemeConfig;
|
|
21
|
+
translations?: Translations;
|
|
22
|
+
language?: string | LegacyLanguageParameter;
|
|
23
|
+
smsNumberCountryCode?: string;
|
|
24
|
+
userDetails?: UserDetails;
|
|
25
|
+
_crossDeviceLinkMethods?: CrossDeviceMethod[];
|
|
26
|
+
crossDeviceClientIntroProductLogoSrc?: string;
|
|
27
|
+
crossDevicePolicy?: CrossDevicePolicy;
|
|
28
|
+
disableAnalytics?: boolean;
|
|
29
|
+
disableAnalyticsCookies?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type StudioSdkParameters = {
|
|
32
|
+
token: string;
|
|
33
|
+
workflowRunId: string;
|
|
34
|
+
disableWelcomeScreen?: boolean;
|
|
35
|
+
disableCompleteScreen?: boolean;
|
|
36
|
+
onBiometricTokenGenerated?: (customerUserHash: string, biometricToken: string) => void;
|
|
37
|
+
onBiometricTokenRequested?: (customerUserHash: string) => Promise<string>;
|
|
38
|
+
} & CommonSdkParameters;
|
|
39
|
+
export type ClassicSdkParameters = {
|
|
40
|
+
token: string;
|
|
41
|
+
steps: LegacyStepDefinition[];
|
|
42
|
+
} & CommonSdkParameters;
|
|
43
|
+
export type CrossDeviceSdkParameters = CommonSdkParameters & {
|
|
44
|
+
roomId?: string;
|
|
45
|
+
};
|
|
46
|
+
export type SdkParameters = StudioSdkParameters | ClassicSdkParameters | CrossDeviceSdkParameters;
|
|
47
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Theme as CaptureTheme } from '../capture-api/theming/Theme';
|
|
2
|
+
import type { Navigation as CaptureNavigation } from '../capture-api';
|
|
3
|
+
import type { LegacyStepDefinition, LegacyStepType, CrossDevicePolicy, EnterpriseFeatures, LocaleDirection, Translations, UserDetails } from './Types';
|
|
2
4
|
import type { ErrorCallback } from './Error';
|
|
3
5
|
import type { CrossDeviceMethod } from './CrossDeviceConnect.types';
|
|
4
6
|
import type { EnterpriseFeatureCallback } from './Enterprise';
|
|
@@ -21,10 +23,10 @@ export type CommonSdkParameters = {
|
|
|
21
23
|
onUserExit?: UserExitCallback;
|
|
22
24
|
onExternalLink?: ExternalLinkCallback;
|
|
23
25
|
enterpriseFeatures?: EnterpriseFeatureParameter;
|
|
24
|
-
theme?: Theme;
|
|
25
|
-
customUI?: ThemeConfig;
|
|
26
26
|
language?: string | LegacyLanguageParameter;
|
|
27
27
|
translations?: Translations;
|
|
28
|
+
theme?: CaptureTheme;
|
|
29
|
+
navigation?: CaptureNavigation;
|
|
28
30
|
};
|
|
29
31
|
export type LegacyLanguageParameter = {
|
|
30
32
|
locale?: string;
|
|
@@ -35,8 +37,6 @@ export type LegacyLanguageParameter = {
|
|
|
35
37
|
export type TokenParameters = {
|
|
36
38
|
token: string;
|
|
37
39
|
language?: string | LegacyLanguageParameter;
|
|
38
|
-
translations?: Translations;
|
|
39
|
-
theme?: Theme;
|
|
40
40
|
/***
|
|
41
41
|
* You can change the default country for the SMS number input by passing the
|
|
42
42
|
* smsNumberCountryCode option when the SDK is initialized. The value should
|
package/types/shared/Types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Theme, Navigation } from '../capture-api';
|
|
1
2
|
import type { CrossDeviceMethod } from './CrossDeviceConnect.types';
|
|
2
3
|
import type { FeatureFlags } from './FeatureFlags';
|
|
3
4
|
export type ModuleError = {
|
|
@@ -41,11 +42,6 @@ export type TranslationData<T> = T & {
|
|
|
41
42
|
};
|
|
42
43
|
export type TranslationItem<T> = T | (() => Promise<T>);
|
|
43
44
|
export type Translations<T = unknown> = Record<string, TranslationItem<T>>;
|
|
44
|
-
export type ThemeConfig = Record<string, any>;
|
|
45
|
-
export type Theme = {
|
|
46
|
-
name: 'light' | 'dark';
|
|
47
|
-
config?: ThemeConfig;
|
|
48
|
-
};
|
|
49
45
|
export type Optional<T> = undefined | T;
|
|
50
46
|
export type RecursivePartial<T> = {
|
|
51
47
|
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
|
|
@@ -97,6 +93,7 @@ export type ClientConfiguration = {
|
|
|
97
93
|
theme?: Theme;
|
|
98
94
|
language?: string;
|
|
99
95
|
translations?: Translations;
|
|
96
|
+
navigation?: Navigation;
|
|
100
97
|
analytics?: {
|
|
101
98
|
enabled: boolean;
|
|
102
99
|
anonymousUuid: string;
|
|
@@ -168,7 +165,7 @@ export type EnterpriseFeatures = {
|
|
|
168
165
|
darkLogoSrc?: string;
|
|
169
166
|
};
|
|
170
167
|
};
|
|
171
|
-
type TokenEnterpriseFeatures = {
|
|
168
|
+
export type TokenEnterpriseFeatures = {
|
|
172
169
|
cobrand: boolean;
|
|
173
170
|
logoCobrand: boolean;
|
|
174
171
|
hideOnfidoLogo: boolean;
|