@sekyro/web 0.1.0-rc.8 → 0.1.0-rc.9

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +54 -61
  3. package/dist/{capture-session-doc-YBE3UMJJ.js → capture-session-doc-QQHDBZG4.js} +1 -1
  4. package/dist/{chunk-YPG7CB4O.js → chunk-4Q7EMVP7.js} +1 -1
  5. package/dist/{chunk-RNRFHUJA.js → chunk-56GT33O3.js} +1 -1
  6. package/dist/{chunk-DQWW4OCK.js → chunk-EVVGQSNJ.js} +1 -1
  7. package/dist/chunk-F5ST423J.js +1 -0
  8. package/dist/chunk-GBTZIKGZ.js +1 -0
  9. package/dist/chunk-H6HC7B77.js +1 -0
  10. package/dist/{chunk-LQ7C44JG.js → chunk-LUHNRNTO.js} +1 -1
  11. package/dist/{chunk-RVHAKRAI.js → chunk-WRKUWIJW.js} +1 -1
  12. package/dist/chunk-ZUHTYCY4.js +1 -0
  13. package/dist/client/index.cjs +1 -1
  14. package/dist/client/index.d.cts +26 -4
  15. package/dist/client/index.d.ts +26 -4
  16. package/dist/client/index.js +1 -1
  17. package/dist/core/index.cjs +1 -1
  18. package/dist/core/index.js +1 -1
  19. package/dist/create-document-capture-DWRNFXA2.js +1 -0
  20. package/dist/{create-verification-DoFpgzok.d.cts → create-verification-BS2qbe75.d.cts} +101 -16
  21. package/dist/{create-verification-C0AVIcVW.d.ts → create-verification-CCR-CwVQ.d.ts} +101 -16
  22. package/dist/{icao-gate-D8qm1O2t.d.cts → icao-gate-DKbWXP51.d.cts} +104 -39
  23. package/dist/{icao-gate-D8qm1O2t.d.ts → icao-gate-DKbWXP51.d.ts} +104 -39
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.d.cts +4 -4
  26. package/dist/index.d.ts +4 -4
  27. package/dist/index.js +1 -1
  28. package/dist/internal/index.cjs +1 -1
  29. package/dist/internal/index.d.cts +11 -20
  30. package/dist/internal/index.d.ts +11 -20
  31. package/dist/internal/index.js +1 -1
  32. package/dist/{plan-runner-UBK4B4CG.js → plan-runner-X4YW3INX.js} +1 -1
  33. package/package.json +1 -1
  34. package/sbom.cdx.json +7 -7
  35. package/dist/chunk-4RS2YIL4.js +0 -1
  36. package/dist/chunk-MY6EXEL2.js +0 -1
  37. package/dist/chunk-XLN5OT25.js +0 -1
  38. package/dist/chunk-YDQBVWXG.js +0 -1
  39. package/dist/create-document-capture-T4APHJMY.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { b as Detector } from './detect-worker-DclNxkZT.js';
2
2
  import { i as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1, p as DeviceClass, b as CaptureArtifacts, H as V3GateQuality, N as V3TelemetryEvent } from './capture-session-v3-CQK-G-qX.js';
3
- import { A as AcceptedDocumentType, a5 as StepSection, i as HostedBranding, c as ContactChannel, C as CheckReason, P as IdentityMethod, E as EidAfterPass, Q as IdentitySummarySource, p as HostedIcaoPolicy, V as NationalEidOption, N as IcaoReportEntry, I as IcaoCaptureTuning, w as HostedSessionView, x as HostedStepView, L as IcaoGateSummary, M as IcaoGateUpdate, a2 as SessionFailureReason, U as MethodChoiceView, z as HostedVoiceView, ao as Point, aK as PersonMask, a8 as Box, ag as IcaoFrameObservation, aL as HostedClient, aM as AttestationInput, a6 as SessionView, b as CheckType, a0 as PortraitIcaoInput, ah as IcaoGate } from './icao-gate-D8qm1O2t.js';
3
+ import { A as AcceptedDocumentType, Y as NationalEidOption, ae as StepSection, i as HostedBranding, a5 as PlanSectionView, a2 as PlanChoiceKind, c as ContactChannel, C as CheckReason, S as IdentityMethod, E as EidAfterPass, T as IdentitySummarySource, r as HostedIcaoPolicy, Q as IcaoReportEntry, J as IcaoCaptureTuning, z as HostedSessionView, B as HostedStepView, a6 as PlanStepView, O as IcaoGateSummary, P as IcaoGateUpdate, ab as SessionFailureReason, X as MethodChoiceView, I as HostedVoiceView, aw as Point, aS as PersonMask, ag as Box, ao as IcaoFrameObservation, aT as HostedClient, aU as AttestationInput, b as CheckType, a9 as PortraitIcaoInput, ap as IcaoGate } from './icao-gate-DKbWXP51.js';
4
4
 
5
5
  declare const ISSUER_CODES: readonly string[];
6
6
 
@@ -28,6 +28,23 @@ declare const WEB_IDENTITY_METHODS: readonly IdentityMethod[];
28
28
  declare const PLATFORM_UNSUPPORTED = "platform_unsupported";
29
29
  /** A step's section: the view's value (kept even when unknown), else the check type's. */
30
30
  declare function sectionOf(step: Pick<HostedStepView, "checkType" | "section">): StepSection | null;
31
+ declare function sectionOf(step: Pick<PlanStepView, "checkType" | "section">): StepSection | null;
32
+ /**
33
+ * The in-lane switch of a step screen (C4 client rule §5 item 6): the session's choice is still open (present,
34
+ * unlocked) while a step of one of its lanes is current. `options` are the choice's options this SDK renders, in
35
+ * the server's order; `current` is the lane taken. With exactly one other option a screen offers a direct switch
36
+ * labelled by it; with two or more, « Use another option » re-opens the choice locally.
37
+ */
38
+ interface InLaneSwitch {
39
+ nodeId: string;
40
+ kind: PlanChoiceKind;
41
+ current: string | null;
42
+ options: ChoiceOptionSnapshot[];
43
+ }
44
+ /** The open choice of the view as an in-lane switch, `null` without one (locked, absent, or the choice itself current). */
45
+ declare function laneOf(view: HostedSessionView): InLaneSwitch | null;
46
+ /** The other options of an in-lane switch. */
47
+ declare function otherOptions(lane: InLaneSwitch | null | undefined): ChoiceOptionSnapshot[];
31
48
  type DocumentSide = "recto" | "verso" | "single";
32
49
  interface DeriveStepEnv {
33
50
  /** A phone / tablet browser; `false` routes a `requiresMobile` biometric step to `mobile_required`. */
@@ -41,10 +58,14 @@ interface StepContext {
41
58
  expiresAt: string;
42
59
  branding?: HostedBranding;
43
60
  /**
44
- * The sections of this session in flow order (flow model 2026-10-23), one
45
- * progress segment each; a section with no steps is left out.
61
+ * The sections of this session in flow order (`plan.sections`), one
62
+ * progress segment each: the sections still possible on any remaining path.
46
63
  */
47
64
  sections: StepSection[];
65
+ /** `plan.sections` with their states (`done | current | upcoming`): draw the progress from these. */
66
+ progress: PlanSectionView[];
67
+ /** The step's in-lane switch (C4 client rule §5 item 6); absent without an open choice. */
68
+ switchable?: InLaneSwitch;
48
69
  }
49
70
  interface StepAttempts {
50
71
  reason?: CheckReason;
@@ -113,6 +134,34 @@ interface EmailOtpSnapshot extends StepAttempts {
113
134
  * Step 1 contact choice (flow model 2026-10-23): a `one_of` session before the
114
135
  * person chose phone or email.
115
136
  */
137
+ /** One option of a choice screen (server order; only services this SDK renders). */
138
+ interface ChoiceOptionSnapshot {
139
+ /** The option id {@link ChoiceStepHandle.choose} sends. */
140
+ id: string;
141
+ /** The lane's service: label it (`document`, `population_registry`, `national_eid`, `phone_otp`, `email_otp`). */
142
+ service: string;
143
+ /** `national_eid`: the provider ("Verify with Houwiyeti"); absent = the generic eID copy. */
144
+ nationalEid?: NationalEidOption;
145
+ }
146
+ /** `plan.choice` as a choice screen shows it. */
147
+ interface PlanChoiceSnapshot {
148
+ nodeId: string;
149
+ /** `identity_method` (method.* copy), `contact` (contact.* copy) or `generic` (choice.* copy). */
150
+ kind: PlanChoiceKind;
151
+ selected: string | null;
152
+ options: ChoiceOptionSnapshot[];
153
+ }
154
+ /**
155
+ * A choice screen of another kind (Sekyro flows `generic`): the person picks
156
+ * one option; its `kind` decides the copy (`choice.*`).
157
+ */
158
+ interface ChoiceSnapshot {
159
+ section: StepSection | null;
160
+ kind: "choice";
161
+ key: string;
162
+ context: StepContext;
163
+ choice: PlanChoiceSnapshot;
164
+ }
116
165
  interface ContactChoiceSnapshot {
117
166
  /**
118
167
  * Flow model 2026-10-23: the section of the flow (`contact`, `identity`,
@@ -126,6 +175,8 @@ interface ContactChoiceSnapshot {
126
175
  options: ContactChannel[];
127
176
  selected: ContactChannel | null;
128
177
  locked: boolean;
178
+ /** The choice behind this screen (`plan.choice`, kind `contact`). */
179
+ choice: PlanChoiceSnapshot;
129
180
  }
130
181
  /**
131
182
  * Step 2b summary and confirm (flow model 2026-10-23): the identity data read so
@@ -173,6 +224,8 @@ interface MethodSnapshot {
173
224
  options: IdentityMethod[];
174
225
  /** The provider behind `national_eid` ("Verify with Houwiyeti"); absent when it is not offered. */
175
226
  nationalEid?: NationalEidOption;
227
+ /** The choice behind this screen (`plan.choice`, kind `identity_method`). */
228
+ choice: PlanChoiceSnapshot;
176
229
  }
177
230
  /**
178
231
  * The national eID sign-in (SDK spec §3.2; Houwiyeti in MR). Two phases:
@@ -364,15 +417,15 @@ interface ResultSnapshot {
364
417
  failureReason?: string;
365
418
  retryAfter?: string;
366
419
  }
367
- type StepSnapshot = PhoneOtpSnapshot | EmailOtpSnapshot | ContactChoiceSnapshot | IdentitySummarySnapshot | MethodSnapshot | EidSnapshot | RegistrySnapshot | DocumentSnapshot | LivenessSnapshot | PortraitSnapshot | MobileRequiredSnapshot | ProcessingSnapshot | UnsupportedSnapshot | ResultSnapshot;
420
+ type StepSnapshot = PhoneOtpSnapshot | EmailOtpSnapshot | ContactChoiceSnapshot | IdentitySummarySnapshot | MethodSnapshot | ChoiceSnapshot | EidSnapshot | RegistrySnapshot | DocumentSnapshot | LivenessSnapshot | PortraitSnapshot | MobileRequiredSnapshot | ProcessingSnapshot | UnsupportedSnapshot | ResultSnapshot;
368
421
  /**
369
422
  * ID mode: `face_match` is due right after an ACCEPTED portrait (passed, or
370
423
  * review after the cap) that it has not been tried with yet — the portrait is
371
424
  * the probe (the server picks it), so no selfie is taken. A face_match that
372
425
  * already carries a reason was tried: the regular selfie path applies.
373
426
  */
374
- declare function portraitMatchStep(view: HostedSessionView, frontier: HostedStepView): HostedStepView | null;
375
- /** The step the view asks for right now. */
427
+ declare function portraitMatchStep(view: HostedSessionView, frontier: PlanStepView): PlanStepView | null;
428
+ /** The step the view asks for right now (the C4 client rule, Sekyro flows §8.3). */
376
429
  declare function deriveStep(view: HostedSessionView, env?: DeriveStepEnv): StepSnapshot;
377
430
 
378
431
  type DocumentCaptureState = "idle" | "starting" | "scanning" | "captured" | "uploading" | "checking" | "done" | "error";
@@ -858,9 +911,10 @@ interface Verification {
858
911
  */
859
912
  methodChoice(): Promise<MethodChoiceView | null>;
860
913
  /**
861
- * Send the person's identity method (`POST /hosted/method`) and continue
862
- * from the returned view. Rejects with the typed `HostedApiError` (e.g.
863
- * 409 `method_locked`).
914
+ * Send the person's identity method: the identity choice's option of that
915
+ * method (`POST /hosted/choice`), then continue from the returned view.
916
+ * Rejects with the typed `HostedApiError` (e.g. 409 `choice_locked`), or a
917
+ * `RangeError` when the session offers no such option.
864
918
  */
865
919
  selectMethod(method: IdentityMethod): Promise<void>;
866
920
  /**
@@ -908,6 +962,8 @@ interface Verification {
908
962
  }
909
963
  /** Phone OTP (profile v2 §4.1): send, then verify the 6-digit code. */
910
964
  interface PhoneOtpStepHandle extends PhoneOtpSnapshot {
965
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
966
+ chooseOption?(option: string): Promise<void>;
911
967
  /** ISO time from which a resend is allowed (the server's cooldown, else 30 s after this page's last send). */
912
968
  resendAvailableAt?: string;
913
969
  /**
@@ -928,6 +984,8 @@ interface PhoneOtpStepHandle extends PhoneOtpSnapshot {
928
984
  }
929
985
  /** Email OTP (profile v2 §4.6.5): send a code to the address, then verify it. */
930
986
  interface EmailOtpStepHandle extends EmailOtpSnapshot {
987
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
988
+ chooseOption?(option: string): Promise<void>;
931
989
  /** Send or resend. `email` is required when `needsEmail` (checked locally: `OtpInputError("email", "format")`); a resend reuses the last one. */
932
990
  send(input?: {
933
991
  email?: string;
@@ -941,12 +999,16 @@ interface EmailOtpStepHandle extends EmailOtpSnapshot {
941
999
  interface ContactChoiceStepHandle extends ContactChoiceSnapshot {
942
1000
  /** Rejects with `RangeError` for a channel not in `options`. */
943
1001
  select(channel: ContactChannel): Promise<void>;
1002
+ /** Pick by option id (`choice.options[].id`). */
1003
+ choose(option: string): Promise<void>;
944
1004
  }
945
1005
  /**
946
1006
  * Step 2b summary and confirm (flow model 2026-10-23). PII: show the values,
947
1007
  * never log them or pass them to analytics.
948
1008
  */
949
1009
  interface IdentitySummaryStepHandle extends IdentitySummarySnapshot {
1010
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
1011
+ chooseOption?(option: string): Promise<void>;
950
1012
  /**
951
1013
  * The portrait on record as a JPEG `Blob` (fetched with the session token;
952
1014
  * show it with `URL.createObjectURL` and revoke it when done). `null` when
@@ -962,12 +1024,23 @@ interface IdentitySummaryStepHandle extends IdentitySummarySnapshot {
962
1024
  interface MethodStepHandle extends MethodSnapshot {
963
1025
  /** Rejects with `RangeError` for a method not in `options`. */
964
1026
  select(method: IdentityMethod): Promise<void>;
1027
+ /** Pick by option id (`choice.options[].id`): the same answer as {@link MethodStepHandle.select}. */
1028
+ choose(option: string): Promise<void>;
965
1029
  }
966
1030
  /**
967
1031
  * The national eID sign-in (SDK spec §3.2; Houwiyeti in MR). Every action
968
1032
  * submits `eid_auth` and re-reads the view; a passed eID ends the session.
969
1033
  */
1034
+ /**
1035
+ * A choice of another kind (Sekyro flows `generic`, copy `choice.*`): pick one
1036
+ * of `choice.options` (`POST /hosted/choice`); the next step follows.
1037
+ */
1038
+ interface ChoiceStepHandle extends ChoiceSnapshot {
1039
+ choose(option: string): Promise<void>;
1040
+ }
970
1041
  interface EidStepHandle extends EidSnapshot {
1042
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
1043
+ chooseOption?(option: string): Promise<void>;
971
1044
  /**
972
1045
  * `identifier` phase: ask the provider for a code. `identifier` (the NNI in
973
1046
  * MR, checked locally: 10 digits and the check digit — else
@@ -984,6 +1057,8 @@ interface EidStepHandle extends EidSnapshot {
984
1057
  }
985
1058
  /** The registry step (SDK spec §5.5). */
986
1059
  interface RegistryStepHandle extends RegistrySnapshot {
1060
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
1061
+ chooseOption?(option: string): Promise<void>;
987
1062
  /** Typed source only: checks the NNI locally (format, mod-97) before submitting. */
988
1063
  submitNni(nni: string): Promise<void>;
989
1064
  /** Bound or document source: submit with an empty input (the server holds the NNI). */
@@ -993,6 +1068,8 @@ interface RegistryStepHandle extends RegistrySnapshot {
993
1068
  }
994
1069
  /** The document step — any issuing country (profile v2 §5.3a). */
995
1070
  interface DocumentStepHandle extends DocumentSnapshot {
1071
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
1072
+ chooseOption?(option: string): Promise<void>;
996
1073
  /** The picked issuer (`null` until picked; a verso keeps the recto's pick). */
997
1074
  issuer: string | null;
998
1075
  /** The picked type (`null` until picked). */
@@ -1016,6 +1093,8 @@ interface DocumentStepHandle extends DocumentSnapshot {
1016
1093
  }
1017
1094
  /** The liveness / selfie step. */
1018
1095
  interface LivenessStepHandle extends LivenessSnapshot {
1096
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
1097
+ chooseOption?(option: string): Promise<void>;
1019
1098
  /** Same as {@link Verification.liveness}: the SDK uploads + submits on `captured`. */
1020
1099
  capture(options: LivenessCaptureOptions): LivenessCaptureHandle;
1021
1100
  /**
@@ -1034,6 +1113,8 @@ interface LivePhotoGateUpdate {
1034
1113
  }
1035
1114
  /** The ICAO portrait step (SDK spec §4.9, §5.4; ID-document sessions). */
1036
1115
  interface PortraitStepHandle extends PortraitSnapshot {
1116
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
1117
+ chooseOption?(option: string): Promise<void>;
1037
1118
  /**
1038
1119
  * The last submission failed on the network (nothing was decided): in the
1039
1120
  * `capture` phase offer a new take (`retry()` on the capture handle), in the
@@ -1057,11 +1138,15 @@ interface PortraitStepHandle extends PortraitSnapshot {
1057
1138
  }
1058
1139
  /** The biometric step needs a phone (desktop browser). */
1059
1140
  interface MobileRequiredStepHandle extends MobileRequiredSnapshot {
1141
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
1142
+ chooseOption?(option: string): Promise<void>;
1060
1143
  /** Re-read the session (e.g. after the person finished on their phone). */
1061
1144
  refresh(): Promise<void>;
1062
1145
  }
1063
1146
  /** The server is still deciding. */
1064
1147
  interface ProcessingStepHandle extends ProcessingSnapshot {
1148
+ /** Switch to another option of the open choice (`context.switchable`; `POST /hosted/choice`). Present only with it. */
1149
+ chooseOption?(option: string): Promise<void>;
1065
1150
  /** Re-read the session now (also after `stalled`). */
1066
1151
  refresh(): Promise<void>;
1067
1152
  }
@@ -1070,7 +1155,7 @@ type UnsupportedStepHandle = UnsupportedSnapshot;
1070
1155
  /** The session's outcome — display only (the SDK never decides it). */
1071
1156
  type ResultStepHandle = ResultSnapshot;
1072
1157
  /** What `on('step')` delivers: the step's data plus its actions. */
1073
- type VerificationStep = PhoneOtpStepHandle | EmailOtpStepHandle | ContactChoiceStepHandle | IdentitySummaryStepHandle | MethodStepHandle | EidStepHandle | RegistryStepHandle | DocumentStepHandle | LivenessStepHandle | PortraitStepHandle | MobileRequiredStepHandle | ProcessingStepHandle | UnsupportedStepHandle | ResultStepHandle;
1158
+ type VerificationStep = PhoneOtpStepHandle | EmailOtpStepHandle | ContactChoiceStepHandle | IdentitySummaryStepHandle | MethodStepHandle | ChoiceStepHandle | EidStepHandle | RegistryStepHandle | DocumentStepHandle | LivenessStepHandle | PortraitStepHandle | MobileRequiredStepHandle | ProcessingStepHandle | UnsupportedStepHandle | ResultStepHandle;
1074
1159
 
1075
1160
  /** The engine surface the handle binds — CaptureSessionV3 or a test double. */
1076
1161
  interface CaptureEngine {
@@ -2569,7 +2654,7 @@ declare function createPortraitCaptureInternal(options: PortraitCaptureOptions,
2569
2654
  * live-camera capture proof methods are optional (a fake / an older bridge
2570
2655
  * without them presigns without a proof).
2571
2656
  */
2572
- type HostedClientLike = Pick<HostedClient, "getSession" | "recordConsent" | "selectMethod" | "presign" | "uploadToSpaces" | "completeMedia" | "submitCheck"> & Partial<Pick<HostedClient, "presignCapture" | "armCapture">> & Partial<Pick<HostedClient, "selectContact" | "confirmIdentity" | "identityPortrait">>;
2657
+ type HostedClientLike = Pick<HostedClient, "getSession" | "recordConsent" | "choose" | "presign" | "uploadToSpaces" | "completeMedia" | "submitCheck"> & Partial<Pick<HostedClient, "presignCapture" | "armCapture">> & Partial<Pick<HostedClient, "confirmIdentity" | "identityPortrait">>;
2573
2658
  /** The presign policy allowlist for `kind: 'clip'` (media.policy.ts mirror). */
2574
2659
  declare const CLIP_MIME_ALLOWLIST: readonly string[];
2575
2660
  /** Same-key transport replays AFTER the first try, and the pause between them. */
@@ -2589,7 +2674,7 @@ declare class AttestationError extends Error {
2589
2674
  constructor(message: string);
2590
2675
  }
2591
2676
  /** One logical submission: receives the client and ITS idempotency key. */
2592
- type SubmitExecutor = (client: HostedClientLike, idempotencyKey: string) => Promise<SessionView>;
2677
+ type SubmitExecutor = (client: HostedClientLike, idempotencyKey: string) => Promise<HostedSessionView>;
2593
2678
  interface SubmitRuntime {
2594
2679
  client: HostedClientLike;
2595
2680
  /** Force-record consent (the server just said it is missing). */
@@ -2619,7 +2704,7 @@ interface SubmitRuntime {
2619
2704
  */
2620
2705
  declare function runSubmission(rt: SubmitRuntime, executor: SubmitExecutor, hooks?: {
2621
2706
  onAttestationInvalid?: () => void;
2622
- }): Promise<SessionView>;
2707
+ }): Promise<HostedSessionView>;
2623
2708
  interface LivenessFlowDeps extends SubmitRuntime {
2624
2709
  artifacts: CapturedArtifacts;
2625
2710
  /** Fresh attestation per call (Turnstile execute, or `{sandbox: true}`). */
@@ -2628,8 +2713,8 @@ interface LivenessFlowDeps extends SubmitRuntime {
2628
2713
  getView(): HostedSessionView;
2629
2714
  /** Re-GET the view from the server (after a RESYNC code) and fold it in. */
2630
2715
  refreshView(): Promise<HostedSessionView>;
2631
- /** Fold a submit response into the view. */
2632
- applySubmit(view: SessionView, submitted: CheckType): void;
2716
+ /** Fold a submit response into the view (re-reading it when the response says nothing about the next step). */
2717
+ applySubmit(view: HostedSessionView, submitted: CheckType): void | Promise<void>;
2633
2718
  /** Flow-state hook for the capture handle. */
2634
2719
  onPhase(phase: "uploading" | "checking"): void;
2635
2720
  /** The verification was destroyed (the only thing that cancels a chain). */
@@ -2784,4 +2869,4 @@ declare function createVerification(options: VerificationOptions): Verification;
2784
2869
  /** {@link createVerification} with construction seams (tests / Sekyro AI-internal hosts). */
2785
2870
  declare function createVerificationInternal(options: VerificationOptions, internals: VerificationInternals): Verification;
2786
2871
 
2787
- export { type LivenessStartOptions as $, type AcceptedDocumentsLike as A, type DocumentReticle as B, type CameraFacing as C, type DocumentCaptureOptions as D, type DocumentScanPhase as E, type DocumentScanUpdate as F, type DocumentSide as G, type DocumentSnapshot as H, type DocumentStepHandle as I, type EidSnapshot as J, type EidStepHandle as K, type EmailOtpSnapshot as L, type EmailOtpStepHandle as M, type EmailSource as N, type GateHint as O, type PortraitCaptureOptions as P, type GateUpdate as Q, ISSUER_CODES as R, type IdentitySummarySnapshot as S, type IdentitySummaryStepHandle as T, type LivePhotoGateUpdate as U, type LivePhotoPlan as V, type LivenessAssetsStatus as W, type LivenessCaptureEvents as X, type LivenessCaptureHandle as Y, type LivenessCaptureOptions as Z, type LivenessSnapshot as _, type DocumentCaptureHandle as a, ANALYSIS_LONG_EDGE as a$, type LivenessStepHandle as a0, type MethodSnapshot as a1, type MethodStepHandle as a2, type MobileRequiredSnapshot as a3, type MobileRequiredStepHandle as a4, type OtpChannel as a5, type OtpNumberSource as a6, PLATFORM_UNSUPPORTED as a7, type PhoneOtpSnapshot as a8, type PhoneOtpStepHandle as a9, type VerificationOptions as aA, type VerificationResult as aB, type VerificationStatus as aC, type VerificationStep as aD, WEB_IDENTITY_METHODS as aE, acceptedIssuers as aF, acceptedTypesFor as aG, createLivenessCapture as aH, createVerification as aI, deriveStep as aJ, flagOf as aK, getLivenessAssetsStatus as aL, preloadLivenessAssets as aM, releaseLivenessAssets as aN, resolveAcceptedDocuments as aO, sectionOf as aP, subscribeLivenessAssets as aQ, type DocCatalogEntry as aR, type LiveMrzTuning as aS, type TextLockTuning as aT, type OcrEngineClient as aU, type DocAssistReport as aV, type ReadyInfo as aW, type LoadFailure as aX, type OcrEngineOptions as aY, type SubmitRuntime as aZ, type HostedClientLike as a_, type PortraitCaptureEvents as aa, type PortraitCaptureState as ab, type PortraitGateUpdate as ac, type PortraitSnapshot as ad, type PortraitStepHandle as ae, type PreloadLivenessAssetsOptions as af, type ProcessingSnapshot as ag, type ProcessingStepHandle as ah, type ReasonCode as ai, type RegistrySnapshot as aj, type RegistrySource as ak, type RegistryStepHandle as al, type ResultDisplay as am, type ResultSnapshot as an, type ResultStepHandle as ao, type SdkFailureReason as ap, type StepAttempts as aq, type StepContext as ar, type StepSnapshot as as, type UnsupportedReason as at, type UnsupportedSnapshot as au, type UnsupportedStepHandle as av, type Verification as aw, type VerificationBusy as ax, type VerificationEvents as ay, type VerificationLocale as az, type PortraitCaptureHandle as b, INFERENCE_RETRY_ATTEMPTS as b$, ASPECT_BANDS as b0, AttestationError as b1, BLUR_REFUSE_SHARPNESS_MAX as b2, type BlurStatus as b3, CAPTURE_CANDIDATE_SPACING_MS as b4, CAPTURE_EXTRA_CANDIDATES as b5, CLIP_MIME_ALLOWLIST as b6, type CaptureEngine as b7, CaptureSessionDoc as b8, type CaptureSessionDocEvents as b9, type DocGateThresholds as bA, type DocGateTick as bB, type DocGateTickInput as bC, DocGateV1 as bD, type DocQuad as bE, type DocQuadPoint as bF, type DocShutterReason as bG, type DocShutterTuning as bH, type DocSide as bI, type DocumentCaptureController as bJ, type DocumentCaptureInternals as bK, EMPTY_GUIDE_METRICS as bL, type EncodedDocument as bM, FLIP_FILL_MIN as bN, FLIP_GAP_MS as bO, FLIP_TIMEOUT_MS as bP, type FocusCaps as bQ, type FramingStatus as bR, GUIDE_LOCK_DEFAULTS as bS, type GlareStatus as bT, type GrabbedFrame as bU, type GuideBlocker as bV, GuideLock as bW, type GuideLockTick as bX, type GuideLockTuning as bY, type GuideMetrics as bZ, type GuideRect as b_, type CaptureSessionDocOptions as ba, DOC_ANALYSIS_DEFAULTS as bb, DOC_CADENCE_HZ as bc, DOC_CAMERA_TUNING_DEFAULTS as bd, DOC_CATALOG as be, DOC_DETECT_WIDTH as bf, DOC_FEEDBACK_STATES as bg, DOC_GATE_V1_DEFAULTS as bh, DOC_SHUTTER_DEFAULTS as bi, type DeviceReadHint as bj, type DocArtifacts as bk, DocAssist as bl, type DocAssistEngine as bm, type DocAssistTick as bn, type DocCameraTuning as bo, type DocCaptureReport as bp, type DocCaptureVia as bq, type DocChecksPayload as br, type DocEngineLike as bs, DocFeedbackAggregator as bt, type DocFeedbackKey as bu, type DocFeedbackState as bv, type DocFormat as bw, type DocFrameAnalysis as bx, type DocFrameMeasures as by, type DocGateQuality as bz, type CaptureChannel as c, facesOf as c$, INFERENCE_RETRY_DEFAULT_S as c0, LANDMARKER_MODEL as c1, LENS_STORAGE_KEY as c2, LENS_TRY_MAX as c3, LIVE_MRZ_DEFAULTS as c4, LIVE_PHOTO_IDLE_MS as c5, LIVE_PHOTO_MAX_HZ as c6, type LandmarkedFace as c7, type LandmarkerLike as c8, type LensKind as c9, SAME_FACE_MAX_DROPS as cA, type ScanEvent as cB, type ScanLayout as cC, type ScanNotice as cD, type ScanPhase as cE, type ScanReport as cF, type ScanSide as cG, type ScanState as cH, type SubmitExecutor as cI, TEXT_LOCK_DEFAULTS as cJ, TRANSPORT_REPLAY_ATTEMPTS as cK, TRANSPORT_REPLAY_DELAY_MS as cL, type VerificationInternals as cM, analyzeDocFrame as cN, analyzeGuide as cO, aspectBand as cP, aspectFits as cQ, buildDeviceReadHint as cR, coverPointToVideo as cS, createDocumentCaptureInternal as cT, createFaceLandmarker as cU, createLivePhotoKit as cV, createLivenessCaptureInternal as cW, createPortraitCaptureInternal as cX, createVerificationInternal as cY, docZoomFor as cZ, encodeDocumentImage as c_, type LensSource as ca, type LightingStatus as cb, type LiveMrzCapture as cc, type LiveMrzState as cd, type LivePhotoGate as ce, type LivePhotoKit as cf, type LivePhotoKitInternals as cg, type LivePhotoKitOptions as ch, type LivePhotoStill as ci, type LivenessCaptureInternalHandle as cj, type LivenessCaptureInternals as ck, type LivenessFlowDeps as cl, type LivenessFlowOutcome as cm, MANUAL_SHUTTER_MS as cn, MR_DOC_CATALOG as co, NO_REPORT_MS as cp, type OpenDocCameraDeps as cq, PORTRAIT_JPEG_QUALITY as cr, PRELOAD_BLAZE_INIT_TIMEOUT_MS as cs, PRELOAD_BUDGET_MS as ct, PROCESSING_POLL_DELAY_MS as cu, PROCESSING_POLL_MAX as cv, type PortraitCaptureController as cw, type PortraitCaptureInternals as cx, REGISTRY_RETRY_DELAY_MS as cy, type ReticleType as cz, type CaptureEngineId as d, feedbackVoteOf as d0, focusOk as d1, guideQuad as d2, guideRegionInFrame as d3, initialScanState as d4, lensKindOf as d5, mapEngineState as d6, mapErrorKind as d7, mapGuidanceHint as d8, nextScanState as d9, writeStoredLens as dA, observe as da, openDocCamera as db, passportBandOf as dc, portraitMatchStep as dd, preloadedDetectorFactory as de, quadAreaFrac as df, quadBounds as dg, quadIou as dh, quadTiltRatio as di, randomUuid as dj, rankBackCameras as dk, readStoredLens as dl, resetLivenessAssetsForTests as dm, resolveDocCameraTuning as dn, resolveDocShutterTuning as dp, resolveGuideLockTuning as dq, runLivenessFlow as dr, runSubmission as ds, scannerFormatFor as dt, setPreloadLoaderForTests as du, settledHint as dv, singleShotFocusAt as dw, specularFraction as dx, supportsFocusMode as dy, warmDocDetector as dz, type CaptureError as e, type CaptureErrorKind as f, type CaptureState as g, type CapturedArtifacts as h, type CapturedDocument as i, type CapturedPortrait as j, type ContactChoiceSnapshot as k, type ContactChoiceStepHandle as l, DEFAULT_API_ORIGIN as m, DOCUMENT_TYPE_ORDER as n, type DeriveStepEnv as o, type DocumentCaptureEvents as p, type DocumentCaptureState as q, type DocumentFeedback as r, type DocumentFeedbackKey as s, type DocumentGateUpdate as t, type DocumentGuide as u, type DocumentGuideMeasure as v, type DocumentLiveMrzOptions as w, type DocumentMrzUpdate as x, type DocumentPoint as y, type DocumentQuad as z };
2872
+ export { type LivenessCaptureEvents as $, type AcceptedDocumentsLike as A, type DocumentMrzUpdate as B, type CameraFacing as C, type DocumentCaptureOptions as D, type DocumentPoint as E, type DocumentQuad as F, type DocumentReticle as G, type DocumentScanPhase as H, type DocumentScanUpdate as I, type DocumentSide as J, type DocumentSnapshot as K, type DocumentStepHandle as L, type EidSnapshot as M, type EidStepHandle as N, type EmailOtpSnapshot as O, type PortraitCaptureOptions as P, type EmailOtpStepHandle as Q, type EmailSource as R, type GateHint as S, type GateUpdate as T, ISSUER_CODES as U, type IdentitySummarySnapshot as V, type IdentitySummaryStepHandle as W, type InLaneSwitch as X, type LivePhotoGateUpdate as Y, type LivePhotoPlan as Z, type LivenessAssetsStatus as _, type DocumentCaptureHandle as a, type OcrEngineClient as a$, type LivenessCaptureHandle as a0, type LivenessCaptureOptions as a1, type LivenessSnapshot as a2, type LivenessStartOptions as a3, type LivenessStepHandle as a4, type MethodSnapshot as a5, type MethodStepHandle as a6, type MobileRequiredSnapshot as a7, type MobileRequiredStepHandle as a8, type OtpChannel as a9, type UnsupportedStepHandle as aA, type Verification as aB, type VerificationBusy as aC, type VerificationEvents as aD, type VerificationLocale as aE, type VerificationOptions as aF, type VerificationResult as aG, type VerificationStatus as aH, type VerificationStep as aI, WEB_IDENTITY_METHODS as aJ, acceptedIssuers as aK, acceptedTypesFor as aL, createLivenessCapture as aM, createVerification as aN, deriveStep as aO, flagOf as aP, getLivenessAssetsStatus as aQ, laneOf as aR, otherOptions as aS, preloadLivenessAssets as aT, releaseLivenessAssets as aU, resolveAcceptedDocuments as aV, sectionOf as aW, subscribeLivenessAssets as aX, type DocCatalogEntry as aY, type LiveMrzTuning as aZ, type TextLockTuning as a_, type OtpNumberSource as aa, PLATFORM_UNSUPPORTED as ab, type PhoneOtpSnapshot as ac, type PhoneOtpStepHandle as ad, type PlanChoiceSnapshot as ae, type PortraitCaptureEvents as af, type PortraitCaptureState as ag, type PortraitGateUpdate as ah, type PortraitSnapshot as ai, type PortraitStepHandle as aj, type PreloadLivenessAssetsOptions as ak, type ProcessingSnapshot as al, type ProcessingStepHandle as am, type ReasonCode as an, type RegistrySnapshot as ao, type RegistrySource as ap, type RegistryStepHandle as aq, type ResultDisplay as ar, type ResultSnapshot as as, type ResultStepHandle as at, type SdkFailureReason as au, type StepAttempts as av, type StepContext as aw, type StepSnapshot as ax, type UnsupportedReason as ay, type UnsupportedSnapshot as az, type PortraitCaptureHandle as b, type GrabbedFrame as b$, type DocAssistReport as b0, type ReadyInfo as b1, type LoadFailure as b2, type OcrEngineOptions as b3, type SubmitRuntime as b4, type HostedClientLike as b5, ANALYSIS_LONG_EDGE as b6, ASPECT_BANDS as b7, AttestationError as b8, BLUR_REFUSE_SHARPNESS_MAX as b9, DocFeedbackAggregator as bA, type DocFeedbackKey as bB, type DocFeedbackState as bC, type DocFormat as bD, type DocFrameAnalysis as bE, type DocFrameMeasures as bF, type DocGateQuality as bG, type DocGateThresholds as bH, type DocGateTick as bI, type DocGateTickInput as bJ, DocGateV1 as bK, type DocQuad as bL, type DocQuadPoint as bM, type DocShutterReason as bN, type DocShutterTuning as bO, type DocSide as bP, type DocumentCaptureController as bQ, type DocumentCaptureInternals as bR, EMPTY_GUIDE_METRICS as bS, type EncodedDocument as bT, FLIP_FILL_MIN as bU, FLIP_GAP_MS as bV, FLIP_TIMEOUT_MS as bW, type FocusCaps as bX, type FramingStatus as bY, GUIDE_LOCK_DEFAULTS as bZ, type GlareStatus as b_, type BlurStatus as ba, CAPTURE_CANDIDATE_SPACING_MS as bb, CAPTURE_EXTRA_CANDIDATES as bc, CLIP_MIME_ALLOWLIST as bd, type CaptureEngine as be, CaptureSessionDoc as bf, type CaptureSessionDocEvents as bg, type CaptureSessionDocOptions as bh, DOC_ANALYSIS_DEFAULTS as bi, DOC_CADENCE_HZ as bj, DOC_CAMERA_TUNING_DEFAULTS as bk, DOC_CATALOG as bl, DOC_DETECT_WIDTH as bm, DOC_FEEDBACK_STATES as bn, DOC_GATE_V1_DEFAULTS as bo, DOC_SHUTTER_DEFAULTS as bp, type DeviceReadHint as bq, type DocArtifacts as br, DocAssist as bs, type DocAssistEngine as bt, type DocAssistTick as bu, type DocCameraTuning as bv, type DocCaptureReport as bw, type DocCaptureVia as bx, type DocChecksPayload as by, type DocEngineLike as bz, type CaptureChannel as c, createFaceLandmarker as c$, type GuideBlocker as c0, GuideLock as c1, type GuideLockTick as c2, type GuideLockTuning as c3, type GuideMetrics as c4, type GuideRect as c5, INFERENCE_RETRY_ATTEMPTS as c6, INFERENCE_RETRY_DEFAULT_S as c7, LANDMARKER_MODEL as c8, LENS_STORAGE_KEY as c9, PRELOAD_BUDGET_MS as cA, PROCESSING_POLL_DELAY_MS as cB, PROCESSING_POLL_MAX as cC, type PortraitCaptureController as cD, type PortraitCaptureInternals as cE, REGISTRY_RETRY_DELAY_MS as cF, type ReticleType as cG, SAME_FACE_MAX_DROPS as cH, type ScanEvent as cI, type ScanLayout as cJ, type ScanNotice as cK, type ScanPhase as cL, type ScanReport as cM, type ScanSide as cN, type ScanState as cO, type SubmitExecutor as cP, TEXT_LOCK_DEFAULTS as cQ, TRANSPORT_REPLAY_ATTEMPTS as cR, TRANSPORT_REPLAY_DELAY_MS as cS, type VerificationInternals as cT, analyzeDocFrame as cU, analyzeGuide as cV, aspectBand as cW, aspectFits as cX, buildDeviceReadHint as cY, coverPointToVideo as cZ, createDocumentCaptureInternal as c_, LENS_TRY_MAX as ca, LIVE_MRZ_DEFAULTS as cb, LIVE_PHOTO_IDLE_MS as cc, LIVE_PHOTO_MAX_HZ as cd, type LandmarkedFace as ce, type LandmarkerLike as cf, type LensKind as cg, type LensSource as ch, type LightingStatus as ci, type LiveMrzCapture as cj, type LiveMrzState as ck, type LivePhotoGate as cl, type LivePhotoKit as cm, type LivePhotoKitInternals as cn, type LivePhotoKitOptions as co, type LivePhotoStill as cp, type LivenessCaptureInternalHandle as cq, type LivenessCaptureInternals as cr, type LivenessFlowDeps as cs, type LivenessFlowOutcome as ct, MANUAL_SHUTTER_MS as cu, MR_DOC_CATALOG as cv, NO_REPORT_MS as cw, type OpenDocCameraDeps as cx, PORTRAIT_JPEG_QUALITY as cy, PRELOAD_BLAZE_INIT_TIMEOUT_MS as cz, type CaptureEngineId as d, createLivePhotoKit as d0, createLivenessCaptureInternal as d1, createPortraitCaptureInternal as d2, createVerificationInternal as d3, docZoomFor as d4, encodeDocumentImage as d5, facesOf as d6, feedbackVoteOf as d7, focusOk as d8, guideQuad as d9, scannerFormatFor as dA, setPreloadLoaderForTests as dB, settledHint as dC, singleShotFocusAt as dD, specularFraction as dE, supportsFocusMode as dF, warmDocDetector as dG, writeStoredLens as dH, guideRegionInFrame as da, initialScanState as db, lensKindOf as dc, mapEngineState as dd, mapErrorKind as de, mapGuidanceHint as df, nextScanState as dg, observe as dh, openDocCamera as di, passportBandOf as dj, portraitMatchStep as dk, preloadedDetectorFactory as dl, quadAreaFrac as dm, quadBounds as dn, quadIou as dp, quadTiltRatio as dq, randomUuid as dr, rankBackCameras as ds, readStoredLens as dt, resetLivenessAssetsForTests as du, resolveDocCameraTuning as dv, resolveDocShutterTuning as dw, resolveGuideLockTuning as dx, runLivenessFlow as dy, runSubmission as dz, type CaptureError as e, type CaptureErrorKind as f, type CaptureState as g, type CapturedArtifacts as h, type CapturedDocument as i, type CapturedPortrait as j, type ChoiceOptionSnapshot as k, type ChoiceSnapshot as l, type ChoiceStepHandle as m, type ContactChoiceSnapshot as n, type ContactChoiceStepHandle as o, DEFAULT_API_ORIGIN as p, DOCUMENT_TYPE_ORDER as q, type DeriveStepEnv as r, type DocumentCaptureEvents as s, type DocumentCaptureState as t, type DocumentFeedback as u, type DocumentFeedbackKey as v, type DocumentGateUpdate as w, type DocumentGuide as x, type DocumentGuideMeasure as y, type DocumentLiveMrzOptions as z };
@@ -442,21 +442,82 @@ type EidAfterPass = "end" | "continue";
442
442
  * `contact`, Step 2 `identity`, Step 3 `live_photo`. Open: a value this SDK
443
443
  * does not know is kept as is, so a client still places the step.
444
444
  */
445
- type StepSection = "contact" | "identity" | "live_photo" | (string & {});
446
- /** A contact channel of a `one_of` session (`otpChoice.options`). */
445
+ type StepSection = "contact" | "identity" | "live_photo" | "screening" | (string & {});
446
+ /** A contact channel of a contact choice (`phone_otp` → `phone`, `email_otp` → `email`). */
447
447
  type ContactChannel = "phone" | "email";
448
448
  /**
449
- * Step 1 contact choice (`HostedSessionView.otpChoice`), present only on a
450
- * `contact.mode = one_of` session: the person confirms a phone number OR an
451
- * email address. `selected` is `null` until they choose
452
- * ({@link HostedClient.selectContact}, or implicitly with the first OTP
453
- * submission); `locked` once a contact step passed.
449
+ * @deprecated Sekyro flows: the contact choice is `plan.choice` (kind `contact`,
450
+ * {@link PlanChoiceView}); the view no longer carries this shape.
454
451
  */
455
452
  interface OtpChoiceView {
456
453
  options: ContactChannel[];
457
454
  selected: ContactChannel | null;
458
455
  locked: boolean;
459
456
  }
457
+ /** The flow version a session runs (`HostedSessionView.flow`). */
458
+ interface HostedFlowRef {
459
+ id: string;
460
+ slug: string;
461
+ version: number;
462
+ }
463
+ /** The kind of a choice node (Sekyro flows §7.4); a newer server's kind is kept as is. */
464
+ type PlanChoiceKind = "identity_method" | "contact" | "generic" | (string & {});
465
+ /** One option of a choice node, in the server's display order. */
466
+ interface PlanChoiceOption {
467
+ /** The option id sent back with {@link HostedClient.choose} (`document`, `registry`, `phone`, …). */
468
+ id: string;
469
+ /** The service of the option's lane (`document`, `nfc`, `population_registry`, `national_eid`, `phone_otp`, `email_otp`, …). */
470
+ service: string;
471
+ /** Unavailable options are omitted by the server; always `true` when listed. */
472
+ available: boolean;
473
+ /** `national_eid` options: the provider ("Verify with Houwiyeti"); absent or `null` otherwise and on older APIs. */
474
+ nationalEid?: NationalEidOption | null;
475
+ }
476
+ /** `plan.choice`: the choice the person makes now (or may still switch, while `locked` is false). */
477
+ interface PlanChoiceView {
478
+ nodeId: string;
479
+ kind: PlanChoiceKind;
480
+ /** The chosen option id, `null` before a pick. */
481
+ selected: string | null;
482
+ /** The choice can no longer change (a submission into the chosen lane, or the option settled). */
483
+ locked: boolean;
484
+ options: PlanChoiceOption[];
485
+ }
486
+ /** Submissions used on a step and its cap (remaining = `max - used`). */
487
+ interface PlanAttempts {
488
+ used: number;
489
+ max: number;
490
+ }
491
+ /**
492
+ * A step of the plan (a visited node or the current one, never an untaken lane):
493
+ * its node id, service and state plus today's per-type extras (`otp`, `emailOtp`,
494
+ * `eid`, `nfc`, `docCapture`, `nniFromDocument`, `reason`, `icao`, `requiresMobile`, …).
495
+ * A node with two checks yields two steps (`n_live` liveness, `n_live.icao` the ICAO portrait).
496
+ */
497
+ interface PlanStepView extends Omit<HostedStepView, "checkType" | "attemptsRemaining" | "section"> {
498
+ /** The node id (`n_doc`), stable across views; `<node>.icao` for the ICAO portrait of a liveness node. */
499
+ id: string;
500
+ /** The catalog service of the node (`document`, `liveness`, `summary_confirm`, …). */
501
+ service: string;
502
+ /** The check this step submits (`doc_ocr`, `portrait_icao`, `identity_confirm`, …). */
503
+ checkType: CheckType | (string & {});
504
+ section: StepSection;
505
+ attempts: PlanAttempts;
506
+ }
507
+ /** A segment of the progress bar (`plan.sections`): the sections still possible on any remaining path. */
508
+ interface PlanSectionView {
509
+ id: StepSection;
510
+ state: "done" | "current" | "upcoming";
511
+ }
512
+ /** `HostedSessionView.plan` (Sekyro flows §8.1). */
513
+ interface HostedPlanView {
514
+ /** A choice node id (`plan.choice.nodeId`) or a step id; `null` while nothing waits on the person. */
515
+ current: string | null;
516
+ /** Present while `current` is a choice (and, on newer servers, while its lane can still be switched). */
517
+ choice?: PlanChoiceView;
518
+ steps: PlanStepView[];
519
+ sections: PlanSectionView[];
520
+ }
460
521
  /** Where the identity summary's data came from. */
461
522
  type IdentitySummarySource = "registry" | "document" | "chip";
462
523
  /**
@@ -498,10 +559,10 @@ interface IdentitySummaryView {
498
559
  /** The answer to the identity summary ({@link HostedClient.confirmIdentity}). */
499
560
  type IdentityConfirmDecision = "confirm" | "retake";
500
561
  /**
501
- * The identity-method choice of a session (`HostedSessionView.methodChoice`).
502
- * While `available && selected === null` no check can be submitted (409
503
- * `method_required`): the page asks first and sends the answer with
504
- * `POST /hosted/method` ({@link HostedClient.selectMethod}).
562
+ * The pending identity-method choice in the 0.1 vocabulary, read from
563
+ * `plan.choice` (`kind: identity_method`): `document` → `document_photo`,
564
+ * `nfc` → `document_chip`, `population_registry` → `national_number`,
565
+ * `national_eid` → `national_eid`. See {@link Verification.methodChoice}.
505
566
  */
506
567
  interface MethodChoiceView {
507
568
  /** The session offers the choice (the app's document mode is `optional`). */
@@ -632,6 +693,13 @@ interface NfcStepView {
632
693
  default: Record<string, true | "unknown">;
633
694
  byIssuer: Record<string, Record<string, true | "unknown">>;
634
695
  };
696
+ /**
697
+ * Sekyro flows §7.7: where the chip key's MRZ comes from — `capture` (an
698
+ * MRZ-only scan before the chip read) or `document` (the earlier document step).
699
+ */
700
+ mrz?: {
701
+ source: "capture" | "document" | (string & {});
702
+ };
635
703
  }
636
704
  /**
637
705
  * Per-check projection in a {@link HostedSessionView} — the spec'd hosted step
@@ -840,7 +908,6 @@ interface HostedSessionView {
840
908
  sessionId: string;
841
909
  status: SessionStatus;
842
910
  outcome: SessionOutcome | null;
843
- steps: HostedStepView[];
844
911
  /** ISO-8601 timestamp (Date on the server, string on the wire). */
845
912
  expiresAt: string;
846
913
  consentRecorded: boolean;
@@ -897,12 +964,6 @@ interface HostedSessionView {
897
964
  * picker. Absent on older APIs (fall back to `acceptedDocumentTypes` for MR).
898
965
  */
899
966
  acceptedDocuments?: HostedAcceptedDocuments;
900
- /**
901
- * The identity-method choice (profile v2 step 3). Absent when the session
902
- * has no choice (and on older APIs). While `available && selected === null`
903
- * every check submission answers 409 `method_required`.
904
- */
905
- methodChoice?: MethodChoiceView;
906
967
  /**
907
968
  * ISO-8601 time from which this device may verify again — set with
908
969
  * `failureReason: 'device_cooldown'` (profile v2 step 4). Absent otherwise
@@ -939,12 +1000,23 @@ interface HostedSessionView {
939
1000
  purpose: "verification";
940
1001
  icao: HostedIcaoPolicy;
941
1002
  };
942
- /** Step 1 contact choice of a `one_of` session (flow model 2026-10-23). */
943
- otpChoice?: OtpChoiceView;
1003
+ /** The flow version the session runs (Sekyro flows §9.2). */
1004
+ flow?: HostedFlowRef;
1005
+ /**
1006
+ * What the person does now (Sekyro flows §8.1), the only source of the
1007
+ * steps: render `plan.current`. Absent on an active session only from a
1008
+ * backend older than the flows release (the SDK then asks for an update).
1009
+ */
1010
+ plan?: HostedPlanView;
944
1011
  /** Step 2b identity summary, present only while its confirmation is pending. */
945
1012
  identitySummary?: IdentitySummaryView;
946
1013
  }
947
1014
  /** `POST /hosted/consent` result — 201 on first record, 200 `{alreadyRecorded: true}` on replay. */
1015
+ /**
1016
+ * `POST /hosted/consent` answer (Sekyro flows §8.2): the hosted view with
1017
+ * `consentRecorded: true`, plus whether consent was already on record.
1018
+ */
1019
+ type HostedConsentView = HostedSessionView & RecordConsentResult;
948
1020
  interface RecordConsentResult {
949
1021
  alreadyRecorded: boolean;
950
1022
  }
@@ -1289,8 +1361,7 @@ interface HostedClientOptions {
1289
1361
  *
1290
1362
  * GET /api/v2/hosted/session → {@link getSession}
1291
1363
  * POST /api/v2/hosted/consent → {@link recordConsent}
1292
- * POST /api/v2/hosted/method → {@link selectMethod}
1293
- * POST /api/v2/hosted/contact → {@link selectContact}
1364
+ * POST /api/v2/hosted/choice → {@link choose}
1294
1365
  * POST /api/v2/hosted/identity/confirm → {@link confirmIdentity}
1295
1366
  * GET /api/v2/hosted/identity/portrait → {@link identityPortrait}
1296
1367
  * POST /api/v2/sessions/:id/media → {@link presign}
@@ -1333,21 +1404,14 @@ declare class HostedClient {
1333
1404
  * `alreadyRecorded: true`). Until recorded, media presign/complete AND check
1334
1405
  * submission answer 409 `consent_required`.
1335
1406
  */
1336
- recordConsent(locale: ConsentLocale): Promise<RecordConsentResult>;
1337
- /**
1338
- * Send the person's identity method (profile v2 step 3) when the view offers
1339
- * a choice (`methodChoice.available`). Returns the updated hosted view —
1340
- * continue from it. 409 `method_locked` when the method can no longer
1341
- * change (a check of the chosen method was already submitted).
1342
- */
1343
- selectMethod(method: IdentityMethod): Promise<HostedSessionView>;
1407
+ recordConsent(locale: ConsentLocale): Promise<HostedConsentView>;
1344
1408
  /**
1345
- * Choose how the person confirms their contact (flow model 2026-10-23, Step 1)
1346
- * on a `one_of` session (`otpChoice` in the view): `phone` or `email`. Returns
1347
- * the updated hosted view. The person may switch until a contact step passed;
1348
- * then (or on a session without the choice) 409 `contact_locked`.
1409
+ * Pick an option of the current choice (Sekyro flows §7.4): `plan.choice`'s
1410
+ * `nodeId` and one of its option ids. Returns the updated hosted view —
1411
+ * render it. The person may switch while `plan.choice.locked` is false.
1412
+ * Errors: 409 `choice_locked`, 409 `choice_option_unavailable`, 404 `choice_not_found`.
1349
1413
  */
1350
- selectContact(channel: ContactChannel): Promise<HostedSessionView>;
1414
+ choose(nodeId: string, option: string): Promise<HostedSessionView>;
1351
1415
  /**
1352
1416
  * Answer the identity summary (`identitySummary` in the view, Step 2b):
1353
1417
  * `confirm` lifts the live-photo gate, `retake` re-opens the identity checks
@@ -1414,9 +1478,10 @@ declare class HostedClient {
1414
1478
  completeMedia(key: string): Promise<CompleteMediaResult>;
1415
1479
  /**
1416
1480
  * Submit one check. Sends `{input, forceOutcome?}` (SubmitCheckSchema) and the
1417
- * optional `x-idempotency-key` header. Returns the whitelisted SessionView.
1481
+ * optional `x-idempotency-key` header. Returns the hosted view after the
1482
+ * submission (Sekyro flows §8.2: with its `plan`) — render it.
1418
1483
  */
1419
- submitCheck<T extends CheckType>(checkType: T, input: CheckInputByType[T], opts?: SubmitOptions): Promise<SessionView>;
1484
+ submitCheck<T extends CheckType>(checkType: T, input: CheckInputByType[T], opts?: SubmitOptions): Promise<HostedSessionView>;
1420
1485
  /**
1421
1486
  * Convenience composition: presign → PUT → complete → submit, passing the
1422
1487
  * PROMOTED key (from complete's response — never the pending presign key)
@@ -1426,7 +1491,7 @@ declare class HostedClient {
1426
1491
  * param-stripped ONCE and used for both presign and PUT, so the signed
1427
1492
  * header always matches.
1428
1493
  */
1429
- uploadAndSubmit<T extends MediaCheckType>(checkType: T, media: UploadMedia, extraInput: Omit<CheckInputByType[T], (typeof MEDIA_INPUT_FIELD)[T]>, opts?: SubmitOptions): Promise<SessionView>;
1494
+ uploadAndSubmit<T extends MediaCheckType>(checkType: T, media: UploadMedia, extraInput: Omit<CheckInputByType[T], (typeof MEDIA_INPUT_FIELD)[T]>, opts?: SubmitOptions): Promise<HostedSessionView>;
1430
1495
  /** The token's own sessionId — cached from getSession(), lazily bootstrapped. */
1431
1496
  private ensureSessionId;
1432
1497
  /**
@@ -1652,4 +1717,4 @@ interface IcaoGateOptions {
1652
1717
  }
1653
1718
  declare function createIcaoGate(t: ResolvedIcaoTuning, options?: IcaoGateOptions): IcaoGate;
1654
1719
 
1655
- export { type PopulationReason as $, type AcceptedDocumentType as A, type IcaoCoachKey as B, type CheckReason as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchReason as F, type IcaoCriterion as G, type HeadPose as H, type IcaoCaptureTuning as I, type IcaoCriterionState as J, type IcaoGateCriterion as K, type IcaoGateSummary as L, type IcaoGateUpdate as M, type IcaoReportEntry as N, type IdentityConfirmDecision as O, type IdentityMethod as P, type IdentitySummarySource as Q, type IdentitySummaryView as R, type LivenessReason as S, type MatchReason as T, type MethodChoiceView as U, type NationalEidOption as V, type NfcChipReason as W, type NfcStepView as X, type OtpChoiceView as Y, type PhoneOtpReason as Z, type PolicyFailureReason as _, type CheckState as a, type MediaCheckType as a$, type PortraitIcaoInput as a0, type PortraitIcaoReason as a1, type SessionFailureReason as a2, type SessionOutcome as a3, type SessionStatus as a4, type StepSection as a5, type SessionView as a6, type BackgroundStats as a7, type Box as a8, CLIPPED_LUMA as a9, icaoWindow as aA, judgeIcao as aB, lumaPlane as aC, percentile as aD, portraitCropRegion as aE, poseFromMatrix as aF, regionStats as aG, resolveIcaoTuning as aH, scoreFrame as aI, windowOverflow as aJ, type PersonMask as aK, HostedClient as aL, type AttestationInput as aM, type CaptureContext as aN, type CaptureNoncesResult as aO, type CaptureProof as aP, type CheckInputByType as aQ, type CompleteMediaResult as aR, type ConsentLocale as aS, type DocDeviceRead as aT, type DocOcrInput as aU, type DocSide as aV, type EmailOtpInput as aW, type FaceMatchInput as aX, type HostedClientOptions as aY, type LivenessCaptureInput as aZ, type LivenessInput as a_, type FaceGeometry as aa, type FaceLighting as ab, ICAO_CANVAS as ac, ICAO_FALLBACK as ad, ICAO_GATE_CRITERIA as ae, ICAO_SHARP_REF as af, type IcaoFrameObservation as ag, type IcaoGate as ah, type IcaoGateOptions as ai, type IcaoJudgedCriterion as aj, type IcaoMeasures as ak, type IcaoPixelStats as al, type IcaoProfile as am, type LumaPlane as an, type Point as ao, type RegionStats as ap, type ResolvedIcaoTuning as aq, backgroundStats as ar, createIcaoGate as as, eyeLineRoll as at, eyeOpenness as au, eyeSpecular as av, faceGeometry as aw, faceLighting as ax, faceSharpness as ay, icaoPixelStats as az, type CheckType as b, type MediaKind as b0, type PhoneOtpInput as b1, type PopulationInput as b2, type PresignRequest as b3, type PresignUploadResult as b4, type RecordConsentResult as b5, type SessionStepView as b6, type SubmitCheckBody as b7, type SubmitOptions as b8, type UploadMedia as b9, stripMimeParams as ba, type ContactChannel as c, type DocReason as d, type EidAuthInput as e, type EidReason as f, type EmailOtpReason as g, type HostedAcceptedDocuments as h, type HostedBranding as i, type HostedBrandingColorKey as j, type HostedCaptureTuning as k, type HostedDocumentCaptureTuning as l, type HostedDocumentScanTuning as m, type HostedEidView as n, type HostedEmailOtpView as o, type HostedIcaoPolicy as p, type HostedIntegrity as q, type HostedLivePhotoTuning as r, type HostedNativeCaptureTuning as s, type HostedOcrTuning as t, type HostedOtpView as u, type HostedPortraitView as v, type HostedSessionView as w, type HostedStepView as x, type HostedVoiceLocale as y, type HostedVoiceView as z };
1720
+ export { type OtpChoiceView as $, type AcceptedDocumentType as A, type HostedStepView as B, type CheckReason as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchReason as F, type HostedVoiceLocale as G, type HeadPose as H, type HostedVoiceView as I, type IcaoCaptureTuning as J, type IcaoCoachKey as K, type IcaoCriterion as L, type IcaoCriterionState as M, type IcaoGateCriterion as N, type IcaoGateSummary as O, type IcaoGateUpdate as P, type IcaoReportEntry as Q, type IdentityConfirmDecision as R, type IdentityMethod as S, type IdentitySummarySource as T, type IdentitySummaryView as U, type LivenessReason as V, type MatchReason as W, type MethodChoiceView as X, type NationalEidOption as Y, type NfcChipReason as Z, type NfcStepView as _, type CheckState as a, type DocDeviceRead as a$, type PhoneOtpReason as a0, type PlanAttempts as a1, type PlanChoiceKind as a2, type PlanChoiceOption as a3, type PlanChoiceView as a4, type PlanSectionView as a5, type PlanStepView as a6, type PolicyFailureReason as a7, type PopulationReason as a8, type PortraitIcaoInput as a9, createIcaoGate as aA, eyeLineRoll as aB, eyeOpenness as aC, eyeSpecular as aD, faceGeometry as aE, faceLighting as aF, faceSharpness as aG, icaoPixelStats as aH, icaoWindow as aI, judgeIcao as aJ, lumaPlane as aK, percentile as aL, portraitCropRegion as aM, poseFromMatrix as aN, regionStats as aO, resolveIcaoTuning as aP, scoreFrame as aQ, windowOverflow as aR, type PersonMask as aS, HostedClient as aT, type AttestationInput as aU, type CaptureContext as aV, type CaptureNoncesResult as aW, type CaptureProof as aX, type CheckInputByType as aY, type CompleteMediaResult as aZ, type ConsentLocale as a_, type PortraitIcaoReason as aa, type SessionFailureReason as ab, type SessionOutcome as ac, type SessionStatus as ad, type StepSection as ae, type BackgroundStats as af, type Box as ag, CLIPPED_LUMA as ah, type FaceGeometry as ai, type FaceLighting as aj, ICAO_CANVAS as ak, ICAO_FALLBACK as al, ICAO_GATE_CRITERIA as am, ICAO_SHARP_REF as an, type IcaoFrameObservation as ao, type IcaoGate as ap, type IcaoGateOptions as aq, type IcaoJudgedCriterion as ar, type IcaoMeasures as as, type IcaoPixelStats as at, type IcaoProfile as au, type LumaPlane as av, type Point as aw, type RegionStats as ax, type ResolvedIcaoTuning as ay, backgroundStats as az, type CheckType as b, type DocOcrInput as b0, type DocSide as b1, type EmailOtpInput as b2, type FaceMatchInput as b3, type HostedClientOptions as b4, type LivenessCaptureInput as b5, type LivenessInput as b6, type MediaCheckType as b7, type MediaKind as b8, type PhoneOtpInput as b9, type PopulationInput as ba, type PresignRequest as bb, type PresignUploadResult as bc, type RecordConsentResult as bd, type SessionStepView as be, type SessionView as bf, type SubmitCheckBody as bg, type SubmitOptions as bh, type UploadMedia as bi, stripMimeParams as bj, type ContactChannel as c, type DocReason as d, type EidAuthInput as e, type EidReason as f, type EmailOtpReason as g, type HostedAcceptedDocuments as h, type HostedBranding as i, type HostedBrandingColorKey as j, type HostedCaptureTuning as k, type HostedConsentView as l, type HostedDocumentCaptureTuning as m, type HostedDocumentScanTuning as n, type HostedEidView as o, type HostedEmailOtpView as p, type HostedFlowRef as q, type HostedIcaoPolicy as r, type HostedIntegrity as s, type HostedLivePhotoTuning as t, type HostedNativeCaptureTuning as u, type HostedOcrTuning as v, type HostedOtpView as w, type HostedPlanView as x, type HostedPortraitView as y, type HostedSessionView as z };