@sekyro/web 0.1.0-rc.20 → 0.1.0-rc.22
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 +58 -0
- package/README.md +12 -11
- package/dist/camera-trait-V4UAOPIQ.js +1 -0
- package/dist/{capture-constraints-B5omafmk.d.cts → capture-constraints-CVqpMNGA.d.cts} +7 -3
- package/dist/{capture-constraints-B5omafmk.d.ts → capture-constraints-CVqpMNGA.d.ts} +7 -3
- package/dist/{capture-session-doc-QA4DOFRF.js → capture-session-doc-YDUKUN3P.js} +1 -1
- package/dist/{capture-session-v3-CNL-GX11.d.cts → capture-session-v3-CkcuPKSD.d.ts} +90 -13
- package/dist/{capture-session-v3-DaBqN8fO.d.ts → capture-session-v3-TJL-0Muv.d.cts} +90 -13
- package/dist/chunk-2KTSNAVR.js +1 -0
- package/dist/chunk-2LDOXGY3.js +1 -0
- package/dist/chunk-32ELI5BZ.js +1 -0
- package/dist/chunk-33KKMPJ5.js +1 -0
- package/dist/chunk-53POX7U4.js +1 -0
- package/dist/chunk-7QZWBDI5.js +1 -0
- package/dist/chunk-7XT5YDSC.js +1 -0
- package/dist/chunk-BATJN3VQ.js +1 -0
- package/dist/chunk-CPUECYAJ.js +1 -0
- package/dist/chunk-FSSMUAKC.js +1 -0
- package/dist/{chunk-IG466TOP.js → chunk-HYGINGDC.js} +1 -1
- package/dist/chunk-LJYMZQY2.js +1 -0
- package/dist/chunk-PZYVSLPG.js +1 -0
- package/dist/chunk-RALQBQPT.js +1 -0
- package/dist/chunk-SX7TUC3V.js +1 -0
- package/dist/chunk-TJUM65FN.js +1 -0
- package/dist/chunk-TSA6GHUG.js +1 -0
- package/dist/chunk-VWGKUQ3C.js +1 -0
- package/dist/chunk-Z2BIZYZQ.js +1 -0
- package/dist/chunk-Z5D7SZUW.js +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +1 -1
- package/dist/clip-inspect-DLJXVKV6.js +1 -0
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +1 -1
- package/dist/core/v3/detect-worker.cjs +1 -1
- package/dist/core/v3/detect-worker.d.cts +1 -1
- package/dist/core/v3/detect-worker.d.ts +1 -1
- package/dist/core/v3/detect-worker.js +1 -1
- package/dist/create-document-capture-K6EHRCWN.js +1 -0
- package/dist/create-portrait-capture-5VGYZUOK.js +1 -0
- package/dist/{create-verification-COpe2hxf.d.ts → create-verification-DnyHCSu6.d.cts} +216 -82
- package/dist/{create-verification-BBOUYpga.d.cts → create-verification-DoISHOqL.d.ts} +216 -82
- package/dist/{detect-worker-DclNxkZT.d.cts → detect-worker-CHqsPJoM.d.cts} +19 -2
- package/dist/{detect-worker-DclNxkZT.d.ts → detect-worker-CHqsPJoM.d.ts} +19 -2
- package/dist/{icao-gate-CEGvJR3q.d.ts → icao-gate-BFlSZYCZ.d.cts} +36 -4
- package/dist/icao-gate-T3BTOKFJ.js +1 -0
- package/dist/{icao-gate-l40OU6x1.d.cts → icao-gate-lZ_fHE7k.d.ts} +36 -4
- package/dist/{icao-policy-BgI1Y870.d.ts → icao-policy-BOcutYdD.d.ts} +3 -3
- package/dist/{icao-policy-C7fIdRzo.d.cts → icao-policy-JZH0UdmD.d.cts} +3 -3
- package/dist/icao-tuning-4ETMF53W.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +11 -15
- package/dist/index.d.ts +11 -15
- package/dist/index.js +1 -1
- package/dist/internal/index.cjs +1 -1
- package/dist/internal/index.d.cts +53 -34
- package/dist/internal/index.d.ts +53 -34
- package/dist/internal/index.js +1 -1
- package/dist/plan-runner-3ZMV7SFQ.js +1 -0
- package/dist/popup/index.cjs +1 -1
- package/dist/popup/index.d.cts +3 -3
- package/dist/popup/index.d.ts +3 -3
- package/dist/popup/index.js +1 -1
- package/dist/{print-AYSCRSZB.js → print-SEWS3VHQ.js} +1 -1
- package/dist/{turnstile-FATNZ4AG.js → turnstile-2J3LUHCG.js} +1 -1
- package/dist/{types-Dpfg2cO8.d.cts → types-DwfyBTte.d.cts} +167 -79
- package/dist/{types-Dpfg2cO8.d.ts → types-DwfyBTte.d.ts} +167 -79
- package/package.json +1 -1
- package/sbom.cdx.json +10 -10
- package/dist/camera-trait-45MJTW4K.js +0 -1
- package/dist/chunk-5ZKQHFFW.js +0 -1
- package/dist/chunk-7ZCZY3ZP.js +0 -1
- package/dist/chunk-BPE5NSQ2.js +0 -1
- package/dist/chunk-CQ7SKLMC.js +0 -1
- package/dist/chunk-FGOVIGGL.js +0 -1
- package/dist/chunk-FUHDOEBP.js +0 -1
- package/dist/chunk-GT2ZLGF7.js +0 -1
- package/dist/chunk-KHR4U2SZ.js +0 -1
- package/dist/chunk-KZBBB5B2.js +0 -1
- package/dist/chunk-NJML6FMD.js +0 -1
- package/dist/chunk-O5WKNZ2C.js +0 -1
- package/dist/chunk-OKWG3PVH.js +0 -1
- package/dist/chunk-TQB3URP2.js +0 -1
- package/dist/chunk-U6S7SCBY.js +0 -1
- package/dist/chunk-U6TYL2IJ.js +0 -1
- package/dist/chunk-W2WD7PR2.js +0 -1
- package/dist/chunk-XCKE2MJL.js +0 -1
- package/dist/chunk-ZLWH4RBO.js +0 -1
- package/dist/create-document-capture-GJXBQMTC.js +0 -1
- package/dist/create-portrait-capture-MOS2D7CL.js +0 -1
- package/dist/icao-gate-PWBMKRGC.js +0 -1
- package/dist/icao-tuning-4GGVX6B4.js +0 -1
- package/dist/plan-runner-35655N4Z.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as Detector } from './detect-worker-
|
|
2
|
-
import { A as AcceptedDocumentType,
|
|
3
|
-
import { i as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1,
|
|
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-
|
|
1
|
+
import { b as Detector } from './detect-worker-CHqsPJoM.js';
|
|
2
|
+
import { A as AcceptedDocumentType, a7 as NationalEidOption, aG as StepSection, aP as HostedBranding, al as PlanSectionView, ai as PlanChoiceKind, T as HostedSimulationView, l as ContactChannel, f as CheckReason, aT as RetakeHint, af as PhotoSource, ag as PhotoSourcePick, _ as IdentityMethod, E as EidAfterPass, $ as IdentitySummarySource, J as HostedIcaoPolicy, ab as PhoneCountryRule, Y as IcaoReportEntry, aS as IcaoCaptureTuning, Q as HostedPortraitPendingFix, b as CaptureMode, aA as SessionReason, ay as SessionDecidingStep, S as HostedSessionView, U as HostedStepView, am as PlanStepView, ax as ResolvedCaptureMode, aX as ScreenRampReport, aO as CaptureProvenance, aV as ScreenRampPaint, az as SessionFailureReason, aL as AgeEstimationReason, aJ as VerificationLevel, aI as VerificationAssurance, a6 as MethodChoiceView, aM as CameraUnavailableCause, aN as CaptureIssueReport, W as HostedVoiceView, aU as ScreenRampChallenge, b0 as PersonMask, a as AttestationInput, h as CheckType, ar as PortraitIcaoInput } from './types-DwfyBTte.js';
|
|
3
|
+
import { i as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1, q as DeviceClass, b as CaptureArtifacts, ad as EngineErrorDetail, W as V3GateQuality, _ as V3TelemetryEvent } from './capture-session-v3-CkcuPKSD.js';
|
|
4
|
+
import { f as IcaoGateSummary, g as IcaoGateUpdate, P as Point, p as IcaoGateScores, h as Box, m as IcaoFrameObservation, H as HostedClient, n as IcaoGate } from './icao-gate-lZ_fHE7k.js';
|
|
5
5
|
|
|
6
6
|
declare const ISSUER_CODES: readonly string[];
|
|
7
7
|
|
|
@@ -25,7 +25,7 @@ declare const resolveAcceptedDocuments: (view: {
|
|
|
25
25
|
declare const flagOf: (iso2: string) => string;
|
|
26
26
|
|
|
27
27
|
declare const WEB_IDENTITY_METHODS: readonly IdentityMethod[];
|
|
28
|
-
/** Plan 4's web stop for `nfc.mode = mandatory` (view-only `
|
|
28
|
+
/** Plan 4's web stop for `nfc.mode = mandatory` (view-only `reasonCode`) and the skip reason in `preferred`. */
|
|
29
29
|
declare const PLATFORM_UNSUPPORTED = "platform_unsupported";
|
|
30
30
|
/** A step's section: the view's value (kept even when unknown), else the check type's. */
|
|
31
31
|
declare function sectionOf(step: Pick<HostedStepView, "checkType" | "section">): StepSection | null;
|
|
@@ -48,7 +48,10 @@ declare function laneOf(view: HostedSessionView): InLaneSwitch | null;
|
|
|
48
48
|
declare function otherOptions(lane: InLaneSwitch | null | undefined): ChoiceOptionSnapshot[];
|
|
49
49
|
type DocumentSide = "recto" | "verso" | "single";
|
|
50
50
|
interface DeriveStepEnv {
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* A phone / tablet browser. `false` (a desktop) routes a `requiresMobile` camera step to `mobile_required`, and a
|
|
53
|
+
* `choice` photo step to its upload with the camera on a phone (`photo.cameraOnPhone`). Absent: neither.
|
|
54
|
+
*/
|
|
52
55
|
isMobile?: boolean;
|
|
53
56
|
}
|
|
54
57
|
interface StepContext {
|
|
@@ -75,12 +78,18 @@ interface StepContext {
|
|
|
75
78
|
* Absent otherwise: then only a `human` session offers "continue without a camera".
|
|
76
79
|
*/
|
|
77
80
|
cameraUnavailableHandled?: true;
|
|
81
|
+
/**
|
|
82
|
+
* Sandbox DX spec 2026-11-06 §8: a simulated session (`view.simulation`). Say that nothing is sent, show `otpCode` on
|
|
83
|
+
* the code screens, and with `skipCapture` offer the step's `skipCapture()`. Absent on every other session.
|
|
84
|
+
*/
|
|
85
|
+
simulation?: HostedSimulationView;
|
|
78
86
|
}
|
|
79
87
|
interface StepAttempts {
|
|
80
88
|
reason?: CheckReason;
|
|
81
89
|
/** Liveness v7 §5.2: what to change for the next capture, when the API reports it (prefer `hints.*` copy). */
|
|
82
90
|
retakeHint?: RetakeHint;
|
|
83
91
|
attemptsRemaining: number;
|
|
92
|
+
/** Every counted attempt is used (`attempts.used >= attempts.max`): no try is left. */
|
|
84
93
|
attemptsExhausted: boolean;
|
|
85
94
|
}
|
|
86
95
|
type OtpNumberSource = "prefilled" | "user_entered" | "prefilled_or_entered";
|
|
@@ -334,6 +343,11 @@ interface DocumentSnapshot extends StepAttempts {
|
|
|
334
343
|
side: "recto" | "verso";
|
|
335
344
|
acceptedSides: ("recto" | "verso")[];
|
|
336
345
|
documents: AcceptedDocumentsLike;
|
|
346
|
+
/**
|
|
347
|
+
* The person's country as detected from their IP address (ISO 3166-1 alpha-2, the view's
|
|
348
|
+
* `detectedCountry`): list it first among the issuers when `documents` accepts it. Absent when unknown.
|
|
349
|
+
*/
|
|
350
|
+
detectedCountry?: string;
|
|
337
351
|
/**
|
|
338
352
|
* Age check (selfie): `true` when the session reached this document because the selfie could not settle the
|
|
339
353
|
* person's age (`age_estimation` failed with `age_uncertain` or `age_unavailable`); show the step-up line
|
|
@@ -357,6 +371,11 @@ interface PhotoSourceState {
|
|
|
357
371
|
pick: PhotoSourcePick | null;
|
|
358
372
|
/** An upload is accepted now (`uploadDocument` / `uploadPortrait`). */
|
|
359
373
|
uploadOffered: boolean;
|
|
374
|
+
/**
|
|
375
|
+
* Spec 2026-11-06 §3.1, a `choice` step on a desktop: the camera runs on a phone only. Offer the upload and
|
|
376
|
+
* "Continue on my phone" (the hand-over), never the webcam. Absent otherwise.
|
|
377
|
+
*/
|
|
378
|
+
cameraOnPhone?: true;
|
|
360
379
|
}
|
|
361
380
|
interface LivenessSnapshot extends StepAttempts {
|
|
362
381
|
/**
|
|
@@ -459,7 +478,8 @@ interface MobileRequiredSnapshot {
|
|
|
459
478
|
kind: "mobile_required";
|
|
460
479
|
key: string;
|
|
461
480
|
context: StepContext;
|
|
462
|
-
|
|
481
|
+
/** The camera step to continue on a phone (spec 2026-11-06 §3.1: every live camera capture, in every decision mode). */
|
|
482
|
+
checkType: "liveness" | "face_match" | "doc_ocr" | "portrait_icao";
|
|
463
483
|
}
|
|
464
484
|
interface ProcessingSnapshot {
|
|
465
485
|
/**
|
|
@@ -492,7 +512,15 @@ interface UnsupportedSnapshot {
|
|
|
492
512
|
checkType: string;
|
|
493
513
|
reason: UnsupportedReason;
|
|
494
514
|
}
|
|
495
|
-
|
|
515
|
+
/**
|
|
516
|
+
* The result screen to show (session outcome model §5.1): `verified`; `review`; `rejected` (a
|
|
517
|
+
* verdict against the person); `inconclusive` (no verdict could be reached); `unavailable` (the
|
|
518
|
+
* check could not run); `expired` (the person left, nobody opened the link, the organization
|
|
519
|
+
* cancelled it or a newer session took it over: this link is over); `policy` (a flow rule
|
|
520
|
+
* stopped it); `cooldown` (this device may try again later); `platform_unsupported` (this
|
|
521
|
+
* client cannot run a required step).
|
|
522
|
+
*/
|
|
523
|
+
type ResultDisplay = "verified" | "review" | "rejected" | "inconclusive" | "unavailable" | "expired" | "policy" | "cooldown" | "platform_unsupported";
|
|
496
524
|
interface ResultSnapshot {
|
|
497
525
|
/**
|
|
498
526
|
* Flow model 2026-10-23: the section of the flow (`contact`, `identity`,
|
|
@@ -505,7 +533,12 @@ interface ResultSnapshot {
|
|
|
505
533
|
context: StepContext;
|
|
506
534
|
display: ResultDisplay;
|
|
507
535
|
result: VerificationResult;
|
|
508
|
-
|
|
536
|
+
/** `not_verified` only: why ({@link SessionReason}). */
|
|
537
|
+
reason?: SessionReason;
|
|
538
|
+
/** The detailed code behind the result (`spoof_detected`, `device_cooldown`, `platform_unsupported`, ...). */
|
|
539
|
+
reasonCode?: string;
|
|
540
|
+
/** `not_verified` only: the step that decided it, when one did. */
|
|
541
|
+
step?: SessionDecidingStep;
|
|
509
542
|
retryAfter?: string;
|
|
510
543
|
}
|
|
511
544
|
type StepSnapshot = PhoneOtpSnapshot | EmailOtpSnapshot | ContactChoiceSnapshot | IdentitySummarySnapshot | MethodSnapshot | ChoiceSnapshot | EidSnapshot | RegistrySnapshot | DocumentSnapshot | LivenessSnapshot | PortraitSnapshot | MobileRequiredSnapshot | ProcessingSnapshot | UnsupportedSnapshot | ResultSnapshot;
|
|
@@ -669,7 +702,7 @@ interface DocumentCaptureHandle {
|
|
|
669
702
|
* handle belongs to a plan-runner step;
|
|
670
703
|
* - `error` — camera or model failure (`error` fired).
|
|
671
704
|
*/
|
|
672
|
-
type PortraitCaptureState = "idle" | "starting" | "gating" | "captured" | "uploading" | "checking" | "done" | "error";
|
|
705
|
+
type PortraitCaptureState = "idle" | "starting" | "gating" | "captured" | "uploading" | "checking" | "done" | "error" | "mode_switch";
|
|
673
706
|
/** One gate evaluation: per-criterion state, the one coaching message, readiness. */
|
|
674
707
|
type PortraitGateUpdate = IcaoGateUpdate;
|
|
675
708
|
interface CapturedPortrait {
|
|
@@ -685,6 +718,8 @@ interface CapturedPortrait {
|
|
|
685
718
|
gate: IcaoGateSummary;
|
|
686
719
|
/** `capture.tuningVersion` the gate ran with, when the server sent one. */
|
|
687
720
|
tuningVersion?: string;
|
|
721
|
+
/** The camera the photo was taken with (as the live track reports it, else as requested). */
|
|
722
|
+
facingMode: CameraFacing;
|
|
688
723
|
}
|
|
689
724
|
interface PortraitCaptureEvents {
|
|
690
725
|
state: PortraitCaptureState;
|
|
@@ -699,9 +734,8 @@ interface PortraitCaptureOptions {
|
|
|
699
734
|
*/
|
|
700
735
|
video: HTMLVideoElement;
|
|
701
736
|
/**
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
* {@link createPortraitCapture}) always opens the front camera and ignores it.
|
|
737
|
+
* Ignored: the capture mode sets the camera. A `self` capture (every standalone {@link createPortraitCapture}) opens
|
|
738
|
+
* the front camera and an `assisted` capture the back camera; the other camera is ignored with a console warning.
|
|
705
739
|
*/
|
|
706
740
|
facing?: CameraFacing;
|
|
707
741
|
/** `HostedSessionView.capture.icao`; missing fields use the bundled fallbacks. */
|
|
@@ -729,20 +763,35 @@ interface PortraitCaptureHandle {
|
|
|
729
763
|
readonly captureMode: CaptureMode;
|
|
730
764
|
/** The camera of the live stream (as its track reports it, else as requested); `'user'` before the first start. */
|
|
731
765
|
readonly facingMode: CameraFacing;
|
|
732
|
-
/** Open the camera, load the model and start the gate.
|
|
766
|
+
/** Open the capture mode's camera, load the model and start the gate. */
|
|
733
767
|
start(options?: PortraitStartOptions): Promise<void>;
|
|
734
768
|
/** Take the photo again (gate only — the camera stays open), or restart after an error. */
|
|
735
769
|
retry(): void;
|
|
736
770
|
/**
|
|
737
|
-
*
|
|
738
|
-
*
|
|
771
|
+
* Does nothing and returns `false` (with a console warning): the capture mode sets the camera, the front one in
|
|
772
|
+
* `self` and the back one in `assisted`. Under `choice` the person switches the mode
|
|
773
|
+
* ({@link PortraitCaptureHandle.setCaptureMode}).
|
|
739
774
|
*/
|
|
740
775
|
switchCamera(): boolean;
|
|
776
|
+
/**
|
|
777
|
+
* Spec 2026-11-06 §3.3, a portrait step whose capture mode is `choice`: whether the person can switch between `self`
|
|
778
|
+
* and `assisted` on the camera view (a device with a front/back choice). `false` otherwise and on a standalone
|
|
779
|
+
* capture. Never rejects.
|
|
780
|
+
*/
|
|
781
|
+
canSwitchCaptureMode(): Promise<boolean>;
|
|
782
|
+
/**
|
|
783
|
+
* Spec 2026-11-06 §3.3: switch the capture mode under `choice` ({@link PortraitCaptureHandle.canSwitchCaptureMode}).
|
|
784
|
+
* The pick is recorded for the session (`Verification.chooseCaptureMode`), and the camera reopens in the new mode
|
|
785
|
+
* (`self`: the front one, `assisted`: the back one) with the gate from zero, through the `mode_switch` state.
|
|
786
|
+
* Before the first start it only records the pick. Resolves `false` and changes nothing when the switch is not
|
|
787
|
+
* offered, the mode is already in force, or the photo was taken.
|
|
788
|
+
*/
|
|
789
|
+
setCaptureMode(mode: ResolvedCaptureMode): Promise<boolean>;
|
|
741
790
|
destroy(): void;
|
|
742
791
|
}
|
|
743
792
|
/** Options of {@link PortraitCaptureHandle.start}. */
|
|
744
793
|
interface PortraitStartOptions {
|
|
745
|
-
/**
|
|
794
|
+
/** Ignored: the capture mode sets the camera (`self` the front one, `assisted` the back one), with a console warning. */
|
|
746
795
|
facing?: CameraFacing;
|
|
747
796
|
}
|
|
748
797
|
|
|
@@ -750,8 +799,10 @@ interface PortraitStartOptions {
|
|
|
750
799
|
* Gate guidance code. `'hold'` is emitted while the clip records. `'upright'`:
|
|
751
800
|
* the phone is held sideways (a landscape camera frame on a phone); the gate
|
|
752
801
|
* waits, and a clip being recorded is dropped, until it is upright again.
|
|
802
|
+
* `'one_face'`: the camera sees a second person of meaningful size; the gate
|
|
803
|
+
* waits until only one face is in the frame.
|
|
753
804
|
*/
|
|
754
|
-
type GateHint = "center" | "closer" | "farther" | "light" | "still" | "hold" | "upright";
|
|
805
|
+
type GateHint = "center" | "closer" | "farther" | "light" | "still" | "hold" | "upright" | "one_face";
|
|
755
806
|
/**
|
|
756
807
|
* Capture + verification state, as seen by the partner:
|
|
757
808
|
* - `idle → starting → gating → recording → captured` is the engine's run;
|
|
@@ -759,7 +810,7 @@ type GateHint = "center" | "closer" | "farther" | "light" | "still" | "hold" | "
|
|
|
759
810
|
* {@link Verification.liveness} (the SDK uploads and submits after `captured`);
|
|
760
811
|
* - `error` on a camera / engine failure (see {@link CaptureError}).
|
|
761
812
|
*/
|
|
762
|
-
type CaptureState = "idle" | "starting" | "gating" | "recording" | "captured" | "uploading" | "checking" | "done" | "error";
|
|
813
|
+
type CaptureState = "idle" | "starting" | "gating" | "recording" | "captured" | "uploading" | "checking" | "done" | "error" | "mode_switch";
|
|
763
814
|
/** Declared capture channel — the liveness band is mobile-calibrated. */
|
|
764
815
|
type CaptureChannel = "mobile" | "desktop";
|
|
765
816
|
/** Gate ring update: integrator progress 0..1 and the current guidance code. */
|
|
@@ -790,8 +841,16 @@ interface CapturedArtifacts {
|
|
|
790
841
|
width: number;
|
|
791
842
|
/** Intrinsic video height at capture time. */
|
|
792
843
|
height: number;
|
|
793
|
-
/**
|
|
844
|
+
/** The clip's duration (ms) read from its container; recording start → stop when the container was not read. */
|
|
794
845
|
clipMs?: number;
|
|
846
|
+
/** Video frames in the clip (read from its container). */
|
|
847
|
+
clipFrames?: number;
|
|
848
|
+
/** The clip's frame rate: frames over its duration. */
|
|
849
|
+
fps?: number;
|
|
850
|
+
/** Silent re-recordings (0 or 1): the first take was short, unreadable or errored. */
|
|
851
|
+
clipRetakes?: number;
|
|
852
|
+
/** The clip's codec (`avc1.42E01E`, `h264`, `vp8`, …), from the recorder's type. */
|
|
853
|
+
codec?: string;
|
|
795
854
|
/** `'mobile'` on phones/tablets (the calibrated channel), else `'desktop'`. */
|
|
796
855
|
captureChannel: CaptureChannel;
|
|
797
856
|
/** Set when the browser has no MediaRecorder: a keyframe-only capture. */
|
|
@@ -907,15 +966,15 @@ interface LivenessCaptureEvents {
|
|
|
907
966
|
animations: "full" | "reduced";
|
|
908
967
|
};
|
|
909
968
|
/**
|
|
910
|
-
*
|
|
911
|
-
* (`null`). Fires while the clip records, at the
|
|
912
|
-
*
|
|
969
|
+
* Ramp v2: paint a full-screen layer this colour (`screenRampColourValue(colour)`), black (`"dark"`, the dark-gap
|
|
970
|
+
* arm; `screenRampColourValue("dark")`) or clear it (`null`). Fires while the clip records, at the times the
|
|
971
|
+
* session's challenge issued. Subscribing is the acknowledgement: the engine runs the ramp only when a listener is bound when the
|
|
913
972
|
* recording starts, and the stamps it reports describe exactly these calls. `@sekyro/react` paints it; a host on
|
|
914
973
|
* `@sekyro/web` alone paints it itself (a `position: fixed; inset: 0` element behind its chrome) or leaves the
|
|
915
974
|
* event unbound. Never fires in an assisted capture or a keyframe-only capture.
|
|
916
975
|
*/
|
|
917
976
|
ramp: {
|
|
918
|
-
colour:
|
|
977
|
+
colour: ScreenRampPaint;
|
|
919
978
|
};
|
|
920
979
|
}
|
|
921
980
|
/** Which camera to open: the selfie camera (`'user'`) or the rear one (`'environment'`). */
|
|
@@ -923,10 +982,8 @@ type CameraFacing = "user" | "environment";
|
|
|
923
982
|
/** Options of {@link LivenessCaptureHandle.start}. */
|
|
924
983
|
interface LivenessStartOptions {
|
|
925
984
|
/**
|
|
926
|
-
*
|
|
927
|
-
*
|
|
928
|
-
* `'environment'` on a device with a front/back choice and `'user'` without one). A `self` capture always opens the front camera and
|
|
929
|
-
* ignores `'environment'` (with a console warning).
|
|
985
|
+
* Ignored: the capture mode sets the camera. A `self` capture opens the front camera and an `assisted` capture the
|
|
986
|
+
* back camera; the other camera is ignored with a console warning.
|
|
930
987
|
*/
|
|
931
988
|
facing?: CameraFacing;
|
|
932
989
|
}
|
|
@@ -939,8 +996,8 @@ interface LivenessCaptureHandle {
|
|
|
939
996
|
* session (`HostedSessionView.capture.mode`, set in the flow; `self` until
|
|
940
997
|
* the view is known; under `choice` the person's pick, `self` until
|
|
941
998
|
* {@link Verification.chooseCaptureMode}); a standalone {@link createLivenessCapture} is always
|
|
942
|
-
* `self`.
|
|
943
|
-
* does nothing
|
|
999
|
+
* `self`. The mode sets the camera: `self` the front one, `assisted` the back one
|
|
1000
|
+
* ({@link LivenessCaptureHandle.switchCamera} does nothing). Never `choice`.
|
|
944
1001
|
*/
|
|
945
1002
|
readonly captureMode: CaptureMode;
|
|
946
1003
|
/**
|
|
@@ -952,18 +1009,32 @@ interface LivenessCaptureHandle {
|
|
|
952
1009
|
/** Subscribe; returns the unsubscribe function. */
|
|
953
1010
|
on<K extends keyof LivenessCaptureEvents>(event: K, handler: (payload: LivenessCaptureEvents[K]) => void): () => void;
|
|
954
1011
|
/**
|
|
955
|
-
* Ask for the camera and start gating. Resolves once the attempt is running or failed.
|
|
956
|
-
* `options.facing` picks the camera for this attempt and later retries.
|
|
1012
|
+
* Ask for the capture mode's camera and start gating. Resolves once the attempt is running or failed.
|
|
957
1013
|
*/
|
|
958
1014
|
start(options?: LivenessStartOptions): Promise<void>;
|
|
959
1015
|
/** Fresh attempt: resets the engine and restarts the camera. */
|
|
960
1016
|
retry(): void;
|
|
961
1017
|
/**
|
|
962
|
-
*
|
|
963
|
-
* `
|
|
964
|
-
*
|
|
1018
|
+
* Does nothing and returns `false` (with a console warning): the capture mode sets the camera, the front one in
|
|
1019
|
+
* `self` and the back one in `assisted`. Under `choice` the person switches the mode
|
|
1020
|
+
* ({@link LivenessCaptureHandle.setCaptureMode}).
|
|
965
1021
|
*/
|
|
966
1022
|
switchCamera(): boolean;
|
|
1023
|
+
/**
|
|
1024
|
+
* Spec 2026-11-06 §3.3, a session whose capture mode is `choice`: whether the person can switch between `self`
|
|
1025
|
+
* and `assisted` on the camera view (a device with a front/back choice). `false` on a `self` or `assisted`
|
|
1026
|
+
* session, on a one-camera device (the person captures in `self`) and on a standalone capture. Never rejects.
|
|
1027
|
+
*/
|
|
1028
|
+
canSwitchCaptureMode(): Promise<boolean>;
|
|
1029
|
+
/**
|
|
1030
|
+
* Spec 2026-11-06 §3.3: switch the capture mode under `choice` ({@link LivenessCaptureHandle.canSwitchCaptureMode}).
|
|
1031
|
+
* The pick is recorded for the session (`Verification.chooseCaptureMode`, so `captureMode` follows it), and a
|
|
1032
|
+
* running take restarts in the new mode: a recording is discarded (never submitted, no attempt used), the state
|
|
1033
|
+
* passes through `mode_switch`, and the camera reopens (`self`: the front one, `assisted`: the back one). Before
|
|
1034
|
+
* the first start it only records the pick. Resolves `false` and changes nothing when the switch is not offered,
|
|
1035
|
+
* the mode is already in force, or a take is being submitted (`captured`, `uploading`, `checking`).
|
|
1036
|
+
*/
|
|
1037
|
+
setCaptureMode(mode: ResolvedCaptureMode): Promise<boolean>;
|
|
967
1038
|
/** Stop the camera, release the detector, drop all listeners. */
|
|
968
1039
|
destroy(): void;
|
|
969
1040
|
}
|
|
@@ -972,11 +1043,9 @@ interface LivenessCaptureOptions {
|
|
|
972
1043
|
/** Host-owned `<video playsInline muted>` element. */
|
|
973
1044
|
video: HTMLVideoElement;
|
|
974
1045
|
/**
|
|
975
|
-
*
|
|
976
|
-
*
|
|
977
|
-
*
|
|
978
|
-
* standalone capture, and sessions whose flow films the person themselves)
|
|
979
|
-
* always uses `'user'` and ignores `'environment'` with a console warning.
|
|
1046
|
+
* Ignored: the capture mode sets the camera. A `self` capture (every standalone capture, and sessions whose flow
|
|
1047
|
+
* films the person themselves) uses `'user'` and an `assisted` capture `'environment'`; the other camera is ignored
|
|
1048
|
+
* with a console warning.
|
|
980
1049
|
*/
|
|
981
1050
|
facing?: CameraFacing;
|
|
982
1051
|
/** Base URL of the detector assets (tasks-vision wasm + tflite); default `/models-v3`. */
|
|
@@ -1023,13 +1092,15 @@ type SdkFailureReason = "no_recorder" | "attestation" | "network" | "nni_unbound
|
|
|
1023
1092
|
/** Backend reason taxonomy ∪ the SDK-side failure reasons. */
|
|
1024
1093
|
type ReasonCode = CheckReason | SessionFailureReason | SdkFailureReason | AgeEstimationReason;
|
|
1025
1094
|
/**
|
|
1026
|
-
* - `
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
* -
|
|
1030
|
-
*
|
|
1095
|
+
* - `verified` / `not_verified` / `review`: the session's end state (a `not_verified`
|
|
1096
|
+
* result says why in {@link VerificationResult.reason});
|
|
1097
|
+
* - `retry`: the capture was not conclusive and attempts remain (`autoRetry` on);
|
|
1098
|
+
* the capture re-arms by itself;
|
|
1099
|
+
* - `unavailable`: the check could not run (the service was unavailable, no
|
|
1100
|
+
* MediaRecorder, attestation failed, network or API failure, or a step only a
|
|
1101
|
+
* phone can capture). Treat as "not finished".
|
|
1031
1102
|
*/
|
|
1032
|
-
type VerificationStatus = "
|
|
1103
|
+
type VerificationStatus = "verified" | "not_verified" | "review" | "retry" | "unavailable";
|
|
1033
1104
|
/** The verdict for this session / capture (`on('result')`). */
|
|
1034
1105
|
interface VerificationResult {
|
|
1035
1106
|
/**
|
|
@@ -1038,10 +1109,20 @@ interface VerificationResult {
|
|
|
1038
1109
|
*/
|
|
1039
1110
|
sessionId: string;
|
|
1040
1111
|
status: VerificationStatus;
|
|
1041
|
-
/** Backend check or session-policy reason, or SDK-side reason for `unavailable`. */
|
|
1042
|
-
reason?: ReasonCode;
|
|
1043
1112
|
/**
|
|
1044
|
-
* `
|
|
1113
|
+
* `not_verified` only: why ({@link SessionReason}). On a capture refused while the session
|
|
1114
|
+
* is still open (`autoRetry` off, or no attempt left), the reason the step's result gives
|
|
1115
|
+
* (`rejected`, `inconclusive`, `unavailable`).
|
|
1116
|
+
*/
|
|
1117
|
+
reason?: SessionReason;
|
|
1118
|
+
/**
|
|
1119
|
+
* The detailed code: the backend check or session-policy reason (`spoof_detected`,
|
|
1120
|
+
* `match_inconclusive`, `device_cooldown`, ...), or the SDK-side reason of an
|
|
1121
|
+
* `unavailable` result.
|
|
1122
|
+
*/
|
|
1123
|
+
reasonCode?: ReasonCode;
|
|
1124
|
+
/**
|
|
1125
|
+
* `retry` (and a `not_verified` on a still-parked step): submissions left for
|
|
1045
1126
|
* the parked check after this one, for the host's coaching copy.
|
|
1046
1127
|
*/
|
|
1047
1128
|
attemptsRemaining?: number;
|
|
@@ -1052,14 +1133,14 @@ interface VerificationResult {
|
|
|
1052
1133
|
*/
|
|
1053
1134
|
retakeHint?: RetakeHint;
|
|
1054
1135
|
/**
|
|
1055
|
-
* ISO-8601 time from which this device may verify again
|
|
1056
|
-
* `
|
|
1136
|
+
* ISO-8601 time from which this device may verify again, set on a
|
|
1137
|
+
* `not_verified` result with reason code `device_cooldown` (profile v2 step 4).
|
|
1057
1138
|
*/
|
|
1058
1139
|
retryAfter?: string;
|
|
1059
1140
|
/**
|
|
1060
|
-
* What the session proved (`
|
|
1141
|
+
* What the session proved (`verified`, `not_verified`, `review`), when the API
|
|
1061
1142
|
* reports it: `1` a live person, `2` their identity, `3` corroborated, `0`
|
|
1062
|
-
*
|
|
1143
|
+
* not verified. A display hint: confirm on your server with the result token.
|
|
1063
1144
|
*/
|
|
1064
1145
|
level?: VerificationLevel;
|
|
1065
1146
|
/** How the level was proved, when the API reports it. */
|
|
@@ -1083,7 +1164,7 @@ interface VerificationBusy {
|
|
|
1083
1164
|
type VerificationLocale = "ar" | "fr" | "en" | "es" | "pt" | "de";
|
|
1084
1165
|
/** Options of {@link createVerification}. */
|
|
1085
1166
|
interface VerificationOptions {
|
|
1086
|
-
/** The session's client token (from `POST /api/v2/sessions` → `
|
|
1167
|
+
/** The session's client token (from `POST /api/v2/sessions` → `clientToken`). */
|
|
1087
1168
|
clientToken: string;
|
|
1088
1169
|
/** API origin; default `https://api.sekyro.ai`. */
|
|
1089
1170
|
apiOrigin?: string;
|
|
@@ -1168,10 +1249,12 @@ interface Verification {
|
|
|
1168
1249
|
*/
|
|
1169
1250
|
reportCaptureIssue?(issue: CaptureIssueReport): void;
|
|
1170
1251
|
/**
|
|
1171
|
-
* The session's
|
|
1172
|
-
*
|
|
1173
|
-
*
|
|
1174
|
-
*
|
|
1252
|
+
* The session's current camera step (liveness, a selfie face match, a
|
|
1253
|
+
* camera document or portrait photo; spec 2026-11-06 §3.1, every decision
|
|
1254
|
+
* mode), or its pending liveness step, must be captured on a phone
|
|
1255
|
+
* (`HostedStepView.requiresMobile`) and this browser is not one: show
|
|
1256
|
+
* "continue on your phone" instead of starting the camera. A `choice` photo
|
|
1257
|
+
* step is not: its upload stays on the desktop. Bootstraps the hosted view when needed; `false` when
|
|
1175
1258
|
* the bootstrap fails or the verification was destroyed. Never rejects.
|
|
1176
1259
|
* Optional so custom / older `Verification` implementations stay valid —
|
|
1177
1260
|
* treat an absent member as "no phone requirement".
|
|
@@ -1180,9 +1263,10 @@ interface Verification {
|
|
|
1180
1263
|
/**
|
|
1181
1264
|
* Who films the face in this session (`HostedSessionView.capture.mode`, a
|
|
1182
1265
|
* flow setting): `self` (the person, front camera), `assisted` (an agent,
|
|
1183
|
-
* back camera) or `choice` (the
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1266
|
+
* back camera) or `choice` (the camera opens in `self` and the person
|
|
1267
|
+
* switches on the camera view: {@link LivenessCaptureHandle.setCaptureMode}).
|
|
1268
|
+
* Once picked (on this page, or the session's latest pick `capture.pick`),
|
|
1269
|
+
* resolves to the pick. Bootstraps the hosted
|
|
1186
1270
|
* view when needed; `self` when the bootstrap fails or the verification was
|
|
1187
1271
|
* destroyed. Never rejects.
|
|
1188
1272
|
* Optional so custom / older `Verification` implementations stay valid:
|
|
@@ -1197,7 +1281,10 @@ interface Verification {
|
|
|
1197
1281
|
* Optional so custom / older `Verification` implementations stay valid.
|
|
1198
1282
|
*/
|
|
1199
1283
|
chooseCaptureMode?(mode: ResolvedCaptureMode): void;
|
|
1200
|
-
/**
|
|
1284
|
+
/**
|
|
1285
|
+
* Under `choice`: the pick made with {@link Verification.chooseCaptureMode}, else the session's latest
|
|
1286
|
+
* (`HostedSessionView.capture.pick`, once the view is known); `null` before either.
|
|
1287
|
+
*/
|
|
1201
1288
|
readonly captureChoice?: ResolvedCaptureMode | null;
|
|
1202
1289
|
/**
|
|
1203
1290
|
* The session is a returning-user session (`HostedSessionView.returning`,
|
|
@@ -1352,6 +1439,11 @@ interface RegistryStepHandle extends RegistrySnapshot {
|
|
|
1352
1439
|
interface DocumentStepHandle extends DocumentSnapshot {
|
|
1353
1440
|
/** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
|
|
1354
1441
|
chooseOption?(option: string): Promise<void>;
|
|
1442
|
+
/**
|
|
1443
|
+
* Spec 2026-11-06 §3.1, present only with `photo.cameraOnPhone` (a `choice` step on a desktop): re-read the session,
|
|
1444
|
+
* so the page follows the person who continued on their phone (the hand-over polls it).
|
|
1445
|
+
*/
|
|
1446
|
+
refresh?(): Promise<void>;
|
|
1355
1447
|
/** The picked issuer (`null` until picked; a verso keeps the recto's pick). */
|
|
1356
1448
|
issuer: string | null;
|
|
1357
1449
|
/** The picked type (`null` until picked). */
|
|
@@ -1382,6 +1474,12 @@ interface DocumentStepHandle extends DocumentSnapshot {
|
|
|
1382
1474
|
* `reason`, or the next step). Other failures reject with the typed `HostedApiError`.
|
|
1383
1475
|
*/
|
|
1384
1476
|
uploadDocument(file: Blob): Promise<void>;
|
|
1477
|
+
/**
|
|
1478
|
+
* Sandbox DX spec 2026-11-06 §8: present only when `context.simulation.skipCapture` is set. Stops the camera and
|
|
1479
|
+
* submits the check with `{ simulatedCapture: true }` and no media; the step then moves on as after a capture.
|
|
1480
|
+
* Repeating it while it is on its way reuses the same submission. Rejects with the typed `HostedApiError`.
|
|
1481
|
+
*/
|
|
1482
|
+
skipCapture?(): Promise<void>;
|
|
1385
1483
|
}
|
|
1386
1484
|
/** The liveness / selfie step. */
|
|
1387
1485
|
interface LivenessStepHandle extends LivenessSnapshot {
|
|
@@ -1395,6 +1493,12 @@ interface LivenessStepHandle extends LivenessSnapshot {
|
|
|
1395
1493
|
* otherwise). Returns the unsubscribe; never fires without `livePhoto.icao`.
|
|
1396
1494
|
*/
|
|
1397
1495
|
onLivePhoto(handler: (gate: LivePhotoGateUpdate) => void): () => void;
|
|
1496
|
+
/**
|
|
1497
|
+
* Sandbox DX spec 2026-11-06 §8: present only when `context.simulation.skipCapture` is set. Stops the camera and
|
|
1498
|
+
* submits the check with `{ simulatedCapture: true }` and no media; the step then moves on as after a capture.
|
|
1499
|
+
* Repeating it while it is on its way reuses the same submission. Rejects with the typed `HostedApiError`.
|
|
1500
|
+
*/
|
|
1501
|
+
skipCapture?(): Promise<void>;
|
|
1398
1502
|
}
|
|
1399
1503
|
/** The ICAO coaching of a one-capture live photo (`LivenessStepHandle.onLivePhoto`). */
|
|
1400
1504
|
interface LivePhotoGateUpdate {
|
|
@@ -1407,6 +1511,11 @@ interface LivePhotoGateUpdate {
|
|
|
1407
1511
|
interface PortraitStepHandle extends PortraitSnapshot {
|
|
1408
1512
|
/** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
|
|
1409
1513
|
chooseOption?(option: string): Promise<void>;
|
|
1514
|
+
/**
|
|
1515
|
+
* Spec 2026-11-06 §3.1, present only with `photo.cameraOnPhone` (a `choice` step on a desktop): re-read the session,
|
|
1516
|
+
* so the page follows the person who continued on their phone (the hand-over polls it).
|
|
1517
|
+
*/
|
|
1518
|
+
refresh?(): Promise<void>;
|
|
1410
1519
|
/**
|
|
1411
1520
|
* The last submission failed on the network (nothing was decided): in the
|
|
1412
1521
|
* `capture` phase offer a new take (`retry()` on the capture handle), in the
|
|
@@ -1445,6 +1554,12 @@ interface PortraitStepHandle extends PortraitSnapshot {
|
|
|
1445
1554
|
* to the `capture` phase for another photo. Submits `portrait_icao` with `{ fixReview: { accept } }`.
|
|
1446
1555
|
*/
|
|
1447
1556
|
confirmFix(accept: boolean): Promise<void>;
|
|
1557
|
+
/**
|
|
1558
|
+
* Sandbox DX spec 2026-11-06 §8: present only when `context.simulation.skipCapture` is set. Stops the camera and
|
|
1559
|
+
* submits the check with `{ simulatedCapture: true }` and no media; the step then moves on as after a capture.
|
|
1560
|
+
* Repeating it while it is on its way reuses the same submission. Rejects with the typed `HostedApiError`.
|
|
1561
|
+
*/
|
|
1562
|
+
skipCapture?(): Promise<void>;
|
|
1448
1563
|
}
|
|
1449
1564
|
/** The biometric step needs a phone (desktop browser). */
|
|
1450
1565
|
interface MobileRequiredStepHandle extends MobileRequiredSnapshot {
|
|
@@ -1452,6 +1567,12 @@ interface MobileRequiredStepHandle extends MobileRequiredSnapshot {
|
|
|
1452
1567
|
chooseOption?(option: string): Promise<void>;
|
|
1453
1568
|
/** Re-read the session (e.g. after the person finished on their phone). */
|
|
1454
1569
|
refresh(): Promise<void>;
|
|
1570
|
+
/**
|
|
1571
|
+
* Sandbox DX spec 2026-11-06 §8: present only when `context.simulation.skipCapture` is set. Stops the camera and
|
|
1572
|
+
* submits the check with `{ simulatedCapture: true }` and no media; the step then moves on as after a capture.
|
|
1573
|
+
* Repeating it while it is on its way reuses the same submission. Rejects with the typed `HostedApiError`.
|
|
1574
|
+
*/
|
|
1575
|
+
skipCapture?(): Promise<void>;
|
|
1455
1576
|
}
|
|
1456
1577
|
/** The server is still deciding. */
|
|
1457
1578
|
interface ProcessingStepHandle extends ProcessingSnapshot {
|
|
@@ -1461,7 +1582,10 @@ interface ProcessingStepHandle extends ProcessingSnapshot {
|
|
|
1461
1582
|
refresh(): Promise<void>;
|
|
1462
1583
|
}
|
|
1463
1584
|
/** A step this SDK cannot run (`platform_unsupported` / `update_required`). */
|
|
1464
|
-
type UnsupportedStepHandle = UnsupportedSnapshot
|
|
1585
|
+
type UnsupportedStepHandle = UnsupportedSnapshot & {
|
|
1586
|
+
/** The chip step of a simulated session (`checkType: "nfc_chip"`); see {@link DocumentStepHandle.skipCapture}. */
|
|
1587
|
+
skipCapture?(): Promise<void>;
|
|
1588
|
+
};
|
|
1465
1589
|
/** The session's outcome — display only (the SDK never decides it). */
|
|
1466
1590
|
type ResultStepHandle = ResultSnapshot;
|
|
1467
1591
|
/** What `on('step')` delivers: the step's data plus its actions. */
|
|
@@ -1477,6 +1601,8 @@ interface CaptureEngine {
|
|
|
1477
1601
|
}): Promise<void>;
|
|
1478
1602
|
retry(): void;
|
|
1479
1603
|
switchCamera(): void;
|
|
1604
|
+
/** Drop the running attempt (discarding a recording) and start again on `facingMode`. */
|
|
1605
|
+
restart(facingMode: "user" | "environment"): void;
|
|
1480
1606
|
destroy(): void;
|
|
1481
1607
|
/** Device-profile chrome hint (LOW class → `'reduced'`); absent on doubles. */
|
|
1482
1608
|
readonly animations?: "full" | "reduced";
|
|
@@ -1499,8 +1625,17 @@ interface LivenessCaptureInternals {
|
|
|
1499
1625
|
declare function mapGuidanceHint(key: string): GateHint | null;
|
|
1500
1626
|
/** Engine state → public state (`preflight|acquiring → starting`, `positioning → gating`). */
|
|
1501
1627
|
declare function mapEngineState(state: CaptureState$1): CaptureState;
|
|
1502
|
-
/** Engine error kinds → the public six (`models|cliptoolarge|recorder|overconstrained → generic`). */
|
|
1628
|
+
/** Engine error kinds → the public six (`models|cliptoolarge|recorder|overconstrained → generic`, `backcamera → notfound`). */
|
|
1503
1629
|
declare function mapErrorKind(kind: CaptureErrorKind$1): CaptureErrorKind;
|
|
1630
|
+
/**
|
|
1631
|
+
* Spec 2026-11-06 §3.3: the capture mode switch of a capture bound to a session. `session` is the session's own mode
|
|
1632
|
+
* (the switch exists under `choice` only); `onModeChange` records the person's pick (`Verification.chooseCaptureMode`)
|
|
1633
|
+
* so the `captureMode` getter of the handle follows it.
|
|
1634
|
+
*/
|
|
1635
|
+
interface CaptureModeSwitch {
|
|
1636
|
+
session(): CaptureMode;
|
|
1637
|
+
onModeChange(mode: ResolvedCaptureMode): void;
|
|
1638
|
+
}
|
|
1504
1639
|
/** Handle + the hooks the verification layer uses to drive the flow states. */
|
|
1505
1640
|
interface LivenessCaptureInternalHandle {
|
|
1506
1641
|
handle: LivenessCaptureHandle;
|
|
@@ -1521,7 +1656,9 @@ captureMode?: () => ResolvedCaptureMode,
|
|
|
1521
1656
|
* starts. The engine gets it only for a `self` capture with a `ramp` listener bound (the host paints); absent (a
|
|
1522
1657
|
* capture bound to no session, older backends) → no ramp.
|
|
1523
1658
|
*/
|
|
1524
|
-
screenRamp?: () => ScreenRampChallenge | undefined
|
|
1659
|
+
screenRamp?: () => ScreenRampChallenge | undefined,
|
|
1660
|
+
/** Spec 2026-11-06 §3.3: the mode switch under `choice`; absent (a capture bound to no session) → none. */
|
|
1661
|
+
modeSwitch?: CaptureModeSwitch): LivenessCaptureInternalHandle;
|
|
1525
1662
|
/**
|
|
1526
1663
|
* Create a standalone liveness capture (no upload — pair it with your own
|
|
1527
1664
|
* submission, or use {@link Verification.liveness} for the full flow).
|
|
@@ -1884,19 +2021,7 @@ interface DocCameraTuning {
|
|
|
1884
2021
|
declare const DOC_CAMERA_TUNING_DEFAULTS: Readonly<DocCameraTuning>;
|
|
1885
2022
|
/** Field-by-field merge of a server `capture.document.camera` block over the defaults (bad fields ignored). */
|
|
1886
2023
|
declare function resolveDocCameraTuning(raw: unknown): DocCameraTuning;
|
|
1887
|
-
|
|
1888
|
-
/** What a camera label says about its lens (labels are English on Android Chrome / iOS Safari). */
|
|
1889
|
-
declare function lensKindOf(label: string): LensKind;
|
|
1890
|
-
/**
|
|
1891
|
-
* Back cameras best-first: main wide lenses (lowest Android index first), then
|
|
1892
|
-
* iOS virtual multi-lens devices; ultra-wide, telephoto, depth and front lenses
|
|
1893
|
-
* are dropped. Empty when nothing is identifiable (keep the browser's pick).
|
|
1894
|
-
*/
|
|
1895
|
-
declare function rankBackCameras(devices: ReadonlyArray<{
|
|
1896
|
-
deviceId: string;
|
|
1897
|
-
label: string;
|
|
1898
|
-
kind?: string;
|
|
1899
|
-
}>): string[];
|
|
2024
|
+
|
|
1900
2025
|
declare const LENS_STORAGE_KEY = "sekyro.doc.camera";
|
|
1901
2026
|
/** The remembered document camera (per browser), or null (storage blocked / empty). */
|
|
1902
2027
|
declare function readStoredLens(): string | null;
|
|
@@ -1966,8 +2091,7 @@ interface OpenDocCameraDeps {
|
|
|
1966
2091
|
type LensSource = "stored" | "selected" | "default";
|
|
1967
2092
|
/** Focus is fine when the camera offers continuous AF, or reports no focus modes at all (Safari / Firefox). */
|
|
1968
2093
|
declare function focusOk(stream: MediaStream): boolean;
|
|
1969
|
-
|
|
1970
|
-
declare const LENS_TRY_MAX = 3;
|
|
2094
|
+
|
|
1971
2095
|
/**
|
|
1972
2096
|
* Open the back camera: the remembered lens first, else `facingMode:
|
|
1973
2097
|
* environment` (the permission prompt; labels appear after it), then the
|
|
@@ -3018,6 +3142,12 @@ interface PortraitCaptureInternals {
|
|
|
3018
3142
|
/** The background-uniformity check's selfie segmenter (default: MediaPipe, lazy). */
|
|
3019
3143
|
createSegmenter?: (assetBaseUrl: string) => Promise<SegmenterLike>;
|
|
3020
3144
|
getUserMedia?: (constraints: MediaStreamConstraints) => Promise<MediaStream>;
|
|
3145
|
+
/** (navigator.mediaDevices.enumerateDevices, only without a `getUserMedia` double) — the back lenses by id. */
|
|
3146
|
+
enumerateDevices?: () => Promise<ReadonlyArray<{
|
|
3147
|
+
deviceId: string;
|
|
3148
|
+
label: string;
|
|
3149
|
+
kind?: string;
|
|
3150
|
+
}>>;
|
|
3021
3151
|
/** Draw the video scaled to `longEdge` (analysis) or at full size (`null`). */
|
|
3022
3152
|
grabFrame?: (video: HTMLVideoElement, longEdge: number | null) => GrabbedFrame | null;
|
|
3023
3153
|
/** Cut `region` out of a full-size frame, scale to `outHeight`, encode JPEG. */
|
|
@@ -3033,6 +3163,8 @@ interface PortraitCaptureInternals {
|
|
|
3033
3163
|
interface PortraitCaptureController {
|
|
3034
3164
|
handle: PortraitCaptureHandle;
|
|
3035
3165
|
setFlowState(state: Extract<PortraitCaptureState, "uploading" | "checking" | "done">): void;
|
|
3166
|
+
/** This gate run's mouth scores (staff diagnostics). */
|
|
3167
|
+
gateScores(): IcaoGateScores | null;
|
|
3036
3168
|
}
|
|
3037
3169
|
/** The observation of one landmarked frame. `scale` maps analysis px → source px. */
|
|
3038
3170
|
declare function observe(faces: readonly LandmarkedFace[], frame: GrabbedFrame, sourceWidth: number, sourceHeight: number): IcaoFrameObservation;
|
|
@@ -3041,7 +3173,9 @@ declare function createPortraitCaptureInternal(options: PortraitCaptureOptions,
|
|
|
3041
3173
|
* Who films the face (spec 2026-10-28 §4.3): the portrait step reads the session's `capture.mode` at every start
|
|
3042
3174
|
* and switch, as the liveness capture does. Absent (a standalone capture) → `self`: the front camera only.
|
|
3043
3175
|
*/
|
|
3044
|
-
captureMode?: () => ResolvedCaptureMode
|
|
3176
|
+
captureMode?: () => ResolvedCaptureMode,
|
|
3177
|
+
/** Spec 2026-11-06 §3.3: the capture mode switch of a `choice` step; absent (a standalone capture) → none. */
|
|
3178
|
+
modeSwitch?: CaptureModeSwitch): PortraitCaptureController;
|
|
3045
3179
|
|
|
3046
3180
|
/**
|
|
3047
3181
|
* The client surface the flow needs — `HostedClient` or a test fake. D8: the
|
|
@@ -3271,4 +3405,4 @@ declare function createVerification(options: VerificationOptions): Verification;
|
|
|
3271
3405
|
/** {@link createVerification} with construction seams (tests / Sekyro AI-internal hosts). */
|
|
3272
3406
|
declare function createVerificationInternal(options: VerificationOptions, internals: VerificationInternals): Verification;
|
|
3273
3407
|
|
|
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,
|
|
3408
|
+
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, analyzeGuide 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, MANUAL_SHUTTER_MS as cA, MR_DOC_CATALOG as cB, NO_REPORT_MS as cC, type OpenDocCameraDeps as cD, PORTRAIT_JPEG_QUALITY as cE, PRELOAD_BLAZE_INIT_TIMEOUT_MS as cF, PRELOAD_BUDGET_MS as cG, PROCESSING_POLL_DELAY_MS as cH, PROCESSING_POLL_MAX as cI, type PortraitCaptureController as cJ, type PortraitCaptureInternals as cK, REGISTRY_RETRY_DELAY_MS as cL, type ReticleType as cM, SAME_FACE_MAX_DROPS as cN, type ScanEvent as cO, type ScanLayout as cP, type ScanNotice as cQ, type ScanPhase as cR, type ScanReport as cS, type ScanSide as cT, type ScanState as cU, type SubmitExecutor as cV, TEXT_LOCK_DEFAULTS as cW, TRANSPORT_REPLAY_ATTEMPTS as cX, TRANSPORT_REPLAY_DELAY_MS as cY, type VerificationInternals as cZ, analyzeDocFrame 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, LIVE_MRZ_DEFAULTS as ci, LIVE_PHOTO_IDLE_MS as cj, LIVE_PHOTO_MAX_HZ as ck, type LandmarkedFace as cl, type LandmarkerLike as cm, type LensSource as cn, type LightingStatus as co, type LiveMrzCapture as cp, type LiveMrzState as cq, type LivePhotoGate as cr, type LivePhotoKit as cs, type LivePhotoKitInternals as ct, type LivePhotoKitOptions as cu, type LivePhotoStill as cv, type LivenessCaptureInternalHandle as cw, type LivenessCaptureInternals as cx, type LivenessFlowDeps as cy, type LivenessFlowOutcome as cz, type CaptureEngineId as d, aspectBand as d0, aspectFits as d1, buildDeviceReadHint as d2, coverPointToVideo as d3, createDocumentCaptureInternal as d4, createFaceLandmarker as d5, createLivePhotoKit as d6, createLivenessCaptureInternal as d7, createPortraitCaptureInternal as d8, createVerificationInternal as d9, resolveDocShutterTuning as dA, resolveGuideLockTuning as dB, runLivenessFlow as dC, runSubmission as dD, scannerFormatFor as dE, setPreloadLoaderForTests as dF, settledHint as dG, singleShotFocusAt as dH, specularFraction as dI, supportsFocusMode as dJ, warmDocDetector as dK, writeStoredLens as dL, docZoomFor as da, encodeDocumentImage as db, facesOf as dc, feedbackVoteOf as dd, focusOk as de, guideQuad as df, guideRegionInFrame as dg, initialScanState as dh, mapEngineState as di, mapErrorKind as dj, mapGuidanceHint as dk, nextScanState as dl, observe as dm, openDocCamera as dn, passportBandOf as dp, portraitMatchStep as dq, preloadedDetectorFactory as dr, quadAreaFrac as ds, quadBounds as dt, quadIou as du, quadTiltRatio as dv, randomUuid as dw, readStoredLens as dx, resetLivenessAssetsForTests as dy, resolveDocCameraTuning 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 };
|