@sekyro/web 0.1.0-rc.21 → 0.1.0-rc.23
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 +53 -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-XBZGXWOP.js → capture-session-doc-BBDKMEAP.js} +1 -1
- package/dist/{capture-session-v3-ZO0QOeQH.d.ts → capture-session-v3-CFXYS0Pg.d.cts} +90 -13
- package/dist/{capture-session-v3-26FgzBIl.d.cts → capture-session-v3-DID39wUZ.d.ts} +90 -13
- package/dist/chunk-2LDOXGY3.js +1 -0
- package/dist/chunk-5DTWBDCP.js +1 -0
- package/dist/chunk-72LG73YL.js +1 -0
- package/dist/chunk-7QZWBDI5.js +1 -0
- package/dist/chunk-CPUECYAJ.js +1 -0
- package/dist/chunk-FSSMUAKC.js +1 -0
- package/dist/chunk-JWEHH2MS.js +1 -0
- package/dist/chunk-JYU5YHXN.js +1 -0
- package/dist/chunk-LFMIFR6T.js +1 -0
- package/dist/chunk-LJYMZQY2.js +1 -0
- package/dist/chunk-PBLZ5W7P.js +1 -0
- package/dist/chunk-RPVI2OGR.js +1 -0
- package/dist/chunk-SX7TUC3V.js +1 -0
- package/dist/chunk-TSA6GHUG.js +1 -0
- package/dist/chunk-U3NYGTX7.js +1 -0
- package/dist/chunk-VWGKUQ3C.js +1 -0
- package/dist/chunk-X6UIO5E3.js +1 -0
- package/dist/{chunk-QYYJLXKA.js → chunk-YWGW63B3.js} +1 -1
- 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-K5PDVOGV.js +1 -0
- package/dist/create-portrait-capture-5VGYZUOK.js +1 -0
- package/dist/{create-verification-KlHIU4Fy.d.ts → create-verification-BP2L4rzV.d.cts} +201 -82
- package/dist/{create-verification-CXhXxknV.d.cts → create-verification-Dc1Rd-4T.d.ts} +201 -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-DI8VePWd.d.ts → icao-gate-CIXjbPCL.d.cts} +8 -1
- package/dist/{icao-gate-DvzOzHq6.d.cts → icao-gate-COt4O4h_.d.ts} +8 -1
- package/dist/{icao-policy-MRB8NMAu.d.cts → icao-policy-Cizs5guu.d.cts} +2 -2
- package/dist/{icao-policy-DztbA50-.d.ts → icao-policy-DI4kU6Mv.d.ts} +2 -2
- 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 +49 -34
- package/dist/internal/index.d.ts +49 -34
- package/dist/internal/index.js +1 -1
- package/dist/plan-runner-AD2JTMC7.js +1 -0
- package/dist/popup/index.cjs +1 -1
- package/dist/popup/index.d.cts +2 -2
- package/dist/popup/index.d.ts +2 -2
- package/dist/popup/index.js +1 -1
- package/dist/{print-AYSCRSZB.js → print-SEWS3VHQ.js} +1 -1
- package/dist/{turnstile-FATNZ4AG.js → turnstile-F4DS2L3F.js} +1 -1
- package/dist/{types-C_XP92JQ.d.cts → types-Cjnp1o8i.d.cts} +161 -84
- package/dist/{types-C_XP92JQ.d.ts → types-Cjnp1o8i.d.ts} +161 -84
- package/package.json +1 -1
- package/sbom.cdx.json +10 -10
- package/dist/camera-trait-45MJTW4K.js +0 -1
- package/dist/chunk-234OZEDB.js +0 -1
- package/dist/chunk-7Q4YPMAF.js +0 -1
- package/dist/chunk-B2X33ZW2.js +0 -1
- package/dist/chunk-CQ7SKLMC.js +0 -1
- package/dist/chunk-FUHDOEBP.js +0 -1
- package/dist/chunk-GT2ZLGF7.js +0 -1
- package/dist/chunk-H3HVCWLF.js +0 -1
- package/dist/chunk-O5WKNZ2C.js +0 -1
- package/dist/chunk-OKWG3PVH.js +0 -1
- package/dist/chunk-P3H3D33O.js +0 -1
- package/dist/chunk-P6UP4UQY.js +0 -1
- package/dist/chunk-SNACCYTL.js +0 -1
- package/dist/chunk-TQB3URP2.js +0 -1
- package/dist/chunk-VIAT4DEA.js +0 -1
- package/dist/chunk-ZADZTM3M.js +0 -1
- package/dist/chunk-ZNIZACXD.js +0 -1
- package/dist/create-document-capture-23R2F47A.js +0 -1
- package/dist/create-portrait-capture-AGFHECK7.js +0 -1
- package/dist/plan-runner-NUWONT7F.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, p as IcaoGateScores, 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, a8 as NationalEidOption, aH as StepSection, aS as HostedBranding, am as PlanSectionView, aj as PlanChoiceKind, T as HostedSimulationView, l as ContactChannel, f as CheckReason, aW as RetakeHint, ag as PhotoSource, ah as PhotoSourcePick, $ as IdentityMethod, E as EidAfterPass, a0 as IdentitySummarySource, J as HostedIcaoPolicy, ac as PhoneCountryRule, Z as IcaoReportEntry, aV as IcaoCaptureTuning, Q as HostedPortraitPendingFix, b as CaptureMode, aB as SessionReason, az as SessionDecidingStep, S as HostedSessionView, U as HostedStepView, an as PlanStepView, ay as ResolvedCaptureMode, a_ as ScreenRampReport, aR as CaptureProvenance, aY as ScreenRampPaint, aA as SessionFailureReason, aO as AgeEstimationReason, aM as VerificationLevel, aL as VerificationAssurance, a7 as MethodChoiceView, aP as CameraUnavailableCause, aQ as CaptureIssueReport, X as HostedVoiceView, aX as ScreenRampChallenge, b3 as PersonMask, a as AttestationInput, h as CheckType, as as PortraitIcaoInput } from './types-Cjnp1o8i.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-DID39wUZ.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-COt4O4h_.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,13 +48,21 @@ 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 {
|
|
55
58
|
/** The session id as partners read it (`ses_...`): the reference shown on the result screen. */
|
|
56
59
|
sessionId: string;
|
|
57
60
|
orgName: string;
|
|
61
|
+
/**
|
|
62
|
+
* A Sandbox (test) session (`view.sandbox`): show the "Test session" badge. `false` in Live and on an older backend.
|
|
63
|
+
* The flow is the same in both environments; only the badge, and on a simulated session `simulation`, differ.
|
|
64
|
+
*/
|
|
65
|
+
sandbox: boolean;
|
|
58
66
|
returning: boolean;
|
|
59
67
|
consentRecorded: boolean;
|
|
60
68
|
expiresAt: string;
|
|
@@ -80,12 +88,20 @@ interface StepContext {
|
|
|
80
88
|
* the code screens, and with `skipCapture` offer the step's `skipCapture()`. Absent on every other session.
|
|
81
89
|
*/
|
|
82
90
|
simulation?: HostedSimulationView;
|
|
91
|
+
/**
|
|
92
|
+
* Spec 2026-11-09 §3.3: offer "Run real checks as a tester" (`view.testerGate`): a simulated Sandbox session before
|
|
93
|
+
* its first capture. Run it with `Verification.testerGate()`. Absent on every other session.
|
|
94
|
+
*/
|
|
95
|
+
testerGate?: {
|
|
96
|
+
attemptsLeft: number;
|
|
97
|
+
};
|
|
83
98
|
}
|
|
84
99
|
interface StepAttempts {
|
|
85
100
|
reason?: CheckReason;
|
|
86
101
|
/** Liveness v7 §5.2: what to change for the next capture, when the API reports it (prefer `hints.*` copy). */
|
|
87
102
|
retakeHint?: RetakeHint;
|
|
88
103
|
attemptsRemaining: number;
|
|
104
|
+
/** Every counted attempt is used (`attempts.used >= attempts.max`): no try is left. */
|
|
89
105
|
attemptsExhausted: boolean;
|
|
90
106
|
}
|
|
91
107
|
type OtpNumberSource = "prefilled" | "user_entered" | "prefilled_or_entered";
|
|
@@ -367,6 +383,11 @@ interface PhotoSourceState {
|
|
|
367
383
|
pick: PhotoSourcePick | null;
|
|
368
384
|
/** An upload is accepted now (`uploadDocument` / `uploadPortrait`). */
|
|
369
385
|
uploadOffered: boolean;
|
|
386
|
+
/**
|
|
387
|
+
* Spec 2026-11-06 §3.1, a `choice` step on a desktop: the camera runs on a phone only. Offer the upload and
|
|
388
|
+
* "Continue on my phone" (the hand-over), never the webcam. Absent otherwise.
|
|
389
|
+
*/
|
|
390
|
+
cameraOnPhone?: true;
|
|
370
391
|
}
|
|
371
392
|
interface LivenessSnapshot extends StepAttempts {
|
|
372
393
|
/**
|
|
@@ -469,7 +490,8 @@ interface MobileRequiredSnapshot {
|
|
|
469
490
|
kind: "mobile_required";
|
|
470
491
|
key: string;
|
|
471
492
|
context: StepContext;
|
|
472
|
-
|
|
493
|
+
/** The camera step to continue on a phone (spec 2026-11-06 §3.1: every live camera capture, in every decision mode). */
|
|
494
|
+
checkType: "liveness" | "face_match" | "doc_ocr" | "portrait_icao";
|
|
473
495
|
}
|
|
474
496
|
interface ProcessingSnapshot {
|
|
475
497
|
/**
|
|
@@ -502,7 +524,15 @@ interface UnsupportedSnapshot {
|
|
|
502
524
|
checkType: string;
|
|
503
525
|
reason: UnsupportedReason;
|
|
504
526
|
}
|
|
505
|
-
|
|
527
|
+
/**
|
|
528
|
+
* The result screen to show (session outcome model §5.1): `verified`; `review`; `rejected` (a
|
|
529
|
+
* verdict against the person); `inconclusive` (no verdict could be reached); `unavailable` (the
|
|
530
|
+
* check could not run); `expired` (the person left, nobody opened the link, the organization
|
|
531
|
+
* cancelled it or a newer session took it over: this link is over); `policy` (a flow rule
|
|
532
|
+
* stopped it); `cooldown` (this device may try again later); `platform_unsupported` (this
|
|
533
|
+
* client cannot run a required step).
|
|
534
|
+
*/
|
|
535
|
+
type ResultDisplay = "verified" | "review" | "rejected" | "inconclusive" | "unavailable" | "expired" | "policy" | "cooldown" | "platform_unsupported";
|
|
506
536
|
interface ResultSnapshot {
|
|
507
537
|
/**
|
|
508
538
|
* Flow model 2026-10-23: the section of the flow (`contact`, `identity`,
|
|
@@ -515,7 +545,12 @@ interface ResultSnapshot {
|
|
|
515
545
|
context: StepContext;
|
|
516
546
|
display: ResultDisplay;
|
|
517
547
|
result: VerificationResult;
|
|
518
|
-
|
|
548
|
+
/** `not_verified` only: why ({@link SessionReason}). */
|
|
549
|
+
reason?: SessionReason;
|
|
550
|
+
/** The detailed code behind the result (`spoof_detected`, `device_cooldown`, `platform_unsupported`, ...). */
|
|
551
|
+
reasonCode?: string;
|
|
552
|
+
/** `not_verified` only: the step that decided it, when one did. */
|
|
553
|
+
step?: SessionDecidingStep;
|
|
519
554
|
retryAfter?: string;
|
|
520
555
|
}
|
|
521
556
|
type StepSnapshot = PhoneOtpSnapshot | EmailOtpSnapshot | ContactChoiceSnapshot | IdentitySummarySnapshot | MethodSnapshot | ChoiceSnapshot | EidSnapshot | RegistrySnapshot | DocumentSnapshot | LivenessSnapshot | PortraitSnapshot | MobileRequiredSnapshot | ProcessingSnapshot | UnsupportedSnapshot | ResultSnapshot;
|
|
@@ -679,7 +714,7 @@ interface DocumentCaptureHandle {
|
|
|
679
714
|
* handle belongs to a plan-runner step;
|
|
680
715
|
* - `error` — camera or model failure (`error` fired).
|
|
681
716
|
*/
|
|
682
|
-
type PortraitCaptureState = "idle" | "starting" | "gating" | "captured" | "uploading" | "checking" | "done" | "error";
|
|
717
|
+
type PortraitCaptureState = "idle" | "starting" | "gating" | "captured" | "uploading" | "checking" | "done" | "error" | "mode_switch";
|
|
683
718
|
/** One gate evaluation: per-criterion state, the one coaching message, readiness. */
|
|
684
719
|
type PortraitGateUpdate = IcaoGateUpdate;
|
|
685
720
|
interface CapturedPortrait {
|
|
@@ -695,6 +730,8 @@ interface CapturedPortrait {
|
|
|
695
730
|
gate: IcaoGateSummary;
|
|
696
731
|
/** `capture.tuningVersion` the gate ran with, when the server sent one. */
|
|
697
732
|
tuningVersion?: string;
|
|
733
|
+
/** The camera the photo was taken with (as the live track reports it, else as requested). */
|
|
734
|
+
facingMode: CameraFacing;
|
|
698
735
|
}
|
|
699
736
|
interface PortraitCaptureEvents {
|
|
700
737
|
state: PortraitCaptureState;
|
|
@@ -709,9 +746,8 @@ interface PortraitCaptureOptions {
|
|
|
709
746
|
*/
|
|
710
747
|
video: HTMLVideoElement;
|
|
711
748
|
/**
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
* {@link createPortraitCapture}) always opens the front camera and ignores it.
|
|
749
|
+
* Ignored: the capture mode sets the camera. A `self` capture (every standalone {@link createPortraitCapture}) opens
|
|
750
|
+
* the front camera and an `assisted` capture the back camera; the other camera is ignored with a console warning.
|
|
715
751
|
*/
|
|
716
752
|
facing?: CameraFacing;
|
|
717
753
|
/** `HostedSessionView.capture.icao`; missing fields use the bundled fallbacks. */
|
|
@@ -739,20 +775,35 @@ interface PortraitCaptureHandle {
|
|
|
739
775
|
readonly captureMode: CaptureMode;
|
|
740
776
|
/** The camera of the live stream (as its track reports it, else as requested); `'user'` before the first start. */
|
|
741
777
|
readonly facingMode: CameraFacing;
|
|
742
|
-
/** Open the camera, load the model and start the gate.
|
|
778
|
+
/** Open the capture mode's camera, load the model and start the gate. */
|
|
743
779
|
start(options?: PortraitStartOptions): Promise<void>;
|
|
744
780
|
/** Take the photo again (gate only — the camera stays open), or restart after an error. */
|
|
745
781
|
retry(): void;
|
|
746
782
|
/**
|
|
747
|
-
*
|
|
748
|
-
*
|
|
783
|
+
* Does nothing and returns `false` (with a console warning): the capture mode sets the camera, the front one in
|
|
784
|
+
* `self` and the back one in `assisted`. Under `choice` the person switches the mode
|
|
785
|
+
* ({@link PortraitCaptureHandle.setCaptureMode}).
|
|
749
786
|
*/
|
|
750
787
|
switchCamera(): boolean;
|
|
788
|
+
/**
|
|
789
|
+
* Spec 2026-11-06 §3.3, a portrait step whose capture mode is `choice`: whether the person can switch between `self`
|
|
790
|
+
* and `assisted` on the camera view (a device with a front/back choice). `false` otherwise and on a standalone
|
|
791
|
+
* capture. Never rejects.
|
|
792
|
+
*/
|
|
793
|
+
canSwitchCaptureMode(): Promise<boolean>;
|
|
794
|
+
/**
|
|
795
|
+
* Spec 2026-11-06 §3.3: switch the capture mode under `choice` ({@link PortraitCaptureHandle.canSwitchCaptureMode}).
|
|
796
|
+
* The pick is recorded for the session (`Verification.chooseCaptureMode`), and the camera reopens in the new mode
|
|
797
|
+
* (`self`: the front one, `assisted`: the back one) with the gate from zero, through the `mode_switch` state.
|
|
798
|
+
* Before the first start it only records the pick. Resolves `false` and changes nothing when the switch is not
|
|
799
|
+
* offered, the mode is already in force, or the photo was taken.
|
|
800
|
+
*/
|
|
801
|
+
setCaptureMode(mode: ResolvedCaptureMode): Promise<boolean>;
|
|
751
802
|
destroy(): void;
|
|
752
803
|
}
|
|
753
804
|
/** Options of {@link PortraitCaptureHandle.start}. */
|
|
754
805
|
interface PortraitStartOptions {
|
|
755
|
-
/**
|
|
806
|
+
/** Ignored: the capture mode sets the camera (`self` the front one, `assisted` the back one), with a console warning. */
|
|
756
807
|
facing?: CameraFacing;
|
|
757
808
|
}
|
|
758
809
|
|
|
@@ -760,8 +811,10 @@ interface PortraitStartOptions {
|
|
|
760
811
|
* Gate guidance code. `'hold'` is emitted while the clip records. `'upright'`:
|
|
761
812
|
* the phone is held sideways (a landscape camera frame on a phone); the gate
|
|
762
813
|
* waits, and a clip being recorded is dropped, until it is upright again.
|
|
814
|
+
* `'one_face'`: the camera sees a second person of meaningful size; the gate
|
|
815
|
+
* waits until only one face is in the frame.
|
|
763
816
|
*/
|
|
764
|
-
type GateHint = "center" | "closer" | "farther" | "light" | "still" | "hold" | "upright";
|
|
817
|
+
type GateHint = "center" | "closer" | "farther" | "light" | "still" | "hold" | "upright" | "one_face";
|
|
765
818
|
/**
|
|
766
819
|
* Capture + verification state, as seen by the partner:
|
|
767
820
|
* - `idle → starting → gating → recording → captured` is the engine's run;
|
|
@@ -769,7 +822,7 @@ type GateHint = "center" | "closer" | "farther" | "light" | "still" | "hold" | "
|
|
|
769
822
|
* {@link Verification.liveness} (the SDK uploads and submits after `captured`);
|
|
770
823
|
* - `error` on a camera / engine failure (see {@link CaptureError}).
|
|
771
824
|
*/
|
|
772
|
-
type CaptureState = "idle" | "starting" | "gating" | "recording" | "captured" | "uploading" | "checking" | "done" | "error";
|
|
825
|
+
type CaptureState = "idle" | "starting" | "gating" | "recording" | "captured" | "uploading" | "checking" | "done" | "error" | "mode_switch";
|
|
773
826
|
/** Declared capture channel — the liveness band is mobile-calibrated. */
|
|
774
827
|
type CaptureChannel = "mobile" | "desktop";
|
|
775
828
|
/** Gate ring update: integrator progress 0..1 and the current guidance code. */
|
|
@@ -800,8 +853,16 @@ interface CapturedArtifacts {
|
|
|
800
853
|
width: number;
|
|
801
854
|
/** Intrinsic video height at capture time. */
|
|
802
855
|
height: number;
|
|
803
|
-
/**
|
|
856
|
+
/** The clip's duration (ms) read from its container; recording start → stop when the container was not read. */
|
|
804
857
|
clipMs?: number;
|
|
858
|
+
/** Video frames in the clip (read from its container). */
|
|
859
|
+
clipFrames?: number;
|
|
860
|
+
/** The clip's frame rate: frames over its duration. */
|
|
861
|
+
fps?: number;
|
|
862
|
+
/** Silent re-recordings (0 or 1): the first take was short, unreadable or errored. */
|
|
863
|
+
clipRetakes?: number;
|
|
864
|
+
/** The clip's codec (`avc1.42E01E`, `h264`, `vp8`, …), from the recorder's type. */
|
|
865
|
+
codec?: string;
|
|
805
866
|
/** `'mobile'` on phones/tablets (the calibrated channel), else `'desktop'`. */
|
|
806
867
|
captureChannel: CaptureChannel;
|
|
807
868
|
/** Set when the browser has no MediaRecorder: a keyframe-only capture. */
|
|
@@ -917,15 +978,15 @@ interface LivenessCaptureEvents {
|
|
|
917
978
|
animations: "full" | "reduced";
|
|
918
979
|
};
|
|
919
980
|
/**
|
|
920
|
-
*
|
|
921
|
-
* (`null`). Fires while the clip records, at the
|
|
922
|
-
*
|
|
981
|
+
* Ramp v2: paint a full-screen layer this colour (`screenRampColourValue(colour)`), black (`"dark"`, the dark-gap
|
|
982
|
+
* arm; `screenRampColourValue("dark")`) or clear it (`null`). Fires while the clip records, at the times the
|
|
983
|
+
* session's challenge issued. Subscribing is the acknowledgement: the engine runs the ramp only when a listener is bound when the
|
|
923
984
|
* recording starts, and the stamps it reports describe exactly these calls. `@sekyro/react` paints it; a host on
|
|
924
985
|
* `@sekyro/web` alone paints it itself (a `position: fixed; inset: 0` element behind its chrome) or leaves the
|
|
925
986
|
* event unbound. Never fires in an assisted capture or a keyframe-only capture.
|
|
926
987
|
*/
|
|
927
988
|
ramp: {
|
|
928
|
-
colour:
|
|
989
|
+
colour: ScreenRampPaint;
|
|
929
990
|
};
|
|
930
991
|
}
|
|
931
992
|
/** Which camera to open: the selfie camera (`'user'`) or the rear one (`'environment'`). */
|
|
@@ -933,10 +994,8 @@ type CameraFacing = "user" | "environment";
|
|
|
933
994
|
/** Options of {@link LivenessCaptureHandle.start}. */
|
|
934
995
|
interface LivenessStartOptions {
|
|
935
996
|
/**
|
|
936
|
-
*
|
|
937
|
-
*
|
|
938
|
-
* `'environment'` on a device with a front/back choice and `'user'` without one). A `self` capture always opens the front camera and
|
|
939
|
-
* ignores `'environment'` (with a console warning).
|
|
997
|
+
* Ignored: the capture mode sets the camera. A `self` capture opens the front camera and an `assisted` capture the
|
|
998
|
+
* back camera; the other camera is ignored with a console warning.
|
|
940
999
|
*/
|
|
941
1000
|
facing?: CameraFacing;
|
|
942
1001
|
}
|
|
@@ -949,8 +1008,8 @@ interface LivenessCaptureHandle {
|
|
|
949
1008
|
* session (`HostedSessionView.capture.mode`, set in the flow; `self` until
|
|
950
1009
|
* the view is known; under `choice` the person's pick, `self` until
|
|
951
1010
|
* {@link Verification.chooseCaptureMode}); a standalone {@link createLivenessCapture} is always
|
|
952
|
-
* `self`.
|
|
953
|
-
* does nothing
|
|
1011
|
+
* `self`. The mode sets the camera: `self` the front one, `assisted` the back one
|
|
1012
|
+
* ({@link LivenessCaptureHandle.switchCamera} does nothing). Never `choice`.
|
|
954
1013
|
*/
|
|
955
1014
|
readonly captureMode: CaptureMode;
|
|
956
1015
|
/**
|
|
@@ -962,18 +1021,32 @@ interface LivenessCaptureHandle {
|
|
|
962
1021
|
/** Subscribe; returns the unsubscribe function. */
|
|
963
1022
|
on<K extends keyof LivenessCaptureEvents>(event: K, handler: (payload: LivenessCaptureEvents[K]) => void): () => void;
|
|
964
1023
|
/**
|
|
965
|
-
* Ask for the camera and start gating. Resolves once the attempt is running or failed.
|
|
966
|
-
* `options.facing` picks the camera for this attempt and later retries.
|
|
1024
|
+
* Ask for the capture mode's camera and start gating. Resolves once the attempt is running or failed.
|
|
967
1025
|
*/
|
|
968
1026
|
start(options?: LivenessStartOptions): Promise<void>;
|
|
969
1027
|
/** Fresh attempt: resets the engine and restarts the camera. */
|
|
970
1028
|
retry(): void;
|
|
971
1029
|
/**
|
|
972
|
-
*
|
|
973
|
-
* `
|
|
974
|
-
*
|
|
1030
|
+
* Does nothing and returns `false` (with a console warning): the capture mode sets the camera, the front one in
|
|
1031
|
+
* `self` and the back one in `assisted`. Under `choice` the person switches the mode
|
|
1032
|
+
* ({@link LivenessCaptureHandle.setCaptureMode}).
|
|
975
1033
|
*/
|
|
976
1034
|
switchCamera(): boolean;
|
|
1035
|
+
/**
|
|
1036
|
+
* Spec 2026-11-06 §3.3, a session whose capture mode is `choice`: whether the person can switch between `self`
|
|
1037
|
+
* and `assisted` on the camera view (a device with a front/back choice). `false` on a `self` or `assisted`
|
|
1038
|
+
* session, on a one-camera device (the person captures in `self`) and on a standalone capture. Never rejects.
|
|
1039
|
+
*/
|
|
1040
|
+
canSwitchCaptureMode(): Promise<boolean>;
|
|
1041
|
+
/**
|
|
1042
|
+
* Spec 2026-11-06 §3.3: switch the capture mode under `choice` ({@link LivenessCaptureHandle.canSwitchCaptureMode}).
|
|
1043
|
+
* The pick is recorded for the session (`Verification.chooseCaptureMode`, so `captureMode` follows it), and a
|
|
1044
|
+
* running take restarts in the new mode: a recording is discarded (never submitted, no attempt used), the state
|
|
1045
|
+
* passes through `mode_switch`, and the camera reopens (`self`: the front one, `assisted`: the back one). Before
|
|
1046
|
+
* the first start it only records the pick. Resolves `false` and changes nothing when the switch is not offered,
|
|
1047
|
+
* the mode is already in force, or a take is being submitted (`captured`, `uploading`, `checking`).
|
|
1048
|
+
*/
|
|
1049
|
+
setCaptureMode(mode: ResolvedCaptureMode): Promise<boolean>;
|
|
977
1050
|
/** Stop the camera, release the detector, drop all listeners. */
|
|
978
1051
|
destroy(): void;
|
|
979
1052
|
}
|
|
@@ -982,11 +1055,9 @@ interface LivenessCaptureOptions {
|
|
|
982
1055
|
/** Host-owned `<video playsInline muted>` element. */
|
|
983
1056
|
video: HTMLVideoElement;
|
|
984
1057
|
/**
|
|
985
|
-
*
|
|
986
|
-
*
|
|
987
|
-
*
|
|
988
|
-
* standalone capture, and sessions whose flow films the person themselves)
|
|
989
|
-
* always uses `'user'` and ignores `'environment'` with a console warning.
|
|
1058
|
+
* Ignored: the capture mode sets the camera. A `self` capture (every standalone capture, and sessions whose flow
|
|
1059
|
+
* films the person themselves) uses `'user'` and an `assisted` capture `'environment'`; the other camera is ignored
|
|
1060
|
+
* with a console warning.
|
|
990
1061
|
*/
|
|
991
1062
|
facing?: CameraFacing;
|
|
992
1063
|
/** Base URL of the detector assets (tasks-vision wasm + tflite); default `/models-v3`. */
|
|
@@ -1033,13 +1104,15 @@ type SdkFailureReason = "no_recorder" | "attestation" | "network" | "nni_unbound
|
|
|
1033
1104
|
/** Backend reason taxonomy ∪ the SDK-side failure reasons. */
|
|
1034
1105
|
type ReasonCode = CheckReason | SessionFailureReason | SdkFailureReason | AgeEstimationReason;
|
|
1035
1106
|
/**
|
|
1036
|
-
* - `
|
|
1037
|
-
*
|
|
1038
|
-
*
|
|
1039
|
-
* -
|
|
1040
|
-
*
|
|
1107
|
+
* - `verified` / `not_verified` / `review`: the session's end state (a `not_verified`
|
|
1108
|
+
* result says why in {@link VerificationResult.reason});
|
|
1109
|
+
* - `retry`: the capture was not conclusive and attempts remain (`autoRetry` on);
|
|
1110
|
+
* the capture re-arms by itself;
|
|
1111
|
+
* - `unavailable`: the check could not run (the service was unavailable, no
|
|
1112
|
+
* MediaRecorder, attestation failed, network or API failure, or a step only a
|
|
1113
|
+
* phone can capture). Treat as "not finished".
|
|
1041
1114
|
*/
|
|
1042
|
-
type VerificationStatus = "
|
|
1115
|
+
type VerificationStatus = "verified" | "not_verified" | "review" | "retry" | "unavailable";
|
|
1043
1116
|
/** The verdict for this session / capture (`on('result')`). */
|
|
1044
1117
|
interface VerificationResult {
|
|
1045
1118
|
/**
|
|
@@ -1048,10 +1121,20 @@ interface VerificationResult {
|
|
|
1048
1121
|
*/
|
|
1049
1122
|
sessionId: string;
|
|
1050
1123
|
status: VerificationStatus;
|
|
1051
|
-
/** Backend check or session-policy reason, or SDK-side reason for `unavailable`. */
|
|
1052
|
-
reason?: ReasonCode;
|
|
1053
1124
|
/**
|
|
1054
|
-
* `
|
|
1125
|
+
* `not_verified` only: why ({@link SessionReason}). On a capture refused while the session
|
|
1126
|
+
* is still open (`autoRetry` off, or no attempt left), the reason the step's result gives
|
|
1127
|
+
* (`rejected`, `inconclusive`, `unavailable`).
|
|
1128
|
+
*/
|
|
1129
|
+
reason?: SessionReason;
|
|
1130
|
+
/**
|
|
1131
|
+
* The detailed code: the backend check or session-policy reason (`spoof_detected`,
|
|
1132
|
+
* `match_inconclusive`, `device_cooldown`, ...), or the SDK-side reason of an
|
|
1133
|
+
* `unavailable` result.
|
|
1134
|
+
*/
|
|
1135
|
+
reasonCode?: ReasonCode;
|
|
1136
|
+
/**
|
|
1137
|
+
* `retry` (and a `not_verified` on a still-parked step): submissions left for
|
|
1055
1138
|
* the parked check after this one, for the host's coaching copy.
|
|
1056
1139
|
*/
|
|
1057
1140
|
attemptsRemaining?: number;
|
|
@@ -1062,14 +1145,14 @@ interface VerificationResult {
|
|
|
1062
1145
|
*/
|
|
1063
1146
|
retakeHint?: RetakeHint;
|
|
1064
1147
|
/**
|
|
1065
|
-
* ISO-8601 time from which this device may verify again
|
|
1066
|
-
* `
|
|
1148
|
+
* ISO-8601 time from which this device may verify again, set on a
|
|
1149
|
+
* `not_verified` result with reason code `device_cooldown` (profile v2 step 4).
|
|
1067
1150
|
*/
|
|
1068
1151
|
retryAfter?: string;
|
|
1069
1152
|
/**
|
|
1070
|
-
* What the session proved (`
|
|
1153
|
+
* What the session proved (`verified`, `not_verified`, `review`), when the API
|
|
1071
1154
|
* reports it: `1` a live person, `2` their identity, `3` corroborated, `0`
|
|
1072
|
-
*
|
|
1155
|
+
* not verified. A display hint: confirm on your server with the result token.
|
|
1073
1156
|
*/
|
|
1074
1157
|
level?: VerificationLevel;
|
|
1075
1158
|
/** How the level was proved, when the API reports it. */
|
|
@@ -1170,6 +1253,18 @@ interface Verification {
|
|
|
1170
1253
|
* records it under the same reason. Omit it when unknown.
|
|
1171
1254
|
*/
|
|
1172
1255
|
reportCameraUnavailable?(cause?: CameraUnavailableCause): Promise<void>;
|
|
1256
|
+
/**
|
|
1257
|
+
* Spec 2026-11-09 §3.3: "Run real checks as a tester", offered while `context.testerGate` is set (a simulated
|
|
1258
|
+
* Sandbox session before its first capture). Pass the artifacts of a liveness capture (`createLivenessCapture`,
|
|
1259
|
+
* capture-only): the SDK uploads the clip with its capture proof, attests like the liveness step and asks the server
|
|
1260
|
+
* whether the face is one of the organization's enrolled testers. `bound: true`: the session now runs real checks;
|
|
1261
|
+
* `bound: false`: it stays simulated (the face is not kept). The new view is applied either way (the step updates).
|
|
1262
|
+
* Rejects with the typed `HostedApiError` (`409 gate_attempts_exhausted`, `409 tester_gate_closed`,
|
|
1263
|
+
* `429 tester_limit_reached`, ...). Optional so custom `Verification` implementations stay valid.
|
|
1264
|
+
*/
|
|
1265
|
+
testerGate?(artifacts: CapturedArtifacts): Promise<{
|
|
1266
|
+
bound: boolean;
|
|
1267
|
+
}>;
|
|
1173
1268
|
/**
|
|
1174
1269
|
* 2026-11-04: record a capture failure the page showed on the session (`POST /hosted/capture-issue`), for
|
|
1175
1270
|
* diagnosis. Fire-and-forget: never throws, never changes the session, never bills, never counts as an attempt.
|
|
@@ -1178,10 +1273,12 @@ interface Verification {
|
|
|
1178
1273
|
*/
|
|
1179
1274
|
reportCaptureIssue?(issue: CaptureIssueReport): void;
|
|
1180
1275
|
/**
|
|
1181
|
-
* The session's
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1184
|
-
*
|
|
1276
|
+
* The session's current camera step (liveness, a selfie face match, a
|
|
1277
|
+
* camera document or portrait photo; spec 2026-11-06 §3.1, every decision
|
|
1278
|
+
* mode), or its pending liveness step, must be captured on a phone
|
|
1279
|
+
* (`HostedStepView.requiresMobile`) and this browser is not one: show
|
|
1280
|
+
* "continue on your phone" instead of starting the camera. A `choice` photo
|
|
1281
|
+
* step is not: its upload stays on the desktop. Bootstraps the hosted view when needed; `false` when
|
|
1185
1282
|
* the bootstrap fails or the verification was destroyed. Never rejects.
|
|
1186
1283
|
* Optional so custom / older `Verification` implementations stay valid —
|
|
1187
1284
|
* treat an absent member as "no phone requirement".
|
|
@@ -1190,9 +1287,10 @@ interface Verification {
|
|
|
1190
1287
|
/**
|
|
1191
1288
|
* Who films the face in this session (`HostedSessionView.capture.mode`, a
|
|
1192
1289
|
* flow setting): `self` (the person, front camera), `assisted` (an agent,
|
|
1193
|
-
* back camera) or `choice` (the
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
1290
|
+
* back camera) or `choice` (the camera opens in `self` and the person
|
|
1291
|
+
* switches on the camera view: {@link LivenessCaptureHandle.setCaptureMode}).
|
|
1292
|
+
* Once picked (on this page, or the session's latest pick `capture.pick`),
|
|
1293
|
+
* resolves to the pick. Bootstraps the hosted
|
|
1196
1294
|
* view when needed; `self` when the bootstrap fails or the verification was
|
|
1197
1295
|
* destroyed. Never rejects.
|
|
1198
1296
|
* Optional so custom / older `Verification` implementations stay valid:
|
|
@@ -1207,7 +1305,10 @@ interface Verification {
|
|
|
1207
1305
|
* Optional so custom / older `Verification` implementations stay valid.
|
|
1208
1306
|
*/
|
|
1209
1307
|
chooseCaptureMode?(mode: ResolvedCaptureMode): void;
|
|
1210
|
-
/**
|
|
1308
|
+
/**
|
|
1309
|
+
* Under `choice`: the pick made with {@link Verification.chooseCaptureMode}, else the session's latest
|
|
1310
|
+
* (`HostedSessionView.capture.pick`, once the view is known); `null` before either.
|
|
1311
|
+
*/
|
|
1211
1312
|
readonly captureChoice?: ResolvedCaptureMode | null;
|
|
1212
1313
|
/**
|
|
1213
1314
|
* The session is a returning-user session (`HostedSessionView.returning`,
|
|
@@ -1362,6 +1463,11 @@ interface RegistryStepHandle extends RegistrySnapshot {
|
|
|
1362
1463
|
interface DocumentStepHandle extends DocumentSnapshot {
|
|
1363
1464
|
/** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
|
|
1364
1465
|
chooseOption?(option: string): Promise<void>;
|
|
1466
|
+
/**
|
|
1467
|
+
* Spec 2026-11-06 §3.1, present only with `photo.cameraOnPhone` (a `choice` step on a desktop): re-read the session,
|
|
1468
|
+
* so the page follows the person who continued on their phone (the hand-over polls it).
|
|
1469
|
+
*/
|
|
1470
|
+
refresh?(): Promise<void>;
|
|
1365
1471
|
/** The picked issuer (`null` until picked; a verso keeps the recto's pick). */
|
|
1366
1472
|
issuer: string | null;
|
|
1367
1473
|
/** The picked type (`null` until picked). */
|
|
@@ -1429,6 +1535,11 @@ interface LivePhotoGateUpdate {
|
|
|
1429
1535
|
interface PortraitStepHandle extends PortraitSnapshot {
|
|
1430
1536
|
/** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
|
|
1431
1537
|
chooseOption?(option: string): Promise<void>;
|
|
1538
|
+
/**
|
|
1539
|
+
* Spec 2026-11-06 §3.1, present only with `photo.cameraOnPhone` (a `choice` step on a desktop): re-read the session,
|
|
1540
|
+
* so the page follows the person who continued on their phone (the hand-over polls it).
|
|
1541
|
+
*/
|
|
1542
|
+
refresh?(): Promise<void>;
|
|
1432
1543
|
/**
|
|
1433
1544
|
* The last submission failed on the network (nothing was decided): in the
|
|
1434
1545
|
* `capture` phase offer a new take (`retry()` on the capture handle), in the
|
|
@@ -1514,6 +1625,8 @@ interface CaptureEngine {
|
|
|
1514
1625
|
}): Promise<void>;
|
|
1515
1626
|
retry(): void;
|
|
1516
1627
|
switchCamera(): void;
|
|
1628
|
+
/** Drop the running attempt (discarding a recording) and start again on `facingMode`. */
|
|
1629
|
+
restart(facingMode: "user" | "environment"): void;
|
|
1517
1630
|
destroy(): void;
|
|
1518
1631
|
/** Device-profile chrome hint (LOW class → `'reduced'`); absent on doubles. */
|
|
1519
1632
|
readonly animations?: "full" | "reduced";
|
|
@@ -1536,8 +1649,17 @@ interface LivenessCaptureInternals {
|
|
|
1536
1649
|
declare function mapGuidanceHint(key: string): GateHint | null;
|
|
1537
1650
|
/** Engine state → public state (`preflight|acquiring → starting`, `positioning → gating`). */
|
|
1538
1651
|
declare function mapEngineState(state: CaptureState$1): CaptureState;
|
|
1539
|
-
/** Engine error kinds → the public six (`models|cliptoolarge|recorder|overconstrained → generic`). */
|
|
1652
|
+
/** Engine error kinds → the public six (`models|cliptoolarge|recorder|overconstrained → generic`, `backcamera → notfound`). */
|
|
1540
1653
|
declare function mapErrorKind(kind: CaptureErrorKind$1): CaptureErrorKind;
|
|
1654
|
+
/**
|
|
1655
|
+
* Spec 2026-11-06 §3.3: the capture mode switch of a capture bound to a session. `session` is the session's own mode
|
|
1656
|
+
* (the switch exists under `choice` only); `onModeChange` records the person's pick (`Verification.chooseCaptureMode`)
|
|
1657
|
+
* so the `captureMode` getter of the handle follows it.
|
|
1658
|
+
*/
|
|
1659
|
+
interface CaptureModeSwitch {
|
|
1660
|
+
session(): CaptureMode;
|
|
1661
|
+
onModeChange(mode: ResolvedCaptureMode): void;
|
|
1662
|
+
}
|
|
1541
1663
|
/** Handle + the hooks the verification layer uses to drive the flow states. */
|
|
1542
1664
|
interface LivenessCaptureInternalHandle {
|
|
1543
1665
|
handle: LivenessCaptureHandle;
|
|
@@ -1558,7 +1680,9 @@ captureMode?: () => ResolvedCaptureMode,
|
|
|
1558
1680
|
* starts. The engine gets it only for a `self` capture with a `ramp` listener bound (the host paints); absent (a
|
|
1559
1681
|
* capture bound to no session, older backends) → no ramp.
|
|
1560
1682
|
*/
|
|
1561
|
-
screenRamp?: () => ScreenRampChallenge | undefined
|
|
1683
|
+
screenRamp?: () => ScreenRampChallenge | undefined,
|
|
1684
|
+
/** Spec 2026-11-06 §3.3: the mode switch under `choice`; absent (a capture bound to no session) → none. */
|
|
1685
|
+
modeSwitch?: CaptureModeSwitch): LivenessCaptureInternalHandle;
|
|
1562
1686
|
/**
|
|
1563
1687
|
* Create a standalone liveness capture (no upload — pair it with your own
|
|
1564
1688
|
* submission, or use {@link Verification.liveness} for the full flow).
|
|
@@ -1921,19 +2045,7 @@ interface DocCameraTuning {
|
|
|
1921
2045
|
declare const DOC_CAMERA_TUNING_DEFAULTS: Readonly<DocCameraTuning>;
|
|
1922
2046
|
/** Field-by-field merge of a server `capture.document.camera` block over the defaults (bad fields ignored). */
|
|
1923
2047
|
declare function resolveDocCameraTuning(raw: unknown): DocCameraTuning;
|
|
1924
|
-
|
|
1925
|
-
/** What a camera label says about its lens (labels are English on Android Chrome / iOS Safari). */
|
|
1926
|
-
declare function lensKindOf(label: string): LensKind;
|
|
1927
|
-
/**
|
|
1928
|
-
* Back cameras best-first: main wide lenses (lowest Android index first), then
|
|
1929
|
-
* iOS virtual multi-lens devices; ultra-wide, telephoto, depth and front lenses
|
|
1930
|
-
* are dropped. Empty when nothing is identifiable (keep the browser's pick).
|
|
1931
|
-
*/
|
|
1932
|
-
declare function rankBackCameras(devices: ReadonlyArray<{
|
|
1933
|
-
deviceId: string;
|
|
1934
|
-
label: string;
|
|
1935
|
-
kind?: string;
|
|
1936
|
-
}>): string[];
|
|
2048
|
+
|
|
1937
2049
|
declare const LENS_STORAGE_KEY = "sekyro.doc.camera";
|
|
1938
2050
|
/** The remembered document camera (per browser), or null (storage blocked / empty). */
|
|
1939
2051
|
declare function readStoredLens(): string | null;
|
|
@@ -2003,8 +2115,7 @@ interface OpenDocCameraDeps {
|
|
|
2003
2115
|
type LensSource = "stored" | "selected" | "default";
|
|
2004
2116
|
/** Focus is fine when the camera offers continuous AF, or reports no focus modes at all (Safari / Firefox). */
|
|
2005
2117
|
declare function focusOk(stream: MediaStream): boolean;
|
|
2006
|
-
|
|
2007
|
-
declare const LENS_TRY_MAX = 3;
|
|
2118
|
+
|
|
2008
2119
|
/**
|
|
2009
2120
|
* Open the back camera: the remembered lens first, else `facingMode:
|
|
2010
2121
|
* environment` (the permission prompt; labels appear after it), then the
|
|
@@ -3055,6 +3166,12 @@ interface PortraitCaptureInternals {
|
|
|
3055
3166
|
/** The background-uniformity check's selfie segmenter (default: MediaPipe, lazy). */
|
|
3056
3167
|
createSegmenter?: (assetBaseUrl: string) => Promise<SegmenterLike>;
|
|
3057
3168
|
getUserMedia?: (constraints: MediaStreamConstraints) => Promise<MediaStream>;
|
|
3169
|
+
/** (navigator.mediaDevices.enumerateDevices, only without a `getUserMedia` double) — the back lenses by id. */
|
|
3170
|
+
enumerateDevices?: () => Promise<ReadonlyArray<{
|
|
3171
|
+
deviceId: string;
|
|
3172
|
+
label: string;
|
|
3173
|
+
kind?: string;
|
|
3174
|
+
}>>;
|
|
3058
3175
|
/** Draw the video scaled to `longEdge` (analysis) or at full size (`null`). */
|
|
3059
3176
|
grabFrame?: (video: HTMLVideoElement, longEdge: number | null) => GrabbedFrame | null;
|
|
3060
3177
|
/** Cut `region` out of a full-size frame, scale to `outHeight`, encode JPEG. */
|
|
@@ -3080,14 +3197,16 @@ declare function createPortraitCaptureInternal(options: PortraitCaptureOptions,
|
|
|
3080
3197
|
* Who films the face (spec 2026-10-28 §4.3): the portrait step reads the session's `capture.mode` at every start
|
|
3081
3198
|
* and switch, as the liveness capture does. Absent (a standalone capture) → `self`: the front camera only.
|
|
3082
3199
|
*/
|
|
3083
|
-
captureMode?: () => ResolvedCaptureMode
|
|
3200
|
+
captureMode?: () => ResolvedCaptureMode,
|
|
3201
|
+
/** Spec 2026-11-06 §3.3: the capture mode switch of a `choice` step; absent (a standalone capture) → none. */
|
|
3202
|
+
modeSwitch?: CaptureModeSwitch): PortraitCaptureController;
|
|
3084
3203
|
|
|
3085
3204
|
/**
|
|
3086
3205
|
* The client surface the flow needs — `HostedClient` or a test fake. D8: the
|
|
3087
3206
|
* live-camera capture proof methods are optional (a fake / an older bridge
|
|
3088
3207
|
* without them presigns without a proof).
|
|
3089
3208
|
*/
|
|
3090
|
-
type HostedClientLike = Pick<HostedClient, "getSession" | "recordConsent" | "choose" | "presign" | "uploadToSpaces" | "completeMedia" | "submitCheck"> & Partial<Pick<HostedClient, "presignCapture" | "armCapture">> & Partial<Pick<HostedClient, "confirmIdentity" | "identityPortrait">> & Partial<Pick<HostedClient, "reportCameraUnavailable">> & Partial<Pick<HostedClient, "reportCaptureIssue">>;
|
|
3209
|
+
type HostedClientLike = Pick<HostedClient, "getSession" | "recordConsent" | "choose" | "presign" | "uploadToSpaces" | "completeMedia" | "submitCheck"> & Partial<Pick<HostedClient, "presignCapture" | "armCapture">> & Partial<Pick<HostedClient, "confirmIdentity" | "identityPortrait">> & Partial<Pick<HostedClient, "reportCameraUnavailable">> & Partial<Pick<HostedClient, "reportCaptureIssue">> & Partial<Pick<HostedClient, "testerGate">>;
|
|
3091
3210
|
/** The presign policy allowlist for `kind: 'clip'` (media.policy.ts mirror). */
|
|
3092
3211
|
declare const CLIP_MIME_ALLOWLIST: readonly string[];
|
|
3093
3212
|
/** Same-key transport replays AFTER the first try, and the pause between them. */
|
|
@@ -3143,7 +3262,7 @@ declare function runSubmission(rt: SubmitRuntime, executor: SubmitExecutor, hook
|
|
|
3143
3262
|
}): Promise<HostedSessionView>;
|
|
3144
3263
|
interface LivenessFlowDeps extends SubmitRuntime {
|
|
3145
3264
|
artifacts: CapturedArtifacts;
|
|
3146
|
-
/** Fresh attestation per call (Turnstile execute
|
|
3265
|
+
/** Fresh attestation per call (Turnstile execute; `{}` when the view has no site key). */
|
|
3147
3266
|
getAttestation(): Promise<AttestationInput>;
|
|
3148
3267
|
/** Latest hosted view (frontier decisions). */
|
|
3149
3268
|
getView(): HostedSessionView;
|
|
@@ -3310,4 +3429,4 @@ declare function createVerification(options: VerificationOptions): Verification;
|
|
|
3310
3429
|
/** {@link createVerification} with construction seams (tests / Sekyro AI-internal hosts). */
|
|
3311
3430
|
declare function createVerificationInternal(options: VerificationOptions, internals: VerificationInternals): Verification;
|
|
3312
3431
|
|
|
3313
|
-
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,
|
|
3432
|
+
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 };
|