@sekyro/web 0.1.0-rc.25 → 0.1.0-rc.27
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 +16 -0
- package/dist/{capture-session-doc-O33KRXH7.js → capture-session-doc-FRBI7OKF.js} +1 -1
- package/dist/{capture-session-v3-C0bbHvDc.d.ts → capture-session-v3-CjaciYJQ.d.ts} +1 -1
- package/dist/{capture-session-v3-BoGn8vLv.d.cts → capture-session-v3-DZmmTeDY.d.cts} +1 -1
- package/dist/chunk-3XVIDHFY.js +3 -0
- package/dist/{chunk-MXWLCDFX.js → chunk-4DEPREJ3.js} +1 -1
- package/dist/{chunk-7HV77AOV.js → chunk-C5FD3ADY.js} +1 -1
- package/dist/{chunk-24F6JCVH.js → chunk-HLV2XYHX.js} +1 -1
- package/dist/{chunk-TDLIXFDT.js → chunk-NFHLJOHW.js} +1 -1
- package/dist/chunk-SDDM5ZTK.js +1 -0
- package/dist/{chunk-EHKCOBE2.js → chunk-U3JUGEIW.js} +1 -1
- package/dist/chunk-VXHK5YC6.js +1 -0
- package/dist/{chunk-DIKSFEYQ.js → chunk-Y5ZLVLCU.js} +1 -1
- package/dist/{chunk-J4S3QMK6.js → chunk-ZCOWTM46.js} +1 -1
- package/dist/{chunk-4ESM6SSR.js → chunk-ZCZ2E2YN.js} +1 -1
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- 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-2YBCDEUB.js +1 -0
- package/dist/{create-verification-DOBYRCV_.d.ts → create-verification-ClZ9Nvop.d.ts} +234 -123
- package/dist/{create-verification-D5CrT5f5.d.cts → create-verification-CnsFqT2E.d.cts} +234 -123
- package/dist/{detector-scanic-YCDNLCGV.js → detector-scanic-23DAYT3H.js} +1 -1
- package/dist/{icao-gate-CJPTgKFb.d.ts → icao-gate-DWexlqVW.d.ts} +1 -1
- package/dist/{icao-gate-DGtY696t.d.cts → icao-gate-Dfpj4nT4.d.cts} +1 -1
- package/dist/{icao-policy-Bm0rG91t.d.cts → icao-policy-BnXH_-WM.d.cts} +2 -2
- package/dist/{icao-policy-D8domgld.d.ts → icao-policy-eLrX6Twc.d.ts} +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +1 -1
- package/dist/internal/index.cjs +3 -3
- package/dist/internal/index.d.cts +68 -64
- package/dist/internal/index.d.ts +68 -64
- package/dist/internal/index.js +1 -1
- package/dist/plan-runner-KQM7I4MR.js +1 -0
- package/dist/popup/index.d.cts +2 -2
- package/dist/popup/index.d.ts +2 -2
- package/dist/popup/index.js +1 -1
- package/dist/{types-ZBcpvLdo.d.ts → types-BGUwaKjk.d.cts} +138 -16
- package/dist/{types-ZBcpvLdo.d.cts → types-BGUwaKjk.d.ts} +138 -16
- package/dist/upload-file-EGXXM6TQ.js +1 -0
- package/package.json +1 -1
- package/sbom.cdx.json +10 -10
- package/dist/chunk-6XXMWK72.js +0 -1
- package/dist/chunk-GLXOSYBH.js +0 -3
- package/dist/chunk-MGO2ME5X.js +0 -1
- package/dist/create-document-capture-OLKNUVTU.js +0 -1
- package/dist/plan-runner-VKPRZ3AD.js +0 -1
- package/dist/upload-file-UYXOHCRG.js +0 -1
- /package/dist/{chunk-LJYMZQY2.js → chunk-GFJATPUR.js} +0 -0
|
@@ -271,13 +271,19 @@ interface SessionDecidingStep {
|
|
|
271
271
|
service: string;
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
274
|
-
* What a finished session proved
|
|
275
|
-
*
|
|
276
|
-
* independent source; `0` on a `not_verified` session.
|
|
274
|
+
* What a finished session proved: `1` Contact, `2` Human, `3` Identity; `0`
|
|
275
|
+
* when nothing was proven.
|
|
277
276
|
*/
|
|
278
277
|
type VerificationLevel = 0 | 1 | 2 | 3;
|
|
279
|
-
/**
|
|
280
|
-
|
|
278
|
+
/**
|
|
279
|
+
* How a session's {@link VerificationLevel} was proved, weakest first. Level 1
|
|
280
|
+
* Contact: `device_only`, `contact_email`, `contact_phone`, `unbound_identity`
|
|
281
|
+
* (identity data with no live face matched to it). Level 2 Human: `live_only`,
|
|
282
|
+
* `live_unique`. Level 3 Identity: `supplied_biometric`, `document_biometric`,
|
|
283
|
+
* `eid_authenticated`, `chip_biometric`, `registry_biometric`. To require a
|
|
284
|
+
* particular proof, compare with a list of accepted values on your server.
|
|
285
|
+
*/
|
|
286
|
+
type VerificationAssurance = "device_only" | "contact_email" | "contact_phone" | "unbound_identity" | "live_only" | "live_unique" | "supplied_biometric" | "document_biometric" | "eid_authenticated" | "chip_biometric" | "registry_biometric";
|
|
281
287
|
/** Per-check seven-state machine (spec §4.3). */
|
|
282
288
|
type CheckState = "pending" | "input_required" | "processing" | "passed" | "failed" | "review" | "skipped";
|
|
283
289
|
/**
|
|
@@ -286,7 +292,9 @@ type CheckState = "pending" | "input_required" | "processing" | "passed" | "fail
|
|
|
286
292
|
* profile v2 §4.6.5) confirms an email address with a one-time code;
|
|
287
293
|
* `eid_auth` (SDK spec §3.2) is the national eID sign-in (Houwiyeti in MR).
|
|
288
294
|
*/
|
|
289
|
-
type CheckType = "liveness" | "face_match" | "doc_ocr" | "population_registry" | "phone_otp" | "nfc_chip" | "email_otp" | "portrait_icao" | "eid_auth"
|
|
295
|
+
type CheckType = "liveness" | "face_match" | "doc_ocr" | "population_registry" | "phone_otp" | "nfc_chip" | "email_otp" | "portrait_icao" | "eid_auth"
|
|
296
|
+
/** Spec 2026-11-10 §5: the proof of address step (a bill or statement, images or one PDF). */
|
|
297
|
+
| "poa";
|
|
290
298
|
type LivenessReason = "no_face" | "media_unreadable" | "clip_too_short" | "spoof_detected" | "review_band" | "liveness_inconclusive" | "device_integrity_failed" | "mobile_required" | "capture_back_camera" | "capture_not_upright" | "capture_front_camera" | "multiple_faces" | "camera_unavailable";
|
|
291
299
|
type PopulationReason = "registry_record_not_found" | "nni_not_found" | "id_number_invalid" | "nni_invalid" | "registry_unavailable" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "id_number_recheck" | "nni_recheck";
|
|
292
300
|
type FaceMatchReason = "no_face_source" | "no_face_reference" | "low_quality_reference" | "below_threshold" | "review_band" | "match_inconclusive" | "subject_revoked" | "probe_not_from_liveness" | "prior_review_approved";
|
|
@@ -320,7 +328,7 @@ type PhoneOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_
|
|
|
320
328
|
* mail (`email_invalid`), or a disposable address the app blocks
|
|
321
329
|
* (`email_disposable`) — the person enters another address or resends.
|
|
322
330
|
*/
|
|
323
|
-
type EmailOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_rate_limited" | "otp_resend_limit" | "email_invalid" | "email_disposable" | "otp_daily_cap_reached";
|
|
331
|
+
type EmailOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_rate_limited" | "otp_resend_limit" | "email_invalid" | "email_disposable" | "otp_daily_cap_reached" | "payment_method_required" | "spend_cap_reached" | "insufficient_balance" | "account_verification_required";
|
|
324
332
|
/**
|
|
325
333
|
* nfc_chip reasons (M-nfc, SDK spec §4.3). Native SDKs read the chip; the web
|
|
326
334
|
* never does — on web the step arrives `skipped` (`platform_unsupported`) or
|
|
@@ -347,12 +355,23 @@ type EidReason = "eid_identifier_invalid" | "eid_code_invalid" | "eid_code_expir
|
|
|
347
355
|
* is final and ends the session.
|
|
348
356
|
*/
|
|
349
357
|
type AgeEstimationReason = "age_uncertain" | "age_unavailable" | "underage_estimated";
|
|
358
|
+
/**
|
|
359
|
+
* Reasons of the proof of address step (`poa`, spec 2026-11-10 §5.3), in the server's decision order:
|
|
360
|
+
* `provider_unavailable` (the document could not be checked now; retry), `unreadable` (a sharper, complete copy),
|
|
361
|
+
* `pdf_protected` (the PDF has a password, scripts, attachments or forms), `document_kind_not_accepted` and
|
|
362
|
+
* `document_too_old` (the step's rule for the document's country says what is accepted: `proofOfAddress.rule`),
|
|
363
|
+
* `document_date_invalid` (a date in the future), `document_tampered` (final), `name_mismatch`,
|
|
364
|
+
* `holder_letter_required` (the bill is in another person's name: the step asks for the holder's letter,
|
|
365
|
+
* `proofOfAddress.phase: "holder_letter"`), `holder_letter_missing` (the letter is incomplete) and `address_mismatch`
|
|
366
|
+
* (the address differs from the one the partner supplied).
|
|
367
|
+
*/
|
|
368
|
+
type PoaReason = "provider_unavailable" | "unreadable" | "pdf_protected" | "document_kind_not_accepted" | "document_date_invalid" | "document_too_old" | "document_tampered" | "name_mismatch" | "holder_letter_required" | "holder_letter_missing" | "address_mismatch";
|
|
350
369
|
/**
|
|
351
370
|
* Any frozen reason code. The backend declares the field `string`, but the
|
|
352
371
|
* taxonomy is frozen (do-not-drift) — the union IS the contract. NB: liveness
|
|
353
372
|
* and face_match both carry `review_band`.
|
|
354
373
|
*/
|
|
355
|
-
type CheckReason = LivenessReason | PopulationReason | FaceMatchReason | DocReason | PhoneOtpReason | EmailOtpReason | NfcChipReason | PortraitIcaoReason | EidReason
|
|
374
|
+
type CheckReason = LivenessReason | PopulationReason | FaceMatchReason | DocReason | PhoneOtpReason | EmailOtpReason | NfcChipReason | PortraitIcaoReason | EidReason | PoaReason
|
|
356
375
|
/**
|
|
357
376
|
* Spec 2026-10-27 (Sandbox testers), tester-bound sessions only:
|
|
358
377
|
* `tester_document_mismatch` (doc_ocr, nfc_chip) when the document read is
|
|
@@ -447,10 +466,11 @@ interface NationalEidOption {
|
|
|
447
466
|
type EidAfterPass = "end" | "continue";
|
|
448
467
|
/**
|
|
449
468
|
* The section a step belongs to (flow model 2026-10-23, SDK spec §3.7): Step 1
|
|
450
|
-
* `contact`, Step 2 `identity`, Step 3 `live_photo
|
|
451
|
-
*
|
|
469
|
+
* `contact`, Step 2 `identity`, Step 3 `live_photo`; `documents` holds the proof
|
|
470
|
+
* of address (spec 2026-11-10). Open: a value this SDK does not know is kept as
|
|
471
|
+
* is, so a client still places the step.
|
|
452
472
|
*/
|
|
453
|
-
type StepSection = "contact" | "identity" | "live_photo" | "screening" | (string & {});
|
|
473
|
+
type StepSection = "contact" | "identity" | "live_photo" | "screening" | "documents" | (string & {});
|
|
454
474
|
/** A contact channel of a contact choice (`phone_otp` → `phone`, `email_otp` → `email`). */
|
|
455
475
|
type ContactChannel = "phone" | "email";
|
|
456
476
|
/**
|
|
@@ -598,8 +618,12 @@ interface MethodChoiceView {
|
|
|
598
618
|
*/
|
|
599
619
|
nationalEid?: NationalEidOption;
|
|
600
620
|
}
|
|
601
|
-
/**
|
|
602
|
-
type
|
|
621
|
+
/**
|
|
622
|
+
* A document type the backend reads (kyc-docs-v2 vocabulary; `carte_identite` = identity card of any issuer).
|
|
623
|
+
* `drivers_license` (spec 2026-11-10 §6): a driving licence, two faces, no MRZ, offered only when the flow lists it
|
|
624
|
+
* (`"*"` never includes it).
|
|
625
|
+
*/
|
|
626
|
+
type AcceptedDocumentType = "carte_identite" | "passport" | "residence_permit" | "drivers_license";
|
|
603
627
|
/**
|
|
604
628
|
* Accepted document types per issuing country (profile v2 §5.3a): an issuer
|
|
605
629
|
* uses `byIssuer[iso2] ?? default`; `"*"` = every type.
|
|
@@ -1351,6 +1375,12 @@ interface HostedSessionView {
|
|
|
1351
1375
|
* with no upload offered (and on older APIs): `{ source: "camera", uploadOffered: false }`.
|
|
1352
1376
|
*/
|
|
1353
1377
|
documents?: HostedDocumentsView;
|
|
1378
|
+
/**
|
|
1379
|
+
* Spec 2026-11-10 §5.4, §7.4: the open proof of address step's settings (the accepted kinds for the best known
|
|
1380
|
+
* country, the name rule, the phase, the photo source, the upload limits). Present only while a `poa` step is open;
|
|
1381
|
+
* absent on older APIs.
|
|
1382
|
+
*/
|
|
1383
|
+
proofOfAddress?: HostedProofOfAddressView;
|
|
1354
1384
|
/**
|
|
1355
1385
|
* Spec 2026-10-29 D12: where the hosted completion screen sends the person (`returnUrl`, checked at session
|
|
1356
1386
|
* create against the app's web origins or native scheme) and the partner's opaque `state`. Never the result.
|
|
@@ -1424,12 +1454,13 @@ interface SessionView {
|
|
|
1424
1454
|
createdAt?: string;
|
|
1425
1455
|
}
|
|
1426
1456
|
/** Media class — selects size cap, MIME allowlist and promoted prefix (media.policy.ts). */
|
|
1427
|
-
type MediaKind = "image" | "clip";
|
|
1457
|
+
type MediaKind = "image" | "clip" | "document_file";
|
|
1428
1458
|
/**
|
|
1429
1459
|
* Body of `POST /sessions/:id/media`. `contentType`/`contentLength` are the
|
|
1430
1460
|
* exact values SIGNED into the presigned PUT — the PUT must send them verbatim.
|
|
1431
1461
|
* Allowlists (media.policy.ts): image → image/jpeg | image/png (5 MB cap);
|
|
1432
|
-
* clip → video/webm | video/mp4 (15 MB cap)
|
|
1462
|
+
* clip → video/webm | video/mp4 (15 MB cap); document_file → application/pdf (10 MB cap, the proof of address
|
|
1463
|
+
* step's upload only, spec 2026-11-10 §7.1). BARE types only — no `;codecs=` params.
|
|
1433
1464
|
*/
|
|
1434
1465
|
interface PresignRequest {
|
|
1435
1466
|
kind: MediaKind;
|
|
@@ -1631,6 +1662,90 @@ interface HostedDocumentsView {
|
|
|
1631
1662
|
*/
|
|
1632
1663
|
uploadOffered: boolean;
|
|
1633
1664
|
}
|
|
1665
|
+
/** The document kinds a proof of address may be (spec §5.2). */
|
|
1666
|
+
type PoaKind = "utility_bill" | "telecom_bill" | "bank_statement" | "tax_notice" | "rental_agreement" | "government_certificate" | "insurance_statement";
|
|
1667
|
+
/**
|
|
1668
|
+
* How the name on the document is matched: `exact_person` (the person's own name), `family_name` (the same family
|
|
1669
|
+
* name), `third_party_letter` (another holder, with a signed letter from that holder).
|
|
1670
|
+
*/
|
|
1671
|
+
type PoaNameMatchMode = "exact_person" | "family_name" | "third_party_letter";
|
|
1672
|
+
/**
|
|
1673
|
+
* Where the step's rule came from: the flow's rule for the country (`flow_country`), the flow's default rule
|
|
1674
|
+
* (`flow_default`), Sekyro's preset for the country (`preset_country`) or the global preset (`preset_global`).
|
|
1675
|
+
*/
|
|
1676
|
+
type PoaRuleSource = "flow_country" | "flow_default" | "preset_country" | "preset_global";
|
|
1677
|
+
/** One accepted kind of the step's rule. */
|
|
1678
|
+
interface HostedPoaRuleKindView {
|
|
1679
|
+
kind: PoaKind;
|
|
1680
|
+
/** How old the document of this kind may be, in days. */
|
|
1681
|
+
maxAgeDays: number;
|
|
1682
|
+
/** ISO day: today minus `maxAgeDays`, computed by the server so every client says the same date. */
|
|
1683
|
+
earliestIssueDate: string;
|
|
1684
|
+
}
|
|
1685
|
+
/** The accepted documents the step shows (spec §5.4 "person-facing list"), resolved by the server. */
|
|
1686
|
+
interface HostedPoaRuleView {
|
|
1687
|
+
/** The country the rule was resolved for (ISO 3166-1 alpha-2); `null` = the global entry. */
|
|
1688
|
+
country: string | null;
|
|
1689
|
+
/**
|
|
1690
|
+
* How that country was chosen: the identity document's issuer, else the IP country, else global; after a
|
|
1691
|
+
* `document_kind_not_accepted` or `document_too_old` failure, the failed document's own country (`document`).
|
|
1692
|
+
*/
|
|
1693
|
+
countryFrom: "identity_document" | "ip" | "document" | "global";
|
|
1694
|
+
source: PoaRuleSource;
|
|
1695
|
+
kinds: HostedPoaRuleKindView[];
|
|
1696
|
+
}
|
|
1697
|
+
/** The open proof of address step (`HostedSessionView.proofOfAddress`). */
|
|
1698
|
+
interface HostedProofOfAddressView {
|
|
1699
|
+
rule: HostedPoaRuleView;
|
|
1700
|
+
nameMatch: PoaNameMatchMode;
|
|
1701
|
+
/** `holder_letter` once the bill was read under `third_party_letter` and the step waits for the holder's letter. */
|
|
1702
|
+
phase: "document" | "holder_letter";
|
|
1703
|
+
/** Where the pages come from ({@link PhotoSource}). */
|
|
1704
|
+
source: PhotoSource;
|
|
1705
|
+
/** The person's pick under `choice`, once made for this step. */
|
|
1706
|
+
sourcePick?: PhotoSourcePick;
|
|
1707
|
+
/** An upload would be accepted now. */
|
|
1708
|
+
uploadOffered: boolean;
|
|
1709
|
+
/** Pages per document, at most. */
|
|
1710
|
+
maxPages: 3;
|
|
1711
|
+
/** A PDF upload's limits. */
|
|
1712
|
+
pdf: {
|
|
1713
|
+
maxBytes: number;
|
|
1714
|
+
maxPages: 3;
|
|
1715
|
+
};
|
|
1716
|
+
/**
|
|
1717
|
+
* Spec 2026-11-10 §5.3 licence shortcut: the step accepts the address of the driving licence read earlier in the
|
|
1718
|
+
* session, so the person may continue without a document ({@link PoaLicenceInput}). Present only in the `document`
|
|
1719
|
+
* phase.
|
|
1720
|
+
*/
|
|
1721
|
+
licenceAddressAccepted?: true;
|
|
1722
|
+
}
|
|
1723
|
+
/**
|
|
1724
|
+
* `poa` executor input (spec 2026-11-10 §7): the document (or, in the `holder_letter` phase, the holder's letter) as
|
|
1725
|
+
* 1 to 3 promoted page images, or as one promoted PDF (`document_file` media kind).
|
|
1726
|
+
*/
|
|
1727
|
+
type PoaInput = PoaImagesInput | PoaPdfInput | PoaLicenceInput;
|
|
1728
|
+
/**
|
|
1729
|
+
* The licence shortcut (spec 2026-11-10 §5.3): no media; the server decides from the driving licence read earlier in
|
|
1730
|
+
* the session. Only while the view's `proofOfAddress.licenceAddressAccepted` is set.
|
|
1731
|
+
*/
|
|
1732
|
+
interface PoaLicenceInput {
|
|
1733
|
+
part: "document";
|
|
1734
|
+
}
|
|
1735
|
+
/** The pages as images, in order. */
|
|
1736
|
+
interface PoaImagesInput {
|
|
1737
|
+
part: "document" | "holder_letter";
|
|
1738
|
+
source: PhotoSourcePick;
|
|
1739
|
+
/** 1 to 3 promoted `image` keys. */
|
|
1740
|
+
imageKeys: string[];
|
|
1741
|
+
}
|
|
1742
|
+
/** The document as one PDF (always picked from the device). */
|
|
1743
|
+
interface PoaPdfInput {
|
|
1744
|
+
part: "document" | "holder_letter";
|
|
1745
|
+
source: "upload";
|
|
1746
|
+
/** The promoted `document_file` key. */
|
|
1747
|
+
pdfKey: string;
|
|
1748
|
+
}
|
|
1634
1749
|
/** doc_ocr executor input: a promoted `doc-images/…` key + which side it shows. */
|
|
1635
1750
|
interface DocOcrInput {
|
|
1636
1751
|
imageKey: string;
|
|
@@ -1646,6 +1761,11 @@ interface DocOcrInput {
|
|
|
1646
1761
|
* view's `documents.uploadOffered`; else 400 `document_upload_not_allowed`). Absent = `camera`.
|
|
1647
1762
|
*/
|
|
1648
1763
|
source?: PhotoSourcePick;
|
|
1764
|
+
/**
|
|
1765
|
+
* Spec 2026-11-10 §6.2: `drivers_license` when the person picked the driving licence, so the server reads both faces
|
|
1766
|
+
* with its document reader instead of the MRZ pipeline. Absent for every other type (the server keeps its path).
|
|
1767
|
+
*/
|
|
1768
|
+
documentType?: "drivers_license";
|
|
1649
1769
|
}
|
|
1650
1770
|
/** The `doc_ocr` device-read hint (identity-backend DeviceReadSchema; strict, text-free). */
|
|
1651
1771
|
interface DocDeviceRead {
|
|
@@ -1802,6 +1922,8 @@ interface CheckInputByType {
|
|
|
1802
1922
|
portrait_icao: PortraitIcaoInput;
|
|
1803
1923
|
/** SDK spec §3.2: the national eID sign-in. */
|
|
1804
1924
|
eid_auth: EidAuthInput;
|
|
1925
|
+
/** Spec 2026-11-10 §5: the proof of address pages or PDF. */
|
|
1926
|
+
poa: PoaInput;
|
|
1805
1927
|
}
|
|
1806
1928
|
/**
|
|
1807
1929
|
* Body of `POST /sessions/:id/checks/:checkType` (SubmitCheckSchema).
|
|
@@ -1817,4 +1939,4 @@ interface SubmitCheckBody {
|
|
|
1817
1939
|
forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
|
|
1818
1940
|
}
|
|
1819
1941
|
|
|
1820
|
-
export { type
|
|
1942
|
+
export { type HostedVoiceView as $, type AcceptedDocumentType as A, type HostedDocumentsView as B, type CaptureContext as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchInput as F, type HostedEidView as G, type HostedAcceptedDocuments as H, type HostedEmailOtpView as I, type HostedFlowRef as J, type HostedIcaoPolicy as K, type HostedIntegrity as L, type HostedLivePhotoTuning as M, type HostedNativeCaptureTuning as N, type HostedOcrTuning as O, type HostedOtpView as P, type HostedPlanView as Q, type HostedPoaRuleKindView as R, type HostedPoaRuleView as S, type HostedPortraitPendingFix as T, type HostedPortraitView as U, type HostedProofOfAddressView as V, type HostedSessionView as W, type HostedSimulationView as X, type HostedStepView as Y, type HostedTesterGateView as Z, type HostedVoiceLocale as _, type AttestationInput as a, type CameraUnavailableCause as a$, type IcaoCriterion as a0, type IcaoReportEntry as a1, type IdentityConfirmDecision as a2, type IdentityMethod as a3, type IdentitySummarySource as a4, type IdentitySummaryView as a5, type LivenessCaptureInput as a6, type LivenessInput as a7, type LivenessReason as a8, type MatchReason as a9, type PopulationInput as aA, type PopulationReason as aB, type PortraitFix as aC, type PortraitFixReviewInput as aD, type PortraitIcaoInput as aE, type PortraitIcaoReason as aF, type PortraitOutputFormat as aG, type PresignRequest as aH, type PresignUploadResult as aI, type RecordConsentResult as aJ, type ResolvedCaptureMode as aK, type SessionDecidingStep as aL, type SessionFailureReason as aM, type SessionReason as aN, type SessionStatus as aO, type SessionStepView as aP, type SessionView as aQ, type SimulatedCaptureInput as aR, type StepResult as aS, type StepSection as aT, type SubmitCheckBody as aU, type TesterGateInput as aV, type TesterGateResponse as aW, type VerificationAssurance as aX, type VerificationLevel as aY, type ScreenRampColour as aZ, type AgeEstimationReason as a_, type MediaKind as aa, type MethodChoiceView as ab, type NationalEidOption as ac, type NfcChipReason as ad, type NfcStepView as ae, type OtpChoiceView as af, type PhoneCountryRule as ag, type PhoneFormat as ah, type PhoneOtpInput as ai, type PhoneOtpReason as aj, type PhotoSource as ak, type PhotoSourcePick as al, type PlanAttempts as am, type PlanChoiceKind as an, type PlanChoiceOption as ao, type PlanChoiceView as ap, type PlanSectionView as aq, type PlanStepView as ar, type PoaImagesInput as as, type PoaInput as at, type PoaKind as au, type PoaLicenceInput as av, type PoaNameMatchMode as aw, type PoaPdfInput as ax, type PoaReason as ay, type PoaRuleSource as az, type CaptureMode as b, type CaptureIssueReport as b0, type CaptureProvenance as b1, type HostedBranding as b2, type HostedBrandingColorKey as b3, type HostedLivenessCaptureTuning as b4, type IcaoCaptureTuning as b5, type RetakeHint as b6, type ScreenRampChallenge as b7, type ScreenRampPaint as b8, type ScreenRampRendered as b9, type ScreenRampReport as ba, ICAO_FALLBACK as bb, type IcaoProfile as bc, type ResolvedIcaoTuning as bd, resolveIcaoTuning as be, type PersonMask as bf, type BackgroundUniformity as bg, type CaptureNoncesResult as c, type CaptureProof as d, type CheckInputByType as e, type CheckReason as f, type CheckState as g, type CheckType as h, type ClosedBy as i, type CompleteMediaResult as j, type ConsentLocale as k, type ContactChannel as l, type DocDeviceRead as m, type DocOcrInput as n, type DocReason as o, type DocSide as p, type EidAuthInput as q, type EidReason as r, type EmailOtpInput as s, type EmailOtpReason as t, type FaceMatchReason as u, type HostedCaptureTuning as v, type HostedChallengeView as w, type HostedConsentView as x, type HostedDocumentCaptureTuning as y, type HostedDocumentScanTuning as z };
|
|
@@ -271,13 +271,19 @@ interface SessionDecidingStep {
|
|
|
271
271
|
service: string;
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
274
|
-
* What a finished session proved
|
|
275
|
-
*
|
|
276
|
-
* independent source; `0` on a `not_verified` session.
|
|
274
|
+
* What a finished session proved: `1` Contact, `2` Human, `3` Identity; `0`
|
|
275
|
+
* when nothing was proven.
|
|
277
276
|
*/
|
|
278
277
|
type VerificationLevel = 0 | 1 | 2 | 3;
|
|
279
|
-
/**
|
|
280
|
-
|
|
278
|
+
/**
|
|
279
|
+
* How a session's {@link VerificationLevel} was proved, weakest first. Level 1
|
|
280
|
+
* Contact: `device_only`, `contact_email`, `contact_phone`, `unbound_identity`
|
|
281
|
+
* (identity data with no live face matched to it). Level 2 Human: `live_only`,
|
|
282
|
+
* `live_unique`. Level 3 Identity: `supplied_biometric`, `document_biometric`,
|
|
283
|
+
* `eid_authenticated`, `chip_biometric`, `registry_biometric`. To require a
|
|
284
|
+
* particular proof, compare with a list of accepted values on your server.
|
|
285
|
+
*/
|
|
286
|
+
type VerificationAssurance = "device_only" | "contact_email" | "contact_phone" | "unbound_identity" | "live_only" | "live_unique" | "supplied_biometric" | "document_biometric" | "eid_authenticated" | "chip_biometric" | "registry_biometric";
|
|
281
287
|
/** Per-check seven-state machine (spec §4.3). */
|
|
282
288
|
type CheckState = "pending" | "input_required" | "processing" | "passed" | "failed" | "review" | "skipped";
|
|
283
289
|
/**
|
|
@@ -286,7 +292,9 @@ type CheckState = "pending" | "input_required" | "processing" | "passed" | "fail
|
|
|
286
292
|
* profile v2 §4.6.5) confirms an email address with a one-time code;
|
|
287
293
|
* `eid_auth` (SDK spec §3.2) is the national eID sign-in (Houwiyeti in MR).
|
|
288
294
|
*/
|
|
289
|
-
type CheckType = "liveness" | "face_match" | "doc_ocr" | "population_registry" | "phone_otp" | "nfc_chip" | "email_otp" | "portrait_icao" | "eid_auth"
|
|
295
|
+
type CheckType = "liveness" | "face_match" | "doc_ocr" | "population_registry" | "phone_otp" | "nfc_chip" | "email_otp" | "portrait_icao" | "eid_auth"
|
|
296
|
+
/** Spec 2026-11-10 §5: the proof of address step (a bill or statement, images or one PDF). */
|
|
297
|
+
| "poa";
|
|
290
298
|
type LivenessReason = "no_face" | "media_unreadable" | "clip_too_short" | "spoof_detected" | "review_band" | "liveness_inconclusive" | "device_integrity_failed" | "mobile_required" | "capture_back_camera" | "capture_not_upright" | "capture_front_camera" | "multiple_faces" | "camera_unavailable";
|
|
291
299
|
type PopulationReason = "registry_record_not_found" | "nni_not_found" | "id_number_invalid" | "nni_invalid" | "registry_unavailable" | "nationality_not_allowed" | "underage" | "age_unverifiable" | "name_mismatch" | "birth_date_mismatch" | "nationality_mismatch" | "id_number_recheck" | "nni_recheck";
|
|
292
300
|
type FaceMatchReason = "no_face_source" | "no_face_reference" | "low_quality_reference" | "below_threshold" | "review_band" | "match_inconclusive" | "subject_revoked" | "probe_not_from_liveness" | "prior_review_approved";
|
|
@@ -320,7 +328,7 @@ type PhoneOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_
|
|
|
320
328
|
* mail (`email_invalid`), or a disposable address the app blocks
|
|
321
329
|
* (`email_disposable`) — the person enters another address or resends.
|
|
322
330
|
*/
|
|
323
|
-
type EmailOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_rate_limited" | "otp_resend_limit" | "email_invalid" | "email_disposable" | "otp_daily_cap_reached";
|
|
331
|
+
type EmailOtpReason = "otp_mismatch" | "otp_expired" | "otp_send_failed" | "otp_rate_limited" | "otp_resend_limit" | "email_invalid" | "email_disposable" | "otp_daily_cap_reached" | "payment_method_required" | "spend_cap_reached" | "insufficient_balance" | "account_verification_required";
|
|
324
332
|
/**
|
|
325
333
|
* nfc_chip reasons (M-nfc, SDK spec §4.3). Native SDKs read the chip; the web
|
|
326
334
|
* never does — on web the step arrives `skipped` (`platform_unsupported`) or
|
|
@@ -347,12 +355,23 @@ type EidReason = "eid_identifier_invalid" | "eid_code_invalid" | "eid_code_expir
|
|
|
347
355
|
* is final and ends the session.
|
|
348
356
|
*/
|
|
349
357
|
type AgeEstimationReason = "age_uncertain" | "age_unavailable" | "underage_estimated";
|
|
358
|
+
/**
|
|
359
|
+
* Reasons of the proof of address step (`poa`, spec 2026-11-10 §5.3), in the server's decision order:
|
|
360
|
+
* `provider_unavailable` (the document could not be checked now; retry), `unreadable` (a sharper, complete copy),
|
|
361
|
+
* `pdf_protected` (the PDF has a password, scripts, attachments or forms), `document_kind_not_accepted` and
|
|
362
|
+
* `document_too_old` (the step's rule for the document's country says what is accepted: `proofOfAddress.rule`),
|
|
363
|
+
* `document_date_invalid` (a date in the future), `document_tampered` (final), `name_mismatch`,
|
|
364
|
+
* `holder_letter_required` (the bill is in another person's name: the step asks for the holder's letter,
|
|
365
|
+
* `proofOfAddress.phase: "holder_letter"`), `holder_letter_missing` (the letter is incomplete) and `address_mismatch`
|
|
366
|
+
* (the address differs from the one the partner supplied).
|
|
367
|
+
*/
|
|
368
|
+
type PoaReason = "provider_unavailable" | "unreadable" | "pdf_protected" | "document_kind_not_accepted" | "document_date_invalid" | "document_too_old" | "document_tampered" | "name_mismatch" | "holder_letter_required" | "holder_letter_missing" | "address_mismatch";
|
|
350
369
|
/**
|
|
351
370
|
* Any frozen reason code. The backend declares the field `string`, but the
|
|
352
371
|
* taxonomy is frozen (do-not-drift) — the union IS the contract. NB: liveness
|
|
353
372
|
* and face_match both carry `review_band`.
|
|
354
373
|
*/
|
|
355
|
-
type CheckReason = LivenessReason | PopulationReason | FaceMatchReason | DocReason | PhoneOtpReason | EmailOtpReason | NfcChipReason | PortraitIcaoReason | EidReason
|
|
374
|
+
type CheckReason = LivenessReason | PopulationReason | FaceMatchReason | DocReason | PhoneOtpReason | EmailOtpReason | NfcChipReason | PortraitIcaoReason | EidReason | PoaReason
|
|
356
375
|
/**
|
|
357
376
|
* Spec 2026-10-27 (Sandbox testers), tester-bound sessions only:
|
|
358
377
|
* `tester_document_mismatch` (doc_ocr, nfc_chip) when the document read is
|
|
@@ -447,10 +466,11 @@ interface NationalEidOption {
|
|
|
447
466
|
type EidAfterPass = "end" | "continue";
|
|
448
467
|
/**
|
|
449
468
|
* The section a step belongs to (flow model 2026-10-23, SDK spec §3.7): Step 1
|
|
450
|
-
* `contact`, Step 2 `identity`, Step 3 `live_photo
|
|
451
|
-
*
|
|
469
|
+
* `contact`, Step 2 `identity`, Step 3 `live_photo`; `documents` holds the proof
|
|
470
|
+
* of address (spec 2026-11-10). Open: a value this SDK does not know is kept as
|
|
471
|
+
* is, so a client still places the step.
|
|
452
472
|
*/
|
|
453
|
-
type StepSection = "contact" | "identity" | "live_photo" | "screening" | (string & {});
|
|
473
|
+
type StepSection = "contact" | "identity" | "live_photo" | "screening" | "documents" | (string & {});
|
|
454
474
|
/** A contact channel of a contact choice (`phone_otp` → `phone`, `email_otp` → `email`). */
|
|
455
475
|
type ContactChannel = "phone" | "email";
|
|
456
476
|
/**
|
|
@@ -598,8 +618,12 @@ interface MethodChoiceView {
|
|
|
598
618
|
*/
|
|
599
619
|
nationalEid?: NationalEidOption;
|
|
600
620
|
}
|
|
601
|
-
/**
|
|
602
|
-
type
|
|
621
|
+
/**
|
|
622
|
+
* A document type the backend reads (kyc-docs-v2 vocabulary; `carte_identite` = identity card of any issuer).
|
|
623
|
+
* `drivers_license` (spec 2026-11-10 §6): a driving licence, two faces, no MRZ, offered only when the flow lists it
|
|
624
|
+
* (`"*"` never includes it).
|
|
625
|
+
*/
|
|
626
|
+
type AcceptedDocumentType = "carte_identite" | "passport" | "residence_permit" | "drivers_license";
|
|
603
627
|
/**
|
|
604
628
|
* Accepted document types per issuing country (profile v2 §5.3a): an issuer
|
|
605
629
|
* uses `byIssuer[iso2] ?? default`; `"*"` = every type.
|
|
@@ -1351,6 +1375,12 @@ interface HostedSessionView {
|
|
|
1351
1375
|
* with no upload offered (and on older APIs): `{ source: "camera", uploadOffered: false }`.
|
|
1352
1376
|
*/
|
|
1353
1377
|
documents?: HostedDocumentsView;
|
|
1378
|
+
/**
|
|
1379
|
+
* Spec 2026-11-10 §5.4, §7.4: the open proof of address step's settings (the accepted kinds for the best known
|
|
1380
|
+
* country, the name rule, the phase, the photo source, the upload limits). Present only while a `poa` step is open;
|
|
1381
|
+
* absent on older APIs.
|
|
1382
|
+
*/
|
|
1383
|
+
proofOfAddress?: HostedProofOfAddressView;
|
|
1354
1384
|
/**
|
|
1355
1385
|
* Spec 2026-10-29 D12: where the hosted completion screen sends the person (`returnUrl`, checked at session
|
|
1356
1386
|
* create against the app's web origins or native scheme) and the partner's opaque `state`. Never the result.
|
|
@@ -1424,12 +1454,13 @@ interface SessionView {
|
|
|
1424
1454
|
createdAt?: string;
|
|
1425
1455
|
}
|
|
1426
1456
|
/** Media class — selects size cap, MIME allowlist and promoted prefix (media.policy.ts). */
|
|
1427
|
-
type MediaKind = "image" | "clip";
|
|
1457
|
+
type MediaKind = "image" | "clip" | "document_file";
|
|
1428
1458
|
/**
|
|
1429
1459
|
* Body of `POST /sessions/:id/media`. `contentType`/`contentLength` are the
|
|
1430
1460
|
* exact values SIGNED into the presigned PUT — the PUT must send them verbatim.
|
|
1431
1461
|
* Allowlists (media.policy.ts): image → image/jpeg | image/png (5 MB cap);
|
|
1432
|
-
* clip → video/webm | video/mp4 (15 MB cap)
|
|
1462
|
+
* clip → video/webm | video/mp4 (15 MB cap); document_file → application/pdf (10 MB cap, the proof of address
|
|
1463
|
+
* step's upload only, spec 2026-11-10 §7.1). BARE types only — no `;codecs=` params.
|
|
1433
1464
|
*/
|
|
1434
1465
|
interface PresignRequest {
|
|
1435
1466
|
kind: MediaKind;
|
|
@@ -1631,6 +1662,90 @@ interface HostedDocumentsView {
|
|
|
1631
1662
|
*/
|
|
1632
1663
|
uploadOffered: boolean;
|
|
1633
1664
|
}
|
|
1665
|
+
/** The document kinds a proof of address may be (spec §5.2). */
|
|
1666
|
+
type PoaKind = "utility_bill" | "telecom_bill" | "bank_statement" | "tax_notice" | "rental_agreement" | "government_certificate" | "insurance_statement";
|
|
1667
|
+
/**
|
|
1668
|
+
* How the name on the document is matched: `exact_person` (the person's own name), `family_name` (the same family
|
|
1669
|
+
* name), `third_party_letter` (another holder, with a signed letter from that holder).
|
|
1670
|
+
*/
|
|
1671
|
+
type PoaNameMatchMode = "exact_person" | "family_name" | "third_party_letter";
|
|
1672
|
+
/**
|
|
1673
|
+
* Where the step's rule came from: the flow's rule for the country (`flow_country`), the flow's default rule
|
|
1674
|
+
* (`flow_default`), Sekyro's preset for the country (`preset_country`) or the global preset (`preset_global`).
|
|
1675
|
+
*/
|
|
1676
|
+
type PoaRuleSource = "flow_country" | "flow_default" | "preset_country" | "preset_global";
|
|
1677
|
+
/** One accepted kind of the step's rule. */
|
|
1678
|
+
interface HostedPoaRuleKindView {
|
|
1679
|
+
kind: PoaKind;
|
|
1680
|
+
/** How old the document of this kind may be, in days. */
|
|
1681
|
+
maxAgeDays: number;
|
|
1682
|
+
/** ISO day: today minus `maxAgeDays`, computed by the server so every client says the same date. */
|
|
1683
|
+
earliestIssueDate: string;
|
|
1684
|
+
}
|
|
1685
|
+
/** The accepted documents the step shows (spec §5.4 "person-facing list"), resolved by the server. */
|
|
1686
|
+
interface HostedPoaRuleView {
|
|
1687
|
+
/** The country the rule was resolved for (ISO 3166-1 alpha-2); `null` = the global entry. */
|
|
1688
|
+
country: string | null;
|
|
1689
|
+
/**
|
|
1690
|
+
* How that country was chosen: the identity document's issuer, else the IP country, else global; after a
|
|
1691
|
+
* `document_kind_not_accepted` or `document_too_old` failure, the failed document's own country (`document`).
|
|
1692
|
+
*/
|
|
1693
|
+
countryFrom: "identity_document" | "ip" | "document" | "global";
|
|
1694
|
+
source: PoaRuleSource;
|
|
1695
|
+
kinds: HostedPoaRuleKindView[];
|
|
1696
|
+
}
|
|
1697
|
+
/** The open proof of address step (`HostedSessionView.proofOfAddress`). */
|
|
1698
|
+
interface HostedProofOfAddressView {
|
|
1699
|
+
rule: HostedPoaRuleView;
|
|
1700
|
+
nameMatch: PoaNameMatchMode;
|
|
1701
|
+
/** `holder_letter` once the bill was read under `third_party_letter` and the step waits for the holder's letter. */
|
|
1702
|
+
phase: "document" | "holder_letter";
|
|
1703
|
+
/** Where the pages come from ({@link PhotoSource}). */
|
|
1704
|
+
source: PhotoSource;
|
|
1705
|
+
/** The person's pick under `choice`, once made for this step. */
|
|
1706
|
+
sourcePick?: PhotoSourcePick;
|
|
1707
|
+
/** An upload would be accepted now. */
|
|
1708
|
+
uploadOffered: boolean;
|
|
1709
|
+
/** Pages per document, at most. */
|
|
1710
|
+
maxPages: 3;
|
|
1711
|
+
/** A PDF upload's limits. */
|
|
1712
|
+
pdf: {
|
|
1713
|
+
maxBytes: number;
|
|
1714
|
+
maxPages: 3;
|
|
1715
|
+
};
|
|
1716
|
+
/**
|
|
1717
|
+
* Spec 2026-11-10 §5.3 licence shortcut: the step accepts the address of the driving licence read earlier in the
|
|
1718
|
+
* session, so the person may continue without a document ({@link PoaLicenceInput}). Present only in the `document`
|
|
1719
|
+
* phase.
|
|
1720
|
+
*/
|
|
1721
|
+
licenceAddressAccepted?: true;
|
|
1722
|
+
}
|
|
1723
|
+
/**
|
|
1724
|
+
* `poa` executor input (spec 2026-11-10 §7): the document (or, in the `holder_letter` phase, the holder's letter) as
|
|
1725
|
+
* 1 to 3 promoted page images, or as one promoted PDF (`document_file` media kind).
|
|
1726
|
+
*/
|
|
1727
|
+
type PoaInput = PoaImagesInput | PoaPdfInput | PoaLicenceInput;
|
|
1728
|
+
/**
|
|
1729
|
+
* The licence shortcut (spec 2026-11-10 §5.3): no media; the server decides from the driving licence read earlier in
|
|
1730
|
+
* the session. Only while the view's `proofOfAddress.licenceAddressAccepted` is set.
|
|
1731
|
+
*/
|
|
1732
|
+
interface PoaLicenceInput {
|
|
1733
|
+
part: "document";
|
|
1734
|
+
}
|
|
1735
|
+
/** The pages as images, in order. */
|
|
1736
|
+
interface PoaImagesInput {
|
|
1737
|
+
part: "document" | "holder_letter";
|
|
1738
|
+
source: PhotoSourcePick;
|
|
1739
|
+
/** 1 to 3 promoted `image` keys. */
|
|
1740
|
+
imageKeys: string[];
|
|
1741
|
+
}
|
|
1742
|
+
/** The document as one PDF (always picked from the device). */
|
|
1743
|
+
interface PoaPdfInput {
|
|
1744
|
+
part: "document" | "holder_letter";
|
|
1745
|
+
source: "upload";
|
|
1746
|
+
/** The promoted `document_file` key. */
|
|
1747
|
+
pdfKey: string;
|
|
1748
|
+
}
|
|
1634
1749
|
/** doc_ocr executor input: a promoted `doc-images/…` key + which side it shows. */
|
|
1635
1750
|
interface DocOcrInput {
|
|
1636
1751
|
imageKey: string;
|
|
@@ -1646,6 +1761,11 @@ interface DocOcrInput {
|
|
|
1646
1761
|
* view's `documents.uploadOffered`; else 400 `document_upload_not_allowed`). Absent = `camera`.
|
|
1647
1762
|
*/
|
|
1648
1763
|
source?: PhotoSourcePick;
|
|
1764
|
+
/**
|
|
1765
|
+
* Spec 2026-11-10 §6.2: `drivers_license` when the person picked the driving licence, so the server reads both faces
|
|
1766
|
+
* with its document reader instead of the MRZ pipeline. Absent for every other type (the server keeps its path).
|
|
1767
|
+
*/
|
|
1768
|
+
documentType?: "drivers_license";
|
|
1649
1769
|
}
|
|
1650
1770
|
/** The `doc_ocr` device-read hint (identity-backend DeviceReadSchema; strict, text-free). */
|
|
1651
1771
|
interface DocDeviceRead {
|
|
@@ -1802,6 +1922,8 @@ interface CheckInputByType {
|
|
|
1802
1922
|
portrait_icao: PortraitIcaoInput;
|
|
1803
1923
|
/** SDK spec §3.2: the national eID sign-in. */
|
|
1804
1924
|
eid_auth: EidAuthInput;
|
|
1925
|
+
/** Spec 2026-11-10 §5: the proof of address pages or PDF. */
|
|
1926
|
+
poa: PoaInput;
|
|
1805
1927
|
}
|
|
1806
1928
|
/**
|
|
1807
1929
|
* Body of `POST /sessions/:id/checks/:checkType` (SubmitCheckSchema).
|
|
@@ -1817,4 +1939,4 @@ interface SubmitCheckBody {
|
|
|
1817
1939
|
forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
|
|
1818
1940
|
}
|
|
1819
1941
|
|
|
1820
|
-
export { type
|
|
1942
|
+
export { type HostedVoiceView as $, type AcceptedDocumentType as A, type HostedDocumentsView as B, type CaptureContext as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchInput as F, type HostedEidView as G, type HostedAcceptedDocuments as H, type HostedEmailOtpView as I, type HostedFlowRef as J, type HostedIcaoPolicy as K, type HostedIntegrity as L, type HostedLivePhotoTuning as M, type HostedNativeCaptureTuning as N, type HostedOcrTuning as O, type HostedOtpView as P, type HostedPlanView as Q, type HostedPoaRuleKindView as R, type HostedPoaRuleView as S, type HostedPortraitPendingFix as T, type HostedPortraitView as U, type HostedProofOfAddressView as V, type HostedSessionView as W, type HostedSimulationView as X, type HostedStepView as Y, type HostedTesterGateView as Z, type HostedVoiceLocale as _, type AttestationInput as a, type CameraUnavailableCause as a$, type IcaoCriterion as a0, type IcaoReportEntry as a1, type IdentityConfirmDecision as a2, type IdentityMethod as a3, type IdentitySummarySource as a4, type IdentitySummaryView as a5, type LivenessCaptureInput as a6, type LivenessInput as a7, type LivenessReason as a8, type MatchReason as a9, type PopulationInput as aA, type PopulationReason as aB, type PortraitFix as aC, type PortraitFixReviewInput as aD, type PortraitIcaoInput as aE, type PortraitIcaoReason as aF, type PortraitOutputFormat as aG, type PresignRequest as aH, type PresignUploadResult as aI, type RecordConsentResult as aJ, type ResolvedCaptureMode as aK, type SessionDecidingStep as aL, type SessionFailureReason as aM, type SessionReason as aN, type SessionStatus as aO, type SessionStepView as aP, type SessionView as aQ, type SimulatedCaptureInput as aR, type StepResult as aS, type StepSection as aT, type SubmitCheckBody as aU, type TesterGateInput as aV, type TesterGateResponse as aW, type VerificationAssurance as aX, type VerificationLevel as aY, type ScreenRampColour as aZ, type AgeEstimationReason as a_, type MediaKind as aa, type MethodChoiceView as ab, type NationalEidOption as ac, type NfcChipReason as ad, type NfcStepView as ae, type OtpChoiceView as af, type PhoneCountryRule as ag, type PhoneFormat as ah, type PhoneOtpInput as ai, type PhoneOtpReason as aj, type PhotoSource as ak, type PhotoSourcePick as al, type PlanAttempts as am, type PlanChoiceKind as an, type PlanChoiceOption as ao, type PlanChoiceView as ap, type PlanSectionView as aq, type PlanStepView as ar, type PoaImagesInput as as, type PoaInput as at, type PoaKind as au, type PoaLicenceInput as av, type PoaNameMatchMode as aw, type PoaPdfInput as ax, type PoaReason as ay, type PoaRuleSource as az, type CaptureMode as b, type CaptureIssueReport as b0, type CaptureProvenance as b1, type HostedBranding as b2, type HostedBrandingColorKey as b3, type HostedLivenessCaptureTuning as b4, type IcaoCaptureTuning as b5, type RetakeHint as b6, type ScreenRampChallenge as b7, type ScreenRampPaint as b8, type ScreenRampRendered as b9, type ScreenRampReport as ba, ICAO_FALLBACK as bb, type IcaoProfile as bc, type ResolvedIcaoTuning as bd, resolveIcaoTuning as be, type PersonMask as bf, type BackgroundUniformity as bg, type CaptureNoncesResult as c, type CaptureProof as d, type CheckInputByType as e, type CheckReason as f, type CheckState as g, type CheckType as h, type ClosedBy as i, type CompleteMediaResult as j, type ConsentLocale as k, type ContactChannel as l, type DocDeviceRead as m, type DocOcrInput as n, type DocReason as o, type DocSide as p, type EidAuthInput as q, type EidReason as r, type EmailOtpInput as s, type EmailOtpReason as t, type FaceMatchReason as u, type HostedCaptureTuning as v, type HostedChallengeView as w, type HostedConsentView as x, type HostedDocumentCaptureTuning as y, type HostedDocumentScanTuning as z };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var U=5242880,_=2560,g=[.92,.85,.75],m=new Set(["","image/jpeg","image/jpg","image/pjpeg","image/png","image/heic","image/heif","image/heic-sequence","image/heif-sequence"]),h=new Set(["heic","heix","hevc","hevx","heim","heis","mif1","msf1"]);function w(e){if(e.length>=3&&e[0]===255&&e[1]===216&&e[2]===255)return"jpeg";if(e.length>=8&&e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71&&e[4]===13&&e[5]===10&&e[6]===26&&e[7]===10)return"png";if(e.length>=12&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112){let t=String.fromCharCode(e[8],e[9],e[10],e[11]);return h.has(t)?"heif":null}return null}function x(e){return e.length>=5&&e[0]===37&&e[1]===80&&e[2]===68&&e[3]===70&&e[4]===45}var b=new Set(["application/pdf","application/x-pdf"]);async function E(e){let t=(e.type??"").toLowerCase();if(t!==""&&!b.has(t))return"other";let n;try{n=x(await p(e))}catch{n=!1}return n?"pdf":t===""?"other":"bad"}async function p(e){let t=e.slice(0,16);return typeof t.arrayBuffer=="function"?new Uint8Array(await t.arrayBuffer()):new Promise((n,r)=>{let o=new FileReader;o.onload=()=>n(new Uint8Array(o.result)),o.onerror=()=>r(o.error),o.readAsArrayBuffer(t)})}var y=async e=>{let t=await createImageBitmap(e,{imageOrientation:"from-image"});return{width:t.width,height:t.height,draw:(n,r,o)=>n.drawImage(t,0,0,r,o),close:()=>t.close()}},A=(e,t)=>{let n=document.createElement("canvas");n.width=e.width,n.height=e.height;let r=n.getContext("2d");return r===null?Promise.resolve(null):(e.draw(r,e.width,e.height),new Promise(o=>n.toBlob(o,"image/jpeg",t)))};async function P(e,t={}){let n=(e.type??"").toLowerCase();if(!m.has(n)||e.size===0)throw new TypeError("unsupported_file");let r;try{r=w(await p(e))}catch{r=null}if(r===null)throw new TypeError("unsupported_file");if(r!=="heif"&&e.size<=5242880)return{blob:e,contentType:r==="png"?"image/png":"image/jpeg",converted:!1};let o=t.decode??y,d=t.encode??A,i;try{i=await o(e)}catch{throw new TypeError("unsupported_file")}try{if(!(i.width>0&&i.height>0))throw new TypeError("unsupported_file");let l=Math.min(2560,Math.max(i.width,i.height));for(let c=0;c<2;c+=1){let s=l/Math.max(i.width,i.height),u={width:Math.max(1,Math.round(i.width*s)),height:Math.max(1,Math.round(i.height*s)),draw:i.draw};for(let f of g){let a=await d(u,f).catch(()=>null);if(a!==null&&a.size>0&&a.size<=5242880)return{blob:a,contentType:"image/jpeg",converted:!0}}l=Math.round(l*.75)}throw new TypeError("unsupported_file")}finally{i.close()}}export{U as UPLOAD_MAX_BYTES,_ as UPLOAD_MAX_LONG_SIDE,E as pdfFileKind,P as prepareUploadFile,x as sniffPdf,w as sniffUploadFormat};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/web",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.27",
|
|
4
4
|
"description": "Sekyro AI web SDK \u2014 browser liveness capture, hosted-verification client and popup embed for Sekyro AI identity verification",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "web",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/web@0.1.0-rc.
|
|
100
|
+
"version": "0.1.0-rc.27",
|
|
101
|
+
"bom-ref": "@sekyro/web@0.1.0-rc.27",
|
|
102
102
|
"description": "Sekyro AI web SDK — browser liveness capture, hosted-verification client and popup embed for Sekyro AI identity verification",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/web@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/web@0.1.0-rc.27?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-web",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"name": "tasks-vision",
|
|
151
151
|
"group": "@mediapipe",
|
|
152
152
|
"version": "0.10.35",
|
|
153
|
-
"bom-ref": "@sekyro/web@0.1.0-rc.
|
|
153
|
+
"bom-ref": "@sekyro/web@0.1.0-rc.27|@mediapipe/tasks-vision@0.10.35",
|
|
154
154
|
"licenses": [
|
|
155
155
|
{
|
|
156
156
|
"license": {
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"name": "thumbmarkjs",
|
|
186
186
|
"group": "@thumbmarkjs",
|
|
187
187
|
"version": "1.12.0",
|
|
188
|
-
"bom-ref": "@sekyro/web@0.1.0-rc.
|
|
188
|
+
"bom-ref": "@sekyro/web@0.1.0-rc.27|@thumbmarkjs/thumbmarkjs@1.12.0",
|
|
189
189
|
"licenses": [
|
|
190
190
|
{
|
|
191
191
|
"license": {
|
|
@@ -218,17 +218,17 @@
|
|
|
218
218
|
],
|
|
219
219
|
"dependencies": [
|
|
220
220
|
{
|
|
221
|
-
"ref": "@sekyro/web@0.1.0-rc.
|
|
221
|
+
"ref": "@sekyro/web@0.1.0-rc.27",
|
|
222
222
|
"dependsOn": [
|
|
223
|
-
"@sekyro/web@0.1.0-rc.
|
|
224
|
-
"@sekyro/web@0.1.0-rc.
|
|
223
|
+
"@sekyro/web@0.1.0-rc.27|@mediapipe/tasks-vision@0.10.35",
|
|
224
|
+
"@sekyro/web@0.1.0-rc.27|@thumbmarkjs/thumbmarkjs@1.12.0"
|
|
225
225
|
]
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
"ref": "@sekyro/web@0.1.0-rc.
|
|
228
|
+
"ref": "@sekyro/web@0.1.0-rc.27|@mediapipe/tasks-vision@0.10.35"
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
|
-
"ref": "@sekyro/web@0.1.0-rc.
|
|
231
|
+
"ref": "@sekyro/web@0.1.0-rc.27|@thumbmarkjs/thumbmarkjs@1.12.0"
|
|
232
232
|
}
|
|
233
233
|
]
|
|
234
234
|
}
|