@voltom.io/sdk 1.0.6 → 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.d.ts +24 -18
- package/dist/sdk/facegate.dist.js +5 -5
- package/dist/sdk/facegate.js +1 -1
- package/dist/sdk/facekey.browser-VlDa2K-w.js +2 -0
- package/dist/sdk/facekey.d.ts +18 -8
- 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 +37 -18
- 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 +4 -3
- package/dist/sdk/PoseSilhouette-V9BxuMwo.js +0 -2
- package/dist/sdk/PoseSuccess-DDx23oJD.js +0 -2
- package/dist/sdk/eyeLevelCamera-aDRPs63K.js +0 -65
- package/dist/sdk/facekey.browser-bs8vp3ON.js +0 -2
- package/dist/sdk/media-Cejmtltt.js +0 -2
- package/dist/sdk/presentation-B4P1537m.js +0 -2
- package/dist/sdk/presentation-Cg1Ec60l.js +0 -8
- package/dist/sdk/view-DTvcOVnH.js +0 -3
- package/dist/sdk/view-ObOGpVdZ.js +0 -3
- package/dist/sdk/view-iMF-mWfw.js +0 -2
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"
|
|
@@ -27,9 +30,9 @@ export type OcrEngine =
|
|
|
27
30
|
|
|
28
31
|
export type FaceDetectorName = "high" | "standard" | "low";
|
|
29
32
|
|
|
30
|
-
export type VerificationCapability = "
|
|
33
|
+
export type VerificationCapability = "acquireFace" | "acquireDocument" | "acquireReference" | "matchID" | "matchReference";
|
|
31
34
|
|
|
32
|
-
export type VerificationAction = "
|
|
35
|
+
export type VerificationAction = "verify_face" | "verify_document" | "match_id" | "match_reference";
|
|
33
36
|
|
|
34
37
|
export type AuthorizedVerifyIntent = {
|
|
35
38
|
resultId: string;
|
|
@@ -38,18 +41,16 @@ export type AuthorizedVerifyIntent = {
|
|
|
38
41
|
action: string;
|
|
39
42
|
};
|
|
40
43
|
|
|
41
|
-
export type
|
|
44
|
+
export type VerificationConfiguration = {
|
|
42
45
|
poses?: Pose[] | "all";
|
|
43
46
|
randomizeFaceSequence?: boolean;
|
|
44
47
|
showFaceOverlay?: boolean;
|
|
45
48
|
showDocumentOverlay?: boolean;
|
|
46
49
|
showTextOverlay?: boolean;
|
|
47
50
|
debug?: boolean;
|
|
48
|
-
signal?: AbortSignal;
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
export type VoltomOptions = {
|
|
52
|
-
root?: HTMLElement;
|
|
53
54
|
video?: HTMLVideoElement;
|
|
54
55
|
ui?: boolean;
|
|
55
56
|
prepare?: boolean;
|
|
@@ -61,6 +62,7 @@ export type VoltomOptions = {
|
|
|
61
62
|
authorize?: (input: { action: string }) => Promise<AuthorizedVerifyIntent>;
|
|
62
63
|
requireEyeLevelCamera?: boolean;
|
|
63
64
|
apiUrl?: string;
|
|
65
|
+
sdkUrl?: string;
|
|
64
66
|
threshold?: number;
|
|
65
67
|
poses?: Pose[] | "all";
|
|
66
68
|
randomizeFaceSequence?: boolean;
|
|
@@ -93,13 +95,24 @@ export type VoltomOptions = {
|
|
|
93
95
|
capabilities?: VerificationCapability[];
|
|
94
96
|
};
|
|
95
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
|
+
|
|
96
109
|
export type VoltomBrowserSupport = { supported: boolean; unsupportedFeatures: string[] };
|
|
97
110
|
|
|
98
|
-
export type VoltomCaptures = Partial<Record<Pose | "documentFront" | "documentBack", Blob>>;
|
|
111
|
+
export type VoltomCaptures = Partial<Record<Pose | `faceReference_${number}` | "documentFront" | "documentBack" | "reference", Blob>>;
|
|
99
112
|
|
|
100
113
|
export type FaceImages = { rgb: Blob; greyscale: Blob };
|
|
101
114
|
|
|
102
|
-
export type VoltomPreparedCaptures = Partial<Record<keyof VoltomCaptures
|
|
115
|
+
export type VoltomPreparedCaptures = Partial<Record<keyof VoltomCaptures, FaceImages>>;
|
|
103
116
|
|
|
104
117
|
export type IdentityPayload = {
|
|
105
118
|
document: {
|
|
@@ -167,13 +180,12 @@ export type VoltomCaptureResult = {
|
|
|
167
180
|
|
|
168
181
|
export type VoltomVerificationResult = {
|
|
169
182
|
resultId: string;
|
|
170
|
-
mode: Mode;
|
|
171
183
|
action: VerificationAction;
|
|
172
|
-
outcome: "pass" | "fail"
|
|
173
|
-
matched: boolean
|
|
184
|
+
outcome: "pass" | "fail";
|
|
185
|
+
matched: boolean;
|
|
174
186
|
score: number | null;
|
|
175
187
|
threshold: number | null;
|
|
176
|
-
reason:
|
|
188
|
+
reason: ErrorCode | null;
|
|
177
189
|
documentCode: string | null;
|
|
178
190
|
identity: VoltomIdentity | null;
|
|
179
191
|
completedAt: string | null;
|
|
@@ -182,7 +194,7 @@ export type VoltomVerificationResult = {
|
|
|
182
194
|
|
|
183
195
|
export type VerificationPresentationState = {
|
|
184
196
|
activity: { message: string } | "matching" | null;
|
|
185
|
-
error:
|
|
197
|
+
error: VoltomSdkError | null;
|
|
186
198
|
retryAvailable: boolean;
|
|
187
199
|
feedback:
|
|
188
200
|
| { flow: "face"; pose: Pose; code: string | null }
|
|
@@ -192,17 +204,24 @@ export type VerificationPresentationState = {
|
|
|
192
204
|
};
|
|
193
205
|
|
|
194
206
|
declare class VoltomVerify {
|
|
207
|
+
static Errors: typeof Errors;
|
|
208
|
+
static isSdkError: typeof isSdkError;
|
|
209
|
+
events: EventTarget;
|
|
195
210
|
constructor(options: VoltomOptions);
|
|
196
211
|
preload(): Promise<void>;
|
|
197
212
|
prepare(): Promise<void>;
|
|
198
213
|
caniuse(): Promise<VoltomBrowserSupport>;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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>;
|
|
202
220
|
/** Accepts images or PDFs up to 10 MB. PDFs use only page 1, rendered at up to 1200 pixels. */
|
|
203
|
-
|
|
204
|
-
|
|
221
|
+
matchReference(file: Blob): Promise<VoltomVerificationResult>;
|
|
222
|
+
forgetFace(): void;
|
|
205
223
|
forgetDocument(): void;
|
|
224
|
+
setDebug({ enabled }: { enabled: boolean }): void;
|
|
206
225
|
stop(): void;
|
|
207
226
|
dispose(): void;
|
|
208
227
|
getState(): VerificationPresentationState;
|