@sekyro/web 0.0.0-stage → 0.1.0-rc.10
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 +220 -0
- package/LICENSE +29 -0
- package/README.md +136 -2
- package/THIRD-PARTY-NOTICES.txt +154 -0
- package/dist/background-monitor-A7FKJOAG.js +1 -0
- package/dist/capture-constraints-B5omafmk.d.cts +44 -0
- package/dist/capture-constraints-B5omafmk.d.ts +44 -0
- package/dist/capture-session-doc-GK6G7JOI.js +1 -0
- package/dist/capture-session-v3-CmJw_bK0.d.cts +585 -0
- package/dist/capture-session-v3-DGG2stO6.d.ts +585 -0
- package/dist/chunk-3MSUJYBO.js +1 -0
- package/dist/chunk-7ZCZY3ZP.js +1 -0
- package/dist/chunk-A3FUGHAH.js +2 -0
- package/dist/chunk-BAGSM67V.js +1 -0
- package/dist/chunk-BPE5NSQ2.js +1 -0
- package/dist/chunk-CJHMFPL6.js +1 -0
- package/dist/chunk-DFTCAWMP.js +1 -0
- package/dist/chunk-DK5YPBDQ.js +1 -0
- package/dist/chunk-ETY6SAAZ.js +1 -0
- package/dist/chunk-FFDB6LQN.js +1 -0
- package/dist/chunk-FHJ7HO3M.js +1 -0
- package/dist/chunk-FPXL63KZ.js +1 -0
- package/dist/chunk-FUHDOEBP.js +1 -0
- package/dist/chunk-G6LKLN4U.js +1 -0
- package/dist/chunk-GI3UFGRQ.js +1 -0
- package/dist/chunk-HAO6EQTH.js +1 -0
- package/dist/chunk-HWAXEQD5.js +1 -0
- package/dist/chunk-MXWLCDFX.js +1 -0
- package/dist/chunk-O5WKNZ2C.js +1 -0
- package/dist/chunk-OKWG3PVH.js +1 -0
- package/dist/chunk-POIQGEZM.js +1 -0
- package/dist/chunk-RI3E7GBN.js +1 -0
- package/dist/chunk-SEC64KZ3.js +1 -0
- package/dist/chunk-SMKCBUJL.js +1 -0
- package/dist/chunk-SXZCL5NO.js +1 -0
- package/dist/chunk-SZ7YGNUZ.js +1 -0
- package/dist/chunk-TDLIXFDT.js +1 -0
- package/dist/chunk-UGMHAFEY.js +1 -0
- package/dist/chunk-WKJJEPWA.js +1 -0
- package/dist/chunk-XR64UFLK.js +1 -0
- package/dist/client/index.cjs +1 -0
- package/dist/client/index.d.cts +71 -0
- package/dist/client/index.d.ts +71 -0
- package/dist/client/index.js +1 -0
- package/dist/core/index.cjs +1 -0
- package/dist/core/index.d.cts +87 -0
- package/dist/core/index.d.ts +87 -0
- package/dist/core/index.js +1 -0
- package/dist/core/ocr/worker.bundle.js +42 -0
- package/dist/core/ocr/worker.cjs +42 -0
- package/dist/core/ocr/worker.d.cts +84 -0
- package/dist/core/ocr/worker.d.ts +84 -0
- package/dist/core/ocr/worker.js +41 -0
- package/dist/core/v3/detect-worker.cjs +1 -0
- package/dist/core/v3/detect-worker.d.cts +1 -0
- package/dist/core/v3/detect-worker.d.ts +1 -0
- package/dist/core/v3/detect-worker.js +1 -0
- package/dist/create-document-capture-IGUQP2NS.js +1 -0
- package/dist/create-portrait-capture-RJSFY37D.js +1 -0
- package/dist/create-verification-Bb20j6zk.d.ts +2968 -0
- package/dist/create-verification-CtqF4A9W.d.cts +2968 -0
- package/dist/detect-worker-DclNxkZT.d.cts +111 -0
- package/dist/detect-worker-DclNxkZT.d.ts +111 -0
- package/dist/detector-scanic-YCDNLCGV.js +1 -0
- package/dist/icao-gate-PWBMKRGC.js +1 -0
- package/dist/icao-gate-terzKYD7.d.cts +1770 -0
- package/dist/icao-gate-terzKYD7.d.ts +1770 -0
- package/dist/icao-tuning-4GGVX6B4.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +74 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.js +1 -0
- package/dist/internal/index.cjs +1 -0
- package/dist/internal/index.d.cts +462 -0
- package/dist/internal/index.d.ts +462 -0
- package/dist/internal/index.js +1 -0
- package/dist/keyframe-rank-YAJLYJYF.js +1 -0
- package/dist/landmarker-KB7LVXAU.js +1 -0
- package/dist/mrz-band-VYHOTDHY.js +1 -0
- package/dist/plan-runner-QCK2SOGS.js +1 -0
- package/dist/popup/index.cjs +1 -0
- package/dist/popup/index.d.cts +66 -0
- package/dist/popup/index.d.ts +66 -0
- package/dist/popup/index.js +1 -0
- package/dist/scanic-ml-stub-KW7IZHUT.js +1 -0
- package/dist/segmenter-USLNBX65.js +1 -0
- package/dist/turnstile-FATNZ4AG.js +1 -0
- package/package.json +133 -4
- package/sbom.cdx.json +195 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-CtqF4A9W.cjs';
|
|
2
|
+
export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorKind, g as CaptureState, h as CapturedArtifacts, i as CapturedDocument, j as CapturedPortrait, k as ChoiceOptionSnapshot, l as ChoiceSnapshot, m as ChoiceStepHandle, n as ContactChoiceSnapshot, o as ContactChoiceStepHandle, p as DEFAULT_API_ORIGIN, q as DOCUMENT_TYPE_ORDER, r as DeriveStepEnv, s as DocumentCaptureEvents, t as DocumentCaptureState, u as DocumentFeedback, v as DocumentFeedbackKey, w as DocumentGateUpdate, x as DocumentGuide, y as DocumentGuideMeasure, z as DocumentLiveMrzOptions, B as DocumentMrzUpdate, E as DocumentPoint, F as DocumentQuad, G as DocumentReticle, H as DocumentScanPhase, I as DocumentScanUpdate, J as DocumentSide, K as DocumentSnapshot, L as DocumentStepHandle, M as EidSnapshot, N as EidStepHandle, O as EmailOtpSnapshot, Q as EmailOtpStepHandle, R as EmailSource, S as GateHint, T as GateUpdate, U as ISSUER_CODES, V as IdentitySummarySnapshot, W as IdentitySummaryStepHandle, X as InLaneSwitch, Y as LivePhotoGateUpdate, Z as LivePhotoPlan, _ as LivenessAssetsStatus, $ as LivenessCaptureEvents, a0 as LivenessCaptureHandle, a1 as LivenessCaptureOptions, a2 as LivenessSnapshot, a3 as LivenessStartOptions, a4 as LivenessStepHandle, a5 as MethodSnapshot, a6 as MethodStepHandle, a7 as MobileRequiredSnapshot, a8 as MobileRequiredStepHandle, a9 as OtpChannel, aa as OtpNumberSource, ab as PLATFORM_UNSUPPORTED, ac as PhoneOtpSnapshot, ad as PhoneOtpStepHandle, ae as PlanChoiceSnapshot, af as PortraitCaptureEvents, ag as PortraitCaptureState, ah as PortraitGateUpdate, ai as PortraitSnapshot, aj as PortraitStartOptions, ak as PortraitStepHandle, al as PreloadLivenessAssetsOptions, am as ProcessingSnapshot, an as ProcessingStepHandle, ao as ReasonCode, ap as RegistrySnapshot, aq as RegistrySource, ar as RegistryStepHandle, as as ResultDisplay, at as ResultSnapshot, au as ResultStepHandle, av as SdkFailureReason, aw as StepAttempts, ax as StepContext, ay as StepSnapshot, az as UnsupportedReason, aA as UnsupportedSnapshot, aB as UnsupportedStepHandle, aC as Verification, aD as VerificationBusy, aE as VerificationEvents, aF as VerificationLocale, aG as VerificationOptions, aH as VerificationResult, aI as VerificationStatus, aJ as VerificationStep, aK as WEB_IDENTITY_METHODS, aL as acceptedIssuers, aM as acceptedTypesFor, aN as createLivenessCapture, aO as createVerification, aP as deriveStep, aQ as flagOf, aR as getLivenessAssetsStatus, aS as laneOf, aT as otherOptions, aU as preloadLivenessAssets, aV as releaseLivenessAssets, aW as resolveAcceptedDocuments, aX as sectionOf, aY as subscribeLivenessAssets } from './create-verification-CtqF4A9W.cjs';
|
|
3
|
+
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.cjs';
|
|
4
|
+
export { HostedApiError, HostedErrorDetails, HostedErrorIssue, KNOWN_CODES, KnownCode, icaoPolicyOf, isKnownCode } from './client/index.cjs';
|
|
5
|
+
export { A as AcceptedDocumentType, C as CaptureMode, a as CheckReason, b as CheckState, c as CheckType, d as ContactChannel, D as DecisionReason, e as DocReason, E as EidAfterPass, f as EidAuthInput, g as EidReason, h as EmailOtpReason, F as FaceMatchReason, H as HeadPose, i as HostedAcceptedDocuments, j as HostedBranding, k as HostedBrandingColorKey, l as HostedCaptureTuning, m as HostedConsentView, n as HostedDocumentCaptureTuning, o as HostedDocumentScanTuning, p as HostedEidView, q as HostedEmailOtpView, r as HostedFlowRef, s as HostedIcaoPolicy, t as HostedIntegrity, u as HostedLivePhotoTuning, v as HostedNativeCaptureTuning, w as HostedOcrTuning, x as HostedOtpView, y as HostedPlanView, z as HostedPortraitView, B as HostedSessionView, G as HostedStepView, I as HostedVoiceLocale, J as HostedVoiceView, K as IcaoCaptureTuning, L as IcaoCoachKey, M as IcaoCriterion, N as IcaoCriterionState, O as IcaoGateCriterion, P as IcaoGateSummary, Q as IcaoGateUpdate, R as IcaoReportEntry, S as IdentityConfirmDecision, T as IdentityMethod, U as IdentitySummarySource, V as IdentitySummaryView, W as LivenessReason, X as MatchReason, Y as MethodChoiceView, Z as NationalEidOption, _ as NfcChipReason, $ as NfcStepView, a0 as OtpChoiceView, a1 as PhoneOtpReason, a2 as PlanAttempts, a3 as PlanChoiceKind, a4 as PlanChoiceOption, a5 as PlanChoiceView, a6 as PlanSectionView, a7 as PlanStepView, a8 as PolicyFailureReason, a9 as PopulationReason, aa as PortraitIcaoInput, ab as PortraitIcaoReason, ac as SessionFailureReason, ad as SessionOutcome, ae as SessionStatus, af as StepSection } from './icao-gate-terzKYD7.cjs';
|
|
6
|
+
import './detect-worker-DclNxkZT.cjs';
|
|
7
|
+
import './capture-session-v3-CmJw_bK0.cjs';
|
|
8
|
+
|
|
9
|
+
/** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
|
|
10
|
+
type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
|
|
11
|
+
/** One-shot camera permission read. */
|
|
12
|
+
declare function queryCameraPermission(): Promise<CameraPermissionState>;
|
|
13
|
+
/**
|
|
14
|
+
* Subscribe to camera-permission changes; returns the unsubscribe function.
|
|
15
|
+
* Unlike {@link subscribeLivenessAssets}, it DOES emit the current state first
|
|
16
|
+
* (as soon as the Permissions API answers — asynchronously, `'unknown'` where
|
|
17
|
+
* unsupported), then on every change. Not a `useSyncExternalStore` source:
|
|
18
|
+
* there is no synchronous snapshot — drive a `useState` from it.
|
|
19
|
+
*/
|
|
20
|
+
declare function subscribeCameraPermission(listener: (state: CameraPermissionState) => void): () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Whether a front/back choice makes sense: phones and tablets (UA, incl. iPadOS's
|
|
23
|
+
* desktop UA) always have both; otherwise ≥ 2 `videoinput` devices. Before a
|
|
24
|
+
* permission was ever granted some desktops report a single placeholder — the
|
|
25
|
+
* in-capture switch remains available either way.
|
|
26
|
+
*/
|
|
27
|
+
declare function hasMultipleCameras(): Promise<boolean>;
|
|
28
|
+
|
|
29
|
+
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
30
|
+
declare class InvalidInputError extends Error {
|
|
31
|
+
readonly field: "phone" | "code" | "nni";
|
|
32
|
+
readonly kind: "format" | "check_digit";
|
|
33
|
+
constructor(field: "phone" | "code" | "nni", kind: "format" | "check_digit");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
37
|
+
* was submitted or billed): the phone OTP `channel` choice is `required`
|
|
38
|
+
* (several channels offered, none chosen) or `unavailable` (not one of the
|
|
39
|
+
* step's channels), or the email OTP `email` address has a bad `format`.
|
|
40
|
+
*/
|
|
41
|
+
declare class OtpInputError extends Error {
|
|
42
|
+
readonly field: "channel" | "email";
|
|
43
|
+
readonly kind: "format" | "required" | "unavailable";
|
|
44
|
+
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** `true` for exactly 10 ASCII digits whose value ≡ 1 (mod 97). */
|
|
48
|
+
declare function isValidNni(nni: string): boolean;
|
|
49
|
+
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
50
|
+
declare function normalizeNni(input: string): string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
|
|
54
|
+
* residence permits and passport data pages of any issuing country. Live camera
|
|
55
|
+
* only; `captured` delivers an upload-ready JPEG per face. The engine loads on
|
|
56
|
+
* the first `start()`.
|
|
57
|
+
*/
|
|
58
|
+
declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
|
|
59
|
+
/** Prefetch the document engine (call when the document step mounts). */
|
|
60
|
+
declare function warmDocumentCapture(): void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The ICAO portrait capture for sessions whose selfie is ICAO-checked
|
|
64
|
+
* (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
|
|
65
|
+
* per-criterion coaching (pose, eyes against the person's own baseline, mouth,
|
|
66
|
+
* framing, lighting, background, glare, resolution, sharpness) and an
|
|
67
|
+
* automatic full-resolution still once every criterion has held. The server
|
|
68
|
+
* re-checks every criterion. The engine loads on the first `start()`.
|
|
69
|
+
*/
|
|
70
|
+
declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
|
|
71
|
+
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
72
|
+
declare function warmPortraitCapture(): void;
|
|
73
|
+
|
|
74
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidNni, normalizeNni, queryCameraPermission, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-Bb20j6zk.js';
|
|
2
|
+
export { A as AcceptedDocumentsLike, C as CameraFacing, c as CaptureChannel, d as CaptureEngineId, e as CaptureError, f as CaptureErrorKind, g as CaptureState, h as CapturedArtifacts, i as CapturedDocument, j as CapturedPortrait, k as ChoiceOptionSnapshot, l as ChoiceSnapshot, m as ChoiceStepHandle, n as ContactChoiceSnapshot, o as ContactChoiceStepHandle, p as DEFAULT_API_ORIGIN, q as DOCUMENT_TYPE_ORDER, r as DeriveStepEnv, s as DocumentCaptureEvents, t as DocumentCaptureState, u as DocumentFeedback, v as DocumentFeedbackKey, w as DocumentGateUpdate, x as DocumentGuide, y as DocumentGuideMeasure, z as DocumentLiveMrzOptions, B as DocumentMrzUpdate, E as DocumentPoint, F as DocumentQuad, G as DocumentReticle, H as DocumentScanPhase, I as DocumentScanUpdate, J as DocumentSide, K as DocumentSnapshot, L as DocumentStepHandle, M as EidSnapshot, N as EidStepHandle, O as EmailOtpSnapshot, Q as EmailOtpStepHandle, R as EmailSource, S as GateHint, T as GateUpdate, U as ISSUER_CODES, V as IdentitySummarySnapshot, W as IdentitySummaryStepHandle, X as InLaneSwitch, Y as LivePhotoGateUpdate, Z as LivePhotoPlan, _ as LivenessAssetsStatus, $ as LivenessCaptureEvents, a0 as LivenessCaptureHandle, a1 as LivenessCaptureOptions, a2 as LivenessSnapshot, a3 as LivenessStartOptions, a4 as LivenessStepHandle, a5 as MethodSnapshot, a6 as MethodStepHandle, a7 as MobileRequiredSnapshot, a8 as MobileRequiredStepHandle, a9 as OtpChannel, aa as OtpNumberSource, ab as PLATFORM_UNSUPPORTED, ac as PhoneOtpSnapshot, ad as PhoneOtpStepHandle, ae as PlanChoiceSnapshot, af as PortraitCaptureEvents, ag as PortraitCaptureState, ah as PortraitGateUpdate, ai as PortraitSnapshot, aj as PortraitStartOptions, ak as PortraitStepHandle, al as PreloadLivenessAssetsOptions, am as ProcessingSnapshot, an as ProcessingStepHandle, ao as ReasonCode, ap as RegistrySnapshot, aq as RegistrySource, ar as RegistryStepHandle, as as ResultDisplay, at as ResultSnapshot, au as ResultStepHandle, av as SdkFailureReason, aw as StepAttempts, ax as StepContext, ay as StepSnapshot, az as UnsupportedReason, aA as UnsupportedSnapshot, aB as UnsupportedStepHandle, aC as Verification, aD as VerificationBusy, aE as VerificationEvents, aF as VerificationLocale, aG as VerificationOptions, aH as VerificationResult, aI as VerificationStatus, aJ as VerificationStep, aK as WEB_IDENTITY_METHODS, aL as acceptedIssuers, aM as acceptedTypesFor, aN as createLivenessCapture, aO as createVerification, aP as deriveStep, aQ as flagOf, aR as getLivenessAssetsStatus, aS as laneOf, aT as otherOptions, aU as preloadLivenessAssets, aV as releaseLivenessAssets, aW as resolveAcceptedDocuments, aX as sectionOf, aY as subscribeLivenessAssets } from './create-verification-Bb20j6zk.js';
|
|
3
|
+
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.js';
|
|
4
|
+
export { HostedApiError, HostedErrorDetails, HostedErrorIssue, KNOWN_CODES, KnownCode, icaoPolicyOf, isKnownCode } from './client/index.js';
|
|
5
|
+
export { A as AcceptedDocumentType, C as CaptureMode, a as CheckReason, b as CheckState, c as CheckType, d as ContactChannel, D as DecisionReason, e as DocReason, E as EidAfterPass, f as EidAuthInput, g as EidReason, h as EmailOtpReason, F as FaceMatchReason, H as HeadPose, i as HostedAcceptedDocuments, j as HostedBranding, k as HostedBrandingColorKey, l as HostedCaptureTuning, m as HostedConsentView, n as HostedDocumentCaptureTuning, o as HostedDocumentScanTuning, p as HostedEidView, q as HostedEmailOtpView, r as HostedFlowRef, s as HostedIcaoPolicy, t as HostedIntegrity, u as HostedLivePhotoTuning, v as HostedNativeCaptureTuning, w as HostedOcrTuning, x as HostedOtpView, y as HostedPlanView, z as HostedPortraitView, B as HostedSessionView, G as HostedStepView, I as HostedVoiceLocale, J as HostedVoiceView, K as IcaoCaptureTuning, L as IcaoCoachKey, M as IcaoCriterion, N as IcaoCriterionState, O as IcaoGateCriterion, P as IcaoGateSummary, Q as IcaoGateUpdate, R as IcaoReportEntry, S as IdentityConfirmDecision, T as IdentityMethod, U as IdentitySummarySource, V as IdentitySummaryView, W as LivenessReason, X as MatchReason, Y as MethodChoiceView, Z as NationalEidOption, _ as NfcChipReason, $ as NfcStepView, a0 as OtpChoiceView, a1 as PhoneOtpReason, a2 as PlanAttempts, a3 as PlanChoiceKind, a4 as PlanChoiceOption, a5 as PlanChoiceView, a6 as PlanSectionView, a7 as PlanStepView, a8 as PolicyFailureReason, a9 as PopulationReason, aa as PortraitIcaoInput, ab as PortraitIcaoReason, ac as SessionFailureReason, ad as SessionOutcome, ae as SessionStatus, af as StepSection } from './icao-gate-terzKYD7.js';
|
|
6
|
+
import './detect-worker-DclNxkZT.js';
|
|
7
|
+
import './capture-session-v3-DGG2stO6.js';
|
|
8
|
+
|
|
9
|
+
/** Camera permission as the Permissions API reports it; `'unknown'` where it cannot tell. */
|
|
10
|
+
type CameraPermissionState = "granted" | "prompt" | "denied" | "unknown";
|
|
11
|
+
/** One-shot camera permission read. */
|
|
12
|
+
declare function queryCameraPermission(): Promise<CameraPermissionState>;
|
|
13
|
+
/**
|
|
14
|
+
* Subscribe to camera-permission changes; returns the unsubscribe function.
|
|
15
|
+
* Unlike {@link subscribeLivenessAssets}, it DOES emit the current state first
|
|
16
|
+
* (as soon as the Permissions API answers — asynchronously, `'unknown'` where
|
|
17
|
+
* unsupported), then on every change. Not a `useSyncExternalStore` source:
|
|
18
|
+
* there is no synchronous snapshot — drive a `useState` from it.
|
|
19
|
+
*/
|
|
20
|
+
declare function subscribeCameraPermission(listener: (state: CameraPermissionState) => void): () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Whether a front/back choice makes sense: phones and tablets (UA, incl. iPadOS's
|
|
23
|
+
* desktop UA) always have both; otherwise ≥ 2 `videoinput` devices. Before a
|
|
24
|
+
* permission was ever granted some desktops report a single placeholder — the
|
|
25
|
+
* in-capture switch remains available either way.
|
|
26
|
+
*/
|
|
27
|
+
declare function hasMultipleCameras(): Promise<boolean>;
|
|
28
|
+
|
|
29
|
+
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
30
|
+
declare class InvalidInputError extends Error {
|
|
31
|
+
readonly field: "phone" | "code" | "nni";
|
|
32
|
+
readonly kind: "format" | "check_digit";
|
|
33
|
+
constructor(field: "phone" | "code" | "nni", kind: "format" | "check_digit");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
37
|
+
* was submitted or billed): the phone OTP `channel` choice is `required`
|
|
38
|
+
* (several channels offered, none chosen) or `unavailable` (not one of the
|
|
39
|
+
* step's channels), or the email OTP `email` address has a bad `format`.
|
|
40
|
+
*/
|
|
41
|
+
declare class OtpInputError extends Error {
|
|
42
|
+
readonly field: "channel" | "email";
|
|
43
|
+
readonly kind: "format" | "required" | "unavailable";
|
|
44
|
+
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** `true` for exactly 10 ASCII digits whose value ≡ 1 (mod 97). */
|
|
48
|
+
declare function isValidNni(nni: string): boolean;
|
|
49
|
+
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
50
|
+
declare function normalizeNni(input: string): string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The guided rear-camera document scanner for identity cards (ID-1 or ID-2),
|
|
54
|
+
* residence permits and passport data pages of any issuing country. Live camera
|
|
55
|
+
* only; `captured` delivers an upload-ready JPEG per face. The engine loads on
|
|
56
|
+
* the first `start()`.
|
|
57
|
+
*/
|
|
58
|
+
declare function createDocumentCapture(options: DocumentCaptureOptions): DocumentCaptureHandle;
|
|
59
|
+
/** Prefetch the document engine (call when the document step mounts). */
|
|
60
|
+
declare function warmDocumentCapture(): void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The ICAO portrait capture for sessions whose selfie is ICAO-checked
|
|
64
|
+
* (`icaoPolicyOf(view)` not null; pass its `policy`): front camera (a self capture), live
|
|
65
|
+
* per-criterion coaching (pose, eyes against the person's own baseline, mouth,
|
|
66
|
+
* framing, lighting, background, glare, resolution, sharpness) and an
|
|
67
|
+
* automatic full-resolution still once every criterion has held. The server
|
|
68
|
+
* re-checks every criterion. The engine loads on the first `start()`.
|
|
69
|
+
*/
|
|
70
|
+
declare function createPortraitCapture(options: PortraitCaptureOptions): PortraitCaptureHandle;
|
|
71
|
+
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
72
|
+
declare function warmPortraitCapture(): void;
|
|
73
|
+
|
|
74
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidNni, normalizeNni, queryCameraPermission, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as q,c as W}from"./chunk-SXZCL5NO.js";import{a as k,f as U,h as b,i as y,j as f,k as C,l as S,m as h,n as F,o as z,p as _,q as K,r as B,t as Y}from"./chunk-3MSUJYBO.js";import{w as l,x as m}from"./chunk-XR64UFLK.js";import{e as I,f as R,g as w,h as A,n as T}from"./chunk-ETY6SAAZ.js";import{b as g,c as x,d as L}from"./chunk-HAO6EQTH.js";import"./chunk-SZ7YGNUZ.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-FHJ7HO3M.js";import"./chunk-FPXL63KZ.js";import{a as V,b as M,c as N,f as G}from"./chunk-HWAXEQD5.js";import"./chunk-BAGSM67V.js";import"./chunk-OKWG3PVH.js";function Q(o){return/^\d{10}$/.test(o)&&Number(o)%97===1}function $(o){let e="";for(let i of o){let n=i.codePointAt(0)??0;n>=1632&&n<=1641?e+=String(n-1632):n>=1776&&n<=1785?e+=String(n-1776):i!==" "&&i!=="-"&&i!=="\xA0"&&(e+=i)}return e}var pe=y,se=f,ue=C,ce=S,de=h;var D=()=>import("./create-document-capture-IGUQP2NS.js");function P(o){let e=null,i=null,n=!1,s=null,c=null,d=[],r=(t,p)=>{t.off=p.on(t.event,t.handler)},a=()=>(i??(i=D().then(t=>{if(n)return null;let p=t.createDocumentCaptureInternal(o,{}).handle;for(let u of d)u.removed||r(u,p);return s!==null&&p.setSide(s),c!==null&&p.setGuide(c.guide),e=p,p})),i);return{get state(){return e?.state??"idle"},on:(t,p)=>{let u={event:t,handler:p,off:null,removed:!1};return d.push(u),e!==null&&r(u,e),()=>{u.removed=!0,u.off?.()}},start:async()=>{let t=await a();t!==null&&!n&&await t.start()},retry:()=>{e!==null?e.retry():a().then(t=>t?.start())},setSide:t=>{e!==null?e.setSide(t):s=t},shutter:()=>e?.shutter(),setTorch:t=>e?.setTorch(t),focusAt:(t,p)=>e?.focusAt(t,p),setGuide:t=>{e!==null?e.setGuide(t):c={guide:t}},destroy:()=>{n=!0,e?.destroy(),e=null,d.length=0}}}function v(){D().then(o=>o.warmDocumentCapture()).catch(()=>{})}function Ce(o){return P(o)}function Se(){v()}var H=()=>import("./create-portrait-capture-RJSFY37D.js");function O(o){let e=null,i=null,n=!1,s=[],c=(r,a)=>{r.off=a.on(r.event,r.handler)},d=()=>(i??(i=H().then(r=>{if(n)return null;let a=r.createPortraitCaptureInternal(o).handle;for(let t of s)t.removed||c(t,a);return e=a,a})),i);return{get state(){return e?.state??"idle"},get captureMode(){return e?.captureMode??"self"},get facingMode(){return e?.facingMode??"user"},on:(r,a)=>{let t={event:r,handler:a,off:null,removed:!1};return s.push(t),e!==null&&c(t,e),()=>{t.removed=!0,t.off?.()}},start:async r=>{let a=await d();a!==null&&!n&&await a.start(r)},retry:()=>{e!==null?e.retry():d().then(r=>r?.start())},switchCamera:()=>e?.switchCamera()??!1,destroy:()=>{n=!0,e?.destroy(),e=null,s.length=0}}}function E(){H().then(o=>o.warmPortraitCapture()).catch(()=>{})}function He(o){return O(o)}function Oe(){E()}export{k as DEFAULT_API_ORIGIN,pe as DOCUMENT_TYPE_ORDER,N as HostedApiError,b as ISSUER_CODES,l as InvalidInputError,V as KNOWN_CODES,m as OtpInputError,z as PLATFORM_UNSUPPORTED,q as SEKYRO_EVENTS,F as WEB_IDENTITY_METHODS,ue as acceptedIssuers,se as acceptedTypesFor,Ce as createDocumentCapture,T as createLivenessCapture,He as createPortraitCapture,U as createVerification,Y as deriveStep,de as flagOf,R as getLivenessAssetsStatus,L as hasMultipleCameras,G as icaoPolicyOf,M as isKnownCode,Q as isValidNni,K as laneOf,$ as normalizeNni,W as openHosted,B as otherOptions,I as preloadLivenessAssets,g as queryCameraPermission,A as releaseLivenessAssets,ce as resolveAcceptedDocuments,_ as sectionOf,x as subscribeCameraPermission,w as subscribeLivenessAssets,Se as warmDocumentCapture,Oe as warmPortraitCapture};
|