@sekyro/web 0.1.0-rc.17 → 0.1.0-rc.19

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 (56) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +1 -2
  3. package/dist/{capture-session-doc-TATPATSZ.js → capture-session-doc-VXWWQEP4.js} +1 -1
  4. package/dist/{capture-session-v3-Dxus1Se9.d.ts → capture-session-v3-CFSVWYzi.d.ts} +13 -2
  5. package/dist/{capture-session-v3-DyUA2uCL.d.cts → capture-session-v3-Cs4yV3HJ.d.cts} +13 -2
  6. package/dist/chunk-4GJXUVZK.js +1 -0
  7. package/dist/chunk-5Y3UST3W.js +1 -0
  8. package/dist/chunk-64V55KD7.js +1 -0
  9. package/dist/chunk-6K4D3U6Q.js +1 -0
  10. package/dist/chunk-CQ7SKLMC.js +1 -0
  11. package/dist/{chunk-TWB4LTCE.js → chunk-JUEOHNVW.js} +1 -1
  12. package/dist/chunk-L45YTRJJ.js +1 -0
  13. package/dist/chunk-PLH6ZR6J.js +1 -0
  14. package/dist/chunk-RNJA5GDF.js +1 -0
  15. package/dist/chunk-ZO6IHP2I.js +1 -0
  16. package/dist/chunk-ZPXL26BF.js +1 -0
  17. package/dist/client/index.cjs +1 -1
  18. package/dist/client/index.d.cts +4 -4
  19. package/dist/client/index.d.ts +4 -4
  20. package/dist/client/index.js +1 -1
  21. package/dist/core/index.cjs +1 -1
  22. package/dist/core/index.d.cts +3 -3
  23. package/dist/core/index.d.ts +3 -3
  24. package/dist/core/index.js +1 -1
  25. package/dist/create-document-capture-FVSQPUF6.js +1 -0
  26. package/dist/create-portrait-capture-INDCF65X.js +1 -0
  27. package/dist/{create-verification-CIwl0NIg.d.cts → create-verification-1BrMZqPJ.d.cts} +82 -16
  28. package/dist/{create-verification-CNCMU1kK.d.ts → create-verification-CuoYJ3kj.d.ts} +82 -16
  29. package/dist/{icao-gate-5FzqyitT.d.ts → icao-gate-BSbyqLUh.d.ts} +25 -9
  30. package/dist/{icao-gate-C-lfjEpH.d.cts → icao-gate-D-wePfoV.d.cts} +25 -9
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.d.cts +6 -6
  33. package/dist/index.d.ts +6 -6
  34. package/dist/index.js +1 -1
  35. package/dist/internal/index.cjs +1 -1
  36. package/dist/internal/index.d.cts +6 -6
  37. package/dist/internal/index.d.ts +6 -6
  38. package/dist/internal/index.js +1 -1
  39. package/dist/plan-runner-WEUIMCYU.js +1 -0
  40. package/dist/{types-CKgMWVnP.d.cts → types-DPl0hsmI.d.cts} +29 -5
  41. package/dist/{types-CKgMWVnP.d.ts → types-DPl0hsmI.d.ts} +29 -5
  42. package/package.json +1 -1
  43. package/sbom.cdx.json +7 -7
  44. package/dist/chunk-2BFYVMUU.js +0 -1
  45. package/dist/chunk-3SL74TFR.js +0 -1
  46. package/dist/chunk-4RS4LP7D.js +0 -1
  47. package/dist/chunk-G6MU3B5V.js +0 -1
  48. package/dist/chunk-GYNWLJYW.js +0 -1
  49. package/dist/chunk-J4NL62VQ.js +0 -1
  50. package/dist/chunk-MMTOOH32.js +0 -1
  51. package/dist/chunk-QBPD7FRF.js +0 -1
  52. package/dist/chunk-SDWHJJ4W.js +0 -1
  53. package/dist/chunk-ULMH32G5.js +0 -1
  54. package/dist/create-document-capture-5FJI57YI.js +0 -1
  55. package/dist/create-portrait-capture-53XBURNT.js +0 -1
  56. package/dist/plan-runner-WRY4FOWW.js +0 -1
@@ -1,4 +1,4 @@
1
- import { H as HostedSessionView, C as ConsentLocale, a as HostedConsentView, b as CameraUnavailableCause, I as IdentityConfirmDecision, M as MediaKind, P as PresignUploadResult, c as CaptureContext, d as CompleteMediaResult, e as CheckType, f as CheckInputByType, g as IcaoCriterion, B as BackgroundUniformity, R as ResolvedIcaoTuning } from './types-CKgMWVnP.cjs';
1
+ import { H as HostedSessionView, C as ConsentLocale, a as HostedConsentView, b as CameraUnavailableCause, c as CaptureIssueReport, I as IdentityConfirmDecision, M as MediaKind, P as PresignUploadResult, d as CaptureContext, e as CompleteMediaResult, f as CheckType, g as CheckInputByType, h as IcaoCriterion, B as BackgroundUniformity, R as ResolvedIcaoTuning } from './types-DPl0hsmI.cjs';
2
2
 
3
3
  interface Point {
4
4
  x: number;
@@ -122,10 +122,11 @@ interface HostedClientOptions {
122
122
  /** Per-request timeout for API calls (NOT the Spaces PUT). Default 30 000 ms. */
123
123
  requestTimeoutMs?: number;
124
124
  /**
125
- * Tuning for the ONLY automatic retry the client performs: 409
126
- * `idempotency_in_progress` (a concurrent identical request is mid-flight
127
- * server-side; the real response lands once it finishes). `attempts` counts
128
- * retries AFTER the first try. Defaults: 5 × 400 ms.
125
+ * Tuning for the automatic retry on 409 `idempotency_in_progress` (a
126
+ * concurrent identical request is mid-flight server-side; the real response
127
+ * lands once it finishes). `attempts` counts retries AFTER the first try.
128
+ * Defaults: 5 × 400 ms. (The other automatic retry, once on a 503
129
+ * `server_busy` / `request_timeout`, is not tunable.)
129
130
  */
130
131
  inProgressRetry?: {
131
132
  attempts?: number;
@@ -156,8 +157,12 @@ interface HostedClientOptions {
156
157
  * `GET /hosted/session` (token-addressed) and lazily bootstraps it when a
157
158
  * `:id` route is called first.
158
159
  *
159
- * No automatic retry EXCEPT bounded short-delay retry on 409
160
- * `idempotency_in_progress`. Everything else — including 429 with its parsed
160
+ * Two automatic retries only: bounded short-delay retry on 409
161
+ * `idempotency_in_progress`, and ONE retry after `Retry-After` (capped at 3 s)
162
+ * on a 503 `server_busy` / `request_timeout` for the calls that are safe to
163
+ * repeat: the reads (`getSession`, `identityPortrait`), the naturally
164
+ * idempotent writes (`recordConsent`, `choose`) and `submitCheck` with an
165
+ * idempotency key. Everything else — including 429 with its parsed
161
166
  * `retryAfterSeconds` — is surfaced to the page to handle.
162
167
  */
163
168
  /**
@@ -177,6 +182,8 @@ declare class HostedClient {
177
182
  /** D8: prefetched capture nonces (`armCapture`), each with its local expiry. */
178
183
  private captureNonces;
179
184
  private captureFetch;
185
+ /** Capture issues already reported (see reportCaptureIssue). */
186
+ private readonly reportedIssues;
180
187
  constructor(opts: HostedClientOptions);
181
188
  /** Token-addressed bootstrap — the hosted page's first call. Caches the sessionId. */
182
189
  getSession(): Promise<HostedSessionView>;
@@ -193,6 +200,13 @@ declare class HostedClient {
193
200
  * `cause` (2026-10-30) says why (`denied` | `no_camera`); omitted, the body stays `{}` and nothing is recorded.
194
201
  */
195
202
  reportCameraUnavailable(cause?: CameraUnavailableCause): Promise<HostedSessionView>;
203
+ /**
204
+ * 2026-11-04: record a capture failure the page showed (`POST /hosted/capture-issue`, 204) so it can be diagnosed
205
+ * later. Fire-and-forget: never rejects, and every failure is swallowed. At most one report per distinct
206
+ * (check, attempt, kind, name, phase); a repeat resolves without a call. `name` is re-sanitised (letters only, at most
207
+ * 40 characters) and `engineKind` kept only when it is a lower-case code of at most 32 characters.
208
+ */
209
+ reportCaptureIssue(issue: CaptureIssueReport): Promise<void>;
196
210
  /**
197
211
  * Pick an option of the current choice (Sekyro flows §7.4): `plan.choice`'s
198
212
  * `nodeId` and one of its option ids. Returns the updated hosted view —
@@ -288,8 +302,10 @@ declare class HostedClient {
288
302
  * `{code, message}` → {@link HostedApiError} on non-2xx. EVERY failure is
289
303
  * typed: a rejected fetch → `network_error`, the timeout → `timeout`, an
290
304
  * unparseable 2xx body → `unknown_error` — the page never sees a raw
291
- * TypeError/DOMException. The ONLY automatic retry is 409
292
- * `idempotency_in_progress` (bounded, short delay).
305
+ * TypeError/DOMException. Automatic retries: 409 `idempotency_in_progress`
306
+ * (bounded, short delay), and ONE retry of a 503 `server_busy` /
307
+ * `request_timeout` after its `Retry-After` (capped at 3 s) when the call is
308
+ * safe to repeat: every GET, and a POST that sets `busyRetry`.
293
309
  */
294
310
  private api;
295
311
  }