diff --git a/.changeset/config.json b/.changeset/config.json index 8ede950..fe0dc6b 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -13,7 +13,7 @@ ] ], "access": "restricted", - "baseBranch": "main", + "baseBranch": "master", "updateInternalDependencies": "patch", "ignore": [] } diff --git a/.gitignore b/.gitignore index f30d15d..600ee0f 100644 --- a/.gitignore +++ b/.gitignore @@ -291,6 +291,9 @@ dist # vim files Session.vim *.sw? +.nvimrc +.vimrc +.tasks.json # JetBrains IDEs .idea diff --git a/.npmrc b/.npmrc index 71ea104..2e1ede7 100644 --- a/.npmrc +++ b/.npmrc @@ -6,7 +6,6 @@ public-hoist-pattern[]="*eslint*" public-hoist-pattern[]="@prettier/plugin-*" public-hoist-pattern[]="*prettier-plugin-*" public-hoist-pattern[]="prettier" -# public-hoist-pattern[]="*vitest*"" # legacy-peer-deps=true diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index f574853..69f9568 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,16 +1,104 @@ -# Release notes +## v7.6.0 -All notable changes to this project will be documented in this file. +### What's New -# v7.4.3 +- We introduced event tracking across the SDK lifecycle, giving you deeper insights into user journeys, success rates, and drop-off points during scanning sessions. These enhanced analytics make it easier to identify optimization opportunities and ensure the best possible user experience. +- Updated detection analysis logic in case of photo mode +- Added support for capturing the back of US passports that feature a barcode +- Unparsable barcodes no longer prevent the scanning process from finishing and will be returned as raw data in the result if the `recognitionModeFilter` is set to `enableFullDocumentRecognition`. Using `enableBarcodeId` still requires the barcode to be parsable in order to successfully finish the scanning process +- Added a new `parsed` property on the barcode property of the `SingleSideScanningResult` which indicates if the raw barcode data was successfully parsed into structured information. +- Improved visual clarity and of feedback UI elements +- Added a new UI state `MOVE_LAST_PAGE` for Indian passports and applicable US passports, as well as the accompanying UI feedback message in `@microblink/blinkid-ux-manager`. +- Renamed `#handleUiStateChanges` method to `#updateUiStateFromProcessResult` +- Added missing `showHelpTooltipTimeout` option to the `FeedbackUiOptions` +- Added haptic feedback on supported devices +- Added translation files in `@microblink/camera-manager` and `@microblink/blinkid-ux-manager` for 33 new languages + +### Bugfixes + +- Fixed the issue with scanning the back of the Essad Card which was causing only Date of Expiry to be extracted +- Fixed the issue with `additionalNameInformation` extraction for France ID and Residence Permit +- Prevent parsing of two-line MRZ in TD1 format unless it's explicitly allowed. This will prevent false positive MRZ extraction on documents where the last line of the MRZ is covered or not fully visible +- Users are no longer forced to scan back sides of Alien and Refugee passports +- Fixed the issue with Togo ID where document number from VIZ was overriden by a wrong value from MRZ + +- Various other minor bug fixes and cleanups + +### New Documents Support + +- Angola - Paper Passport +- Bahrain - Polycarbonate Passport +- Burkina Faso - Polycarbonate Passport +- Cameroon - Driver's License +- Canada, Manitoba - Metis Federation Card +- East Timor - Polycarbonate Passport +- El Salvador - Paper Passport +- Eritrea - Paper Passport +- France - Adr Certificate +- Germany - Adr Certificate +- Ghana - Voter ID +- India, Telangana - Driver's License +- Ivory Coast - Paper Passport +- Japan - Polycarbonate Passport +- Liberia - Paper Passport +- Liberia - Voter ID +- Malawi - Identity Card +- Malawi - Paper Passport +- Maldives - Polycarbonate Passport +- Mali - Paper Passport +- Mauritius - Paper Passport +- Oman - Vehicle Registration +- Paraguay - Polycarbonate Passport +- Rwanda - Driver's License +- Senegal - Driver's License +- Sierra Leone - Paper Passport +- Somalia - Paper Passport +- Switzerland - Adr Certificate +- Togo - Driver's License +- Togo - Paper Passport +- USA, Maryland - Medical Marijuana ID +- Vietnam - Paper Passport + +#### New Document Versions for Supported Documents + +- Chile - Polycarbonate Passport +- India - Paper Passport +- Moldova - Identity Card +- Pakistan - Identity Card +- Peru - Identity Card +- Romania - Identity Card +- Slovakia - Identity Card +- USA, California - Driver's License +- USA, California - Identity Card +- USA, New Hampshire - Identity Card +- USA, Georgia - Medical Marijuana ID +- USA, Pennsylvania - Medical Marijuana ID +- USA, South Carolina - Driver's License +- USA, South Carolina - Identity Card +- USA, Texas - Driver's License +- USA, Texas - Identity Card + +#### New Segments Supported on Documents + +- Switzerland, Residence Permit - 'dateOfEntry' +- Hungary, Identity Card - 'maidenName', 'nationality', 'sexOrGender', 'documentNumber', 'dateOfBirth' +- Greece, Identity Card - 'fathersName' (Latin and Greek), 'mothersName' (Latin and Greek), 'personalIdNumber', 'issuingAuthority' (Greek), 'municipalityOfRegistration' (Greek) +- Mexico, Voter ID - 'sectionCode', 'stateCode', 'municipalityCode', 'localityCode' +- Mexico, Consular Voter ID - 'stateCode', 'stateName' + +#### Renamed segments + +- Hungary - Identity Card - `additionalNameInformation` -> `mothersName` + +## v7.4.3 ### Bug Fixes - Fixed types -# v7.4.2 +## v7.4.2 -## What's New +### What's New - Improved `loadBlinkIdCore()` callback. `loadProgress` is now called even when resources response does not have `Content-Length` header - `BlinkIdUxManager` will now clear session object on `DOCUMENT_CAPTURED` event @@ -25,9 +113,9 @@ All notable changes to this project will be documented in this file. - Fixed issue with some iPhonePro devices where rotating device would affect scanning - Fixed small memory leak happening while creating user agent string -# v7.4.1 +## v7.4.1 -## What's New +### What's New - Exposed `addDocumentClassFilter` and `addOnDocumentFilteredCallback` on the `BlinkIdComponent` type - Enhanced reset session behaviour in `BlinkIdUxManager` @@ -40,11 +128,11 @@ All notable changes to this project will be documented in this file. - Fixed issue where `ErrorModal` would not close in some cases. - Fixed issue where UI had stale state after session restart. -# v7.4.0 +## v7.4.0 -## What's New +### What's New -### New Documents Support +#### New Documents Support - Canada, Newfoundland And Labrador - Identity Card - Canada, Northwest Territories - Driver's License @@ -52,7 +140,7 @@ All notable changes to this project will be documented in this file. - Canada, Prince Edward Island - Identity Card - Canada, Yukon - Identity Card -### New Document Versions for Supported Documents +#### New Document Versions for Supported Documents - Canada, Yukon - Driver's License @@ -65,9 +153,9 @@ All notable changes to this project will be documented in this file. - Added API documentation specification -# v7.3.2 +## v7.3.2 -## What's New +### What's New - Added utilities for extracting images from `BlinkIdScanningResult`: - `extractSideInputImage` @@ -80,33 +168,34 @@ All notable changes to this project will be documented in this file. - Fixed issues where EMBind was configured with invalid property mappings. - -# v7.3.1 - -## Hotfix Release - -- Fixed an issue where the camera failed to start on certain Windows desktop devices. -- Fixed an issue where BlinkIdModule.worker.mjs was incorrectly requested over the network. +## v7.3.1 ### Fixes - Fixed an issue where the camera failed to start on certain Windows desktop devices. - Fixed an issue where BlinkIdModule.worker.mjs was incorrectly requested over the network. -# v7.3.0 +## v7.3.0 + +### What's New -## What's New - Improved extraction for Canada/Nunavut ID and DL by introducing error correction for "1" and "I" characters which look the same in the font used on a document -## Bugfixes + +### Bugfixes + - Fixed document number extraction from Canada/Nunavut barcodes - Fix for ARGENTINA ID and ALIEN_ID documents - made separate barcode scanning step optional for these documents. They have a barcode on the front side, and requiring barcode extraction was causing the scanning process to get stuck on the front. -## New Documents Support + +### New Documents Support + - Canada, Nunavut - Driver's License - Canada, Nunavut - Identity Card - Liberia - Identity Card - Mali - Identity Card - UK - Military ID -## New Document Versions for Supported Documents + +### New Document Versions for Supported Documents + - Bahrain - Identity Card - Canada - Weapon Permit - Chile - Alien ID @@ -123,68 +212,75 @@ All notable changes to this project will be documented in this file. - USA, Alaska - Driver's License - USA, New Hampshire - Driver's License - European Union - Health Insurance Card -## New Beta Documents Support + +### New Beta Documents Support + - Canada - Non Card Tribal ID - Dominica - Paper Passport - Dominica - Polycarbonate Passport - UAE - Diplomatic ID - USA, Georgia - Medical Marijuana ID -## New Document Versions for Beta-Supported Documents + +### New Document Versions for Beta-Supported Documents + - Egypt - Driver's License - Mexico, Quintana Roo - Driver's License - Philippines - Postal ID - Vietnam - Identity Card -## New Segments Supported on Documents + +### New Segments Supported on Documents + - European Union, Health Insurance Card - `countryCode` - Italy, Identity Card - `documentOptionalAdditionalNumber` - France, Identity Card - `additionalNameInformation` - UK, Asylum Request - `residencePermitType`, `remarks` - UK, Residence Permit - `residencePermitType`, `remarks`, `certificateNumber`, `nationalInsuranceNumber` -## Renamed segments + +### Renamed segments + - Bahrain - Identity Card - `documentNumber` -> `personalIdNumber` -## Changes inside packages -### @microblink/blinkid-ux-manager + +### Changes inside packages + +#### @microblink/blinkid-ux-manager + - Added `showHelpButton` property to `FeedbackUiOptions` for improved UI control. - Added part attribute `help-button-part` to the help button to enable external styling. - Added additional control of the help tooltip via `setHelpTooltipShowDelay` and `setHelpTooltipHideDelay` methods on the `BlinkIdUxManager` - `setTimeoutDuration` now defaultly sets `setHelpTooltipShowDelay` to the 50% duration - Updated help tooltip default behaviour -### @microblink/blinkid-wasm + +#### @microblink/blinkid-wasm + - Fixed incorrect property name in `MrzResult`: `rawMRZString` is now correctly exposed as `rawMrzString`. - Fixed incorrect `full-document` type `document` type in `ImageExtractionType`. - Fixed typing issue by correctly adding the `vehicleOwner` property to `BlinkIdScanningResult`. - Added `certificateNumber`, `countryCode` and `nationalInsuranceNumber` to `BlinkIdScanningResult` and `VizResult` types. - Added `non-card-tribal-id` and `diplomatic-id` to `DocumentType` - This change updates the Emscripten toolchain to version 4.0.9, upgrades multiple C++ package dependencies, and adds new document types (`non-card-tribal-id`, `diplomatic-id`) and field types (certificateNumber, countryCode, nationalInsuranceNumber) to the BlinkID recognition system. -### @microblink/camera-manager + +#### @microblink/camera-manager + - Enhanced customization capabilities with additional modification options. - Added `showTorchButton` and `showCloseButton` properties to `CameraManagerUiOptions` for improved UI control. - Added part attribute `camera-select-part` to the camera select element to enable external styling. - Added part attribute `video-element-part` to the video element to enable external styling. -# v7.2.2 - -## Hotfix Release - -- Fixed an issue where the SDK failed to initialize properly when resources were hosted on a different origin than the application, which was caused by Web Worker initialization failures. +## v7.2.2 ### Fixes -- Fixed an issue where the Web Worker failed to initialize when SDK resources were hosted on a different origin than the application. - -# v7.2.1 - -## Hotfix Release +- Fixed an issue where the SDK failed to initialize properly when resources were hosted on a different origin than the application, which was caused by Web Worker initialization failures. -- Fixed an issue with frame quality estimation that could cause the recognition process to get stuck. This fix significantly improves success rate of document capturing, especially for the desktop cameras +## v7.2.1 ### Fixes -- Fixed an issue with frame quality estimation. +- Fixed an issue with frame quality estimation that could cause the recognition process to get stuck. This fix significantly improves success rate of document capturing, especially for the desktop cameras -# v7.2.0 +## v7.2.0 -## What's new +### What's new - Added the ability to filter documents using the `addDocumentClassFilter` method on the BlinkID UX Manager. - Added new user feedback for scanning multi-page passport documents. @@ -193,7 +289,7 @@ All notable changes to this project will be documented in this file. - Added "Demo" overlay for the demo licenses (non-production) - Added "Powered by Microblink" overlay option for licenses with this enabled -## Bug Fixes +### Bug Fixes - Fixed data match bug when partial anonymisation is enabled - Fixed face extraction bug for rotated face images on documents @@ -204,9 +300,9 @@ All notable changes to this project will be documented in this file. - Fixed bug that caused skipping back side when only signature was present - Fixed an issue which caused certain feedback messages to be displayed too briefly. -# v7.1.0 +## v7.1.0 -## What's New +### What's New #### New Documents Support @@ -272,43 +368,35 @@ All notable changes to this project will be documented in this file. - Egypt, Driver's Licenses - expanding support for extracting segments in Arabic script -# v7.0.1 - -## Hotfix Release - -This is a hotfix release that addresses issues with remote licenses. +## v7.0.1 ### Fixes - Fixed issues with remote license handling ---- - -# v7.0.0 +## v7.0.0 We're excited to introduce BlinkID v7, a major upgrade designed to simplify your integration and deliver a simpler ID scanning experience. With BlinkID v7, we're taking a fresh approach to scanning logic by introducing a more straightforward, session-based API for an easier configuration path, all while boosting first-time scan success rate. -## Highlights & Integration Improvements +### Highlights & Integration Improvements - **Unified session-based API**: We've moved away from juggling multiple recognizers (e.g., SingleSide, MultiSide) to a single session-based approach, unifying scanning logic under one simplified API. There's no need to switch recognizers anymore. - **Backward compatibility**: Existing production keys will continue to work with v7.0. No new license key is required for the upgrade. - **More maintainable codebase**: This new architecture sets the stage for easier and faster updates. -## Architecture Changes +### Architecture Changes - **New core components**: Instead of Recognizer-based architecture, BlinkID uses a streamlined session-based approach. - **Modern TypeScript**: Written with modern TypeScript features for improved developer experience. - **Component-based UI**: Simplified, customizable UI components for easier integration. - **Simplified flow**: More straightforward API with clearer separation of concerns. -## Major API Changes +### Major API Changes - **New session-based API** - - Replaces the recognizer-based approach with a single, streamlined session model for easier scanning logic and better maintainability. - **Modular SDK structure** - - The SDK is now modular: - [`@microblink/blinkid-core`](https://www.npmjs.com/package/@microblink/blinkid-core) for scanning logic. - [`@microblink/blinkid-ux-manager`](https://www.npmjs.com/package/@microblink/blinkid-ux-manager) for prebuilt UI components. @@ -316,7 +404,6 @@ We're excited to introduce BlinkID v7, a major upgrade designed to simplify your - [`@microblink/blinkid`](https://www.npmjs.com/package/@microblink/blinkid) as the all-in-one package. - **Simplified initialization & result handling** - - New SDK initialization method: ```javascript @@ -330,7 +417,6 @@ We're excited to introduce BlinkID v7, a major upgrade designed to simplify your - Results are now retrieved through structured session-based callbacks. - **Enhanced UI customization** - - UI settings enable direct customization of typography, colors, and strings. - The modular architecture allows advanced modifications for branding and accessibility. @@ -343,7 +429,7 @@ We're excited to introduce BlinkID v7, a major upgrade designed to simplify your - `cardRotation`→ `documentRotation` - And more... -## Plan Your Upgrade +### Plan Your Upgrade Note that v6 is now considered legacy. Comprehensive documentation is in development - in the meantime, please refer to our example applications in the repository under `apps/examples` for integration patterns: diff --git a/apps/examples/blinkid-advanced-setup/CHANGELOG.md b/apps/examples/blinkid-advanced-setup/CHANGELOG.md index 4a47f27..e4b021c 100644 --- a/apps/examples/blinkid-advanced-setup/CHANGELOG.md +++ b/apps/examples/blinkid-advanced-setup/CHANGELOG.md @@ -1,5 +1,14 @@ # example-blinkid-advanced-setup +## 1.1.14 + +### Patch Changes + +- Updated dependencies + - @microblink/camera-manager@7.2.6 + - @microblink/blinkid-ux-manager@7.6.0 + - @microblink/blinkid-core@7.6.0 + ## 1.1.13 ### Patch Changes diff --git a/apps/examples/blinkid-advanced-setup/package.json b/apps/examples/blinkid-advanced-setup/package.json index 2a679a2..1baf8ff 100644 --- a/apps/examples/blinkid-advanced-setup/package.json +++ b/apps/examples/blinkid-advanced-setup/package.json @@ -2,7 +2,7 @@ "name": "example-blinkid-advanced-setup", "description": "An example of advanced BlinkID SDK setup", "private": true, - "version": "1.1.13", + "version": "1.1.14", "scripts": { "build": "vite build", "build:js-dev": "vite build --mode development", @@ -20,7 +20,7 @@ "@microblink/blinkid-ux-manager": "workspace:^", "@microblink/camera-manager": "workspace:^", "@microblink/feedback-stabilizer": "workspace:^", - "solid-js": "^1.9.5", + "solid-js": "^1.9.9", "yy-fps": "^2.0.1" }, "devDependencies": { @@ -33,7 +33,7 @@ "eslint-define-config": "^1.24.1", "eslint-plugin-solid": "0.14.5", "mkcert-cli": "^1.5.0", - "prettier": "^3.5.1", + "prettier": "^3.6.2", "rimraf": "^6.0.1", "sass": "^1.85.0", "serve": "^14.2.4", @@ -43,7 +43,7 @@ "vite-plugin-mkcert": "^1.17.6", "vite-plugin-qrcode": "^0.2.4", "vite-plugin-solid": "^2.11.6", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "license": "MIT" } diff --git a/apps/examples/blinkid-advanced-setup/src/App.tsx b/apps/examples/blinkid-advanced-setup/src/App.tsx index 846b37c..b6c3a35 100644 --- a/apps/examples/blinkid-advanced-setup/src/App.tsx +++ b/apps/examples/blinkid-advanced-setup/src/App.tsx @@ -7,7 +7,6 @@ import { BlinkIdScanningResult, loadBlinkIdCore, - BlinkIdProcessResult, } from "@microblink/blinkid-core"; import { BlinkIdUxManager, diff --git a/apps/examples/blinkid-core-api/CHANGELOG.md b/apps/examples/blinkid-core-api/CHANGELOG.md index a7bcdbe..2b456be 100644 --- a/apps/examples/blinkid-core-api/CHANGELOG.md +++ b/apps/examples/blinkid-core-api/CHANGELOG.md @@ -1,5 +1,14 @@ # example-blinkid-core-api +## 1.1.14 + +### Patch Changes + +- Update dependencies +- Updated dependencies +- Updated dependencies [8e05b35] + - @microblink/blinkid-core@7.6.0 + ## 1.1.13 ### Patch Changes diff --git a/apps/examples/blinkid-core-api/package.json b/apps/examples/blinkid-core-api/package.json index e01dbf1..9a0d2a5 100644 --- a/apps/examples/blinkid-core-api/package.json +++ b/apps/examples/blinkid-core-api/package.json @@ -2,7 +2,7 @@ "name": "example-blinkid-core-api", "description": "Example of using BlinkID Core API", "private": true, - "version": "1.1.13", + "version": "1.1.14", "scripts": { "build": "vite build", "build:js-dev": "vite build --mode development", @@ -30,7 +30,7 @@ "eslint-define-config": "^1.24.1", "eslint-plugin-solid": "0.14.5", "mkcert-cli": "^1.5.0", - "prettier": "^3.5.1", + "prettier": "^3.6.2", "resolve-package-path": "^4.0.3", "rimraf": "^6.0.1", "sass": "^1.85.0", @@ -39,7 +39,7 @@ "typescript": "^5.8.3", "vite": "^6.2.1", "vite-plugin-mkcert": "^1.17.6", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "license": "MIT" } diff --git a/apps/examples/blinkid-photo-upload/CHANGELOG.md b/apps/examples/blinkid-photo-upload/CHANGELOG.md index 6ae9a3b..38ff301 100644 --- a/apps/examples/blinkid-photo-upload/CHANGELOG.md +++ b/apps/examples/blinkid-photo-upload/CHANGELOG.md @@ -1,5 +1,14 @@ # example-blinkid-photo-upload +## 1.0.6 + +### Patch Changes + +- Update dependencies +- Updated dependencies +- Updated dependencies [8e05b35] + - @microblink/blinkid-core@7.6.0 + ## 1.0.5 ### Patch Changes diff --git a/apps/examples/blinkid-photo-upload/package.json b/apps/examples/blinkid-photo-upload/package.json index 1a8f54d..da3a460 100644 --- a/apps/examples/blinkid-photo-upload/package.json +++ b/apps/examples/blinkid-photo-upload/package.json @@ -2,7 +2,7 @@ "name": "example-blinkid-photo-upload", "description": "An example of BlinkID SDK with photo upload", "private": true, - "version": "1.0.5", + "version": "1.0.6", "scripts": { "build": "vite build", "build:js-dev": "vite build --mode development", @@ -17,7 +17,7 @@ "type": "module", "dependencies": { "@microblink/blinkid-core": "workspace:^", - "solid-js": "^1.9.5" + "solid-js": "^1.9.9" }, "devDependencies": { "@microblink/tsconfig": "workspace:*", @@ -29,7 +29,7 @@ "eslint-define-config": "^1.24.1", "eslint-plugin-solid": "0.14.5", "mkcert-cli": "^1.5.0", - "prettier": "^3.5.1", + "prettier": "^3.6.2", "rimraf": "^6.0.1", "sass": "^1.85.0", "serve": "^14.2.4", @@ -39,7 +39,7 @@ "vite-plugin-mkcert": "^1.17.6", "vite-plugin-qrcode": "^0.2.4", "vite-plugin-solid": "^2.11.6", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "license": "MIT" } diff --git a/apps/examples/blinkid-preload/CHANGELOG.md b/apps/examples/blinkid-preload/CHANGELOG.md index 76a21e3..2b806f5 100644 --- a/apps/examples/blinkid-preload/CHANGELOG.md +++ b/apps/examples/blinkid-preload/CHANGELOG.md @@ -1,5 +1,14 @@ # example-blinkid-preload +## 1.1.14 + +### Patch Changes + +- Updated dependencies + - @microblink/camera-manager@7.2.6 + - @microblink/blinkid-ux-manager@7.6.0 + - @microblink/blinkid-core@7.6.0 + ## 1.1.13 ### Patch Changes diff --git a/apps/examples/blinkid-preload/package.json b/apps/examples/blinkid-preload/package.json index 23a4084..11505da 100644 --- a/apps/examples/blinkid-preload/package.json +++ b/apps/examples/blinkid-preload/package.json @@ -2,7 +2,7 @@ "name": "example-blinkid-preload", "description": "Example BlinkID preload application", "private": true, - "version": "1.1.13", + "version": "1.1.14", "scripts": { "build": "vite build", "build:js-dev": "vite build --mode development", @@ -21,7 +21,7 @@ "@microblink/blinkid-core": "workspace:^", "@microblink/blinkid-ux-manager": "workspace:^", "@microblink/camera-manager": "workspace:^", - "solid-js": "^1.9.5" + "solid-js": "^1.9.9" }, "devDependencies": { "@microblink/tsconfig": "workspace:*", @@ -33,7 +33,7 @@ "eslint-define-config": "^1.24.1", "eslint-plugin-solid": "0.14.5", "mkcert-cli": "^1.5.0", - "prettier": "^3.5.1", + "prettier": "^3.6.2", "rimraf": "^6.0.1", "sass": "^1.85.0", "serve": "^14.2.4", @@ -42,7 +42,7 @@ "vite": "^6.2.1", "vite-plugin-mkcert": "^1.17.6", "vite-plugin-solid": "^2.11.6", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "license": "MIT" } diff --git a/apps/examples/blinkid-preload/src/App.module.css b/apps/examples/blinkid-preload/src/App.module.css index 0396de7..fa31e26 100644 --- a/apps/examples/blinkid-preload/src/App.module.css +++ b/apps/examples/blinkid-preload/src/App.module.css @@ -114,7 +114,7 @@ transition: border-color 0.2s; } -.input:focus { +.input:focus-visible { outline: none; border-color: var(--button-bg); } diff --git a/apps/examples/blinkid-simple/CHANGELOG.md b/apps/examples/blinkid-simple/CHANGELOG.md index ecccee7..a84cc50 100644 --- a/apps/examples/blinkid-simple/CHANGELOG.md +++ b/apps/examples/blinkid-simple/CHANGELOG.md @@ -1,5 +1,13 @@ # example-blinkid-simple +## 1.1.14 + +### Patch Changes + +- Update dependencies +- Updated dependencies + - @microblink/blinkid@7.6.0 + ## 1.1.13 ### Patch Changes diff --git a/apps/examples/blinkid-simple/package.json b/apps/examples/blinkid-simple/package.json index ebefec8..edaf9a1 100644 --- a/apps/examples/blinkid-simple/package.json +++ b/apps/examples/blinkid-simple/package.json @@ -2,7 +2,7 @@ "name": "example-blinkid-simple", "description": "Example quickstart app showcasing usage of the @microblink/blinkid package", "private": true, - "version": "1.1.13", + "version": "1.1.14", "scripts": { "build": "vite build", "build:js-dev": "vite build --mode development", @@ -30,7 +30,7 @@ "eslint-define-config": "^1.24.1", "eslint-plugin-solid": "0.14.5", "mkcert-cli": "^1.5.0", - "prettier": "^3.5.1", + "prettier": "^3.6.2", "resolve-package-path": "^4.0.3", "rimraf": "^6.0.1", "sass": "^1.85.0", @@ -39,7 +39,7 @@ "typescript": "^5.8.3", "vite": "^6.2.1", "vite-plugin-mkcert": "^1.17.6", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "license": "MIT" } diff --git a/apps/examples/blinkid-simple/src/index.ts b/apps/examples/blinkid-simple/src/index.ts index 7278033..4e20e44 100644 --- a/apps/examples/blinkid-simple/src/index.ts +++ b/apps/examples/blinkid-simple/src/index.ts @@ -12,9 +12,6 @@ import { createBlinkId } from "@microblink/blinkid"; */ const blinkid = await createBlinkId({ licenseKey: import.meta.env.VITE_LICENCE_KEY, - cameraManagerUiOptions: { - showMirrorCameraButton: false, - }, }); /** diff --git a/apps/examples/blinkid-ui-customization/CHANGELOG.md b/apps/examples/blinkid-ui-customization/CHANGELOG.md index 8dcaef4..3ecfb3e 100644 --- a/apps/examples/blinkid-ui-customization/CHANGELOG.md +++ b/apps/examples/blinkid-ui-customization/CHANGELOG.md @@ -1,5 +1,14 @@ # example-blinkid-ui-customization +## 1.0.3 + +### Patch Changes + +- Updated dependencies + - @microblink/camera-manager@7.2.6 + - @microblink/blinkid-ux-manager@7.6.0 + - @microblink/blinkid-core@7.6.0 + ## 1.0.2 ### Patch Changes diff --git a/apps/examples/blinkid-ui-customization/package.json b/apps/examples/blinkid-ui-customization/package.json index 82a5a51..fec6da8 100644 --- a/apps/examples/blinkid-ui-customization/package.json +++ b/apps/examples/blinkid-ui-customization/package.json @@ -2,7 +2,7 @@ "name": "example-blinkid-ui-customization", "description": "An example demonstrating custom UI implementations for BlinkID SDK", "private": true, - "version": "1.0.2", + "version": "1.0.3", "scripts": { "build": "vite build", "build:js-dev": "vite build --mode development", @@ -20,7 +20,7 @@ "@microblink/blinkid-ux-manager": "workspace:^", "@microblink/camera-manager": "workspace:^", "@microblink/feedback-stabilizer": "workspace:^", - "solid-js": "^1.9.5" + "solid-js": "^1.9.9" }, "devDependencies": { "@microblink/tsconfig": "workspace:*", @@ -32,7 +32,7 @@ "eslint-define-config": "^1.24.1", "eslint-plugin-solid": "0.14.5", "mkcert-cli": "^1.5.0", - "prettier": "^3.5.1", + "prettier": "^3.6.2", "rimraf": "^6.0.1", "sass": "^1.85.0", "serve": "^14.2.4", @@ -42,7 +42,7 @@ "vite-plugin-mkcert": "^1.17.6", "vite-plugin-qrcode": "^0.2.4", "vite-plugin-solid": "^2.11.6", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "license": "MIT" } \ No newline at end of file diff --git a/apps/examples/camera-manager/CHANGELOG.md b/apps/examples/camera-manager/CHANGELOG.md index b2bf9d0..39885f9 100644 --- a/apps/examples/camera-manager/CHANGELOG.md +++ b/apps/examples/camera-manager/CHANGELOG.md @@ -1,5 +1,12 @@ # example-camera-manager +## 1.1.10 + +### Patch Changes + +- Updated dependencies + - @microblink/camera-manager@7.2.6 + ## 1.1.9 ### Patch Changes diff --git a/apps/examples/camera-manager/package.json b/apps/examples/camera-manager/package.json index a3764cb..46d9c76 100644 --- a/apps/examples/camera-manager/package.json +++ b/apps/examples/camera-manager/package.json @@ -2,12 +2,12 @@ "name": "example-camera-manager", "description": "Example app showcasing the usage of the @microblink/camera-manager package", "private": true, - "version": "1.1.9", + "version": "1.1.10", "scripts": { "build": "vite build", "build:js-dev": "vite build --mode development", "clean": "rimraf dist public .turbo types tsconfig.tsbuildinfo", - "dev": "vite", + "dev": "vite --host", "lint": "concurrently pnpm:lint:types pnpm:lint:eslint", "lint:eslint": "eslint ./src --max-warnings 0", "lint:types": "tsc --emitDeclarationOnly false --noEmit", @@ -19,7 +19,7 @@ "type": "module", "dependencies": { "@microblink/camera-manager": "workspace:^", - "solid-js": "^1.9.5" + "solid-js": "^1.9.9" }, "devDependencies": { "@microblink/tsconfig": "workspace:*", @@ -31,7 +31,7 @@ "eslint-define-config": "^1.24.1", "eslint-plugin-solid": "0.14.5", "mkcert-cli": "^1.5.0", - "prettier": "^3.5.1", + "prettier": "^3.6.2", "rimraf": "^6.0.1", "sass": "^1.85.0", "serve": "^14.2.4", @@ -42,7 +42,7 @@ "vite-plugin-qrcode": "^0.2.4", "vite-plugin-solid": "^2.11.6", "yy-fps": "^2.0.1", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "license": "MIT" } diff --git a/apps/examples/camera-manager/src/App.tsx b/apps/examples/camera-manager/src/App.tsx index b9a8bc5..464e5ea 100644 --- a/apps/examples/camera-manager/src/App.tsx +++ b/apps/examples/camera-manager/src/App.tsx @@ -54,7 +54,9 @@ export const App: Component = () => { console.log("🧹 Cleaning up"); fps?.remove(); removeFrameCaptureCallback(); + ctx.clearRect(0, 0, canvas.width, canvas.height); }); + await cameraManager.startFrameCapture(); } }; diff --git a/apps/examples/camera-manager/vite.config.ts b/apps/examples/camera-manager/vite.config.ts index 9dc4875..468956f 100644 --- a/apps/examples/camera-manager/vite.config.ts +++ b/apps/examples/camera-manager/vite.config.ts @@ -13,10 +13,6 @@ dns.setDefaultResultOrder("verbatim"); const serverOptions: ServerOptions = { port: 3000, - headers: { - "Cross-Origin-Embedder-Policy": "require-corp", - "Cross-Origin-Opener-Policy": "same-origin", - }, }; export default defineConfig((config) => { diff --git a/apps/examples/camera-selection/CHANGELOG.md b/apps/examples/camera-selection/CHANGELOG.md index faea2b2..60eadd3 100644 --- a/apps/examples/camera-selection/CHANGELOG.md +++ b/apps/examples/camera-selection/CHANGELOG.md @@ -1,5 +1,12 @@ # example-camera-manager-selection +## 1.1.10 + +### Patch Changes + +- Updated dependencies + - @microblink/camera-manager@7.2.6 + ## 1.1.9 ### Patch Changes diff --git a/apps/examples/camera-selection/package.json b/apps/examples/camera-selection/package.json index 01b0ac9..29e6d68 100644 --- a/apps/examples/camera-selection/package.json +++ b/apps/examples/camera-selection/package.json @@ -2,7 +2,7 @@ "name": "example-camera-manager-selection", "description": "Example app showcasing the usage of the @microblink/camera-manager package with camera selection", "private": true, - "version": "1.1.9", + "version": "1.1.10", "scripts": { "build": "vite build", "build:js-dev": "vite build --mode development", @@ -19,7 +19,7 @@ "type": "module", "dependencies": { "@microblink/camera-manager": "workspace:^", - "solid-js": "^1.9.5" + "solid-js": "^1.9.9" }, "devDependencies": { "@microblink/tsconfig": "workspace:*", @@ -31,7 +31,7 @@ "eslint-define-config": "^1.24.1", "eslint-plugin-solid": "0.14.5", "mkcert-cli": "^1.5.0", - "prettier": "^3.5.1", + "prettier": "^3.6.2", "rimraf": "^6.0.1", "sass": "^1.85.0", "serve": "^14.2.4", @@ -42,7 +42,7 @@ "vite-plugin-qrcode": "^0.2.4", "vite-plugin-solid": "^2.11.6", "yy-fps": "^2.0.1", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "license": "MIT" } diff --git a/docs/OssDependencies.md b/docs/OssDependencies.md new file mode 100644 index 0000000..0aefaaf --- /dev/null +++ b/docs/OssDependencies.md @@ -0,0 +1,175 @@ +# Open Source Dependencies Report + +This report lists all open source dependencies used in the BlinkID SDK packages. + +## Summary + +This report includes: +- **NPM Dependencies**: Production dependencies from all packages in the monorepo (123 packages) +- **C++ Dependencies**: Native dependencies for WebAssembly builds (33 unique packages across 3 build flavors) + +## NPM Dependencies + +| Package | Version | License | Author | Homepage | +|---------|---------|---------|---------|----------| +| @ark-ui/solid | 5.26.2 | MIT | N/A | [Link](https://ark-ui.com) | +| @csstools/normalize.css | 12.1.1 | CC0-1.0 | Jonathan Neal | [Link](https://github.com/csstools/normalize.css#readme) | +| @floating-ui/core | 1.7.3 | MIT | atomiks | [Link](https://floating-ui.com) | +| @floating-ui/dom | 1.7.4 | MIT | atomiks | [Link](https://floating-ui.com) | +| @floating-ui/utils | 0.2.10 | MIT | atomiks | [Link](https://floating-ui.com) | +| @internationalized/date | 3.10.0 | Apache-2.0 | N/A | [Link](https://github.com/adobe/react-spectrum/tree/main#readme) | +| @internationalized/number | 3.6.5 | Apache-2.0 | N/A | [Link](https://github.com/adobe/react-spectrum#readme) | +| @motionone/animation | 10.18.0 | MIT | Matt Perry | N/A | +| @motionone/dom | 10.18.0 | MIT | Matt Perry | N/A | +| @motionone/easing | 10.18.0 | MIT | Matt Perry | N/A | +| @motionone/generators | 10.18.0 | MIT | Matt Perry | N/A | +| @motionone/types | 10.17.1 | MIT | Matt Perry | N/A | +| @motionone/utils | 10.18.0 | MIT | Matt Perry | N/A | +| @solid-primitives/event-listener | 2.4.0 | MIT | David Di Biase | [Link](https://primitives.solidjs.community/package/event-listener) | +| @solid-primitives/keyed | 1.5.0 | MIT | Damian Tarnawski @thetarnav | [Link](https://primitives.solidjs.community/package/keyed) | +| @solid-primitives/props | 3.1.11 | MIT | Damian Tarnawski | [Link](https://primitives.solidjs.community/package/props) | +| @solid-primitives/refs | 1.0.8 | MIT | Damian Tarnawski @thetarnav | [Link](https://primitives.solidjs.community/package/refs) | +| @solid-primitives/resize-observer | 2.1.0 | MIT | Moshe Udimar | [Link](https://primitives.solidjs.community/package/resize-observer) | +| @solid-primitives/rootless | 1.5.0 | MIT | Damian Tarnawski @thetarnav | [Link](https://primitives.solidjs.community/package/rootless) | +| @solid-primitives/static-store | 0.1.0 | MIT | Damian Tarnawski | [Link](https://primitives.solidjs.community/package/static-store) | +| @solid-primitives/transition-group | 1.0.5 | MIT | Damian Tarnawski | [Link](https://primitives.solidjs.community/package/transition-group) | +| @solid-primitives/utils | 6.2.3 | MIT | Damian Tarnawski @thetarnav | [Link](https://github.com/solidjs-community/solid-primitives/tree/main/packages/utils#readme) | +| @swc/helpers | 0.5.3 | Apache-2.0 | 강동윤 | [Link](https://swc.rs) | +| @wessberg/connection-observer | 1.0.5 | MIT | N/A | [Link](https://github.com/wessberg/connection-observer#readme) | +| @zag-js/accordion | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/anatomy | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/angle-slider | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/aria-hidden | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/async-list | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/auto-resize | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/avatar | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/bottom-sheet | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/carousel | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/checkbox | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/clipboard | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/collapsible | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/collection | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/color-picker | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/color-utils | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/combobox | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/core | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/date-picker | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/date-utils | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/dialog | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/dismissable | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/dom-query | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/editable | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/file-upload | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/file-utils | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/floating-panel | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/focus-trap | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/focus-visible | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/highlight-word | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/hover-card | 1.26.3 | MIT | Abraham Aremu | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/i18n-utils | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/interact-outside | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/json-tree-utils | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/listbox | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/live-region | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/menu | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/number-input | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/pagination | 1.26.3 | MIT | Abraham Aremu | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/password-input | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/pin-input | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/popover | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/popper | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/presence | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/progress | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/qr-code | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/radio-group | 1.26.3 | MIT | Abraham Aremu | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/rating-group | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/rect-utils | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/remove-scroll | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/scroll-area | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/scroll-snap | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/select | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/signature-pad | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/slider | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/solid | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/splitter | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/steps | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/store | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/switch | 1.26.3 | MIT | Abraham Aremu | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/tabs | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/tags-input | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/timer | 1.26.3 | MIT | Abraham Aremu | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/toast | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/toggle | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/toggle-group | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/tooltip | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/tour | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/tree-view | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/types | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| @zag-js/utils | 1.26.3 | MIT | Segun Adebayo | [Link](https://github.com/chakra-ui/zag#readme) | +| clsx | 2.1.1 | MIT | Luke Edwards | [Link](https://github.com/lukeed/clsx#readme) | +| comlink | 4.4.2 | Apache-2.0 | Surma | [Link](https://github.com/GoogleChromeLabs/comlink#readme) | +| common-tags | 1.8.2 | MIT | Declan de Wet | [Link](https://github.com/zspecza/common-tags) | +| csstype | 3.1.3 | MIT | Fredrik Nicol | [Link](https://github.com/frenic/csstype#readme) | +| hey-listen | 1.0.8 | MIT | Matt Perry | [Link](https://github.com/Popmotion/hey-listen#readme) | +| is-what | 5.0.2 | MIT | Luca Ban - Mesqueeb | [Link](https://github.com/mesqueeb/is-what#readme) | +| js-tokens | 4.0.0 | MIT | Simon Lydell | [Link](https://github.com/lydell/js-tokens#readme) | +| loose-envify | 1.4.0 | MIT | Andres Suarez | [Link](https://github.com/zertosh/loose-envify) | +| merge-anything | 6.0.3 | MIT | Luca Ban - Mesqueeb | [Link](https://github.com/mesqueeb/merge-anything#readme) | +| nanoid | 5.0.2 | MIT | Andrey Sitnik | [Link](https://github.com/ai/nanoid#readme) | +| perfect-freehand | 1.2.2 | MIT | Steve Ruiz | [Link](https://github.com/steveruizok/perfect-freehand#readme) | +| proxy-compare | 3.0.0 | MIT | Daishi Kato | [Link](https://github.com/dai-shi/proxy-compare#readme) | +| proxy-memoize | 3.0.1 | MIT | Daishi Kato | [Link](https://github.com/dai-shi/proxy-memoize#readme) | +| rad-event-listener | 0.2.4 | MIT | N/A | [Link](https://github.com/JLarky/rad-event-listener#readme) | +| react | 18.2.0 | MIT | N/A | [Link](https://reactjs.org/) | +| rvfc-polyfill | 1.0.7 | GPL-3.0 | ThaUnknown | [Link](https://github.com/ThaUnknown/rvfc-polyfill#readme) | +| seroval | 1.3.2 | MIT | Alexis Munsayac | [Link](https://github.com/lxsmnsyc/seroval/tree/main/packages/seroval) | +| seroval-plugins | 1.3.3 | MIT | Alexis Munsayac | [Link](https://github.com/lxsmnsyc/seroval/tree/main/packages/plugins) | +| solid-js | 1.9.9 | MIT | Ryan Carniato | [Link](https://solidjs.com) | +| solid-motionone | 1.0.3 | MIT | Damian Tarnawski | N/A | +| solid-zustand | 1.8.1 | MIT | N/A | [Link](https://github.com/wobsoriano/solid-zustand#readme) | +| ts-pattern | 5.6.2 | MIT | Gabriel Vergnaud | [Link](https://github.com/gvergnaud/ts-pattern#readme) | +| tslib | 2.6.2 | 0BSD | Microsoft Corp. | [Link](https://www.typescriptlang.org/) | +| type-fest | 4.35.0 | (MIT OR CC0-1.0) | Sindre Sorhus | [Link](https://github.com/sindresorhus/type-fest#readme) | +| uqr | 0.1.2 | MIT | Anthony Fu | [Link](https://github.com/unjs/uqr#readme) | +| use-sync-external-store | 1.2.2 | MIT | N/A | [Link](https://github.com/facebook/react#readme) | +| wasm-feature-detect | 1.8.0 | Apache-2.0 | Surma | [Link](https://github.com/GoogleChromeLabs/wasm-feature-detect#readme) | +| yy-fps | 2.0.1 | MIT | David Figatner | [Link](https://github.com/davidfig/fps#readme) | +| zustand | 4.5.5 | MIT | Paul Henschel | [Link](https://github.com/pmndrs/zustand) | + +## C++ Dependencies + +| Package | License | URL | Description | +|---------|---------|-----|-------------| +| abseil/20250512.0.1@microblink/main#120e2c1b766e76087248ee491d67cb52 | Apache-2.0 | [Link](https://github.com/microblink/abseil-cpp) | Abseil Common Libraries (C++) from Google | +| adv_obfuscator/20170904.1@microblink/main#aa4c2ce54111773ef9ce027667b68d71 | https://github.com/microblink/ADVobfuscator#copyright-and-license | [Link](https://github.com/microblink/ADVobfuscator) | Obfuscation library based on C++11/14 and metaprogramming | +| boost/1.84.1@microblink/main#bff79afef94bda2190fd38c952381df6 | Boost Software license | [Link](https://bitbucket.org/microblink/boost) | Free peer-reviewed portable C++ source libraries. | +| concurrent_queue/1.0.1@microblink/main#b452679c066c30530f176c59cd276208 | Dual licensed under Simplified BSD License and Boost Software License - Version 1.0 | [Link](https://github.com/microblink/concurrentqueue) | A fast multi-producer, multi-consumer lock-free concurrent queue for C++11 | +| config_ex/1.1.1@microblink/main#58895a244f6055c6017a95e43ef5ce63 | MIT | [Link](https://github.com/microblink/config_ex) | Additions to boost/config for additional compiler-specific codegen tweaking macros | +| cpuinfo/20250509.9@microblink/main#40de5b1b7859404e36455d2a5a670efb | BSD 2-Clause "Simplified" License | [Link](https://github.com/microblink/cpuinfo) | cpuinfo is a library to detect essential for performance optimization information about host CPU | +| eigen/3.4.2@microblink/main#406195518d246c1d387b54df8ade9052 | Mozilla Public License Version 2.0 | [Link](https://github.com/microblink/eigen-git-mirror) | Eigen is a C++ template library for linear algebra: vectors, matrices, and related algorithms. It is versatile, fast, elegant and works on many platforms (OS/Compilers). | +| err/1.0.2@microblink/main#c37bea8eb2a49b4f46fdd47f028d144d | Boost Software License | [Link](https://github.com/microblink/err) | err - yet another take on C++ error handling | +| functionoid/1.0.1@microblink/main#a63c389de8e94c11f18c62430bb3aa1f | Boost Software License, Version 1.0 | [Link](https://github.com/microblink/functionoid) | a complete C++17 rewrite of boost/std::function | +| gtest/1.14.9@microblink/main#92cbac29cb2870655027eb912cd72358 | BSD 3-Clause | [Link](https://bitbucket.org/microblink/core-google-test/src) | Google's C++ test framework | +| hash/2.0.3@microblink/main#bca5158cdd3532fd9a32d7539b66194f | zlib | [Link](https://github.com/microblink/hash-library) | Portable C++ Hashing Library | +| kiwaku/20230809.4@microblink/main#6e5eb5cb85661173d4d516738282e5db | BSL-1.0 | [Link](https://github.com/microblink/kiwaku) | C++20 and onward collection of high performance data containers and related tools | +| libjpeg_turbo/3.0.2.2@microblink/main#c5ae8c1d15ab8215718ea3df429e55e1 | BSD-3-Clause, Zlib | [Link](https://github.com/microblink/libjpeg-turbo) | SIMD-accelerated libjpeg-compatible JPEG codec library | +| libpng/1.6.48@microblink/main#a894c6d32b60eb517232069228102b95 | libpng-2.0 | [Link](https://github.com/microblink/libpng) | An Open, Extensible Image Format with Lossless Compression | +| micro_ecc/1.0.0@microblink/main#1c323460f6536c0b0f5baaed9de6bcf5 | BSD 2-Clause "Simplified" License | [Link](https://github.com/microblink/micro-ecc) | A small and fast ECDH and ECDSA implementation for 8-bit, 32-bit, and 64-bit processors. | +| mmap/1.0.2@microblink/main#49540e8a3d87662b601b9b433396582c | Boost Software License | [Link](https://github.com/microblink/mmap) | portable, lightweight, powerful, near-zero-overhead memory mapping and virtual memory management | +| nlohmann_json/3.10.4#2d3ba0c641692cca9fb4514e05154688 | MIT | [Link](https://github.com/conan-io/conan-center-index) | JSON for Modern C++ parser and generator. | +| opencv/4.10.1@microblink/main#2bc2be2ecc71966cde69f7dbdf85a312 | MIT | [Link](https://github.com/microblink/opencv) | Microblink's fork of OpenCV | +| pimpl/1.0.1@microblink/main#4857170a202027c0fd2f22d0c2c4c7a3 | BSD 2-Clause "Simplified" License | [Link](https://github.com/microblink/pimpl) | Proving pimpls do not require heap, exceptions or runtime polymorphism. | +| protobuf/4.25.2@microblink/main#732767a0c74df7e4d7955a035060b19d | BSD | [Link](https://github.com/microblink/protobuf) | Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data | +| qoixx/0.1.7.3@microblink/main#7a99513f8b969271ba87111c1317f1f0 | MIT License | [Link](https://github.com/microblink/qoixx) | qoixx is a high performance MIT licensed single-header QOI implementation written in C++20. | +| range-v3/0.12.0#abb9932b80d96eaf8fc992debe3870ed | BSL-1.0 | [Link](https://github.com/conan-io/conan-center-index) | Experimental range library for C++11/14/17 | +| rapidjson/1.1.6@microblink/main#22545451e78c6dfb8c85f2e14b862674 | BSD | [Link](https://bitbucket.org/microblink/core-rapidjson) | A fast JSON parser/generator for C++ with both SAX/DOM style API | +| re2/20240702.0.0@microblink/main#97effdb903f6546348047925d9d1f365 | BSD-3-Clause | [Link](https://github.com/microblink/re2) | Fast, safe, thread-friendly regular expression library | +| std_fix/1.0.2@microblink/main#3002fa1150d5261ad74d2d167d48e653 | BSL-1.0 | [Link](https://github.com/microblink/std_fix) | Patches for deficient C++ runtime implementations | +| sweater/1.1.7@microblink/main#00226324984e8fb052dd8e703b48d28e | MIT | [Link](https://github.com/microblink/sweater) | Humble Outer Dispatch | +| tf_messages/1.0.1@microblink/main#96187cc0ac393ee835b807074bb3e884 | Apache License 2.0 | [Link](https://bitbucket.org/microblink/core-tensorflow/) | Computation using data flow graphs for scalable machine learning | +| tinyxml2/2.2.4@microblink/main#e75d39f68113ec40fde0b991ffa76a37 | Zlib | [Link](https://github.com/microblink/tinyxml2) | a simple, small, efficient, C++ XML parser | +| tqdm/1.0.0@microblink/main#9f84ad8bec3a73f9635d64c0f49aea96 | MIT | [Link](https://bitbucket.org/microblink/core-tqdm) | tqdm-like single header c++ pretty progress bar | +| utfcpp/4.0.6@microblink/main#ea11de5465f5305ad0fc5d691185d7a5 | Boost Software License 1.0 | [Link](https://github.com/microblink/utfcpp) | UTF-8 with C++ in a Portable Way | +| xnnpack/20230525.1.6@microblink/main#3e5e60789c103ebfec170c7898cdfe4d | BSD | [Link](https://github.com/microblink/XNNPACK) | XNNPACK library | +| zlib/1.3.2@microblink/main#52419110a760a9cb8cd7bd57b01de0b2 | Zlib | [Link](https://github.com/microblink/zlib) | A massively spiffy yet delicately unobtrusive compression library. | +| zxing-cpp/1.1.0@microblink/main#6650d1dcd9e84e7917697e701c82ad47 | Apache License 2.0 | [Link](https://github.com/microblink/zxing) | ZXing ("Zebra Crossing") barcode scanning library for Java, Android | diff --git a/docs/ResultFields.md b/docs/ResultFields.md index 0d8e412..057c6d9 100644 --- a/docs/ResultFields.md +++ b/docs/ResultFields.md @@ -1,12 +1,15 @@ + # BlinkID Result Fields + ## Table of contents -- [MRZ Fields](#mrz-fields) -- [Anonymised Fields](#anonymised-fields) -- [AAMVA Barcode Fields](#aamva-barcode-fields) -- [All Fields](#all-fields) -


+* [MRZ Fields](#mrz-fields) +* [Anonymised Fields](#anonymised-fields) +* [AAMVA Barcode Fields](#aamva-barcode-fields) +* [All Fields](#all-fields) +


+

MRZ Fields

Other than documents listed here, BlinkID also scans the Machine Readable Zone (MRZ) on standard (ISO/IEC 7501 compliant) @@ -90,11 +93,11 @@ Protected fields are:

All Fields

-The tables below represent scanning results for each document in each country supported in BlinkID v6. The fields marked as "Mandatory" are mandatory on all document versions and +The tables below represent scanning results for each document in each country supported in BlinkID v7. The fields marked as "Mandatory" are mandatory on all document versions and will always be a part of the result set. The ones marked as "Optional" will be returned only if they exist on the specific document being scanned. For US documents, all information concerns both horizontal and vertical supported documents. -Currently, in BlinkID v6 we support the extraction of fields in Latin, Cyrillic, and Arabic scripts. Information about supported scripts for each document is listed +Currently, in BlinkID v7 we support the extraction of fields in Latin, Cyrillic, and Arabic scripts. Information about supported scripts for each document is listed in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this repository.

@@ -113,6 +116,7 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep FieldPresence Empty document side + AFGHANISTAN Identity Card - Back FieldPresence Date of birthMandatory @@ -281,6 +285,23 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +ANGOLA Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +Marital statusMandatory +NationalityMandatory +Personal ID numberMandatory +Place of birthMandatory +SexMandatory +ProfessionOptional + ANTIGUA AND BARBUDA Driver's License - Front FieldPresence AddressMandatory @@ -961,6 +982,20 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep ProfessionMandatory SexMandatory +BAHRAIN Polycarbonate Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +Full nameMandatory +Issuing authorityMandatory +MRZMandatory +NationalityMandatory +Personal ID numberMandatory +Place of birthMandatory +SexMandatory + BANGLADESH Driver's License - Front FieldPresence Date of birthMandatory @@ -1943,8 +1978,8 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Last nameMandatory Personal ID numberMandatory Place of birthMandatory -ProfessionMandatory SexMandatory +ProfessionOptional BURKINA FASO Identity Card - Back FieldPresence @@ -1964,6 +1999,20 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +BURKINA FASO Polycarbonate Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Place of birthMandatory +SexMandatory + BURUNDI Polycarbonate Passport - Bio-data page FieldPresence Date of birthMandatory @@ -2014,6 +2063,21 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +CAMEROON Driver's License - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +Issuing authorityMandatory +Last nameMandatory +Place of birthMandatory +Vehicle classMandatory +AddressOptional +Document additional numberOptional +First nameOptional +Personal ID numberOptional + CAMEROON Identity Card - Front FieldPresence Date of birthMandatory @@ -2302,6 +2366,15 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep FieldPresence Barcode dataOptional +CANADA MANITOBA Metis Federation Card - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +Full nameMandatory +SexMandatory + CANADA NEW BRUNSWICK Driver's License - Front FieldPresence AddressMandatory @@ -3426,6 +3499,20 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +EAST TIMOR Polycarbonate Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Place of birthMandatory +SexMandatory + ECUADOR Driver's License - Front FieldPresence Date of birthMandatory @@ -3575,6 +3662,37 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Marital statusMandatory ProfessionMandatory +EL SALVADOR Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document additional numberMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Place of birthMandatory +SexMandatory + +ERITREA Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +Issuing authorityMandatory +MRZMandatory +NationalityMandatory +Place of birthMandatory +SexMandatory +First nameOptional +Full nameOptional +Last nameOptional +Personal ID numberOptional + ESTONIA Driver's License - Front FieldPresence Date of birthMandatory @@ -3764,6 +3882,16 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Document additional numberOptional Personal ID numberOptional +FRANCE Adr Certificate - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +NationalityMandatory + FRANCE Driver's License - Front FieldPresence Date of birthMandatory @@ -3785,6 +3913,7 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Last nameMandatory Place of birthMandatory SexMandatory +Additional name informationOptional Date of expiryOptional Document additional numberOptional MRZOptional @@ -3933,6 +4062,16 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +GERMANY Adr Certificate - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +NationalityMandatory + GERMANY Driver's License - Front FieldPresence Date of birthMandatory @@ -4099,6 +4238,17 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +GHANA Voter ID - Front +FieldPresence +Date of issueMandatory +Document numberMandatory +Polling station codeMandatory +SexMandatory +Date of birthOptional +First nameOptional +Full nameOptional +Last nameOptional + GIBRALTAR Driver's License - Front FieldPresence AddressMandatory @@ -4173,10 +4323,10 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep GREECE Identity Card - Front FieldPresence -Date of issueMandatory Document numberMandatory Date of birthOptional Date of expiryOptional +Date of issueOptional Document additional numberOptional First nameOptional Issuing authorityOptional @@ -4186,11 +4336,16 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep GREECE Identity Card - Back FieldPresence +Fathers nameMandatory +Mothers nameMandatory Place of birthMandatory Date of birthOptional First nameOptional +Issuing authorityOptional Last nameOptional MRZOptional +Municipality of registrationOptional +Personal ID numberOptional GREECE Paper Passport - Bio-data page FieldPresence @@ -4602,12 +4757,16 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep HUNGARY Identity Card - Back FieldPresence -Additional name informationMandatory Date of issueMandatory +Document numberMandatory Issuing authorityMandatory MRZMandatory +Mothers nameMandatory Place of birthMandatory -Document numberOptional +Date of birthOptional +Maiden nameOptional +NationalityOptional +SexOptional HUNGARY Paper Passport - Bio-data page FieldPresence @@ -4846,6 +5005,24 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Date of expiryOptional Document numberOptional +INDIA TELANGANA Driver's License - Front +FieldPresence +AddressMandatory +Document numberMandatory +Full nameMandatory +Date of birthOptional +Date of expiryOptional +Date of issueOptional +Issuing authorityOptional + +INDIA TELANGANA Driver's License - Back +FieldPresence +Vehicle classMandatory +Date of birthOptional +Date of expiryOptional +Document numberOptional +Issuing authorityOptional + INDONESIA Driver's License - Front FieldPresence AddressMandatory @@ -5193,6 +5370,20 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep MRZOptional Personal ID numberOptional +IVORY COAST Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Place of birthMandatory +SexMandatory + JAMAICA Driver's License - Front FieldPresence AddressMandatory @@ -5277,6 +5468,19 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Jap sex or genderMandatory SexMandatory +JAPAN Polycarbonate Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +SexMandatory + JORDAN Driver's License - Front FieldPresence Date of birthMandatory @@ -5745,6 +5949,34 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Last nameMandatory SexMandatory +LIBERIA Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Place of birthMandatory +SexMandatory + +LIBERIA Voter ID - Front +FieldPresence +AddressMandatory +Date of birthMandatory +Document numberMandatory +First nameMandatory +Last nameMandatory +Registration center codeMandatory +SexMandatory + +LIBERIA Voter ID - Back +FieldPresence +Document additional numberOptional + LIBYA Polycarbonate Passport - Bio-data page FieldPresence Date of birthMandatory @@ -5931,6 +6163,36 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +MALAWI Identity Card - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Last nameMandatory +NationalityMandatory +SexMandatory + +MALAWI Identity Card - Back +FieldPresence +MRZMandatory + +MALAWI Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Personal ID numberMandatory +Place of birthMandatory +SexMandatory + MALAYSIA Driver's License - Front FieldPresence AddressMandatory @@ -6074,6 +6336,20 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep FieldPresence Date of expiryMandatory +MALDIVES Polycarbonate Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +Full nameMandatory +Issuing authorityMandatory +MRZMandatory +NationalityMandatory +Personal ID numberMandatory +Place of birthMandatory +SexMandatory + MALI Identity Card - Front FieldPresence Date of birthMandatory @@ -6093,6 +6369,22 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep AddressMandatory MRZMandatory +MALI Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Personal ID numberMandatory +Place of birthMandatory +ProfessionMandatory +SexMandatory + MALTA Driver's License - Front FieldPresence AddressMandatory @@ -6202,6 +6494,22 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Date of issueMandatory Document numberMandatory +MAURITIUS Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Place of birthMandatory +SexMandatory +Personal ID numberOptional +ProfessionOptional + MEXICO Consular ID - Front FieldPresence AddressMandatory @@ -6237,6 +6545,8 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Mothers nameOptional Place of birthOptional SignatureOptional +StateOptional +State codeOptional MEXICO Consular Voter ID - Back FieldPresence @@ -6326,22 +6636,25 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep MEXICO Voter ID - Front FieldPresence AddressMandatory +Date of birthMandatory Date of expiryMandatory Date of issueMandatory Document additional numberMandatory Document optional additional numberMandatory Full nameMandatory -Date of birthOptional +Personal ID numberMandatory +Section codeMandatory Fathers nameOptional +Locality codeOptional Mothers nameOptional -Personal ID numberOptional +Municipality codeOptional SexOptional SignatureOptional +State codeOptional MEXICO Voter ID - Back FieldPresence -Document numberOptional -MRZOptional +MRZMandatory SignatureOptional MEXICO AGUASCALIENTES Driver's License - Front @@ -6931,19 +7244,22 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep FieldPresence Date of birthMandatory Date of expiryMandatory -Date of issueMandatory Document numberMandatory First nameMandatory -Issuing authorityMandatory Last nameMandatory NationalityMandatory SexMandatory +Date of issueOptional +Document additional numberOptional +Issuing authorityOptional MOLDOVA Identity Card - Back FieldPresence MRZMandatory Personal ID numberMandatory AddressOptional +Date of issueOptional +Issuing authorityOptional MOLDOVA Paper Passport - Bio-data page FieldPresence @@ -7866,6 +8182,21 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep SexMandatory Issuing authorityOptional +PARAGUAY Polycarbonate Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Personal ID numberMandatory +Place of birthMandatory +SexMandatory + PERU Alien ID - Front FieldPresence Date of birthMandatory @@ -8352,6 +8683,7 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep AddressOptional Date of birthOptional Date of issueOptional +Document additional numberOptional Fathers nameOptional Issuing authorityOptional MRZOptional @@ -8362,10 +8694,10 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep ROMANIA Identity Card - Back FieldPresence -AddressMandatory Date of issueMandatory Issuing authorityMandatory MRZMandatory +AddressOptional ROMANIA Residence Permit - Front FieldPresence @@ -8444,6 +8776,16 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +RWANDA Driver's License - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Document numberMandatory +Full nameMandatory +Issuing authorityMandatory +SexMandatory +Vehicle classMandatory + RWANDA Identity Card - Front FieldPresence Date of birthMandatory @@ -8601,6 +8943,24 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep NationalityMandatory SexMandatory +SENEGAL Driver's License - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +Place of birthMandatory +Vehicle classMandatory + +SENEGAL Driver's License - Back +FieldPresence +AddressMandatory +MRZMandatory +SexMandatory + SENEGAL Identity Card - Front FieldPresence AddressMandatory @@ -8682,6 +9042,21 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +SIERRA LEONE Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Personal ID numberMandatory +Place of birthMandatory +SexMandatory + SINGAPORE Driver's License - Front FieldPresence Date of birthMandatory @@ -8953,6 +9328,21 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep FieldPresence AddressMandatory +SOMALIA Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +Full nameMandatory +Issuing authorityMandatory +MRZMandatory +NationalityMandatory +Personal ID numberMandatory +Place of birthMandatory +ProfessionMandatory +SexMandatory + SOUTH AFRICA Driver's License - Front FieldPresence Date of birthMandatory @@ -9345,6 +9735,16 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Date of expiryOptional Date of issueOptional +SWITZERLAND Adr Certificate - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +NationalityMandatory + SWITZERLAND Driver's License - Front FieldPresence Date of birthMandatory @@ -9413,6 +9813,7 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep SWITZERLAND Residence Permit - Back FieldPresence +Date of entryMandatory MRZMandatory Place of birthMandatory Date of birthOptional @@ -9616,6 +10017,26 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Place of birthMandatory SexMandatory +TOGO Driver's License - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document additional numberMandatory +Document numberMandatory +First nameMandatory +Last nameMandatory +Place of birthMandatory +SexMandatory + +TOGO Driver's License - Back +FieldPresence +AddressMandatory +Document optional additional numberMandatory +NationalityMandatory +RestrictionsMandatory +Vehicle classMandatory + TOGO Identity Card - Front FieldPresence Date of birthMandatory @@ -9634,6 +10055,20 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Document additional numberMandatory MRZMandatory +TOGO Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +First nameMandatory +Issuing authorityMandatory +Last nameMandatory +MRZMandatory +NationalityMandatory +Place of birthMandatory +SexMandatory + TRINIDAD AND TOBAGO Driver's License - Front FieldPresence AddressMandatory @@ -10223,8 +10658,8 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep MRZMandatory NationalityMandatory Personal ID numberMandatory -Place of birthMandatory SexMandatory +Place of birthOptional USA Border Crossing Card - Front FieldPresence @@ -12486,6 +12921,22 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep MRZOptional Place of birthOptional +VIETNAM Paper Passport - Bio-data page +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Document numberMandatory +MRZMandatory +NationalityMandatory +SexMandatory +Document additional numberOptional +First nameOptional +Full nameOptional +Issuing authorityOptional +Last nameOptional +Place of birthOptional + ZAMBIA Driver's License - Front FieldPresence Date of birthMandatory @@ -12666,6 +13117,18 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep FieldPresence Full nameMandatory +USA MARYLAND Medical Marijuana ID - Front +FieldPresence +Date of birthMandatory +Date of expiryMandatory +Date of issueMandatory +Full nameMandatory +Personal ID numberMandatory + +USA MARYLAND Medical Marijuana ID - Back +FieldPresence +Document numberMandatory + USA NEVADA Medical Marijuana ID - Front FieldPresence AddressMandatory @@ -12707,6 +13170,19 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep First nameMandatory Last nameMandatory +OMAN Vehicle Registration - Front +FieldPresence +Date of expiryMandatory +Date of issueMandatory +Manufacturing yearMandatory +Vehicle typeMandatory + +OMAN Vehicle Registration - Back +FieldPresence +Document additional numberMandatory +Document numberMandatory +Vehicle ownerMandatory + UAE Vehicle Registration - Front FieldPresence Document additional numberMandatory @@ -12718,4 +13194,5 @@ in the tables in [SupportedDocuments.md](SupportedDocuments.md) file in this rep Manufacturing yearMandatory Vehicle typeMandatory - + + \ No newline at end of file diff --git a/docs/SupportedDocuments.md b/docs/SupportedDocuments.md index e1188f6..b8f1a8f 100644 --- a/docs/SupportedDocuments.md +++ b/docs/SupportedDocuments.md @@ -1,56 +1,66 @@ + # BlinkID Supported Documents ## Table of contents [Supported documents](#supported-documents) -- [Supported medical documents](#supported-medical-documents) +* [Supported medical documents](#supported-medical-documents) + + + + [Philippines](#philippines)
+ + [Croatia](#croatia)
+ + [European Union](#european-union)
+ + [Canada, Ontario](#canada-ontario)
+ + [Canada, Quebec](#canada-quebec)
+ + [USA, Florida](#usa-florida)
+ + [USA, Georgia](#usa-georgia)
+ + [USA, Maryland](#usa-maryland)
+ + [USA, Nevada](#usa-nevada)
+ + [USA, New York](#usa-new-york)
+ + [USA, Oklahoma](#usa-oklahoma)
+ + [USA, Pennsylvania](#usa-pennsylvania)
+ + [Australia](#australia)
+ + + +* [Supported identity documents](#supported-identity-documents) - - [Philippines](#philippines)
- - [Croatia](#croatia)
- - [European Union](#european-union)
- - [Canada, Ontario](#canada-ontario)
- - [Canada, Quebec](#canada-quebec)
- - [USA, Florida](#usa-florida)
- - [USA, Georgia](#usa-georgia)
- - [USA, Nevada](#usa-nevada)
- - [USA, New York](#usa-new-york)
- - [USA, Oklahoma](#usa-oklahoma)
- - [USA, Pennsylvania](#usa-pennsylvania)
- - [Australia](#australia)
-- [Supported identity documents](#supported-identity-documents) + + [Asia](#asia) - - [Asia](#asia) + + [Europe](#europe) - - [Europe](#europe) + + [Latin America and the Caribbean](#latin-america-and-the-caribbean) - - [Latin America and the Caribbean](#latin-america-and-the-caribbean) + + [Middle East and Africa](#middle-east-and-africa) - - [Middle East and Africa](#middle-east-and-africa) + + [Northern America](#northern-america) + + + [Oceania](#oceania) - - [Northern America](#northern-america) - - [Oceania](#oceania)


# Supported documents -BlinkID can be used to scan both Identity documents (ID, DL, Passports, etc.) and Medical documents. Each document type has been issued in -multiple versions throughout the years and document design is usually significantly changed in different versions. Some document changes that we observed are: -change in orientation (horizontal vs vertical), addition or replacement of the script of the document (Latin, Cyrillic, Arabic), security features changes, +BlinkID can be used to scan both Identity documents (ID, DL, Passports, etc.) and Medical documents. Each document type has been issued in +multiple versions throughout the years and document design is usually significantly changed in different versions. Some document changes that we observed are: +change in orientation (horizontal vs vertical), addition or replacement of the script of the document (Latin, Cyrillic, Arabic), security features changes, and other similar updates. Key document features on supported documents are noted below (e.g. document orientation, script) as well as supported document sides (front, back, bio-data-page, etc.) All information is listed in tables below in different columns: Document Type, Localised Document Name, Supported side and orientation, Supported scripts, respectively. -Some documents which are supported by BlinkID are still in the research and knowledge gathering phase and they will be noted with the BETA tag (xx BETA). +Some documents which are supported by BlinkID are still in the research and knowledge gathering phase and they will be noted with the BETA tag (xx BETA). That means scanning them is possible but some scanning and/or extraction challenges are possible. -Other than documents listed here, BlinkID also scans the Machine Readable Zone (MRZ) on standard (ISO/IEC 7501 compliant) + +Other than documents listed here, BlinkID also scans the Machine Readable Zone (MRZ) on standard (ISO/IEC 7501 compliant) Machine Readable Travel Documents (MRTD). This includes passports, visas and other identification documents. +

## Supported medical documents @@ -64,13 +74,15 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

EUROPEAN UNION

Health Insurance CardFRONTLatin

CANADA, ONTARIO

-Health Insurance CardOntario Health card (OHIP) / Carte Santé de l’OntarioFRONTLatin +Health Insurance CardOntario Health card (OHIP) / Carte Santé de l’OntarioFRONTLatin

CANADA, QUEBEC

-Health Insurance CardRégie de l'assurance maladie du Québec (RAMQ)FRONTLatin +Health Insurance CardRégie de l'assurance maladie du Québec (RAMQ)FRONTLatin

USA, FLORIDA

Medical Marijuana IDFRONT, BACKLatin

USA, GEORGIA

Medical Marijuana IDLow THC Oil CardFRONT, BACKLatin +

USA, MARYLAND

+Medical Marijuana IDFRONT, BACKLatin

USA, NEVADA

Medical Marijuana IDFRONT, BACKLatin

USA, NEW YORK

@@ -92,85 +104,93 @@ Other than documents listed here, BlinkID also scans the Machine Readabl ## Supported identity documents + ## Asia + +
- - + +

AFGHANISTAN

Identity Cardتذکره الکترونیک‎FRONT, BACKLatin
Paper PassportپاسپورټBIO-DATA PAGELatin
Identity Cardتذکره الکترونیک‎FRONT, BACKLatin
Paper PassportپاسپورټBIO-DATA PAGELatin
- - - + + +

ARMENIA

Driver's Licenseվարորդական վկայականFRONTLatin
Identity Cardնույնականացման քարտըFRONT, BACKLatin
Paper PassportԱՆՁՆԱԳԻՐBIO-DATA PAGELatin
Driver's LicenseÕ¾Õ¡Ö€Õ¸Ö€Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¾Õ¯Õ¡ÕµÕ¡Õ¯Õ¡Õ¶FRONTLatin
Identity Cardնույնականացման քարտըFRONT, BACKLatin
Paper PassportԱՆՁՆԱԳԻՐBIO-DATA PAGELatin
- - + +

AZERBAIJAN

Driver's LicenseSürücülük vəsiqəsiFRONTLatin
Identity CardŞəxsiyyət vəsiqəsiFRONT, BACKLatin
Driver's LicenseSürücülük vəsiqəsiFRONTLatin
Identity CardŞəxsiyyət vəsiqəsiFRONT, BACKLatin
Polycarbonate PassportPasportBIO-DATA PAGELatin
- - - - + + + +

BANGLADESH

Driver's Licenseমোটর ড্রাইভিং লাইসেন্সFRONT, BACKLatin
Identity Cardজাতীয় পরিচয় পত্রFRONT, BACKLatin
Paper Passportপাসপোর্টBIO-DATA PAGE, SECOND DATA PAGELatin
Polycarbonate Passportপাসপোর্টBIO-DATA PAGE, SECOND DATA PAGELatin
Driver's Licenseমোটর ড্রাইভিং লাইসেন্সFRONT, BACKLatin
Identity Cardজাতীয় পরিচয় পত্রFRONT, BACKLatin
Paper Passportপাসপোর্টBIO-DATA PAGE, SECOND DATA PAGELatin
Polycarbonate Passportপাসপোর্টBIO-DATA PAGE, SECOND DATA PAGELatin
- +

BRUNEI

Identity CardKad Pengenalan (Kuning)FRONT, BACKLatin
Military IDKad Pengenalan Tentera (ABDB)FRONT, BACKLatin
Residence Permit​Kad Pengenalan (Ungu)FRONT, BACKLatin
Residence Permit​Kad Pengenalan (Ungu)FRONT, BACKLatin
Temporary Residence PermitKad Pengenalan (Hijau)FRONT, BACKLatin
- - - + + +

CAMBODIA

Driver's Licenseប័ណ្ណបើកបរFRONTLatin
Identity Cardអត្តសញ្ញាណប័ណ្ណសញ្ជាតិខ្មែរFRONTLatin
Polycarbonate Passportលិខិតឆ្លងដែនBIO-DATA PAGELatin
Driver's Licenseប័ណ្ណបើកបរFRONTLatin
Identity Cardអត្តសញ្ញាណប័ណ្ណសញ្ជាតិខ្មែរFRONTLatin
Polycarbonate Passportលិខិតឆ្លងដែនBIO-DATA PAGELatin
- - - - + + + + +

CHINA

Exit Entry Permit往来港澳通行证FRONTLatin
Identity Card中华人民共和国居民身份证FRONT, BACKLatin
Mainland Travel Permit Taiwan台湾居民来往大陆通行证, 往来台湾通行证FRONT, BACKLatin
Paper Passport中华人民共和国护照BIO-DATA PAGELatin
Exit Entry Permit往来港澳通行证FRONTLatin
Identity Card中华人民共和国居民身份证FRONT, BACKLatin
Mainland Travel Permit Taiwan台湾居民来往大陆通行证, 往来台湾通行证FRONT, BACKLatin
Paper Passport中华人民共和国护照BIO-DATA PAGELatin
+

EAST TIMOR

Polycarbonate PassportPassaporteBIO-DATA PAGELatin
- - + +

HONG KONG

Identity Card香港身份證FRONTLatin
Polycarbonate Passport護照BIO-DATA PAGELatin
Identity Card香港身份證FRONTLatin
Polycarbonate Passportè­·ç…§BIO-DATA PAGELatin
- - + + - +

INDIA

Driver's LicenseFRONT, BACKLatin
Identity CardAadhaar card / आधार कार्डFRONT, BACKLatin
PAN Cardस्थायी खाता संख्या कार्डFRONTLatin
Identity CardAadhaar card / आधार कार्डFRONT, BACKLatin
PAN Cardस्थायी खाता संख्या कार्डFRONTLatin
Paper PassportBIO-DATA PAGE, SECOND DATA PAGELatin
Voter IDभारतीय मतदाता पहचान पत्रFRONT,
VERTICAL
Latin
Voter IDभारतीय मतदाता पहचान पत्रFRONT,
VERTICAL
Latin

INDIA, ANDHRA PRADESH

Driver's LicenseFRONT, BACKLatin
- +

INDIA, GUJARAT

Driver's Licenseड्राइविंग लाइसेंसFRONT, BACKLatin
Driver's Licenseड्राइविंग लाइसेंसFRONT, BACKLatin

INDIA, HARYANA

Driver's LicenseFRONTLatin
- +

INDIA, KARNATAKA

Driver's Licenseड्राइविंग लाइसेंसFRONTLatin
Driver's Licenseड्राइविंग लाइसेंसFRONTLatin
- +

INDIA, KERALA

Driver's Licenseड्राइविंग लाइसेंसFRONT, BACKLatin
Driver's Licenseड्राइविंग लाइसेंसFRONT, BACKLatin
- +

INDIA, MADHYA PRADESH

Driver's Licenseड्राइविंग लाइसेंसFRONTLatin
Driver's Licenseड्राइविंग लाइसेंसFRONTLatin
- +

INDIA, MAHARASHTRA

Driver's Licenseड्राइविंग लाइसेंसFRONTLatin
Driver's Licenseड्राइविंग लाइसेंसFRONTLatin
- +

INDIA, PUNJAB

Driver's Licenseड्राइविंग लाइसेंसFRONTLatin
Driver's Licenseड्राइविंग लाइसेंसFRONTLatin
- + +

INDIA, TAMIL NADU

Driver's Licenseड्राइविंग लाइसेंसFRONT, BACKLatin
Driver's Licenseड्राइविंग लाइसेंसFRONT, BACKLatin
+

INDIA, TELANGANA

Driver's LicenseFRONT, BACKLatin

INDONESIA

Driver's LicenseSurat Izin Mengemudi (SIM), Surat izin mengemudiFRONTLatin
Identity CardKartu Tanda Penduduk (KTP)FRONTLatin
Paper PassportPasporBIO-DATA PAGELatin
Polycarbonate PassportPasporBIO-DATA PAGELatin
- - - - + + + + +

JAPAN

Driver's License運転免許FRONTLatin
My Number CardマイナンバーカードFRONTLatin
Paper Passport旅券BIO-DATA PAGELatin
Residence Permit在留カードFRONTLatin
Driver's License運転免許FRONTLatin
My Number CardマイナンバーカードFRONTLatin
Paper Passport旅券BIO-DATA PAGELatin
Residence Permit在留カードFRONTLatin
Polycarbonate Passport旅券BIO-DATA PAGELatin
- - + +

KAZAKHSTAN

Identity CardЖеке қуәлік / Yдостоверение личностиFRONT, BACKLatin
Paper PassportПаспортBIO-DATA PAGELatin
Identity CardЖеке қуәлік / Yдостоверение личностиFRONT, BACKLatin
Paper PassportПаспортBIO-DATA PAGELatin
- - - - + + + +

KYRGYZSTAN

Driver's LicenseАйдоочулардын күбөлүгү / Водительское удостоверениеFRONTLatin
Identity Cardидентификациялык карта / идентификационная картаFRONT, BACKLatin
Paper PassportЖалпы жарандык паспорт / Общегражданский паспортBIO-DATA PAGELatin
Polycarbonate PassportЖалпы жарандык паспорт / Общегражданский паспортBIO-DATA PAGELatin
Driver's LicenseАйдоочулардын күбөлүгү / Водительское удостоверениеFRONTLatin
Identity Cardидентификациялык карта / идентификационная картаFRONT, BACKLatin
Paper PassportЖалпы жарандык паспорт / Общегражданский паспортBIO-DATA PAGELatin
Polycarbonate PassportЖалпы жарандык паспорт / Общегражданский паспортBIO-DATA PAGELatin
@@ -183,20 +203,21 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

MALAYSIA

Driver's LicenseLesen MemanduFRONTLatin
i-KadiKadFRONTLatin
Refugee IDUNHCR CardFRONTLatin
Polycarbonate PassportPasportBIO-DATA PAGELatin
- + +

MALDIVES

Identity Cardދިވެހި ރައްޔިތެއްކަން އަންގައިދޭ ކާޑުFRONT, BACKLatin
Identity Cardދިވެހި ރައްޔިތެއްކަން އަންގައިދޭ ކާޑުFRONT, BACKLatin
Polycarbonate PassportޕާސްޕޯޓްBIO-DATA PAGELatin
- - + +

MYANMAR

Driver's Licenseယာဉ်မောင်းလိုင်စင်FRONT, BACKLatin
Paper Passportနိုင်ငံကူးလက်မှတ်BIO-DATA PAGELatin
Driver's Licenseယာဉ်မောင်းလိုင်စင်FRONT, BACKLatin
Paper Passportနိုင်ငံကူးလက်မှတ်BIO-DATA PAGELatin
- - + +

NEPAL

Paper PassportराहदानीBIO-DATA PAGELatin
Polycarbonate PassportराहदानीBIO-DATA PAGELatin
Paper PassportराहदानीBIO-DATA PAGELatin
Polycarbonate PassportराहदानीBIO-DATA PAGELatin
- + - +

PAKISTAN

Afghan Citizen CardAfghan Citizen Card (ACC)FRONTLatin
Consular IDNational Identity Card for Overseas Pakistanis (NICOP)FRONT, BACKLatin
Identity CardComputerized National Identity Card (CNIC), Smart National Identity Card (SNIC)FRONT, BACKLatin
Identity CardComputerized National Identity Card (CNIC), Smart National Identity Card (SNIC), non-chip Computerized National Identity Card (CNIC)FRONT, BACKLatin
Paper PassportBIO-DATA PAGELatin
Proof Of RegistrationAfghan Citizen Proof of Registration card (PoR)FRONT, BACKLatin
Polycarbonate PassportپاسپورٹBIO-DATA PAGELatin
Polycarbonate PassportپاسپورٹBIO-DATA PAGELatin

PAKISTAN, PUNJAB

Driver's LicenseFRONTLatin
@@ -223,25 +244,25 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

PHILIPPINES

S PassFRONT, BACKLatin
Work PermitFRONT, BACKLatin
- - - - + + + +

SOUTH KOREA

Driver's License자동차운전면허증FRONTLatin
Identity Card주민등록증FRONTLatin
Paper Passport여권BIO-DATA PAGELatin
Polycarbonate Passport여권BIO-DATA PAGELatin
Driver's Licenseìžë™ì°¨ìš´ì „ë©´í—ˆì¦FRONTLatin
Identity Card주민등록증FRONTLatin
Paper Passport여권BIO-DATA PAGELatin
Polycarbonate Passport여권BIO-DATA PAGELatin
- - - + + +

SRI LANKA

Driver's Licenseරියදුරු බලපත්රයFRONTLatin
Identity Cardජාතික හැඳුනුම්පත / தேசிய அடையாள அட்டைFRONT, BACK,
VERTICAL
Latin
Paper Passportගමන් බලපත්‍රය / கடவுச்சீட்டுBIO-DATA PAGELatin
Driver's Licenseරියදුරු බලපත්රයFRONTLatin
Identity Cardජාතික හැඳුනුම්පත / தேசிய அடையாள அட்டைFRONT, BACK,
VERTICAL
Latin
Paper Passportගමන් බලපත්‍රය / கடவுச்சீட்டுBIO-DATA PAGELatin
- - + +

TAIWAN

Identity Card中華民國國民身分證FRONTLatin
Temporary Residence Permit中華民國居留證 (ARC)FRONTLatin
Identity Card中華民國國民身分證FRONTLatin
Temporary Residence Permit中華民國居留證 (ARC)FRONTLatin
- - + +

TAJIKISTAN

Identity CardШиносномаFRONT, BACKLatin
Polycarbonate PassportшиносномаBIO-DATA PAGELatin
Identity CardШиносномаFRONT, BACKLatin
Polycarbonate PassportшиносномаBIO-DATA PAGELatin
- - - - + + + +

THAILAND

Alien IDบัตรประจำตัวคนซึ่งไม่มีสัญชาติไทย (บัตรสีชมพู)FRONTLatin
Driver's LicenseใบอนุญาตขับรถFRONT, BACKLatin
Identity CardบัตรประจำตัวประชาชนFRONT, BACKLatin
Polycarbonate PassportหนังสือเดินทางBIO-DATA PAGELatin
Alien IDบัตรประจำตัวคนซึ่งไม่มีสัญชาติไทย (บัตรสีชมพู)FRONTLatin
Driver's LicenseใบอนุญาตขับรถFRONT, BACKLatin
Identity CardบัตรประจำตัวประชาชนFRONT, BACKLatin
Polycarbonate PassportหนังสือเดินทางBIO-DATA PAGELatin

TURKMENISTAN

Polycarbonate PassportPasportBIO-DATA PAGELatin
@@ -249,8 +270,9 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

UZBEKISTAN

Identity CardShaxs guvohnomasiFRONT, BACKLatin
Paper PassportPasportBIO-DATA PAGELatin
- - + + +

VIETNAM

Driver's LicenseGiấy phép lái xeFRONTLatin
Identity CardCăn cước công dân, Giấy chứng minh nhân dânFRONT, BACKLatin
Driver's LicenseGiấy phép lái xeFRONTLatin
Identity CardCăn cước công dân, Giấy chứng minh nhân dânFRONT, BACKLatin
Paper PassportHộ chiếuBIO-DATA PAGELatin



@@ -258,17 +280,19 @@ Other than documents listed here, BlinkID also scans the Machine Readabl + +
- - - - + + + +

ALBANIA

Driver's LicenseLeje drejtimiFRONTLatin
Driver CardKarta e drejtuesit të mjetitFRONTLatin
Identity CardLetёrnjoftimFRONT, BACKLatin
Professional DLCertifikatë aftëstimi profesionaleFRONTLatin
Polycarbonate PassportPasaportëBIO-DATA PAGELatin
Driver CardKarta e drejtuesit të mjetitFRONTLatin
Identity CardLetёrnjoftimFRONT, BACKLatin
Professional DLCertifikatë aftëstimi profesionaleFRONTLatin
Polycarbonate PassportPasaportëBIO-DATA PAGELatin

ANDORRA

Paper PassportPassaportBIO-DATA PAGELatin
Polycarbonate PassportPassaportBIO-DATA PAGELatin
- + @@ -276,48 +300,48 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

AUSTRIA

Driver's LicenseFührerscheinFRONTLatin
Driver's LicenseFührerscheinFRONTLatin
Identity CardPersonalausweisFRONT, BACKLatin
Paper PassportReisepassBIO-DATA PAGELatin
Refugee PassportReisedokumentBIO-DATA PAGELatin
Polycarbonate PassportReisepassBIO-DATA PAGELatin
Polycarbonate Refugee PassportReisedokumentBIO-DATA PAGELatin
- - - - - + + + + +

BELARUS

Driver's LicenseBАДЗІЦЕЛЬСКАЕ ПАСВЕДЧАННЕ / ВОДИТЕЛЬСКОЕ УДОСТОВЕРЕНИЕFRONTLatin
Identity CardІДЭНТЫФІКАЦЫЙНАЯ КАРТКАFRONT, BACKLatin
Paper PassportПашпарт / ПаспортBIO-DATA PAGELatin
Residence Permitвид на жительство иностранного гражданинаFRONT, BACKLatin
Polycarbonate PassportпашпартBIO-DATA PAGELatin
Driver's LicenseBАДЗІЦЕЛЬСКАЕ ПАСВЕДЧАННЕ / ВОДИТЕЛЬСКОЕ УДОСТОВЕРЕНИЕFRONTLatin
Identity CardІДЭНТЫФІКАЦЫЙНАЯ КАРТКАFRONT, BACKLatin
Paper PassportПашпарт / ПаспортBIO-DATA PAGELatin
Residence Permitвид на жительство иностранного гражданинаFRONT, BACKLatin
Polycarbonate PassportпашпартBIO-DATA PAGELatin
- - + + - + - + - +

BELGIUM

Driver's LicenseRijbewijs / Permis de conduire / FührerscheinFRONTLatin
Identity CardIdentiteitskaart / Carte d'identité / PersonalausweisFRONT, BACKLatin
Driver's LicenseRijbewijs / Permis de conduire / FührerscheinFRONTLatin
Identity CardIdentiteitskaart / Carte d'identité / PersonalausweisFRONT, BACKLatin
Minors IDKids-IDFRONT, BACKLatin
Paper PassportPaspoort / Passeport / ReisepassBIO-DATA PAGELatin
Provisional DLPermis de Conduire Provisoire / Vorloopig Rijebewijs / SchulungführerscheinFRONTLatin
Provisional DLPermis de Conduire Provisoire / Vorloopig Rijebewijs / SchulungführerscheinFRONTLatin
Residence PermitVerblijfstitel / Titre de SejourFRONT, BACKLatin
Resident IDDocument de Seojur / Verblijfsdocument / Aufenthaltsdokument, E Kaart / Carte E / E Karte; E+ Kaart / Carte E+ / E+ Karte; F Kaart / Carte F / F Karte; F+ Kaart / Carte F+ / F+ Karte FRONT, BACKLatin
Resident IDDocument de Seojur / Verblijfsdocument / Aufenthaltsdokument, E Kaart / Carte E / E Karte; E+ Kaart / Carte E+ / E+ Karte; F Kaart / Carte F / F Karte; F+ Kaart / Carte F+ / F+ Karte, E Kaart / Carte E / E Karte; E+ Kaart / Carte E+ / E+ Karte; F Kaart / Carte F / F Karte; F+ Kaart / Carte F+ / F+ Karte FRONT, BACKLatin
Polycarbonate PassportPaspoort / Passeport / ReisepassBIO-DATA PAGELatin
Special IDCarte d'identité spéciale / Bijzondere identiteitskaart / Besonderer PersonalausweisFRONT, BACKLatin
Special IDCarte d'identité spéciale / Bijzondere identiteitskaart / Besonderer PersonalausweisFRONT, BACKLatin
- - - + + +

BOSNIA AND HERZEGOVINA

Driver's LicenseVozačka dozvolaFRONTLatin
Identity CardLična karta / Osobna iskaznicaFRONT, BACKCyrillic, Latin
Polycarbonate PassportPasoš / Пасош / PutovnicaBIO-DATA PAGELatin
Driver's LicenseVozačka dozvolaFRONTLatin
Identity CardLična karta / Osobna iskaznicaFRONT, BACKCyrillic, Latin
Polycarbonate PassportPasoš / Пасош / PutovnicaBIO-DATA PAGELatin
- - - - - + + + + +

BULGARIA

Alien IDудостоверение за пребиваване на граждани на ЕСFRONT, BACKLatin
Driver's LicenseСвидетелство за управление на МПСFRONTCyrillic, Latin
Identity Card Лична карта, Лична картаFRONT, BACKCyrillic, Latin
Paper PassportПаспортBIO-DATA PAGELatin
Residence Permitразрешение за пребиваванеFRONT, BACKLatin
Alien IDудостоверение за пребиваване на граждани на ЕСFRONT, BACKLatin
Driver's LicenseСвидетелство за управление на МПСFRONTCyrillic, Latin
Identity Card Лична карта, Лична картаFRONT, BACKCyrillic, Latin
Paper PassportПаспортBIO-DATA PAGELatin
Residence Permitразрешение за пребиваванеFRONT, BACKLatin
- + - +

CROATIA

Driver's LicenseVozačka dozvolaFRONTLatin
Driver's LicenseVozačka dozvolaFRONTLatin
Identity CardOsobna iskaznicaFRONT, BACKLatin
Residence PermitBoravišna iskaznica / Dozvola boravkaFRONT, BACKLatin
Residence PermitBoravišna iskaznica / Dozvola boravkaFRONT, BACKLatin
Polycarbonate PassportPutovnicaBIO-DATA PAGELatin
- - - - + + + +

CYPRUS

Driver's LicenseSürüş ruhsati / Aάδεια οδήγησηςFRONTLatin
Identity CardKimlik kartı / Δελτίο ΤαυτότηταςFRONT, BACKLatin
Paper PassportPasaport / ΔιαβατήριοBIO-DATA PAGELatin
Residence PermitΑΔΕΙΑ ΔΙΑΜΟΝΗΣFRONT, BACKLatin
Driver's LicenseSürüş ruhsati / Aάδεια οδήγησηςFRONTLatin
Identity CardKimlik kartı / Δελτίο ΤαυτότηταςFRONT, BACKLatin
Paper PassportPasaport / ΔιαβατήριοBIO-DATA PAGELatin
Residence PermitΑΔΕΙΑ ΔΙΑΜΟΝΗΣFRONT, BACKLatin
- - - - + + + +

CZECHIA

Driver's LicenseŘidičský průkazFRONTLatin
Identity CardObčanský průkazFRONT, BACKLatin
Residence PermitPovolení k pobytuFRONT, BACKLatin
Polycarbonate PassportCestovní pasBIO-DATA PAGELatin
Driver's LicenseŘidičský průkazFRONTLatin
Identity CardObčanský průkazFRONT, BACKLatin
Residence PermitPovolení k pobytuFRONT, BACKLatin
Polycarbonate PassportCestovní pasBIO-DATA PAGELatin
- +

DENMARK

Driver's LicenseKørekortFRONTLatin
Driver's LicenseKørekortFRONTLatin
Residence PermitOpholdstilladelse / OpholdskortFRONT, BACKLatin
Polycarbonate PassportPasBIO-DATA PAGELatin
@@ -327,23 +351,25 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

ESTONIA

Residence PermitElamislubaFRONT, BACKLatin
Polycarbonate PassportPassBIO-DATA PAGELatin
- - - - + + + +

FINLAND

Alien IDUlkomaalaisen henkilökortti / Identitetskort för utlänningFRONT, BACKLatin
Driver's LicenseAjokortti / KörkortFRONTLatin
Identity CardHenkilökortti / IdentitetskortFRONT, BACKLatin
Residence PermitOleskelulupa / UppehållstillståndFRONT, BACKLatin
Alien IDUlkomaalaisen henkilökortti / Identitetskort för utlänningFRONT, BACKLatin
Driver's LicenseAjokortti / KörkortFRONTLatin
Identity CardHenkilökortti / IdentitetskortFRONT, BACKLatin
Residence PermitOleskelulupa / UppehållstillståndFRONT, BACKLatin
Polycarbonate PassportPassi / PassBIO-DATA PAGELatin
+ - + - +

FRANCE

Adr CertificateCertificat de formation de conducteurFRONTLatin
Driver's LicensePermis de conduireFRONTLatin
Identity CardCarte d'identitéFRONT, BACKLatin
Identity CardCarte d'identitéFRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin
Professional IDCarte d'identification professionnelle / Carte BTPFRONTLatin
Residence PermitTitre de séjourFRONT, BACKLatin
Residence PermitTitre de séjourFRONT, BACKLatin
- - - + + +

GEORGIA

Driver's Licenseმართვის მოწმობაFRONTLatin
Identity Cardმოქალაქის პირადობის მოწმობაFRONT, BACKLatin
Paper PassportპასპორტიBIO-DATA PAGELatin
Driver's Licenseმართვის მოწმობაFRONTLatin
Identity Cardმოქალაქის პირადობის მოწმობაFRONT, BACKLatin
Paper PassportპასპორტიBIO-DATA PAGELatin
- + + @@ -357,72 +383,72 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

GERMANY

Driver's LicenseFührerscheinFRONTLatin
Adr CertificateADR-schulungsbescheinigung für FahrzeugführerFRONTLatin
Driver's LicenseFührerscheinFRONTLatin
Driver Qualification CardFahrerqualifizierungsnachweisFRONTLatin
eIDeID-KarteFRONT, BACKLatin
Identity CardPersonalausweisFRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin
Polycarbonate PassportPasseportBIO-DATA PAGELatin
- - - - - + + + + +

GREECE

Driver's LicenseAάδεια οδήγησηςFRONTGreek, Latin
Identity CardΔΕΛΤΙΟ ΤΑΥΤΟΤΗΤΑΣFRONT, BACKGreek, Latin
Paper PassportΔιαβατήριοBIO-DATA PAGEGreek, Latin
Residence PermitΑΔΕΙΑ ΔΙΑΜΟΝΗΣFRONT, BACKLatin
Polycarbonate PassportΔιαβατήριοBIO-DATA PAGEGreek, Latin
Driver's LicenseAάδεια οδήγησηςFRONTGreek, Latin
Identity CardΔΕΛΤΙΟ ΤΑΥΤΟΤΗΤΑΣFRONT, BACKGreek, Latin
Paper PassportΔιαβατήριοBIO-DATA PAGEGreek, Latin
Residence PermitΑΔΕΙΑ ΔΙΑΜΟΝΗΣFRONT, BACKLatin
Polycarbonate PassportΔιαβατήριοBIO-DATA PAGEGreek, Latin
- - - - - + + + + +

HUNGARY

Address CardLakcímkártya / LakcímigazolványFRONT, BACKLatin
Driver's LicenseVezetői engedélyFRONTLatin
Identity CardSzemélyazonosító igazolványFRONT, BACKLatin
Paper PassportÚtlevélBIO-DATA PAGELatin
Residence PermitTartózkodási engedélyFRONT, BACKLatin
Address CardLakcímkártya / LakcímigazolványFRONT, BACKLatin
Driver's LicenseVezetői engedélyFRONTLatin
Identity CardSzemélyazonosító igazolványFRONT, BACKLatin
Paper PassportÚtlevélBIO-DATA PAGELatin
Residence PermitTartózkodási engedélyFRONT, BACKLatin
- - + +

ICELAND

Driver's LicenseÖkuskírteiniFRONTLatin
Paper PassportVegabréfBIO-DATA PAGELatin
Driver's LicenseÖkuskírteiniFRONTLatin
Paper PassportVegabréfBIO-DATA PAGELatin
- - - + + +

IRELAND

Driver's LicenseCeadúnas tiománaFRONTLatin
Passport CardCárta PasFRONT, BACKLatin
Public Services CardCárta Seirbhísí PoiblíFRONT, BACKLatin
Driver's LicenseCeadúnas tiománaFRONTLatin
Passport CardCárta PasFRONT, BACKLatin
Public Services CardCárta Seirbhísí PoiblíFRONT, BACKLatin
Residence PermitFRONT, BACKLatin
Polycarbonate PassportPasBIO-DATA PAGE, SECOND DATA PAGELatin
- +

ITALY

Driver's LicensePatente di guidaFRONTLatin
Identity CardCarta d'identitàFRONT, BACKLatin
Identity CardCarta d'identità FRONT, BACKLatin
Paper PassportPassaportoBIO-DATA PAGELatin
Residence PermitPermesso di soggiornoFRONT, BACKLatin
- - - + + +

KOSOVO

Driver's LicensePatentë shoferi / возачка дозволаFRONTLatin
Identity CardLETËRNJOFTIM/ЛИЧНА КАРТА/KIMLIK KARTI, Letёrnjoftim / Лична картаFRONT, BACKLatin
Paper PassportPasaportë / Пасош, Pasaportë; пасошBIO-DATA PAGELatin
Driver's LicensePatentë shoferi / возачка дозволаFRONTLatin
Identity CardLETËRNJOFTIM/ЛИЧНА КАРТА/KIMLIK KARTI, Letёrnjoftim / Лична картаFRONT, BACKLatin
Paper PassportPasaportë / Пасош, Pasaportë; пасошBIO-DATA PAGELatin
- - - - - + + + + +

LATVIA

Alien IDNepilsoņa personas apliecībaFRONT, BACKLatin
Driver's LicenseVadītāja apliecībaFRONTLatin
Identity CardPersonas apliecībaFRONT, BACKLatin
Residence PermitUzturēšanās atļaujaFRONT, BACKLatin
Polycarbonate Alien PassportNepilsoņa paseBIO-DATA PAGELatin
Alien IDNepilsoņa personas apliecībaFRONT, BACKLatin
Driver's LicenseVadītāja apliecībaFRONTLatin
Identity CardPersonas apliecībaFRONT, BACKLatin
Residence PermitUzturēšanās atļaujaFRONT, BACKLatin
Polycarbonate Alien PassportNepilsoņa paseBIO-DATA PAGELatin
Polycarbonate PassportPase, Passeport/PaseBIO-DATA PAGELatin
- - + +

LIECHTENSTEIN

Driver's LicenseFührerscheinFRONT, BACKLatin
Identity CardIdentitätskarteFRONT, BACKLatin
Driver's LicenseFührerscheinFRONT, BACKLatin
Identity CardIdentitätskarteFRONT, BACKLatin
- - + +

LITHUANIA

Driver's LicenseVairuotojo pažymėjimaiFRONTLatin
Identity CardAsmens tapatybės kortelėFRONT, BACKLatin
Driver's LicenseVairuotojo pažymėjimaiFRONTLatin
Identity CardAsmens tapatybÄ—s kortelÄ—FRONT, BACKLatin
Residence PermitLeidimas gyventiFRONT, BACKLatin
Polycarbonate PassportPasasBIO-DATA PAGELatin
- +

LUXEMBOURG

Driver's LicensePermis de conduireFRONTLatin
Identity CardCarte d'Identité / PersonalausweisFRONT, BACKLatin
Identity CardCarte d'Identité / PersonalausweisFRONT, BACKLatin
Residence PermitTitre de sejourFRONT, BACKLatin
Polycarbonate PassportPass / PasseportBIO-DATA PAGELatin
- - + +

MALTA

Driver's LicenseLiċenzja tas-SewqanFRONTLatin
Identity CardKarta tal-IdentitàFRONT, BACKLatin
Driver's LicenseLiċenzja tas-SewqanFRONTLatin
Identity CardKarta tal-Identità FRONT, BACKLatin
Paper PassportPassaportBIO-DATA PAGELatin
Residence PermitPermess ta' residenza / Residence documentationFRONT, BACKLatin
Polycarbonate PassportPassaportBIO-DATA PAGELatin
- - - + + +

MOLDOVA

Driver's LicensePermis de conducereFRONTLatin
Identity CardBuletin de identitateFRONT, BACKLatin
Paper PassportPaşaportBIO-DATA PAGELatin
Polycarbonate PassportPaşaportBIO-DATA PAGELatin
Identity CardBuletin de identitate, Carte de identitateFRONT, BACKLatin
Paper PassportPaÅŸaportBIO-DATA PAGELatin
Polycarbonate PassportPaÅŸaportBIO-DATA PAGELatin

MONACO

Paper PassportPasseportBIO-DATA PAGELatin
- - - + + +

MONTENEGRO

Driver's LicenseVozačka dozvola / Возачка дозволаFRONTLatin
Identity CardLična karta, Lična karta / Лична карта, Лична карта / Lična kartaFRONT, BACKCyrillic, Latin
Polycarbonate PassportPasoš / ПасошBIO-DATA PAGELatin
Driver's LicenseVozačka dozvola / Возачка дозволаFRONTLatin
Identity CardLična karta, Lična karta / Лична карта, Лична карта / Lična kartaFRONT, BACKCyrillic, Latin
Polycarbonate PassportPasoš / ПасошBIO-DATA PAGELatin
@@ -430,70 +456,71 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

NETHERLANDS

Alien IDVreemdelingen identiteitsbewijsFRONT, BACKLatin
Driver's LicenseRijebewijsFRONT, BACKLatin
Residence PermitVerblijfstitel / VerblijfskaartFRONT, BACKLatin
Polycarbonate PassportPaspoortBIO-DATA PAGELatin
- - - + + +

NORTH MACEDONIA

Driver's Licenseвозачка дозвола / Patentë shoferiFRONTCyrillic, Latin
Identity Cardлична карта, лична карта / LetёrnjoftimFRONT, BACKCyrillic, Latin
Polycarbonate PassportПасош / PasaportëBIO-DATA PAGELatin
Driver's Licenseвозачка дозвола / Patentë shoferiFRONTCyrillic, Latin
Identity Cardлична карта, лична карта / LetёrnjoftimFRONT, BACKCyrillic, Latin
Polycarbonate PassportПасош / PasaportëBIO-DATA PAGELatin
- - - + + +

NORWAY

Driver's LicenseFØRERKORT FØRARKORT, Førerkort / FørarkortFRONTLatin
Identity CardID-kort / ID-duođaštusFRONT, BACKLatin
Residence PermitOppholdstillatelse / OpphaldsløyveFRONT, BACKLatin
Driver's LicenseFØRERKORT FØRARKORT, Førerkort / FørarkortFRONTLatin
Identity CardID-kort / ID-duođaštusFRONT, BACKLatin
Residence PermitOppholdstillatelse / OpphaldsløyveFRONT, BACKLatin
Polycarbonate PassportPassBIO-DATA PAGELatin
- +

POLAND

Driver's LicensePrawo jazdyFRONTLatin
Identity CardDowód osobistyFRONT, BACKLatin
Identity CardDowód osobistyFRONT, BACKLatin
Paper PassportPaszportBIO-DATA PAGELatin
Residence PermitKarta pobytuFRONT, BACKLatin
Polycarbonate PassportPaszportBIO-DATA PAGELatin
- - + + - +

PORTUGAL

Driver's LicenseCarta de ConduçãoFRONTLatin
Identity CardCartão de Cidadão (CC)FRONT, BACKLatin
Driver's LicenseCarta de ConduçãoFRONTLatin
Identity CardCartão de Cidadão (CC)FRONT, BACKLatin
Paper PassportPassaporteBIO-DATA PAGELatin
Residence PermitTítulo de Residência / Cartão de ResidênciaFRONT, BACKLatin
Residence PermitTítulo de Residência / Cartão de ResidênciaFRONT, BACKLatin
- - + +

ROMANIA

Driver's LicensePermis de conducereFRONTLatin
Identity CardCarte de identitateFRONT, BACKLatin
Residence PermitPermis de şedereFRONT, BACKLatin
Polycarbonate PassportPasaport / PașaportBIO-DATA PAGELatin
Residence PermitPermis de ÅŸedereFRONT, BACKLatin
Polycarbonate PassportPasaport / PașaportBIO-DATA PAGELatin
- - - + + +

RUSSIA

Driver's LicenseВодительское удостоверениеFRONTLatin
Paper Passport(Заграничный) ПаспортBIO-DATA PAGELatin
Polycarbonate Passport(Заграничный) ПаспортBIO-DATA PAGELatin
Driver's LicenseВодительское удостоверениеFRONTLatin
Paper Passport(Заграничный) ПаспортBIO-DATA PAGELatin
Polycarbonate Passport(Заграничный) ПаспортBIO-DATA PAGELatin

SAN MARINO

Polycarbonate PassportPassaportoBIO-DATA PAGELatin
- - - + + +

SERBIA

Driver's LicenseВозачка дозвола / Vozačka dozvolaFRONTLatin
Identity CardЛична карта / Lična kartaFRONT, BACKCyrillic, Latin
Polycarbonate PassportПасош / PasošBIO-DATA PAGELatin
Driver's LicenseВозачка дозвола / Vozačka dozvolaFRONTLatin
Identity CardЛична карта / Lična kartaFRONT, BACKCyrillic, Latin
Polycarbonate PassportПасош / PasošBIO-DATA PAGELatin
- - - - + + + +

SLOVAKIA

Driver's LicenseVodičský preukazFRONTLatin
Identity CardObčiansky preukazFRONT, BACKLatin
Residence PermitPovolenie na pobyt / Pobytový preukaz občana EÚ / Pobytový preukaz rodinného príslušníka občana EÚFRONT, BACKLatin
Polycarbonate PassportCestovný pasBIO-DATA PAGELatin
Driver's LicenseVodičský preukazFRONTLatin
Identity CardObčiansky preukazFRONT, BACKLatin
Residence PermitPovolenie na pobyt / Pobytový preukaz občana EÚ / Pobytový preukaz rodinného príslušníka občana EÚFRONT, BACKLatin
Polycarbonate PassportCestovný pasBIO-DATA PAGELatin
- +

SLOVENIA

Driver's LicenseVozniško dovoljenjeFRONTLatin
Driver's LicenseVozniško dovoljenjeFRONTLatin
Identity CardOsebna izkaznicaFRONT, BACKLatin
Residence PermitDovoljenje za prebivanjeFRONT, BACKLatin
Polycarbonate PassportPotni listBIO-DATA PAGE, SECOND DATA PAGELatin
- + - +

SPAIN

Alien IDTarjeta de Identidad de Extranjero (TIE)FRONT, BACKLatin
Driver's LicensePermiso de ConducciónFRONTLatin
Driver's LicensePermiso de ConducciónFRONTLatin
Identity CardDocumento Nacional de Identidad (DNI)FRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
Registration CertificateCertificado de Registro de Ciudadano de la Unión (CUE)FRONT, BACKLatin
Registration CertificateCertificado de Registro de Ciudadano de la Unión (CUE)FRONT, BACKLatin
Residence PermitPermiso de residenciaFRONT, BACKLatin
- + - +

SWEDEN

Driver's LicenseKörkortFRONTLatin
Driver's LicenseKörkortFRONTLatin
Identity CardNationellt identitetskortFRONT, BACKLatin
Residence PermitUppehållstillstånd / UppehållskortFRONT, BACKLatin
Residence PermitUppehållstillstånd / UppehållskortFRONT, BACKLatin
Polycarbonate PassportPassBIO-DATA PAGELatin
Polycarbonate Refugee PassportResedokumentBIO-DATA PAGELatin
Sis IDFRONTLatin
Social Security CardIdentitetskort / Skatteverkets id-kortFRONT, BACKLatin
- - + + + - +

SWITZERLAND

Driver's LicenseFührerausweis / Permis de conduire / Licenza di condurre / Permiss da manischarFRONT, BACKLatin
Identity CardIDENTITÄTSKARTE CARTE D'IDENTITÉ CARTA D'IDENTITÀ CARTA D'IDENTITAD, Identitätskarte / Carte d’identité / Carta d’identità / Carta d’identitadFRONT, BACKLatin
Adr CertificateSchulungsbescheinigung für fahrzeugführer / Certificat de formation de conducteur / Attestato di formazione per conducentiFRONTLatin
Driver's LicenseFührerausweis / Permis de conduire / Licenza di condurre / Permiss da manischarFRONT, BACKLatin
Identity CardIDENTITÄTSKARTE CARTE D'IDENTITÉ CARTA D'IDENTITÀ CARTA D'IDENTITAD, Identitätskarte / Carte d’identité / Carta d’identità / Carta d’identitadFRONT, BACKLatin
Paper PassportPass / Passeport / Passaporto / PassaportBIO-DATA PAGELatin
Residence PermitAufenthaltstitel / Titre de séjour / Permesso di soggiorno / Permissiun da dimoraFRONT, BACKLatin
Residence PermitAufenthaltstitel / Titre de séjour / Permesso di soggiorno / Permissiun da dimoraFRONT, BACKLatin
Polycarbonate PassportPass / Passeport / Passaporto / PassaportBIO-DATA PAGELatin
@@ -504,11 +531,11 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

UK

Asylum RequestApplication registration card (ARC)FRONT, BACKLatin
Residence PermitFRONT, BACKLatin
Polycarbonate PassportBIO-DATA PAGELatin
- - - - - + + + + +

UKRAINE

Driver's LicenseПосвідчення водія / Водительское удостоверениеFRONTCyrillic, Latin
Identity CardПаспорт громадянина УкраїниFRONT, BACKCyrillic, Latin
Residence PermitПосвідка на постійне проживання (ППП)FRONT, BACKCyrillic, Latin
Polycarbonate PassportПаспортBIO-DATA PAGELatin
Temporary Residence PermitПосвідка на тимчасове проживанняFRONT, BACKCyrillic, Latin
Driver's LicenseПосвідчення водія / Водительское удостоверениеFRONTCyrillic, Latin
Identity CardПаспорт громадянина УкраїниFRONT, BACKCyrillic, Latin
Residence PermitПосвідка на постійне проживання (ППП)FRONT, BACKCyrillic, Latin
Polycarbonate PassportПаспортBIO-DATA PAGELatin
Temporary Residence PermitПосвідка на тимчасове проживанняFRONT, BACKCyrillic, Latin



@@ -516,6 +543,8 @@ Other than documents listed here, BlinkID also scans the Machine Readabl + +

ANTIGUA AND BARBUDA

Driver's LicenseFRONTLatin
@@ -535,93 +564,94 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

ARGENTINA

Identity CardTrident ID CardFRONT, BACKLatin
- - + +

BOLIVIA

Driver's LicenseLicencia para conducirFRONT, BACKLatin
Identity CardCédula de identidadFRONT, BACKLatin
Minors IDCédula de identidad para menoresFRONT, BACKLatin
Identity CardCédula de identidadFRONT, BACKLatin
Minors IDCédula de identidad para menoresFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
- + - - + +

BRAZIL

Alien IDCarteira de Registro Nacional Migratório, Cédula de Identidade de EstrangeiroFRONT, BACKLatin
Alien IDCarteira de Registro Nacional Migratório, Cédula de Identidade de EstrangeiroFRONT, BACKLatin
Consular Paper PassportPassaporteBIO-DATA PAGELatin
Driver's LicenseCarteira Nacional de Habilitação (CNH)FRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
Driver's LicenseCarteira Nacional de Habilitação (CNH)FRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
Paper PassportPassaporteBIO-DATA PAGELatin
- +

BRAZIL, ALAGOAS

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, CEARA

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, DISTRITO FEDERAL

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, GOIAS

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, MARANHAO

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, MATO GROSSO

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, MINAS GERAIS

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, PARA

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, PARANA

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, PERNAMBUCO

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, RIO DE JANEIRO

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, RIO GRANDE DO SUL

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, SANTA CATARINA

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, SAO PAOLO

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin
- +

BRAZIL, SERGIPE

Identity CardCédula de identidadeFRONT, BACKLatin
Identity CardCédula de identidadeFRONT, BACKLatin

CAYMAN ISLANDS

Driver's LicenseDriver's licenceFRONTLatin
Paper PassportPasseportBIO-DATA PAGELatin
Polycarbonate PassportPasseportBIO-DATA PAGELatin
Voter IDVoter registration cardFRONTLatin
- + - +

CHILE

Alien IDCédula de Identidad, Cédula de identidad para extranjerosFRONT, BACKLatin
Alien IDCédula de Identidad, Cédula de identidad para extranjerosFRONT, BACKLatin
Driver's LicenseLicencia de conducirFRONTLatin
Identity CardCédula de IdentidadFRONT, BACKLatin
Identity CardCédula de IdentidadFRONT, BACKLatin
Polycarbonate PassportPasaporteBIO-DATA PAGELatin
- - - - + + + + - +

COLOMBIA

Alien IDCédula de Extranjería (CE)FRONT, BACKLatin
Driver's LicenseLicencia de ConducciónFRONT, BACKLatin
Identity CardCédula Digital Colombiana, Cédula de Ciudadanía (CC)FRONT, BACKLatin
Minors IDTarjeta de identidad Biométrica (Azul)FRONT, BACKLatin
Alien IDCédula de Extranjería (CE)FRONT, BACKLatin
Driver's LicenseLicencia de ConducciónFRONT, BACKLatin
Identity CardCédula Digital Colombiana, Cédula de Ciudadanía (CC)FRONT, BACKLatin
Minors IDTarjeta de identidad Biométrica (Azul)FRONT, BACKLatin
Polycarbonate PassportPasaporteBIO-DATA PAGELatin
Temporary Protection PermitPermiso por protección temporalFRONT, BACKLatin
Temporary Protection PermitPermiso por protección temporalFRONT, BACKLatin
- + - +

COSTA RICA

Driver's LicenseLicencia de conducirFRONTLatin
Identity CardCédula de identidadFRONT, BACKLatin
Identity CardCédula de identidadFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
Residence PermitCédula de Residencia, DIMEXFRONT, BACKLatin
Residence PermitCédula de Residencia, DIMEXFRONT, BACKLatin
Polycarbonate PassportPasaporteBIO-DATA PAGELatin
- +

CUBA

Identity CardCarné de IdentidadFRONT, BACKLatin
Identity CardCarné de IdentidadFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin

DOMINICA

Paper PassportBIO-DATA PAGELatin
Polycarbonate PassportBIO-DATA PAGELatin
- - + +

DOMINICAN REPUBLIC

Driver's LicenseLicencia de conducirFRONT, BACKLatin
Identity CardCédula de Identidad y Electoral (CIE)FRONT, BACKLatin
Non Voter IDCédula de IdentidadFRONT, BACKLatin
Identity CardCédula de Identidad y Electoral (CIE)FRONT, BACKLatin
Non Voter IDCédula de IdentidadFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
- +

ECUADOR

Driver's LicenseLicencia de conducirFRONT, BACKLatin
Identity CardCédula de Identidad, Cédula de Identidad ElectrónicaFRONT, BACKLatin
Identity CardCédula de Identidad, Cédula de Identidad ElectrónicaFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
- + +

EL SALVADOR

Driver's LicenseLicencia de conducirFRONT, BACKLatin
Identity CardDocumento Único de Identidad (DUI)FRONT, BACKLatin
Identity CardDocumento Único de Identidad (DUI)FRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin

GRENADA

Paper PassportBIO-DATA PAGELatin
- - + + - +

GUATEMALA

Alien IDDocumento Personal de Identificación (DPI) - Extranjero domiciliadoFRONT, BACKLatin
Consular IDTarjeta de Identificación Consular (TICG)FRONT, BACKLatin
Alien IDDocumento Personal de Identificación (DPI) - Extranjero domiciliadoFRONT, BACKLatin
Consular IDTarjeta de Identificación Consular (TICG)FRONT, BACKLatin
Driver's LicenseLicencia de conducirFRONT, BACKLatin
Identity CardDocumento Personal de Identificación (DPI)FRONT, BACKLatin
Identity CardDocumento Personal de Identificación (DPI)FRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
@@ -630,7 +660,7 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

GUYANA

Driver's LicenseFRONTLatin
- +

HAITI

Driver's LicensePermis de conduireFRONTLatin
Identity CardCarte d'identification nationale (CIN) / Kat Idantifikasyon NasyonalFRONT, BACKLatin
Paper PassportPasseport / PaspòBIO-DATA PAGELatin
Paper PassportPasseport / PaspòBIO-DATA PAGELatin
@@ -641,14 +671,14 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

HONDURAS

Driver's LicenseLicencia de conducir, Permiso de conducirFRONT, BACKLatin
Identity CardTarjeta de identidadFRONT, BACKLatin
Paper PassportPasseport / PasaporteBIO-DATA PAGELatin
Voter IDElector registration identification cardFRONT, BACKLatin
- + - + - +

MEXICO

Consular IDMatrícula Consular, Matrícula consularFRONT, BACKLatin
Consular IDMatrícula Consular, Matrícula consularFRONT, BACKLatin
Consular Voter IDCredencial para votar desde el extranjeroFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
Professional DLLicencia Federal de ConductorFRONTLatin
Professional IDCédula ProfesionalFRONT, BACK,
VERTICAL
Latin
Professional IDCédula ProfesionalFRONT, BACK,
VERTICAL
Latin
Residence PermitTarjeta de Residencia Temporal y Residencia PermanenteFRONT, BACKLatin
Polycarbonate PassportPasaporteBIO-DATA PAGELatin
Tax IDCédula de Identificación Fiscal (CIF)FRONTLatin
Tax IDCédula de Identificación Fiscal (CIF)FRONTLatin
Voter IDCredencial para votarFRONT, BACKLatin
@@ -719,27 +749,28 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

MEXICO, AGUASCALIENTES

Driver's LicenseLicencia de ConducirFRONT, BACK,
VERTICAL
Latin

MEXICO, ZACATECAS

Driver's LicenseLicencia de ConducirFRONT, BACKLatin
- +

NICARAGUA

Identity CardCédula de Identidad CiudadanaFRONT, BACKLatin
Identity CardCédula de Identidad CiudadanaFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
- - + + - +

PANAMA

Driver's LicenseLicencia de ConducirFRONTLatin
Identity CardCédula de Identidad, Documento de IdentidadFRONT, BACKLatin
Residence PermitCarné de Residente PermanenteFRONT, BACKLatin
Identity CardCédula de Identidad, Documento de IdentidadFRONT, BACKLatin
Residence PermitCarné de Residente PermanenteFRONT, BACKLatin
Polycarbonate PassportPasaporteBIO-DATA PAGELatin
Temporary Residence PermitCarné de Residencia ProvisionalFRONT, BACKLatin
Temporary Residence PermitCarné de Residencia ProvisionalFRONT, BACKLatin
- + +

PARAGUAY

Driver's LicenseLicencia de ConducirFRONT, BACKLatin
Identity CardCédula de Identidad CivilFRONT, BACKLatin
Identity CardCédula de Identidad CivilFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
Polycarbonate PassportPasaporteBIO-DATA PAGELatin
- + - +

PERU

Alien IDCarné de ExtranjeríaFRONT, BACKLatin
Alien IDCarné de ExtranjeríaFRONT, BACKLatin
Driver's LicenseLicencia de conducirFRONT, BACKLatin
Identity CardDocumento Nacional de Identidad (DNI)FRONT, BACKLatin
Identity CardDocumento Nacional de Identidad (DNI), Documento nacional de identidadFRONT, BACKLatin
Minors IDDocumento Nacional de Identidad (DNI) para menoresFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
- +

PUERTO RICO

Driver's LicenseLicencia de ConducirFRONTLatin
Voter IDTarjeta de Identificación Electoral (TIE) / Electoral Identification CardFRONTLatin
Voter IDTarjeta de Identificación Electoral (TIE) / Electoral Identification CardFRONTLatin
@@ -758,11 +789,11 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

SAINT KITTS AND NEVIS

Driver's LicenseFRONTLatin
Paper PassportBIO-DATA PAGELatin
Identity CardNational Turks & Caicos Islander Status Card / National TCI Status CardFRONTLatin
Paper PassportPasseportBIO-DATA PAGELatin
- +

URUGUAY

Identity CardCédula de IdentidadFRONT, BACKLatin
Identity CardCédula de IdentidadFRONT, BACKLatin
Paper PassportPasaporteBIO-DATA PAGELatin
- +

VENEZUELA

Driver's LicenseLicencia para conducirFRONTLatin
Identity CardCédula de IdentidadFRONTLatin
Identity CardCédula de IdentidadFRONTLatin
Polycarbonate PassportPasaporteBIO-DATA PAGELatin



@@ -771,40 +802,49 @@ Other than documents listed here, BlinkID also scans the Machine Readabl + +
- - - + + + +

ALGERIA

Driver's Licenseرخصة القيادةFRONT, BACKLatin
Identity CardCarte nationale d’identité / بطاقة الهوية الوطنيFRONT, BACKLatin
Paper Passportجواز السفر / PasseportBIO-DATA PAGELatin
Driver's Licenseرخصة القيادةFRONT, BACKLatin
Identity CardCarte nationale d’identité / بطاقة الهوية الوطنيFRONT, BACKLatin
Paper Passportجواز السفر / PasseportBIO-DATA PAGELatin
+

ANGOLA

Paper PassportPassaporteBIO-DATA PAGELatin
- - - + + + +

BAHRAIN

Driver's Licenseرخصة السائقFRONT, BACKLatin
Identity Cardبطاقة الهوية / CPR CardFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Driver's Licenseرخصة السائقFRONT, BACKLatin
Identity Cardبطاقة الهوية / CPR CardFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Polycarbonate Passportجواز سفرBIO-DATA PAGEArabic, Latin
- +

BENIN

Identity CardCarte d’identité CEDEAO, Carte nationale d'identiteFRONT, BACKLatin
Identity CardCarte d’identité CEDEAO, Carte nationale d'identiteFRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin

BOTSWANA

Identity CardOmangFRONT, BACKLatin
- + +

BURKINA FASO

Driver's LicensePermis de conduire FRONT, BACKLatin
Identity CardCarte Nationale d'Identité Burkinabè (CNIB)FRONT, BACKLatin
Identity CardCarte Nationale d'Identité Burkinabè (CNIB)FRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin
Polycarbonate PassportPasseportBIO-DATA PAGELatin

BURUNDI

Polycarbonate PassportPasseportBIO-DATA PAGELatin
- + +

CAMEROON

Identity CardCarte Nationale d'Identité (CNI)FRONT, BACKLatin
Driver's LicensePermis de Conduire / Driving LicenceFRONTLatin
Identity CardCarte Nationale d'Identité (CNI)FRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin
Polycarbonate PassportPasseportBIO-DATA PAGELatin
- +

CHAD

Identity CardCarte d'identité nationale / بطاقة شخصية وطنيةFRONT, BACKLatin
Identity CardCarte d'identité nationale / بطاقة شخصية وطنيةFRONT, BACKLatin
- +

COMOROS

Paper PassportPasseport / جواز سفرBIO-DATA PAGELatin
Paper PassportPasseport / جواز سفرBIO-DATA PAGELatin

DEMOCRATIC REPUBLIC OF THE CONGO

Driver's LicensePermis de conduire (CONADEP)FRONT, BACKLatin
Voter IDCarte d'electeurFRONTLatin
- - - + + + +

EGYPT

Driver's Licenseرخصة القيادةFRONT, BACKArabic, Latin
Identity Cardبطاقة تحقيق الشخصيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Driver's Licenseرخصة القيادةFRONT, BACKArabic, Latin
Identity Cardبطاقة تحقيق الشخصيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
+

ERITREA

Paper Passportፓስፖርት/جواز سفرBIO-DATA PAGELatin

ESWATINI

Paper PassportBIO-DATA PAGELatin
@@ -814,54 +854,63 @@ Other than documents listed here, BlinkID also scans the Machine Readabl +

GAMBIA

Driver's LicenseFRONTLatin
Identity CardGhana CardFRONT, BACKLatin
Paper PassportBIO-DATA PAGELatin
Voter IDFRONTLatin

GUINEA

Identity CardCarte d'identite cedeaoFRONT, BACKLatin
Polycarbonate PassportPasseportBIO-DATA PAGELatin
- +

IRAN

Paper PassportگذرنامهBIO-DATA PAGELatin
Paper PassportگذرنامهBIO-DATA PAGELatin
- - - + + +

IRAQ

Identity Cardالبطاقة الوطنية / كارتى نيشتمانىFRONT, BACKLatin
Paper Passportپاسپورت / جواز سفرBIO-DATA PAGELatin
Polycarbonate Passportپاسپورت / جواز سفرBIO-DATA PAGELatin
Identity Cardالبطاقة الوطنية / كارتى نيشتمانىFRONT, BACKLatin
Paper Passportپاسپورت / جواز سفرBIO-DATA PAGELatin
Polycarbonate Passportپاسپورت / جواز سفرBIO-DATA PAGELatin
- - - + + +

ISRAEL

Driver's Licenseרשיון נהיגהFRONTLatin
Identity CardTehudat Zehut / بطاقة هوية‎ / תעודת זהותFRONT, BACKLatin
Paper PassportדרכוןBIO-DATA PAGELatin
Driver's Licenseרשיון × ×”×™×’×”FRONTLatin
Identity CardTehudat Zehut / بطاقة هوية‎ / תעודת זהותFRONT, BACKLatin
Paper PassportדרכוןBIO-DATA PAGELatin
- + +

IVORY COAST

Driver's LicensePermis de conduireFRONTLatin
Identity CardCarte Nationale d'Identité (CNI)FRONT, BACKLatin
Identity CardCarte Nationale d'Identité (CNI)FRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin
- - - + + +

JORDAN

Driver's Licenseرخصة القيادةFRONTLatin
Identity Cardبطاقة شخصيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGELatin
Driver's Licenseرخصة القيادةFRONTLatin
Identity Cardبطاقة شخصيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGELatin

KENYA

Driver's LicenseFRONTLatin
Identity CardKitambulishoFRONT, BACKLatin
Polycarbonate PassportPassport / PasiBIO-DATA PAGELatin
- - - - - + + + + +

KUWAIT

Bidoon Cardبطاقة مراجعةFRONT, BACKArabic, Latin
Driver's Licenseرخصة القيادةFRONT, BACKLatin
Identity Cardبطاقة المدنيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Resident IDبطاقة المدنيةFRONT, BACKArabic, Latin
Bidoon Cardبطاقة مراجعةFRONT, BACKArabic, Latin
Driver's Licenseرخصة القيادةFRONT, BACKLatin
Identity Cardبطاقة المدنيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Resident IDبطاقة المدنيةFRONT, BACKArabic, Latin
- - - + + +

LEBANON

Driver's Licenseرخصة السائقFRONTLatin
Identity Cardبطاقة الهويةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Driver's Licenseرخصة السائقFRONTLatin
Identity Cardبطاقة الهويةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
+ +

LIBERIA

Identity CardFRONTLatin
Paper PassportPasseportBIO-DATA PAGELatin
Voter IDFRONT, BACKLatin
- + +

LIBYA

Polycarbonate Passportجواز سفرBIO-DATA PAGEArabic, Latin
Polycarbonate Passportجواز سفرBIO-DATA PAGEArabic, Latin
+ +

MALAWI

Identity CardChiphaso cha NzikaFRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin
- + +

MALI

Identity CardCarte d'identité CEDEAOFRONT, BACKLatin
Identity CardCarte d'identité CEDEAOFRONT, BACKLatin
Paper PassportPasseport / جواز سفرBIO-DATA PAGELatin
+

MAURITIUS

Identity CardFRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin
- - - + + +

MOROCCO

Driver's LicensePermis de conduire / رخصة القيادةFRONT, BACKLatin
Identity CardCarte nationale d'identité / بطاقة التعريف الوطنيةFRONT, BACKLatin
Paper PassportPasseport / جواز سفرBIO-DATA PAGELatin
Driver's LicensePermis de conduire / رخصة القيادةFRONT, BACKLatin
Identity CardCarte nationale d'identité / بطاقة التعريف الوطنيةFRONT, BACKLatin
Paper PassportPasseport / جواز سفرBIO-DATA PAGELatin
- +

MOZAMBIQUE

Driver's LicenseCarta de ConduçãoFRONTLatin
Driver's LicenseCarta de ConduçãoFRONTLatin
Identity CardBilhete de Identidade, Bilhete de Identidade (BI)FRONT, BACKLatin
Polycarbonate PassportPassaporteBIO-DATA PAGELatin
@@ -873,63 +922,71 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

NAMIBIA

Polycarbonate PassportBIO-DATA PAGELatin
Voter IDPermanent Voter Card (PVC)FRONT, BACKLatin
- - - - + + + +

OMAN

Driver's Licenseرخصة قيادة مركبةFRONT, BACKLatin
Identity Cardبطاقة الهويةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Resident IDبطاقة مقيمFRONT, BACKArabic, Latin
Driver's Licenseرخصة قيادة مركبةFRONT, BACKLatin
Identity Cardبطاقة الهويةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Resident IDبطاقة مقيمFRONT, BACKArabic, Latin
- +

PALESTINE

Paper Passportجواز سفر / דרכוןBIO-DATA PAGEArabic, Latin
Paper Passportجواز سفر / דרכוןBIO-DATA PAGEArabic, Latin
- - - - + + + +

QATAR

Driver's Licenseرخصة القيادةFRONTLatin
Identity Cardبطاقة إثبات شخصيةFRONTArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Residence Permitتصريح الإقامةFRONT, BACKArabic, Latin
Driver's Licenseرخصة القيادةFRONTLatin
Identity Cardبطاقة إثبات شخصيةFRONTArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Residence Permitتصريح الإقامةFRONT, BACKArabic, Latin
+

RWANDA

Driver's LicenseUruhushya rwo gutwara ibinyabizigaFRONTLatin
Identity CardIndangamuntuFRONTLatin
Polycarbonate PassportPasiporo; Passeport; PasipotiBIO-DATA PAGELatin
- - - - - + + + + +

SAUDI ARABIA

Driver's Licenseرخصة قيادةFRONTArabic, Latin
Identity Cardبطاقة الأحوال المدنيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Resident IDIqama / هوية المقيمFRONTArabic, Latin
Polycarbonate Passportجواز سفرBIO-DATA PAGEArabic, Latin
Driver's Licenseرخصة قيادةFRONTArabic, Latin
Identity Cardبطاقة الأحوال المدنيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Resident IDIqama / هوية المقيمFRONTArabic, Latin
Polycarbonate Passportجواز سفرBIO-DATA PAGEArabic, Latin
- + + + +

SENEGAL

Identity CardCarte d'identité biométrique CEDEAO, Carte nationale d'identitéFRONT, BACKLatin
Driver's LicensePermis de conduireFRONT, BACKLatin
Identity CardCarte d'identité biométrique CEDEAO, Carte nationale d'identitéFRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin
+

SIERRA LEONE

Paper PassportPasseportBIO-DATA PAGELatin
+

SOMALIA

Paper PassportBaasaboor /جواز سفرBIO-DATA PAGELatin

SOUTH AFRICA

Driver's LicenseBestuurslisensieFRONTLatin
Identity CardGreen barcoded ID book, Smart ID cardFRONT, BACK,
VERTICAL
Latin
Polycarbonate PassportPasseportBIO-DATA PAGELatin
- - + +

SUDAN

Identity Cardالبطاقة الشخصية القومية, بطاقة إثبات شخصيةFRONT, BACKArabic, Latin
Polycarbonate Passportجواز سفرBIO-DATA PAGELatin
Identity Cardالبطاقة الشخصية القومية, بطاقة إثبات شخصيةFRONT, BACKArabic, Latin
Polycarbonate Passportجواز سفرBIO-DATA PAGELatin
- - + +

SYRIA

Identity Cardبطاقة شخصيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Identity Cardبطاقة شخصيةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin

TANZANIA

Driver's LicenseLeseni ya uderevaFRONTLatin
Identity CardKitambulisho cha Taifa / NIDAFRONT, BACKLatin
Polycarbonate PassportPasipoti; PasseportBIO-DATA PAGELatin
Voter IDKadi ya mpiga kura / Voter CardFRONTLatin
+ +

TOGO

Driver's LicensePermis de conduireFRONT, BACKLatin
Identity CardPermis de conduireFRONT, BACKLatin
Paper PassportPasseportBIO-DATA PAGELatin
- - - + + +

TUNISIA

Driver's Licenseرخصة قيادةFRONTLatin
Identity Cardبطاقة التعريف الوطنيةFRONTLatin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Driver's Licenseرخصة قيادةFRONTLatin
Identity Cardبطاقة التعريف الوطنيةFRONTLatin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
- - + + - +

TURKEY

Driver's LicenseSürücü belgesiFRONTLatin
Identity CardKimlik KartıFRONT, BACK,
VERTICAL
Latin
Driver's LicenseSürücü belgesiFRONTLatin
Identity CardKimlik KartıFRONT, BACK,
VERTICAL
Latin
Paper PassportPasaportBIO-DATA PAGELatin
Residence Permitİkamet İzniFRONT, BACKLatin
Residence Permitİkamet İzniFRONT, BACKLatin
Polycarbonate PassportPasaportBIO-DATA PAGELatin
- - - - - + + + + +

UAE

Diplomatic IDDiplomatic identity cardFRONTLatin
Driver's Licenseرخصة القيادةFRONT, BACKLatin
Identity Cardبطاقة الهويةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Resident IDبطاقة الهوية الوطنيةFRONT, BACKArabic, Latin
Polycarbonate Passportجواز سفرBIO-DATA PAGEArabic, Latin
Driver's Licenseرخصة القيادةFRONT, BACKLatin
Identity Cardبطاقة الهويةFRONT, BACKArabic, Latin
Paper Passportجواز سفرBIO-DATA PAGEArabic, Latin
Resident IDبطاقة الهوية الوطنيةFRONT, BACKArabic, Latin
Polycarbonate Passportجواز سفرBIO-DATA PAGEArabic, Latin
@@ -939,12 +996,14 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

UGANDA

Driver's LicensePermis de conduireFRONTLatin
Identity CardFRONT, BACKLatin
Driver's LicenseFRONTLatin
Paper PassportBIO-DATA PAGELatin
- + +

ZIMBABWE

Driver's LicenseRezinesi/Incwadi Yokutshayela; Carta de ConduçãoFRONT, BACKLatin
Driver's LicenseRezinesi/Incwadi Yokutshayela; Carta de ConduçãoFRONT, BACKLatin
Identity CardNational registration card (NRC)FRONT, BACKLatin
Paper PassportBIO-DATA PAGELatin
Polycarbonate PassportBIO-DATA PAGELatin
+

OMAN

Vehicle Registrationرخصة مركبةFRONT, BACKArabic, Latin
- +

UAE

Vehicle RegistrationVehicle LicenseFRONT, BACKLatin
Vehicle Registrationرخصة مركبةFRONT, BACKLatin



@@ -952,13 +1011,15 @@ Other than documents listed here, BlinkID also scans the Machine Readabl + +

BERMUDA

Driver's LicenseFRONTLatin
- + - + @@ -975,15 +1036,16 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

CANADA

Citizenship CertificateCanada citizenship card / Carte de citoyenneté canadienne FRONT, BACKLatin
Citizenship CertificateCanada citizenship card / Carte de citoyenneté canadienne FRONT, BACKLatin
Non Card Tribal IDCertificate of Indian Status / Certificat de statut IndienFRONT, BACKLatin
Paper PassportPassport / PasseportBIO-DATA PAGELatin
Residence PermitPermanent residence (PR) card / Carte de résident permanentFRONT, BACKLatin
Residence PermitPermanent residence (PR) card / Carte de résident permanentFRONT, BACKLatin
Polycarbonate PassportPassport / PasseportBIO-DATA PAGELatin
Social Security CardSocial insurance card (SIN card) / Carte d'assurance sociale (Carte de NAS) FRONTLatin
Tribal IDCertificate of Indian Status / Certificat de statut IndienFRONT, BACKLatin
+

CANADA, MANITOBA

Driver's LicenseFRONT, BACKLatin
Identity CardFRONT, BACKLatin
Metis Federation CardManitoba Métis Federation (MMF) cardFRONTLatin
- +

CANADA, NEW BRUNSWICK

Driver's LicensePermis de conduireFRONT, BACKLatin
Identity CardCarte d'identitéFRONT, BACKLatin
Identity CardCarte d'identitéFRONT, BACKLatin
- +

CANADA, NEWFOUNDLAND AND LABRADOR

Driver's LicenseFRONT, BACKLatin
Identity CardCarte d'identitéFRONT, BACKLatin
Identity CardCarte d'identitéFRONT, BACKLatin
- +

CANADA, NORTHWEST TERRITORIES

Driver's LicensePermis de conduireFRONT, BACKLatin
Identity CardCarte d'identitéFRONT, BACK,
VERTICAL
Latin
Identity CardCarte d'identitéFRONT, BACK,
VERTICAL
Latin
@@ -995,7 +1057,7 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

CANADA, NOVA SCOTIA

Driver's LicenseFRONT, BACKLatin
Identity CardFRONT, BACKLatin
Identity CardPhoto cardFRONT, BACKLatin
- +

CANADA, PRINCE EDWARD ISLAND

Driver's LicenseFRONT, BACKLatin
Identity CardCarte d'identitéFRONT, BACKLatin
Identity CardCarte d'identitéFRONT, BACKLatin

CANADA, QUEBEC

Driver's LicensePermis de conduireFRONT, BACKLatin
@@ -1003,7 +1065,7 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

CANADA, SASKATCHEWAN

Identity CardFRONT, BACKLatin
- +

CANADA, YUKON

Driver's LicensePermis de conduireFRONT, BACKLatin
Identity Cardcarte d'identité généraleFRONT, BACKLatin
Identity Cardcarte d'identité généraleFRONT, BACKLatin
@@ -1181,6 +1243,8 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

USA

Border Crossing CardBCCFRONT, BACKLatin
Global Entry CardFRONT, BACKLatin
+ +
@@ -1213,4 +1277,4 @@ Other than documents listed here, BlinkID also scans the Machine Readabl

AUSTRALIA

Asic CardAviation Security Identification CardFRONT,
VERTICAL
Latin
Paper PassportBIO-DATA PAGELatin
Driver's LicenseFRONT, BACKLatin
Polycarbonate PassportUruwhenuaBIO-DATA PAGE, SECOND DATA PAGELatin
-


+


\ No newline at end of file diff --git a/package.json b/package.json index 0cb62b6..0b18b44 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "private": true, - "version": "7.4.3", + "version": "7.6.0", "scripts": { "build": "turbo build", "build:packages": "turbo build --filter={./packages/*}", "build:dev": "turbo build:dev --filter={./packages/*}", "build:publish": "turbo build:publish --filter={./packages/*}", - "clean": "turbo clean", - "create-github": "pnpm clean && pnpm build:publish && pnpm --filter 'github-release' create-github", + "clean": "turbo clean && rimraf .turbo .venv", + "create-github": "pnpm run clean && pnpm run build:publish && pnpm --filter 'github-release' create-github", "lint": "turbo lint", "prepare": "husky install", "publish-test": "turbo publish-test", @@ -17,13 +17,14 @@ "watch": "turbo watch --filter='./packages/*'" }, "devDependencies": { - "@changesets/cli": "2.29.2", + "@changesets/cli": "2.29.7", "husky": "^8.0.3", "lint-staged": "^15.2.10", + "rimraf": "^6.0.1", "syncpack": "13.0.3", - "turbo": "^2.4.4", + "turbo": "^2.5.8", "vitest": "^3.0.8" }, "license": "ISC", - "packageManager": "pnpm@10.17.0" + "packageManager": "pnpm@10.18.1" } diff --git a/packages/blinkid-core/CHANGELOG.md b/packages/blinkid-core/CHANGELOG.md index b90214f..ad97fe9 100644 --- a/packages/blinkid-core/CHANGELOG.md +++ b/packages/blinkid-core/CHANGELOG.md @@ -1,5 +1,29 @@ # @microblink/blinkid-core +## 7.6.0 + +### Minor Changes + +- Rename `formFactor` property on `DerivedDeviceInfo` to `formFactors` + +### Patch Changes + +- Updated dependencies + - @microblink/blinkid-worker@7.6.0 + - @microblink/blinkid-wasm@7.6.0 + +## 7.5.0 + +### Minor Changes + +- Version skip + +### Patch Changes + +- Updated dependencies + - @microblink/blinkid-wasm@7.5.0 + - @microblink/blinkid-worker@7.5.0 + ## 7.4.3 ### Patch Changes @@ -38,7 +62,6 @@ ### Patch Changes - Introduced utilities for extracting images from the `BlinkIdScanningResult`: - - `extractSideInputImage` - `extractBarcodeImage` - `extractSideDocumentImage` diff --git a/packages/blinkid-core/docs/README.md b/packages/blinkid-core/docs/README.md index d169b02..9c9126b 100644 --- a/packages/blinkid-core/docs/README.md +++ b/packages/blinkid-core/docs/README.md @@ -7,12 +7,12 @@ ## Classes - [LicenseError](classes/LicenseError.md) -- [ProxyUrlValidationError](classes/ProxyUrlValidationError.md) ## Interfaces - [NavigatorUABrandVersion](interfaces/NavigatorUABrandVersion.md) - [NavigatorUAData](interfaces/NavigatorUAData.md) +- [PingBase](interfaces/PingBase.md) - [UADataValues](interfaces/UADataValues.md) - [UALowEntropyJSON](interfaces/UALowEntropyJSON.md) @@ -63,9 +63,11 @@ - [DocumentRules](type-aliases/DocumentRules.md) - [DocumentType](type-aliases/DocumentType.md) - [DriverLicenceDetailedInfo](type-aliases/DriverLicenceDetailedInfo.md) +- [ErrorData](type-aliases/ErrorData.md) - [FieldType](type-aliases/FieldType.md) - [FormFactor](type-aliases/FormFactor.md) - [GpuInfo](type-aliases/GpuInfo.md) +- [HardwareCameraInfoData](type-aliases/HardwareCameraInfoData.md) - [Hints](type-aliases/Hints.md) - [ImageAnalysisDetectionStatus](type-aliases/ImageAnalysisDetectionStatus.md) - [ImageAnalysisLightingStatus](type-aliases/ImageAnalysisLightingStatus.md) @@ -74,12 +76,23 @@ - [InputImageSource](type-aliases/InputImageSource.md) - [LicenseErrorCode](type-aliases/LicenseErrorCode.md) - [LicenseRequest](type-aliases/LicenseRequest.md) -- [LicenseStatusResponse](type-aliases/LicenseStatusResponse.md) - [LicenseTokenState](type-aliases/LicenseTokenState.md) - [LicenseUnlockResult](type-aliases/LicenseUnlockResult.md) - [LoadWasmParams](type-aliases/LoadWasmParams.md) +- [LogData](type-aliases/LogData.md) - [MrzDocumentType](type-aliases/MrzDocumentType.md) - [MrzResult](type-aliases/MrzResult.md) +- [Ping](type-aliases/Ping.md) +- [PingBrowserDeviceInfo](type-aliases/PingBrowserDeviceInfo.md) +- [PingError](type-aliases/PingError.md) +- [PingHardwareCameraInfo](type-aliases/PingHardwareCameraInfo.md) +- [PingLog](type-aliases/PingLog.md) +- [PingSdkCameraInputInfo](type-aliases/PingSdkCameraInputInfo.md) +- [PingSdkCameraPermission](type-aliases/PingSdkCameraPermission.md) +- [PingSdkInitStart](type-aliases/PingSdkInitStart.md) +- [PingSdkScanConditions](type-aliases/PingSdkScanConditions.md) +- [PingSdkUxEvent](type-aliases/PingSdkUxEvent.md) +- [PingSdkWrapperProduct](type-aliases/PingSdkWrapperProduct.md) - [Point](type-aliases/Point.md) - [ProcessingStatus](type-aliases/ProcessingStatus.md) - [ProcessResultWithBuffer](type-aliases/ProcessResultWithBuffer.md) @@ -97,8 +110,15 @@ - [ScanningSettings](type-aliases/ScanningSettings.md) - [ScanningSide](type-aliases/ScanningSide.md) - [ScanningStatus](type-aliases/ScanningStatus.md) +- [SchemaName](type-aliases/SchemaName.md) +- [SdkCameraInputInfoData](type-aliases/SdkCameraInputInfoData.md) +- [SdkCameraPermissionData](type-aliases/SdkCameraPermissionData.md) +- [SdkInitStartData](type-aliases/SdkInitStartData.md) +- [SdkScanConditionsData](type-aliases/SdkScanConditionsData.md) +- [SdkUxEventData](type-aliases/SdkUxEventData.md) +- [SdkWrapperProductData](type-aliases/SdkWrapperProductData.md) - [ServerPermissionError](type-aliases/ServerPermissionError.md) -- [ServerPermissionSubmitResult](type-aliases/ServerPermissionSubmitResult.md) +- [ServerPermissionSubmitError](type-aliases/ServerPermissionSubmitError.md) - [SingleSideScanningResult](type-aliases/SingleSideScanningResult.md) - [StringResult](type-aliases/StringResult.md) - [VehicleClassInfo](type-aliases/VehicleClassInfo.md) diff --git a/packages/blinkid-core/docs/classes/ProxyUrlValidationError.md b/packages/blinkid-core/docs/classes/ProxyUrlValidationError.md deleted file mode 100644 index 4f1bcff..0000000 --- a/packages/blinkid-core/docs/classes/ProxyUrlValidationError.md +++ /dev/null @@ -1,43 +0,0 @@ -[**@microblink/blinkid-core**](../README.md) - -*** - -[@microblink/blinkid-core](../README.md) / ProxyUrlValidationError - -# Class: ProxyUrlValidationError - -Error thrown when proxy URL validation fails - -## Extends - -- `Error` - -## Constructors - -### Constructor - -> **new ProxyUrlValidationError**(`message`, `url`): `ProxyUrlValidationError` - -#### Parameters - -##### message - -`string` - -##### url - -`string` - -#### Returns - -`ProxyUrlValidationError` - -#### Overrides - -`Error.constructor` - -## Properties - -### url - -> `readonly` **url**: `string` diff --git a/packages/blinkid-core/docs/functions/loadBlinkIdCore.md b/packages/blinkid-core/docs/functions/loadBlinkIdCore.md index 2ff12b6..a8f0c60 100644 --- a/packages/blinkid-core/docs/functions/loadBlinkIdCore.md +++ b/packages/blinkid-core/docs/functions/loadBlinkIdCore.md @@ -6,7 +6,7 @@ # Function: loadBlinkIdCore() -> **loadBlinkIdCore**(`settings`, `progressCallback?`): `Promise`\<\{ `progressStatusCallback?`: `Promise`\<`undefined`\> \| `Remote`\<[`ProgressStatusCallback`](../type-aliases/ProgressStatusCallback.md)\>; `createBlinkIdScanningSession`: `Promise`\<`Remote`\<`object` & `object` & `ProxyMarked`\>\>; `createProxySession`: `Promise`\<`Remote`\<`object` & `object` & `ProxyMarked`\>\>; `initBlinkId`: `Promise`\<`void`\>; `ping`: `Promise`\<`number`\>; `terminate`: `Promise`\<`void`\>; \}\> +> **loadBlinkIdCore**(`settings`, `progressCallback?`): `Promise`\<\{ `progressStatusCallback?`: `Promise`\<`undefined`\> \| `Remote`\<[`ProgressStatusCallback`](../type-aliases/ProgressStatusCallback.md)\>; `createBlinkIdScanningSession`: `Promise`\<`Remote`\<`object` & `object` & `ProxyMarked`\>\>; `createProxySession`: `Promise`\<`Remote`\<`object` & `object` & `ProxyMarked`\>\>; `initBlinkId`: `Promise`\<`void`\>; `reportPinglet`: `Promise`\<`void`\>; `sendPinglets`: `Promise`\<`void`\>; `terminate`: `Promise`\<`void`\>; \}\> Creates and initializes a BlinkID core instance. @@ -87,7 +87,7 @@ Optional callback for tracking resource download progress (WASM, data files) ## Returns -`Promise`\<\{ `progressStatusCallback?`: `Promise`\<`undefined`\> \| `Remote`\<[`ProgressStatusCallback`](../type-aliases/ProgressStatusCallback.md)\>; `createBlinkIdScanningSession`: `Promise`\<`Remote`\<`object` & `object` & `ProxyMarked`\>\>; `createProxySession`: `Promise`\<`Remote`\<`object` & `object` & `ProxyMarked`\>\>; `initBlinkId`: `Promise`\<`void`\>; `ping`: `Promise`\<`number`\>; `terminate`: `Promise`\<`void`\>; \}\> +`Promise`\<\{ `progressStatusCallback?`: `Promise`\<`undefined`\> \| `Remote`\<[`ProgressStatusCallback`](../type-aliases/ProgressStatusCallback.md)\>; `createBlinkIdScanningSession`: `Promise`\<`Remote`\<`object` & `object` & `ProxyMarked`\>\>; `createProxySession`: `Promise`\<`Remote`\<`object` & `object` & `ProxyMarked`\>\>; `initBlinkId`: `Promise`\<`void`\>; `reportPinglet`: `Promise`\<`void`\>; `sendPinglets`: `Promise`\<`void`\>; `terminate`: `Promise`\<`void`\>; \}\> Promise that resolves with initialized BlinkID core instance diff --git a/packages/blinkid-core/docs/interfaces/PingBase.md b/packages/blinkid-core/docs/interfaces/PingBase.md new file mode 100644 index 0000000..4c10de2 --- /dev/null +++ b/packages/blinkid-core/docs/interfaces/PingBase.md @@ -0,0 +1,59 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingBase + +# Interface: PingBase\ + +Represents the base structure for a ping event. + +## Type Parameters + +### TData + +`TData` + +### TSchemaName + +`TSchemaName` *extends* [`SchemaName`](../type-aliases/SchemaName.md) + +### TSchemaVersion + +`TSchemaVersion` *extends* `Semver` + +### TSessionNumber + +`TSessionNumber` *extends* `number` = `number` + +## Properties + +### data + +> **data**: `TData` + +The data payload of the event. + +*** + +### schemaName + +> **schemaName**: `TSchemaName` + +The name of the schema. + +*** + +### schemaVersion + +> **schemaVersion**: `TSchemaVersion` + +The version of the schema. + +*** + +### sessionNumber? + +> `optional` **sessionNumber**: `TSessionNumber` + +The session number associated with the event. diff --git a/packages/blinkid-core/docs/type-aliases/BarcodeResult.md b/packages/blinkid-core/docs/type-aliases/BarcodeResult.md index 1b990c7..b0c9986 100644 --- a/packages/blinkid-core/docs/type-aliases/BarcodeResult.md +++ b/packages/blinkid-core/docs/type-aliases/BarcodeResult.md @@ -167,6 +167,14 @@ The nationality of the document owner. *** +### parsed + +> **parsed**: `boolean` + +Whether the raw barcode data was successfully parsed into structured information. + +*** + ### personalIdNumber > **personalIdNumber**: `string` diff --git a/packages/blinkid-core/docs/type-aliases/BlinkIdScanningResult.md b/packages/blinkid-core/docs/type-aliases/BlinkIdScanningResult.md index 486b6ef..2d8d980 100644 --- a/packages/blinkid-core/docs/type-aliases/BlinkIdScanningResult.md +++ b/packages/blinkid-core/docs/type-aliases/BlinkIdScanningResult.md @@ -92,6 +92,14 @@ The date of birth of the document owner *** +### dateOfEntry? + +> `optional` **dateOfEntry**: [`DateResult`](DateResult.md)\<[`StringResult`](StringResult.md)\> + +The date of entry of the document owner + +*** + ### dateOfExpiry? > `optional` **dateOfExpiry**: [`DateResult`](DateResult.md)\<[`StringResult`](StringResult.md)\> @@ -228,6 +236,14 @@ The last name of the document owner *** +### localityCode? + +> `optional` **localityCode**: [`StringResult`](StringResult.md) + +The locality code of the document owner + +*** + ### localizedName? > `optional` **localizedName**: [`StringResult`](StringResult.md) @@ -236,6 +252,14 @@ The localized name of the document owner *** +### maidenName? + +> `optional` **maidenName**: [`StringResult`](StringResult.md) + +The maiden name of the document owner + +*** + ### manufacturingYear? > `optional` **manufacturingYear**: [`StringResult`](StringResult.md) @@ -268,6 +292,22 @@ The mother's name of the document owner *** +### municipalityCode? + +> `optional` **municipalityCode**: [`StringResult`](StringResult.md) + +The municipality code of the document owner + +*** + +### municipalityOfRegistration? + +> `optional` **municipalityOfRegistration**: [`StringResult`](StringResult.md) + +The municipality of registration of the document owner + +*** + ### nationalInsuranceNumber? > `optional` **nationalInsuranceNumber**: [`StringResult`](StringResult.md) @@ -300,6 +340,14 @@ The place of birth of the document owner *** +### pollingStationCode? + +> `optional` **pollingStationCode**: [`StringResult`](StringResult.md) + +The polling station code of the document owner + +*** + ### profession? > `optional` **profession**: [`StringResult`](StringResult.md) @@ -316,6 +364,14 @@ The race of the document owner *** +### registrationCenterCode? + +> `optional` **registrationCenterCode**: [`StringResult`](StringResult.md) + +The registration center code of the document owner + +*** + ### religion? > `optional` **religion**: [`StringResult`](StringResult.md) @@ -348,6 +404,14 @@ The residential status of the document owner *** +### sectionCode? + +> `optional` **sectionCode**: [`StringResult`](StringResult.md) + +The section code of the document owner + +*** + ### sex? > `optional` **sex**: [`StringResult`](StringResult.md) @@ -372,6 +436,22 @@ The sponsor of the document owner. *** +### stateCode? + +> `optional` **stateCode**: [`StringResult`](StringResult.md) + +The state code of the document owner + +*** + +### stateName? + +> `optional` **stateName**: [`StringResult`](StringResult.md) + +The state of the document owner + +*** + ### subResults > **subResults**: [`SingleSideScanningResult`](SingleSideScanningResult.md)[] diff --git a/packages/blinkid-core/docs/type-aliases/DerivedDeviceInfo.md b/packages/blinkid-core/docs/type-aliases/DerivedDeviceInfo.md index e4457ec..e851934 100644 --- a/packages/blinkid-core/docs/type-aliases/DerivedDeviceInfo.md +++ b/packages/blinkid-core/docs/type-aliases/DerivedDeviceInfo.md @@ -24,9 +24,9 @@ *** -### formFactor +### formFactors -> **formFactor**: [`FormFactor`](FormFactor.md)[] +> **formFactors**: [`FormFactor`](FormFactor.md)[] *** diff --git a/packages/blinkid-core/docs/type-aliases/DocumentType.md b/packages/blinkid-core/docs/type-aliases/DocumentType.md index 277e39d..fd6447c 100644 --- a/packages/blinkid-core/docs/type-aliases/DocumentType.md +++ b/packages/blinkid-core/docs/type-aliases/DocumentType.md @@ -6,6 +6,6 @@ # Type Alias: DocumentType -> **DocumentType** = `"consular-id"` \| `"dl"` \| `"dl-public-services-card"` \| `"employment-pass"` \| `"fin-card"` \| `"id"` \| `"multipurpose-id"` \| `"mykad"` \| `"mykid"` \| `"mypr"` \| `"mytentera"` \| `"pan-card"` \| `"professional-id"` \| `"public-services-card"` \| `"residence-permit"` \| `"resident-id"` \| `"temporary-residence-permit"` \| `"voter-id"` \| `"work-permit"` \| `"ikad"` \| `"military-id"` \| `"mykas"` \| `"social-security-card"` \| `"health-insurance-card"` \| `"passport"` \| `"s-pass"` \| `"address-card"` \| `"alien-id"` \| `"alien-passport"` \| `"green-card"` \| `"minors-id"` \| `"postal-id"` \| `"professional-dl"` \| `"tax-id"` \| `"weapon-permit"` \| `"visa"` \| `"border-crossing-card"` \| `"driver-card"` \| `"global-entry-card"` \| `"mypolis"` \| `"nexus-card"` \| `"passport-card"` \| `"proof-of-age-card"` \| `"refugee-id"` \| `"tribal-id"` \| `"veteran-id"` \| `"citizenship-certificate"` \| `"my-number-card"` \| `"consular-passport"` \| `"minors-passport"` \| `"minors-public-services-card"` \| `"driving-privilege-card"` \| `"asylum-request"` \| `"driver-qualification-card"` \| `"provisional-dl"` \| `"refugee-passport"` \| `"special-id"` \| `"uniformed-services-id"` \| `"immigrant-visa"` \| `"consular-voter-id"` \| `"twic-card"` \| `"exit-entry-permit"` \| `"mainland-travel-permit-taiwan"` \| `"nbi-clearance"` \| `"proof-of-registration"` \| `"temporary-protection-permit"` \| `"afghan-citizen-card"` \| `"eid"` \| `"pass"` \| `"sis-id"` \| `"asic-card"` \| `"bidoon-card"` \| `"interim-health-insurance-card"` \| `"non-voter-id"` \| `"reciprocal-health-insurance-card"` \| `"vehicle-registration"` \| `"esaad-card"` \| `"registration-certificate"` \| `"medical-marijuana-id"` \| `"non-card-tribal-id"` \| `"diplomatic-id"` +> **DocumentType** = `"consular-id"` \| `"dl"` \| `"dl-public-services-card"` \| `"employment-pass"` \| `"fin-card"` \| `"id"` \| `"multipurpose-id"` \| `"mykad"` \| `"mykid"` \| `"mypr"` \| `"mytentera"` \| `"pan-card"` \| `"professional-id"` \| `"public-services-card"` \| `"residence-permit"` \| `"resident-id"` \| `"temporary-residence-permit"` \| `"voter-id"` \| `"work-permit"` \| `"ikad"` \| `"military-id"` \| `"mykas"` \| `"social-security-card"` \| `"health-insurance-card"` \| `"passport"` \| `"s-pass"` \| `"address-card"` \| `"alien-id"` \| `"alien-passport"` \| `"green-card"` \| `"minors-id"` \| `"postal-id"` \| `"professional-dl"` \| `"tax-id"` \| `"weapon-permit"` \| `"visa"` \| `"border-crossing-card"` \| `"driver-card"` \| `"global-entry-card"` \| `"mypolis"` \| `"nexus-card"` \| `"passport-card"` \| `"proof-of-age-card"` \| `"refugee-id"` \| `"tribal-id"` \| `"veteran-id"` \| `"citizenship-certificate"` \| `"my-number-card"` \| `"consular-passport"` \| `"minors-passport"` \| `"minors-public-services-card"` \| `"driving-privilege-card"` \| `"asylum-request"` \| `"driver-qualification-card"` \| `"provisional-dl"` \| `"refugee-passport"` \| `"special-id"` \| `"uniformed-services-id"` \| `"immigrant-visa"` \| `"consular-voter-id"` \| `"twic-card"` \| `"exit-entry-permit"` \| `"mainland-travel-permit-taiwan"` \| `"nbi-clearance"` \| `"proof-of-registration"` \| `"temporary-protection-permit"` \| `"afghan-citizen-card"` \| `"eid"` \| `"pass"` \| `"sis-id"` \| `"asic-card"` \| `"bidoon-card"` \| `"interim-health-insurance-card"` \| `"non-voter-id"` \| `"reciprocal-health-insurance-card"` \| `"vehicle-registration"` \| `"esaad-card"` \| `"registration-certificate"` \| `"medical-marijuana-id"` \| `"non-card-tribal-id"` \| `"diplomatic-id"` \| `"emergency-passport"` \| `"temporary-passport"` \| `"metis-federation-card"` \| `"adr-certificate"` Represents document class types diff --git a/packages/blinkid-core/docs/type-aliases/ErrorData.md b/packages/blinkid-core/docs/type-aliases/ErrorData.md new file mode 100644 index 0000000..0d62096 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/ErrorData.md @@ -0,0 +1,29 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / ErrorData + +# Type Alias: ErrorData + +> **ErrorData** = `object` + +Represents the data for the `ping.error` event. + +## Properties + +### errorMessage + +> **errorMessage**: `string` + +*** + +### errorType + +> **errorType**: `"NonFatal"` \| `"Crash"` + +*** + +### stackTrace? + +> `optional` **stackTrace**: `string` diff --git a/packages/blinkid-core/docs/type-aliases/HardwareCameraInfoData.md b/packages/blinkid-core/docs/type-aliases/HardwareCameraInfoData.md new file mode 100644 index 0000000..367aa5d --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/HardwareCameraInfoData.md @@ -0,0 +1,29 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / HardwareCameraInfoData + +# Type Alias: HardwareCameraInfoData + +> **HardwareCameraInfoData** = `object` + +Represents the data for the `ping.hardware.camera.info` event. + +## Properties + +### availableCameras + +> **availableCameras**: `object`[] + +#### availableResolutions? + +> `optional` **availableResolutions**: `object`[] + +#### cameraFacing + +> **cameraFacing**: `"Front"` \| `"Back"` \| `"Unknown"` + +#### focus? + +> `optional` **focus**: `"Auto"` \| `"Fixed"` diff --git a/packages/blinkid-core/docs/type-aliases/LicenseStatusResponse.md b/packages/blinkid-core/docs/type-aliases/LicenseStatusResponse.md deleted file mode 100644 index 535e727..0000000 --- a/packages/blinkid-core/docs/type-aliases/LicenseStatusResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -[**@microblink/blinkid-core**](../README.md) - -*** - -[@microblink/blinkid-core](../README.md) / LicenseStatusResponse - -# Type Alias: LicenseStatusResponse - -> **LicenseStatusResponse** = `Record`\<`string`, `string`\> - -The license status response. diff --git a/packages/blinkid-core/docs/type-aliases/LogData.md b/packages/blinkid-core/docs/type-aliases/LogData.md new file mode 100644 index 0000000..54db495 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/LogData.md @@ -0,0 +1,23 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / LogData + +# Type Alias: LogData + +> **LogData** = `object` + +Represents the data for the `ping.log` event. + +## Properties + +### logLevel + +> **logLevel**: `"Info"` \| `"Warning"` + +*** + +### logMessage + +> **logMessage**: `string` diff --git a/packages/blinkid-core/docs/type-aliases/Ping.md b/packages/blinkid-core/docs/type-aliases/Ping.md new file mode 100644 index 0000000..95bcc2c --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/Ping.md @@ -0,0 +1,9 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / Ping + +# Type Alias: Ping + +> **Ping** = [`PingBrowserDeviceInfo`](PingBrowserDeviceInfo.md) \| [`PingError`](PingError.md) \| [`PingHardwareCameraInfo`](PingHardwareCameraInfo.md) \| [`PingLog`](PingLog.md) \| [`PingSdkCameraInputInfo`](PingSdkCameraInputInfo.md) \| [`PingSdkCameraPermission`](PingSdkCameraPermission.md) \| [`PingSdkInitStart`](PingSdkInitStart.md) \| [`PingSdkScanConditions`](PingSdkScanConditions.md) \| [`PingSdkUxEvent`](PingSdkUxEvent.md) \| [`PingSdkWrapperProduct`](PingSdkWrapperProduct.md) diff --git a/packages/blinkid-core/docs/type-aliases/PingBrowserDeviceInfo.md b/packages/blinkid-core/docs/type-aliases/PingBrowserDeviceInfo.md new file mode 100644 index 0000000..f594d6b --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingBrowserDeviceInfo.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingBrowserDeviceInfo + +# Type Alias: PingBrowserDeviceInfo + +> **PingBrowserDeviceInfo** = [`PingBase`](../interfaces/PingBase.md)\<`unknown`, `"ping.browser.device.info"`, `"1.0.0"`\> + +Represents the `ping.browser.device.info` event. diff --git a/packages/blinkid-core/docs/type-aliases/PingError.md b/packages/blinkid-core/docs/type-aliases/PingError.md new file mode 100644 index 0000000..2427469 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingError.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingError + +# Type Alias: PingError + +> **PingError** = [`PingBase`](../interfaces/PingBase.md)\<[`ErrorData`](ErrorData.md), `"ping.error"`, `"1.0.0"`\> + +Represents the `ping.error` event. diff --git a/packages/blinkid-core/docs/type-aliases/PingHardwareCameraInfo.md b/packages/blinkid-core/docs/type-aliases/PingHardwareCameraInfo.md new file mode 100644 index 0000000..9719368 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingHardwareCameraInfo.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingHardwareCameraInfo + +# Type Alias: PingHardwareCameraInfo + +> **PingHardwareCameraInfo** = [`PingBase`](../interfaces/PingBase.md)\<[`HardwareCameraInfoData`](HardwareCameraInfoData.md), `"ping.hardware.camera.info"`, `"1.0.1"`, `0`\> + +Represents the `ping.hardware.camera.info` event. diff --git a/packages/blinkid-core/docs/type-aliases/PingLog.md b/packages/blinkid-core/docs/type-aliases/PingLog.md new file mode 100644 index 0000000..46f0689 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingLog.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingLog + +# Type Alias: PingLog + +> **PingLog** = [`PingBase`](../interfaces/PingBase.md)\<[`LogData`](LogData.md), `"ping.log"`, `"1.0.0"`\> + +Represents the `ping.log` event. diff --git a/packages/blinkid-core/docs/type-aliases/PingSdkCameraInputInfo.md b/packages/blinkid-core/docs/type-aliases/PingSdkCameraInputInfo.md new file mode 100644 index 0000000..0416b16 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingSdkCameraInputInfo.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingSdkCameraInputInfo + +# Type Alias: PingSdkCameraInputInfo + +> **PingSdkCameraInputInfo** = [`PingBase`](../interfaces/PingBase.md)\<[`SdkCameraInputInfoData`](SdkCameraInputInfoData.md), `"ping.sdk.camera.input.info"`, `"1.0.1"`\> + +Represents the `ping.sdk.camera.input.info` event. diff --git a/packages/blinkid-core/docs/type-aliases/PingSdkCameraPermission.md b/packages/blinkid-core/docs/type-aliases/PingSdkCameraPermission.md new file mode 100644 index 0000000..8d2fd51 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingSdkCameraPermission.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingSdkCameraPermission + +# Type Alias: PingSdkCameraPermission + +> **PingSdkCameraPermission** = [`PingBase`](../interfaces/PingBase.md)\<[`SdkCameraPermissionData`](SdkCameraPermissionData.md), `"ping.sdk.camera.permission"`, `"1.0.0"`\> + +Represents the `ping.sdk.camera.permission` event. diff --git a/packages/blinkid-core/docs/type-aliases/PingSdkInitStart.md b/packages/blinkid-core/docs/type-aliases/PingSdkInitStart.md new file mode 100644 index 0000000..2b38c6e --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingSdkInitStart.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingSdkInitStart + +# Type Alias: PingSdkInitStart + +> **PingSdkInitStart** = [`PingBase`](../interfaces/PingBase.md)\<[`SdkInitStartData`](SdkInitStartData.md), `"ping.sdk.init.start"`, `"1.0.0"`\> + +Represents the `ping.sdk.init.start` event. diff --git a/packages/blinkid-core/docs/type-aliases/PingSdkScanConditions.md b/packages/blinkid-core/docs/type-aliases/PingSdkScanConditions.md new file mode 100644 index 0000000..f8295a7 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingSdkScanConditions.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingSdkScanConditions + +# Type Alias: PingSdkScanConditions + +> **PingSdkScanConditions** = [`PingBase`](../interfaces/PingBase.md)\<[`SdkScanConditionsData`](SdkScanConditionsData.md), `"ping.sdk.scan.conditions"`, `"1.0.0"`\> + +Represents the `ping.sdk.scan.conditions` event. diff --git a/packages/blinkid-core/docs/type-aliases/PingSdkUxEvent.md b/packages/blinkid-core/docs/type-aliases/PingSdkUxEvent.md new file mode 100644 index 0000000..fa5c5e0 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingSdkUxEvent.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingSdkUxEvent + +# Type Alias: PingSdkUxEvent + +> **PingSdkUxEvent** = [`PingBase`](../interfaces/PingBase.md)\<[`SdkUxEventData`](SdkUxEventData.md), `"ping.sdk.ux.event"`, `"1.0.0"`\> + +Represents the `ping.sdk.ux.event` event. diff --git a/packages/blinkid-core/docs/type-aliases/PingSdkWrapperProduct.md b/packages/blinkid-core/docs/type-aliases/PingSdkWrapperProduct.md new file mode 100644 index 0000000..473c3b2 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/PingSdkWrapperProduct.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / PingSdkWrapperProduct + +# Type Alias: PingSdkWrapperProduct + +> **PingSdkWrapperProduct** = [`PingBase`](../interfaces/PingBase.md)\<[`SdkWrapperProductData`](SdkWrapperProductData.md), `"ping.sdk.wrapper.product"`, `"1.0.0"`\> + +Represents the `ping.sdk.wrapper.product` event. diff --git a/packages/blinkid-core/docs/type-aliases/Region.md b/packages/blinkid-core/docs/type-aliases/Region.md index 1a24d00..87f157f 100644 --- a/packages/blinkid-core/docs/type-aliases/Region.md +++ b/packages/blinkid-core/docs/type-aliases/Region.md @@ -6,6 +6,6 @@ # Type Alias: Region -> **Region** = `"alabama"` \| `"alaska"` \| `"alberta"` \| `"arizona"` \| `"arkansas"` \| `"australian-capital-territory"` \| `"british-columbia"` \| `"california"` \| `"colorado"` \| `"connecticut"` \| `"delaware"` \| `"district-of-columbia"` \| `"florida"` \| `"georgia"` \| `"hawaii"` \| `"idaho"` \| `"illinois"` \| `"indiana"` \| `"iowa"` \| `"kansas"` \| `"kentucky"` \| `"louisiana"` \| `"maine"` \| `"manitoba"` \| `"maryland"` \| `"massachusetts"` \| `"michigan"` \| `"minnesota"` \| `"mississippi"` \| `"missouri"` \| `"montana"` \| `"nebraska"` \| `"nevada"` \| `"new-brunswick"` \| `"new-hampshire"` \| `"new-jersey"` \| `"new-mexico"` \| `"new-south-wales"` \| `"new-york"` \| `"northern-territory"` \| `"north-carolina"` \| `"north-dakota"` \| `"nova-scotia"` \| `"ohio"` \| `"oklahoma"` \| `"ontario"` \| `"oregon"` \| `"pennsylvania"` \| `"quebec"` \| `"queensland"` \| `"rhode-island"` \| `"saskatchewan"` \| `"south-australia"` \| `"south-carolina"` \| `"south-dakota"` \| `"tasmania"` \| `"tennessee"` \| `"texas"` \| `"utah"` \| `"vermont"` \| `"victoria"` \| `"virginia"` \| `"washington"` \| `"western-australia"` \| `"west-virginia"` \| `"wisconsin"` \| `"wyoming"` \| `"yukon"` \| `"ciudad-de-mexico"` \| `"jalisco"` \| `"newfoundland-and-labrador"` \| `"nuevo-leon"` \| `"baja-california"` \| `"chihuahua"` \| `"guanajuato"` \| `"guerrero"` \| `"mexico"` \| `"michoacan"` \| `"new-york-city"` \| `"tamaulipas"` \| `"veracruz"` \| `"chiapas"` \| `"coahuila"` \| `"durango"` \| `"guerrero-cocula"` \| `"guerrero-juchitan"` \| `"guerrero-tepecoacuilco"` \| `"guerrero-tlacoapa"` \| `"gujarat"` \| `"hidalgo"` \| `"karnataka"` \| `"kerala"` \| `"khyber-pakhtunkhwa"` \| `"madhya-pradesh"` \| `"maharashtra"` \| `"morelos"` \| `"nayarit"` \| `"oaxaca"` \| `"puebla"` \| `"punjab"` \| `"queretaro"` \| `"san-luis-potosi"` \| `"sinaloa"` \| `"sonora"` \| `"tabasco"` \| `"tamil-nadu"` \| `"yucatan"` \| `"zacatecas"` \| `"aguascalientes"` \| `"baja-california-sur"` \| `"campeche"` \| `"colima"` \| `"quintana-roo-benito-juarez"` \| `"quintana-roo"` \| `"quintana-roo-solidaridad"` \| `"tlaxcala"` \| `"quintana-roo-cozumel"` \| `"sao-paolo"` \| `"rio-de-janeiro"` \| `"rio-grande-do-sul"` \| `"northwest-territories"` \| `"nunavut"` \| `"prince-edward-island"` \| `"distrito-federal"` \| `"maranhao"` \| `"mato-grosso"` \| `"minas-gerais"` \| `"para"` \| `"parana"` \| `"pernambuco"` \| `"santa-catarina"` \| `"andhra-pradesh"` \| `"ceara"` \| `"goias"` \| `"guerrero-acapulco-de-juarez"` \| `"haryana"` \| `"sergipe"` \| `"alagoas"` \| `"bangsamoro"` +> **Region** = `"alabama"` \| `"alaska"` \| `"alberta"` \| `"arizona"` \| `"arkansas"` \| `"australian-capital-territory"` \| `"british-columbia"` \| `"california"` \| `"colorado"` \| `"connecticut"` \| `"delaware"` \| `"district-of-columbia"` \| `"florida"` \| `"georgia"` \| `"hawaii"` \| `"idaho"` \| `"illinois"` \| `"indiana"` \| `"iowa"` \| `"kansas"` \| `"kentucky"` \| `"louisiana"` \| `"maine"` \| `"manitoba"` \| `"maryland"` \| `"massachusetts"` \| `"michigan"` \| `"minnesota"` \| `"mississippi"` \| `"missouri"` \| `"montana"` \| `"nebraska"` \| `"nevada"` \| `"new-brunswick"` \| `"new-hampshire"` \| `"new-jersey"` \| `"new-mexico"` \| `"new-south-wales"` \| `"new-york"` \| `"northern-territory"` \| `"north-carolina"` \| `"north-dakota"` \| `"nova-scotia"` \| `"ohio"` \| `"oklahoma"` \| `"ontario"` \| `"oregon"` \| `"pennsylvania"` \| `"quebec"` \| `"queensland"` \| `"rhode-island"` \| `"saskatchewan"` \| `"south-australia"` \| `"south-carolina"` \| `"south-dakota"` \| `"tasmania"` \| `"tennessee"` \| `"texas"` \| `"utah"` \| `"vermont"` \| `"victoria"` \| `"virginia"` \| `"washington"` \| `"western-australia"` \| `"west-virginia"` \| `"wisconsin"` \| `"wyoming"` \| `"yukon"` \| `"ciudad-de-mexico"` \| `"jalisco"` \| `"newfoundland-and-labrador"` \| `"nuevo-leon"` \| `"baja-california"` \| `"chihuahua"` \| `"guanajuato"` \| `"guerrero"` \| `"mexico"` \| `"michoacan"` \| `"new-york-city"` \| `"tamaulipas"` \| `"veracruz"` \| `"chiapas"` \| `"coahuila"` \| `"durango"` \| `"guerrero-cocula"` \| `"guerrero-juchitan"` \| `"guerrero-tepecoacuilco"` \| `"guerrero-tlacoapa"` \| `"gujarat"` \| `"hidalgo"` \| `"karnataka"` \| `"kerala"` \| `"khyber-pakhtunkhwa"` \| `"madhya-pradesh"` \| `"maharashtra"` \| `"morelos"` \| `"nayarit"` \| `"oaxaca"` \| `"puebla"` \| `"punjab"` \| `"queretaro"` \| `"san-luis-potosi"` \| `"sinaloa"` \| `"sonora"` \| `"tabasco"` \| `"tamil-nadu"` \| `"yucatan"` \| `"zacatecas"` \| `"aguascalientes"` \| `"baja-california-sur"` \| `"campeche"` \| `"colima"` \| `"quintana-roo-benito-juarez"` \| `"quintana-roo"` \| `"quintana-roo-solidaridad"` \| `"tlaxcala"` \| `"quintana-roo-cozumel"` \| `"sao-paolo"` \| `"rio-de-janeiro"` \| `"rio-grande-do-sul"` \| `"northwest-territories"` \| `"nunavut"` \| `"prince-edward-island"` \| `"distrito-federal"` \| `"maranhao"` \| `"mato-grosso"` \| `"minas-gerais"` \| `"para"` \| `"parana"` \| `"pernambuco"` \| `"santa-catarina"` \| `"andhra-pradesh"` \| `"ceara"` \| `"goias"` \| `"guerrero-acapulco-de-juarez"` \| `"haryana"` \| `"sergipe"` \| `"alagoas"` \| `"bangsamoro"` \| `"telangana"` Represents regions diff --git a/packages/blinkid-core/docs/type-aliases/SchemaName.md b/packages/blinkid-core/docs/type-aliases/SchemaName.md new file mode 100644 index 0000000..7103aa8 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/SchemaName.md @@ -0,0 +1,9 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / SchemaName + +# Type Alias: SchemaName + +> **SchemaName** = [`Ping`](Ping.md)\[`"schemaName"`\] diff --git a/packages/blinkid-core/docs/type-aliases/SdkCameraInputInfoData.md b/packages/blinkid-core/docs/type-aliases/SdkCameraInputInfoData.md new file mode 100644 index 0000000..16ec019 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/SdkCameraInputInfoData.md @@ -0,0 +1,47 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / SdkCameraInputInfoData + +# Type Alias: SdkCameraInputInfoData + +> **SdkCameraInputInfoData** = `object` + +Represents the data for the `ping.sdk.camera.input.info` event. + +## Properties + +### cameraFacing + +> **cameraFacing**: `"Front"` \| `"Back"` \| `"Unknown"` + +*** + +### cameraFrameHeight + +> **cameraFrameHeight**: `number` + +*** + +### cameraFrameWidth + +> **cameraFrameWidth**: `number` + +*** + +### roiHeight + +> **roiHeight**: `number` + +*** + +### roiWidth + +> **roiWidth**: `number` + +*** + +### viewPortAspectRatio + +> **viewPortAspectRatio**: `number` diff --git a/packages/blinkid-core/docs/type-aliases/SdkCameraPermissionData.md b/packages/blinkid-core/docs/type-aliases/SdkCameraPermissionData.md new file mode 100644 index 0000000..88a8c03 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/SdkCameraPermissionData.md @@ -0,0 +1,23 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / SdkCameraPermissionData + +# Type Alias: SdkCameraPermissionData + +> **SdkCameraPermissionData** = `object` + +Represents the data for the `ping.sdk.camera.permission` event. + +## Properties + +### cameraPermissionGranted? + +> `optional` **cameraPermissionGranted**: `boolean` + +*** + +### eventType + +> **eventType**: `"CameraPermissionCheck"` \| `"CameraPermissionRequest"` \| `"CameraPermissionUserResponse"` diff --git a/packages/blinkid-core/docs/type-aliases/SdkInitStartData.md b/packages/blinkid-core/docs/type-aliases/SdkInitStartData.md new file mode 100644 index 0000000..8a941d2 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/SdkInitStartData.md @@ -0,0 +1,35 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / SdkInitStartData + +# Type Alias: SdkInitStartData + +> **SdkInitStartData** = `object` + +Represents the data for the `ping.sdk.init.start` event. + +## Properties + +### packageName + +> **packageName**: `string` + +*** + +### platform + +> **platform**: `"Emscripten"` + +*** + +### product + +> **product**: `"BlinkID"` + +*** + +### userId + +> **userId**: `string` diff --git a/packages/blinkid-core/docs/type-aliases/SdkScanConditionsData.md b/packages/blinkid-core/docs/type-aliases/SdkScanConditionsData.md new file mode 100644 index 0000000..59475e0 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/SdkScanConditionsData.md @@ -0,0 +1,29 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / SdkScanConditionsData + +# Type Alias: SdkScanConditionsData + +> **SdkScanConditionsData** = `object` + +Represents the data for the `ping.sdk.scan.conditions` event. + +## Properties + +### deviceOrientation? + +> `optional` **deviceOrientation**: `"Portrait"` \| `"LandscapeRight"` \| `"LandscapeLeft"` \| `"PortraitUpside"` + +*** + +### flashlightOn? + +> `optional` **flashlightOn**: `boolean` + +*** + +### updateType + +> **updateType**: `"DeviceOrientation"` \| `"FlashlightState"` diff --git a/packages/blinkid-core/docs/type-aliases/SdkUxEventData.md b/packages/blinkid-core/docs/type-aliases/SdkUxEventData.md new file mode 100644 index 0000000..4839c9b --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/SdkUxEventData.md @@ -0,0 +1,35 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / SdkUxEventData + +# Type Alias: SdkUxEventData + +> **SdkUxEventData** = `object` + +Represents the data for the `ping.sdk.ux.event` event. + +## Properties + +### alertType? + +> `optional` **alertType**: `"InvalidLicenseKey"` \| `"NetworkError"` \| `"DocumentClassNotAllowed"` \| `"StepTimeout"` + +*** + +### errorMessageType? + +> `optional` **errorMessageType**: `"MoveCloser"` \| `"MoveFarther"` \| `"KeepVisible"` \| `"FlipSide"` \| `"AlignDocument"` \| `"MoveFromEdge"` \| `"IncreaseLighting"` \| `"DecreaseLighting"` \| `"EliminateBlur"` \| `"EliminateGlare"` + +*** + +### eventType + +> **eventType**: `"CameraStarted"` \| `"CameraClosed"` \| `"OnboardingInfoDisplayed"` \| `"CloseButtonClicked"` \| `"HelpTooltipDisplayed"` \| `"HelpOpened"` \| `"HelpClosed"` \| `"AlertDisplayed"` \| `"ErrorMessage"` \| `"StepTimeout"` \| `"AppMovedToBackground"` + +*** + +### helpCloseType? + +> `optional` **helpCloseType**: `"ContentSkipped"` \| `"ContentFullyViewed"` diff --git a/packages/blinkid-core/docs/type-aliases/SdkWrapperProductData.md b/packages/blinkid-core/docs/type-aliases/SdkWrapperProductData.md new file mode 100644 index 0000000..18fa204 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/SdkWrapperProductData.md @@ -0,0 +1,23 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / SdkWrapperProductData + +# Type Alias: SdkWrapperProductData + +> **SdkWrapperProductData** = `object` + +Represents the data for the `ping.sdk.wrapper.product` event. + +## Properties + +### correlationId? + +> `optional` **correlationId**: `string` + +*** + +### wrapperProduct + +> **wrapperProduct**: `"CrossplatformFlutter"` \| `"CrossplatformReactNative"` \| `"IdentityVerification"` diff --git a/packages/blinkid-core/docs/type-aliases/ServerPermissionSubmitError.md b/packages/blinkid-core/docs/type-aliases/ServerPermissionSubmitError.md new file mode 100644 index 0000000..3fd4584 --- /dev/null +++ b/packages/blinkid-core/docs/type-aliases/ServerPermissionSubmitError.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-core**](../README.md) + +*** + +[@microblink/blinkid-core](../README.md) / ServerPermissionSubmitError + +# Type Alias: ServerPermissionSubmitError + +> **ServerPermissionSubmitError** = `Readonly`\<\{ `error`: [`ServerPermissionError`](ServerPermissionError.md); `lease`: `number`; `networkErrorDescription?`: `string`; \}\> + +The server permission submit error. diff --git a/packages/blinkid-core/docs/type-aliases/ServerPermissionSubmitResult.md b/packages/blinkid-core/docs/type-aliases/ServerPermissionSubmitResult.md deleted file mode 100644 index 4d77c26..0000000 --- a/packages/blinkid-core/docs/type-aliases/ServerPermissionSubmitResult.md +++ /dev/null @@ -1,11 +0,0 @@ -[**@microblink/blinkid-core**](../README.md) - -*** - -[@microblink/blinkid-core](../README.md) / ServerPermissionSubmitResult - -# Type Alias: ServerPermissionSubmitResult - -> **ServerPermissionSubmitResult** = `Readonly`\<\{ `error`: [`ServerPermissionError`](ServerPermissionError.md); `lease`: `number`; `networkErrorDescription?`: `string`; \}\> - -The server permission submit result. diff --git a/packages/blinkid-core/docs/type-aliases/VizResult.md b/packages/blinkid-core/docs/type-aliases/VizResult.md index ffaf217..bf9fe56 100644 --- a/packages/blinkid-core/docs/type-aliases/VizResult.md +++ b/packages/blinkid-core/docs/type-aliases/VizResult.md @@ -84,6 +84,14 @@ The date of birth of the document owner *** +### dateOfEntry? + +> `optional` **dateOfEntry**: [`DateResult`](DateResult.md)\<[`StringResult`](StringResult.md)\> + +The date of entry of the document owner + +*** + ### dateOfExpiry? > `optional` **dateOfExpiry**: [`DateResult`](DateResult.md)\<[`StringResult`](StringResult.md)\> @@ -212,6 +220,14 @@ The last name of the document owner *** +### localityCode? + +> `optional` **localityCode**: [`StringResult`](StringResult.md) + +The locality code of the document owner + +*** + ### localizedName? > `optional` **localizedName**: [`StringResult`](StringResult.md) @@ -220,6 +236,14 @@ The localized name of the document owner *** +### maidenName? + +> `optional` **maidenName**: [`StringResult`](StringResult.md) + +The maiden name of the document owner + +*** + ### manufacturingYear? > `optional` **manufacturingYear**: [`StringResult`](StringResult.md) @@ -244,6 +268,22 @@ The mother's name of the document owner *** +### municipalityCode? + +> `optional` **municipalityCode**: [`StringResult`](StringResult.md) + +The municipality code of the document owner + +*** + +### municipalityOfRegistration? + +> `optional` **municipalityOfRegistration**: [`StringResult`](StringResult.md) + +The municipality of registration of the document owner + +*** + ### nationalInsuranceNumber? > `optional` **nationalInsuranceNumber**: [`StringResult`](StringResult.md) @@ -276,6 +316,14 @@ The place of birth of the document owner *** +### pollingStationCode? + +> `optional` **pollingStationCode**: [`StringResult`](StringResult.md) + +The polling station code of the document owner + +*** + ### profession? > `optional` **profession**: [`StringResult`](StringResult.md) @@ -292,6 +340,14 @@ The race of the document owner *** +### registrationCenterCode? + +> `optional` **registrationCenterCode**: [`StringResult`](StringResult.md) + +The registration center code of the document owner + +*** + ### religion? > `optional` **religion**: [`StringResult`](StringResult.md) @@ -324,6 +380,14 @@ The residential status of the document owner *** +### sectionCode? + +> `optional` **sectionCode**: [`StringResult`](StringResult.md) + +The section code of the document owner + +*** + ### sex? > `optional` **sex**: [`StringResult`](StringResult.md) @@ -348,6 +412,22 @@ The sponsor of the document owner *** +### stateCode? + +> `optional` **stateCode**: [`StringResult`](StringResult.md) + +The state code of the document owner + +*** + +### stateName? + +> `optional` **stateName**: [`StringResult`](StringResult.md) + +The state of the document owner + +*** + ### vehicleOwner? > `optional` **vehicleOwner**: [`StringResult`](StringResult.md) diff --git a/packages/blinkid-core/docs/type-aliases/WorkerScanningSession.md b/packages/blinkid-core/docs/type-aliases/WorkerScanningSession.md index 3f5f5b0..d529741 100644 --- a/packages/blinkid-core/docs/type-aliases/WorkerScanningSession.md +++ b/packages/blinkid-core/docs/type-aliases/WorkerScanningSession.md @@ -24,6 +24,14 @@ Gets the settings. The settings. +### ping + +> **ping**: `BlinkIdWorker`\[`"reportPinglet"`\] + +### sendPinglets + +> **sendPinglets**: `BlinkIdWorker`\[`"sendPinglets"`\] + ### showDemoOverlay() > **showDemoOverlay**: () => `boolean` diff --git a/packages/blinkid-core/package.json b/packages/blinkid-core/package.json index 284fdad..33df133 100644 --- a/packages/blinkid-core/package.json +++ b/packages/blinkid-core/package.json @@ -1,7 +1,7 @@ { "name": "@microblink/blinkid-core", "description": "BlinkID Core SDK", - "version": "7.4.3", + "version": "7.6.0", "author": "Microblink", "scripts": { "build": "concurrently pnpm:build:js pnpm:build:types", @@ -67,14 +67,14 @@ "publint": "^0.3.12", "read-pkg": "^9.0.1", "rimraf": "^6.0.1", - "tsx": "^4.19.2", + "tsx": "^4.20.6", "typedoc": "^0.28.7", "typedoc-plugin-markdown": "^4.7.0", "typescript": "^5.8.3", "vite": "^6.2.1", "vitest": "^3.0.8", "write-package": "^7.1.0", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "keywords": [], "license": "ISC" diff --git a/packages/blinkid-core/src/deviceInfo/createDerivedDeviceInfo.test.ts b/packages/blinkid-core/src/deviceInfo/createDerivedDeviceInfo.test.ts index e85c3d3..7db11ad 100644 --- a/packages/blinkid-core/src/deviceInfo/createDerivedDeviceInfo.test.ts +++ b/packages/blinkid-core/src/deviceInfo/createDerivedDeviceInfo.test.ts @@ -2,19 +2,23 @@ * Copyright (c) 2025 Microblink Ltd. All rights reserved. */ -import { describe, expect, it } from "vitest"; +import { afterEach, describe, expect, it, vi } from "vitest"; import { createDerivedDeviceInfo } from "./createDerivedDeviceInfo"; import { DerivedDeviceInfo } from "./deviceInfo"; import { UADataValues } from "./navigator-types"; interface TestCase { description: string; - userAgentData: UADataValues; + userAgentData?: UADataValues; userAgent: string; expected: DerivedDeviceInfo; } describe("createDerivedDeviceInfo", () => { + afterEach(() => { + vi.unstubAllGlobals(); + }); + const testCases: TestCase[] = [ { description: "Chrome on macOS desktop", @@ -42,7 +46,7 @@ describe("createDerivedDeviceInfo", () => { "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", expected: { model: "Mac", - formFactor: ["Desktop"], + formFactors: ["Desktop"], platform: "macOS", browser: { brand: "Google Chrome", @@ -76,7 +80,7 @@ describe("createDerivedDeviceInfo", () => { "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Mobile Safari/537.36", expected: { model: "SM-G990B", - formFactor: ["Mobile"], + formFactors: ["Mobile"], platform: "Android", browser: { brand: "Google Chrome", @@ -110,7 +114,7 @@ describe("createDerivedDeviceInfo", () => { "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/28.0 Chrome/130.0.0.0 Mobile Safari/537.36", expected: { model: "SM-G990B", - formFactor: ["Mobile"], + formFactors: ["Mobile"], platform: "Android", browser: { brand: "Samsung Internet", @@ -118,12 +122,31 @@ describe("createDerivedDeviceInfo", () => { }, }, }, + { + description: "Chrome on iPhone", + userAgent: + "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/141.0.7390.96 Mobile/15E148 Safari/604.1", + expected: { + model: "iPhone", + formFactors: ["Mobile"], + platform: "iOS", + browser: { + brand: "Chrome", + version: "141.0.7390.96", + }, + }, + }, ]; it.each(testCases)( "should correctly derive device info for $description", ({ userAgentData, userAgent, expected }) => { - const derivedInfo = createDerivedDeviceInfo(userAgentData, userAgent); + vi.stubGlobal("navigator", { + userAgent, + // should be a better way to do this + maxTouchPoints: expected.formFactors.includes("Mobile") ? 1 : 0, + }); + const derivedInfo = createDerivedDeviceInfo(userAgent, userAgentData); expect(derivedInfo).toEqual(expected); }, ); diff --git a/packages/blinkid-core/src/deviceInfo/createDerivedDeviceInfo.ts b/packages/blinkid-core/src/deviceInfo/createDerivedDeviceInfo.ts index 402c90b..19fd99e 100644 --- a/packages/blinkid-core/src/deviceInfo/createDerivedDeviceInfo.ts +++ b/packages/blinkid-core/src/deviceInfo/createDerivedDeviceInfo.ts @@ -9,8 +9,8 @@ import { getOsFromUserAgent, OperatingSystem } from "./getOsFromUserAgent"; import type { FormFactor, UADataValues } from "./navigator-types"; export function createDerivedDeviceInfo( - userAgentData: UADataValues | undefined, userAgent: string, + userAgentData?: UADataValues, ): DerivedDeviceInfo { const appleDeviceModel = getAppleDeviceModel(); @@ -29,16 +29,16 @@ export function createDerivedDeviceInfo( } // Get form factor - let formFactor: FormFactor[] = ["Desktop"]; + let formFactors: FormFactor[] = ["Desktop"]; if (userAgentData?.formFactors?.length) { - formFactor = userAgentData.formFactors; + formFactors = userAgentData.formFactors; } else if (userAgentData?.mobile) { - formFactor = ["Mobile"]; + formFactors = ["Mobile"]; } else if (appleDeviceModel) { if (appleDeviceModel === "iPhone") { - formFactor = ["Mobile"]; + formFactors = ["Mobile"]; } else if (appleDeviceModel === "iPad") { - formFactor = ["Tablet"]; + formFactors = ["Tablet"]; } } @@ -83,7 +83,7 @@ export function createDerivedDeviceInfo( return { model, - formFactor, + formFactors: formFactors, platform, browser: { brand: browserBrand, diff --git a/packages/blinkid-core/src/deviceInfo/deviceInfo.ts b/packages/blinkid-core/src/deviceInfo/deviceInfo.ts index 91e2ffd..4a2e9aa 100644 --- a/packages/blinkid-core/src/deviceInfo/deviceInfo.ts +++ b/packages/blinkid-core/src/deviceInfo/deviceInfo.ts @@ -46,7 +46,7 @@ export type DeviceInfo = { export type DerivedDeviceInfo = { model: string; - formFactor: FormFactor[]; + formFactors: FormFactor[]; platform: OperatingSystem | ""; browser: { brand: string; @@ -138,8 +138,8 @@ export async function getDeviceInfo() { localStorageEnabled: isLocalStorageAvailable(), }, derivedDeviceInfo: createDerivedDeviceInfo( - userAgentData, navigator.userAgent, + userAgentData, ), }; diff --git a/packages/blinkid-core/src/deviceInfo/getAppleDeviceModel.test.ts b/packages/blinkid-core/src/deviceInfo/getAppleDeviceModel.test.ts index 3d920bc..54f42b3 100644 --- a/packages/blinkid-core/src/deviceInfo/getAppleDeviceModel.test.ts +++ b/packages/blinkid-core/src/deviceInfo/getAppleDeviceModel.test.ts @@ -39,6 +39,13 @@ describe("getAppleDeviceModel", () => { maxTouchPoints: 1, expected: "iPhone", }, + { + description: "iPhone with Chrome", + userAgent: + "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/141.0.7390.69 Mobile/15E148 Safari/604.1", + maxTouchPoints: 1, + expected: "iPhone", + }, { description: "Mac", userAgent: diff --git a/packages/blinkid-core/src/deviceInfo/getBrowserFromUserAgent.test.ts b/packages/blinkid-core/src/deviceInfo/getBrowserFromUserAgent.test.ts index cf57a5a..f2cc73d 100644 --- a/packages/blinkid-core/src/deviceInfo/getBrowserFromUserAgent.test.ts +++ b/packages/blinkid-core/src/deviceInfo/getBrowserFromUserAgent.test.ts @@ -25,6 +25,10 @@ describe("detectBrowser", () => { "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.80 Mobile/15E148 Safari/604.1", { name: "Chrome", version: "125.0.6422.80" }, ], + [ + "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/141.0.7390.69 Mobile/15E148 Safari/604.1", + { name: "Chrome", version: "141.0.7390.69" }, + ], // Firefox [ diff --git a/packages/blinkid-core/src/deviceInfo/getBrowserFromUserAgent.ts b/packages/blinkid-core/src/deviceInfo/getBrowserFromUserAgent.ts index 01dbd65..410f927 100644 --- a/packages/blinkid-core/src/deviceInfo/getBrowserFromUserAgent.ts +++ b/packages/blinkid-core/src/deviceInfo/getBrowserFromUserAgent.ts @@ -128,8 +128,17 @@ const browserRules: readonly BrowserRule[] = [ export function detectBrowser(): BrowserInfo { const ua = navigator.userAgent; + for (const rule of browserRules) { + const match = ua.match(rule.regex); + if (match) { + return { + name: rule.name, + version: rule.getVersion(match, ua), + }; + } + } + // iOS WebView is a special case that requires feature detection, not just UA parsing. - // We check for it first. // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore if (window.webkit?.messageHandlers) { @@ -140,15 +149,5 @@ export function detectBrowser(): BrowserInfo { }; } - for (const rule of browserRules) { - const match = ua.match(rule.regex); - if (match) { - return { - name: rule.name, - version: rule.getVersion(match, ua), - }; - } - } - return { name: "Unknown", version: "" }; } diff --git a/packages/blinkid-core/src/getCrossOriginWorkerURL.test.ts b/packages/blinkid-core/src/getCrossOriginWorkerURL.test.ts index f072e33..7d9186f 100644 --- a/packages/blinkid-core/src/getCrossOriginWorkerURL.test.ts +++ b/packages/blinkid-core/src/getCrossOriginWorkerURL.test.ts @@ -6,9 +6,9 @@ import { vi, describe, it, expect, beforeEach, afterEach, Mock } from "vitest"; import { getCrossOriginWorkerURL } from "./getCrossOriginWorkerURL"; const createObjectURLMock = vi.fn((blob: Blob) => `blob:${blob.size}`); -global.URL.createObjectURL = createObjectURLMock; +globalThis.URL.createObjectURL = createObjectURLMock; -global.fetch = vi.fn(); +globalThis.fetch = vi.fn(); describe("getCrossOriginWorkerURL", () => { beforeEach(() => { @@ -30,20 +30,23 @@ describe("getCrossOriginWorkerURL", () => { const workerUrl = "http://same-origin.com/worker.js"; const result = await getCrossOriginWorkerURL(workerUrl); expect(result).toBe(workerUrl); - expect(global.fetch).not.toHaveBeenCalled(); + expect(globalThis.fetch).not.toHaveBeenCalled(); }); it("should fetch and create a blob URL for same-origin requests when skipSameOrigin is false", async () => { const workerUrl = "http://same-origin.com/worker.js"; const workerCode = "console.log('hello')"; - (global.fetch as Mock).mockResolvedValueOnce( + (globalThis.fetch as Mock).mockResolvedValueOnce( new Response(workerCode, { status: 200 }), ); const result = await getCrossOriginWorkerURL(workerUrl, { skipSameOrigin: false, }); - expect(global.fetch).toHaveBeenCalledWith(workerUrl, expect.any(Object)); + expect(globalThis.fetch).toHaveBeenCalledWith( + workerUrl, + expect.any(Object), + ); expect(result).toMatch(/^blob:/); expect(createObjectURLMock).toHaveBeenCalled(); }); @@ -51,12 +54,15 @@ describe("getCrossOriginWorkerURL", () => { it("should fetch and create a blob URL for cross-origin requests", async () => { const workerUrl = "http://another-domain.com/worker.js"; const workerCode = "console.log('worker')"; - (global.fetch as Mock).mockResolvedValueOnce( + (globalThis.fetch as Mock).mockResolvedValueOnce( new Response(workerCode, { status: 200 }), ); const result = await getCrossOriginWorkerURL(workerUrl); - expect(global.fetch).toHaveBeenCalledWith(workerUrl, expect.any(Object)); + expect(globalThis.fetch).toHaveBeenCalledWith( + workerUrl, + expect.any(Object), + ); expect(result).toMatch(/^blob:/); expect(createObjectURLMock).toHaveBeenCalled(); }); @@ -64,12 +70,15 @@ describe("getCrossOriginWorkerURL", () => { it("should create a data URL when useBlob is false", async () => { const workerUrl = "http://another-domain.com/worker.js"; const workerCode = "console.log('worker')"; - (global.fetch as Mock).mockResolvedValueOnce( + (globalThis.fetch as Mock).mockResolvedValueOnce( new Response(workerCode, { status: 200 }), ); const result = await getCrossOriginWorkerURL(workerUrl, { useBlob: false }); - expect(global.fetch).toHaveBeenCalledWith(workerUrl, expect.any(Object)); + expect(globalThis.fetch).toHaveBeenCalledWith( + workerUrl, + expect.any(Object), + ); expect(result).toBe( `data:application/javascript,${encodeURIComponent(workerCode)}`, ); @@ -78,7 +87,9 @@ describe("getCrossOriginWorkerURL", () => { it("should reject if fetch fails", async () => { const workerUrl = "http://another-domain.com/worker.js"; - (global.fetch as Mock).mockRejectedValueOnce(new Error("Network error")); + (globalThis.fetch as Mock).mockRejectedValueOnce( + new Error("Network error"), + ); await expect(getCrossOriginWorkerURL(workerUrl)).rejects.toThrow( `Failed to fetch worker from ${workerUrl}`, @@ -87,7 +98,7 @@ describe("getCrossOriginWorkerURL", () => { it("should time out and reject if fetch takes too long", async () => { const workerUrl = "http://another-domain.com/worker.js"; - (global.fetch as Mock).mockImplementationOnce( + (globalThis.fetch as Mock).mockImplementationOnce( (_url: string, { signal }: RequestInit) => { return new Promise((_resolve, reject) => { signal?.addEventListener("abort", () => { diff --git a/packages/blinkid-core/src/index.ts b/packages/blinkid-core/src/index.ts index 4dc93e4..50ac04d 100644 --- a/packages/blinkid-core/src/index.ts +++ b/packages/blinkid-core/src/index.ts @@ -9,7 +9,7 @@ * and core scanning operations. */ -import { WorkerScanningSession } from "@microblink/blinkid-worker"; +import type { WorkerScanningSession } from "@microblink/blinkid-worker"; import { Remote } from "comlink"; export * from "./BlinkIdCore"; diff --git a/packages/blinkid-ux-manager/CHANGELOG.md b/packages/blinkid-ux-manager/CHANGELOG.md index 72114d7..34d2960 100644 --- a/packages/blinkid-ux-manager/CHANGELOG.md +++ b/packages/blinkid-ux-manager/CHANGELOG.md @@ -1,5 +1,35 @@ # @microblink/blinkid-ux-manager +## 7.6.0 + +### Minor Changes + +- Improved visual clarity and of feedback UI elements +- Added a new UI state `MOVE_LAST_PAGE` for Indian passports and applicable US passports, as well as the accompanying UI feedback message. +- Implemented ping v3 event handling +- Renamed `#handleUiStateChanges` method to `#updateUiStateFromProcessResult` +- Added missing `showHelpTooltipTimeout` option to the `FeedbackUiOptions` +- Added haptic feedback on supported devices +- Various bug fixes and cleanups + +### Patch Changes + +- Added translation files for 33 new languages (see [README.md](README.md#provided-translations)) +- Updated dependencies + - @microblink/camera-manager@7.2.6 + - @microblink/blinkid-core@7.6.0 + +## 7.5.0 + +### Minor Changes + +- Version skip + +### Patch Changes + +- Updated dependencies + - @microblink/blinkid-core@7.5.0 + ## 7.4.3 ### Patch Changes diff --git a/packages/blinkid-ux-manager/README.md b/packages/blinkid-ux-manager/README.md index edb21ae..e874241 100644 --- a/packages/blinkid-ux-manager/README.md +++ b/packages/blinkid-ux-manager/README.md @@ -2,10 +2,20 @@ This package provides user experience management and feedback UI for the BlinkID browser SDK. It parses results from [`@microblink/blinkid-core`](https://www.npmjs.com/package/@microblink/blinkid-core) and guides the user through the scanning process, controlling [`@microblink/camera-manager`](https://www.npmjs.com/package/@microblink/camera-manager) as needed. +## Features + +- **Smart UI State Management:** Provides both headless and UI components for user feedback during scanning +- **Camera Integration:** Integrates with BlinkID Core and Camera Manager +- **Haptic Feedback:** Built-in haptic feedback support for enhanced user experience on mobile devices +- **Document Filtering:** Advanced document class filtering capabilities +- **Timeout Management:** Configurable scanning timeouts with automatic state management +- **Localization Support:** Multi-language support with customizable strings + ## Overview - Provides both headless and UI components for user feedback during scanning. - Integrates with BlinkID Core and Camera Manager. +- Includes haptic feedback system for mobile devices. - Used by [`@microblink/blinkid`](https://www.npmjs.com/package/@microblink/blinkid) and can be used directly for custom UI integrations. ## Installation @@ -20,6 +30,52 @@ yarn add @microblink/blinkid-ux-manager pnpm add @microblink/blinkid-ux-manager ``` +## Haptic Feedback + +The UX Manager includes a comprehensive haptic feedback system that provides tactile responses during the document scanning process. **This feature is primarily designed for Android devices using Chrome browser**, where it works reliably to enhance the scanning experience. + +### Haptic Feedback Types + +| Event | Duration | Type | Description | +| ------------------ | -------- | ----- | --------------------------------------------- | +| First Side Success | 100ms | Short | When the first side of an ID card is captured | +| Final Success | 300ms | Long | When document scanning is completed | +| Error States | 100ms | Short | Quality issues (blur, glare, positioning) | +| Error Dialogs | 300ms | Long | Timeout or critical errors | +| Flashlight Toggle | 100ms | Short | When camera flashlight is activated | +| Warning States | 100ms | Short | During sensing phases (with 1s cooldown) | + +### Haptic Feedback Usage + +```javascript +import { + BlinkIdUxManager, + HapticFeedbackManager, +} from "@microblink/blinkid-ux-manager"; + +// Create UX Manager (haptic feedback enabled by default) +const uxManager = new BlinkIdUxManager(cameraManager, scanningSession); + +// Check if haptic feedback is supported +if (uxManager.isHapticFeedbackSupported()) { + console.log("Device supports haptic feedback"); +} + +// Enable/disable haptic feedback +uxManager.setHapticFeedbackEnabled(true); // Enable +uxManager.setHapticFeedbackEnabled(false); // Disable + +// Access haptic manager directly for manual control +const hapticManager = uxManager.getHapticFeedbackManager(); +hapticManager.triggerShort(); // 100ms vibration for short feedback +hapticManager.triggerLong(); // 300ms vibration for long feedback +hapticManager.stop(); // Stop all vibration +``` + +### Browser Compatibility + +**⚠️ Important:** Haptic feedback uses the [Web Vibration API](https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API), which has **limited browser support**: + ## Usage You can use `@microblink/blinkid-ux-manager` directly in your project for advanced or custom integrations. For most use cases, use [`@microblink/blinkid`](https://www.npmjs.com/package/@microblink/blinkid) for a simpler setup. @@ -42,4 +98,90 @@ To build the package locally: pnpm build ``` +3. Run tests: + + ```sh + pnpm test + ``` + The output files will be available in the `dist/` and `types/` directories. + +### Internationalization + +You can customize UI strings when creating the feedback UI: + +``` +createBlinkIdFeedbackUi(uxManager, cameraUi, { + localizationStrings: { + scan_the_barcode: "Please scan the barcode" + } +}); +``` + +#### Provided Translations + +
+Click to see all available translation files + +- [ak.ts](src/ui/locales/ak.ts) +- [am.ts](src/ui/locales/am.ts) +- [ar.ts](src/ui/locales/ar.ts) +- [bn.ts](src/ui/locales/bn.ts) +- [cs.ts](src/ui/locales/cs.ts) +- [da.ts](src/ui/locales/da.ts) +- [de.ts](src/ui/locales/de.ts) +- [el.ts](src/ui/locales/el.ts) +- [en.ts](src/ui/locales/en.ts) +- [en_GB.ts](src/ui/locales/en_GB.ts) +- [es.ts](src/ui/locales/es.ts) +- [es_MX.ts](src/ui/locales/es_MX.ts) +- [fa-latn.ts](src/ui/locales/fa-latn.ts) +- [fi.ts](src/ui/locales/fi.ts) +- [fil.ts](src/ui/locales/fil.ts) +- [fr.ts](src/ui/locales/fr.ts) +- [fr_CA.ts](src/ui/locales/fr_CA.ts) +- [ha.ts](src/ui/locales/ha.ts) +- [he.ts](src/ui/locales/he.ts) +- [hi.ts](src/ui/locales/hi.ts) +- [hr.ts](src/ui/locales/hr.ts) +- [hu.ts](src/ui/locales/hu.ts) +- [id.ts](src/ui/locales/id.ts) +- [is.ts](src/ui/locales/is.ts) +- [it.ts](src/ui/locales/it.ts) +- [ja.ts](src/ui/locales/ja.ts) +- [ka_GE.ts](src/ui/locales/ka_GE.ts) +- [kk.ts](src/ui/locales/kk.ts) +- [km_KH.ts](src/ui/locales/km_KH.ts) +- [ko.ts](src/ui/locales/ko.ts) +- [lv.ts](src/ui/locales/lv.ts) +- [ms.ts](src/ui/locales/ms.ts) +- [ne.ts](src/ui/locales/ne.ts) +- [nl.ts](src/ui/locales/nl.ts) +- [no.ts](src/ui/locales/no.ts) +- [pl.ts](src/ui/locales/pl.ts) +- [ps_AF.ts](src/ui/locales/ps_AF.ts) +- [pt.ts](src/ui/locales/pt.ts) +- [pt_BR.ts](src/ui/locales/pt_BR.ts) +- [ro.ts](src/ui/locales/ro.ts) +- [ru.ts](src/ui/locales/ru.ts) +- [si.ts](src/ui/locales/si.ts) +- [sk.ts](src/ui/locales/sk.ts) +- [sl.ts](src/ui/locales/sl.ts) +- [sr.ts](src/ui/locales/sr.ts) +- [sv.ts](src/ui/locales/sv.ts) +- [sw.ts](src/ui/locales/sw.ts) +- [th.ts](src/ui/locales/th.ts) +- [tr.ts](src/ui/locales/tr.ts) +- [uk.ts](src/ui/locales/uk.ts) +- [ur.ts](src/ui/locales/ur.ts) +- [uz.ts](src/ui/locales/uz.ts) +- [vi.ts](src/ui/locales/vi.ts) +- [yo.ts](src/ui/locales/yo.ts) +- [zh_CN.ts](src/ui/locales/zh_CN.ts) +- [zh_TW.ts](src/ui/locales/zh_TW.ts) + +
+ +--- + +You can import any of these files directly or use them as a starting point for your own localization. diff --git a/packages/blinkid-ux-manager/docs/README.md b/packages/blinkid-ux-manager/docs/README.md index ae22534..5a46955 100644 --- a/packages/blinkid-ux-manager/docs/README.md +++ b/packages/blinkid-ux-manager/docs/README.md @@ -8,6 +8,7 @@ - [BlinkIdUxManager](classes/BlinkIdUxManager.md) - [FeedbackStabilizer](classes/FeedbackStabilizer.md) +- [HapticFeedbackManager](classes/HapticFeedbackManager.md) ## Type Aliases @@ -18,6 +19,7 @@ - [BlinkIdUiStateMap](type-aliases/BlinkIdUiStateMap.md) - [DocumentClassFilter](type-aliases/DocumentClassFilter.md) - [FeedbackUiOptions](type-aliases/FeedbackUiOptions.md) +- [HapticFeedbackType](type-aliases/HapticFeedbackType.md) - [LocaleRecord](type-aliases/LocaleRecord.md) - [LocalizationStrings](type-aliases/LocalizationStrings.md) - [PartialProcessResult](type-aliases/PartialProcessResult.md) @@ -28,7 +30,9 @@ ## Variables - [blinkIdUiStateMap](variables/blinkIdUiStateMap.md) -- [firstSideCapturedStates](variables/firstSideCapturedStates.md) +- [errorUiStateKeys](variables/errorUiStateKeys.md) +- [firstSideCapturedUiStateKeys](variables/firstSideCapturedUiStateKeys.md) +- [HAPTIC\_FEEDBACK\_CONFIGS](variables/HAPTIC_FEEDBACK_CONFIGS.md) ## Functions diff --git a/packages/blinkid-ux-manager/docs/classes/BlinkIdUxManager.md b/packages/blinkid-ux-manager/docs/classes/BlinkIdUxManager.md index 0b7765e..3dc5c08 100644 --- a/packages/blinkid-ux-manager/docs/classes/BlinkIdUxManager.md +++ b/packages/blinkid-ux-manager/docs/classes/BlinkIdUxManager.md @@ -333,6 +333,16 @@ cleanup(); *** +### cleanupAllObservers() + +> **cleanupAllObservers**(): `void` + +#### Returns + +`void` + +*** + ### clearScanTimeout() > **clearScanTimeout**(): `void` @@ -345,6 +355,30 @@ Clears the scanning session timeout. *** +### clearUserCallbacks() + +> **clearUserCallbacks**(): `void` + +#### Returns + +`void` + +*** + +### getHapticFeedbackManager() + +> **getHapticFeedbackManager**(): [`HapticFeedbackManager`](HapticFeedbackManager.md) + +Gets the haptic feedback manager instance. + +#### Returns + +[`HapticFeedbackManager`](HapticFeedbackManager.md) + +The haptic feedback manager + +*** + ### getHelpTooltipHideDelay() > **getHelpTooltipHideDelay**(): `null` \| `number` @@ -431,6 +465,34 @@ Returns the timeout duration in ms. Null if timeout won't be triggered ever. *** +### isHapticFeedbackEnabled() + +> **isHapticFeedbackEnabled**(): `boolean` + +Check if haptic feedback is currently enabled. + +#### Returns + +`boolean` + +true if haptic feedback is enabled + +*** + +### isHapticFeedbackSupported() + +> **isHapticFeedbackSupported**(): `boolean` + +Check if haptic feedback is supported by the current browser/device. + +#### Returns + +`boolean` + +true if haptic feedback is supported + +*** + ### reset() > **reset**(): `void` @@ -477,6 +539,26 @@ Safely deletes the scanning session. *** +### setHapticFeedbackEnabled() + +> **setHapticFeedbackEnabled**(`enabled`): `void` + +Enable or disable haptic feedback. + +#### Parameters + +##### enabled + +`boolean` + +Whether haptic feedback should be enabled + +#### Returns + +`void` + +*** + ### setHelpTooltipHideDelay() > **setHelpTooltipHideDelay**(`duration`): `void` diff --git a/packages/blinkid-ux-manager/docs/classes/HapticFeedbackManager.md b/packages/blinkid-ux-manager/docs/classes/HapticFeedbackManager.md new file mode 100644 index 0000000..8cf794e --- /dev/null +++ b/packages/blinkid-ux-manager/docs/classes/HapticFeedbackManager.md @@ -0,0 +1,126 @@ +[**@microblink/blinkid-ux-manager**](../README.md) + +*** + +[@microblink/blinkid-ux-manager](../README.md) / HapticFeedbackManager + +# Class: HapticFeedbackManager + +Manages haptic feedback for the BlinkID SDK. +Provides cross-platform haptic feedback using the Web Vibration API. + +## Constructors + +### Constructor + +> **new HapticFeedbackManager**(): `HapticFeedbackManager` + +#### Returns + +`HapticFeedbackManager` + +## Methods + +### isEnabled() + +> **isEnabled**(): `boolean` + +Check if haptic feedback is currently enabled. + +#### Returns + +`boolean` + +true if haptic feedback is enabled + +*** + +### isSupported() + +> **isSupported**(): `boolean` + +Check if haptic feedback is supported by the current browser/device. + +#### Returns + +`boolean` + +true if haptic feedback is supported + +*** + +### setEnabled() + +> **setEnabled**(`enabled`): `void` + +Enable or disable haptic feedback. + +#### Parameters + +##### enabled + +`boolean` + +Whether haptic feedback should be enabled + +#### Returns + +`void` + +*** + +### stop() + +> **stop**(): `void` + +Stop any ongoing haptic feedback. + +#### Returns + +`void` + +*** + +### triggerFeedback() + +> **triggerFeedback**(`type`): `void` + +Trigger haptic feedback with the specified type. + +#### Parameters + +##### type + +[`HapticFeedbackType`](../type-aliases/HapticFeedbackType.md) + +The type of haptic feedback to trigger + +#### Returns + +`void` + +*** + +### triggerLong() + +> **triggerLong**(): `void` + +Trigger long haptic feedback. +Uses long feedback pattern. + +#### Returns + +`void` + +*** + +### triggerShort() + +> **triggerShort**(): `void` + +Trigger short haptic feedback. +Uses short feedback pattern. + +#### Returns + +`void` diff --git a/packages/blinkid-ux-manager/docs/functions/createBlinkIdFeedbackUi.md b/packages/blinkid-ux-manager/docs/functions/createBlinkIdFeedbackUi.md index c02702b..8d6bbf6 100644 --- a/packages/blinkid-ux-manager/docs/functions/createBlinkIdFeedbackUi.md +++ b/packages/blinkid-ux-manager/docs/functions/createBlinkIdFeedbackUi.md @@ -6,7 +6,7 @@ # Function: createBlinkIdFeedbackUi() -> **createBlinkIdFeedbackUi**(`blinkIdUxManager`, `cameraManagerComponent`, `options`): () => `void` +> **createBlinkIdFeedbackUi**(`blinkIdUxManager`, `cameraManagerComponent`, `feedbackUiOptions`): () => `void` Creates the BlinkID feedback UI. @@ -24,11 +24,9 @@ The BlinkID Ux Manager. The Camera Manager Component. -### options +### feedbackUiOptions -[`FeedbackUiOptions`](../type-aliases/FeedbackUiOptions.md) = `{}` - -The options for the createBlinkIdFeedbackUi function. +`Partial`\<[`FeedbackUiOptions`](../type-aliases/FeedbackUiOptions.md)\> ## Returns diff --git a/packages/blinkid-ux-manager/docs/type-aliases/BlinkIdProcessingError.md b/packages/blinkid-ux-manager/docs/type-aliases/BlinkIdProcessingError.md index 17355f7..f254d65 100644 --- a/packages/blinkid-ux-manager/docs/type-aliases/BlinkIdProcessingError.md +++ b/packages/blinkid-ux-manager/docs/type-aliases/BlinkIdProcessingError.md @@ -6,7 +6,7 @@ # Type Alias: BlinkIdProcessingError -> **BlinkIdProcessingError** = `"timeout"` \| `"unknown"` +> **BlinkIdProcessingError** = `"timeout"` \| `"unsupported_document"` \| `"unknown"` BlinkID processing error. These errors are usually unrecoverable and require the user to retry the scanning process. diff --git a/packages/blinkid-ux-manager/docs/type-aliases/BlinkIdUiStateKey.md b/packages/blinkid-ux-manager/docs/type-aliases/BlinkIdUiStateKey.md index 46ffc98..d59eb92 100644 --- a/packages/blinkid-ux-manager/docs/type-aliases/BlinkIdUiStateKey.md +++ b/packages/blinkid-ux-manager/docs/type-aliases/BlinkIdUiStateKey.md @@ -6,6 +6,6 @@ # Type Alias: BlinkIdUiStateKey -> **BlinkIdUiStateKey** = `"FLIP_CARD"` \| `"DOCUMENT_CAPTURED"` \| `"SENSING_FRONT"` \| `"SENSING_BACK"` \| `"SENSING_DATA_PAGE"` \| `"SENSING_TOP_PAGE"` \| `"SENSING_LEFT_PAGE"` \| `"SENSING_RIGHT_PAGE"` \| `"MOVE_TOP"` \| `"MOVE_LEFT"` \| `"MOVE_RIGHT"` \| `"DOCUMENT_FRAMING_CAMERA_TOO_FAR"` \| `"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE"` \| `"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP"` \| `"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE"` \| `"BLUR_DETECTED"` \| `"GLARE_DETECTED"` \| `"TOO_DARK"` \| `"TOO_BRIGHT"` \| `"OCCLUDED"` \| `"FACE_PHOTO_OCCLUDED"` \| `"UNSUPPORTED_DOCUMENT"` \| `"SCAN_BARCODE"` \| `"WRONG_TOP_PAGE"` \| `"WRONG_LEFT_PAGE"` \| `"WRONG_RIGHT_PAGE"` \| `"WRONG_SIDE"` +> **BlinkIdUiStateKey** = `"FLIP_CARD"` \| `"DOCUMENT_CAPTURED"` \| `"SENSING_FRONT"` \| `"SENSING_BACK"` \| `"SENSING_DATA_PAGE"` \| `"SENSING_TOP_PAGE"` \| `"SENSING_LEFT_PAGE"` \| `"SENSING_RIGHT_PAGE"` \| `"SENSING_LAST_PAGE"` \| `"MOVE_TOP"` \| `"MOVE_LEFT"` \| `"MOVE_RIGHT"` \| `"MOVE_LAST_PAGE"` \| `"DOCUMENT_FRAMING_CAMERA_TOO_FAR"` \| `"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE"` \| `"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP"` \| `"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE"` \| `"BLUR_DETECTED"` \| `"GLARE_DETECTED"` \| `"TOO_DARK"` \| `"TOO_BRIGHT"` \| `"OCCLUDED"` \| `"FACE_PHOTO_OCCLUDED"` \| `"UNSUPPORTED_DOCUMENT"` \| `"SCAN_BARCODE"` \| `"WRONG_TOP_PAGE"` \| `"WRONG_LEFT_PAGE"` \| `"WRONG_RIGHT_PAGE"` \| `"WRONG_LAST_PAGE"` \| `"WRONG_SIDE"` The key of the UI state. diff --git a/packages/blinkid-ux-manager/docs/type-aliases/FeedbackUiOptions.md b/packages/blinkid-ux-manager/docs/type-aliases/FeedbackUiOptions.md index c15ec83..fdaefe2 100644 --- a/packages/blinkid-ux-manager/docs/type-aliases/FeedbackUiOptions.md +++ b/packages/blinkid-ux-manager/docs/type-aliases/FeedbackUiOptions.md @@ -63,6 +63,20 @@ true *** +### showHelpTooltipTimeout? + +> `optional` **showHelpTooltipTimeout**: `number` + +The timeout for the help tooltip. + +#### Default Value + +```ts +3000 +``` + +*** + ### showOnboardingGuide? > `optional` **showOnboardingGuide**: `boolean` diff --git a/packages/blinkid-ux-manager/docs/type-aliases/HapticFeedbackType.md b/packages/blinkid-ux-manager/docs/type-aliases/HapticFeedbackType.md new file mode 100644 index 0000000..1426bce --- /dev/null +++ b/packages/blinkid-ux-manager/docs/type-aliases/HapticFeedbackType.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-ux-manager**](../README.md) + +*** + +[@microblink/blinkid-ux-manager](../README.md) / HapticFeedbackType + +# Type Alias: HapticFeedbackType + +> **HapticFeedbackType** = `"short"` \| `"long"` + +Haptic feedback types supported by the system. diff --git a/packages/blinkid-ux-manager/docs/variables/HAPTIC_FEEDBACK_CONFIGS.md b/packages/blinkid-ux-manager/docs/variables/HAPTIC_FEEDBACK_CONFIGS.md new file mode 100644 index 0000000..1fcf511 --- /dev/null +++ b/packages/blinkid-ux-manager/docs/variables/HAPTIC_FEEDBACK_CONFIGS.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-ux-manager**](../README.md) + +*** + +[@microblink/blinkid-ux-manager](../README.md) / HAPTIC\_FEEDBACK\_CONFIGS + +# Variable: HAPTIC\_FEEDBACK\_CONFIGS + +> `const` **HAPTIC\_FEEDBACK\_CONFIGS**: `Record`\<[`HapticFeedbackType`](../type-aliases/HapticFeedbackType.md), `number`\> + +Mapping of haptic feedback types to their durations. diff --git a/packages/blinkid-ux-manager/docs/variables/errorUiStateKeys.md b/packages/blinkid-ux-manager/docs/variables/errorUiStateKeys.md new file mode 100644 index 0000000..1a3b797 --- /dev/null +++ b/packages/blinkid-ux-manager/docs/variables/errorUiStateKeys.md @@ -0,0 +1,11 @@ +[**@microblink/blinkid-ux-manager**](../README.md) + +*** + +[@microblink/blinkid-ux-manager](../README.md) / errorUiStateKeys + +# Variable: errorUiStateKeys + +> `const` **errorUiStateKeys**: [`BlinkIdUiStateKey`](../type-aliases/BlinkIdUiStateKey.md)[] + +The error UI state keys. diff --git a/packages/blinkid-ux-manager/docs/variables/firstSideCapturedStates.md b/packages/blinkid-ux-manager/docs/variables/firstSideCapturedUiStateKeys.md similarity index 53% rename from packages/blinkid-ux-manager/docs/variables/firstSideCapturedStates.md rename to packages/blinkid-ux-manager/docs/variables/firstSideCapturedUiStateKeys.md index 5f076b7..44ee0c3 100644 --- a/packages/blinkid-ux-manager/docs/variables/firstSideCapturedStates.md +++ b/packages/blinkid-ux-manager/docs/variables/firstSideCapturedUiStateKeys.md @@ -2,10 +2,10 @@ *** -[@microblink/blinkid-ux-manager](../README.md) / firstSideCapturedStates +[@microblink/blinkid-ux-manager](../README.md) / firstSideCapturedUiStateKeys -# Variable: firstSideCapturedStates +# Variable: firstSideCapturedUiStateKeys -> `const` **firstSideCapturedStates**: [`BlinkIdUiStateKey`](../type-aliases/BlinkIdUiStateKey.md)[] +> `const` **firstSideCapturedUiStateKeys**: [`BlinkIdUiStateKey`](../type-aliases/BlinkIdUiStateKey.md)[] The states that are captured when the first side is captured. diff --git a/packages/blinkid-ux-manager/package.json b/packages/blinkid-ux-manager/package.json index db81b14..8ffacee 100644 --- a/packages/blinkid-ux-manager/package.json +++ b/packages/blinkid-ux-manager/package.json @@ -1,7 +1,7 @@ { "name": "@microblink/blinkid-ux-manager", "description": "BlinkID UX Manager provides user feedback based on the blinkid process results.", - "version": "7.4.3", + "version": "7.6.0", "author": "Microblink", "scripts": { "build": "concurrently pnpm:build:js pnpm:build:types", @@ -66,16 +66,17 @@ "@typescript-eslint/eslint-plugin": "^6.9.0", "@unocss/eslint-config": "^65.5.0", "@unocss/preset-uno": "^65.5.0", + "@vitest/browser": "^3.0.8", "concurrently": "^9.1.2", "eslint": "^8.57.0", "eslint-config-prettier": "10.0.1", "eslint-define-config": "^1.24.1", "eslint-plugin-solid": "0.14.5", - "prettier-plugin-classnames": "^0.7.6", + "prettier-plugin-classnames": "^0.8.4", "publint": "^0.3.12", "rimraf": "^6.0.1", "sass": "^1.85.0", - "tsx": "^4.19.2", + "tsx": "^4.20.6", "typedoc": "^0.28.7", "typedoc-plugin-markdown": "^4.7.0", "typescript": "^5.8.3", @@ -87,11 +88,11 @@ "vite-plugin-solid-svg": "0.8.1", "vitest": "^3.0.8", "write-package": "^7.1.0", - "zx": "^8.5.2" + "zx": "^8.8.5" }, "peerDependencies": { - "@ark-ui/solid": "^5.5.0", - "solid-js": "^1.9.5", + "@ark-ui/solid": "^5.26.2", + "solid-js": "^1.9.9", "solid-zustand": "^1.8.1" }, "keywords": [], diff --git a/packages/blinkid-ux-manager/src/core/BlinkIdProcessingError.ts b/packages/blinkid-ux-manager/src/core/BlinkIdProcessingError.ts index ce5cf88..4f56913 100644 --- a/packages/blinkid-ux-manager/src/core/BlinkIdProcessingError.ts +++ b/packages/blinkid-ux-manager/src/core/BlinkIdProcessingError.ts @@ -9,6 +9,7 @@ export type BlinkIdProcessingError = // processing | "timeout" + | "unsupported_document" // other | "unknown"; diff --git a/packages/blinkid-ux-manager/src/core/BlinkIdUxManager.test.ts b/packages/blinkid-ux-manager/src/core/BlinkIdUxManager.test.ts index 62770f9..816e796 100644 --- a/packages/blinkid-ux-manager/src/core/BlinkIdUxManager.test.ts +++ b/packages/blinkid-ux-manager/src/core/BlinkIdUxManager.test.ts @@ -63,12 +63,16 @@ describe("BlinkIdUxManager - Document Class Filter", () => { showDemoOverlay: ReturnType; showProductionOverlay: ReturnType; getResult: ReturnType; + ping: ReturnType; + sendPinglets: ReturnType; } = { process: vi.fn(), getSettings: vi.fn().mockResolvedValue({ scanningSettings: {} }), showDemoOverlay: vi.fn().mockResolvedValue(false), showProductionOverlay: vi.fn().mockResolvedValue(false), getResult: vi.fn(), + ping: vi.fn(), + sendPinglets: vi.fn(), }; let manager: BlinkIdUxManager; @@ -503,6 +507,8 @@ describe("BlinkIdUxManager - Reset Behavior", () => { showProductionOverlay: ReturnType; getResult: ReturnType; reset: ReturnType; + ping: ReturnType; + sendPinglets: ReturnType; }; interface TestCameraState { @@ -550,6 +556,8 @@ describe("BlinkIdUxManager - Reset Behavior", () => { showProductionOverlay: vi.fn().mockResolvedValue(false), getResult: vi.fn(), reset: vi.fn().mockResolvedValue(undefined), + ping: vi.fn(), + sendPinglets: vi.fn(), }; manager = new BlinkIdUxManager( @@ -676,6 +684,8 @@ describe("BlinkIdUxManager - Timeout Behavior", () => { showDemoOverlay: vi.fn().mockResolvedValue(false), showProductionOverlay: vi.fn().mockResolvedValue(false), getResult: vi.fn(), + ping: vi.fn(), + sendPinglets: vi.fn(), }; beforeEach(() => { @@ -901,6 +911,8 @@ describe("BlinkIdUxManager - Overlay Methods", () => { getSettings: ReturnType; showDemoOverlay: ReturnType; showProductionOverlay: ReturnType; + ping: ReturnType; + sendPinglets: ReturnType; }; beforeEach(() => { @@ -917,6 +929,8 @@ describe("BlinkIdUxManager - Overlay Methods", () => { getSettings: vi.fn().mockResolvedValue({ scanningSettings: {} }), showDemoOverlay: vi.fn().mockResolvedValue(false), showProductionOverlay: vi.fn().mockResolvedValue(false), + ping: vi.fn(), + sendPinglets: vi.fn(), }; manager = new BlinkIdUxManager( @@ -977,6 +991,8 @@ describe("BlinkIdUxManager - Session Management", () => { getResult: ReturnType; delete: ReturnType; isDeleted: ReturnType; + ping: ReturnType; + sendPinglets: ReturnType; }; beforeEach(() => { @@ -995,6 +1011,8 @@ describe("BlinkIdUxManager - Session Management", () => { getResult: vi.fn(), delete: vi.fn().mockResolvedValue(undefined), isDeleted: vi.fn().mockResolvedValue(false), + ping: vi.fn(), + sendPinglets: vi.fn(), }; manager = new BlinkIdUxManager( @@ -1066,6 +1084,8 @@ describe("BlinkIdUxManager - Document Capture Flow Integration", () => { getResult: ReturnType; delete: ReturnType; isDeleted: ReturnType; + ping: ReturnType; + sendPinglets: ReturnType; }; let frameCaptureCallback: FrameCaptureCallback; @@ -1090,6 +1110,8 @@ describe("BlinkIdUxManager - Document Capture Flow Integration", () => { getResult: vi.fn(), delete: vi.fn().mockResolvedValue(undefined), isDeleted: vi.fn().mockResolvedValue(false), + ping: vi.fn(), + sendPinglets: vi.fn(), }; manager = new BlinkIdUxManager( diff --git a/packages/blinkid-ux-manager/src/core/BlinkIdUxManager.ts b/packages/blinkid-ux-manager/src/core/BlinkIdUxManager.ts index 1b08c07..871e714 100644 --- a/packages/blinkid-ux-manager/src/core/BlinkIdUxManager.ts +++ b/packages/blinkid-ux-manager/src/core/BlinkIdUxManager.ts @@ -6,21 +6,41 @@ import { BlinkIdScanningResult, BlinkIdSessionSettings, DocumentClassInfo, + getDeviceInfo, ProcessResultWithBuffer, RemoteScanningSession, + SdkScanConditionsData, } from "@microblink/blinkid-core"; -import { type CameraManager } from "@microblink/camera-manager"; +import type { + CameraManager, + CameraPermission, +} from "@microblink/camera-manager"; import { FeedbackStabilizer } from "@microblink/feedback-stabilizer"; +import { + PingBrowserDeviceInfoImpl, + PingHardwareCameraInfoImpl, + PingSdkCameraPermissionImpl, + PingSdkScanConditionsImpl, + PingSdkUxEventImpl, +} from "../shared/ping-implementations"; +import { createErrorMessagePingFromUiState } from "../shared/uiEventFeedbackMapper"; import { BlinkIdProcessingError } from "./BlinkIdProcessingError"; +import { DocumentClassFilter } from "./DocumentClassFilter"; +import { HapticFeedbackManager } from "./HapticFeedback"; import { BlinkIdUiState, BlinkIdUiStateKey, blinkIdUiStateMap, - firstSideCapturedStates, + errorUiStateKeys, + firstSideCapturedUiStateKeys, getUiStateKey, } from "./blinkid-ui-state"; +import { + convertCameraToPingCamera, + createCameraInputInfo, + PingCamera, +} from "./ping-camera-utils"; import { sleep } from "./utils"; -import { DocumentClassFilter } from "./DocumentClassFilter"; /** * The BlinkIdUxManager class. This is the main class that manages the UX of @@ -45,6 +65,8 @@ export class BlinkIdUxManager { /** The session settings. */ declare sessionSettings: BlinkIdSessionSettings; + #isFirstFrame = true; + /** The success process result. */ #successProcessResult: ProcessResultWithBuffer | undefined; /** Whether the thread is busy. */ @@ -72,8 +94,12 @@ export class BlinkIdUxManager { #onDocumentFilteredCallbacks = new Set< (documentClassInfo: DocumentClassInfo) => void >(); + /** Clean up observers, store subscriptions and event listeners. */ + #cleanupCallbacks = new Set<() => void>(); /** The document class filter. */ #documentClassFilter?: DocumentClassFilter; + /** The haptic feedback manager. */ + #hapticFeedbackManager = new HapticFeedbackManager(); /** * The constructor for the BlinkIdUxManager class. @@ -104,8 +130,25 @@ export class BlinkIdUxManager { this.showProductionOverlay = showProductionOverlay; }); + // Device info ping + void getDeviceInfo().then( + (deviceInfo) => + void this.scanningSession.ping( + new PingBrowserDeviceInfoImpl(deviceInfo), + ), + ); + + this.#setupObservers(); + + const removeFrameCaptureCallback = + this.cameraManager.addFrameCaptureCallback(this.#frameCaptureCallback); + + this.#cleanupCallbacks.add(removeFrameCaptureCallback); + } + + #setupObservers() { // clear timeout when we stop processing and add one when we start - const unsubscribePlaybackState = this.cameraManager.subscribe( + const unsubscribeCaptureState = this.cameraManager.subscribe( (s) => s.playbackState, (playbackState) => { console.debug(`⏯️ ${playbackState}`); @@ -124,6 +167,227 @@ export class BlinkIdUxManager { } }, ); + this.#cleanupCallbacks.add(unsubscribeCaptureState); + + const unsubscribeCameraActive = this.cameraManager.subscribe( + (s) => s.playbackState !== "idle", + (active) => { + if (active) { + void this.scanningSession.ping( + new PingSdkUxEventImpl({ + eventType: "CameraStarted", + }), + ); + } else { + void this.scanningSession.ping( + new PingSdkUxEventImpl({ + eventType: "CameraClosed", + }), + ); + } + void this.scanningSession.sendPinglets(); + }, + ); + + this.#cleanupCallbacks.add(unsubscribeCameraActive); + + const unsubscribeCameras = this.cameraManager.subscribe( + (s) => s.cameras, + (cameras) => { + const pingCameras: PingCamera[] = cameras.map((cam) => + convertCameraToPingCamera(cam), + ); + + void this.scanningSession.ping( + new PingHardwareCameraInfoImpl({ + availableCameras: pingCameras, + }), + ); + }, + ); + + this.#cleanupCallbacks.add(unsubscribeCameras); + + const visibilityChangeCallback = () => { + if (document.visibilityState === "hidden") { + void this.scanningSession.ping( + new PingSdkUxEventImpl({ + eventType: "AppMovedToBackground", + }), + ); + } + void this.scanningSession.sendPinglets(); + }; + + document.addEventListener("visibilitychange", visibilityChangeCallback); + + this.#cleanupCallbacks.add(() => { + document.removeEventListener( + "visibilitychange", + visibilityChangeCallback, + ); + }); + + const unsubscribeSelectedCamera = this.cameraManager.subscribe( + (s) => s.selectedCamera, + (selectedCamera) => { + if (!selectedCamera) { + return; + } + + const state = this.cameraManager.getState(); + + // just selected, not active + if (!state.videoResolution) { + return; + } + + void this.scanningSession.ping( + createCameraInputInfo({ + extractionArea: state.extractionArea, + videoResolution: state.videoResolution, + selectedCamera, + }), + ); + }, + ); + + this.#cleanupCallbacks.add(unsubscribeSelectedCamera); + + const unsubResizeVideo = this.cameraManager.subscribe( + (s) => s.videoResolution, + (resolution) => { + if (!resolution) { + return; + } + + const state = this.cameraManager.getState(); + + if (!state.selectedCamera) { + return; + } + + void this.scanningSession.ping( + createCameraInputInfo({ + extractionArea: state.extractionArea, + videoResolution: state.videoResolution!, + selectedCamera: state.selectedCamera, + }), + ); + }, + ); + + this.#cleanupCallbacks.add(unsubResizeVideo); + + const unsubExtractionArea = this.cameraManager.subscribe( + (s) => s.extractionArea, + () => { + const state = this.cameraManager.getState(); + + if (!state.selectedCamera) { + return; + } + + if (!state.videoResolution) { + return; + } + + void this.scanningSession.ping( + createCameraInputInfo({ + extractionArea: state.extractionArea, + videoResolution: state.videoResolution, + selectedCamera: state.selectedCamera, + }), + ); + }, + ); + + this.#cleanupCallbacks.add(unsubExtractionArea); + + const unsubscribeCameraPermission = this.cameraManager.subscribe( + (s) => s.cameraPermission, + this.#handleCameraPermissionChange, + ); + + this.#cleanupCallbacks.add(unsubscribeCameraPermission); + + // Orientation pings + const reportOrientation = (orientation: ScreenOrientation) => { + let deviceOrientation: SdkScanConditionsData["deviceOrientation"]; + + switch (orientation.type) { + case "portrait-primary": + deviceOrientation = "Portrait"; + break; + case "portrait-secondary": + deviceOrientation = "PortraitUpside"; + break; + case "landscape-primary": + deviceOrientation = "LandscapeLeft"; + break; + case "landscape-secondary": + deviceOrientation = "LandscapeRight"; + break; + } + + void this.scanningSession.ping( + new PingSdkScanConditionsImpl({ + updateType: "DeviceOrientation", + deviceOrientation, + }), + ); + }; + + const orientationChangeHandler = (event: Event) => { + const target = event.target as ScreenOrientation; + reportOrientation(target); + }; + + screen.orientation.addEventListener("change", orientationChangeHandler); + + // initial report + reportOrientation(screen.orientation); + + this.#cleanupCallbacks.add(() => { + screen.orientation.removeEventListener( + "change", + orientationChangeHandler, + ); + }); + + // Torch ping + const unsubTorch = this.cameraManager.subscribe( + (state) => state.selectedCamera?.torchEnabled, + (torchEnabled) => { + // no-op if torch is not supported or camera is changing + if (torchEnabled === undefined) { + return; + } + + void this.scanningSession.ping( + new PingSdkScanConditionsImpl({ + updateType: "FlashlightState", + flashlightOn: torchEnabled, + }), + ); + }, + ); + + this.#cleanupCallbacks.add(unsubTorch); + + // Subscribe to torch state changes for haptic feedback + const unsubscribeTorchState = this.cameraManager.subscribe( + (s) => s.selectedCamera?.torchEnabled, + (torchEnabled) => { + // Only trigger haptic feedback when torch is turned on + // (not when it's turned off or when camera changes) + if (torchEnabled === true) { + this.#hapticFeedbackManager.triggerShort(); + } + }, + ); + + this.#cleanupCallbacks.add(unsubscribeTorchState); // We unsubscribe the video observer when the video element is removed from the DOM const unsubscribeVideoObserver = this.cameraManager.subscribe( @@ -132,16 +396,93 @@ export class BlinkIdUxManager { if (!videoElement) { console.debug("Removing camera manager subscriptions"); this.reset(); - unsubscribeVideoObserver(); - unsubscribePlaybackState(); + this.cleanupAllObservers(); } }, ); - // will only trigger if the camera manager is processing frames - this.cameraManager.addFrameCaptureCallback(this.#frameCaptureCallback); + this.#cleanupCallbacks.add(unsubscribeVideoObserver); } + #handleCameraPermissionChange = ( + curr: CameraPermission, + prev: CameraPermission, + ) => { + if (prev === undefined) { + // startup + if (curr === "granted") { + console.debug("previously granted"); + void this.scanningSession.ping( + new PingSdkCameraPermissionImpl({ + eventType: "CameraPermissionCheck", + cameraPermissionGranted: true, + }), + ); + } else if (curr === "denied") { + console.debug("previously blocked"); + void this.scanningSession.ping( + new PingSdkCameraPermissionImpl({ + eventType: "CameraPermissionCheck", + cameraPermissionGranted: false, + }), + ); + } else if (curr === "prompt") { + console.debug("Waiting for user response"); + void this.scanningSession.ping( + new PingSdkCameraPermissionImpl({ + eventType: "CameraPermissionRequest", + }), + ); + } + } + + if (prev === "prompt") { + if (curr === "granted") { + console.debug("user granted permission"); + void this.scanningSession.ping( + new PingSdkCameraPermissionImpl({ + eventType: "CameraPermissionUserResponse", + cameraPermissionGranted: true, + }), + ); + } else if (curr === "denied") { + console.debug("user denied permission"); + void this.scanningSession.ping( + new PingSdkCameraPermissionImpl({ + eventType: "CameraPermissionUserResponse", + cameraPermissionGranted: false, + }), + ); + } + } + + if (prev === "denied") { + if (curr === "granted") { + console.debug("user gave permission in browser settings"); + } else if (curr === "prompt") { + console.debug("retrying for camera permission"); + void this.scanningSession.ping( + new PingSdkCameraPermissionImpl({ + eventType: "CameraPermissionRequest", + cameraPermissionGranted: true, + }), + ); + } else if (curr === undefined) { + console.debug("user reset permission"); + } + } + + if (prev === "granted") { + if (curr === "denied") { + console.debug("user revoked permission"); + } else if (curr === "prompt") { + console.debug("user reset permission after granting v1"); + } + } + + void this.scanningSession.sendPinglets(); + }; + /** * Indicates whether the UI should display the demo overlay. Controlled by the * license property. @@ -179,6 +520,42 @@ export class BlinkIdUxManager { return this.#helpTooltipHideDelay; } + /** + * Gets the haptic feedback manager instance. + * + * @returns The haptic feedback manager + */ + getHapticFeedbackManager(): HapticFeedbackManager { + return this.#hapticFeedbackManager; + } + + /** + * Enable or disable haptic feedback. + * + * @param enabled - Whether haptic feedback should be enabled + */ + setHapticFeedbackEnabled(enabled: boolean): void { + this.#hapticFeedbackManager.setEnabled(enabled); + } + + /** + * Check if haptic feedback is currently enabled. + * + * @returns true if haptic feedback is enabled + */ + isHapticFeedbackEnabled(): boolean { + return this.#hapticFeedbackManager.isEnabled(); + } + + /** + * Check if haptic feedback is supported by the current browser/device. + * + * @returns true if haptic feedback is supported + */ + isHapticFeedbackSupported(): boolean { + return this.#hapticFeedbackManager.isSupported(); + } + /** * Adds a callback function to be executed when the UI state changes. * @@ -300,6 +677,8 @@ export class BlinkIdUxManager { * @param errorState - The error state. */ #invokeOnErrorCallbacks = (errorState: BlinkIdProcessingError) => { + this.#hapticFeedbackManager.triggerLong(); + for (const callback of this.#onErrorCallbacks) { try { callback(errorState); @@ -342,6 +721,8 @@ export class BlinkIdUxManager { #invokeOnDocumentFilteredCallbacks = ( documentClassInfo: DocumentClassInfo, ) => { + this.#hapticFeedbackManager.triggerLong(); + for (const callback of this.#onDocumentFilteredCallbacks) { try { callback(documentClassInfo); @@ -439,8 +820,11 @@ export class BlinkIdUxManager { * updating the UI state. * * @param imageData - The image data. + * @returns The processed frame's ArrayBuffer, or undefined if not applicable. */ - #frameCaptureCallback = async (imageData: ImageData) => { + #frameCaptureCallback = async ( + imageData: ImageData, + ): Promise => { if (this.#threadBusy) { console.debug("🚦🔴 Thread is busy, skipping frame capture"); return; @@ -448,49 +832,57 @@ export class BlinkIdUxManager { this.#threadBusy = true; - // https://issues.chromium.org/issues/379999322 - const imageDataLike = { - data: imageData.data, - width: imageData.width, - height: imageData.height, - colorSpace: "srgb", - } satisfies ImageData; - - /** - * `scanningSession.process()` errors on calls after the document is captured and - * the success state is placed on the queue to be shown after the current message's - * minimum duration is reached. - * - * However, we still need to call `#handleUiStateChange()` to update the UI state, so - * we stop the loop here by not setting `this.#threadBusy` to `true` and manually - * calling `#handleUiStateChange()` with the `DOCUMENT_CAPTURED` state after the - * minimum duration of the state is reached. - */ - if (this.#successProcessResult) { - window.setTimeout(() => { - if (!this.#successProcessResult) { - throw new Error("No success process result, should not happen"); - } - this.#handleUiStateChanges(this.#successProcessResult); - }, blinkIdUiStateMap.DOCUMENT_CAPTURED.minDuration); - return; - } + try { + // https://issues.chromium.org/issues/379999322 + const imageDataLike = { + data: imageData.data, + width: imageData.width, + height: imageData.height, + colorSpace: "srgb", + } satisfies ImageData; + + /** + * `scanningSession.process()` errors on calls after the document is captured and + * the success state is placed on the queue to be shown after the current message's + * minimum duration is reached. + * + * However, we still need to call `#handleUiStateChange()` to update the UI state, so + * we stop the loop here by not setting `this.#threadBusy` to `true` and manually + * calling `#handleUiStateChange()` with the `DOCUMENT_CAPTURED` state after the + * minimum duration of the state is reached. + */ + if (this.#successProcessResult) { + window.setTimeout(() => { + if (!this.#successProcessResult) { + console.error("No success process result, should not happen"); + return; + } + this.#updateUiStateFromProcessResult(this.#successProcessResult); + }, blinkIdUiStateMap.DOCUMENT_CAPTURED.minDuration); + return; + } - const processResult = await this.scanningSession.process(imageDataLike); + const processResult = await this.scanningSession.process(imageDataLike); - this.#threadBusy = false; + if (this.#isFirstFrame) { + this.#isFirstFrame = false; + void this.scanningSession.sendPinglets(); + } - // Check if document should be processed or filtered out - if (!this.#handleDocumentClassFiltering(processResult)) { - return processResult.arrayBuffer; - } + // Check if document should be processed or filtered out + if (!this.#handleDocumentClassFiltering(processResult)) { + return processResult.arrayBuffer; + } - // Document passed filtering or no filtering was configured - // Update UI state based on recognition results and notify callbacks - this.#handleUiStateChanges(processResult); - this.#invokeOnFrameProcessCallbacks(processResult); + // Document passed filtering or no filtering was configured + // Update UI state based on recognition results and notify callbacks + this.#updateUiStateFromProcessResult(processResult); + this.#invokeOnFrameProcessCallbacks(processResult); - return processResult.arrayBuffer; + return processResult.arrayBuffer; + } finally { + this.#threadBusy = false; + } }; /** @@ -571,6 +963,13 @@ export class BlinkIdUxManager { this.#invokeOnErrorCallbacks("timeout"); + void this.scanningSession.ping( + new PingSdkUxEventImpl({ + eventType: "StepTimeout", + }), + ); + void this.scanningSession.sendPinglets(); + // Reset the feedback stabilizer to clear the state // We handle this as a new scan attempt this.#resetUiState(); @@ -578,21 +977,56 @@ export class BlinkIdUxManager { }; /** - * Handles the UI state changes. This is the main function that is called - * when a new frame is processed. It is responsible for updating the UI state, - * handling the timeout, and handling the first side captured states. + * Handles haptic feedback based on UI state changes. * - * @param processResult - The process result. + * @param uiStateKey - The new UI state key + */ + #handleHapticFeedback = (uiStateKey: BlinkIdUiStateKey) => { + // First side success states (before barcode scanning) + if (firstSideCapturedUiStateKeys.includes(uiStateKey)) { + this.#hapticFeedbackManager.triggerShort(); + return; + } + + // Final success state (document fully captured) + if (uiStateKey === "DOCUMENT_CAPTURED") { + this.#hapticFeedbackManager.triggerLong(); + return; + } + + // Error states (excluding unsupported document which is handled separately) + if ( + uiStateKey !== "UNSUPPORTED_DOCUMENT" && + errorUiStateKeys.includes(uiStateKey) + ) { + this.#hapticFeedbackManager.triggerShort(); + return; + } + }; + + /** + * Updates the UI state based on the process result. This is called after a frame has been processed + * to update the UI state according to the recognition results. + * + * @param processResult - The process result from frame processing. */ - #handleUiStateChanges = (processResult: ProcessResultWithBuffer) => { + #updateUiStateFromProcessResult = ( + processResult: ProcessResultWithBuffer, + ) => { const uiStateKeyCandidate = getUiStateKey( processResult, this.sessionSettings.scanningSettings, ); + // first side captured + if (firstSideCapturedUiStateKeys.includes(uiStateKeyCandidate)) { + void this.scanningSession.sendPinglets(); + } + if (uiStateKeyCandidate === "DOCUMENT_CAPTURED") { // TODO: check if the buffer is still reachable this.#successProcessResult = processResult; + void this.scanningSession.sendPinglets(); } this.rawUiStateKey = uiStateKeyCandidate; @@ -605,6 +1039,9 @@ export class BlinkIdUxManager { return; } + // Trigger haptic feedback based on UI state changes + this.#handleHapticFeedback(newUiState.key); + this.uiState = newUiState; this.#invokeOnUiStateChangedCallbacks(newUiState); @@ -624,9 +1061,15 @@ export class BlinkIdUxManager { this.#setTimeout(uiState); } + // queue error ping if applicable + const errorPing = createErrorMessagePingFromUiState(uiState.key); + if (errorPing) { + void this.scanningSession.ping(errorPing); + } + // Handle all first side captured states to display both the // animation to reposition the document and the success animation - if (firstSideCapturedStates.includes(uiState.key)) { + if (firstSideCapturedUiStateKeys.includes(uiState.key)) { this.cameraManager.stopFrameCapture(); // we need to wait for the compound duration // The DOCUMENT_CAPTURED state is the checkbox animation @@ -640,7 +1083,10 @@ export class BlinkIdUxManager { // handle UNSUPPORTED_DOCUMENT if (uiState.key === "UNSUPPORTED_DOCUMENT") { + console.debug("🔴 Unsupported document"); + this.cameraManager.stopFrameCapture(); + this.#invokeOnErrorCallbacks("unsupported_document"); return; } @@ -693,13 +1139,13 @@ export class BlinkIdUxManager { * Clears the scanning session timeout. */ clearScanTimeout = () => { - // if timeout id is not set, we don't want to clear it if (!this.#timeoutId) { return; } console.debug("⏳🔴 clearing timeout"); window.clearTimeout(this.#timeoutId); + this.#timeoutId = undefined; }; /** @@ -746,6 +1192,7 @@ export class BlinkIdUxManager { this.#threadBusy = false; this.#successProcessResult = undefined; this.#resetUiState(); + this.#documentClassFilter = undefined; await this.scanningSession.reset(); @@ -758,6 +1205,22 @@ export class BlinkIdUxManager { } } + clearUserCallbacks() { + console.debug("🧹 Clearing all BlinkIdUxManager user callbacks"); + + this.#onUiStateChangedCallbacks.clear(); + this.#onResultCallbacks.clear(); + this.#onFrameProcessCallbacks.clear(); + this.#onErrorCallbacks.clear(); + this.#onDocumentFilteredCallbacks.clear(); + } + + cleanupAllObservers() { + console.debug("🧹 Removing all BlinkIdUxManager observers"); + this.#cleanupCallbacks.forEach((cleanup) => cleanup()); + this.#cleanupCallbacks.clear(); + } + /** * Resets the BlinkIdUxManager. Clears all callbacks. * @@ -768,10 +1231,7 @@ export class BlinkIdUxManager { this.clearScanTimeout(); this.#threadBusy = false; this.#successProcessResult = undefined; - this.#onUiStateChangedCallbacks.clear(); - this.#onResultCallbacks.clear(); - this.#onFrameProcessCallbacks.clear(); - this.#onErrorCallbacks.clear(); - this.#onDocumentFilteredCallbacks.clear(); + this.clearUserCallbacks(); + this.#documentClassFilter = undefined; } } diff --git a/packages/blinkid-ux-manager/src/core/HapticFeedback.test.ts b/packages/blinkid-ux-manager/src/core/HapticFeedback.test.ts new file mode 100644 index 0000000..84662aa --- /dev/null +++ b/packages/blinkid-ux-manager/src/core/HapticFeedback.test.ts @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2025 Microblink Ltd. All rights reserved. + */ + +import { describe, test, expect, vi, beforeEach, afterEach } from "vitest"; +import { HapticFeedbackManager } from "./HapticFeedback"; + +describe("HapticFeedbackManager", () => { + let hapticManager: HapticFeedbackManager; + let mockVibrate: ReturnType; + + beforeEach(() => { + hapticManager = new HapticFeedbackManager(); + + // Mock the navigator.vibrate API + mockVibrate = vi.fn().mockReturnValue(true); + Object.defineProperty(globalThis.navigator, "vibrate", { + value: mockVibrate, + writable: true, + }); + }); + + afterEach(() => { + vi.clearAllMocks(); + vi.restoreAllMocks(); + }); + + describe("isSupported", () => { + test("should return true when vibrate API is available", () => { + expect(hapticManager.isSupported()).toBe(true); + }); + + test("should return false when vibrate API is not available", () => { + // Mock navigator without vibrate API + Object.defineProperty(globalThis, "navigator", { + value: {}, + writable: true, + }); + expect(hapticManager.isSupported()).toBe(false); + }); + }); + + describe("enable/disable functionality", () => { + test("should be enabled by default", () => { + expect(hapticManager.isEnabled()).toBe(true); + }); + + test("should be able to disable haptic feedback", () => { + hapticManager.setEnabled(false); + expect(hapticManager.isEnabled()).toBe(false); + }); + + test("should not trigger feedback when disabled", () => { + hapticManager.setEnabled(false); + hapticManager.triggerFeedback("short"); + expect(mockVibrate).not.toHaveBeenCalled(); + }); + }); + + describe("feedback triggering", () => { + test("should trigger short feedback with correct duration", () => { + hapticManager.triggerFeedback("short"); + expect(mockVibrate).toHaveBeenCalledWith([100]); + }); + + test("should trigger long feedback with correct duration", () => { + hapticManager.triggerFeedback("long"); + expect(mockVibrate).toHaveBeenCalledWith([300]); + }); + }); + + describe("convenience methods", () => { + test("should trigger short feedback via triggerShort method", () => { + hapticManager.triggerShort(); + expect(mockVibrate).toHaveBeenCalledWith([100]); + }); + + test("should trigger long feedback via triggerLong method", () => { + hapticManager.triggerLong(); + expect(mockVibrate).toHaveBeenCalledWith([300]); + }); + }); + + describe("stop functionality", () => { + test("should call navigator.vibrate(0) to stop vibration", () => { + hapticManager.stop(); + expect(mockVibrate).toHaveBeenCalledWith(0); + }); + }); + + describe("error handling", () => { + test("should handle vibrate API errors gracefully", () => { + mockVibrate.mockImplementation(() => { + throw new Error("Vibration failed"); + }); + + expect(() => { + hapticManager.triggerFeedback("short"); + }).not.toThrow(); + }); + + test("should not crash when vibrate API returns false", () => { + mockVibrate.mockReturnValue(false); + expect(() => { + hapticManager.triggerFeedback("short"); + }).not.toThrow(); + }); + + test("should not trigger when not supported", () => { + Object.defineProperty(globalThis, "navigator", { + value: {}, + writable: true, + }); + + hapticManager.triggerFeedback("short"); + expect(mockVibrate).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/packages/blinkid-ux-manager/src/core/HapticFeedback.ts b/packages/blinkid-ux-manager/src/core/HapticFeedback.ts new file mode 100644 index 0000000..1ba9dc7 --- /dev/null +++ b/packages/blinkid-ux-manager/src/core/HapticFeedback.ts @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2025 Microblink Ltd. All rights reserved. + */ + +/** + * Haptic feedback types supported by the system. + */ +export type HapticFeedbackType = "short" | "long"; + +/** + * Mapping of haptic feedback types to their durations. + */ +export const HAPTIC_FEEDBACK_CONFIGS: Record = { + short: 100, + long: 300, +}; + +/** + * Manages haptic feedback for the BlinkID SDK. + * Provides cross-platform haptic feedback using the Web Vibration API. + */ +export class HapticFeedbackManager { + #enabled = true; + + /** + * Check if haptic feedback is supported by the current browser/device. + * + * @returns true if haptic feedback is supported + */ + isSupported(): boolean { + return typeof navigator !== "undefined" && "vibrate" in navigator; + } + + /** + * Enable or disable haptic feedback. + * + * @param enabled - Whether haptic feedback should be enabled + */ + setEnabled(enabled: boolean): void { + this.#enabled = enabled; + } + + /** + * Check if haptic feedback is currently enabled. + * + * @returns true if haptic feedback is enabled + */ + isEnabled(): boolean { + return this.#enabled; + } + + /** + * Trigger haptic feedback with the specified type. + * + * @param type - The type of haptic feedback to trigger + */ + triggerFeedback(type: HapticFeedbackType): void { + if (!this.#enabled || !this.isSupported()) { + return; + } + + const duration = HAPTIC_FEEDBACK_CONFIGS[type]; + + try { + const success = navigator.vibrate([duration]); + if (success) { + console.debug( + `HapticFeedback: Triggered ${type} feedback (${duration}ms)`, + ); + } else { + console.debug(`HapticFeedback: Failed to trigger ${type} feedback`); + } + } catch (error) { + console.warn("HapticFeedback: Error triggering vibration:", error); + } + } + + /** + * Stop any ongoing haptic feedback. + */ + stop(): void { + if (this.isSupported()) { + navigator.vibrate(0); + } + } + + /** + * Trigger long haptic feedback. + * Uses long feedback pattern. + */ + triggerLong(): void { + this.triggerFeedback("long"); + } + + /** + * Trigger short haptic feedback. + * Uses short feedback pattern. + */ + triggerShort(): void { + this.triggerFeedback("short"); + } +} diff --git a/packages/blinkid-ux-manager/src/core/blinkid-ui-state.test.ts b/packages/blinkid-ux-manager/src/core/blinkid-ui-state.test.ts index dad0fe4..363e4d6 100644 --- a/packages/blinkid-ux-manager/src/core/blinkid-ui-state.test.ts +++ b/packages/blinkid-ux-manager/src/core/blinkid-ui-state.test.ts @@ -9,6 +9,7 @@ import { PartialProcessResult, } from "./blinkid-ui-state"; import { + Country, defaultSessionSettings, DetectionStatus, DocumentRotation, @@ -237,19 +238,44 @@ describe("getUiStateKey", () => { expect(result).toBe("SENSING_DATA_PAGE"); }); - test.each<{ rotation: DocumentRotation; expected: BlinkIdUiStateKey }>([ + test.each<{ + rotation: DocumentRotation; + expected: BlinkIdUiStateKey; + country?: Country; + }>([ { rotation: "zero", expected: "SENSING_TOP_PAGE" }, { rotation: "not-available", expected: "SENSING_TOP_PAGE" }, { rotation: "upside-down", expected: "SENSING_TOP_PAGE" }, { rotation: "counter-clockwise-90", expected: "SENSING_LEFT_PAGE" }, { rotation: "clockwise-90", expected: "SENSING_RIGHT_PAGE" }, + { rotation: "zero", expected: "SENSING_LAST_PAGE", country: "india" }, + { + rotation: "not-available", + expected: "SENSING_LAST_PAGE", + country: "india", + }, + { + rotation: "upside-down", + expected: "SENSING_LAST_PAGE", + country: "usa", + }, + { + rotation: "counter-clockwise-90", + expected: "SENSING_LAST_PAGE", + country: "usa", + }, + { + rotation: "clockwise-90", + expected: "SENSING_LAST_PAGE", + country: "usa", + }, ])( - "should return $expected when scanning second side of passport with rotation $rotation", - ({ rotation, expected }) => { + "should return $expected when scanning second side of passport with rotation $rotation and country $country", + ({ rotation, expected, country }) => { const processResult = createProcessResult({ inputImageAnalysisResult: { scanningSide: "second", - documentClassInfo: { type: "passport" }, + documentClassInfo: { type: "passport", country }, documentRotation: rotation, }, }); @@ -263,19 +289,30 @@ describe("getUiStateKey", () => { }); describe("Passport Navigation States", () => { - test.each<{ rotation: DocumentRotation; expected: BlinkIdUiStateKey }>([ + test.each<{ + rotation: DocumentRotation; + expected: BlinkIdUiStateKey; + country?: Country; + }>([ { rotation: "zero", expected: "MOVE_TOP" }, { rotation: "counter-clockwise-90", expected: "MOVE_LEFT" }, { rotation: "clockwise-90", expected: "MOVE_RIGHT" }, + { rotation: "zero", expected: "MOVE_LAST_PAGE", country: "india" }, + { + rotation: "counter-clockwise-90", + expected: "MOVE_LAST_PAGE", + country: "india", + }, + { rotation: "clockwise-90", expected: "MOVE_LAST_PAGE", country: "usa" }, ])( - "should return $expected when passport document rotation is $rotation", - ({ rotation, expected }) => { + "should return $expected when passport document rotation is $rotation and country $country", + ({ rotation, expected, country }) => { const processResult = createProcessResult({ resultCompleteness: { scanningStatus: "side-scanned", }, inputImageAnalysisResult: { - documentClassInfo: { type: "passport" }, + documentClassInfo: { type: "passport", country }, documentRotation: rotation, }, }); @@ -289,20 +326,41 @@ describe("getUiStateKey", () => { }); describe("Wrong Passport Page States", () => { - test.each<{ rotation: DocumentRotation; expected: BlinkIdUiStateKey }>([ + test.each<{ + rotation: DocumentRotation; + expected: BlinkIdUiStateKey; + country?: Country; + }>([ { rotation: "zero", expected: "WRONG_TOP_PAGE" }, { rotation: "upside-down", expected: "WRONG_TOP_PAGE" }, { rotation: "not-available", expected: "WRONG_TOP_PAGE" }, { rotation: "counter-clockwise-90", expected: "WRONG_LEFT_PAGE" }, { rotation: "clockwise-90", expected: "WRONG_RIGHT_PAGE" }, + { rotation: "zero", expected: "WRONG_LAST_PAGE", country: "india" }, + { + rotation: "upside-down", + expected: "WRONG_LAST_PAGE", + country: "india", + }, + { + rotation: "not-available", + expected: "WRONG_LAST_PAGE", + country: "usa", + }, + { + rotation: "counter-clockwise-90", + expected: "WRONG_LAST_PAGE", + country: "usa", + }, + { rotation: "clockwise-90", expected: "WRONG_LAST_PAGE", country: "usa" }, ])( - "should return $expected when scanning wrong side with rotation $rotation", - ({ rotation, expected }) => { + "should return $expected when scanning wrong side with rotation $rotation and country $country", + ({ rotation, expected, country }) => { const processResult = createProcessResult({ inputImageAnalysisResult: { scanningSide: "second", processingStatus: "scanning-wrong-side", - documentClassInfo: { type: "passport" }, + documentClassInfo: { type: "passport", country }, documentRotation: rotation, }, }); diff --git a/packages/blinkid-ux-manager/src/core/blinkid-ui-state.ts b/packages/blinkid-ux-manager/src/core/blinkid-ui-state.ts index 58a4286..b7ea062 100644 --- a/packages/blinkid-ux-manager/src/core/blinkid-ui-state.ts +++ b/packages/blinkid-ux-manager/src/core/blinkid-ui-state.ts @@ -36,9 +36,11 @@ export type BlinkIdUiStateKey = | "SENSING_TOP_PAGE" | "SENSING_LEFT_PAGE" | "SENSING_RIGHT_PAGE" + | "SENSING_LAST_PAGE" | "MOVE_TOP" | "MOVE_LEFT" | "MOVE_RIGHT" + | "MOVE_LAST_PAGE" | "DOCUMENT_FRAMING_CAMERA_TOO_FAR" | "DOCUMENT_FRAMING_CAMERA_TOO_CLOSE" | "DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP" @@ -54,6 +56,7 @@ export type BlinkIdUiStateKey = | "WRONG_TOP_PAGE" | "WRONG_LEFT_PAGE" | "WRONG_RIGHT_PAGE" + | "WRONG_LAST_PAGE" | "WRONG_SIDE"; /** @@ -70,16 +73,6 @@ export type BlinkIdUiStateMap = { }; }; -/** - * The states that are captured when the first side is captured. - */ -export const firstSideCapturedStates: BlinkIdUiStateKey[] = [ - "FLIP_CARD", - "MOVE_LEFT", - "MOVE_RIGHT", - "MOVE_TOP", -] as const; - /** * The UI state of BlinkID. */ @@ -119,6 +112,11 @@ export const blinkIdUiStateMap: BlinkIdUiStateMap = { reticleType: "searching", minDuration: 1000, }, + SENSING_LAST_PAGE: { + key: "SENSING_LAST_PAGE", + reticleType: "searching", + minDuration: 1000, + }, SCAN_BARCODE: { key: "SCAN_BARCODE", reticleType: "processing", @@ -150,6 +148,12 @@ export const blinkIdUiStateMap: BlinkIdUiStateMap = { minDuration: 2000, singleEmit: true, }, + MOVE_LAST_PAGE: { + key: "MOVE_LAST_PAGE", + reticleType: "done", + minDuration: 0, + singleEmit: true, + }, // Capturing all sides completed DOCUMENT_CAPTURED: { key: "DOCUMENT_CAPTURED", @@ -197,6 +201,11 @@ export const blinkIdUiStateMap: BlinkIdUiStateMap = { reticleType: "error", minDuration: 1500, }, + WRONG_LAST_PAGE: { + key: "WRONG_LAST_PAGE", + reticleType: "error", + minDuration: 1500, + }, TOO_DARK: { key: "TOO_DARK", reticleType: "error", @@ -234,6 +243,26 @@ export const blinkIdUiStateMap: BlinkIdUiStateMap = { }, } as const; +/** + * The states that are captured when the first side is captured. + */ +export const firstSideCapturedUiStateKeys: BlinkIdUiStateKey[] = [ + // two sided documents + "FLIP_CARD", + // passport pages + "MOVE_LEFT", + "MOVE_RIGHT", + "MOVE_TOP", + "MOVE_LAST_PAGE", +] as const; + +/** The error UI state keys. */ +export const errorUiStateKeys: BlinkIdUiStateKey[] = Object.values( + blinkIdUiStateMap, +) + .filter((state) => state.reticleType === "error") + .map((state) => state.key); + /** * The partial process result. */ @@ -254,6 +283,19 @@ function isPassport(docClass: DocumentClassInfo | undefined) { return docClass?.type === "passport"; } +/** + * Checks if the document is a passport and has a barcode on the last page (USA or India). + * + * @param docClass - The document class info. + * @returns True if the document is a passport and has a barcode on the last page (USA or India), false otherwise. + */ +function isPassportWithBarcode(docClass: DocumentClassInfo | undefined) { + return ( + isPassport(docClass) && + (docClass?.country === "usa" || docClass?.country === "india") + ); +} + /** * Determines the appropriate UI state key based on the current frame processing * result and scanning settings. @@ -295,6 +337,17 @@ export function getUiStateKey( ) // passport pages captured + .with( + { + resultCompleteness: { + scanningStatus: "side-scanned", + }, + inputImageAnalysisResult: { + documentClassInfo: P.when(isPassportWithBarcode), + }, + }, + () => "MOVE_LAST_PAGE", + ) .with( { resultCompleteness: { @@ -499,6 +552,16 @@ export function getUiStateKey( ) // scan wrong side / page + .with( + { + inputImageAnalysisResult: { + scanningSide: "second", + processingStatus: "scanning-wrong-side", + documentClassInfo: P.when(isPassportWithBarcode), + }, + }, + () => "WRONG_LAST_PAGE", + ) .with( { inputImageAnalysisResult: { @@ -551,6 +614,15 @@ export function getUiStateKey( ) // scan passport second page (in frame) + .with( + { + inputImageAnalysisResult: { + scanningSide: "second", + documentClassInfo: P.when(isPassportWithBarcode), + }, + }, + () => "SENSING_LAST_PAGE", + ) .with( { inputImageAnalysisResult: { diff --git a/packages/blinkid-ux-manager/src/core/ping-camera-utils.ts b/packages/blinkid-ux-manager/src/core/ping-camera-utils.ts new file mode 100644 index 0000000..e97cf88 --- /dev/null +++ b/packages/blinkid-ux-manager/src/core/ping-camera-utils.ts @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2025 Microblink Ltd. All rights reserved. + */ + +import { HardwareCameraInfoData } from "@microblink/blinkid-core"; +import { + Camera, + ExtractionArea, + FacingMode, + Resolution, +} from "@microblink/camera-manager"; +import { PingSdkCameraInputInfoImpl } from "../shared/ping-implementations"; + +export type CameraInputInfoProps = { + selectedCamera: Camera; + videoResolution: Resolution; + extractionArea: ExtractionArea | undefined; +}; + +export const createCameraInputInfo = ({ + extractionArea, + selectedCamera, + videoResolution, +}: CameraInputInfoProps): PingSdkCameraInputInfoImpl => { + const roiW = extractionArea?.width + ? extractionArea.width + : videoResolution.width; + const roiH = extractionArea?.height + ? extractionArea.height + : videoResolution.height; + + return new PingSdkCameraInputInfoImpl({ + cameraFacing: mapCameraFacingToPingFacing(selectedCamera.facingMode), + cameraFrameWidth: videoResolution.width, + cameraFrameHeight: videoResolution.height, + roiWidth: roiW, + roiHeight: roiH, + viewPortAspectRatio: roiW / roiH, + }); +}; + +export type PingCamera = HardwareCameraInfoData["availableCameras"][number]; + +export const mapCameraFacingToPingFacing = ( + facing: FacingMode, +): PingCamera["cameraFacing"] => { + switch (facing) { + case "front": + return "Front"; + case "back": + return "Back"; + default: + return "Unknown"; + } +}; + +export const convertCameraToPingCamera = (camera: Camera): PingCamera => { + return { + cameraFacing: mapCameraFacingToPingFacing(camera.facingMode), + /** we can't know this */ + availableResolutions: undefined, + focus: camera.singleShotSupported ? "Auto" : "Fixed", + }; +}; diff --git a/packages/blinkid-ux-manager/src/index.ts b/packages/blinkid-ux-manager/src/index.ts index 499e630..233a7e5 100644 --- a/packages/blinkid-ux-manager/src/index.ts +++ b/packages/blinkid-ux-manager/src/index.ts @@ -11,6 +11,7 @@ export * from "./core/blinkid-ui-state"; export * from "./core/BlinkIdUxManager"; +export * from "./core/HapticFeedback"; export * from "./ui/createBlinkIdFeedbackUi"; export type { LocaleRecord, diff --git a/packages/blinkid-ux-manager/src/shared/ping-implementations.ts b/packages/blinkid-ux-manager/src/shared/ping-implementations.ts new file mode 100644 index 0000000..a2bd9a0 --- /dev/null +++ b/packages/blinkid-ux-manager/src/shared/ping-implementations.ts @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2025 Microblink Ltd. All rights reserved. + */ + +import type { + DeviceInfo, + ErrorData, + HardwareCameraInfoData, + LogData, + PingBrowserDeviceInfo, + PingError, + PingHardwareCameraInfo, + PingLog, + PingSdkCameraInputInfo, + PingSdkCameraPermission, + PingSdkScanConditions, + PingSdkUxEvent, + PingSdkWrapperProduct, + SdkCameraInputInfoData, + SdkCameraPermissionData, + SdkScanConditionsData, + SdkUxEventData, + SdkWrapperProductData, +} from "@microblink/blinkid-core"; + +export class PingBrowserDeviceInfoImpl implements PingBrowserDeviceInfo { + constructor(data: DeviceInfo) { + this.data = data; + } + + readonly data: DeviceInfo; + readonly schemaName = "ping.browser.device.info"; + readonly schemaVersion = "1.0.0"; +} + +export class PingSdkUxEventImpl implements PingSdkUxEvent { + constructor(data: SdkUxEventData) { + this.data = data; + } + + readonly data: SdkUxEventData; + readonly schemaName = "ping.sdk.ux.event"; + readonly schemaVersion = "1.0.0"; +} + +export class PingErrorImpl implements PingError { + constructor(data: ErrorData) { + this.data = data; + } + + readonly data: ErrorData; + readonly schemaName = "ping.error"; + readonly schemaVersion = "1.0.0"; +} + +export class PingHardwareCameraInfoImpl implements PingHardwareCameraInfo { + constructor(data: HardwareCameraInfoData) { + this.data = data; + } + + readonly data: HardwareCameraInfoData; + readonly schemaName = "ping.hardware.camera.info"; + readonly schemaVersion = "1.0.1"; + readonly sessionNumber = 0; +} + +export class PingLogImpl implements PingLog { + constructor(data: LogData) { + this.data = data; + } + + readonly data: LogData; + readonly schemaName = "ping.log"; + readonly schemaVersion = "1.0.0"; +} + +export class PingSdkCameraInputInfoImpl implements PingSdkCameraInputInfo { + constructor(data: SdkCameraInputInfoData) { + this.data = data; + } + + readonly data: SdkCameraInputInfoData; + readonly schemaName = "ping.sdk.camera.input.info"; + readonly schemaVersion = "1.0.1"; +} + +export class PingSdkCameraPermissionImpl implements PingSdkCameraPermission { + constructor(data: SdkCameraPermissionData) { + this.data = data; + } + + readonly data: SdkCameraPermissionData; + readonly schemaName = "ping.sdk.camera.permission"; + readonly schemaVersion = "1.0.0"; +} + +export class PingSdkScanConditionsImpl implements PingSdkScanConditions { + constructor(data: SdkScanConditionsData) { + this.data = data; + } + + readonly data: SdkScanConditionsData; + readonly schemaName = "ping.sdk.scan.conditions"; + readonly schemaVersion = "1.0.0"; +} + +export class PingSdkWrapperProductImpl implements PingSdkWrapperProduct { + constructor(data: SdkWrapperProductData) { + this.data = data; + } + + readonly data: SdkWrapperProductData; + readonly schemaName = "ping.sdk.wrapper.product"; + readonly schemaVersion = "1.0.0"; +} diff --git a/packages/blinkid-ux-manager/src/shared/uiEventFeedbackMapper.ts b/packages/blinkid-ux-manager/src/shared/uiEventFeedbackMapper.ts new file mode 100644 index 0000000..41b453b --- /dev/null +++ b/packages/blinkid-ux-manager/src/shared/uiEventFeedbackMapper.ts @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2025 Microblink Ltd. All rights reserved. + */ + +import type { SdkUxEventData } from "@microblink/blinkid-core"; +import type { BlinkIdUiStateKey } from "../core/blinkid-ui-state"; +import { PingSdkUxEventImpl } from "./ping-implementations"; + +type ErrorStates = Extract< + BlinkIdUiStateKey, + | "DOCUMENT_FRAMING_CAMERA_TOO_FAR" + | "DOCUMENT_FRAMING_CAMERA_TOO_CLOSE" + | "DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP" + | "DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE" + | "BLUR_DETECTED" + | "GLARE_DETECTED" + | "TOO_DARK" + | "TOO_BRIGHT" + | "OCCLUDED" + | "FACE_PHOTO_OCCLUDED" + | "WRONG_SIDE" + | "WRONG_LEFT_PAGE" + | "WRONG_RIGHT_PAGE" + | "WRONG_TOP_PAGE" +>; + +const uiStateToErrorMessageMap: Record< + ErrorStates, + NonNullable +> = { + DOCUMENT_FRAMING_CAMERA_TOO_FAR: "MoveCloser", + DOCUMENT_FRAMING_CAMERA_TOO_CLOSE: "MoveFarther", + DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP: "AlignDocument", + DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE: "MoveFromEdge", + BLUR_DETECTED: "EliminateBlur", + GLARE_DETECTED: "EliminateGlare", + TOO_DARK: "IncreaseLighting", + TOO_BRIGHT: "DecreaseLighting", + OCCLUDED: "KeepVisible", + FACE_PHOTO_OCCLUDED: "KeepVisible", + WRONG_SIDE: "FlipSide", + WRONG_LEFT_PAGE: "FlipSide", + WRONG_RIGHT_PAGE: "FlipSide", + WRONG_TOP_PAGE: "FlipSide", +}; + +function isErrorState(key: BlinkIdUiStateKey): key is ErrorStates { + return key in uiStateToErrorMessageMap; +} + +export function createErrorMessagePingFromUiState( + uiStateKey: BlinkIdUiStateKey, +): PingSdkUxEventImpl | null { + if (isErrorState(uiStateKey)) { + const errorMessageType = uiStateToErrorMessageMap[uiStateKey]; + return new PingSdkUxEventImpl({ + eventType: "ErrorMessage", + errorMessageType, + }); + } + return null; +} diff --git a/packages/blinkid-ux-manager/src/ui/BlinkIdFeedbackUi.tsx b/packages/blinkid-ux-manager/src/ui/BlinkIdFeedbackUi.tsx index ecfb163..d65e1ee 100644 --- a/packages/blinkid-ux-manager/src/ui/BlinkIdFeedbackUi.tsx +++ b/packages/blinkid-ux-manager/src/ui/BlinkIdFeedbackUi.tsx @@ -9,13 +9,14 @@ import { createSignal, Match, onCleanup, + onMount, Show, Switch, } from "solid-js"; import { createWithSignal } from "solid-zustand"; import { BlinkIdUiState, - firstSideCapturedStates, + firstSideCapturedUiStateKeys, } from "../core/blinkid-ui-state"; import { LocalizationProvider, @@ -27,14 +28,15 @@ import { UiFeedbackOverlay } from "./UiFeedbackOverlay"; // this triggers extraction of CSS from the UnoCSS plugin import "virtual:uno.css"; -import { useBlinkIdUiStore } from "./BlinkIdUiStoreContext"; import { SmartEnvironmentProvider } from "@microblink/shared-components/SmartEnvironmentProvider"; -import { OnboardingGuideModal } from "./dialogs/OnboardingGuideModal"; -import { HelpButton, HelpModal } from "./dialogs/HelpModal"; -import { ErrorModal } from "./dialogs/ErrorModal"; import DemoOverlay from "./assets/demo-overlay.svg?component-solid"; import MicroblinkOverlay from "./assets/microblink.svg?component-solid"; +import { useBlinkIdUiStore } from "./BlinkIdUiStoreContext"; +import { ErrorModal } from "./dialogs/ErrorModal"; +import { HelpButton, HelpModal } from "./dialogs/HelpModal"; +import { OnboardingGuideModal } from "./dialogs/OnboardingGuideModal"; +import { PingSdkUxEventImpl } from "../shared/ping-implementations"; import styles from "./styles.module.scss"; /** @@ -52,10 +54,6 @@ export const BlinkIdFeedbackUi: Component<{ // `blinkIdUxManager` is not reactive, so we need to create a new signal for // the UI state. This is a hacky way to make the UI state reactive. - - // TODO: fix this - // only used to map LOW_QUALITY_FRONT and LOW_QUALITY_BACK to SENSING_FRONT - // and SENSING_BACK. const [uiState, setUiState] = createSignal( store.blinkIdUxManager.uiState, ); @@ -70,11 +68,36 @@ export const BlinkIdFeedbackUi: Component<{ onCleanup(() => errorCallbackCleanup()); }); + onMount(() => { + const cleanupDismountCallback = + store.cameraManagerComponent.addOnDismountCallback(() => { + cleanupDismountCallback(); + + // if not user-initiated, it's a regular dismount, not a button-click, + // so we early exit. + if (!store.cameraManagerComponent.cameraManager.userInitiatedAbort) { + return; + } + + void store.blinkIdUxManager.scanningSession.ping( + new PingSdkUxEventImpl({ + eventType: "CloseButtonClicked", + }), + ); + }); + }); + // Handle document filtered during scanning createEffect(() => { const documentFilteredCallbackCleanup = - store.blinkIdUxManager.addOnDocumentFilteredCallback((_) => { + store.blinkIdUxManager.addOnDocumentFilteredCallback(() => { updateStore({ documentFiltered: true }); + void store.blinkIdUxManager.scanningSession.ping( + new PingSdkUxEventImpl({ + eventType: "AlertDisplayed", + alertType: "DocumentClassNotAllowed", + }), + ); }); onCleanup(() => documentFilteredCallbackCleanup()); }); @@ -90,11 +113,14 @@ export const BlinkIdFeedbackUi: Component<{ const shouldShowFeedback = () => { return ( isProcessing() || - firstSideCapturedStates.includes(uiState().key) || + firstSideCapturedUiStateKeys.includes(uiState().key) || uiState().key === "DOCUMENT_CAPTURED" ); }; + const displayTimeoutModal = () => + store.showTimeoutModal && store.errorState === "timeout"; + const shouldShowDemoOverlay = () => { return store.blinkIdUxManager.getShowDemoOverlay(); }; @@ -103,15 +129,28 @@ export const BlinkIdFeedbackUi: Component<{ return store.blinkIdUxManager.getShowProductionOverlay(); }; + const handleUiStateChange = (newUiState: BlinkIdUiState) => { + setUiState(newUiState); + }; + createEffect(() => { const removeUiStateChangeCallback = - store.blinkIdUxManager.addOnUiStateChangedCallback((newUiState) => { - setUiState(newUiState); - }); + store.blinkIdUxManager.addOnUiStateChangedCallback(handleUiStateChange); onCleanup(() => removeUiStateChangeCallback()); }); + createEffect(() => { + if (displayTimeoutModal()) { + void store.blinkIdUxManager.scanningSession.ping( + new PingSdkUxEventImpl({ + eventType: "AlertDisplayed", + alertType: "StepTimeout", + }), + ); + } + }); + return (