@sekyro/web 0.1.0-rc.19 → 0.1.0-rc.20
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/CHANGELOG.md +27 -0
- package/README.md +8 -0
- package/dist/camera-trait-45MJTW4K.js +1 -0
- package/dist/{capture-session-doc-VXWWQEP4.js → capture-session-doc-QA4DOFRF.js} +1 -1
- package/dist/{capture-session-v3-Cs4yV3HJ.d.cts → capture-session-v3-CNL-GX11.d.cts} +1 -1
- package/dist/{capture-session-v3-CFSVWYzi.d.ts → capture-session-v3-DaBqN8fO.d.ts} +1 -1
- package/dist/chunk-5ZKQHFFW.js +1 -0
- package/dist/{chunk-ZPXL26BF.js → chunk-FGOVIGGL.js} +1 -1
- package/dist/{chunk-RNJA5GDF.js → chunk-IG466TOP.js} +1 -1
- package/dist/{chunk-4GJXUVZK.js → chunk-KHR4U2SZ.js} +1 -1
- package/dist/chunk-KZBBB5B2.js +1 -0
- package/dist/chunk-NJML6FMD.js +1 -0
- package/dist/chunk-TQB3URP2.js +1 -0
- package/dist/{chunk-ZO6IHP2I.js → chunk-U6S7SCBY.js} +1 -1
- package/dist/{chunk-6K4D3U6Q.js → chunk-W2WD7PR2.js} +1 -1
- package/dist/chunk-XCKE2MJL.js +1 -0
- package/dist/chunk-ZLWH4RBO.js +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +6 -71
- package/dist/client/index.d.ts +6 -71
- package/dist/client/index.js +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +1 -1
- package/dist/{create-document-capture-FVSQPUF6.js → create-document-capture-GJXBQMTC.js} +1 -1
- package/dist/{create-portrait-capture-INDCF65X.js → create-portrait-capture-MOS2D7CL.js} +1 -1
- package/dist/{create-verification-1BrMZqPJ.d.cts → create-verification-BBOUYpga.d.cts} +113 -22
- package/dist/{create-verification-CuoYJ3kj.d.ts → create-verification-COpe2hxf.d.ts} +113 -22
- package/dist/{icao-gate-BSbyqLUh.d.ts → icao-gate-CEGvJR3q.d.ts} +19 -9
- package/dist/{icao-gate-D-wePfoV.d.cts → icao-gate-l40OU6x1.d.cts} +19 -9
- package/dist/icao-policy-BgI1Y870.d.ts +71 -0
- package/dist/icao-policy-C7fIdRzo.d.cts +71 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/internal/index.cjs +1 -1
- package/dist/internal/index.d.cts +6 -6
- package/dist/internal/index.d.ts +6 -6
- package/dist/internal/index.js +1 -1
- package/dist/plan-runner-35655N4Z.js +1 -0
- package/dist/print-AYSCRSZB.js +1 -0
- package/dist/{types-DPl0hsmI.d.cts → types-Dpfg2cO8.d.cts} +149 -11
- package/dist/{types-DPl0hsmI.d.ts → types-Dpfg2cO8.d.ts} +149 -11
- package/dist/upload-file-UYXOHCRG.js +1 -0
- package/package.json +3 -2
- package/sbom.cdx.json +46 -7
- package/dist/chunk-5Y3UST3W.js +0 -1
- package/dist/chunk-64V55KD7.js +0 -1
- package/dist/chunk-JUEOHNVW.js +0 -1
- package/dist/chunk-L45YTRJJ.js +0 -1
- package/dist/chunk-PLH6ZR6J.js +0 -1
- package/dist/plan-runner-WEUIMCYU.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as Detector } from './detect-worker-DclNxkZT.cjs';
|
|
2
|
-
import { A as AcceptedDocumentType, a5 as NationalEidOption,
|
|
3
|
-
import { i as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1, p as DeviceClass, b as CaptureArtifacts, a4 as EngineErrorDetail, I as V3GateQuality, O as V3TelemetryEvent } from './capture-session-v3-
|
|
4
|
-
import {
|
|
2
|
+
import { A as AcceptedDocumentType, a5 as NationalEidOption, aC as StepSection, aL as HostedBranding, aj as PlanSectionView, ag as PlanChoiceKind, k as ContactChannel, f as CheckReason, aP as RetakeHint, ad as PhotoSource, ae as PhotoSourcePick, Y as IdentityMethod, E as EidAfterPass, Z as IdentitySummarySource, I as HostedIcaoPolicy, a9 as PhoneCountryRule, W as IcaoReportEntry, aO as IcaoCaptureTuning, P as HostedPortraitPendingFix, b as CaptureMode, R as HostedSessionView, S as HostedStepView, ak as PlanStepView, aS as ScreenRampReport, aK as CaptureProvenance, aG as ScreenRampColour, ax as SessionFailureReason, aH as AgeEstimationReason, aF as VerificationLevel, aE as VerificationAssurance, a4 as MethodChoiceView, aI as CameraUnavailableCause, aJ as CaptureIssueReport, aw as ResolvedCaptureMode, U as HostedVoiceView, aQ as ScreenRampChallenge, aX as PersonMask, a as AttestationInput, h as CheckType, aq as PortraitIcaoInput } from './types-Dpfg2cO8.cjs';
|
|
3
|
+
import { i as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1, p as DeviceClass, b as CaptureArtifacts, a4 as EngineErrorDetail, I as V3GateQuality, O as V3TelemetryEvent } from './capture-session-v3-CNL-GX11.cjs';
|
|
4
|
+
import { f as IcaoGateSummary, g as IcaoGateUpdate, P as Point, h as Box, m as IcaoFrameObservation, H as HostedClient, n as IcaoGate } from './icao-gate-l40OU6x1.cjs';
|
|
5
5
|
|
|
6
6
|
declare const ISSUER_CODES: readonly string[];
|
|
7
7
|
|
|
@@ -100,7 +100,13 @@ interface PhoneOtpSnapshot extends StepAttempts {
|
|
|
100
100
|
context: StepContext;
|
|
101
101
|
phase: "send" | "verify";
|
|
102
102
|
numberSource: OtpNumberSource;
|
|
103
|
+
/**
|
|
104
|
+
* The person types the number: not with a `prefilled` source, nor when the partner supplied the number of a
|
|
105
|
+
* `prefilled_or_entered` session (`prefilled`; the server would send to the partner's number anyway).
|
|
106
|
+
*/
|
|
103
107
|
needsPhone: boolean;
|
|
108
|
+
/** UX refresh 2026-11-05: the partner supplied the number (the server's `otp.prefilled`); the screen says so. */
|
|
109
|
+
prefilled?: true;
|
|
104
110
|
/**
|
|
105
111
|
* The channels the person chooses from, in the server's display order
|
|
106
112
|
* (WhatsApp first). `[]` for a session created before channel choice: send
|
|
@@ -144,8 +150,10 @@ interface EmailOtpSnapshot extends StepAttempts {
|
|
|
144
150
|
context: StepContext;
|
|
145
151
|
phase: "send" | "verify";
|
|
146
152
|
emailSource: EmailSource;
|
|
147
|
-
/** The person types the address (every source but `prefilled
|
|
153
|
+
/** The person types the address (every source but `prefilled`, and not over a partner's address). */
|
|
148
154
|
needsEmail: boolean;
|
|
155
|
+
/** UX refresh 2026-11-05: the partner supplied the address (the server's `emailOtp.prefilled`). */
|
|
156
|
+
prefilled?: true;
|
|
149
157
|
/** Masked address of the last send (e.g. `a•••@e•••.com`). */
|
|
150
158
|
sentToMasked?: string;
|
|
151
159
|
codeExpiresAt?: string;
|
|
@@ -167,6 +175,11 @@ interface ChoiceOptionSnapshot {
|
|
|
167
175
|
service: string;
|
|
168
176
|
/** `national_eid`: the provider ("Verify with Houwiyeti"); absent = the generic eID copy. */
|
|
169
177
|
nationalEid?: NationalEidOption;
|
|
178
|
+
/**
|
|
179
|
+
* `phone_otp` (flow UX refresh 2026-11-05): the channels in display order, so a contact choice offers WhatsApp / SMS
|
|
180
|
+
* directly next to Email (choose the option, then send with that channel). Absent on an older API.
|
|
181
|
+
*/
|
|
182
|
+
channels?: OtpChannel[];
|
|
170
183
|
}
|
|
171
184
|
/** `plan.choice` as a choice screen shows it. */
|
|
172
185
|
interface PlanChoiceSnapshot {
|
|
@@ -327,6 +340,23 @@ interface DocumentSnapshot extends StepAttempts {
|
|
|
327
340
|
* (`doc.ageStepUp`). Absent otherwise.
|
|
328
341
|
*/
|
|
329
342
|
ageStepUp?: true;
|
|
343
|
+
/** 2026-11-05: where the document photo comes from (the view's `documents`; camera only when absent). */
|
|
344
|
+
photo: PhotoSourceState;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Where the photo of the ID document step or the portrait step comes from (2026-11-05), from the hosted view:
|
|
348
|
+
* - `source` `camera`: the camera screen only (no upload, even when the camera cannot open);
|
|
349
|
+
* - `source` `upload`: the upload screen at once (no camera screen);
|
|
350
|
+
* - `source` `choice`: ask "Take a photo" or "Upload a photo", unless `pick` holds the person's earlier pick for this
|
|
351
|
+
* step (a retry, the back side): then go straight to that source.
|
|
352
|
+
*/
|
|
353
|
+
interface PhotoSourceState {
|
|
354
|
+
/** The step's setting. */
|
|
355
|
+
source: PhotoSource;
|
|
356
|
+
/** The person's pick under `choice` (recorded by the server from their first photo of the step); `null` before one. */
|
|
357
|
+
pick: PhotoSourcePick | null;
|
|
358
|
+
/** An upload is accepted now (`uploadDocument` / `uploadPortrait`). */
|
|
359
|
+
uploadOffered: boolean;
|
|
330
360
|
}
|
|
331
361
|
interface LivenessSnapshot extends StepAttempts {
|
|
332
362
|
/**
|
|
@@ -366,7 +396,11 @@ interface LivePhotoPlan {
|
|
|
366
396
|
/**
|
|
367
397
|
* The ICAO portrait step of an ID-document session (SDK spec §4.9, §5.4):
|
|
368
398
|
* - `capture` — `portrait_icao` is the frontier: run the strict gate, take the
|
|
369
|
-
* portrait (a retry carries the server's `report` to coach from)
|
|
399
|
+
* portrait (a retry carries the server's `report` to coach from), or upload
|
|
400
|
+
* a photo when `photo.uploadOffered` (design 2026-11-04 §6.2);
|
|
401
|
+
* - `review` — the server adjusted the photo and waits for the person to accept
|
|
402
|
+
* it (`pendingFix`, design 2026-11-04 §6.4 step 4): show both photos and call
|
|
403
|
+
* `confirmFix(true | false)`;
|
|
370
404
|
* - `match` — the portrait was accepted (`passed`, or `review` after the
|
|
371
405
|
* attempt cap: `review: true`, "We'll review your photo") and `face_match`
|
|
372
406
|
* is due: the SDK submits it with the portrait as the probe — no new capture.
|
|
@@ -381,7 +415,7 @@ interface PortraitSnapshot extends StepAttempts {
|
|
|
381
415
|
kind: "portrait";
|
|
382
416
|
key: string;
|
|
383
417
|
context: StepContext;
|
|
384
|
-
phase: "capture" | "match";
|
|
418
|
+
phase: "capture" | "review" | "match";
|
|
385
419
|
/** The server's per-criterion report of the last attempt (`null` before one). */
|
|
386
420
|
report: IcaoReportEntry[] | null;
|
|
387
421
|
/** The portrait goes to a reviewer (attempt cap reached in decision mode `review`). */
|
|
@@ -396,6 +430,24 @@ interface PortraitSnapshot extends StepAttempts {
|
|
|
396
430
|
* only the ICAO portrait needs another still — a portrait-only retake, no new clip.
|
|
397
431
|
*/
|
|
398
432
|
retakeOnly: boolean;
|
|
433
|
+
/**
|
|
434
|
+
* 2026-11-05: where the photo comes from (the view's `portrait.source`; `camera` on older servers). `uploadOffered`
|
|
435
|
+
* is `false` outside the `capture` phase.
|
|
436
|
+
*/
|
|
437
|
+
photo: PhotoSourceState;
|
|
438
|
+
/** `review` phase: the original and the adjusted photo, and what was changed. `null` otherwise. */
|
|
439
|
+
pendingFix: HostedPortraitPendingFix | null;
|
|
440
|
+
/**
|
|
441
|
+
* Design 2026-11-04 §4, §6.3 (`portrait.captureMode`): who takes the photo on the step's own camera screen (`self`,
|
|
442
|
+
* `assisted`, or `choice`: ask who takes the photo unless the person already picked for the session). Absent when
|
|
443
|
+
* the still rides the liveness capture (one capture) or on an older server.
|
|
444
|
+
*/
|
|
445
|
+
captureMode?: CaptureMode;
|
|
446
|
+
/**
|
|
447
|
+
* Design 2026-11-04 §6.6: a returning person's earlier photo is being bound to today's liveness (the SDK submits it
|
|
448
|
+
* by itself: nothing for the person to do). Absent on older servers.
|
|
449
|
+
*/
|
|
450
|
+
reuse?: boolean;
|
|
399
451
|
}
|
|
400
452
|
interface MobileRequiredSnapshot {
|
|
401
453
|
/**
|
|
@@ -459,8 +511,8 @@ interface ResultSnapshot {
|
|
|
459
511
|
type StepSnapshot = PhoneOtpSnapshot | EmailOtpSnapshot | ContactChoiceSnapshot | IdentitySummarySnapshot | MethodSnapshot | ChoiceSnapshot | EidSnapshot | RegistrySnapshot | DocumentSnapshot | LivenessSnapshot | PortraitSnapshot | MobileRequiredSnapshot | ProcessingSnapshot | UnsupportedSnapshot | ResultSnapshot;
|
|
460
512
|
/**
|
|
461
513
|
* ID mode: `face_match` is due right after an ACCEPTED portrait (passed, or
|
|
462
|
-
* review after the cap) that it has not been tried with yet — the
|
|
463
|
-
* the probe
|
|
514
|
+
* review after the cap) that it has not been tried with yet — the server picks
|
|
515
|
+
* the probe, so no selfie is taken. A face_match that
|
|
464
516
|
* already carries a reason was tried: the regular selfie path applies.
|
|
465
517
|
*/
|
|
466
518
|
declare function portraitMatchStep(view: HostedSessionView, frontier: PlanStepView): PlanStepView | null;
|
|
@@ -1012,22 +1064,13 @@ interface VerificationResult {
|
|
|
1012
1064
|
level?: VerificationLevel;
|
|
1013
1065
|
/** How the level was proved, when the API reports it. */
|
|
1014
1066
|
assurance?: VerificationAssurance;
|
|
1015
|
-
/**
|
|
1016
|
-
* The person the session is linked to, `per_` form (`per_<24 hex>`, as the
|
|
1017
|
-
* API's `personId` and the `/people` routes name it), once that person has
|
|
1018
|
-
* passed a verification (absent before that).
|
|
1019
|
-
*/
|
|
1020
|
-
personId?: string;
|
|
1021
|
-
/**
|
|
1022
|
-
* The same person as {@link VerificationResult.personId}, bare (24
|
|
1023
|
-
* hexadecimal characters, no prefix), as the result token's `sub` names it.
|
|
1024
|
-
*/
|
|
1025
|
-
subjectId?: string;
|
|
1026
1067
|
}
|
|
1027
1068
|
/**
|
|
1028
1069
|
* `on('busy')` payload: the model service answered
|
|
1029
1070
|
* `503 inference_unavailable` and the SDK waits `retryAfterSeconds` before
|
|
1030
|
-
* retry number `attempt` (1-based, at most 3).
|
|
1071
|
+
* retry number `attempt` (1-based, at most 3). The wait is the service's
|
|
1072
|
+
* `Retry-After` (10 s without one) capped at 20 s and spread by ±25 %, so it
|
|
1073
|
+
* may have a fraction. Show "busy, trying again" copy.
|
|
1031
1074
|
*/
|
|
1032
1075
|
interface VerificationBusy {
|
|
1033
1076
|
attempt: number;
|
|
@@ -1329,6 +1372,16 @@ interface DocumentStepHandle extends DocumentSnapshot {
|
|
|
1329
1372
|
/** Web live MRZ (on-device MRZ read on MRZ faces; obeys the session's server tuning). */
|
|
1330
1373
|
liveMrz?: DocumentLiveMrzOptions;
|
|
1331
1374
|
}): DocumentCaptureHandle;
|
|
1375
|
+
/**
|
|
1376
|
+
* Design 2026-11-04 §5.2: submit a photo of the document picked from the device, for the face the step asks for
|
|
1377
|
+
* (`captureSide`, else `side`). Only while `photo.uploadOffered`, else rejects with `RangeError("upload_not_offered")`.
|
|
1378
|
+
* JPEG and PNG are sent as JPEG; HEIC is converted to JPEG on the device where the browser can decode it. A file
|
|
1379
|
+
* that is not an image of these types, or cannot be decoded, rejects with `TypeError("unsupported_file")` (nothing
|
|
1380
|
+
* is sent). The SDK scales the photo down (long side at most 2560 px), uploads it without a capture proof and submits
|
|
1381
|
+
* `doc_ocr` with `source: "upload"`; the step then moves on as after a camera photo (the next face, a retry with its
|
|
1382
|
+
* `reason`, or the next step). Other failures reject with the typed `HostedApiError`.
|
|
1383
|
+
*/
|
|
1384
|
+
uploadDocument(file: Blob): Promise<void>;
|
|
1332
1385
|
}
|
|
1333
1386
|
/** The liveness / selfie step. */
|
|
1334
1387
|
interface LivenessStepHandle extends LivenessSnapshot {
|
|
@@ -1376,6 +1429,22 @@ interface PortraitStepHandle extends PortraitSnapshot {
|
|
|
1376
1429
|
keepScreenAwake?: boolean;
|
|
1377
1430
|
assetBaseUrl?: string;
|
|
1378
1431
|
}): PortraitCaptureHandle;
|
|
1432
|
+
/**
|
|
1433
|
+
* Design 2026-11-04 §6.2: submit a photo picked from the device as the portrait, `capture` phase only and only while
|
|
1434
|
+
* `photo.uploadOffered`, else rejects with `RangeError("upload_not_offered")`. JPEG and PNG are sent as picked (a large one
|
|
1435
|
+
* is scaled down and sent as JPEG); HEIC is converted to JPEG on the device where the browser can decode it. A file
|
|
1436
|
+
* that is not an image of these types, or cannot be decoded, rejects with `TypeError("unsupported_file")` (nothing is
|
|
1437
|
+
* sent). The SDK uploads it without a capture proof and submits `portrait_icao` with `source: "upload"`; the step then
|
|
1438
|
+
* moves on as after a camera photo (the `review` phase, a retry with its `reason`, or the next step). Other failures
|
|
1439
|
+
* reject with the typed `HostedApiError`.
|
|
1440
|
+
*/
|
|
1441
|
+
uploadPortrait(file: Blob): Promise<void>;
|
|
1442
|
+
/**
|
|
1443
|
+
* Design 2026-11-04 §6.4 step 4, `review` phase only (else rejects with `RangeError("no_pending_fix")`): `true` uses
|
|
1444
|
+
* the adjusted photo, `false` declines it (the attempt ends, `portrait_declined_fix`, not billed) and the step returns
|
|
1445
|
+
* to the `capture` phase for another photo. Submits `portrait_icao` with `{ fixReview: { accept } }`.
|
|
1446
|
+
*/
|
|
1447
|
+
confirmFix(accept: boolean): Promise<void>;
|
|
1379
1448
|
}
|
|
1380
1449
|
/** The biometric step needs a phone (desktop browser). */
|
|
1381
1450
|
interface MobileRequiredStepHandle extends MobileRequiredSnapshot {
|
|
@@ -1510,6 +1579,21 @@ declare function releaseLivenessAssets(assetBaseUrl?: string): void;
|
|
|
1510
1579
|
*/
|
|
1511
1580
|
declare function preloadedDetectorFactory(assetBaseUrl?: string): (() => Promise<Detector>) | undefined;
|
|
1512
1581
|
|
|
1582
|
+
/** Seams for tests (jsdom has neither `createImageBitmap` nor a canvas encoder). */
|
|
1583
|
+
interface UploadFileInternals {
|
|
1584
|
+
decode?(blob: Blob): Promise<{
|
|
1585
|
+
width: number;
|
|
1586
|
+
height: number;
|
|
1587
|
+
draw(ctx: CanvasRenderingContext2D, w: number, h: number): void;
|
|
1588
|
+
close(): void;
|
|
1589
|
+
}>;
|
|
1590
|
+
encode?(source: {
|
|
1591
|
+
width: number;
|
|
1592
|
+
height: number;
|
|
1593
|
+
draw(ctx: CanvasRenderingContext2D, w: number, h: number): void;
|
|
1594
|
+
}, quality: number): Promise<Blob | null>;
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1513
1597
|
/**
|
|
1514
1598
|
* Physical geometry the scanner frames (ISO/IEC 7810 / ICAO 9303). `"card"` is
|
|
1515
1599
|
* any identity card or residence permit of ANY issuer: ID-1 (TD1) or ID-2 (TD2)
|
|
@@ -2973,7 +3057,8 @@ declare const TRANSPORT_REPLAY_DELAY_MS = 1000;
|
|
|
2973
3057
|
/**
|
|
2974
3058
|
* `503 inference_unavailable` (profile v2 step 4 — request-level: no state
|
|
2975
3059
|
* change, no attempt used, not billed): retries after `retryAfterSeconds`
|
|
2976
|
-
* (default {@link INFERENCE_RETRY_DEFAULT_S}, capped at
|
|
3060
|
+
* (default {@link INFERENCE_RETRY_DEFAULT_S}, capped at 20 s, ±25 % jitter,
|
|
3061
|
+
* at least 0.5 s: `jitteredRetryWaitMs`), at most
|
|
2977
3062
|
* {@link INFERENCE_RETRY_ATTEMPTS} times, each under a FRESH key (each retry
|
|
2978
3063
|
* is its own logical attempt; the backend never caches a 5xx envelope).
|
|
2979
3064
|
*/
|
|
@@ -2995,6 +3080,8 @@ interface SubmitRuntime {
|
|
|
2995
3080
|
uuid(): string;
|
|
2996
3081
|
/** An `inference_unavailable` retry is about to wait (the `busy` event). */
|
|
2997
3082
|
onBusy?(info: VerificationBusy): void;
|
|
3083
|
+
/** The retry jitter source, a value in [0, 1) (tests pin it). Defaults to `Math.random`. */
|
|
3084
|
+
random?(): number;
|
|
2998
3085
|
}
|
|
2999
3086
|
/**
|
|
3000
3087
|
* Run one logical submission (ported use-submit semantics):
|
|
@@ -3161,6 +3248,8 @@ interface VerificationInternals {
|
|
|
3161
3248
|
capture?: LivenessCaptureInternals;
|
|
3162
3249
|
sleep?: (ms: number) => Promise<void>;
|
|
3163
3250
|
uuid?: () => string;
|
|
3251
|
+
/** The `inference_unavailable` retry jitter source, a value in [0, 1); default `Math.random`. */
|
|
3252
|
+
random?: () => number;
|
|
3164
3253
|
/** Wall clock for the plan runner (OTP resend time); default `Date.now`. */
|
|
3165
3254
|
now?: () => number;
|
|
3166
3255
|
/** DocumentCapture seams for the runner's document step (engine, encode, classify, blur gate). */
|
|
@@ -3169,6 +3258,8 @@ interface VerificationInternals {
|
|
|
3169
3258
|
portrait?: PortraitCaptureInternals;
|
|
3170
3259
|
/** Live-photo kit seams for the runner's one-capture Step 3 (landmarker, frames, encode). */
|
|
3171
3260
|
livePhoto?: LivePhotoKitInternals;
|
|
3261
|
+
/** Document upload seams for the runner's document step (image decode / encode). */
|
|
3262
|
+
upload?: UploadFileInternals;
|
|
3172
3263
|
}
|
|
3173
3264
|
/** `crypto.randomUUID()` with a v4 fallback for hosts that lack it. */
|
|
3174
3265
|
declare function randomUuid(): string;
|
|
@@ -3180,4 +3271,4 @@ declare function createVerification(options: VerificationOptions): Verification;
|
|
|
3180
3271
|
/** {@link createVerification} with construction seams (tests / Sekyro AI-internal hosts). */
|
|
3181
3272
|
declare function createVerificationInternal(options: VerificationOptions, internals: VerificationInternals): Verification;
|
|
3182
3273
|
|
|
3183
|
-
export { type LivePhotoPlan as $, type AcceptedDocumentsLike as A, type DocumentGuideMeasure as B, type CameraFacing as C, type DocumentCaptureOptions as D, type DocumentLiveMrzOptions as E, type DocumentMrzUpdate as F, type DocumentPoint as G, type DocumentQuad as H, type DocumentReticle as I, type DocumentScanPhase as J, type DocumentScanUpdate as K, type DocumentSide as L, type DocumentSnapshot as M, type DocumentStepHandle as N, type EidSnapshot as O, type PortraitCaptureOptions as P, type EidStepHandle as Q, type EmailOtpSnapshot as R, type EmailOtpStepHandle as S, type EmailSource as T, type GateHint as U, type GateUpdate as V, ISSUER_CODES as W, type IdentitySummarySnapshot as X, type IdentitySummaryStepHandle as Y, type InLaneSwitch as Z, type LivePhotoGateUpdate as _, type DocumentCaptureHandle as a,
|
|
3274
|
+
export { type LivePhotoPlan as $, type AcceptedDocumentsLike as A, type DocumentGuideMeasure as B, type CameraFacing as C, type DocumentCaptureOptions as D, type DocumentLiveMrzOptions as E, type DocumentMrzUpdate as F, type DocumentPoint as G, type DocumentQuad as H, type DocumentReticle as I, type DocumentScanPhase as J, type DocumentScanUpdate as K, type DocumentSide as L, type DocumentSnapshot as M, type DocumentStepHandle as N, type EidSnapshot as O, type PortraitCaptureOptions as P, type EidStepHandle as Q, type EmailOtpSnapshot as R, type EmailOtpStepHandle as S, type EmailSource as T, type GateHint as U, type GateUpdate as V, ISSUER_CODES as W, type IdentitySummarySnapshot as X, type IdentitySummaryStepHandle as Y, type InLaneSwitch as Z, type LivePhotoGateUpdate as _, type DocumentCaptureHandle as a, sectionOf as a$, type LivenessAssetsStatus as a0, type LivenessCaptureEvents as a1, type LivenessCaptureHandle as a2, type LivenessCaptureOptions as a3, type LivenessSnapshot as a4, type LivenessStartOptions as a5, type LivenessStepHandle as a6, type MethodSnapshot as a7, type MethodStepHandle as a8, type MobileRequiredSnapshot as a9, type StepContext as aA, type StepSnapshot as aB, type UnsupportedReason as aC, type UnsupportedSnapshot as aD, type UnsupportedStepHandle as aE, type Verification as aF, type VerificationBusy as aG, type VerificationEvents as aH, type VerificationLocale as aI, type VerificationOptions as aJ, type VerificationResult as aK, type VerificationStatus as aL, type VerificationStep as aM, WEB_IDENTITY_METHODS as aN, acceptedIssuers as aO, acceptedTypesFor as aP, cameraUnavailableCauseOf as aQ, createLivenessCapture as aR, createVerification as aS, deriveStep as aT, flagOf as aU, getLivenessAssetsStatus as aV, laneOf as aW, otherOptions as aX, preloadLivenessAssets as aY, releaseLivenessAssets as aZ, resolveAcceptedDocuments as a_, type MobileRequiredStepHandle as aa, type OtpChannel as ab, type OtpNumberSource as ac, PLATFORM_UNSUPPORTED as ad, type PhoneOtpSnapshot as ae, type PhoneOtpStepHandle as af, type PhotoSourceState as ag, type PlanChoiceSnapshot as ah, type PortraitCaptureEvents as ai, type PortraitCaptureState as aj, type PortraitGateUpdate as ak, type PortraitSnapshot as al, type PortraitStartOptions as am, type PortraitStepHandle as an, type PreloadLivenessAssetsOptions as ao, type ProcessingSnapshot as ap, type ProcessingStepHandle as aq, type ReasonCode as ar, type RegistrySnapshot as as, type RegistrySource as at, type RegistryStepHandle as au, type ResultDisplay as av, type ResultSnapshot as aw, type ResultStepHandle as ax, type SdkFailureReason as ay, type StepAttempts as az, type PortraitCaptureHandle as b, type EncodedDocument as b$, subscribeLivenessAssets as b0, type DocCatalogEntry as b1, type LiveMrzTuning as b2, type TextLockTuning as b3, type OcrEngineClient as b4, type DocAssistReport as b5, type ReadyInfo as b6, type LoadFailure as b7, type OcrEngineOptions as b8, type SubmitRuntime as b9, DocAssist as bA, type DocAssistEngine as bB, type DocAssistTick as bC, type DocCameraTuning as bD, type DocCaptureReport as bE, type DocCaptureVia as bF, type DocChecksPayload as bG, type DocEngineLike as bH, DocFeedbackAggregator as bI, type DocFeedbackKey as bJ, type DocFeedbackState as bK, type DocFormat as bL, type DocFrameAnalysis as bM, type DocFrameMeasures as bN, type DocGateQuality as bO, type DocGateThresholds as bP, type DocGateTick as bQ, type DocGateTickInput as bR, DocGateV1 as bS, type DocQuad as bT, type DocQuadPoint as bU, type DocShutterReason as bV, type DocShutterTuning as bW, type DocSide as bX, type DocumentCaptureController as bY, type DocumentCaptureInternals as bZ, EMPTY_GUIDE_METRICS as b_, type HostedClientLike as ba, ANALYSIS_LONG_EDGE as bb, ASPECT_BANDS as bc, AttestationError as bd, BLUR_REFUSE_SHARPNESS_MAX as be, type BlurStatus as bf, CAPTURE_CANDIDATE_SPACING_MS as bg, CAPTURE_EXTRA_CANDIDATES as bh, CLIP_MIME_ALLOWLIST as bi, type CaptureEngine as bj, CaptureSessionDoc as bk, type CaptureSessionDocEvents as bl, type CaptureSessionDocOptions as bm, DOC_ANALYSIS_DEFAULTS as bn, DOC_BLACK_FRAME_LUMA as bo, DOC_BLACK_FRAME_TICKS as bp, DOC_CADENCE_HZ as bq, DOC_CAMERA_TUNING_DEFAULTS as br, DOC_CATALOG as bs, DOC_DETECT_WIDTH as bt, DOC_FEEDBACK_STATES as bu, DOC_FIRST_FRAME_MS as bv, DOC_GATE_V1_DEFAULTS as bw, DOC_SHUTTER_DEFAULTS as bx, type DeviceReadHint as by, type DocArtifacts as bz, type CaptureChannel as c, type VerificationInternals as c$, FLIP_FILL_MIN as c0, FLIP_GAP_MS as c1, FLIP_TIMEOUT_MS as c2, type FocusCaps as c3, type FramingStatus as c4, GUIDE_LOCK_DEFAULTS as c5, type GlareStatus as c6, type GrabbedFrame as c7, type GuideBlocker as c8, GuideLock as c9, type LivenessFlowDeps as cA, type LivenessFlowOutcome as cB, MANUAL_SHUTTER_MS as cC, MR_DOC_CATALOG as cD, NO_REPORT_MS as cE, type OpenDocCameraDeps as cF, PORTRAIT_JPEG_QUALITY as cG, PRELOAD_BLAZE_INIT_TIMEOUT_MS as cH, PRELOAD_BUDGET_MS as cI, PROCESSING_POLL_DELAY_MS as cJ, PROCESSING_POLL_MAX as cK, type PortraitCaptureController as cL, type PortraitCaptureInternals as cM, REGISTRY_RETRY_DELAY_MS as cN, type ReticleType as cO, SAME_FACE_MAX_DROPS as cP, type ScanEvent as cQ, type ScanLayout as cR, type ScanNotice as cS, type ScanPhase as cT, type ScanReport as cU, type ScanSide as cV, type ScanState as cW, type SubmitExecutor as cX, TEXT_LOCK_DEFAULTS as cY, TRANSPORT_REPLAY_ATTEMPTS as cZ, TRANSPORT_REPLAY_DELAY_MS as c_, type GuideLockTick as ca, type GuideLockTuning as cb, type GuideMetrics as cc, type GuideRect as cd, INFERENCE_RETRY_ATTEMPTS as ce, INFERENCE_RETRY_DEFAULT_S as cf, LANDMARKER_MODEL as cg, LENS_STORAGE_KEY as ch, LENS_TRY_MAX as ci, LIVE_MRZ_DEFAULTS as cj, LIVE_PHOTO_IDLE_MS as ck, LIVE_PHOTO_MAX_HZ as cl, type LandmarkedFace as cm, type LandmarkerLike as cn, type LensKind as co, type LensSource as cp, type LightingStatus as cq, type LiveMrzCapture as cr, type LiveMrzState as cs, type LivePhotoGate as ct, type LivePhotoKit as cu, type LivePhotoKitInternals as cv, type LivePhotoKitOptions as cw, type LivePhotoStill as cx, type LivenessCaptureInternalHandle as cy, type LivenessCaptureInternals as cz, type CaptureEngineId as d, analyzeDocFrame as d0, analyzeGuide as d1, aspectBand as d2, aspectFits as d3, buildDeviceReadHint as d4, coverPointToVideo as d5, createDocumentCaptureInternal as d6, createFaceLandmarker as d7, createLivePhotoKit as d8, createLivenessCaptureInternal as d9, rankBackCameras as dA, readStoredLens as dB, resetLivenessAssetsForTests as dC, resolveDocCameraTuning as dD, resolveDocShutterTuning as dE, resolveGuideLockTuning as dF, runLivenessFlow as dG, runSubmission as dH, scannerFormatFor as dI, setPreloadLoaderForTests as dJ, settledHint as dK, singleShotFocusAt as dL, specularFraction as dM, supportsFocusMode as dN, warmDocDetector as dO, writeStoredLens as dP, createPortraitCaptureInternal as da, createVerificationInternal as db, docZoomFor as dc, encodeDocumentImage as dd, facesOf as de, feedbackVoteOf as df, focusOk as dg, guideQuad as dh, guideRegionInFrame as di, initialScanState as dj, lensKindOf as dk, mapEngineState as dl, mapErrorKind as dm, mapGuidanceHint as dn, nextScanState as dp, observe as dq, openDocCamera as dr, passportBandOf as ds, portraitMatchStep as dt, preloadedDetectorFactory as du, quadAreaFrac as dv, quadBounds as dw, quadIou as dx, quadTiltRatio as dy, randomUuid as dz, type CaptureError as e, type CaptureErrorDetail as f, type CaptureErrorKind as g, type CaptureErrorPhase as h, type CaptureState as i, type CapturedArtifacts as j, type CapturedDocument as k, type CapturedPortrait as l, type ChoiceOptionSnapshot as m, type ChoiceSnapshot as n, type ChoiceStepHandle as o, type ContactChoiceSnapshot as p, type ContactChoiceStepHandle as q, DEFAULT_API_ORIGIN as r, DOCUMENT_TYPE_ORDER as s, type DeriveStepEnv as t, type DocumentCaptureEvents as u, type DocumentCaptureState as v, type DocumentFeedback as w, type DocumentFeedbackKey as x, type DocumentGateUpdate as y, type DocumentGuide as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as Detector } from './detect-worker-DclNxkZT.js';
|
|
2
|
-
import { A as AcceptedDocumentType, a5 as NationalEidOption,
|
|
3
|
-
import { i as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1, p as DeviceClass, b as CaptureArtifacts, a4 as EngineErrorDetail, I as V3GateQuality, O as V3TelemetryEvent } from './capture-session-v3-
|
|
4
|
-
import {
|
|
2
|
+
import { A as AcceptedDocumentType, a5 as NationalEidOption, aC as StepSection, aL as HostedBranding, aj as PlanSectionView, ag as PlanChoiceKind, k as ContactChannel, f as CheckReason, aP as RetakeHint, ad as PhotoSource, ae as PhotoSourcePick, Y as IdentityMethod, E as EidAfterPass, Z as IdentitySummarySource, I as HostedIcaoPolicy, a9 as PhoneCountryRule, W as IcaoReportEntry, aO as IcaoCaptureTuning, P as HostedPortraitPendingFix, b as CaptureMode, R as HostedSessionView, S as HostedStepView, ak as PlanStepView, aS as ScreenRampReport, aK as CaptureProvenance, aG as ScreenRampColour, ax as SessionFailureReason, aH as AgeEstimationReason, aF as VerificationLevel, aE as VerificationAssurance, a4 as MethodChoiceView, aI as CameraUnavailableCause, aJ as CaptureIssueReport, aw as ResolvedCaptureMode, U as HostedVoiceView, aQ as ScreenRampChallenge, aX as PersonMask, a as AttestationInput, h as CheckType, aq as PortraitIcaoInput } from './types-Dpfg2cO8.js';
|
|
3
|
+
import { i as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1, p as DeviceClass, b as CaptureArtifacts, a4 as EngineErrorDetail, I as V3GateQuality, O as V3TelemetryEvent } from './capture-session-v3-DaBqN8fO.js';
|
|
4
|
+
import { f as IcaoGateSummary, g as IcaoGateUpdate, P as Point, h as Box, m as IcaoFrameObservation, H as HostedClient, n as IcaoGate } from './icao-gate-CEGvJR3q.js';
|
|
5
5
|
|
|
6
6
|
declare const ISSUER_CODES: readonly string[];
|
|
7
7
|
|
|
@@ -100,7 +100,13 @@ interface PhoneOtpSnapshot extends StepAttempts {
|
|
|
100
100
|
context: StepContext;
|
|
101
101
|
phase: "send" | "verify";
|
|
102
102
|
numberSource: OtpNumberSource;
|
|
103
|
+
/**
|
|
104
|
+
* The person types the number: not with a `prefilled` source, nor when the partner supplied the number of a
|
|
105
|
+
* `prefilled_or_entered` session (`prefilled`; the server would send to the partner's number anyway).
|
|
106
|
+
*/
|
|
103
107
|
needsPhone: boolean;
|
|
108
|
+
/** UX refresh 2026-11-05: the partner supplied the number (the server's `otp.prefilled`); the screen says so. */
|
|
109
|
+
prefilled?: true;
|
|
104
110
|
/**
|
|
105
111
|
* The channels the person chooses from, in the server's display order
|
|
106
112
|
* (WhatsApp first). `[]` for a session created before channel choice: send
|
|
@@ -144,8 +150,10 @@ interface EmailOtpSnapshot extends StepAttempts {
|
|
|
144
150
|
context: StepContext;
|
|
145
151
|
phase: "send" | "verify";
|
|
146
152
|
emailSource: EmailSource;
|
|
147
|
-
/** The person types the address (every source but `prefilled
|
|
153
|
+
/** The person types the address (every source but `prefilled`, and not over a partner's address). */
|
|
148
154
|
needsEmail: boolean;
|
|
155
|
+
/** UX refresh 2026-11-05: the partner supplied the address (the server's `emailOtp.prefilled`). */
|
|
156
|
+
prefilled?: true;
|
|
149
157
|
/** Masked address of the last send (e.g. `a•••@e•••.com`). */
|
|
150
158
|
sentToMasked?: string;
|
|
151
159
|
codeExpiresAt?: string;
|
|
@@ -167,6 +175,11 @@ interface ChoiceOptionSnapshot {
|
|
|
167
175
|
service: string;
|
|
168
176
|
/** `national_eid`: the provider ("Verify with Houwiyeti"); absent = the generic eID copy. */
|
|
169
177
|
nationalEid?: NationalEidOption;
|
|
178
|
+
/**
|
|
179
|
+
* `phone_otp` (flow UX refresh 2026-11-05): the channels in display order, so a contact choice offers WhatsApp / SMS
|
|
180
|
+
* directly next to Email (choose the option, then send with that channel). Absent on an older API.
|
|
181
|
+
*/
|
|
182
|
+
channels?: OtpChannel[];
|
|
170
183
|
}
|
|
171
184
|
/** `plan.choice` as a choice screen shows it. */
|
|
172
185
|
interface PlanChoiceSnapshot {
|
|
@@ -327,6 +340,23 @@ interface DocumentSnapshot extends StepAttempts {
|
|
|
327
340
|
* (`doc.ageStepUp`). Absent otherwise.
|
|
328
341
|
*/
|
|
329
342
|
ageStepUp?: true;
|
|
343
|
+
/** 2026-11-05: where the document photo comes from (the view's `documents`; camera only when absent). */
|
|
344
|
+
photo: PhotoSourceState;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Where the photo of the ID document step or the portrait step comes from (2026-11-05), from the hosted view:
|
|
348
|
+
* - `source` `camera`: the camera screen only (no upload, even when the camera cannot open);
|
|
349
|
+
* - `source` `upload`: the upload screen at once (no camera screen);
|
|
350
|
+
* - `source` `choice`: ask "Take a photo" or "Upload a photo", unless `pick` holds the person's earlier pick for this
|
|
351
|
+
* step (a retry, the back side): then go straight to that source.
|
|
352
|
+
*/
|
|
353
|
+
interface PhotoSourceState {
|
|
354
|
+
/** The step's setting. */
|
|
355
|
+
source: PhotoSource;
|
|
356
|
+
/** The person's pick under `choice` (recorded by the server from their first photo of the step); `null` before one. */
|
|
357
|
+
pick: PhotoSourcePick | null;
|
|
358
|
+
/** An upload is accepted now (`uploadDocument` / `uploadPortrait`). */
|
|
359
|
+
uploadOffered: boolean;
|
|
330
360
|
}
|
|
331
361
|
interface LivenessSnapshot extends StepAttempts {
|
|
332
362
|
/**
|
|
@@ -366,7 +396,11 @@ interface LivePhotoPlan {
|
|
|
366
396
|
/**
|
|
367
397
|
* The ICAO portrait step of an ID-document session (SDK spec §4.9, §5.4):
|
|
368
398
|
* - `capture` — `portrait_icao` is the frontier: run the strict gate, take the
|
|
369
|
-
* portrait (a retry carries the server's `report` to coach from)
|
|
399
|
+
* portrait (a retry carries the server's `report` to coach from), or upload
|
|
400
|
+
* a photo when `photo.uploadOffered` (design 2026-11-04 §6.2);
|
|
401
|
+
* - `review` — the server adjusted the photo and waits for the person to accept
|
|
402
|
+
* it (`pendingFix`, design 2026-11-04 §6.4 step 4): show both photos and call
|
|
403
|
+
* `confirmFix(true | false)`;
|
|
370
404
|
* - `match` — the portrait was accepted (`passed`, or `review` after the
|
|
371
405
|
* attempt cap: `review: true`, "We'll review your photo") and `face_match`
|
|
372
406
|
* is due: the SDK submits it with the portrait as the probe — no new capture.
|
|
@@ -381,7 +415,7 @@ interface PortraitSnapshot extends StepAttempts {
|
|
|
381
415
|
kind: "portrait";
|
|
382
416
|
key: string;
|
|
383
417
|
context: StepContext;
|
|
384
|
-
phase: "capture" | "match";
|
|
418
|
+
phase: "capture" | "review" | "match";
|
|
385
419
|
/** The server's per-criterion report of the last attempt (`null` before one). */
|
|
386
420
|
report: IcaoReportEntry[] | null;
|
|
387
421
|
/** The portrait goes to a reviewer (attempt cap reached in decision mode `review`). */
|
|
@@ -396,6 +430,24 @@ interface PortraitSnapshot extends StepAttempts {
|
|
|
396
430
|
* only the ICAO portrait needs another still — a portrait-only retake, no new clip.
|
|
397
431
|
*/
|
|
398
432
|
retakeOnly: boolean;
|
|
433
|
+
/**
|
|
434
|
+
* 2026-11-05: where the photo comes from (the view's `portrait.source`; `camera` on older servers). `uploadOffered`
|
|
435
|
+
* is `false` outside the `capture` phase.
|
|
436
|
+
*/
|
|
437
|
+
photo: PhotoSourceState;
|
|
438
|
+
/** `review` phase: the original and the adjusted photo, and what was changed. `null` otherwise. */
|
|
439
|
+
pendingFix: HostedPortraitPendingFix | null;
|
|
440
|
+
/**
|
|
441
|
+
* Design 2026-11-04 §4, §6.3 (`portrait.captureMode`): who takes the photo on the step's own camera screen (`self`,
|
|
442
|
+
* `assisted`, or `choice`: ask who takes the photo unless the person already picked for the session). Absent when
|
|
443
|
+
* the still rides the liveness capture (one capture) or on an older server.
|
|
444
|
+
*/
|
|
445
|
+
captureMode?: CaptureMode;
|
|
446
|
+
/**
|
|
447
|
+
* Design 2026-11-04 §6.6: a returning person's earlier photo is being bound to today's liveness (the SDK submits it
|
|
448
|
+
* by itself: nothing for the person to do). Absent on older servers.
|
|
449
|
+
*/
|
|
450
|
+
reuse?: boolean;
|
|
399
451
|
}
|
|
400
452
|
interface MobileRequiredSnapshot {
|
|
401
453
|
/**
|
|
@@ -459,8 +511,8 @@ interface ResultSnapshot {
|
|
|
459
511
|
type StepSnapshot = PhoneOtpSnapshot | EmailOtpSnapshot | ContactChoiceSnapshot | IdentitySummarySnapshot | MethodSnapshot | ChoiceSnapshot | EidSnapshot | RegistrySnapshot | DocumentSnapshot | LivenessSnapshot | PortraitSnapshot | MobileRequiredSnapshot | ProcessingSnapshot | UnsupportedSnapshot | ResultSnapshot;
|
|
460
512
|
/**
|
|
461
513
|
* ID mode: `face_match` is due right after an ACCEPTED portrait (passed, or
|
|
462
|
-
* review after the cap) that it has not been tried with yet — the
|
|
463
|
-
* the probe
|
|
514
|
+
* review after the cap) that it has not been tried with yet — the server picks
|
|
515
|
+
* the probe, so no selfie is taken. A face_match that
|
|
464
516
|
* already carries a reason was tried: the regular selfie path applies.
|
|
465
517
|
*/
|
|
466
518
|
declare function portraitMatchStep(view: HostedSessionView, frontier: PlanStepView): PlanStepView | null;
|
|
@@ -1012,22 +1064,13 @@ interface VerificationResult {
|
|
|
1012
1064
|
level?: VerificationLevel;
|
|
1013
1065
|
/** How the level was proved, when the API reports it. */
|
|
1014
1066
|
assurance?: VerificationAssurance;
|
|
1015
|
-
/**
|
|
1016
|
-
* The person the session is linked to, `per_` form (`per_<24 hex>`, as the
|
|
1017
|
-
* API's `personId` and the `/people` routes name it), once that person has
|
|
1018
|
-
* passed a verification (absent before that).
|
|
1019
|
-
*/
|
|
1020
|
-
personId?: string;
|
|
1021
|
-
/**
|
|
1022
|
-
* The same person as {@link VerificationResult.personId}, bare (24
|
|
1023
|
-
* hexadecimal characters, no prefix), as the result token's `sub` names it.
|
|
1024
|
-
*/
|
|
1025
|
-
subjectId?: string;
|
|
1026
1067
|
}
|
|
1027
1068
|
/**
|
|
1028
1069
|
* `on('busy')` payload: the model service answered
|
|
1029
1070
|
* `503 inference_unavailable` and the SDK waits `retryAfterSeconds` before
|
|
1030
|
-
* retry number `attempt` (1-based, at most 3).
|
|
1071
|
+
* retry number `attempt` (1-based, at most 3). The wait is the service's
|
|
1072
|
+
* `Retry-After` (10 s without one) capped at 20 s and spread by ±25 %, so it
|
|
1073
|
+
* may have a fraction. Show "busy, trying again" copy.
|
|
1031
1074
|
*/
|
|
1032
1075
|
interface VerificationBusy {
|
|
1033
1076
|
attempt: number;
|
|
@@ -1329,6 +1372,16 @@ interface DocumentStepHandle extends DocumentSnapshot {
|
|
|
1329
1372
|
/** Web live MRZ (on-device MRZ read on MRZ faces; obeys the session's server tuning). */
|
|
1330
1373
|
liveMrz?: DocumentLiveMrzOptions;
|
|
1331
1374
|
}): DocumentCaptureHandle;
|
|
1375
|
+
/**
|
|
1376
|
+
* Design 2026-11-04 §5.2: submit a photo of the document picked from the device, for the face the step asks for
|
|
1377
|
+
* (`captureSide`, else `side`). Only while `photo.uploadOffered`, else rejects with `RangeError("upload_not_offered")`.
|
|
1378
|
+
* JPEG and PNG are sent as JPEG; HEIC is converted to JPEG on the device where the browser can decode it. A file
|
|
1379
|
+
* that is not an image of these types, or cannot be decoded, rejects with `TypeError("unsupported_file")` (nothing
|
|
1380
|
+
* is sent). The SDK scales the photo down (long side at most 2560 px), uploads it without a capture proof and submits
|
|
1381
|
+
* `doc_ocr` with `source: "upload"`; the step then moves on as after a camera photo (the next face, a retry with its
|
|
1382
|
+
* `reason`, or the next step). Other failures reject with the typed `HostedApiError`.
|
|
1383
|
+
*/
|
|
1384
|
+
uploadDocument(file: Blob): Promise<void>;
|
|
1332
1385
|
}
|
|
1333
1386
|
/** The liveness / selfie step. */
|
|
1334
1387
|
interface LivenessStepHandle extends LivenessSnapshot {
|
|
@@ -1376,6 +1429,22 @@ interface PortraitStepHandle extends PortraitSnapshot {
|
|
|
1376
1429
|
keepScreenAwake?: boolean;
|
|
1377
1430
|
assetBaseUrl?: string;
|
|
1378
1431
|
}): PortraitCaptureHandle;
|
|
1432
|
+
/**
|
|
1433
|
+
* Design 2026-11-04 §6.2: submit a photo picked from the device as the portrait, `capture` phase only and only while
|
|
1434
|
+
* `photo.uploadOffered`, else rejects with `RangeError("upload_not_offered")`. JPEG and PNG are sent as picked (a large one
|
|
1435
|
+
* is scaled down and sent as JPEG); HEIC is converted to JPEG on the device where the browser can decode it. A file
|
|
1436
|
+
* that is not an image of these types, or cannot be decoded, rejects with `TypeError("unsupported_file")` (nothing is
|
|
1437
|
+
* sent). The SDK uploads it without a capture proof and submits `portrait_icao` with `source: "upload"`; the step then
|
|
1438
|
+
* moves on as after a camera photo (the `review` phase, a retry with its `reason`, or the next step). Other failures
|
|
1439
|
+
* reject with the typed `HostedApiError`.
|
|
1440
|
+
*/
|
|
1441
|
+
uploadPortrait(file: Blob): Promise<void>;
|
|
1442
|
+
/**
|
|
1443
|
+
* Design 2026-11-04 §6.4 step 4, `review` phase only (else rejects with `RangeError("no_pending_fix")`): `true` uses
|
|
1444
|
+
* the adjusted photo, `false` declines it (the attempt ends, `portrait_declined_fix`, not billed) and the step returns
|
|
1445
|
+
* to the `capture` phase for another photo. Submits `portrait_icao` with `{ fixReview: { accept } }`.
|
|
1446
|
+
*/
|
|
1447
|
+
confirmFix(accept: boolean): Promise<void>;
|
|
1379
1448
|
}
|
|
1380
1449
|
/** The biometric step needs a phone (desktop browser). */
|
|
1381
1450
|
interface MobileRequiredStepHandle extends MobileRequiredSnapshot {
|
|
@@ -1510,6 +1579,21 @@ declare function releaseLivenessAssets(assetBaseUrl?: string): void;
|
|
|
1510
1579
|
*/
|
|
1511
1580
|
declare function preloadedDetectorFactory(assetBaseUrl?: string): (() => Promise<Detector>) | undefined;
|
|
1512
1581
|
|
|
1582
|
+
/** Seams for tests (jsdom has neither `createImageBitmap` nor a canvas encoder). */
|
|
1583
|
+
interface UploadFileInternals {
|
|
1584
|
+
decode?(blob: Blob): Promise<{
|
|
1585
|
+
width: number;
|
|
1586
|
+
height: number;
|
|
1587
|
+
draw(ctx: CanvasRenderingContext2D, w: number, h: number): void;
|
|
1588
|
+
close(): void;
|
|
1589
|
+
}>;
|
|
1590
|
+
encode?(source: {
|
|
1591
|
+
width: number;
|
|
1592
|
+
height: number;
|
|
1593
|
+
draw(ctx: CanvasRenderingContext2D, w: number, h: number): void;
|
|
1594
|
+
}, quality: number): Promise<Blob | null>;
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1513
1597
|
/**
|
|
1514
1598
|
* Physical geometry the scanner frames (ISO/IEC 7810 / ICAO 9303). `"card"` is
|
|
1515
1599
|
* any identity card or residence permit of ANY issuer: ID-1 (TD1) or ID-2 (TD2)
|
|
@@ -2973,7 +3057,8 @@ declare const TRANSPORT_REPLAY_DELAY_MS = 1000;
|
|
|
2973
3057
|
/**
|
|
2974
3058
|
* `503 inference_unavailable` (profile v2 step 4 — request-level: no state
|
|
2975
3059
|
* change, no attempt used, not billed): retries after `retryAfterSeconds`
|
|
2976
|
-
* (default {@link INFERENCE_RETRY_DEFAULT_S}, capped at
|
|
3060
|
+
* (default {@link INFERENCE_RETRY_DEFAULT_S}, capped at 20 s, ±25 % jitter,
|
|
3061
|
+
* at least 0.5 s: `jitteredRetryWaitMs`), at most
|
|
2977
3062
|
* {@link INFERENCE_RETRY_ATTEMPTS} times, each under a FRESH key (each retry
|
|
2978
3063
|
* is its own logical attempt; the backend never caches a 5xx envelope).
|
|
2979
3064
|
*/
|
|
@@ -2995,6 +3080,8 @@ interface SubmitRuntime {
|
|
|
2995
3080
|
uuid(): string;
|
|
2996
3081
|
/** An `inference_unavailable` retry is about to wait (the `busy` event). */
|
|
2997
3082
|
onBusy?(info: VerificationBusy): void;
|
|
3083
|
+
/** The retry jitter source, a value in [0, 1) (tests pin it). Defaults to `Math.random`. */
|
|
3084
|
+
random?(): number;
|
|
2998
3085
|
}
|
|
2999
3086
|
/**
|
|
3000
3087
|
* Run one logical submission (ported use-submit semantics):
|
|
@@ -3161,6 +3248,8 @@ interface VerificationInternals {
|
|
|
3161
3248
|
capture?: LivenessCaptureInternals;
|
|
3162
3249
|
sleep?: (ms: number) => Promise<void>;
|
|
3163
3250
|
uuid?: () => string;
|
|
3251
|
+
/** The `inference_unavailable` retry jitter source, a value in [0, 1); default `Math.random`. */
|
|
3252
|
+
random?: () => number;
|
|
3164
3253
|
/** Wall clock for the plan runner (OTP resend time); default `Date.now`. */
|
|
3165
3254
|
now?: () => number;
|
|
3166
3255
|
/** DocumentCapture seams for the runner's document step (engine, encode, classify, blur gate). */
|
|
@@ -3169,6 +3258,8 @@ interface VerificationInternals {
|
|
|
3169
3258
|
portrait?: PortraitCaptureInternals;
|
|
3170
3259
|
/** Live-photo kit seams for the runner's one-capture Step 3 (landmarker, frames, encode). */
|
|
3171
3260
|
livePhoto?: LivePhotoKitInternals;
|
|
3261
|
+
/** Document upload seams for the runner's document step (image decode / encode). */
|
|
3262
|
+
upload?: UploadFileInternals;
|
|
3172
3263
|
}
|
|
3173
3264
|
/** `crypto.randomUUID()` with a v4 fallback for hosts that lack it. */
|
|
3174
3265
|
declare function randomUuid(): string;
|
|
@@ -3180,4 +3271,4 @@ declare function createVerification(options: VerificationOptions): Verification;
|
|
|
3180
3271
|
/** {@link createVerification} with construction seams (tests / Sekyro AI-internal hosts). */
|
|
3181
3272
|
declare function createVerificationInternal(options: VerificationOptions, internals: VerificationInternals): Verification;
|
|
3182
3273
|
|
|
3183
|
-
export { type LivePhotoPlan as $, type AcceptedDocumentsLike as A, type DocumentGuideMeasure as B, type CameraFacing as C, type DocumentCaptureOptions as D, type DocumentLiveMrzOptions as E, type DocumentMrzUpdate as F, type DocumentPoint as G, type DocumentQuad as H, type DocumentReticle as I, type DocumentScanPhase as J, type DocumentScanUpdate as K, type DocumentSide as L, type DocumentSnapshot as M, type DocumentStepHandle as N, type EidSnapshot as O, type PortraitCaptureOptions as P, type EidStepHandle as Q, type EmailOtpSnapshot as R, type EmailOtpStepHandle as S, type EmailSource as T, type GateHint as U, type GateUpdate as V, ISSUER_CODES as W, type IdentitySummarySnapshot as X, type IdentitySummaryStepHandle as Y, type InLaneSwitch as Z, type LivePhotoGateUpdate as _, type DocumentCaptureHandle as a,
|
|
3274
|
+
export { type LivePhotoPlan as $, type AcceptedDocumentsLike as A, type DocumentGuideMeasure as B, type CameraFacing as C, type DocumentCaptureOptions as D, type DocumentLiveMrzOptions as E, type DocumentMrzUpdate as F, type DocumentPoint as G, type DocumentQuad as H, type DocumentReticle as I, type DocumentScanPhase as J, type DocumentScanUpdate as K, type DocumentSide as L, type DocumentSnapshot as M, type DocumentStepHandle as N, type EidSnapshot as O, type PortraitCaptureOptions as P, type EidStepHandle as Q, type EmailOtpSnapshot as R, type EmailOtpStepHandle as S, type EmailSource as T, type GateHint as U, type GateUpdate as V, ISSUER_CODES as W, type IdentitySummarySnapshot as X, type IdentitySummaryStepHandle as Y, type InLaneSwitch as Z, type LivePhotoGateUpdate as _, type DocumentCaptureHandle as a, sectionOf as a$, type LivenessAssetsStatus as a0, type LivenessCaptureEvents as a1, type LivenessCaptureHandle as a2, type LivenessCaptureOptions as a3, type LivenessSnapshot as a4, type LivenessStartOptions as a5, type LivenessStepHandle as a6, type MethodSnapshot as a7, type MethodStepHandle as a8, type MobileRequiredSnapshot as a9, type StepContext as aA, type StepSnapshot as aB, type UnsupportedReason as aC, type UnsupportedSnapshot as aD, type UnsupportedStepHandle as aE, type Verification as aF, type VerificationBusy as aG, type VerificationEvents as aH, type VerificationLocale as aI, type VerificationOptions as aJ, type VerificationResult as aK, type VerificationStatus as aL, type VerificationStep as aM, WEB_IDENTITY_METHODS as aN, acceptedIssuers as aO, acceptedTypesFor as aP, cameraUnavailableCauseOf as aQ, createLivenessCapture as aR, createVerification as aS, deriveStep as aT, flagOf as aU, getLivenessAssetsStatus as aV, laneOf as aW, otherOptions as aX, preloadLivenessAssets as aY, releaseLivenessAssets as aZ, resolveAcceptedDocuments as a_, type MobileRequiredStepHandle as aa, type OtpChannel as ab, type OtpNumberSource as ac, PLATFORM_UNSUPPORTED as ad, type PhoneOtpSnapshot as ae, type PhoneOtpStepHandle as af, type PhotoSourceState as ag, type PlanChoiceSnapshot as ah, type PortraitCaptureEvents as ai, type PortraitCaptureState as aj, type PortraitGateUpdate as ak, type PortraitSnapshot as al, type PortraitStartOptions as am, type PortraitStepHandle as an, type PreloadLivenessAssetsOptions as ao, type ProcessingSnapshot as ap, type ProcessingStepHandle as aq, type ReasonCode as ar, type RegistrySnapshot as as, type RegistrySource as at, type RegistryStepHandle as au, type ResultDisplay as av, type ResultSnapshot as aw, type ResultStepHandle as ax, type SdkFailureReason as ay, type StepAttempts as az, type PortraitCaptureHandle as b, type EncodedDocument as b$, subscribeLivenessAssets as b0, type DocCatalogEntry as b1, type LiveMrzTuning as b2, type TextLockTuning as b3, type OcrEngineClient as b4, type DocAssistReport as b5, type ReadyInfo as b6, type LoadFailure as b7, type OcrEngineOptions as b8, type SubmitRuntime as b9, DocAssist as bA, type DocAssistEngine as bB, type DocAssistTick as bC, type DocCameraTuning as bD, type DocCaptureReport as bE, type DocCaptureVia as bF, type DocChecksPayload as bG, type DocEngineLike as bH, DocFeedbackAggregator as bI, type DocFeedbackKey as bJ, type DocFeedbackState as bK, type DocFormat as bL, type DocFrameAnalysis as bM, type DocFrameMeasures as bN, type DocGateQuality as bO, type DocGateThresholds as bP, type DocGateTick as bQ, type DocGateTickInput as bR, DocGateV1 as bS, type DocQuad as bT, type DocQuadPoint as bU, type DocShutterReason as bV, type DocShutterTuning as bW, type DocSide as bX, type DocumentCaptureController as bY, type DocumentCaptureInternals as bZ, EMPTY_GUIDE_METRICS as b_, type HostedClientLike as ba, ANALYSIS_LONG_EDGE as bb, ASPECT_BANDS as bc, AttestationError as bd, BLUR_REFUSE_SHARPNESS_MAX as be, type BlurStatus as bf, CAPTURE_CANDIDATE_SPACING_MS as bg, CAPTURE_EXTRA_CANDIDATES as bh, CLIP_MIME_ALLOWLIST as bi, type CaptureEngine as bj, CaptureSessionDoc as bk, type CaptureSessionDocEvents as bl, type CaptureSessionDocOptions as bm, DOC_ANALYSIS_DEFAULTS as bn, DOC_BLACK_FRAME_LUMA as bo, DOC_BLACK_FRAME_TICKS as bp, DOC_CADENCE_HZ as bq, DOC_CAMERA_TUNING_DEFAULTS as br, DOC_CATALOG as bs, DOC_DETECT_WIDTH as bt, DOC_FEEDBACK_STATES as bu, DOC_FIRST_FRAME_MS as bv, DOC_GATE_V1_DEFAULTS as bw, DOC_SHUTTER_DEFAULTS as bx, type DeviceReadHint as by, type DocArtifacts as bz, type CaptureChannel as c, type VerificationInternals as c$, FLIP_FILL_MIN as c0, FLIP_GAP_MS as c1, FLIP_TIMEOUT_MS as c2, type FocusCaps as c3, type FramingStatus as c4, GUIDE_LOCK_DEFAULTS as c5, type GlareStatus as c6, type GrabbedFrame as c7, type GuideBlocker as c8, GuideLock as c9, type LivenessFlowDeps as cA, type LivenessFlowOutcome as cB, MANUAL_SHUTTER_MS as cC, MR_DOC_CATALOG as cD, NO_REPORT_MS as cE, type OpenDocCameraDeps as cF, PORTRAIT_JPEG_QUALITY as cG, PRELOAD_BLAZE_INIT_TIMEOUT_MS as cH, PRELOAD_BUDGET_MS as cI, PROCESSING_POLL_DELAY_MS as cJ, PROCESSING_POLL_MAX as cK, type PortraitCaptureController as cL, type PortraitCaptureInternals as cM, REGISTRY_RETRY_DELAY_MS as cN, type ReticleType as cO, SAME_FACE_MAX_DROPS as cP, type ScanEvent as cQ, type ScanLayout as cR, type ScanNotice as cS, type ScanPhase as cT, type ScanReport as cU, type ScanSide as cV, type ScanState as cW, type SubmitExecutor as cX, TEXT_LOCK_DEFAULTS as cY, TRANSPORT_REPLAY_ATTEMPTS as cZ, TRANSPORT_REPLAY_DELAY_MS as c_, type GuideLockTick as ca, type GuideLockTuning as cb, type GuideMetrics as cc, type GuideRect as cd, INFERENCE_RETRY_ATTEMPTS as ce, INFERENCE_RETRY_DEFAULT_S as cf, LANDMARKER_MODEL as cg, LENS_STORAGE_KEY as ch, LENS_TRY_MAX as ci, LIVE_MRZ_DEFAULTS as cj, LIVE_PHOTO_IDLE_MS as ck, LIVE_PHOTO_MAX_HZ as cl, type LandmarkedFace as cm, type LandmarkerLike as cn, type LensKind as co, type LensSource as cp, type LightingStatus as cq, type LiveMrzCapture as cr, type LiveMrzState as cs, type LivePhotoGate as ct, type LivePhotoKit as cu, type LivePhotoKitInternals as cv, type LivePhotoKitOptions as cw, type LivePhotoStill as cx, type LivenessCaptureInternalHandle as cy, type LivenessCaptureInternals as cz, type CaptureEngineId as d, analyzeDocFrame as d0, analyzeGuide as d1, aspectBand as d2, aspectFits as d3, buildDeviceReadHint as d4, coverPointToVideo as d5, createDocumentCaptureInternal as d6, createFaceLandmarker as d7, createLivePhotoKit as d8, createLivenessCaptureInternal as d9, rankBackCameras as dA, readStoredLens as dB, resetLivenessAssetsForTests as dC, resolveDocCameraTuning as dD, resolveDocShutterTuning as dE, resolveGuideLockTuning as dF, runLivenessFlow as dG, runSubmission as dH, scannerFormatFor as dI, setPreloadLoaderForTests as dJ, settledHint as dK, singleShotFocusAt as dL, specularFraction as dM, supportsFocusMode as dN, warmDocDetector as dO, writeStoredLens as dP, createPortraitCaptureInternal as da, createVerificationInternal as db, docZoomFor as dc, encodeDocumentImage as dd, facesOf as de, feedbackVoteOf as df, focusOk as dg, guideQuad as dh, guideRegionInFrame as di, initialScanState as dj, lensKindOf as dk, mapEngineState as dl, mapErrorKind as dm, mapGuidanceHint as dn, nextScanState as dp, observe as dq, openDocCamera as dr, passportBandOf as ds, portraitMatchStep as dt, preloadedDetectorFactory as du, quadAreaFrac as dv, quadBounds as dw, quadIou as dx, quadTiltRatio as dy, randomUuid as dz, type CaptureError as e, type CaptureErrorDetail as f, type CaptureErrorKind as g, type CaptureErrorPhase as h, type CaptureState as i, type CapturedArtifacts as j, type CapturedDocument as k, type CapturedPortrait as l, type ChoiceOptionSnapshot as m, type ChoiceSnapshot as n, type ChoiceStepHandle as o, type ContactChoiceSnapshot as p, type ContactChoiceStepHandle as q, DEFAULT_API_ORIGIN as r, DOCUMENT_TYPE_ORDER as s, type DeriveStepEnv as t, type DocumentCaptureEvents as u, type DocumentCaptureState as v, type DocumentFeedback as w, type DocumentFeedbackKey as x, type DocumentGateUpdate as y, type DocumentGuide as z };
|