@voltom.io/sdk 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/locales/ar.json +34 -2
- package/dist/assets/locales/ch.json +34 -2
- package/dist/assets/locales/de.json +34 -2
- package/dist/assets/locales/en.json +34 -2
- package/dist/assets/locales/es.json +34 -2
- package/dist/assets/locales/fr.json +34 -2
- package/dist/assets/locales/it.json +34 -2
- package/dist/assets/locales/ja.json +34 -2
- package/dist/assets/locales/pt.json +34 -2
- package/dist/assets/locales/ru.json +34 -2
- package/dist/assets/locales/zh.json +34 -2
- package/dist/sdk/PoseSilhouette-D2pGu7Lh.js +2 -0
- package/dist/sdk/PoseSuccess-R_8JYo--.js +2 -0
- package/dist/sdk/errors.d.ts +121 -0
- package/dist/sdk/facegate/global.d.ts +1 -1
- package/dist/sdk/facegate.d.ts +42 -19
- package/dist/sdk/facegate.dist.js +4 -4
- package/dist/sdk/facegate.js +1 -1
- package/dist/sdk/facekey.browser-VlDa2K-w.js +2 -0
- package/dist/sdk/facekey.d.ts +50 -26
- package/dist/sdk/facekey.dist.js +6 -6
- package/dist/sdk/facekey.js +1 -1
- package/dist/sdk/presentation-COhoAxj3.js +8 -0
- package/dist/sdk/presentation-ye0KVm6U.js +2 -0
- package/dist/sdk/requests-DW8zDX51.js +65 -0
- package/dist/sdk/verify.d.ts +58 -22
- package/dist/sdk/verify.dist.js +18 -18
- package/dist/sdk/verify.js +1 -1
- package/dist/sdk/view-CF_YOVly.js +3 -0
- package/dist/sdk/view-Cb4XCb-z.js +3 -0
- package/dist/sdk/view-DcbwHph_.js +2 -0
- package/package.json +7 -5
- package/dist/sdk/PoseSilhouette-Bbwmry4Z.js +0 -2
- package/dist/sdk/PoseSuccess-C3aBF88E.js +0 -2
- package/dist/sdk/eyeLevelCamera-DY4onSBz.js +0 -65
- package/dist/sdk/facekey.browser-CVJiBw1f.js +0 -2
- package/dist/sdk/media-BRKPXpu3.js +0 -2
- package/dist/sdk/presentation-B-TOKUZ3.js +0 -8
- package/dist/sdk/presentation-BsnbDv0i.js +0 -2
- package/dist/sdk/view-Bfg8u_hZ.js +0 -2
- package/dist/sdk/view-CHSkN6gO.js +0 -3
- package/dist/sdk/view-DmGKdc3M.js +0 -3
package/dist/sdk/verify.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ErrorCode, Errors, isSdkError, VoltomSdkError } from "./errors.js";
|
|
2
|
+
|
|
3
|
+
export { type ErrorCode, Errors, isSdkError, type VoltomSdkError } from "./errors.js";
|
|
2
4
|
|
|
3
5
|
export type Pose =
|
|
6
|
+
| "faceReference"
|
|
4
7
|
| "faceStraight"
|
|
5
8
|
| "faceUp"
|
|
6
9
|
| "faceDown"
|
|
@@ -11,7 +14,9 @@ export type Pose =
|
|
|
11
14
|
| "faceTiltLeft"
|
|
12
15
|
| "faceTiltRight";
|
|
13
16
|
|
|
14
|
-
export type Language = "ar" | "ch" | "de" | "en" | "es" | "fr" | "it" | "ja" | "pt" | "zh";
|
|
17
|
+
export type Language = "ar" | "ch" | "de" | "en" | "es" | "fr" | "it" | "ja" | "pt" | "ru" | "zh";
|
|
18
|
+
|
|
19
|
+
export type Theme = "light" | "dark";
|
|
15
20
|
|
|
16
21
|
export type OcrEngine =
|
|
17
22
|
| "auto"
|
|
@@ -25,28 +30,39 @@ export type OcrEngine =
|
|
|
25
30
|
|
|
26
31
|
export type FaceDetectorName = "high" | "standard" | "low";
|
|
27
32
|
|
|
28
|
-
export type VerificationCapability = "
|
|
33
|
+
export type VerificationCapability = "acquireFace" | "acquireDocument" | "acquireReference" | "matchID" | "matchReference";
|
|
34
|
+
|
|
35
|
+
export type VerificationAction = "verify_face" | "verify_document" | "match_id" | "match_reference";
|
|
36
|
+
|
|
37
|
+
export type AuthorizedVerifyIntent = {
|
|
38
|
+
resultId: string;
|
|
39
|
+
token: string;
|
|
40
|
+
expiresAt: string;
|
|
41
|
+
action: string;
|
|
42
|
+
};
|
|
29
43
|
|
|
30
|
-
export type
|
|
44
|
+
export type VerificationConfiguration = {
|
|
31
45
|
poses?: Pose[] | "all";
|
|
32
46
|
randomizeFaceSequence?: boolean;
|
|
33
47
|
showFaceOverlay?: boolean;
|
|
34
48
|
showDocumentOverlay?: boolean;
|
|
35
49
|
showTextOverlay?: boolean;
|
|
36
50
|
debug?: boolean;
|
|
37
|
-
signal?: AbortSignal;
|
|
38
51
|
};
|
|
39
52
|
|
|
40
53
|
export type VoltomOptions = {
|
|
41
|
-
root?: HTMLElement;
|
|
42
54
|
video?: HTMLVideoElement;
|
|
43
55
|
ui?: boolean;
|
|
56
|
+
prepare?: boolean;
|
|
44
57
|
language?: Language;
|
|
58
|
+
theme?: Theme;
|
|
45
59
|
ocrEngine?: OcrEngine;
|
|
46
60
|
faceDetector?: FaceDetectorName;
|
|
47
61
|
clientKey: string;
|
|
62
|
+
authorize?: (input: { action: string }) => Promise<AuthorizedVerifyIntent>;
|
|
48
63
|
requireEyeLevelCamera?: boolean;
|
|
49
64
|
apiUrl?: string;
|
|
65
|
+
sdkUrl?: string;
|
|
50
66
|
threshold?: number;
|
|
51
67
|
poses?: Pose[] | "all";
|
|
52
68
|
randomizeFaceSequence?: boolean;
|
|
@@ -79,13 +95,24 @@ export type VoltomOptions = {
|
|
|
79
95
|
capabilities?: VerificationCapability[];
|
|
80
96
|
};
|
|
81
97
|
|
|
98
|
+
export type VoltomReferenceCandidate = { portrait: Blob; pose: { yaw: number; pitch: number; roll: number } };
|
|
99
|
+
|
|
100
|
+
export type VoltomReference = {
|
|
101
|
+
digest: string;
|
|
102
|
+
portrait: Blob;
|
|
103
|
+
pose: { yaw: number; pitch: number; roll: number };
|
|
104
|
+
candidates?: VoltomReferenceCandidate[];
|
|
105
|
+
poseGroups?: { candidateIndices: number[]; pose: { yaw: number; pitch: number; roll: number } }[];
|
|
106
|
+
picture?: Blob;
|
|
107
|
+
};
|
|
108
|
+
|
|
82
109
|
export type VoltomBrowserSupport = { supported: boolean; unsupportedFeatures: string[] };
|
|
83
110
|
|
|
84
|
-
export type VoltomCaptures = Partial<Record<Pose | "documentFront" | "documentBack", Blob>>;
|
|
111
|
+
export type VoltomCaptures = Partial<Record<Pose | `faceReference_${number}` | "documentFront" | "documentBack" | "reference", Blob>>;
|
|
85
112
|
|
|
86
113
|
export type FaceImages = { rgb: Blob; greyscale: Blob };
|
|
87
114
|
|
|
88
|
-
export type VoltomPreparedCaptures = Partial<Record<keyof VoltomCaptures
|
|
115
|
+
export type VoltomPreparedCaptures = Partial<Record<keyof VoltomCaptures, FaceImages>>;
|
|
89
116
|
|
|
90
117
|
export type IdentityPayload = {
|
|
91
118
|
document: {
|
|
@@ -118,6 +145,8 @@ export type IdentityPayload = {
|
|
|
118
145
|
raw_data: { mrz_lines: string[]; aamva_version: string | null };
|
|
119
146
|
};
|
|
120
147
|
|
|
148
|
+
export type VoltomIdentity = Omit<IdentityPayload, "raw_data">;
|
|
149
|
+
|
|
121
150
|
export type DocumentCode = { code: string; payload: IdentityPayload; type: "mrz" | "aamva" | "ocr" };
|
|
122
151
|
|
|
123
152
|
export type OcrLine = {
|
|
@@ -150,23 +179,22 @@ export type VoltomCaptureResult = {
|
|
|
150
179
|
};
|
|
151
180
|
|
|
152
181
|
export type VoltomVerificationResult = {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
matched: boolean | null;
|
|
182
|
+
resultId: string;
|
|
183
|
+
action: VerificationAction;
|
|
184
|
+
outcome: "pass" | "fail";
|
|
185
|
+
matched: boolean;
|
|
158
186
|
score: number | null;
|
|
159
187
|
threshold: number | null;
|
|
160
|
-
reason:
|
|
161
|
-
|
|
162
|
-
identity:
|
|
188
|
+
reason: ErrorCode | null;
|
|
189
|
+
documentCode: string | null;
|
|
190
|
+
identity: VoltomIdentity | null;
|
|
163
191
|
completedAt: string | null;
|
|
164
192
|
createdAt: string;
|
|
165
193
|
};
|
|
166
194
|
|
|
167
195
|
export type VerificationPresentationState = {
|
|
168
196
|
activity: { message: string } | "matching" | null;
|
|
169
|
-
error:
|
|
197
|
+
error: VoltomSdkError | null;
|
|
170
198
|
retryAvailable: boolean;
|
|
171
199
|
feedback:
|
|
172
200
|
| { flow: "face"; pose: Pose; code: string | null }
|
|
@@ -176,16 +204,24 @@ export type VerificationPresentationState = {
|
|
|
176
204
|
};
|
|
177
205
|
|
|
178
206
|
declare class VoltomVerify {
|
|
207
|
+
static Errors: typeof Errors;
|
|
208
|
+
static isSdkError: typeof isSdkError;
|
|
209
|
+
events: EventTarget;
|
|
179
210
|
constructor(options: VoltomOptions);
|
|
211
|
+
preload(): Promise<void>;
|
|
180
212
|
prepare(): Promise<void>;
|
|
181
213
|
caniuse(): Promise<VoltomBrowserSupport>;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
214
|
+
configure(options: VerificationConfiguration): void;
|
|
215
|
+
acquireReference(file: Blob): Promise<VoltomReference>;
|
|
216
|
+
forgetReference(): void;
|
|
217
|
+
acquireFace(): Promise<VoltomVerificationResult>;
|
|
218
|
+
acquireDocument(): Promise<VoltomVerificationResult>;
|
|
219
|
+
matchID(): Promise<VoltomVerificationResult>;
|
|
185
220
|
/** Accepts images or PDFs up to 10 MB. PDFs use only page 1, rendered at up to 1200 pixels. */
|
|
186
|
-
|
|
187
|
-
|
|
221
|
+
matchReference(file: Blob): Promise<VoltomVerificationResult>;
|
|
222
|
+
forgetFace(): void;
|
|
188
223
|
forgetDocument(): void;
|
|
224
|
+
setDebug({ enabled }: { enabled: boolean }): void;
|
|
189
225
|
stop(): void;
|
|
190
226
|
dispose(): void;
|
|
191
227
|
getState(): VerificationPresentationState;
|