@microblink/blinkid-core 7.3.2 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blinkid-core.js +16 -0
- package/dist/blinkid-core.js.map +1 -1
- package/dist/resources/blinkid-worker.js +59 -18
- package/dist/resources/full/advanced/BlinkIdModule.data +0 -0
- package/dist/resources/full/advanced/BlinkIdModule.js +120 -122
- package/dist/resources/full/advanced/BlinkIdModule.wasm +0 -0
- package/dist/resources/full/advanced-threads/BlinkIdModule.data +0 -0
- package/dist/resources/full/advanced-threads/BlinkIdModule.js +144 -147
- package/dist/resources/full/advanced-threads/BlinkIdModule.wasm +0 -0
- package/dist/resources/full/basic/BlinkIdModule.data +0 -0
- package/dist/resources/full/basic/BlinkIdModule.js +118 -120
- package/dist/resources/full/basic/BlinkIdModule.wasm +0 -0
- package/dist/resources/lightweight/advanced/BlinkIdModule.data +0 -0
- package/dist/resources/lightweight/advanced/BlinkIdModule.js +119 -121
- package/dist/resources/lightweight/advanced/BlinkIdModule.wasm +0 -0
- package/dist/resources/lightweight/advanced-threads/BlinkIdModule.data +0 -0
- package/dist/resources/lightweight/advanced-threads/BlinkIdModule.js +143 -147
- package/dist/resources/lightweight/advanced-threads/BlinkIdModule.wasm +0 -0
- package/dist/resources/lightweight/basic/BlinkIdModule.data +0 -0
- package/dist/resources/lightweight/basic/BlinkIdModule.js +117 -119
- package/dist/resources/lightweight/basic/BlinkIdModule.wasm +0 -0
- package/package.json +1 -1
- package/types/BlinkIdCore.d.ts +17 -3
- package/types/BlinkIdCore.d.ts.map +1 -1
- package/types/createCustomImageData.d.ts +6 -8
- package/types/createCustomImageData.d.ts.map +1 -1
- package/types/createProxyWorker.d.ts +6 -0
- package/types/createProxyWorker.d.ts.map +1 -1
- package/types/defaultSessionSettings.d.ts +8 -0
- package/types/defaultSessionSettings.d.ts.map +1 -1
- package/types/getCrossOriginWorkerURL.d.ts +15 -0
- package/types/getCrossOriginWorkerURL.d.ts.map +1 -1
- package/types/getUserId.d.ts +4 -1
- package/types/getUserId.d.ts.map +1 -1
- package/types/index.d.ts +7 -0
- package/types/index.d.ts.map +1 -1
- package/types/index.rollup.d.ts +469 -106
- package/types/utils.d.ts +32 -0
- package/types/utils.d.ts.map +1 -1
package/types/index.rollup.d.ts
CHANGED
|
@@ -19,15 +19,18 @@ export declare type AddressDetailedInfo = {
|
|
|
19
19
|
|
|
20
20
|
/** Represents a string result for a specific alphabet */
|
|
21
21
|
export declare type AlphabetStringResult = {
|
|
22
|
+
/** The value of the string result. */
|
|
22
23
|
value: string;
|
|
24
|
+
/** The location of the string result. */
|
|
23
25
|
location?: Rectangle;
|
|
26
|
+
/** The side of the string result. */
|
|
24
27
|
side?: ScanningSide;
|
|
25
28
|
};
|
|
26
29
|
|
|
27
30
|
/**
|
|
28
31
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
29
32
|
*/
|
|
30
|
-
/** Represents the type of the alphabet used in the document */
|
|
33
|
+
/** Represents the type of the alphabet used in the document. */
|
|
31
34
|
export declare type AlphabetType = "latin" | "arabic" | "cyrillic" | "greek";
|
|
32
35
|
|
|
33
36
|
/**
|
|
@@ -57,8 +60,11 @@ export declare type BarcodeData = {
|
|
|
57
60
|
rawData: Uint8Array;
|
|
58
61
|
};
|
|
59
62
|
|
|
63
|
+
/** Represents a key-value pair of a barcode element. */
|
|
60
64
|
export declare type BarcodeElement = {
|
|
65
|
+
/** The key of the barcode element. */
|
|
61
66
|
key: BarcodeElementKey;
|
|
67
|
+
/** The value of the barcode element. */
|
|
62
68
|
value: string;
|
|
63
69
|
};
|
|
64
70
|
|
|
@@ -66,8 +72,8 @@ export declare type BarcodeElement = {
|
|
|
66
72
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
67
73
|
*/
|
|
68
74
|
/**
|
|
69
|
-
* BarcodeElementKey defines additional fields present in the barcode.
|
|
70
|
-
* only used for AAMVACompliant documents.
|
|
75
|
+
* BarcodeElementKey defines additional fields present in the barcode.
|
|
76
|
+
* Currently, this is only used for AAMVACompliant documents.
|
|
71
77
|
*/
|
|
72
78
|
export declare type BarcodeElementKey =
|
|
73
79
|
/**
|
|
@@ -948,6 +954,11 @@ export declare type BarcodeType =
|
|
|
948
954
|
/** Indicates that PDF417 2D barcode has been detected. */
|
|
949
955
|
| "pdf417-barcode";
|
|
950
956
|
|
|
957
|
+
/**
|
|
958
|
+
* The BlinkID bindings.
|
|
959
|
+
*
|
|
960
|
+
* @ignore
|
|
961
|
+
*/
|
|
951
962
|
export declare interface BlinkIdBindings {
|
|
952
963
|
createBlinkIdScanningSession: (sessionSettings: BlinkIdSessionSettings) => BlinkIdScanningSession;
|
|
953
964
|
initializeWithLicenseKey: (licenceKey: string, userId: string, allowHelloMessage: boolean) => LicenseUnlockResult;
|
|
@@ -956,8 +967,20 @@ export declare interface BlinkIdBindings {
|
|
|
956
967
|
setPingProxyUrl: (url: string) => void;
|
|
957
968
|
}
|
|
958
969
|
|
|
970
|
+
/**
|
|
971
|
+
* Represents the BlinkID core instance.
|
|
972
|
+
*
|
|
973
|
+
* This type extends the Remote type from Comlink, which is used to proxy calls to the BlinkID worker.
|
|
974
|
+
* It simplifies the type to remove unnecessary complexity.
|
|
975
|
+
*/
|
|
959
976
|
export declare type BlinkIdCore = Simplify<Remote<BlinkIdWorkerProxy>>;
|
|
960
977
|
|
|
978
|
+
/**
|
|
979
|
+
* Configuration options for initializing the BlinkID core.
|
|
980
|
+
*
|
|
981
|
+
* This type extends the BlinkIdWorkerInitSettings type by making the userId and useLightweightBuild properties optional.
|
|
982
|
+
* It allows for partial configuration of the initialization settings.
|
|
983
|
+
*/
|
|
961
984
|
export declare type BlinkIdInitSettings = SetOptional<BlinkIdWorkerInitSettings, "userId" | "useLightweightBuild">;
|
|
962
985
|
|
|
963
986
|
/**
|
|
@@ -974,6 +997,7 @@ export declare type BlinkIdProcessResult = {
|
|
|
974
997
|
resultCompleteness: ResultCompleteness;
|
|
975
998
|
};
|
|
976
999
|
|
|
1000
|
+
/** Represents the final complete result of the scanning process. */
|
|
977
1001
|
export declare type BlinkIdScanningResult = {
|
|
978
1002
|
/** Scanning mode used to scan current document */
|
|
979
1003
|
mode?: RecognitionMode;
|
|
@@ -1087,9 +1111,15 @@ export declare type BlinkIdScanningSession = EmbindObject<{
|
|
|
1087
1111
|
* Processes the input camera frame
|
|
1088
1112
|
*
|
|
1089
1113
|
* @param image The frame to process
|
|
1114
|
+
* @returns The `BlinkIdProcessResult` if successful, `BlinkIdSessionError` if
|
|
1115
|
+
* failed
|
|
1090
1116
|
*/
|
|
1091
1117
|
process: (image: ImageData) => BlinkIdProcessResult | BlinkIdSessionError;
|
|
1092
|
-
/**
|
|
1118
|
+
/**
|
|
1119
|
+
* Returns the result of the scanning session.
|
|
1120
|
+
*
|
|
1121
|
+
* @returns The `BlinkIdScanningResult`
|
|
1122
|
+
*/
|
|
1093
1123
|
getResult: () => BlinkIdScanningResult;
|
|
1094
1124
|
}>;
|
|
1095
1125
|
|
|
@@ -1098,15 +1128,14 @@ export declare type BlinkIdScanningSession = EmbindObject<{
|
|
|
1098
1128
|
* `BlinkIdScanningSession.reset`.
|
|
1099
1129
|
*/
|
|
1100
1130
|
export declare type BlinkIdSessionError = {
|
|
1131
|
+
/** The error type. */
|
|
1101
1132
|
error: BlinkIdSessionErrorType;
|
|
1102
1133
|
};
|
|
1103
1134
|
|
|
1104
1135
|
/**
|
|
1105
1136
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1106
1137
|
*/
|
|
1107
|
-
/**
|
|
1108
|
-
* Represents the error statuses returned from the `BlinkIDScanningSession`.
|
|
1109
|
-
*/
|
|
1138
|
+
/** Represents the error statuses returned from the `BlinkIDScanningSession`. */
|
|
1110
1139
|
export declare type BlinkIdSessionErrorType = "document-scanned" | "result-retrieved";
|
|
1111
1140
|
|
|
1112
1141
|
/**
|
|
@@ -1115,42 +1144,91 @@ export declare type BlinkIdSessionErrorType = "document-scanned" | "result-retri
|
|
|
1115
1144
|
* This structure holds the settings related to the resources initialization,
|
|
1116
1145
|
* input image source, scanning mode, and specific scanning configurations that
|
|
1117
1146
|
* define how the scanning session should behave.
|
|
1147
|
+
*
|
|
1148
|
+
* The settings control various aspects of the scanning process including:
|
|
1149
|
+
*
|
|
1150
|
+
* - Input source (video stream or single photo)
|
|
1151
|
+
*
|
|
1152
|
+
* - Scanning mode (single or multiple sides)
|
|
1153
|
+
*
|
|
1154
|
+
* - Document detection and quality analysis
|
|
1155
|
+
*
|
|
1156
|
+
* - Image processing and result extraction
|
|
1157
|
+
*
|
|
1158
|
+
* @public
|
|
1118
1159
|
*/
|
|
1119
1160
|
export declare type BlinkIdSessionSettings = {
|
|
1120
1161
|
/**
|
|
1121
1162
|
* The type of image source for the scanning session.
|
|
1122
1163
|
*
|
|
1123
1164
|
* Defines whether the images are sourced from a video stream or a single
|
|
1124
|
-
* photo, as defined by
|
|
1125
|
-
*
|
|
1165
|
+
* photo, as defined by `InputImageSource`. The default is set to `video` for
|
|
1166
|
+
* real-time scanning through a camera feed.
|
|
1167
|
+
*
|
|
1168
|
+
* - `video` - Uses continuous camera feed for scanning
|
|
1169
|
+
*
|
|
1170
|
+
* - `photo` - Uses a single captured photo for scanning
|
|
1171
|
+
*
|
|
1172
|
+
* @defaultValue `video`
|
|
1126
1173
|
*/
|
|
1127
1174
|
inputImageSource: InputImageSource;
|
|
1128
1175
|
/**
|
|
1129
1176
|
* The scanning mode to be used during the scanning session.
|
|
1130
1177
|
*
|
|
1131
1178
|
* Specifies whether the scanning is for a single side of a document or
|
|
1132
|
-
* multiple sides, as defined in
|
|
1133
|
-
* `automatic`, which automatically determines the number of sides to scan
|
|
1179
|
+
* multiple sides, as defined in `ScanningMode`. The default is set to
|
|
1180
|
+
* `automatic`, which automatically determines the number of sides to scan
|
|
1181
|
+
* based on the detected document type.
|
|
1182
|
+
*
|
|
1183
|
+
* - `automatic` - Automatically determines required sides
|
|
1184
|
+
*
|
|
1185
|
+
* - `single` - Scans only one side
|
|
1186
|
+
*
|
|
1187
|
+
* @defaultValue `automatic`
|
|
1134
1188
|
*/
|
|
1135
1189
|
scanningMode: ScanningMode;
|
|
1136
1190
|
/**
|
|
1137
1191
|
* The specific scanning settings for the scanning session.
|
|
1138
1192
|
*
|
|
1139
|
-
* Defines various parameters that control the scanning process
|
|
1193
|
+
* Defines various parameters that control the scanning process including:
|
|
1194
|
+
*
|
|
1195
|
+
* - Document detection and quality thresholds
|
|
1196
|
+
* - Image processing options
|
|
1197
|
+
* - Result extraction and validation rules
|
|
1198
|
+
* - Document-specific scanning behaviors
|
|
1199
|
+
*
|
|
1200
|
+
* @see `ScanningSettings` for detailed configuration options
|
|
1140
1201
|
*/
|
|
1141
1202
|
scanningSettings: ScanningSettings;
|
|
1142
1203
|
};
|
|
1143
1204
|
|
|
1205
|
+
/**
|
|
1206
|
+
* The BlinkID Wasm module.
|
|
1207
|
+
*
|
|
1208
|
+
* @ignore
|
|
1209
|
+
*/
|
|
1144
1210
|
export declare interface BlinkIdWasmModule extends BlinkIdBindings, EmscriptenModule {
|
|
1145
1211
|
}
|
|
1146
1212
|
|
|
1213
|
+
/**
|
|
1214
|
+
* The BlinkID worker.
|
|
1215
|
+
*/
|
|
1147
1216
|
declare class BlinkIdWorker {
|
|
1148
1217
|
#private;
|
|
1218
|
+
/**
|
|
1219
|
+
* The progress status callback.
|
|
1220
|
+
*/
|
|
1149
1221
|
progressStatusCallback?: ProgressStatusCallback;
|
|
1150
1222
|
/**
|
|
1151
1223
|
* This method initializes everything.
|
|
1152
1224
|
*/
|
|
1153
1225
|
initBlinkId(settings: BlinkIdWorkerInitSettings, defaultSessionSettings: BlinkIdSessionSettings, progressCallback?: ProgressStatusCallback): Promise<void>;
|
|
1226
|
+
/**
|
|
1227
|
+
* This method creates a BlinkID scanning session.
|
|
1228
|
+
*
|
|
1229
|
+
* @param options - The options for the session.
|
|
1230
|
+
* @returns The session.
|
|
1231
|
+
*/
|
|
1154
1232
|
createBlinkIdScanningSession(options?: PartialBlinkIdSessionSettings): {
|
|
1155
1233
|
reset: () => void | BlinkIdSessionError;
|
|
1156
1234
|
getResult: () => BlinkIdScanningResult;
|
|
@@ -1160,10 +1238,32 @@ declare class BlinkIdWorker {
|
|
|
1160
1238
|
isAliasOf: (other: any) => boolean;
|
|
1161
1239
|
process: (image: ImageData) => ProcessResultWithBuffer;
|
|
1162
1240
|
} & {
|
|
1241
|
+
/**
|
|
1242
|
+
* Gets the settings.
|
|
1243
|
+
*
|
|
1244
|
+
* @returns The settings.
|
|
1245
|
+
*/
|
|
1163
1246
|
getSettings: () => BlinkIdSessionSettings;
|
|
1247
|
+
/**
|
|
1248
|
+
* Shows the demo overlay.
|
|
1249
|
+
*
|
|
1250
|
+
* @returns Whether the demo overlay is shown.
|
|
1251
|
+
*/
|
|
1164
1252
|
showDemoOverlay: () => boolean;
|
|
1253
|
+
/**
|
|
1254
|
+
* Shows the production overlay.
|
|
1255
|
+
*
|
|
1256
|
+
* @returns Whether the production overlay is shown.
|
|
1257
|
+
*/
|
|
1165
1258
|
showProductionOverlay: () => boolean;
|
|
1166
1259
|
} & ProxyMarked;
|
|
1260
|
+
/**
|
|
1261
|
+
* This method creates a proxy session.
|
|
1262
|
+
*
|
|
1263
|
+
* @param session - The session.
|
|
1264
|
+
* @param sessionSettings - The session settings.
|
|
1265
|
+
* @returns The proxy session.
|
|
1266
|
+
*/
|
|
1167
1267
|
createProxySession(session: BlinkIdScanningSession, sessionSettings: BlinkIdSessionSettings): WorkerScanningSession & ProxyMarked;
|
|
1168
1268
|
/**
|
|
1169
1269
|
* This method is called when the worker is terminated.
|
|
@@ -1173,10 +1273,25 @@ declare class BlinkIdWorker {
|
|
|
1173
1273
|
* Terminates the workers and the Wasm runtime.
|
|
1174
1274
|
*/
|
|
1175
1275
|
terminate(): void;
|
|
1276
|
+
/**
|
|
1277
|
+
* If the ping is enabled, this method will return 1.
|
|
1278
|
+
*
|
|
1279
|
+
* @returns 1 if the ping is enabled, 0 otherwise.
|
|
1280
|
+
*/
|
|
1176
1281
|
ping(): number;
|
|
1177
1282
|
}
|
|
1178
1283
|
|
|
1284
|
+
/**
|
|
1285
|
+
* Initialization settings for the BlinkID worker.
|
|
1286
|
+
*
|
|
1287
|
+
* These settings control how the BlinkID worker is initialized and configured,
|
|
1288
|
+
* including resource locations, memory allocation, and build variants.
|
|
1289
|
+
*/
|
|
1179
1290
|
export declare type BlinkIdWorkerInitSettings = {
|
|
1291
|
+
/**
|
|
1292
|
+
* The license key required to unlock and use the BlinkID SDK.
|
|
1293
|
+
* This must be a valid license key obtained from Microblink.
|
|
1294
|
+
*/
|
|
1180
1295
|
licenseKey: string;
|
|
1181
1296
|
/**
|
|
1182
1297
|
* The URL of the Microblink proxy server. This proxy handles requests to Microblink's Baltazar and Ping servers.
|
|
@@ -1198,17 +1313,38 @@ export declare type BlinkIdWorkerInitSettings = {
|
|
|
1198
1313
|
* Defaults to `window.location.href`, at the root of the current page.
|
|
1199
1314
|
*/
|
|
1200
1315
|
resourcesLocation?: string;
|
|
1316
|
+
/**
|
|
1317
|
+
* A unique identifier for the user/session.
|
|
1318
|
+
* Used for analytics and tracking purposes.
|
|
1319
|
+
*/
|
|
1201
1320
|
userId: string;
|
|
1321
|
+
/**
|
|
1322
|
+
* The WebAssembly module variant to use.
|
|
1323
|
+
* Different variants may offer different performance/size tradeoffs.
|
|
1324
|
+
*/
|
|
1202
1325
|
wasmVariant?: WasmVariant;
|
|
1203
1326
|
/**
|
|
1204
1327
|
* The initial memory allocation for the Wasm module, in megabytes.
|
|
1328
|
+
* Larger values may improve performance but increase memory usage.
|
|
1205
1329
|
*/
|
|
1206
1330
|
initialMemory?: number;
|
|
1331
|
+
/**
|
|
1332
|
+
* Whether to use the lightweight build of the SDK.
|
|
1333
|
+
* Lightweight builds have reduced size but may have limited functionality.
|
|
1334
|
+
*/
|
|
1207
1335
|
useLightweightBuild: boolean;
|
|
1208
1336
|
};
|
|
1209
1337
|
|
|
1338
|
+
/**
|
|
1339
|
+
* The BlinkID worker proxy.
|
|
1340
|
+
*/
|
|
1210
1341
|
export declare type BlinkIdWorkerProxy = Omit<BlinkIdWorker, typeof finalizer>;
|
|
1211
1342
|
|
|
1343
|
+
/**
|
|
1344
|
+
* Options for a C call.
|
|
1345
|
+
*
|
|
1346
|
+
* @ignore
|
|
1347
|
+
*/
|
|
1212
1348
|
export declare interface CCallOpts {
|
|
1213
1349
|
async?: boolean | undefined;
|
|
1214
1350
|
}
|
|
@@ -1223,15 +1359,13 @@ export declare type Country = "albania" | "algeria" | "argentina" | "australia"
|
|
|
1223
1359
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1224
1360
|
*/
|
|
1225
1361
|
/**
|
|
1226
|
-
*
|
|
1227
|
-
*
|
|
1362
|
+
* Creates a custom ImageData object with the same properties as the original ImageData.
|
|
1363
|
+
* This is a workaround for the performance issue in Chromium browsers.
|
|
1364
|
+
*
|
|
1365
|
+
* @param imageData - The original ImageData object to be wrapped.
|
|
1366
|
+
* @returns A custom ImageData object with the same properties.
|
|
1228
1367
|
*/
|
|
1229
|
-
export declare function createCustomImageData(imageData: ImageData):
|
|
1230
|
-
data: Uint8ClampedArray<ArrayBufferLike>;
|
|
1231
|
-
width: number;
|
|
1232
|
-
height: number;
|
|
1233
|
-
colorSpace: PredefinedColorSpace;
|
|
1234
|
-
};
|
|
1368
|
+
export declare function createCustomImageData(imageData: ImageData): ImageData;
|
|
1235
1369
|
|
|
1236
1370
|
/**
|
|
1237
1371
|
* Creates a Comlink-proxied Web Worker
|
|
@@ -1245,20 +1379,40 @@ export declare const createProxyWorker: (resourcesLocation?: string) => Promise<
|
|
|
1245
1379
|
/**
|
|
1246
1380
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1247
1381
|
*/
|
|
1248
|
-
/**
|
|
1382
|
+
/**
|
|
1383
|
+
* Represents the image cropping options.
|
|
1384
|
+
*
|
|
1385
|
+
* @public
|
|
1386
|
+
*/
|
|
1249
1387
|
export declare type CroppedImageSettings = {
|
|
1250
|
-
/**
|
|
1388
|
+
/**
|
|
1389
|
+
* The DPI value for the cropped image - Specifies the resolution of the
|
|
1390
|
+
* output image.
|
|
1391
|
+
*/
|
|
1251
1392
|
dotsPerInch: number;
|
|
1252
1393
|
/**
|
|
1253
|
-
* The extension factor for the cropped image
|
|
1254
|
-
*
|
|
1394
|
+
* The extension factor for the cropped image - Determines the additional
|
|
1395
|
+
* space around the detected document. Applicable only to document images.
|
|
1396
|
+
* Allowed value is from `0.0` to `1.0`. This determines how much additional
|
|
1397
|
+
* space around the detected document should be included in the crop.
|
|
1255
1398
|
*/
|
|
1256
1399
|
extensionFactor: number;
|
|
1257
|
-
/**
|
|
1400
|
+
/**
|
|
1401
|
+
* Whether the document image should be returned - Controls document image
|
|
1402
|
+
* output. When true, the cropped document image will be included in the
|
|
1403
|
+
* result.
|
|
1404
|
+
*/
|
|
1258
1405
|
returnDocumentImage: boolean;
|
|
1259
|
-
/**
|
|
1406
|
+
/**
|
|
1407
|
+
* Whether the face image should be returned - Controls face image output.
|
|
1408
|
+
* When true, the cropped face image will be included in the result.
|
|
1409
|
+
*/
|
|
1260
1410
|
returnFaceImage: boolean;
|
|
1261
|
-
/**
|
|
1411
|
+
/**
|
|
1412
|
+
* Whether the signature image should be returned - Controls signature image
|
|
1413
|
+
* output. When true, the cropped signature image will be included in the
|
|
1414
|
+
* result.
|
|
1415
|
+
*/
|
|
1262
1416
|
returnSignatureImage: boolean;
|
|
1263
1417
|
};
|
|
1264
1418
|
|
|
@@ -1273,9 +1427,11 @@ export declare type DataMatchFieldState = {
|
|
|
1273
1427
|
/** Type of field on which data match algorithm has been performed. */
|
|
1274
1428
|
export declare type DataMatchFieldType = "date-of-birth" | "date-of-expiry" | "document-number" | "document-additional-number" | "document-optional-additional-number" | "personal-id-number";
|
|
1275
1429
|
|
|
1430
|
+
/** Represents the result of the data match algorithm. */
|
|
1276
1431
|
export declare type DataMatchResult = {
|
|
1277
1432
|
/** Info on whether the data extracted from multiple sides matches */
|
|
1278
1433
|
statePerField?: DataMatchFieldState[];
|
|
1434
|
+
/** The overall state of the data match. */
|
|
1279
1435
|
overallState: DataMatchState;
|
|
1280
1436
|
};
|
|
1281
1437
|
|
|
@@ -1288,7 +1444,11 @@ export declare type DataMatchResult = {
|
|
|
1288
1444
|
*/
|
|
1289
1445
|
export declare type DataMatchState = "not-performed" | "failed" | "success";
|
|
1290
1446
|
|
|
1291
|
-
/**
|
|
1447
|
+
/**
|
|
1448
|
+
* Smart date result structure.
|
|
1449
|
+
*
|
|
1450
|
+
* @template S - The type of the string result.
|
|
1451
|
+
*/
|
|
1292
1452
|
export declare type DateResult<S extends string | StringResult> = {
|
|
1293
1453
|
/** Day in month [1-31] */
|
|
1294
1454
|
day?: number;
|
|
@@ -1304,6 +1464,14 @@ export declare type DateResult<S extends string | StringResult> = {
|
|
|
1304
1464
|
successfullyParsed?: boolean;
|
|
1305
1465
|
};
|
|
1306
1466
|
|
|
1467
|
+
/**
|
|
1468
|
+
* Default session settings for BlinkID core.
|
|
1469
|
+
*
|
|
1470
|
+
* This is the default session settings for BlinkID core.
|
|
1471
|
+
* It is used to initialize the BlinkID core instance, unless overridden by the user.
|
|
1472
|
+
*
|
|
1473
|
+
* @see BlinkIdSessionSettings for more details.
|
|
1474
|
+
*/
|
|
1307
1475
|
export declare const defaultSessionSettings: BlinkIdSessionSettings;
|
|
1308
1476
|
|
|
1309
1477
|
/** The additional information on the document owner's dependents. */
|
|
@@ -1323,8 +1491,11 @@ export declare type DependentInfo = {
|
|
|
1323
1491
|
* details.
|
|
1324
1492
|
*/
|
|
1325
1493
|
export declare type DetailedCroppedImageResult = {
|
|
1494
|
+
/** The image data. */
|
|
1326
1495
|
image: ImageData;
|
|
1496
|
+
/** The location of the image. */
|
|
1327
1497
|
location?: Rectangle;
|
|
1498
|
+
/** The side of the image. */
|
|
1328
1499
|
side?: ScanningSide;
|
|
1329
1500
|
};
|
|
1330
1501
|
|
|
@@ -1344,32 +1515,40 @@ export declare type DetailedFieldType = {
|
|
|
1344
1515
|
*
|
|
1345
1516
|
* DetectionLevel is used to configure detection thresholds and enable or
|
|
1346
1517
|
* disable detection functionality. The levels range from turning detection off
|
|
1347
|
-
* completely to setting various levels of sensitivity (low,
|
|
1518
|
+
* completely to setting various levels of sensitivity (low, mid, high).
|
|
1348
1519
|
*/
|
|
1349
1520
|
export declare type DetectionLevel = "off" | "low" | "mid" | "high";
|
|
1350
1521
|
|
|
1351
1522
|
/**
|
|
1352
1523
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1353
1524
|
*/
|
|
1354
|
-
/**
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1525
|
+
/**
|
|
1526
|
+
* Represents the status of the document detection process.
|
|
1527
|
+
*
|
|
1528
|
+
* This type represents all possible states that can occur during document detection:
|
|
1529
|
+
*
|
|
1530
|
+
* - `failed`
|
|
1531
|
+
* - Detection has failed
|
|
1532
|
+
*
|
|
1533
|
+
* - `success`
|
|
1534
|
+
* - Document has been successfully detected
|
|
1535
|
+
*
|
|
1536
|
+
* - `camera-too-far`
|
|
1537
|
+
* - Camera is positioned too far from the document
|
|
1538
|
+
*
|
|
1539
|
+
* - `camera-too-close`
|
|
1540
|
+
* - Camera is positioned too close to the document
|
|
1541
|
+
*
|
|
1542
|
+
* - `camera-angle-too-steep`
|
|
1543
|
+
* - Camera angle relative to the document is too steep
|
|
1544
|
+
*
|
|
1545
|
+
* - `document-too-close-to-camera-edge`
|
|
1546
|
+
* - Document is positioned too close to the edge of camera view
|
|
1547
|
+
*
|
|
1548
|
+
* - `document-partially-visible`
|
|
1549
|
+
* - Only part of the document is visible in camera view
|
|
1550
|
+
*/
|
|
1551
|
+
export declare type DetectionStatus = "failed" | "success" | "camera-too-far" | "camera-too-close" | "camera-angle-too-steep" | "document-too-close-to-camera-edge" | "document-partially-visible";
|
|
1373
1552
|
|
|
1374
1553
|
/** Represents the document anonymization settings. */
|
|
1375
1554
|
export declare type DocumentAnonymizationSettings = {
|
|
@@ -1381,6 +1560,7 @@ export declare type DocumentAnonymizationSettings = {
|
|
|
1381
1560
|
documentNumberAnonymizationSettings?: DocumentNumberAnonymizationSettings;
|
|
1382
1561
|
};
|
|
1383
1562
|
|
|
1563
|
+
/** Represents the document class information. */
|
|
1384
1564
|
export declare type DocumentClassInfo = {
|
|
1385
1565
|
/** The document country. */
|
|
1386
1566
|
country?: Country;
|
|
@@ -1432,7 +1612,7 @@ export declare type DocumentImageColor =
|
|
|
1432
1612
|
/** Color image scanned */
|
|
1433
1613
|
| "color";
|
|
1434
1614
|
|
|
1435
|
-
/** Represents the document number
|
|
1615
|
+
/** Represents the document number anonymization settings. */
|
|
1436
1616
|
export declare type DocumentNumberAnonymizationSettings = {
|
|
1437
1617
|
/**
|
|
1438
1618
|
* Defines how many digits at the beginning of the document number remain
|
|
@@ -1482,13 +1662,20 @@ export declare type DocumentRules = {
|
|
|
1482
1662
|
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";
|
|
1483
1663
|
export { DocumentType_2 as DocumentType }
|
|
1484
1664
|
|
|
1665
|
+
/**
|
|
1666
|
+
* The download progress.
|
|
1667
|
+
*/
|
|
1485
1668
|
declare type DownloadProgress = {
|
|
1486
1669
|
loaded: number;
|
|
1487
1670
|
contentLength: number;
|
|
1488
1671
|
progress: number;
|
|
1489
1672
|
};
|
|
1490
1673
|
|
|
1491
|
-
/**
|
|
1674
|
+
/**
|
|
1675
|
+
* Represents detailed information from a driver's license.
|
|
1676
|
+
*
|
|
1677
|
+
* @template S - The type of the string result.
|
|
1678
|
+
*/
|
|
1492
1679
|
export declare type DriverLicenceDetailedInfo<S extends string | StringResult> = {
|
|
1493
1680
|
/**
|
|
1494
1681
|
* The restrictions to driving privileges for the United States driver license
|
|
@@ -1511,8 +1698,9 @@ export declare type DriverLicenceDetailedInfo<S extends string | StringResult> =
|
|
|
1511
1698
|
* JavaScript engine. The memory used by the object must be cleaned up manually
|
|
1512
1699
|
* by calling the delete() method.
|
|
1513
1700
|
*
|
|
1514
|
-
*
|
|
1515
|
-
*
|
|
1701
|
+
* @see https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#memory-management for more details.
|
|
1702
|
+
*
|
|
1703
|
+
* @ignore
|
|
1516
1704
|
*/
|
|
1517
1705
|
export declare type EmbindObject<T extends {}> = T & {
|
|
1518
1706
|
delete: () => void;
|
|
@@ -1521,6 +1709,11 @@ export declare type EmbindObject<T extends {}> = T & {
|
|
|
1521
1709
|
isAliasOf: (other: any) => boolean;
|
|
1522
1710
|
};
|
|
1523
1711
|
|
|
1712
|
+
/**
|
|
1713
|
+
* The main EmscriptenModule interface.
|
|
1714
|
+
*
|
|
1715
|
+
* @ignore
|
|
1716
|
+
*/
|
|
1524
1717
|
export declare interface EmscriptenModule {
|
|
1525
1718
|
print(str: string): void;
|
|
1526
1719
|
printErr(str: string): void;
|
|
@@ -1602,30 +1795,80 @@ export declare interface EmscriptenModule {
|
|
|
1602
1795
|
* application's types.
|
|
1603
1796
|
*
|
|
1604
1797
|
* @param moduleOverrides Default properties for the initialized module.
|
|
1798
|
+
*
|
|
1799
|
+
* @ignore
|
|
1605
1800
|
*/
|
|
1606
1801
|
export declare type EmscriptenModuleFactory<T extends EmscriptenModule = EmscriptenModule> = (moduleOverrides?: Partial<T>) => Promise<T>;
|
|
1607
1802
|
|
|
1803
|
+
/**
|
|
1804
|
+
* The environment type.
|
|
1805
|
+
*
|
|
1806
|
+
* @ignore
|
|
1807
|
+
*/
|
|
1608
1808
|
export declare type EnvironmentType = "WEB" | "NODE" | "SHELL" | "WORKER";
|
|
1609
1809
|
|
|
1810
|
+
/**
|
|
1811
|
+
* Extracts the barcode input image from the scanning result.
|
|
1812
|
+
*
|
|
1813
|
+
* @param blinkIdScanningResult - The scanning result.
|
|
1814
|
+
* @returns The barcode input image.
|
|
1815
|
+
*/
|
|
1610
1816
|
export declare function extractBarcodeImage(blinkIdScanningResult: BlinkIdScanningResult): ImageData | null;
|
|
1611
1817
|
|
|
1818
|
+
/**
|
|
1819
|
+
* Extracts the face image from the scanning result.
|
|
1820
|
+
*
|
|
1821
|
+
* @param blinkIdScanningResult - The scanning result.
|
|
1822
|
+
* @returns The face image.
|
|
1823
|
+
*/
|
|
1612
1824
|
export declare function extractFaceImage(blinkIdScanningResult: BlinkIdScanningResult): ImageData | null;
|
|
1613
1825
|
|
|
1826
|
+
/**
|
|
1827
|
+
* Extracts the document image for a given side from the scanning result.
|
|
1828
|
+
*
|
|
1829
|
+
* @param blinkIdScanningResult - The scanning result.
|
|
1830
|
+
* @param side - The side to extract the document image for.
|
|
1831
|
+
* @returns The document image for the given side.
|
|
1832
|
+
*/
|
|
1614
1833
|
export declare function extractSideDocumentImage(blinkIdScanningResult: BlinkIdScanningResult, side: ScanningSide): ImageData | null;
|
|
1615
1834
|
|
|
1835
|
+
/**
|
|
1836
|
+
* Extracts the input image for a given side from the scanning result.
|
|
1837
|
+
*
|
|
1838
|
+
* @param blinkIdScanningResult - The scanning result.
|
|
1839
|
+
* @param side - The side to extract the input image for.
|
|
1840
|
+
* @returns The input image for the given side.
|
|
1841
|
+
*/
|
|
1616
1842
|
export declare function extractSideInputImage(blinkIdScanningResult: BlinkIdScanningResult, side: ScanningSide): ImageData | null;
|
|
1617
1843
|
|
|
1844
|
+
/**
|
|
1845
|
+
* Extracts the signature image from the scanning result.
|
|
1846
|
+
*
|
|
1847
|
+
* @param blinkIdScanningResult - The scanning result.
|
|
1848
|
+
* @returns The signature image.
|
|
1849
|
+
*/
|
|
1618
1850
|
export declare function extractSignatureImage(blinkIdScanningResult: BlinkIdScanningResult): ImageData | null;
|
|
1619
1851
|
|
|
1852
|
+
/** Represents all possible field types that can be extracted from the document. */
|
|
1620
1853
|
export declare type FieldType = Simplify<keyof VizResult | "mrz">;
|
|
1621
1854
|
|
|
1855
|
+
/**
|
|
1856
|
+
* Gets a cross-origin worker URL as a data URL or blob URL. If the URL is same-origin, it will return the original URL.
|
|
1857
|
+
*
|
|
1858
|
+
* @param originalWorkerUrl - The original worker URL.
|
|
1859
|
+
* @param _options - The options for the worker.
|
|
1860
|
+
* @returns A promise that resolves with the cross-origin worker URL.
|
|
1861
|
+
*/
|
|
1622
1862
|
export declare const getCrossOriginWorkerURL: (originalWorkerUrl: string, _options?: Options) => Promise<string>;
|
|
1623
1863
|
|
|
1624
1864
|
/**
|
|
1625
1865
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1626
1866
|
*/
|
|
1627
1867
|
/**
|
|
1628
|
-
* Gets the user id from local storage, or generates a new one
|
|
1868
|
+
* Gets the user id from local storage, or generates a new one.
|
|
1869
|
+
*
|
|
1870
|
+
* This is a workaround for the lack of a user id in the worker scope.
|
|
1871
|
+
*
|
|
1629
1872
|
* @returns a unique user id
|
|
1630
1873
|
*/
|
|
1631
1874
|
export declare function getUserId(): string;
|
|
@@ -1722,50 +1965,96 @@ export declare type InputImageAnalysisResult = {
|
|
|
1722
1965
|
/**
|
|
1723
1966
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1724
1967
|
*/
|
|
1968
|
+
/**
|
|
1969
|
+
* Represents the source type of an image.
|
|
1970
|
+
*
|
|
1971
|
+
* This type is used to indicate whether an image was obtained from a video
|
|
1972
|
+
* stream or a single-source input such as a standalone photo.
|
|
1973
|
+
*/
|
|
1725
1974
|
export declare type InputImageSource = "video" | "photo";
|
|
1726
1975
|
|
|
1976
|
+
/**
|
|
1977
|
+
* Error thrown when license unlock fails
|
|
1978
|
+
*/
|
|
1979
|
+
export declare class LicenseError extends Error {
|
|
1980
|
+
code: LicenseErrorCode;
|
|
1981
|
+
constructor(message: string, code: LicenseErrorCode);
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
export declare type LicenseErrorCode = "LICENSE_ERROR";
|
|
1985
|
+
|
|
1986
|
+
/** The license request. */
|
|
1727
1987
|
export declare type LicenseRequest = Readonly<{
|
|
1988
|
+
/** The license id. */
|
|
1728
1989
|
licenseId: string;
|
|
1990
|
+
/** The licensee. */
|
|
1729
1991
|
licensee: string;
|
|
1992
|
+
/** The application ids. */
|
|
1730
1993
|
applicationIds: Array<string>;
|
|
1994
|
+
/** The package name. */
|
|
1731
1995
|
packageName: string;
|
|
1996
|
+
/** The platform. */
|
|
1732
1997
|
platform: string;
|
|
1998
|
+
/** The sdk name. */
|
|
1733
1999
|
sdkName: string;
|
|
2000
|
+
/** The sdk version. */
|
|
1734
2001
|
sdkVersion: string;
|
|
1735
2002
|
}>;
|
|
1736
2003
|
|
|
2004
|
+
/** The license status response. */
|
|
1737
2005
|
export declare type LicenseStatusResponse = Record<string, string>;
|
|
1738
2006
|
|
|
2007
|
+
/** The license token state. */
|
|
1739
2008
|
export declare type LicenseTokenState = "invalid" | "requires-server-permission" | "valid";
|
|
1740
2009
|
|
|
1741
2010
|
/**
|
|
1742
2011
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1743
2012
|
*/
|
|
2013
|
+
/** The license unlock result. */
|
|
1744
2014
|
export declare type LicenseUnlockResult = Readonly<{
|
|
2015
|
+
/** Whether the license is a trial license. */
|
|
1745
2016
|
isTrial: boolean;
|
|
2017
|
+
/** Whether the license has ping enabled. */
|
|
1746
2018
|
hasPing: boolean;
|
|
2019
|
+
/** The license id. */
|
|
1747
2020
|
licenseId: string;
|
|
2021
|
+
/** The licensee. */
|
|
1748
2022
|
licensee: string;
|
|
2023
|
+
/** The application ids. */
|
|
1749
2024
|
applicationIds: Array<string>;
|
|
2025
|
+
/** The package name. */
|
|
1750
2026
|
packageName: string;
|
|
2027
|
+
/** The sdk name. */
|
|
1751
2028
|
sdkName: string;
|
|
2029
|
+
/** The sdk version. */
|
|
1752
2030
|
sdkVersion: string;
|
|
2031
|
+
/** The unlock result. */
|
|
1753
2032
|
unlockResult: LicenseTokenState;
|
|
2033
|
+
/** The license error. */
|
|
1754
2034
|
licenseError: string;
|
|
2035
|
+
/** Whether to show the demo overlay. */
|
|
1755
2036
|
showDemoOverlay: boolean;
|
|
2037
|
+
/** Whether to show the production overlay. */
|
|
1756
2038
|
showProductionOverlay: boolean;
|
|
2039
|
+
/** Whether to allow baltazar proxy. */
|
|
1757
2040
|
allowBaltazarProxy: boolean;
|
|
2041
|
+
/** Whether to allow ping proxy. */
|
|
1758
2042
|
allowPingProxy: boolean;
|
|
1759
2043
|
}>;
|
|
1760
2044
|
|
|
1761
2045
|
/**
|
|
1762
|
-
* Creates
|
|
2046
|
+
* Creates and initializes a BlinkID core instance.
|
|
1763
2047
|
*
|
|
1764
|
-
* @param
|
|
1765
|
-
* @param
|
|
2048
|
+
* @param settings - Configuration for BlinkID initialization including license key and resources location
|
|
2049
|
+
* @param progressCallback - Optional callback for tracking resource download progress (WASM, data files)
|
|
2050
|
+
* @returns Promise that resolves with initialized BlinkID core instance
|
|
2051
|
+
* @throws Error if initialization fails
|
|
1766
2052
|
*/
|
|
1767
2053
|
export declare function loadBlinkIdCore(settings: BlinkIdInitSettings, progressCallback?: ProgressStatusCallback): Promise<BlinkIdCore>;
|
|
1768
2054
|
|
|
2055
|
+
/**
|
|
2056
|
+
* The load Wasm params.
|
|
2057
|
+
*/
|
|
1769
2058
|
export declare type LoadWasmParams = {
|
|
1770
2059
|
resourceUrl: string;
|
|
1771
2060
|
variant?: WasmVariant;
|
|
@@ -1827,15 +2116,29 @@ export declare type MrzResult = {
|
|
|
1827
2116
|
/**
|
|
1828
2117
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1829
2118
|
*/
|
|
2119
|
+
/**
|
|
2120
|
+
* Options for the getCrossOriginWorkerURL function.
|
|
2121
|
+
*
|
|
2122
|
+
* @param skipSameOrigin - If true, the function will return the original URL if it is same-origin.
|
|
2123
|
+
* @param useBlob - If true, the function will return a blob URL.
|
|
2124
|
+
*/
|
|
1830
2125
|
declare type Options = {
|
|
2126
|
+
/** If true, the function will return the original URL if it is same-origin. */
|
|
1831
2127
|
skipSameOrigin?: boolean;
|
|
2128
|
+
/** If true, the function will return a blob URL if not same-origin. */
|
|
1832
2129
|
useBlob?: boolean;
|
|
1833
2130
|
};
|
|
1834
2131
|
|
|
2132
|
+
/**
|
|
2133
|
+
* The partial BlinkID session settings.
|
|
2134
|
+
*/
|
|
1835
2135
|
declare type PartialBlinkIdSessionSettings = OverrideProperties<Partial<BlinkIdSessionSettings>, {
|
|
1836
2136
|
scanningSettings?: PartialScanningSettings;
|
|
1837
2137
|
}>;
|
|
1838
2138
|
|
|
2139
|
+
/**
|
|
2140
|
+
* The partial scanning settings.
|
|
2141
|
+
*/
|
|
1839
2142
|
declare type PartialScanningSettings = Partial<OverrideProperties<ScanningSettings, {
|
|
1840
2143
|
croppedImageSettings: Partial<CroppedImageSettings>;
|
|
1841
2144
|
recognitionModeFilter: Partial<RecognitionModeFilter>;
|
|
@@ -1845,11 +2148,11 @@ declare type PartialScanningSettings = Partial<OverrideProperties<ScanningSettin
|
|
|
1845
2148
|
/**
|
|
1846
2149
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1847
2150
|
*/
|
|
1848
|
-
/** Represents a 2D point */
|
|
2151
|
+
/** Represents a 2D point. */
|
|
1849
2152
|
export declare type Point = {
|
|
1850
|
-
/** X-coordinate of the point */
|
|
2153
|
+
/** X-coordinate of the point. */
|
|
1851
2154
|
x: number;
|
|
1852
|
-
/** Y-coordinate of the point */
|
|
2155
|
+
/** Y-coordinate of the point. */
|
|
1853
2156
|
y: number;
|
|
1854
2157
|
};
|
|
1855
2158
|
|
|
@@ -1926,21 +2229,35 @@ export declare type ProcessingStatus =
|
|
|
1926
2229
|
*/
|
|
1927
2230
|
| "barcode-detection-failed";
|
|
1928
2231
|
|
|
2232
|
+
/**
|
|
2233
|
+
* The process result with buffer.
|
|
2234
|
+
*/
|
|
1929
2235
|
export declare type ProcessResultWithBuffer = BlinkIdProcessResult & {
|
|
1930
2236
|
arrayBuffer: ArrayBuffer;
|
|
1931
2237
|
};
|
|
1932
2238
|
|
|
2239
|
+
/**
|
|
2240
|
+
* The progress status callback.
|
|
2241
|
+
*/
|
|
1933
2242
|
export declare type ProgressStatusCallback = (progress: DownloadProgress) => void;
|
|
1934
2243
|
|
|
1935
|
-
/**
|
|
2244
|
+
/**
|
|
2245
|
+
* Error thrown when proxy URL validation fails
|
|
2246
|
+
*/
|
|
2247
|
+
export declare class ProxyUrlValidationError extends Error {
|
|
2248
|
+
readonly url: string;
|
|
2249
|
+
constructor(message: string, url: string);
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
/** Represents a quadrilateral shape with signed integer coordinates. */
|
|
1936
2253
|
export declare type Quadrilateral = {
|
|
1937
|
-
/** Upper left point of the quadrilateral */
|
|
2254
|
+
/** Upper left point of the quadrilateral. */
|
|
1938
2255
|
upperLeft: Point;
|
|
1939
|
-
/** Upper right point of the quadrilateral */
|
|
2256
|
+
/** Upper right point of the quadrilateral. */
|
|
1940
2257
|
upperRight: Point;
|
|
1941
|
-
/** Lower right point of the quadrilateral */
|
|
2258
|
+
/** Lower right point of the quadrilateral. */
|
|
1942
2259
|
lowerRight: Point;
|
|
1943
|
-
/** Lower left point of the quadrilateral */
|
|
2260
|
+
/** Lower left point of the quadrilateral. */
|
|
1944
2261
|
lowerLeft: Point;
|
|
1945
2262
|
};
|
|
1946
2263
|
|
|
@@ -1986,9 +2303,7 @@ export declare type RecognitionModeFilter = {
|
|
|
1986
2303
|
enableFullDocumentRecognition: boolean;
|
|
1987
2304
|
};
|
|
1988
2305
|
|
|
1989
|
-
/**
|
|
1990
|
-
* Represents a rectangle.
|
|
1991
|
-
*/
|
|
2306
|
+
/** Represents a rectangle. */
|
|
1992
2307
|
export declare type Rectangle = {
|
|
1993
2308
|
/** X coordinate of the top-left corner of the rectangle. */
|
|
1994
2309
|
x: number;
|
|
@@ -2006,10 +2321,25 @@ export declare type Rectangle = {
|
|
|
2006
2321
|
/** Represents regions */
|
|
2007
2322
|
export declare type 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";
|
|
2008
2323
|
|
|
2324
|
+
/** Represents a remote scanning session. */
|
|
2009
2325
|
export declare type RemoteScanningSession = Remote<WorkerScanningSession>;
|
|
2010
2326
|
|
|
2327
|
+
/**
|
|
2328
|
+
* Represents a remote worker instance.
|
|
2329
|
+
*
|
|
2330
|
+
* This type is the return type of the createProxyWorker function, which creates a Comlink-proxied Web Worker.
|
|
2331
|
+
* It simplifies the type to remove unnecessary complexity.
|
|
2332
|
+
*/
|
|
2011
2333
|
export declare type RemoteWorker = ReturnType<typeof createProxyWorker>;
|
|
2012
2334
|
|
|
2335
|
+
/**
|
|
2336
|
+
* Removes the internals of an Embind object.
|
|
2337
|
+
*
|
|
2338
|
+
* @param T - The type of the object to remove the internals from.
|
|
2339
|
+
* @returns The object with the internals removed.
|
|
2340
|
+
*
|
|
2341
|
+
* @ignore
|
|
2342
|
+
*/
|
|
2013
2343
|
export declare type RemoveEmbindInternals<T> = Omit<T, "delete" | "isDeleted" | "deleteLater" | "isAliasOf">;
|
|
2014
2344
|
|
|
2015
2345
|
/**
|
|
@@ -2042,9 +2372,9 @@ export declare type ResultCompleteness = {
|
|
|
2042
2372
|
/**
|
|
2043
2373
|
* Represents the mode of document scanning.
|
|
2044
2374
|
*
|
|
2045
|
-
* ScanningMode defines whether the scanning process is limited to a single
|
|
2046
|
-
*
|
|
2047
|
-
*
|
|
2375
|
+
* ScanningMode defines whether the scanning process is limited to a single side
|
|
2376
|
+
* of the document or includes multiple sides, automatically identifying how
|
|
2377
|
+
* many sides need to be scanned.
|
|
2048
2378
|
*/
|
|
2049
2379
|
export declare type ScanningMode = "single" | "automatic";
|
|
2050
2380
|
|
|
@@ -2060,7 +2390,7 @@ export declare type ScanningSettings = {
|
|
|
2060
2390
|
* The level of blur detection in the document image.
|
|
2061
2391
|
*
|
|
2062
2392
|
* Defines the severity of blur detected in the document image, as defined in
|
|
2063
|
-
*
|
|
2393
|
+
* `DetectionLevel`. Values range from `off` (detection NotAvailable) to
|
|
2064
2394
|
* higher levels of blur detection.
|
|
2065
2395
|
*
|
|
2066
2396
|
* `low` – less sensitive to blur; if something is detected as blur, it is
|
|
@@ -2077,24 +2407,24 @@ export declare type ScanningSettings = {
|
|
|
2077
2407
|
* A value of `true` means images with detected blur will be excluded from
|
|
2078
2408
|
* further processing to prevent blurred images from being used
|
|
2079
2409
|
*
|
|
2080
|
-
* - If
|
|
2081
|
-
* - If blur is detected
|
|
2082
|
-
*
|
|
2083
|
-
*
|
|
2410
|
+
* - If `blurDetectionLevel` is `off` - blurred images will be processed
|
|
2411
|
+
* - If blur is detected `InputImageAnalysisResult#processingStatus` will be
|
|
2412
|
+
* `image-preprocessing-failed` and blur will be reported in the
|
|
2413
|
+
* `BlinkIdProcessResult`
|
|
2084
2414
|
*
|
|
2085
2415
|
* A value of `false` means images with detected blur will not be excluded
|
|
2086
2416
|
* from further processing
|
|
2087
2417
|
*
|
|
2088
|
-
* - If
|
|
2089
|
-
*
|
|
2090
|
-
*
|
|
2418
|
+
* - If `blurDetectionLevel` is not `off` - even if blur is detected, the image
|
|
2419
|
+
* will be processed and blur will be reported in the
|
|
2420
|
+
* `BlinkIdProcessResult`.
|
|
2091
2421
|
*/
|
|
2092
2422
|
skipImagesWithBlur: boolean;
|
|
2093
2423
|
/**
|
|
2094
2424
|
* The level of glare detection in the document image.
|
|
2095
2425
|
*
|
|
2096
2426
|
* Defines the severity of glare detected in the document image, as defined in
|
|
2097
|
-
*
|
|
2427
|
+
* `DetectionLevel`. Values range from `off` (detection NotAvailable) to
|
|
2098
2428
|
* higher levels of glare detection.
|
|
2099
2429
|
*
|
|
2100
2430
|
* `low` – less sensitive to glare; if something is detected as glare, it is
|
|
@@ -2112,24 +2442,24 @@ export declare type ScanningSettings = {
|
|
|
2112
2442
|
* A value of `true` means images with detected glare will be excluded from
|
|
2113
2443
|
* further processing to prevent glared images from being used
|
|
2114
2444
|
*
|
|
2115
|
-
* - If
|
|
2116
|
-
* - If glare is detected
|
|
2117
|
-
*
|
|
2118
|
-
*
|
|
2445
|
+
* - If `glareDetectionLevel` is `off` - glared images will be processed
|
|
2446
|
+
* - If glare is detected `InputImageAnalysisResult#processingStatus` will be
|
|
2447
|
+
* `image-preprocessing-failed` and glare will be reported in the
|
|
2448
|
+
* `BlinkIdProcessResult`
|
|
2119
2449
|
*
|
|
2120
2450
|
* A value of `false` means images with detected glare will not be excluded
|
|
2121
2451
|
* from further processing
|
|
2122
2452
|
*
|
|
2123
|
-
* - If
|
|
2453
|
+
* - If `glareDetectionLevel` is not `off` - even if glare is detected, the
|
|
2124
2454
|
* image will be processed and glare will be reported in the
|
|
2125
|
-
*
|
|
2455
|
+
* `BlinkIdProcessResult`
|
|
2126
2456
|
*/
|
|
2127
2457
|
skipImagesWithGlare: boolean;
|
|
2128
2458
|
/**
|
|
2129
2459
|
* The level of allowed detected tilt of the document in the image.
|
|
2130
2460
|
*
|
|
2131
2461
|
* Defines the severity of allowed detected tilt of the document in the image,
|
|
2132
|
-
* as defined in
|
|
2462
|
+
* as defined in `DetectionLevel`. Values range from `off` (detection
|
|
2133
2463
|
* NotAvailable) to higher levels of allowed tilt.
|
|
2134
2464
|
*
|
|
2135
2465
|
* `low` – less sensitive to tilt.
|
|
@@ -2148,9 +2478,9 @@ export declare type ScanningSettings = {
|
|
|
2148
2478
|
* lighting from being used
|
|
2149
2479
|
*
|
|
2150
2480
|
* - If inadequate light conditions are detected
|
|
2151
|
-
*
|
|
2481
|
+
* `InputImageAnalysisResult#processingStatus` will be
|
|
2152
2482
|
* `image-preprocessing-failed` and lighting status will be reported in the
|
|
2153
|
-
*
|
|
2483
|
+
* `BlinkIdProcessResult`.
|
|
2154
2484
|
*/
|
|
2155
2485
|
skipImagesWithInadequateLightingConditions: boolean;
|
|
2156
2486
|
/**
|
|
@@ -2159,12 +2489,11 @@ export declare type ScanningSettings = {
|
|
|
2159
2489
|
* A value of `true` means images occluded by hand will be excluded from
|
|
2160
2490
|
* further processing to prevent occluded images from being used
|
|
2161
2491
|
*
|
|
2162
|
-
* - If hand occlusion is detected
|
|
2163
|
-
*
|
|
2164
|
-
*
|
|
2165
|
-
* in the {@link BlinkIdProcessResult}.
|
|
2492
|
+
* - If hand occlusion is detected `InputImageAnalysisResult#processingStatus`
|
|
2493
|
+
* will be `image-preprocessing-failed` and hand occlusion status will be
|
|
2494
|
+
* reported in the `BlinkIdProcessResult`.
|
|
2166
2495
|
*
|
|
2167
|
-
* This setting is applicable only if `scanCroppedDocumentImage`
|
|
2496
|
+
* This setting is applicable only if `scanCroppedDocumentImage` is false.
|
|
2168
2497
|
*/
|
|
2169
2498
|
skipImagesOccludedByHand: boolean;
|
|
2170
2499
|
/**
|
|
@@ -2178,8 +2507,8 @@ export declare type ScanningSettings = {
|
|
|
2178
2507
|
* extracted data will be aggregated from multiple images instead of being
|
|
2179
2508
|
* sourced from a single image.
|
|
2180
2509
|
*
|
|
2181
|
-
* This only applies when
|
|
2182
|
-
*
|
|
2510
|
+
* This only applies when `InputImageSource` is equal to `video` - for images
|
|
2511
|
+
* from `photo` source, setting will be ignored.
|
|
2183
2512
|
*/
|
|
2184
2513
|
combineResultsFromMultipleInputImages: boolean;
|
|
2185
2514
|
/**
|
|
@@ -2207,7 +2536,7 @@ export declare type ScanningSettings = {
|
|
|
2207
2536
|
* If a `fields` is set to a field with an incorrect alphabetType, all fields
|
|
2208
2537
|
* on the document become optional.
|
|
2209
2538
|
*
|
|
2210
|
-
* If a `fields` is set to a field that doesn
|
|
2539
|
+
* If a `fields` is set to a field that doesn't exist in the internal rules,
|
|
2211
2540
|
* that rule is ignored.
|
|
2212
2541
|
*
|
|
2213
2542
|
* When adding multiple `fields`, any field that does not match our rules is
|
|
@@ -2276,11 +2605,10 @@ export declare type ScanningSettings = {
|
|
|
2276
2605
|
* input image and the document.
|
|
2277
2606
|
*
|
|
2278
2607
|
* Default value is `0.02f` (also recommended value). The setting is
|
|
2279
|
-
* applicable only when using images from `video` source The setting is not
|
|
2280
|
-
* applicable if
|
|
2281
|
-
*
|
|
2282
|
-
*
|
|
2283
|
-
* image.
|
|
2608
|
+
* applicable only when using images from `video` source. The setting is not
|
|
2609
|
+
* applicable if `scanCroppedDocumentImage` is enabled (it will be ignored).
|
|
2610
|
+
* This setting is implemented to comply with regulations in certain countries
|
|
2611
|
+
* that mandate documents to be stored with adequate margins in the image.
|
|
2284
2612
|
*/
|
|
2285
2613
|
inputImageMargin: number;
|
|
2286
2614
|
/**
|
|
@@ -2351,11 +2679,16 @@ export declare type ScanningSide = "first" | "second";
|
|
|
2351
2679
|
*/
|
|
2352
2680
|
export declare type ScanningStatus = "scanning-side-in-progress" | "scanning-barcode-in-progress" | "side-scanned" | "document-scanned" | "cancelled";
|
|
2353
2681
|
|
|
2682
|
+
/** The server permission error. */
|
|
2354
2683
|
export declare type ServerPermissionError = "network-error" | "remote-lock" | "permission-expired" | "payload-corrupted" | "payload-signature-verification-failed" | "incorrect-token-state" | "detected-skewed-clock";
|
|
2355
2684
|
|
|
2685
|
+
/** The server permission submit result. */
|
|
2356
2686
|
export declare type ServerPermissionSubmitResult = Readonly<{
|
|
2687
|
+
/** The error. */
|
|
2357
2688
|
error: ServerPermissionError;
|
|
2689
|
+
/** The lease. */
|
|
2358
2690
|
lease: number;
|
|
2691
|
+
/** The network error description. */
|
|
2359
2692
|
networkErrorDescription?: string;
|
|
2360
2693
|
}>;
|
|
2361
2694
|
|
|
@@ -2389,15 +2722,19 @@ export declare type StringResult = {
|
|
|
2389
2722
|
*/
|
|
2390
2723
|
export declare function testLocalStorage(): boolean;
|
|
2391
2724
|
|
|
2392
|
-
/**
|
|
2725
|
+
/**
|
|
2726
|
+
* Represents the information about the vehicle class.
|
|
2727
|
+
*
|
|
2728
|
+
* @template S - The type of the string result.
|
|
2729
|
+
*/
|
|
2393
2730
|
export declare type VehicleClassInfo<S extends string | StringResult> = {
|
|
2394
|
-
/** The type of vehicle the driver license owner has privilege to drive */
|
|
2731
|
+
/** The type of vehicle the driver license owner has privilege to drive. */
|
|
2395
2732
|
vehicleClass?: S;
|
|
2396
|
-
/** The type of driver licence */
|
|
2733
|
+
/** The type of driver licence. */
|
|
2397
2734
|
licenceType?: S;
|
|
2398
|
-
/** The date since licence is effective */
|
|
2735
|
+
/** The date since licence is effective. */
|
|
2399
2736
|
effectiveDate?: DateResult<S>;
|
|
2400
|
-
/** The date of expiry of licence */
|
|
2737
|
+
/** The date of expiry of licence. */
|
|
2401
2738
|
expiryDate?: DateResult<S>;
|
|
2402
2739
|
};
|
|
2403
2740
|
|
|
@@ -2495,19 +2832,45 @@ export declare type VizResult = {
|
|
|
2495
2832
|
nationalInsuranceNumber?: StringResult;
|
|
2496
2833
|
};
|
|
2497
2834
|
|
|
2835
|
+
/**
|
|
2836
|
+
* The WASM variant.
|
|
2837
|
+
*/
|
|
2498
2838
|
declare type WasmVariant = "basic" | "advanced" | "advanced-threads";
|
|
2499
2839
|
|
|
2500
2840
|
/**
|
|
2501
2841
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
2502
2842
|
*/
|
|
2843
|
+
/**
|
|
2844
|
+
* The WebAssembly module, for compatibility.
|
|
2845
|
+
*
|
|
2846
|
+
* @ignore
|
|
2847
|
+
*/
|
|
2503
2848
|
export declare interface WebAssemblyModule {
|
|
2504
2849
|
}
|
|
2505
2850
|
|
|
2851
|
+
/**
|
|
2852
|
+
* The worker scanning session.
|
|
2853
|
+
*/
|
|
2506
2854
|
export declare type WorkerScanningSession = OverrideProperties<BlinkIdScanningSession, {
|
|
2507
2855
|
process: (image: ImageData) => ProcessResultWithBuffer;
|
|
2508
2856
|
}> & {
|
|
2857
|
+
/**
|
|
2858
|
+
* Gets the settings.
|
|
2859
|
+
*
|
|
2860
|
+
* @returns The settings.
|
|
2861
|
+
*/
|
|
2509
2862
|
getSettings: () => BlinkIdSessionSettings;
|
|
2863
|
+
/**
|
|
2864
|
+
* Shows the demo overlay.
|
|
2865
|
+
*
|
|
2866
|
+
* @returns Whether the demo overlay is shown.
|
|
2867
|
+
*/
|
|
2510
2868
|
showDemoOverlay: () => boolean;
|
|
2869
|
+
/**
|
|
2870
|
+
* Shows the production overlay.
|
|
2871
|
+
*
|
|
2872
|
+
* @returns Whether the production overlay is shown.
|
|
2873
|
+
*/
|
|
2511
2874
|
showProductionOverlay: () => boolean;
|
|
2512
2875
|
};
|
|
2513
2876
|
|