@microblink/blinkid-core 7.2.1 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/blinkid-core.js +60 -53
  2. package/dist/blinkid-core.js.map +1 -1
  3. package/dist/resources/blinkid-worker.js +138 -16
  4. package/dist/resources/full/advanced/BlinkIdModule.data +0 -0
  5. package/dist/resources/full/advanced/BlinkIdModule.js +132 -144
  6. package/dist/resources/full/advanced/BlinkIdModule.wasm +0 -0
  7. package/dist/resources/full/advanced-threads/BlinkIdModule.data +0 -0
  8. package/dist/resources/full/advanced-threads/BlinkIdModule.js +158 -164
  9. package/dist/resources/full/advanced-threads/BlinkIdModule.wasm +0 -0
  10. package/dist/resources/full/basic/BlinkIdModule.data +0 -0
  11. package/dist/resources/full/basic/BlinkIdModule.js +131 -144
  12. package/dist/resources/full/basic/BlinkIdModule.wasm +0 -0
  13. package/dist/resources/lightweight/advanced/BlinkIdModule.data +0 -0
  14. package/dist/resources/lightweight/advanced/BlinkIdModule.js +131 -144
  15. package/dist/resources/lightweight/advanced/BlinkIdModule.wasm +0 -0
  16. package/dist/resources/lightweight/advanced-threads/BlinkIdModule.data +0 -0
  17. package/dist/resources/lightweight/advanced-threads/BlinkIdModule.js +158 -163
  18. package/dist/resources/lightweight/advanced-threads/BlinkIdModule.wasm +0 -0
  19. package/dist/resources/lightweight/basic/BlinkIdModule.data +0 -0
  20. package/dist/resources/lightweight/basic/BlinkIdModule.js +130 -144
  21. package/dist/resources/lightweight/basic/BlinkIdModule.wasm +0 -0
  22. package/package.json +1 -1
  23. package/types/createProxyWorker.d.ts.map +1 -1
  24. package/types/getCrossOriginWorkerURL.d.ts.map +1 -1
  25. package/types/getCrossOriginWorkerURL.test.d.ts +5 -0
  26. package/types/getCrossOriginWorkerURL.test.d.ts.map +1 -0
  27. package/types/index.rollup.d.ts +40 -5
  28. package/dist/resources/full/advanced-threads/BlinkIdModule.worker.mjs +0 -1
  29. package/dist/resources/lightweight/advanced-threads/BlinkIdModule.worker.mjs +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microblink/blinkid-core",
3
- "version": "7.2.1",
3
+ "version": "7.3.0",
4
4
  "author": "Microblink",
5
5
  "type": "module",
6
6
  "main": "./dist/blinkid-core.js",
@@ -1 +1 @@
1
- {"version":3,"file":"createProxyWorker.d.ts","sourceRoot":"","sources":["../src/createProxyWorker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAIrE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,oBAAmB,MAA6B,0DA4CjD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"createProxyWorker.d.ts","sourceRoot":"","sources":["../src/createProxyWorker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AA8DrE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,oBAAmB,MAA6B,0DAuBjD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getCrossOriginWorkerURL.d.ts","sourceRoot":"","sources":["../src/getCrossOriginWorkerURL.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,KAAK,OAAO,GAAG;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,mBAAmB,MAAM,EACzB,WAAU,OAAY,oBA4EvB,CAAC"}
1
+ {"version":3,"file":"getCrossOriginWorkerURL.d.ts","sourceRoot":"","sources":["../src/getCrossOriginWorkerURL.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,KAAK,OAAO,GAAG;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,mBAAmB,MAAM,EACzB,WAAU,OAAY,oBA6DvB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Copyright (c) 2025 Microblink Ltd. All rights reserved.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=getCrossOriginWorkerURL.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCrossOriginWorkerURL.test.d.ts","sourceRoot":"","sources":["../src/getCrossOriginWorkerURL.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -35,7 +35,7 @@ export declare type AlphabetType = "latin" | "arabic" | "cyrillic" | "greek";
35
35
  */
36
36
  /** Represents level of anonymization performed on the scanning result. */
37
37
  export declare type AnonymizationMode =
38
- /** FullDocumentImage is anonymized with black boxes covering sensitive data. */
38
+ /** DocumentImage is anonymized with black boxes covering sensitive data. */
39
39
  "image-only"
40
40
  /** Result fields containing sensitive data are removed from result. */
41
41
  | "result-fields-only"
@@ -953,6 +953,7 @@ export declare interface BlinkIdBindings {
953
953
  initializeWithLicenseKey: (licenceKey: string, userId: string, allowHelloMessage: boolean) => LicenseUnlockResult;
954
954
  submitServerPermission: (serverPermission: unknown) => ServerPermissionSubmitResult;
955
955
  getActiveLicenseTokenInfo: () => LicenseUnlockResult;
956
+ setPingProxyUrl: (url: string) => void;
956
957
  }
957
958
 
958
959
  export declare type BlinkIdCore = Simplify<Remote<BlinkIdWorkerProxy>>;
@@ -1050,6 +1051,14 @@ export declare type BlinkIdScanningResult = {
1050
1051
  specificDocumentValidity?: StringResult;
1051
1052
  /** The visa type of the document */
1052
1053
  visaType?: StringResult;
1054
+ /** The vehicle owner */
1055
+ vehicleOwner?: StringResult;
1056
+ /** The certificate number of the document owner */
1057
+ certificateNumber?: StringResult;
1058
+ /** The country code of the document owner */
1059
+ countryCode?: StringResult;
1060
+ /** The national insurance number of the document owner */
1061
+ nationalInsuranceNumber?: StringResult;
1053
1062
  /** The date of birth of the document owner */
1054
1063
  dateOfBirth?: DateResult<StringResult>;
1055
1064
  /** The date of issue of the document */
@@ -1178,11 +1187,26 @@ declare class BlinkIdWorker {
1178
1187
  }
1179
1188
 
1180
1189
  export declare type BlinkIdWorkerInitSettings = {
1190
+ licenseKey: string;
1191
+ /**
1192
+ * The URL of the Microblink proxy server. This proxy handles requests to Microblink's Baltazar and Ping servers.
1193
+ *
1194
+ * **Requirements:**
1195
+ * - Must be a valid HTTPS URL
1196
+ * - The proxy server must implement the expected Microblink API endpoints
1197
+ * - This feature is only available if explicitly permitted by your license
1198
+ *
1199
+ * **Endpoints:**
1200
+ * - Ping: `{proxyUrl}/ping`
1201
+ * - Baltazar: `{proxyUrl}/api/v2/status/check`
1202
+ *
1203
+ * @example "https://your-proxy.example.com"
1204
+ */
1205
+ microblinkProxyUrl?: string;
1181
1206
  /**
1182
1207
  * The parent directory where the `/resources` directory is hosted.
1183
1208
  * Defaults to `window.location.href`, at the root of the current page.
1184
1209
  */
1185
- licenseKey: string;
1186
1210
  resourcesLocation?: string;
1187
1211
  userId: string;
1188
1212
  wasmVariant?: WasmVariant;
@@ -1235,7 +1259,10 @@ export declare const createProxyWorker: (resourcesLocation?: string) => Promise<
1235
1259
  export declare type CroppedImageSettings = {
1236
1260
  /** The DPI value for the cropped image. */
1237
1261
  dotsPerInch: number;
1238
- /** The extension factor for the cropped image. Allowed value is from `0.0` to `1.0` */
1262
+ /**
1263
+ * The extension factor for the cropped image. Applicable only to
1264
+ * document images. Allowed value is from `0.0` to `1.0`
1265
+ */
1239
1266
  extensionFactor: number;
1240
1267
  /** Indicates whether the document image should be returned. */
1241
1268
  returnDocumentImage: boolean;
@@ -1462,7 +1489,7 @@ export declare type DocumentRules = {
1462
1489
  * Copyright (c) 2025 Microblink Ltd. All rights reserved.
1463
1490
  */
1464
1491
  /** Represents document class types */
1465
- declare type DocumentType_2 = "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";
1492
+ declare type DocumentType_2 = "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";
1466
1493
  export { DocumentType_2 as DocumentType }
1467
1494
 
1468
1495
  declare type DownloadProgress = {
@@ -1633,7 +1660,7 @@ export declare type ImageAnalysisLightingStatus =
1633
1660
  * Copyright (c) 2025 Microblink Ltd. All rights reserved.
1634
1661
  */
1635
1662
  /** Represents the types of images that can be extracted from the document. */
1636
- export declare type ImageExtractionType = "face" | "signature" | "full-document";
1663
+ export declare type ImageExtractionType = "face" | "signature" | "document";
1637
1664
 
1638
1665
  /**
1639
1666
  * Represents the results of processing and analyzing an input image.
@@ -1727,6 +1754,8 @@ export declare type LicenseUnlockResult = Readonly<{
1727
1754
  licenseError: string;
1728
1755
  showDemoOverlay: boolean;
1729
1756
  showProductionOverlay: boolean;
1757
+ allowBaltazarProxy: boolean;
1758
+ allowPingProxy: boolean;
1730
1759
  }>;
1731
1760
 
1732
1761
  /**
@@ -2461,6 +2490,12 @@ export declare type VizResult = {
2461
2490
  dependentsInfo?: DependentInfo[];
2462
2491
  /** The vehicle owner */
2463
2492
  vehicleOwner?: StringResult;
2493
+ /** The certificate number of the document owner */
2494
+ certificateNumber?: StringResult;
2495
+ /** The country code of the document owner */
2496
+ countryCode?: StringResult;
2497
+ /** The national insurance number of the document owner */
2498
+ nationalInsuranceNumber?: StringResult;
2464
2499
  };
2465
2500
 
2466
2501
  declare type WasmVariant = "basic" | "advanced" | "advanced-threads";
@@ -1 +0,0 @@
1
- "use strict";var Module={};var initializedJS=false;function threadPrintErr(...args){var text=args.join(" ");console.error(text)}function threadAlert(...args){var text=args.join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason||e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{Module=instance;postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=(...args)=>{postMessage({cmd:"callHandler",handler:handler,args:args})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;(e.data.urlOrBlob?import(e.data.urlOrBlob):import("./BlinkIdModule.js")).then(exports=>exports.default(Module))}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,/*is_main=*/0,/*is_runtime=*/0,/*can_block=*/1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err(`worker.js received unknown command ${e.data.cmd}`);err(e.data)}}catch(ex){Module["__emscripten_thread_crashed"]?.();throw ex}}self.onmessage=handleMessage;
@@ -1 +0,0 @@
1
- "use strict";var Module={};var initializedJS=false;function threadPrintErr(...args){var text=args.join(" ");console.error(text)}function threadAlert(...args){var text=args.join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason||e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{Module=instance;postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=(...args)=>{postMessage({cmd:"callHandler",handler:handler,args:args})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;(e.data.urlOrBlob?import(e.data.urlOrBlob):import("./BlinkIdModule.js")).then(exports=>exports.default(Module))}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,/*is_main=*/0,/*is_runtime=*/0,/*can_block=*/1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err(`worker.js received unknown command ${e.data.cmd}`);err(e.data)}}catch(ex){Module["__emscripten_thread_crashed"]?.();throw ex}}self.onmessage=handleMessage;