onfido-sdk-ui 14.56.0 → 14.58.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 +15 -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 +5 -7
- package/types/shared/v15Typing.d.ts +15 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
var ErrorCategory;
|
|
2
|
+
(function (ErrorCategory) {
|
|
3
|
+
ErrorCategory["Authentication"] = "Authentication";
|
|
4
|
+
ErrorCategory["DeviceCapabilities"] = "DeviceCapabilities";
|
|
5
|
+
ErrorCategory["General"] = "General";
|
|
6
|
+
ErrorCategory["Initialisation"] = "Initialisation";
|
|
7
|
+
ErrorCategory["Network"] = "Network";
|
|
8
|
+
ErrorCategory["Permissions"] = "Permissions";
|
|
9
|
+
ErrorCategory["Processing"] = "Processing";
|
|
10
|
+
})(ErrorCategory || (ErrorCategory = {}));
|
|
11
|
+
export var ErrorType;
|
|
12
|
+
(function (ErrorType) {
|
|
13
|
+
ErrorType["BiometricTokenRetrievalException"] = "BiometricTokenRetrievalException";
|
|
14
|
+
ErrorType["CameraException"] = "CameraException";
|
|
15
|
+
ErrorType["CameraNotDetected"] = "CameraNotDetected";
|
|
16
|
+
ErrorType["CrossDeviceDesktopError"] = "CrossDeviceDesktopError";
|
|
17
|
+
ErrorType["CrossDeviceRestartError"] = "CrossDeviceRestartError";
|
|
18
|
+
ErrorType["CrossDeviceVerificationAbortError"] = "CrossDeviceVerificationAbortError";
|
|
19
|
+
ErrorType["CrossDeviceVerificationInvalidError"] = "CrossDeviceVerificationInvalidError";
|
|
20
|
+
ErrorType["DuplicateGenericDocument"] = "DuplicateGenericDocument";
|
|
21
|
+
ErrorType["DuplicateStep"] = "DuplicateStep";
|
|
22
|
+
ErrorType["ExpiredToken"] = "ExpiredToken";
|
|
23
|
+
ErrorType["ExpiredTrial"] = "ExpiredTrial";
|
|
24
|
+
ErrorType["FeaturesNotAuthorized"] = "FeaturesNotAuthorized";
|
|
25
|
+
ErrorType["GenericException"] = "GenericException";
|
|
26
|
+
ErrorType["GeoBlocked"] = "GeoBlocked";
|
|
27
|
+
ErrorType["InitialisationInvalid"] = "InitialisationInvalid";
|
|
28
|
+
ErrorType["InvalidCountryCode"] = "InvalidCountryCode";
|
|
29
|
+
ErrorType["InvalidCustomTranslations"] = "InvalidCustomTranslations";
|
|
30
|
+
ErrorType["InvalidDocumentFormatAndCountryCombination"] = "InvalidDocumentFormatAndCountryCombination";
|
|
31
|
+
ErrorType["InvalidDocumentTitle"] = "InvalidDocumentTitle";
|
|
32
|
+
ErrorType["InvalidDocumentTypeException"] = "InvalidDocumentTypeException";
|
|
33
|
+
ErrorType["InvalidImageData"] = "InvalidImageData";
|
|
34
|
+
ErrorType["InvalidSdkParameter"] = "InvalidSdkParameter";
|
|
35
|
+
ErrorType["InvalidToken"] = "InvalidToken";
|
|
36
|
+
ErrorType["MissingLogoCobrandingParameter"] = "MissingLogoCobrandingParameter";
|
|
37
|
+
ErrorType["MissingSteps"] = "MissingSteps";
|
|
38
|
+
ErrorType["ModuleLoadError"] = "ModuleLoadError";
|
|
39
|
+
ErrorType["NetworkException"] = "NetworkException";
|
|
40
|
+
ErrorType["PermissionsUnavailable"] = "PermissionsUnavailable";
|
|
41
|
+
ErrorType["SdkVersionInsufficient"] = "SdkVersionInsufficient";
|
|
42
|
+
ErrorType["UnsupportedError"] = "UnsupportedError";
|
|
43
|
+
ErrorType["UnsupportedFeatureError"] = "UnsupportedFeatureError";
|
|
44
|
+
ErrorType["UploadError"] = "UploadError";
|
|
45
|
+
ErrorType["WelcomeMustBeFirstStep"] = "WelcomeMustBeFirstStep";
|
|
46
|
+
ErrorType["WorkflowBiometricTokenStorageException"] = "WorkflowBiometricTokenStorageException";
|
|
47
|
+
ErrorType["WorkflowInputError"] = "WorkflowInputError";
|
|
48
|
+
ErrorType["WorkflowTaskAbandoned"] = "WorkflowTaskAbandoned";
|
|
49
|
+
ErrorType["WorkflowTaskError"] = "WorkflowTaskError";
|
|
50
|
+
ErrorType["WorkflowVersionMismatch"] = "WorkflowVersionMismatch";
|
|
51
|
+
})(ErrorType || (ErrorType = {}));
|
|
52
|
+
export const BiometricTokenRetrievalException = {
|
|
53
|
+
type: ErrorType.BiometricTokenRetrievalException,
|
|
54
|
+
category: ErrorCategory.Processing,
|
|
55
|
+
message: `Flow error due to inability to retrieve local face authentication token`,
|
|
56
|
+
};
|
|
57
|
+
export const CameraException = {
|
|
58
|
+
type: ErrorType.CameraException,
|
|
59
|
+
category: ErrorCategory.DeviceCapabilities,
|
|
60
|
+
message: `Flow error due to generic camera-related issue`,
|
|
61
|
+
};
|
|
62
|
+
export const CameraNotDetected = {
|
|
63
|
+
type: ErrorType.CameraNotDetected,
|
|
64
|
+
category: ErrorCategory.DeviceCapabilities,
|
|
65
|
+
message: `Flow error due to camera not found`,
|
|
66
|
+
};
|
|
67
|
+
export const CrossDeviceDesktopError = {
|
|
68
|
+
type: ErrorType.CrossDeviceDesktopError,
|
|
69
|
+
category: ErrorCategory.Processing,
|
|
70
|
+
message: `(Mobile cross-device session) Flow error due to desktop session being disconnected`,
|
|
71
|
+
};
|
|
72
|
+
export const CrossDeviceRestartError = {
|
|
73
|
+
type: ErrorType.CrossDeviceRestartError,
|
|
74
|
+
category: ErrorCategory.Processing,
|
|
75
|
+
message: `Generic flow error due to cross-device session becoming invalid`,
|
|
76
|
+
};
|
|
77
|
+
export const CrossDeviceVerificationAbortError = {
|
|
78
|
+
type: ErrorType.CrossDeviceVerificationAbortError,
|
|
79
|
+
category: ErrorCategory.Processing,
|
|
80
|
+
message: `Flow error due to cross-device session being aborted by the user on mobile session`,
|
|
81
|
+
};
|
|
82
|
+
export const CrossDeviceVerificationInvalidError = {
|
|
83
|
+
type: ErrorType.CrossDeviceVerificationInvalidError,
|
|
84
|
+
category: ErrorCategory.Processing,
|
|
85
|
+
message: `(Mobile cross-device session) Flow error due to user selecting incorrect verification code`,
|
|
86
|
+
};
|
|
87
|
+
export const DuplicateGenericDocument = {
|
|
88
|
+
type: ErrorType.DuplicateGenericDocument,
|
|
89
|
+
category: ErrorCategory.Initialisation,
|
|
90
|
+
message: `Flow cannot be initialised due to a duplicate generic document definition provided in the document step configuration`,
|
|
91
|
+
};
|
|
92
|
+
export const DuplicateStep = {
|
|
93
|
+
type: ErrorType.DuplicateStep,
|
|
94
|
+
category: ErrorCategory.Initialisation,
|
|
95
|
+
message: `Flow cannot be initialised due to duplicate declaration in 'steps'`,
|
|
96
|
+
};
|
|
97
|
+
export const ExpiredToken = {
|
|
98
|
+
type: ErrorType.ExpiredToken,
|
|
99
|
+
category: ErrorCategory.Authentication,
|
|
100
|
+
message: `Flow cannot be initiated due to expired authentication token`,
|
|
101
|
+
};
|
|
102
|
+
export const ExpiredTrial = {
|
|
103
|
+
type: ErrorType.ExpiredTrial,
|
|
104
|
+
category: ErrorCategory.Authentication,
|
|
105
|
+
message: `Flow error due to expired account (or exceeded trial attempts)`,
|
|
106
|
+
};
|
|
107
|
+
export const FeaturesNotAuthorized = {
|
|
108
|
+
type: ErrorType.FeaturesNotAuthorized,
|
|
109
|
+
category: ErrorCategory.Initialisation,
|
|
110
|
+
message: `The flow cannot be initialised as selected feature is not authorised for this account. Please talk to Customer Support to get this feature enabled`,
|
|
111
|
+
};
|
|
112
|
+
export const GenericException = {
|
|
113
|
+
type: ErrorType.GenericException,
|
|
114
|
+
category: ErrorCategory.General,
|
|
115
|
+
message: `Generic flow error due to unknown error type`,
|
|
116
|
+
};
|
|
117
|
+
export const GeoBlocked = {
|
|
118
|
+
type: ErrorType.GeoBlocked,
|
|
119
|
+
category: ErrorCategory.General,
|
|
120
|
+
message: `Flow error due to request coming from geo-blocked country`,
|
|
121
|
+
};
|
|
122
|
+
export const InitialisationInvalid = {
|
|
123
|
+
type: ErrorType.InitialisationInvalid,
|
|
124
|
+
category: ErrorCategory.Initialisation,
|
|
125
|
+
message: `Generic flow initialisation error`,
|
|
126
|
+
};
|
|
127
|
+
export const InvalidCountryCode = {
|
|
128
|
+
type: ErrorType.InvalidCountryCode,
|
|
129
|
+
category: ErrorCategory.Initialisation,
|
|
130
|
+
message: `Flow cannot be initialised due to an invalid country code provided in the document step configuration`,
|
|
131
|
+
};
|
|
132
|
+
export const InvalidCustomTranslations = {
|
|
133
|
+
type: ErrorType.InvalidCustomTranslations,
|
|
134
|
+
category: ErrorCategory.Initialisation,
|
|
135
|
+
message: `Flow cannot be initialised due to an invalid translation key being provided`,
|
|
136
|
+
};
|
|
137
|
+
export const InvalidDocumentFormatAndCountryCombination = {
|
|
138
|
+
type: ErrorType.InvalidDocumentFormatAndCountryCombination,
|
|
139
|
+
category: ErrorCategory.Initialisation,
|
|
140
|
+
message: `Flow cannot be initialised due to an invalid country code / document type combination being provided in the document step configuration`,
|
|
141
|
+
};
|
|
142
|
+
export const InvalidDocumentTitle = {
|
|
143
|
+
type: ErrorType.InvalidDocumentTitle,
|
|
144
|
+
category: ErrorCategory.Initialisation,
|
|
145
|
+
message: `Flow cannot be initialised due to an invalid generic document title provided in the document step configuration`,
|
|
146
|
+
};
|
|
147
|
+
export const InvalidDocumentTypeException = {
|
|
148
|
+
type: ErrorType.InvalidDocumentTypeException,
|
|
149
|
+
category: ErrorCategory.Initialisation,
|
|
150
|
+
message: `DocumentType.UNKNOWN should not be used.`,
|
|
151
|
+
};
|
|
152
|
+
export const InvalidImageData = {
|
|
153
|
+
type: ErrorType.InvalidImageData,
|
|
154
|
+
category: ErrorCategory.Processing,
|
|
155
|
+
message: `Flow error due to error in image compression or on-device processing`,
|
|
156
|
+
};
|
|
157
|
+
export const InvalidSdkParameter = {
|
|
158
|
+
type: ErrorType.InvalidSdkParameter,
|
|
159
|
+
category: ErrorCategory.Initialisation,
|
|
160
|
+
message: `Flow cannot be initialised due to invalid initialisation parameters`,
|
|
161
|
+
};
|
|
162
|
+
export const InvalidToken = {
|
|
163
|
+
type: ErrorType.InvalidToken,
|
|
164
|
+
category: ErrorCategory.Authentication,
|
|
165
|
+
message: `Flow cannot be initiated due invalid authentication token`,
|
|
166
|
+
};
|
|
167
|
+
export const MissingLogoCobrandingParameter = {
|
|
168
|
+
type: ErrorType.MissingLogoCobrandingParameter,
|
|
169
|
+
category: ErrorCategory.Initialisation,
|
|
170
|
+
message: `Flow cannot be initialised as logo cobranding requires both a light and dark mode logo image`,
|
|
171
|
+
};
|
|
172
|
+
export const MissingSteps = {
|
|
173
|
+
type: ErrorType.MissingSteps,
|
|
174
|
+
category: ErrorCategory.Initialisation,
|
|
175
|
+
message: `Flow cannot be initialised due to empty 'steps' declaration`,
|
|
176
|
+
};
|
|
177
|
+
export const ModuleLoadError = {
|
|
178
|
+
type: ErrorType.ModuleLoadError,
|
|
179
|
+
category: ErrorCategory.Processing,
|
|
180
|
+
message: `The module encountered an error while loading`,
|
|
181
|
+
};
|
|
182
|
+
export const NetworkException = {
|
|
183
|
+
type: ErrorType.NetworkException,
|
|
184
|
+
category: ErrorCategory.Network,
|
|
185
|
+
message: `Generic flow error due to network issue`,
|
|
186
|
+
};
|
|
187
|
+
export const PermissionsUnavailable = {
|
|
188
|
+
type: ErrorType.PermissionsUnavailable,
|
|
189
|
+
category: ErrorCategory.Permissions,
|
|
190
|
+
message: `Flow error due to SDK not being able to assess permissions (webview context)`,
|
|
191
|
+
};
|
|
192
|
+
export const SdkVersionInsufficient = {
|
|
193
|
+
type: ErrorType.SdkVersionInsufficient,
|
|
194
|
+
category: ErrorCategory.Initialisation,
|
|
195
|
+
message: `Flow cannot be initialised due to invalid SDK version`,
|
|
196
|
+
};
|
|
197
|
+
export const UnsupportedError = {
|
|
198
|
+
type: ErrorType.UnsupportedError,
|
|
199
|
+
category: ErrorCategory.Initialisation,
|
|
200
|
+
message: `Flow cannot be initialised due to a selected module not being supported (environment or client)`,
|
|
201
|
+
};
|
|
202
|
+
export const UnsupportedFeatureError = {
|
|
203
|
+
type: ErrorType.UnsupportedFeatureError,
|
|
204
|
+
category: ErrorCategory.Initialisation,
|
|
205
|
+
message: `Flow cannot be initialised due to a selected feature not being supported (environment or client)`,
|
|
206
|
+
};
|
|
207
|
+
export const UploadError = {
|
|
208
|
+
type: ErrorType.UploadError,
|
|
209
|
+
category: ErrorCategory.Network,
|
|
210
|
+
message: `Flow error due to failed media upload`,
|
|
211
|
+
};
|
|
212
|
+
export const WelcomeMustBeFirstStep = {
|
|
213
|
+
type: ErrorType.WelcomeMustBeFirstStep,
|
|
214
|
+
category: ErrorCategory.Initialisation,
|
|
215
|
+
message: `Flow cannot be initialised if 'Welcome' step is present but not first in the list of steps`,
|
|
216
|
+
};
|
|
217
|
+
export const WorkflowBiometricTokenStorageException = {
|
|
218
|
+
type: ErrorType.WorkflowBiometricTokenStorageException,
|
|
219
|
+
category: ErrorCategory.Processing,
|
|
220
|
+
message: `Flow error due to inability to store local face authentication token`,
|
|
221
|
+
};
|
|
222
|
+
export const WorkflowInputError = {
|
|
223
|
+
type: ErrorType.WorkflowInputError,
|
|
224
|
+
category: ErrorCategory.Initialisation,
|
|
225
|
+
message: `Flow error due to invalid or missing inputs provided as part of the workflow initialisation`,
|
|
226
|
+
};
|
|
227
|
+
export const WorkflowTaskAbandoned = {
|
|
228
|
+
type: ErrorType.WorkflowTaskAbandoned,
|
|
229
|
+
category: ErrorCategory.Processing,
|
|
230
|
+
message: `Flow error due to workflow already been completed or expired`,
|
|
231
|
+
};
|
|
232
|
+
export const WorkflowTaskError = {
|
|
233
|
+
type: ErrorType.WorkflowTaskError,
|
|
234
|
+
category: ErrorCategory.Processing,
|
|
235
|
+
message: `Flow error due to generic workflow error`,
|
|
236
|
+
};
|
|
237
|
+
export const WorkflowVersionMismatch = {
|
|
238
|
+
type: ErrorType.WorkflowVersionMismatch,
|
|
239
|
+
category: ErrorCategory.Initialisation,
|
|
240
|
+
message: `Flow cannot be initialised due to target workflow requiring a higher version of the SDK`,
|
|
241
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type MediaCallback = (result: MediaResult) => void;
|
|
2
|
+
export type MediaFile = {
|
|
3
|
+
fileData: Blob;
|
|
4
|
+
fileType: string;
|
|
5
|
+
fileName: string;
|
|
6
|
+
};
|
|
7
|
+
export type MediaResult = {
|
|
8
|
+
key: string;
|
|
9
|
+
mediaFile: MediaFile;
|
|
10
|
+
};
|
|
11
|
+
export type DocumentMetadata = {
|
|
12
|
+
side: string;
|
|
13
|
+
type: string;
|
|
14
|
+
issuingCountry?: string;
|
|
15
|
+
};
|
|
16
|
+
export type DocumentMediaResults = MediaResult & {
|
|
17
|
+
documentMetadata: DocumentMetadata;
|
|
18
|
+
};
|
|
19
|
+
export type FacePhotoMediaResult = MediaResult;
|
|
20
|
+
export type FaceVideoMediaResult = MediaResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Welcome } from './steps/Welcome';
|
|
2
|
+
import { Document } from './steps/Document';
|
|
3
|
+
import { ProofOfAddress } from './steps/ProofOfAddress';
|
|
4
|
+
import { Complete } from './steps/Complete';
|
|
5
|
+
import { FaceMotion, FacePhoto, FaceVideo } from './steps/Face';
|
|
6
|
+
export { Welcome, Document, ProofOfAddress, Complete, FacePhoto, FaceVideo, FaceMotion, };
|
|
7
|
+
export * from './SdkParameters';
|
|
8
|
+
export * from './Localisation';
|
|
9
|
+
export * from './CrossDevice';
|
|
10
|
+
export * from './Module';
|
|
11
|
+
export * from './theming/Theme';
|
|
12
|
+
export * from './steps/Welcome';
|
|
13
|
+
export * from './steps/Document';
|
|
14
|
+
export * from './steps/ProofOfAddress';
|
|
15
|
+
export * from './steps/Complete';
|
|
16
|
+
export * from './steps/Face';
|
|
17
|
+
export * from './callbacks/analytics';
|
|
18
|
+
export * from './callbacks/biometricsToken';
|
|
19
|
+
export * from './callbacks/callbacks';
|
|
20
|
+
export * from './callbacks/complete';
|
|
21
|
+
export * from './callbacks/error';
|
|
22
|
+
export * from './callbacks/exit';
|
|
23
|
+
export * from './callbacks/media';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Welcome } from './steps/Welcome';
|
|
2
|
+
import { Document } from './steps/Document';
|
|
3
|
+
import { ProofOfAddress } from './steps/ProofOfAddress';
|
|
4
|
+
import { Complete } from './steps/Complete';
|
|
5
|
+
import { FaceMotion, FacePhoto, FaceVideo } from './steps/Face';
|
|
6
|
+
export { Welcome, Document, ProofOfAddress, Complete, FacePhoto, FaceVideo, FaceMotion, };
|
|
7
|
+
// Export all types at root (@onfido/capture-api)
|
|
8
|
+
export * from './SdkParameters';
|
|
9
|
+
export * from './Localisation';
|
|
10
|
+
export * from './CrossDevice';
|
|
11
|
+
export * from './Module';
|
|
12
|
+
export * from './theming/Theme';
|
|
13
|
+
export * from './steps/Welcome';
|
|
14
|
+
export * from './steps/Document';
|
|
15
|
+
export * from './steps/ProofOfAddress';
|
|
16
|
+
export * from './steps/Complete';
|
|
17
|
+
export * from './steps/Face';
|
|
18
|
+
export * from './callbacks/analytics';
|
|
19
|
+
export * from './callbacks/biometricsToken';
|
|
20
|
+
export * from './callbacks/callbacks';
|
|
21
|
+
export * from './callbacks/complete';
|
|
22
|
+
export * from './callbacks/error';
|
|
23
|
+
export * from './callbacks/exit';
|
|
24
|
+
export * from './callbacks/media';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Step } from './Step.js';
|
|
2
|
+
import { StepNames } from './Step.js';
|
|
3
|
+
export type GenericDocument = {
|
|
4
|
+
id: string;
|
|
5
|
+
country: string;
|
|
6
|
+
pages: number;
|
|
7
|
+
title: string;
|
|
8
|
+
subtitle: string;
|
|
9
|
+
};
|
|
10
|
+
export declare enum DocumentType {
|
|
11
|
+
DrivingLicence = "driving_licence",
|
|
12
|
+
GenericDocument = "generic_document",
|
|
13
|
+
NationalIdentityCard = "national_identity_card",
|
|
14
|
+
Passport = "passport",
|
|
15
|
+
PassportCard = "passport_card",
|
|
16
|
+
ResidencePermit = "residence_permit"
|
|
17
|
+
}
|
|
18
|
+
export type DocumentSelection = {
|
|
19
|
+
id?: string;
|
|
20
|
+
documentType: DocumentType;
|
|
21
|
+
issuingCountry?: string;
|
|
22
|
+
allCountries?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type DocumentFiltering = {
|
|
25
|
+
exclude?: DocumentSelection[];
|
|
26
|
+
include?: DocumentSelection[];
|
|
27
|
+
extend?: GenericDocument[];
|
|
28
|
+
};
|
|
29
|
+
export type NfcPolicy = 'Disabled' | 'Optional' | 'Required';
|
|
30
|
+
export type DocumentOptions = {
|
|
31
|
+
documentFiltering?: DocumentFiltering;
|
|
32
|
+
nfcPolicy?: NfcPolicy;
|
|
33
|
+
};
|
|
34
|
+
export type DocumentStep = Step<StepNames.Document, DocumentOptions>;
|
|
35
|
+
export declare const defaultDocumentOptions: {};
|
|
36
|
+
export declare const Document: (options?: Partial<DocumentOptions>, key?: string) => DocumentStep;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StepNames } from './Step.js';
|
|
2
|
+
export var DocumentType;
|
|
3
|
+
(function (DocumentType) {
|
|
4
|
+
DocumentType["DrivingLicence"] = "driving_licence";
|
|
5
|
+
DocumentType["GenericDocument"] = "generic_document";
|
|
6
|
+
DocumentType["NationalIdentityCard"] = "national_identity_card";
|
|
7
|
+
DocumentType["Passport"] = "passport";
|
|
8
|
+
DocumentType["PassportCard"] = "passport_card";
|
|
9
|
+
DocumentType["ResidencePermit"] = "residence_permit";
|
|
10
|
+
})(DocumentType || (DocumentType = {}));
|
|
11
|
+
export const defaultDocumentOptions = {};
|
|
12
|
+
export const Document = (options, key = StepNames.Document) => {
|
|
13
|
+
return {
|
|
14
|
+
type: StepNames.Document,
|
|
15
|
+
options: {
|
|
16
|
+
...defaultDocumentOptions,
|
|
17
|
+
...options,
|
|
18
|
+
},
|
|
19
|
+
key,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Step } from './Step.js';
|
|
2
|
+
import { StepNames } from './Step.js';
|
|
3
|
+
export type FacePhotoOptions = {
|
|
4
|
+
showIntro?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const defaultFacePhotoOptions: FacePhotoOptions;
|
|
7
|
+
export type FacePhotoStep = Step<StepNames.FacePhoto, FacePhotoOptions>;
|
|
8
|
+
export type FaceVideoOptions = {
|
|
9
|
+
showIntro?: boolean;
|
|
10
|
+
recordAudio?: boolean;
|
|
11
|
+
showConfirmation?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const defaultFaceVideoOptions: FaceVideoOptions;
|
|
14
|
+
export declare const FacePhoto: (options?: Partial<FacePhotoOptions>, key?: string) => FacePhotoStep;
|
|
15
|
+
export type FaceVideoStep = Step<StepNames.FaceVideo, FaceVideoOptions>;
|
|
16
|
+
export type FaceMotionOptions = {
|
|
17
|
+
showIntro?: boolean;
|
|
18
|
+
recordAudio?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const defaultFaceMotionOptions: FaceMotionOptions;
|
|
21
|
+
export declare const FaceVideo: (options?: Partial<FaceVideoOptions>, key?: string) => FaceVideoStep;
|
|
22
|
+
export type FaceMotionStep = Step<StepNames.FaceMotion, FaceMotionOptions>;
|
|
23
|
+
export declare const FaceMotion: (options?: Partial<FaceMotionOptions>, key?: string) => FaceMotionStep;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { StepNames } from './Step.js';
|
|
2
|
+
export const defaultFacePhotoOptions = {
|
|
3
|
+
showIntro: true,
|
|
4
|
+
};
|
|
5
|
+
export const defaultFaceVideoOptions = {
|
|
6
|
+
showIntro: true,
|
|
7
|
+
recordAudio: false,
|
|
8
|
+
showConfirmation: true,
|
|
9
|
+
};
|
|
10
|
+
export const FacePhoto = (options, key = StepNames.FacePhoto) => ({
|
|
11
|
+
type: StepNames.FacePhoto,
|
|
12
|
+
key,
|
|
13
|
+
options: {
|
|
14
|
+
...defaultFacePhotoOptions,
|
|
15
|
+
...options,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
export const defaultFaceMotionOptions = {
|
|
19
|
+
showIntro: true,
|
|
20
|
+
recordAudio: false,
|
|
21
|
+
};
|
|
22
|
+
export const FaceVideo = (options, key = StepNames.FaceVideo) => ({
|
|
23
|
+
type: StepNames.FaceVideo,
|
|
24
|
+
key,
|
|
25
|
+
options: {
|
|
26
|
+
...defaultFaceVideoOptions,
|
|
27
|
+
...options,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
export const FaceMotion = (options, key = StepNames.FaceMotion) => ({
|
|
31
|
+
type: StepNames.FaceMotion,
|
|
32
|
+
key: key,
|
|
33
|
+
options: {
|
|
34
|
+
...defaultFaceMotionOptions,
|
|
35
|
+
...options,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Step } from './Step.js';
|
|
2
|
+
import { StepNames } from './Step.js';
|
|
3
|
+
export type ProofOfAddressStep = Step<StepNames.ProofOfAddress, ProofOfAddressOptions>;
|
|
4
|
+
export declare enum ProofOfAddressType {
|
|
5
|
+
AccommodationTenancyCertificate = "accommodation_tenancy_certificate",
|
|
6
|
+
AddressCertificate = "address_certificate",
|
|
7
|
+
BankBuildingSocietyStatement = "bank_building_society_statement",
|
|
8
|
+
BankStatement = "bank_statement",
|
|
9
|
+
BenefitLetters = "benefit_letters",
|
|
10
|
+
CouncilTax = "council_tax",
|
|
11
|
+
ElectricityBill = "electricity_bill",
|
|
12
|
+
ExchangeHouseStatement = "exchange_house_statement",
|
|
13
|
+
GasBill = "gas_bill",
|
|
14
|
+
GeneralLetter = "general_letter",
|
|
15
|
+
IdentityDocumentWithAddress = "identity_document_with_address",
|
|
16
|
+
InsuranceStatement = "insurance_statement",
|
|
17
|
+
InternetBill = "internet_bill",
|
|
18
|
+
MobilePhoneBill = "mobile_phone_bill",
|
|
19
|
+
MortgageStatement = "mortgage_statement",
|
|
20
|
+
PensionPropertyStatementLetter = "pension_property_statement_letter",
|
|
21
|
+
PhoneBill = "phone_bill",
|
|
22
|
+
UtilityBill = "utility_bill",
|
|
23
|
+
WaterBill = "water_bill"
|
|
24
|
+
}
|
|
25
|
+
export type ProofOfAddressSelection = {
|
|
26
|
+
proofOfAddressType: ProofOfAddressType;
|
|
27
|
+
issuingCountry?: string;
|
|
28
|
+
};
|
|
29
|
+
export type ProofOfAddressFiltering = {
|
|
30
|
+
include?: ProofOfAddressSelection[];
|
|
31
|
+
};
|
|
32
|
+
export type ProofOfAddressOptions = {
|
|
33
|
+
proofOfAddressFiltering?: ProofOfAddressFiltering;
|
|
34
|
+
};
|
|
35
|
+
export declare const ProofOfAddress: (key?: string) => ProofOfAddressStep;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StepNames } from './Step.js';
|
|
2
|
+
export var ProofOfAddressType;
|
|
3
|
+
(function (ProofOfAddressType) {
|
|
4
|
+
ProofOfAddressType["AccommodationTenancyCertificate"] = "accommodation_tenancy_certificate";
|
|
5
|
+
ProofOfAddressType["AddressCertificate"] = "address_certificate";
|
|
6
|
+
ProofOfAddressType["BankBuildingSocietyStatement"] = "bank_building_society_statement";
|
|
7
|
+
ProofOfAddressType["BankStatement"] = "bank_statement";
|
|
8
|
+
ProofOfAddressType["BenefitLetters"] = "benefit_letters";
|
|
9
|
+
ProofOfAddressType["CouncilTax"] = "council_tax";
|
|
10
|
+
ProofOfAddressType["ElectricityBill"] = "electricity_bill";
|
|
11
|
+
ProofOfAddressType["ExchangeHouseStatement"] = "exchange_house_statement";
|
|
12
|
+
ProofOfAddressType["GasBill"] = "gas_bill";
|
|
13
|
+
ProofOfAddressType["GeneralLetter"] = "general_letter";
|
|
14
|
+
ProofOfAddressType["IdentityDocumentWithAddress"] = "identity_document_with_address";
|
|
15
|
+
ProofOfAddressType["InsuranceStatement"] = "insurance_statement";
|
|
16
|
+
ProofOfAddressType["InternetBill"] = "internet_bill";
|
|
17
|
+
ProofOfAddressType["MobilePhoneBill"] = "mobile_phone_bill";
|
|
18
|
+
ProofOfAddressType["MortgageStatement"] = "mortgage_statement";
|
|
19
|
+
ProofOfAddressType["PensionPropertyStatementLetter"] = "pension_property_statement_letter";
|
|
20
|
+
ProofOfAddressType["PhoneBill"] = "phone_bill";
|
|
21
|
+
ProofOfAddressType["UtilityBill"] = "utility_bill";
|
|
22
|
+
ProofOfAddressType["WaterBill"] = "water_bill";
|
|
23
|
+
})(ProofOfAddressType || (ProofOfAddressType = {}));
|
|
24
|
+
export const ProofOfAddress = (key = StepNames.ProofOfAddress) => {
|
|
25
|
+
return {
|
|
26
|
+
type: StepNames.ProofOfAddress,
|
|
27
|
+
key,
|
|
28
|
+
options: {},
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type EmptyOptions = Record<string, never>;
|
|
2
|
+
export type Step<key extends StepNames, options extends Record<string, unknown>> = {
|
|
3
|
+
key?: string;
|
|
4
|
+
type: key;
|
|
5
|
+
options?: options;
|
|
6
|
+
};
|
|
7
|
+
export declare enum StepNames {
|
|
8
|
+
Welcome = "welcome",
|
|
9
|
+
FacePhoto = "facePhoto",
|
|
10
|
+
FaceVideo = "faceVideo",
|
|
11
|
+
FaceMotion = "faceMotion",
|
|
12
|
+
Document = "document",
|
|
13
|
+
ProofOfAddress = "proofOfAddress",
|
|
14
|
+
Complete = "complete"
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var StepNames;
|
|
2
|
+
(function (StepNames) {
|
|
3
|
+
StepNames["Welcome"] = "welcome";
|
|
4
|
+
StepNames["FacePhoto"] = "facePhoto";
|
|
5
|
+
StepNames["FaceVideo"] = "faceVideo";
|
|
6
|
+
StepNames["FaceMotion"] = "faceMotion";
|
|
7
|
+
StepNames["Document"] = "document";
|
|
8
|
+
StepNames["ProofOfAddress"] = "proofOfAddress";
|
|
9
|
+
StepNames["Complete"] = "complete";
|
|
10
|
+
})(StepNames || (StepNames = {}));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WelcomeStep } from './Welcome.js';
|
|
2
|
+
import type { DocumentStep } from './Document.js';
|
|
3
|
+
import type { FaceMotionStep, FacePhotoStep, FaceVideoStep } from './Face.js';
|
|
4
|
+
import type { ProofOfAddressStep } from './ProofOfAddress.js';
|
|
5
|
+
import type { CompleteStep } from './Complete.js';
|
|
6
|
+
export type KnownStep = WelcomeStep | DocumentStep | FacePhotoStep | FaceVideoStep | FaceMotionStep | ProofOfAddressStep | CompleteStep;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type ColorTokensKeys = 'backgroundColorOverlay' | 'backgroundColorBrandActive' | 'backgroundColorBrandDefault' | 'backgroundColorBrandHover' | 'backgroundColorDisabledDefault' | 'backgroundColorInfoSubtleDefault' | 'backgroundColorInputDefault' | 'backgroundColorNegativeBaseDefault' | 'backgroundColorNegativeSubtleDefault' | 'backgroundColorNeutralSubtleDefault' | 'backgroundColorPositiveSubtleDefault' | 'backgroundColorSurfacePrimaryActive' | 'backgroundColorSurfacePrimaryDefault' | 'backgroundColorSurfacePrimaryHover' | 'backgroundColorTintedActive' | 'backgroundColorTintedDefault' | 'backgroundColorTintedHover' | 'backgroundColorWarningSubtleDefault' | 'borderColorDisabledDefault' | 'borderColorInputActive' | 'borderColorInputDefault' | 'borderColorInputHover' | 'borderColorNegativeBaseDefault' | 'borderColorSeparator' | 'contentColorBase' | 'contentColorBrandOnBrand' | 'contentColorDisabledDefault' | 'contentColorInfoBaseDefault' | 'contentColorNegativeBaseDefault' | 'contentColorNegativeOnNegative' | 'contentColorPlaceholder' | 'contentColorPositiveBaseDefault' | 'contentColorSubtle' | 'contentColorWarningBaseDefault';
|
|
2
|
+
export type SdkColor = string;
|
|
3
|
+
export type SdkColors = Record<ColorTokensKeys, SdkColor>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare enum ResourceType {
|
|
2
|
+
Icons = "icons",
|
|
3
|
+
Images = "images",
|
|
4
|
+
Animations = "animations",
|
|
5
|
+
Videos = "videos"
|
|
6
|
+
}
|
|
7
|
+
export declare enum IconTokens {
|
|
8
|
+
NavigationBack = "Navigation.Back",
|
|
9
|
+
NavigationExit = "Navigation.Close"
|
|
10
|
+
}
|
|
11
|
+
export declare enum ImageTokens {
|
|
12
|
+
}
|
|
13
|
+
export declare enum VideoTokens {
|
|
14
|
+
}
|
|
15
|
+
export declare enum AnimationTokens {
|
|
16
|
+
}
|
|
17
|
+
export declare enum MediaLocationType {
|
|
18
|
+
Local = "local",
|
|
19
|
+
Remote = "remote"
|
|
20
|
+
}
|
|
21
|
+
export type MediaLocation = {
|
|
22
|
+
type: MediaLocationType;
|
|
23
|
+
uri: string;
|
|
24
|
+
};
|
|
25
|
+
export type Media = {
|
|
26
|
+
location: MediaLocation;
|
|
27
|
+
contentDescription?: string;
|
|
28
|
+
};
|
|
29
|
+
export type MediaResources = {
|
|
30
|
+
[ResourceType.Icons]?: Record<IconTokens, Media>;
|
|
31
|
+
[ResourceType.Images]?: Record<ImageTokens, Media>;
|
|
32
|
+
[ResourceType.Animations]?: Record<AnimationTokens, Media>;
|
|
33
|
+
[ResourceType.Videos]?: Record<VideoTokens, Media>;
|
|
34
|
+
};
|