@sekyro/web 0.1.0-rc.11 → 0.1.0-rc.13
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 +12 -0
- package/dist/{capture-session-doc-DMQ7T3HC.js → capture-session-doc-7LQAOCHJ.js} +1 -1
- package/dist/{capture-session-v3-DYrhYJoM.d.ts → capture-session-v3-C5DRPBhM.d.ts} +1 -1
- package/dist/{capture-session-v3-CCHws1mz.d.cts → capture-session-v3-Db4n6d-k.d.cts} +1 -1
- package/dist/chunk-57VOMVKM.js +1 -0
- package/dist/{chunk-LUKTHL6K.js → chunk-5OIC5TZS.js} +1 -1
- package/dist/{chunk-JDGEZ542.js → chunk-H6H2RT6M.js} +1 -1
- package/dist/{chunk-HHCGQSD4.js → chunk-IBA5CPDV.js} +1 -1
- package/dist/{chunk-IJLHPX35.js → chunk-JRSIMNB5.js} +1 -1
- package/dist/chunk-UBDG5IAP.js +1 -0
- package/dist/{chunk-OWU22VXP.js → chunk-VJM76LUI.js} +1 -1
- package/dist/chunk-WTQE6IGL.js +1 -0
- package/dist/chunk-XBVSYVKA.js +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +5 -5
- package/dist/client/index.d.ts +5 -5
- package/dist/client/index.js +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +1 -1
- package/dist/{create-document-capture-FV4XGUKQ.js → create-document-capture-RTFDQSBC.js} +1 -1
- package/dist/{create-verification-CzLrQjeM.d.cts → create-verification-BV_T0-CR.d.cts} +39 -13
- package/dist/{create-verification-CmJzn7sq.d.ts → create-verification-P6i3tyce.d.ts} +39 -13
- package/dist/{icao-gate-BeznQECA.d.cts → icao-gate-B0GDH_JS.d.cts} +13 -5
- package/dist/{icao-gate-Bw5sQVlt.d.ts → icao-gate-BP11XO-h.d.ts} +13 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +36 -10
- package/dist/index.d.ts +36 -10
- package/dist/index.js +1 -1
- package/dist/internal/index.cjs +1 -1
- package/dist/internal/index.d.cts +7 -6
- package/dist/internal/index.d.ts +7 -6
- package/dist/internal/index.js +1 -1
- package/dist/plan-runner-RVVF5DJV.js +1 -0
- package/dist/{types-BWyAHKt_.d.cts → types-DPWT_KMn.d.cts} +57 -14
- package/dist/{types-BWyAHKt_.d.ts → types-DPWT_KMn.d.ts} +57 -14
- package/package.json +1 -1
- package/sbom.cdx.json +7 -7
- package/dist/chunk-AHD4DA2V.js +0 -1
- package/dist/chunk-MXNZMTC2.js +0 -1
- package/dist/chunk-URUKV6NC.js +0 -1
- package/dist/chunk-V5K2JLC7.js +0 -1
- package/dist/plan-runner-ZVAY4FSB.js +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-
|
|
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 cameraUnavailableCauseOf, aO as createLivenessCapture, aP as createVerification, aQ as deriveStep, aR as flagOf, aS as getLivenessAssetsStatus, aT as laneOf, aU as otherOptions, aV as preloadLivenessAssets, aW as releaseLivenessAssets, aX as resolveAcceptedDocuments, aY as sectionOf, aZ as subscribeLivenessAssets } from './create-verification-
|
|
3
|
-
import { S as ScreenRampColour } from './types-
|
|
4
|
-
export { A as AcceptedDocumentType, b as CameraUnavailableCause,
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-BV_T0-CR.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 cameraUnavailableCauseOf, aO as createLivenessCapture, aP as createVerification, aQ as deriveStep, aR as flagOf, aS as getLivenessAssetsStatus, aT as laneOf, aU as otherOptions, aV as preloadLivenessAssets, aW as releaseLivenessAssets, aX as resolveAcceptedDocuments, aY as sectionOf, aZ as subscribeLivenessAssets } from './create-verification-BV_T0-CR.cjs';
|
|
3
|
+
import { S as ScreenRampColour } from './types-DPWT_KMn.cjs';
|
|
4
|
+
export { A as AcceptedDocumentType, h as AgeEstimationReason, b as CameraUnavailableCause, i as CaptureMode, j as CaptureProvenance, k as CheckReason, l as CheckState, e as CheckType, m as ContactChannel, D as DecisionReason, n as DocReason, E as EidAfterPass, o as EidAuthInput, p as EidReason, q as EmailOtpReason, F as FaceMatchReason, r as HostedAcceptedDocuments, s as HostedBranding, t as HostedBrandingColorKey, u as HostedCaptureTuning, a as HostedConsentView, v as HostedDocumentCaptureTuning, w as HostedDocumentScanTuning, x as HostedEidView, y as HostedEmailOtpView, z as HostedFlowRef, G as HostedIcaoPolicy, J as HostedIntegrity, K as HostedLivePhotoTuning, L as HostedLivenessCaptureTuning, N as HostedNativeCaptureTuning, O as HostedOcrTuning, Q as HostedOtpView, T as HostedPlanView, U as HostedPortraitView, H as HostedSessionView, V as HostedStepView, W as HostedVoiceLocale, X as HostedVoiceView, Y as IcaoCaptureTuning, g as IcaoCriterion, Z as IcaoReportEntry, I as IdentityConfirmDecision, _ as IdentityMethod, $ as IdentitySummarySource, a0 as IdentitySummaryView, a1 as LivenessReason, a2 as MatchReason, a3 as MethodChoiceView, a4 as NationalEidOption, a5 as NfcChipReason, a6 as NfcStepView, a7 as OtpChoiceView, a8 as PhoneOtpReason, a9 as PlanAttempts, aa as PlanChoiceKind, ab as PlanChoiceOption, ac as PlanChoiceView, ad as PlanSectionView, ae as PlanStepView, af as PolicyFailureReason, ag as PopulationReason, ah as PortraitIcaoInput, ai as PortraitIcaoReason, aj as RetakeHint, ak as ScreenRampChallenge, al as ScreenRampRendered, am as ScreenRampReport, an as SessionFailureReason, ao as SessionOutcome, ap as SessionStatus, aq as StepSection, ar as VerificationAssurance, as as VerificationLevel } from './types-DPWT_KMn.cjs';
|
|
5
5
|
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.cjs';
|
|
6
6
|
export { HostedApiError, HostedErrorDetails, HostedErrorIssue, KNOWN_CODES, KnownCode, icaoPolicyOf, isKnownCode } from './client/index.cjs';
|
|
7
|
-
export { H as HeadPose, I as IcaoCoachKey, a as IcaoCriterionState, b as IcaoGateCriterion, c as IcaoGateSummary, d as IcaoGateUpdate } from './icao-gate-
|
|
7
|
+
export { H as HeadPose, I as IcaoCoachKey, a as IcaoCriterionState, b as IcaoGateCriterion, c as IcaoGateSummary, d as IcaoGateUpdate } from './icao-gate-B0GDH_JS.cjs';
|
|
8
8
|
import './detect-worker-DclNxkZT.cjs';
|
|
9
|
-
import './capture-session-v3-
|
|
9
|
+
import './capture-session-v3-Db4n6d-k.cjs';
|
|
10
10
|
|
|
11
11
|
/** Each colour holds for 400 ms (the service measures the mean chroma per segment). */
|
|
12
12
|
declare const SCREEN_RAMP_SEGMENT_MS = 400;
|
|
@@ -37,11 +37,25 @@ declare function subscribeCameraPermission(listener: (state: CameraPermissionSta
|
|
|
37
37
|
*/
|
|
38
38
|
declare function hasMultipleCameras(): Promise<boolean>;
|
|
39
39
|
|
|
40
|
+
/** The document type of an ID number. @public */
|
|
41
|
+
type IdNumberType = "national_id" | "passport" | "residence_permit";
|
|
42
|
+
/** An ID number: the document type, the issuing country (ISO alpha-2) and the number. @public */
|
|
43
|
+
interface IdNumber {
|
|
44
|
+
type: IdNumberType;
|
|
45
|
+
/** ISO 3166-1 alpha-2 (alpha-3 accepted by {@link isValidIdNumber}). */
|
|
46
|
+
issuingCountry: string;
|
|
47
|
+
number: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
41
51
|
declare class InvalidInputError extends Error {
|
|
42
|
-
|
|
52
|
+
/**
|
|
53
|
+
* The refused input: `phone`, `code`, `idNumber` (the registry step's
|
|
54
|
+
* `submitIdNumber`) or `nni` (the deprecated `submitNni`, and the eID identifier).
|
|
55
|
+
*/
|
|
56
|
+
readonly field: "phone" | "code" | "idNumber" | "nni";
|
|
43
57
|
readonly kind: "format" | "check_digit";
|
|
44
|
-
constructor(field: "phone" | "code" | "nni", kind: "format" | "check_digit");
|
|
58
|
+
constructor(field: "phone" | "code" | "idNumber" | "nni", kind: "format" | "check_digit");
|
|
45
59
|
}
|
|
46
60
|
/**
|
|
47
61
|
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
@@ -55,9 +69,21 @@ declare class OtpInputError extends Error {
|
|
|
55
69
|
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
56
70
|
}
|
|
57
71
|
|
|
58
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* `true` when the number passes its issuing country's rule after normalizing (an MR
|
|
74
|
+
* national ID: 10 digits whose value is 1 mod 97; any other row: 1 to 40 letters,
|
|
75
|
+
* digits, spaces or hyphens). `issuingCountry` is alpha-2 or alpha-3; an unknown
|
|
76
|
+
* country uses the generic rule.
|
|
77
|
+
*/
|
|
78
|
+
declare function isValidIdNumber(id: IdNumber): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Use `isValidIdNumber({ type: "national_id", issuingCountry: "MR", number })`.
|
|
81
|
+
* `true` for exactly 10 ASCII digits whose value is 1 (mod 97), the Mauritanian national ID rule.
|
|
82
|
+
*/
|
|
59
83
|
declare function isValidNni(nni: string): boolean;
|
|
60
84
|
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
85
|
+
declare function normalizeDigits(input: string): string;
|
|
86
|
+
/** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
|
|
61
87
|
declare function normalizeNni(input: string): string;
|
|
62
88
|
|
|
63
89
|
/**
|
|
@@ -82,4 +108,4 @@ declare function createPortraitCapture(options: PortraitCaptureOptions): Portrai
|
|
|
82
108
|
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
83
109
|
declare function warmPortraitCapture(): void;
|
|
84
110
|
|
|
85
|
-
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidNni, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
|
111
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-
|
|
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 cameraUnavailableCauseOf, aO as createLivenessCapture, aP as createVerification, aQ as deriveStep, aR as flagOf, aS as getLivenessAssetsStatus, aT as laneOf, aU as otherOptions, aV as preloadLivenessAssets, aW as releaseLivenessAssets, aX as resolveAcceptedDocuments, aY as sectionOf, aZ as subscribeLivenessAssets } from './create-verification-
|
|
3
|
-
import { S as ScreenRampColour } from './types-
|
|
4
|
-
export { A as AcceptedDocumentType, b as CameraUnavailableCause,
|
|
1
|
+
import { D as DocumentCaptureOptions, a as DocumentCaptureHandle, P as PortraitCaptureOptions, b as PortraitCaptureHandle } from './create-verification-P6i3tyce.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 cameraUnavailableCauseOf, aO as createLivenessCapture, aP as createVerification, aQ as deriveStep, aR as flagOf, aS as getLivenessAssetsStatus, aT as laneOf, aU as otherOptions, aV as preloadLivenessAssets, aW as releaseLivenessAssets, aX as resolveAcceptedDocuments, aY as sectionOf, aZ as subscribeLivenessAssets } from './create-verification-P6i3tyce.js';
|
|
3
|
+
import { S as ScreenRampColour } from './types-DPWT_KMn.js';
|
|
4
|
+
export { A as AcceptedDocumentType, h as AgeEstimationReason, b as CameraUnavailableCause, i as CaptureMode, j as CaptureProvenance, k as CheckReason, l as CheckState, e as CheckType, m as ContactChannel, D as DecisionReason, n as DocReason, E as EidAfterPass, o as EidAuthInput, p as EidReason, q as EmailOtpReason, F as FaceMatchReason, r as HostedAcceptedDocuments, s as HostedBranding, t as HostedBrandingColorKey, u as HostedCaptureTuning, a as HostedConsentView, v as HostedDocumentCaptureTuning, w as HostedDocumentScanTuning, x as HostedEidView, y as HostedEmailOtpView, z as HostedFlowRef, G as HostedIcaoPolicy, J as HostedIntegrity, K as HostedLivePhotoTuning, L as HostedLivenessCaptureTuning, N as HostedNativeCaptureTuning, O as HostedOcrTuning, Q as HostedOtpView, T as HostedPlanView, U as HostedPortraitView, H as HostedSessionView, V as HostedStepView, W as HostedVoiceLocale, X as HostedVoiceView, Y as IcaoCaptureTuning, g as IcaoCriterion, Z as IcaoReportEntry, I as IdentityConfirmDecision, _ as IdentityMethod, $ as IdentitySummarySource, a0 as IdentitySummaryView, a1 as LivenessReason, a2 as MatchReason, a3 as MethodChoiceView, a4 as NationalEidOption, a5 as NfcChipReason, a6 as NfcStepView, a7 as OtpChoiceView, a8 as PhoneOtpReason, a9 as PlanAttempts, aa as PlanChoiceKind, ab as PlanChoiceOption, ac as PlanChoiceView, ad as PlanSectionView, ae as PlanStepView, af as PolicyFailureReason, ag as PopulationReason, ah as PortraitIcaoInput, ai as PortraitIcaoReason, aj as RetakeHint, ak as ScreenRampChallenge, al as ScreenRampRendered, am as ScreenRampReport, an as SessionFailureReason, ao as SessionOutcome, ap as SessionStatus, aq as StepSection, ar as VerificationAssurance, as as VerificationLevel } from './types-DPWT_KMn.js';
|
|
5
5
|
export { OpenHostedOptions, PopupBlocked, PopupHandle, SEKYRO_EVENTS, SekyroEvent, SekyroEventName, openHosted } from './popup/index.js';
|
|
6
6
|
export { HostedApiError, HostedErrorDetails, HostedErrorIssue, KNOWN_CODES, KnownCode, icaoPolicyOf, isKnownCode } from './client/index.js';
|
|
7
|
-
export { H as HeadPose, I as IcaoCoachKey, a as IcaoCriterionState, b as IcaoGateCriterion, c as IcaoGateSummary, d as IcaoGateUpdate } from './icao-gate-
|
|
7
|
+
export { H as HeadPose, I as IcaoCoachKey, a as IcaoCriterionState, b as IcaoGateCriterion, c as IcaoGateSummary, d as IcaoGateUpdate } from './icao-gate-BP11XO-h.js';
|
|
8
8
|
import './detect-worker-DclNxkZT.js';
|
|
9
|
-
import './capture-session-v3-
|
|
9
|
+
import './capture-session-v3-C5DRPBhM.js';
|
|
10
10
|
|
|
11
11
|
/** Each colour holds for 400 ms (the service measures the mean chroma per segment). */
|
|
12
12
|
declare const SCREEN_RAMP_SEGMENT_MS = 400;
|
|
@@ -37,11 +37,25 @@ declare function subscribeCameraPermission(listener: (state: CameraPermissionSta
|
|
|
37
37
|
*/
|
|
38
38
|
declare function hasMultipleCameras(): Promise<boolean>;
|
|
39
39
|
|
|
40
|
+
/** The document type of an ID number. @public */
|
|
41
|
+
type IdNumberType = "national_id" | "passport" | "residence_permit";
|
|
42
|
+
/** An ID number: the document type, the issuing country (ISO alpha-2) and the number. @public */
|
|
43
|
+
interface IdNumber {
|
|
44
|
+
type: IdNumberType;
|
|
45
|
+
/** ISO 3166-1 alpha-2 (alpha-3 accepted by {@link isValidIdNumber}). */
|
|
46
|
+
issuingCountry: string;
|
|
47
|
+
number: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
/** A step action refused its input before any network call (nothing was submitted or billed). */
|
|
41
51
|
declare class InvalidInputError extends Error {
|
|
42
|
-
|
|
52
|
+
/**
|
|
53
|
+
* The refused input: `phone`, `code`, `idNumber` (the registry step's
|
|
54
|
+
* `submitIdNumber`) or `nni` (the deprecated `submitNni`, and the eID identifier).
|
|
55
|
+
*/
|
|
56
|
+
readonly field: "phone" | "code" | "idNumber" | "nni";
|
|
43
57
|
readonly kind: "format" | "check_digit";
|
|
44
|
-
constructor(field: "phone" | "code" | "nni", kind: "format" | "check_digit");
|
|
58
|
+
constructor(field: "phone" | "code" | "idNumber" | "nni", kind: "format" | "check_digit");
|
|
45
59
|
}
|
|
46
60
|
/**
|
|
47
61
|
* An OTP step action refused its input before any network call (Plan 8; nothing
|
|
@@ -55,9 +69,21 @@ declare class OtpInputError extends Error {
|
|
|
55
69
|
constructor(field: "channel" | "email", kind: "format" | "required" | "unavailable");
|
|
56
70
|
}
|
|
57
71
|
|
|
58
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* `true` when the number passes its issuing country's rule after normalizing (an MR
|
|
74
|
+
* national ID: 10 digits whose value is 1 mod 97; any other row: 1 to 40 letters,
|
|
75
|
+
* digits, spaces or hyphens). `issuingCountry` is alpha-2 or alpha-3; an unknown
|
|
76
|
+
* country uses the generic rule.
|
|
77
|
+
*/
|
|
78
|
+
declare function isValidIdNumber(id: IdNumber): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Use `isValidIdNumber({ type: "national_id", issuingCountry: "MR", number })`.
|
|
81
|
+
* `true` for exactly 10 ASCII digits whose value is 1 (mod 97), the Mauritanian national ID rule.
|
|
82
|
+
*/
|
|
59
83
|
declare function isValidNni(nni: string): boolean;
|
|
60
84
|
/** Strip spaces and dashes; map Arabic-Indic (U+0660–0669) and extended (U+06F0–06F9) digits to ASCII. */
|
|
85
|
+
declare function normalizeDigits(input: string): string;
|
|
86
|
+
/** @deprecated Use {@link normalizeDigits} (the same function; it also serves OTP and eID codes). */
|
|
61
87
|
declare function normalizeNni(input: string): string;
|
|
62
88
|
|
|
63
89
|
/**
|
|
@@ -82,4 +108,4 @@ declare function createPortraitCapture(options: PortraitCaptureOptions): Portrai
|
|
|
82
108
|
/** Prefetch the portrait engine (call when the portrait step mounts). */
|
|
83
109
|
declare function warmPortraitCapture(): void;
|
|
84
110
|
|
|
85
|
-
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidNni, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
|
111
|
+
export { type CameraPermissionState, DocumentCaptureHandle, DocumentCaptureOptions, type IdNumber, type IdNumberType, InvalidInputError, OtpInputError, PortraitCaptureHandle, PortraitCaptureOptions, SCREEN_RAMP_COLOURS, SCREEN_RAMP_END_MS, SCREEN_RAMP_SEGMENT_MS, ScreenRampColour, createDocumentCapture, createPortraitCapture, hasMultipleCameras, isValidIdNumber, isValidNni, normalizeDigits, normalizeNni, queryCameraPermission, screenRampColourValue, subscribeCameraPermission, warmDocumentCapture, warmPortraitCapture };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $,c as
|
|
1
|
+
import{a as $,c as ee}from"./chunk-U6TYL2IJ.js";import{a as Z,f as Y,h as z,i as C,j as f,k as y,l as h,m as P,n as W,o as J,p as q,q as Q,r as X,t as j}from"./chunk-WTQE6IGL.js";import{x as m,y as S}from"./chunk-UBDG5IAP.js";import{e as V,f as G,g as U,h as B,n as K}from"./chunk-JRSIMNB5.js";import{b as T,c as x,d as b}from"./chunk-GT2ZLGF7.js";import{g as L,h as O,i as I,j as N}from"./chunk-IBA5CPDV.js";import"./chunk-FUHDOEBP.js";import"./chunk-POIQGEZM.js";import"./chunk-FHJ7HO3M.js";import"./chunk-FPXL63KZ.js";import{a as F,b as w,c as k,g as _}from"./chunk-57VOMVKM.js";import"./chunk-5OIC5TZS.js";import"./chunk-OKWG3PVH.js";function te(e){if(e==="permission")return"denied";if(e==="notfound"||e==="insecure"||e==="unsupported")return"no_camera"}var oe=/^[A-Z0-9][A-Z0-9 -]{0,39}$/,ne=Object.freeze({normalize:e=>e.trim().toUpperCase().replace(/\s+/g," "),check:e=>oe.test(e),registrySources:Object.freeze([]),describe:"number must be 1 to 40 letters, digits, spaces or hyphens"});function re(e){return typeof e=="string"&&/^\d{10}$/.test(e)&&Number(e)%97===1}var ie=Object.freeze({normalize:e=>e.trim(),check:e=>re(e),registrySources:Object.freeze(["MR.anrpts"]),describe:"number must be the 10-digit Mauritanian national ID number with a valid check digit"}),ae=Object.freeze({"MR:national_id":ie});function l(e,t){return ae[`${e.toUpperCase()}:${t}`]??ne}var se=Object.freeze({MRT:"MR"});function R(e,t){let n=e.trim().toUpperCase();return l(se[n]??n,t)}function pe(e){let t=R(e.issuingCountry,e.type);return t.check(t.normalize(e.number))}function ue(e){return l("MR","national_id").check(e)}function v(e){let t="";for(let n of e){let r=n.codePointAt(0)??0;r>=1632&&r<=1641?t+=String(r-1632):r>=1776&&r<=1785?t+=String(r-1776):n!==" "&&n!=="-"&&n!==" "&&(t+=n)}return t}function de(e){return v(e)}var De=C,Le=f,Oe=y,Ie=h,Ne=P;var g=()=>import("./create-document-capture-RTFDQSBC.js");function M(e){let t=null,n=null,r=!1,p=null,d=null,c=[],i=(o,s)=>{o.off=s.on(o.event,o.handler)},a=()=>(n??(n=g().then(o=>{if(r)return null;let s=o.createDocumentCaptureInternal(e,{}).handle;for(let u of c)u.removed||i(u,s);return p!==null&&s.setSide(p),d!==null&&s.setGuide(d.guide),t=s,s})),n);return{get state(){return t?.state??"idle"},on:(o,s)=>{let u={event:o,handler:s,off:null,removed:!1};return c.push(u),t!==null&&i(u,t),()=>{u.removed=!0,u.off?.()}},start:async()=>{let o=await a();o!==null&&!r&&await o.start()},retry:()=>{t!==null?t.retry():a().then(o=>o?.start())},setSide:o=>{t!==null?t.setSide(o):p=o},shutter:()=>t?.shutter(),setTorch:o=>t?.setTorch(o),focusAt:(o,s)=>t?.focusAt(o,s),setGuide:o=>{t!==null?t.setGuide(o):d={guide:o}},destroy:()=>{r=!0,t?.destroy(),t=null,c.length=0}}}function E(){g().then(e=>e.warmDocumentCapture()).catch(()=>{})}function Ge(e){return M(e)}function Ue(){E()}var A=()=>import("./create-portrait-capture-C462EIB6.js");function H(e){let t=null,n=null,r=!1,p=[],d=(i,a)=>{i.off=a.on(i.event,i.handler)},c=()=>(n??(n=A().then(i=>{if(r)return null;let a=i.createPortraitCaptureInternal(e).handle;for(let o of p)o.removed||d(o,a);return t=a,a})),n);return{get state(){return t?.state??"idle"},get captureMode(){return t?.captureMode??"self"},get facingMode(){return t?.facingMode??"user"},on:(i,a)=>{let o={event:i,handler:a,off:null,removed:!1};return p.push(o),t!==null&&d(o,t),()=>{o.removed=!0,o.off?.()}},start:async i=>{let a=await c();a!==null&&!r&&await a.start(i)},retry:()=>{t!==null?t.retry():c().then(i=>i?.start())},switchCamera:()=>t?.switchCamera()??!1,destroy:()=>{r=!0,t?.destroy(),t=null,p.length=0}}}function D(){A().then(e=>e.warmPortraitCapture()).catch(()=>{})}function ke(e){return H(e)}function _e(){D()}export{Z as DEFAULT_API_ORIGIN,De as DOCUMENT_TYPE_ORDER,k as HostedApiError,z as ISSUER_CODES,m as InvalidInputError,F as KNOWN_CODES,S as OtpInputError,J as PLATFORM_UNSUPPORTED,I as SCREEN_RAMP_COLOURS,O as SCREEN_RAMP_END_MS,L as SCREEN_RAMP_SEGMENT_MS,$ as SEKYRO_EVENTS,W as WEB_IDENTITY_METHODS,Oe as acceptedIssuers,Le as acceptedTypesFor,te as cameraUnavailableCauseOf,Ge as createDocumentCapture,K as createLivenessCapture,ke as createPortraitCapture,Y as createVerification,j as deriveStep,Ne as flagOf,G as getLivenessAssetsStatus,b as hasMultipleCameras,_ as icaoPolicyOf,w as isKnownCode,pe as isValidIdNumber,ue as isValidNni,Q as laneOf,v as normalizeDigits,de as normalizeNni,ee as openHosted,X as otherOptions,V as preloadLivenessAssets,T as queryCameraPermission,B as releaseLivenessAssets,Ie as resolveAcceptedDocuments,N as screenRampColourValue,q as sectionOf,x as subscribeCameraPermission,U as subscribeLivenessAssets,Ue as warmDocumentCapture,_e as warmPortraitCapture};
|