@sekyro/web 0.1.0-rc.2 → 0.1.0-rc.21

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 (133) hide show
  1. package/CHANGELOG.md +313 -0
  2. package/LICENSE +25 -16
  3. package/README.md +111 -60
  4. package/THIRD-PARTY-NOTICES.txt +154 -0
  5. package/dist/background-monitor-A7FKJOAG.js +1 -0
  6. package/dist/camera-trait-45MJTW4K.js +1 -0
  7. package/dist/capture-constraints-B5omafmk.d.cts +44 -0
  8. package/dist/capture-constraints-B5omafmk.d.ts +44 -0
  9. package/dist/capture-session-doc-XBZGXWOP.js +1 -0
  10. package/dist/{capture-session-v3-CAoWM8iT.d.cts → capture-session-v3-26FgzBIl.d.cts} +185 -15
  11. package/dist/{capture-session-v3-BJ8ciaWl.d.ts → capture-session-v3-ZO0QOeQH.d.ts} +185 -15
  12. package/dist/chunk-234OZEDB.js +1 -0
  13. package/dist/chunk-33KKMPJ5.js +1 -0
  14. package/dist/chunk-53POX7U4.js +1 -0
  15. package/dist/chunk-7Q4YPMAF.js +1 -0
  16. package/dist/chunk-A3FUGHAH.js +2 -0
  17. package/dist/chunk-B2X33ZW2.js +1 -0
  18. package/dist/chunk-CJHMFPL6.js +1 -0
  19. package/dist/chunk-CQ7SKLMC.js +1 -0
  20. package/dist/chunk-DFTCAWMP.js +1 -0
  21. package/dist/chunk-DK5YPBDQ.js +1 -0
  22. package/dist/chunk-FPXL63KZ.js +1 -0
  23. package/dist/chunk-FUHDOEBP.js +1 -0
  24. package/dist/chunk-G6LKLN4U.js +1 -0
  25. package/dist/chunk-GI3UFGRQ.js +1 -0
  26. package/dist/chunk-GT2ZLGF7.js +1 -0
  27. package/dist/chunk-H3HVCWLF.js +1 -0
  28. package/dist/chunk-MXWLCDFX.js +1 -0
  29. package/dist/chunk-O5WKNZ2C.js +1 -0
  30. package/dist/chunk-OKWG3PVH.js +1 -0
  31. package/dist/chunk-P3H3D33O.js +1 -0
  32. package/dist/chunk-P6UP4UQY.js +1 -0
  33. package/dist/chunk-POIQGEZM.js +1 -0
  34. package/dist/chunk-QYYJLXKA.js +1 -0
  35. package/dist/chunk-RI3E7GBN.js +1 -0
  36. package/dist/chunk-SMKCBUJL.js +1 -0
  37. package/dist/chunk-SNACCYTL.js +1 -0
  38. package/dist/chunk-TDLIXFDT.js +1 -0
  39. package/dist/chunk-TQB3URP2.js +1 -0
  40. package/dist/chunk-VIAT4DEA.js +1 -0
  41. package/dist/chunk-ZADZTM3M.js +1 -0
  42. package/dist/chunk-ZNIZACXD.js +1 -0
  43. package/dist/client/index.cjs +1 -357
  44. package/dist/client/index.d.cts +6 -37
  45. package/dist/client/index.d.ts +6 -37
  46. package/dist/client/index.js +1 -15
  47. package/dist/core/index.cjs +1 -1605
  48. package/dist/core/index.d.cts +5 -4
  49. package/dist/core/index.d.ts +5 -4
  50. package/dist/core/index.js +1 -139
  51. package/dist/core/ocr/worker.bundle.js +42 -0
  52. package/dist/core/ocr/worker.cjs +42 -0
  53. package/dist/core/ocr/worker.d.cts +84 -0
  54. package/dist/core/ocr/worker.d.ts +84 -0
  55. package/dist/core/ocr/worker.js +41 -0
  56. package/dist/core/v3/detect-worker.cjs +1 -392
  57. package/dist/core/v3/detect-worker.d.cts +1 -1
  58. package/dist/core/v3/detect-worker.d.ts +1 -1
  59. package/dist/core/v3/detect-worker.js +1 -13
  60. package/dist/create-document-capture-23R2F47A.js +1 -0
  61. package/dist/create-portrait-capture-AGFHECK7.js +1 -0
  62. package/dist/create-verification-CXhXxknV.d.cts +3313 -0
  63. package/dist/create-verification-KlHIU4Fy.d.ts +3313 -0
  64. package/dist/{detect-worker-CKXHlXx9.d.cts → detect-worker-DclNxkZT.d.cts} +6 -0
  65. package/dist/{detect-worker-CKXHlXx9.d.ts → detect-worker-DclNxkZT.d.ts} +6 -0
  66. package/dist/detector-scanic-YCDNLCGV.js +1 -0
  67. package/dist/icao-gate-DI8VePWd.d.ts +566 -0
  68. package/dist/icao-gate-DvzOzHq6.d.cts +566 -0
  69. package/dist/icao-gate-T3BTOKFJ.js +1 -0
  70. package/dist/icao-policy-DztbA50-.d.ts +71 -0
  71. package/dist/icao-policy-MRB8NMAu.d.cts +71 -0
  72. package/dist/icao-tuning-4ETMF53W.js +1 -0
  73. package/dist/index.cjs +1 -2636
  74. package/dist/index.d.cts +110 -5
  75. package/dist/index.d.ts +110 -5
  76. package/dist/index.js +1 -28
  77. package/dist/internal/index.cjs +1 -4166
  78. package/dist/internal/index.d.cts +369 -324
  79. package/dist/internal/index.d.ts +369 -324
  80. package/dist/internal/index.js +1 -647
  81. package/dist/keyframe-rank-YAJLYJYF.js +1 -0
  82. package/dist/landmarker-KB7LVXAU.js +1 -0
  83. package/dist/mrz-band-VYHOTDHY.js +1 -0
  84. package/dist/plan-runner-NUWONT7F.js +1 -0
  85. package/dist/popup/index.cjs +1 -76
  86. package/dist/popup/index.d.cts +8 -2
  87. package/dist/popup/index.d.ts +8 -2
  88. package/dist/popup/index.js +1 -11
  89. package/dist/print-AYSCRSZB.js +1 -0
  90. package/dist/scanic-ml-stub-KW7IZHUT.js +1 -0
  91. package/dist/segmenter-USLNBX65.js +1 -0
  92. package/dist/turnstile-FATNZ4AG.js +1 -0
  93. package/dist/types-C_XP92JQ.d.cts +1732 -0
  94. package/dist/types-C_XP92JQ.d.ts +1732 -0
  95. package/dist/upload-file-UYXOHCRG.js +1 -0
  96. package/package.json +27 -11
  97. package/sbom.cdx.json +234 -0
  98. package/dist/capture-constraints-BujkZcfb.d.cts +0 -21
  99. package/dist/capture-constraints-BujkZcfb.d.ts +0 -21
  100. package/dist/chunk-BPYVZUJA.js +0 -852
  101. package/dist/chunk-BPYVZUJA.js.map +0 -1
  102. package/dist/chunk-LOTAJDRE.js +0 -1094
  103. package/dist/chunk-LOTAJDRE.js.map +0 -1
  104. package/dist/chunk-MWNFSNMP.js +0 -52
  105. package/dist/chunk-MWNFSNMP.js.map +0 -1
  106. package/dist/chunk-NILNKLK6.js +0 -50
  107. package/dist/chunk-NILNKLK6.js.map +0 -1
  108. package/dist/chunk-NWF46H7K.js +0 -359
  109. package/dist/chunk-NWF46H7K.js.map +0 -1
  110. package/dist/chunk-WY6U7AIK.js +0 -193
  111. package/dist/chunk-WY6U7AIK.js.map +0 -1
  112. package/dist/chunk-YVFF4Q4G.js +0 -327
  113. package/dist/chunk-YVFF4Q4G.js.map +0 -1
  114. package/dist/client/index.cjs.map +0 -1
  115. package/dist/client/index.js.map +0 -1
  116. package/dist/core/index.cjs.map +0 -1
  117. package/dist/core/index.js.map +0 -1
  118. package/dist/core/v3/detect-worker.cjs.map +0 -1
  119. package/dist/core/v3/detect-worker.js.map +0 -1
  120. package/dist/create-verification-CjLnJ0w6.d.ts +0 -348
  121. package/dist/create-verification-EnZ13uY4.d.cts +0 -348
  122. package/dist/detector-scanic-4C6IEW2K.js +0 -787
  123. package/dist/detector-scanic-4C6IEW2K.js.map +0 -1
  124. package/dist/hosted-client-BpvBqu9f.d.cts +0 -408
  125. package/dist/hosted-client-BpvBqu9f.d.ts +0 -408
  126. package/dist/index.cjs.map +0 -1
  127. package/dist/index.js.map +0 -1
  128. package/dist/internal/index.cjs.map +0 -1
  129. package/dist/internal/index.js.map +0 -1
  130. package/dist/popup/index.cjs.map +0 -1
  131. package/dist/popup/index.js.map +0 -1
  132. package/dist/scanic-ml-stub-S2OZ6HEF.js +0 -10
  133. package/dist/scanic-ml-stub-S2OZ6HEF.js.map +0 -1
@@ -0,0 +1,71 @@
1
+ import { f as IcaoGateSummary } from './icao-gate-DvzOzHq6.cjs';
2
+ import { R as HostedSessionView, I as HostedIcaoPolicy, ar as PortraitIcaoInput } from './types-C_XP92JQ.cjs';
3
+
4
+ /**
5
+ * Every error code the hosted page can receive from the session-token surface.
6
+ * A closed string-literal union — switch over {@link KnownCode} with a `never`
7
+ * default arm for compile-checked exhaustiveness.
8
+ */
9
+ declare const KNOWN_CODES: readonly ["session_token_invalid", "session_token_required", "session_token_session_mismatch", "session_not_found", "rate_limit_exceeded", "consent_required", "session_not_active", "check_not_found", "check_already_finalized", "check_out_of_order", "check_type_unsupported", "force_outcome_forbidden", "attestation_invalid", "platform_unregistered", "app_attest_invalid", "too_many_challenges", "inference_unavailable", "mobile_required", "nni_locked", "document_nni_mismatch", "media_content_type_not_allowed", "media_too_large", "media_key_invalid", "media_key_forbidden", "media_not_found", "media_unreadable", "media_session_invalid", "idempotency_key_collision", "idempotency_in_progress", "idempotency_key_required", "validation_error", "internal_error", "unknown_error", "upload_failed", "network_error", "timeout", "nfc_outcome_not_accepted", "identity_confirm_required", "identity_confirm_locked", "choice_not_found", "choice_locked", "choice_option_unavailable", "step_not_on_path", "check_not_active", "sekyro_app_not_allowed", "sekyro_app_unverified", "id_number_locked", "document_id_number_mismatch", "simulated_capture_forbidden"];
10
+ /** Closed union of {@link KNOWN_CODES} — exhaustively switchable. */
11
+ type KnownCode = (typeof KNOWN_CODES)[number];
12
+ /** Narrow an arbitrary wire code to the known union (unknown codes stay `string`). */
13
+ declare function isKnownCode(code: string): code is KnownCode;
14
+ /** One machine-readable problem of an error's `details` (Sekyro flows spec §9.4). */
15
+ interface HostedErrorIssue {
16
+ code: string;
17
+ message: string;
18
+ /** The request field (`option`, `nodeId`, …). */
19
+ path?: string;
20
+ /** A node of the flow. */
21
+ nodeId?: string;
22
+ service?: string;
23
+ field?: string;
24
+ }
25
+ /** `details` of a flow error envelope (`choice_*`, `step_not_on_path`, …): the issues, and more per code. */
26
+ interface HostedErrorDetails {
27
+ issues: HostedErrorIssue[];
28
+ /** `override_widens_flow`: the widened fields. */
29
+ fields?: string[];
30
+ [key: string]: unknown;
31
+ }
32
+ /**
33
+ * Typed transport error: EVERY failure surfaces as one of these — non-2xx
34
+ * responses, rejected fetches, timeouts, and unparseable bodies alike. The
35
+ * hosted page never sees a raw TypeError/DOMException from the client.
36
+ *
37
+ * - `code` — the public envelope's `code`, or a client-synthesized fallback
38
+ * ('unknown_error' / 'upload_failed' / 'network_error' / 'timeout'). Typed
39
+ * `string` because the wire may grow codes; narrow with {@link isKnownCode}
40
+ * before an exhaustive switch.
41
+ * - `status` — the HTTP status, or 0 when no response arrived at all
42
+ * ('network_error' / 'timeout').
43
+ * - `retryAfterSeconds` — parsed from the `Retry-After` header when present
44
+ * (rate-limit 429s always set it).
45
+ * - `details` — the envelope's machine-readable `details` when present (flow
46
+ * errors: `issues[]`).
47
+ */
48
+ declare class HostedApiError extends Error {
49
+ readonly status: number;
50
+ readonly code: string;
51
+ readonly retryAfterSeconds?: number;
52
+ readonly details?: HostedErrorDetails;
53
+ constructor(args: {
54
+ status: number;
55
+ code: string;
56
+ message: string;
57
+ retryAfterSeconds?: number;
58
+ details?: HostedErrorDetails | undefined;
59
+ });
60
+ }
61
+
62
+ /** The session's ICAO policy and profile, or `null` when the selfie is not ICAO-checked. */
63
+ declare function icaoPolicyOf(view: Pick<HostedSessionView, "portrait"> | null | undefined): HostedIcaoPolicy | null;
64
+ /**
65
+ * The `gate` block of a `portrait_icao` body from the gate's summary: the eye
66
+ * baseline, the device verdict under the server's criterion names, and the
67
+ * background-uniformity numbers (telemetry).
68
+ */
69
+ declare function portraitIcaoGate(summary: IcaoGateSummary): NonNullable<PortraitIcaoInput["gate"]>;
70
+
71
+ export { HostedApiError as H, KNOWN_CODES as K, type HostedErrorDetails as a, type HostedErrorIssue as b, type KnownCode as c, isKnownCode as d, icaoPolicyOf as i, portraitIcaoGate as p };
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-33KKMPJ5.js";import"./chunk-GI3UFGRQ.js";export{a as ICAO_FALLBACK,b as resolveIcaoTuning};