@microblink/blinkid-core 7.3.1 → 7.4.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.
- package/dist/blinkid-core.js +42 -0
- package/dist/blinkid-core.js.map +1 -1
- package/dist/resources/blinkid-worker.js +45 -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 +142 -145
- 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 +141 -144
- 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 +8 -0
- package/types/index.d.ts.map +1 -1
- package/types/index.rollup.d.ts +463 -121
- package/types/utils.d.ts +42 -0
- package/types/utils.d.ts.map +1 -0
- package/types/utils.test.d.ts +5 -0
- package/types/utils.test.d.ts.map +1 -0
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;
|
|
@@ -1071,16 +1095,6 @@ export declare type BlinkIdScanningResult = {
|
|
|
1071
1095
|
driverLicenseDetailedInfo?: DriverLicenceDetailedInfo<StringResult>;
|
|
1072
1096
|
/** The dependents info */
|
|
1073
1097
|
dependentsInfo?: DependentInfo[];
|
|
1074
|
-
/** The scanning sides corresponding to input image indices */
|
|
1075
|
-
inputImagesScanningSide?: ScanningSide[];
|
|
1076
|
-
/** The scanning side corresponding to barcode input image index */
|
|
1077
|
-
barcodeInputImageScanningSide?: ScanningSide;
|
|
1078
|
-
/** The scanning sides corresponding to document image indices */
|
|
1079
|
-
documentImagesScanningSide?: ScanningSide[];
|
|
1080
|
-
/** The scanning side corresponding to face image index */
|
|
1081
|
-
faceImageScanningSide?: ScanningSide;
|
|
1082
|
-
/** The scanning side corresponding to signature image index */
|
|
1083
|
-
signatureImageScanningSide?: ScanningSide;
|
|
1084
1098
|
/** The results of scanning each side of the document */
|
|
1085
1099
|
subResults: SingleSideScanningResult[];
|
|
1086
1100
|
};
|
|
@@ -1097,9 +1111,15 @@ export declare type BlinkIdScanningSession = EmbindObject<{
|
|
|
1097
1111
|
* Processes the input camera frame
|
|
1098
1112
|
*
|
|
1099
1113
|
* @param image The frame to process
|
|
1114
|
+
* @returns The `BlinkIdProcessResult` if successful, `BlinkIdSessionError` if
|
|
1115
|
+
* failed
|
|
1100
1116
|
*/
|
|
1101
1117
|
process: (image: ImageData) => BlinkIdProcessResult | BlinkIdSessionError;
|
|
1102
|
-
/**
|
|
1118
|
+
/**
|
|
1119
|
+
* Returns the result of the scanning session.
|
|
1120
|
+
*
|
|
1121
|
+
* @returns The `BlinkIdScanningResult`
|
|
1122
|
+
*/
|
|
1103
1123
|
getResult: () => BlinkIdScanningResult;
|
|
1104
1124
|
}>;
|
|
1105
1125
|
|
|
@@ -1108,15 +1128,14 @@ export declare type BlinkIdScanningSession = EmbindObject<{
|
|
|
1108
1128
|
* `BlinkIdScanningSession.reset`.
|
|
1109
1129
|
*/
|
|
1110
1130
|
export declare type BlinkIdSessionError = {
|
|
1131
|
+
/** The error type. */
|
|
1111
1132
|
error: BlinkIdSessionErrorType;
|
|
1112
1133
|
};
|
|
1113
1134
|
|
|
1114
1135
|
/**
|
|
1115
1136
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1116
1137
|
*/
|
|
1117
|
-
/**
|
|
1118
|
-
* Represents the error statuses returned from the `BlinkIDScanningSession`.
|
|
1119
|
-
*/
|
|
1138
|
+
/** Represents the error statuses returned from the `BlinkIDScanningSession`. */
|
|
1120
1139
|
export declare type BlinkIdSessionErrorType = "document-scanned" | "result-retrieved";
|
|
1121
1140
|
|
|
1122
1141
|
/**
|
|
@@ -1125,42 +1144,91 @@ export declare type BlinkIdSessionErrorType = "document-scanned" | "result-retri
|
|
|
1125
1144
|
* This structure holds the settings related to the resources initialization,
|
|
1126
1145
|
* input image source, scanning mode, and specific scanning configurations that
|
|
1127
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
|
|
1128
1159
|
*/
|
|
1129
1160
|
export declare type BlinkIdSessionSettings = {
|
|
1130
1161
|
/**
|
|
1131
1162
|
* The type of image source for the scanning session.
|
|
1132
1163
|
*
|
|
1133
1164
|
* Defines whether the images are sourced from a video stream or a single
|
|
1134
|
-
* photo, as defined by
|
|
1135
|
-
*
|
|
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`
|
|
1136
1173
|
*/
|
|
1137
1174
|
inputImageSource: InputImageSource;
|
|
1138
1175
|
/**
|
|
1139
1176
|
* The scanning mode to be used during the scanning session.
|
|
1140
1177
|
*
|
|
1141
1178
|
* Specifies whether the scanning is for a single side of a document or
|
|
1142
|
-
* multiple sides, as defined in
|
|
1143
|
-
* `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`
|
|
1144
1188
|
*/
|
|
1145
1189
|
scanningMode: ScanningMode;
|
|
1146
1190
|
/**
|
|
1147
1191
|
* The specific scanning settings for the scanning session.
|
|
1148
1192
|
*
|
|
1149
|
-
* 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
|
|
1150
1201
|
*/
|
|
1151
1202
|
scanningSettings: ScanningSettings;
|
|
1152
1203
|
};
|
|
1153
1204
|
|
|
1205
|
+
/**
|
|
1206
|
+
* The BlinkID Wasm module.
|
|
1207
|
+
*
|
|
1208
|
+
* @ignore
|
|
1209
|
+
*/
|
|
1154
1210
|
export declare interface BlinkIdWasmModule extends BlinkIdBindings, EmscriptenModule {
|
|
1155
1211
|
}
|
|
1156
1212
|
|
|
1213
|
+
/**
|
|
1214
|
+
* The BlinkID worker.
|
|
1215
|
+
*/
|
|
1157
1216
|
declare class BlinkIdWorker {
|
|
1158
1217
|
#private;
|
|
1218
|
+
/**
|
|
1219
|
+
* The progress status callback.
|
|
1220
|
+
*/
|
|
1159
1221
|
progressStatusCallback?: ProgressStatusCallback;
|
|
1160
1222
|
/**
|
|
1161
1223
|
* This method initializes everything.
|
|
1162
1224
|
*/
|
|
1163
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
|
+
*/
|
|
1164
1232
|
createBlinkIdScanningSession(options?: PartialBlinkIdSessionSettings): {
|
|
1165
1233
|
reset: () => void | BlinkIdSessionError;
|
|
1166
1234
|
getResult: () => BlinkIdScanningResult;
|
|
@@ -1170,10 +1238,32 @@ declare class BlinkIdWorker {
|
|
|
1170
1238
|
isAliasOf: (other: any) => boolean;
|
|
1171
1239
|
process: (image: ImageData) => ProcessResultWithBuffer;
|
|
1172
1240
|
} & {
|
|
1241
|
+
/**
|
|
1242
|
+
* Gets the settings.
|
|
1243
|
+
*
|
|
1244
|
+
* @returns The settings.
|
|
1245
|
+
*/
|
|
1173
1246
|
getSettings: () => BlinkIdSessionSettings;
|
|
1247
|
+
/**
|
|
1248
|
+
* Shows the demo overlay.
|
|
1249
|
+
*
|
|
1250
|
+
* @returns Whether the demo overlay is shown.
|
|
1251
|
+
*/
|
|
1174
1252
|
showDemoOverlay: () => boolean;
|
|
1253
|
+
/**
|
|
1254
|
+
* Shows the production overlay.
|
|
1255
|
+
*
|
|
1256
|
+
* @returns Whether the production overlay is shown.
|
|
1257
|
+
*/
|
|
1175
1258
|
showProductionOverlay: () => boolean;
|
|
1176
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
|
+
*/
|
|
1177
1267
|
createProxySession(session: BlinkIdScanningSession, sessionSettings: BlinkIdSessionSettings): WorkerScanningSession & ProxyMarked;
|
|
1178
1268
|
/**
|
|
1179
1269
|
* This method is called when the worker is terminated.
|
|
@@ -1183,10 +1273,25 @@ declare class BlinkIdWorker {
|
|
|
1183
1273
|
* Terminates the workers and the Wasm runtime.
|
|
1184
1274
|
*/
|
|
1185
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
|
+
*/
|
|
1186
1281
|
ping(): number;
|
|
1187
1282
|
}
|
|
1188
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
|
+
*/
|
|
1189
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
|
+
*/
|
|
1190
1295
|
licenseKey: string;
|
|
1191
1296
|
/**
|
|
1192
1297
|
* The URL of the Microblink proxy server. This proxy handles requests to Microblink's Baltazar and Ping servers.
|
|
@@ -1208,17 +1313,38 @@ export declare type BlinkIdWorkerInitSettings = {
|
|
|
1208
1313
|
* Defaults to `window.location.href`, at the root of the current page.
|
|
1209
1314
|
*/
|
|
1210
1315
|
resourcesLocation?: string;
|
|
1316
|
+
/**
|
|
1317
|
+
* A unique identifier for the user/session.
|
|
1318
|
+
* Used for analytics and tracking purposes.
|
|
1319
|
+
*/
|
|
1211
1320
|
userId: string;
|
|
1321
|
+
/**
|
|
1322
|
+
* The WebAssembly module variant to use.
|
|
1323
|
+
* Different variants may offer different performance/size tradeoffs.
|
|
1324
|
+
*/
|
|
1212
1325
|
wasmVariant?: WasmVariant;
|
|
1213
1326
|
/**
|
|
1214
1327
|
* The initial memory allocation for the Wasm module, in megabytes.
|
|
1328
|
+
* Larger values may improve performance but increase memory usage.
|
|
1215
1329
|
*/
|
|
1216
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
|
+
*/
|
|
1217
1335
|
useLightweightBuild: boolean;
|
|
1218
1336
|
};
|
|
1219
1337
|
|
|
1338
|
+
/**
|
|
1339
|
+
* The BlinkID worker proxy.
|
|
1340
|
+
*/
|
|
1220
1341
|
export declare type BlinkIdWorkerProxy = Omit<BlinkIdWorker, typeof finalizer>;
|
|
1221
1342
|
|
|
1343
|
+
/**
|
|
1344
|
+
* Options for a C call.
|
|
1345
|
+
*
|
|
1346
|
+
* @ignore
|
|
1347
|
+
*/
|
|
1222
1348
|
export declare interface CCallOpts {
|
|
1223
1349
|
async?: boolean | undefined;
|
|
1224
1350
|
}
|
|
@@ -1233,15 +1359,13 @@ export declare type Country = "albania" | "algeria" | "argentina" | "australia"
|
|
|
1233
1359
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1234
1360
|
*/
|
|
1235
1361
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
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.
|
|
1238
1367
|
*/
|
|
1239
|
-
export declare function createCustomImageData(imageData: ImageData):
|
|
1240
|
-
data: Uint8ClampedArray<ArrayBufferLike>;
|
|
1241
|
-
width: number;
|
|
1242
|
-
height: number;
|
|
1243
|
-
colorSpace: PredefinedColorSpace;
|
|
1244
|
-
};
|
|
1368
|
+
export declare function createCustomImageData(imageData: ImageData): ImageData;
|
|
1245
1369
|
|
|
1246
1370
|
/**
|
|
1247
1371
|
* Creates a Comlink-proxied Web Worker
|
|
@@ -1255,20 +1379,40 @@ export declare const createProxyWorker: (resourcesLocation?: string) => Promise<
|
|
|
1255
1379
|
/**
|
|
1256
1380
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1257
1381
|
*/
|
|
1258
|
-
/**
|
|
1382
|
+
/**
|
|
1383
|
+
* Represents the image cropping options.
|
|
1384
|
+
*
|
|
1385
|
+
* @public
|
|
1386
|
+
*/
|
|
1259
1387
|
export declare type CroppedImageSettings = {
|
|
1260
|
-
/**
|
|
1388
|
+
/**
|
|
1389
|
+
* The DPI value for the cropped image - Specifies the resolution of the
|
|
1390
|
+
* output image.
|
|
1391
|
+
*/
|
|
1261
1392
|
dotsPerInch: number;
|
|
1262
1393
|
/**
|
|
1263
|
-
* The extension factor for the cropped image
|
|
1264
|
-
*
|
|
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.
|
|
1265
1398
|
*/
|
|
1266
1399
|
extensionFactor: number;
|
|
1267
|
-
/**
|
|
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
|
+
*/
|
|
1268
1405
|
returnDocumentImage: boolean;
|
|
1269
|
-
/**
|
|
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
|
+
*/
|
|
1270
1410
|
returnFaceImage: boolean;
|
|
1271
|
-
/**
|
|
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
|
+
*/
|
|
1272
1416
|
returnSignatureImage: boolean;
|
|
1273
1417
|
};
|
|
1274
1418
|
|
|
@@ -1283,9 +1427,11 @@ export declare type DataMatchFieldState = {
|
|
|
1283
1427
|
/** Type of field on which data match algorithm has been performed. */
|
|
1284
1428
|
export declare type DataMatchFieldType = "date-of-birth" | "date-of-expiry" | "document-number" | "document-additional-number" | "document-optional-additional-number" | "personal-id-number";
|
|
1285
1429
|
|
|
1430
|
+
/** Represents the result of the data match algorithm. */
|
|
1286
1431
|
export declare type DataMatchResult = {
|
|
1287
1432
|
/** Info on whether the data extracted from multiple sides matches */
|
|
1288
1433
|
statePerField?: DataMatchFieldState[];
|
|
1434
|
+
/** The overall state of the data match. */
|
|
1289
1435
|
overallState: DataMatchState;
|
|
1290
1436
|
};
|
|
1291
1437
|
|
|
@@ -1298,7 +1444,11 @@ export declare type DataMatchResult = {
|
|
|
1298
1444
|
*/
|
|
1299
1445
|
export declare type DataMatchState = "not-performed" | "failed" | "success";
|
|
1300
1446
|
|
|
1301
|
-
/**
|
|
1447
|
+
/**
|
|
1448
|
+
* Smart date result structure.
|
|
1449
|
+
*
|
|
1450
|
+
* @template S - The type of the string result.
|
|
1451
|
+
*/
|
|
1302
1452
|
export declare type DateResult<S extends string | StringResult> = {
|
|
1303
1453
|
/** Day in month [1-31] */
|
|
1304
1454
|
day?: number;
|
|
@@ -1314,6 +1464,14 @@ export declare type DateResult<S extends string | StringResult> = {
|
|
|
1314
1464
|
successfullyParsed?: boolean;
|
|
1315
1465
|
};
|
|
1316
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
|
+
*/
|
|
1317
1475
|
export declare const defaultSessionSettings: BlinkIdSessionSettings;
|
|
1318
1476
|
|
|
1319
1477
|
/** The additional information on the document owner's dependents. */
|
|
@@ -1333,8 +1491,11 @@ export declare type DependentInfo = {
|
|
|
1333
1491
|
* details.
|
|
1334
1492
|
*/
|
|
1335
1493
|
export declare type DetailedCroppedImageResult = {
|
|
1494
|
+
/** The image data. */
|
|
1336
1495
|
image: ImageData;
|
|
1496
|
+
/** The location of the image. */
|
|
1337
1497
|
location?: Rectangle;
|
|
1498
|
+
/** The side of the image. */
|
|
1338
1499
|
side?: ScanningSide;
|
|
1339
1500
|
};
|
|
1340
1501
|
|
|
@@ -1354,32 +1515,40 @@ export declare type DetailedFieldType = {
|
|
|
1354
1515
|
*
|
|
1355
1516
|
* DetectionLevel is used to configure detection thresholds and enable or
|
|
1356
1517
|
* disable detection functionality. The levels range from turning detection off
|
|
1357
|
-
* completely to setting various levels of sensitivity (low,
|
|
1518
|
+
* completely to setting various levels of sensitivity (low, mid, high).
|
|
1358
1519
|
*/
|
|
1359
1520
|
export declare type DetectionLevel = "off" | "low" | "mid" | "high";
|
|
1360
1521
|
|
|
1361
1522
|
/**
|
|
1362
1523
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1363
1524
|
*/
|
|
1364
|
-
/**
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
*
|
|
1378
|
-
*
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
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";
|
|
1383
1552
|
|
|
1384
1553
|
/** Represents the document anonymization settings. */
|
|
1385
1554
|
export declare type DocumentAnonymizationSettings = {
|
|
@@ -1391,6 +1560,7 @@ export declare type DocumentAnonymizationSettings = {
|
|
|
1391
1560
|
documentNumberAnonymizationSettings?: DocumentNumberAnonymizationSettings;
|
|
1392
1561
|
};
|
|
1393
1562
|
|
|
1563
|
+
/** Represents the document class information. */
|
|
1394
1564
|
export declare type DocumentClassInfo = {
|
|
1395
1565
|
/** The document country. */
|
|
1396
1566
|
country?: Country;
|
|
@@ -1442,7 +1612,7 @@ export declare type DocumentImageColor =
|
|
|
1442
1612
|
/** Color image scanned */
|
|
1443
1613
|
| "color";
|
|
1444
1614
|
|
|
1445
|
-
/** Represents the document number
|
|
1615
|
+
/** Represents the document number anonymization settings. */
|
|
1446
1616
|
export declare type DocumentNumberAnonymizationSettings = {
|
|
1447
1617
|
/**
|
|
1448
1618
|
* Defines how many digits at the beginning of the document number remain
|
|
@@ -1492,13 +1662,20 @@ export declare type DocumentRules = {
|
|
|
1492
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";
|
|
1493
1663
|
export { DocumentType_2 as DocumentType }
|
|
1494
1664
|
|
|
1665
|
+
/**
|
|
1666
|
+
* The download progress.
|
|
1667
|
+
*/
|
|
1495
1668
|
declare type DownloadProgress = {
|
|
1496
1669
|
loaded: number;
|
|
1497
1670
|
contentLength: number;
|
|
1498
1671
|
progress: number;
|
|
1499
1672
|
};
|
|
1500
1673
|
|
|
1501
|
-
/**
|
|
1674
|
+
/**
|
|
1675
|
+
* Represents detailed information from a driver's license.
|
|
1676
|
+
*
|
|
1677
|
+
* @template S - The type of the string result.
|
|
1678
|
+
*/
|
|
1502
1679
|
export declare type DriverLicenceDetailedInfo<S extends string | StringResult> = {
|
|
1503
1680
|
/**
|
|
1504
1681
|
* The restrictions to driving privileges for the United States driver license
|
|
@@ -1521,8 +1698,9 @@ export declare type DriverLicenceDetailedInfo<S extends string | StringResult> =
|
|
|
1521
1698
|
* JavaScript engine. The memory used by the object must be cleaned up manually
|
|
1522
1699
|
* by calling the delete() method.
|
|
1523
1700
|
*
|
|
1524
|
-
*
|
|
1525
|
-
*
|
|
1701
|
+
* @see https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#memory-management for more details.
|
|
1702
|
+
*
|
|
1703
|
+
* @ignore
|
|
1526
1704
|
*/
|
|
1527
1705
|
export declare type EmbindObject<T extends {}> = T & {
|
|
1528
1706
|
delete: () => void;
|
|
@@ -1531,6 +1709,11 @@ export declare type EmbindObject<T extends {}> = T & {
|
|
|
1531
1709
|
isAliasOf: (other: any) => boolean;
|
|
1532
1710
|
};
|
|
1533
1711
|
|
|
1712
|
+
/**
|
|
1713
|
+
* The main EmscriptenModule interface.
|
|
1714
|
+
*
|
|
1715
|
+
* @ignore
|
|
1716
|
+
*/
|
|
1534
1717
|
export declare interface EmscriptenModule {
|
|
1535
1718
|
print(str: string): void;
|
|
1536
1719
|
printErr(str: string): void;
|
|
@@ -1612,20 +1795,80 @@ export declare interface EmscriptenModule {
|
|
|
1612
1795
|
* application's types.
|
|
1613
1796
|
*
|
|
1614
1797
|
* @param moduleOverrides Default properties for the initialized module.
|
|
1798
|
+
*
|
|
1799
|
+
* @ignore
|
|
1615
1800
|
*/
|
|
1616
1801
|
export declare type EmscriptenModuleFactory<T extends EmscriptenModule = EmscriptenModule> = (moduleOverrides?: Partial<T>) => Promise<T>;
|
|
1617
1802
|
|
|
1803
|
+
/**
|
|
1804
|
+
* The environment type.
|
|
1805
|
+
*
|
|
1806
|
+
* @ignore
|
|
1807
|
+
*/
|
|
1618
1808
|
export declare type EnvironmentType = "WEB" | "NODE" | "SHELL" | "WORKER";
|
|
1619
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
|
+
*/
|
|
1816
|
+
export declare function extractBarcodeImage(blinkIdScanningResult: BlinkIdScanningResult): ImageData | null;
|
|
1817
|
+
|
|
1818
|
+
/**
|
|
1819
|
+
* Extracts the face image from the scanning result.
|
|
1820
|
+
*
|
|
1821
|
+
* @param blinkIdScanningResult - The scanning result.
|
|
1822
|
+
* @returns The face image.
|
|
1823
|
+
*/
|
|
1824
|
+
export declare function extractFaceImage(blinkIdScanningResult: BlinkIdScanningResult): ImageData | null;
|
|
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
|
+
*/
|
|
1833
|
+
export declare function extractSideDocumentImage(blinkIdScanningResult: BlinkIdScanningResult, side: ScanningSide): ImageData | null;
|
|
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
|
+
*/
|
|
1842
|
+
export declare function extractSideInputImage(blinkIdScanningResult: BlinkIdScanningResult, side: ScanningSide): ImageData | null;
|
|
1843
|
+
|
|
1844
|
+
/**
|
|
1845
|
+
* Extracts the signature image from the scanning result.
|
|
1846
|
+
*
|
|
1847
|
+
* @param blinkIdScanningResult - The scanning result.
|
|
1848
|
+
* @returns The signature image.
|
|
1849
|
+
*/
|
|
1850
|
+
export declare function extractSignatureImage(blinkIdScanningResult: BlinkIdScanningResult): ImageData | null;
|
|
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,86 @@ 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
|
+
/** The license request. */
|
|
1727
1977
|
export declare type LicenseRequest = Readonly<{
|
|
1978
|
+
/** The license id. */
|
|
1728
1979
|
licenseId: string;
|
|
1980
|
+
/** The licensee. */
|
|
1729
1981
|
licensee: string;
|
|
1982
|
+
/** The application ids. */
|
|
1730
1983
|
applicationIds: Array<string>;
|
|
1984
|
+
/** The package name. */
|
|
1731
1985
|
packageName: string;
|
|
1986
|
+
/** The platform. */
|
|
1732
1987
|
platform: string;
|
|
1988
|
+
/** The sdk name. */
|
|
1733
1989
|
sdkName: string;
|
|
1990
|
+
/** The sdk version. */
|
|
1734
1991
|
sdkVersion: string;
|
|
1735
1992
|
}>;
|
|
1736
1993
|
|
|
1994
|
+
/** The license status response. */
|
|
1737
1995
|
export declare type LicenseStatusResponse = Record<string, string>;
|
|
1738
1996
|
|
|
1997
|
+
/** The license token state. */
|
|
1739
1998
|
export declare type LicenseTokenState = "invalid" | "requires-server-permission" | "valid";
|
|
1740
1999
|
|
|
1741
2000
|
/**
|
|
1742
2001
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1743
2002
|
*/
|
|
2003
|
+
/** The license unlock result. */
|
|
1744
2004
|
export declare type LicenseUnlockResult = Readonly<{
|
|
2005
|
+
/** Whether the license is a trial license. */
|
|
1745
2006
|
isTrial: boolean;
|
|
2007
|
+
/** Whether the license has ping enabled. */
|
|
1746
2008
|
hasPing: boolean;
|
|
2009
|
+
/** The license id. */
|
|
1747
2010
|
licenseId: string;
|
|
2011
|
+
/** The licensee. */
|
|
1748
2012
|
licensee: string;
|
|
2013
|
+
/** The application ids. */
|
|
1749
2014
|
applicationIds: Array<string>;
|
|
2015
|
+
/** The package name. */
|
|
1750
2016
|
packageName: string;
|
|
2017
|
+
/** The sdk name. */
|
|
1751
2018
|
sdkName: string;
|
|
2019
|
+
/** The sdk version. */
|
|
1752
2020
|
sdkVersion: string;
|
|
2021
|
+
/** The unlock result. */
|
|
1753
2022
|
unlockResult: LicenseTokenState;
|
|
2023
|
+
/** The license error. */
|
|
1754
2024
|
licenseError: string;
|
|
2025
|
+
/** Whether to show the demo overlay. */
|
|
1755
2026
|
showDemoOverlay: boolean;
|
|
2027
|
+
/** Whether to show the production overlay. */
|
|
1756
2028
|
showProductionOverlay: boolean;
|
|
2029
|
+
/** Whether to allow baltazar proxy. */
|
|
1757
2030
|
allowBaltazarProxy: boolean;
|
|
2031
|
+
/** Whether to allow ping proxy. */
|
|
1758
2032
|
allowPingProxy: boolean;
|
|
1759
2033
|
}>;
|
|
1760
2034
|
|
|
1761
2035
|
/**
|
|
1762
|
-
* Creates
|
|
2036
|
+
* Creates and initializes a BlinkID core instance.
|
|
1763
2037
|
*
|
|
1764
|
-
* @param
|
|
1765
|
-
* @param
|
|
2038
|
+
* @param settings - Configuration for BlinkID initialization including license key and resources location
|
|
2039
|
+
* @param progressCallback - Optional callback for tracking resource download progress (WASM, data files)
|
|
2040
|
+
* @returns Promise that resolves with initialized BlinkID core instance
|
|
2041
|
+
* @throws Error if initialization fails
|
|
1766
2042
|
*/
|
|
1767
2043
|
export declare function loadBlinkIdCore(settings: BlinkIdInitSettings, progressCallback?: ProgressStatusCallback): Promise<BlinkIdCore>;
|
|
1768
2044
|
|
|
2045
|
+
/**
|
|
2046
|
+
* The load Wasm params.
|
|
2047
|
+
*/
|
|
1769
2048
|
export declare type LoadWasmParams = {
|
|
1770
2049
|
resourceUrl: string;
|
|
1771
2050
|
variant?: WasmVariant;
|
|
@@ -1773,9 +2052,6 @@ export declare type LoadWasmParams = {
|
|
|
1773
2052
|
initialMemory?: number;
|
|
1774
2053
|
};
|
|
1775
2054
|
|
|
1776
|
-
/**
|
|
1777
|
-
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1778
|
-
*/
|
|
1779
2055
|
/** Types of documents that can contain MRZ */
|
|
1780
2056
|
export declare type MrzDocumentType = "unknown" | "identity-card" | "passport" | "visa" | "green-card" | "mys-pass-imm13p" | "driver-license" | "internal-travel-document" | "border-crossing-card";
|
|
1781
2057
|
|
|
@@ -1808,9 +2084,9 @@ export declare type MrzResult = {
|
|
|
1808
2084
|
/** Whether all check digits are valid */
|
|
1809
2085
|
verified: boolean;
|
|
1810
2086
|
/** The date of birth from MRZ */
|
|
1811
|
-
dateOfBirth:
|
|
2087
|
+
dateOfBirth: DateResult<string>;
|
|
1812
2088
|
/** The date of expiry from MRZ */
|
|
1813
|
-
dateOfExpiry:
|
|
2089
|
+
dateOfExpiry: DateResult<string>;
|
|
1814
2090
|
/** The type of the document */
|
|
1815
2091
|
documentType: MrzDocumentType;
|
|
1816
2092
|
/** The opt1 field without padding characters */
|
|
@@ -1830,15 +2106,29 @@ export declare type MrzResult = {
|
|
|
1830
2106
|
/**
|
|
1831
2107
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1832
2108
|
*/
|
|
2109
|
+
/**
|
|
2110
|
+
* Options for the getCrossOriginWorkerURL function.
|
|
2111
|
+
*
|
|
2112
|
+
* @param skipSameOrigin - If true, the function will return the original URL if it is same-origin.
|
|
2113
|
+
* @param useBlob - If true, the function will return a blob URL.
|
|
2114
|
+
*/
|
|
1833
2115
|
declare type Options = {
|
|
2116
|
+
/** If true, the function will return the original URL if it is same-origin. */
|
|
1834
2117
|
skipSameOrigin?: boolean;
|
|
2118
|
+
/** If true, the function will return a blob URL if not same-origin. */
|
|
1835
2119
|
useBlob?: boolean;
|
|
1836
2120
|
};
|
|
1837
2121
|
|
|
2122
|
+
/**
|
|
2123
|
+
* The partial BlinkID session settings.
|
|
2124
|
+
*/
|
|
1838
2125
|
declare type PartialBlinkIdSessionSettings = OverrideProperties<Partial<BlinkIdSessionSettings>, {
|
|
1839
2126
|
scanningSettings?: PartialScanningSettings;
|
|
1840
2127
|
}>;
|
|
1841
2128
|
|
|
2129
|
+
/**
|
|
2130
|
+
* The partial scanning settings.
|
|
2131
|
+
*/
|
|
1842
2132
|
declare type PartialScanningSettings = Partial<OverrideProperties<ScanningSettings, {
|
|
1843
2133
|
croppedImageSettings: Partial<CroppedImageSettings>;
|
|
1844
2134
|
recognitionModeFilter: Partial<RecognitionModeFilter>;
|
|
@@ -1848,11 +2138,11 @@ declare type PartialScanningSettings = Partial<OverrideProperties<ScanningSettin
|
|
|
1848
2138
|
/**
|
|
1849
2139
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
1850
2140
|
*/
|
|
1851
|
-
/** Represents a 2D point */
|
|
2141
|
+
/** Represents a 2D point. */
|
|
1852
2142
|
export declare type Point = {
|
|
1853
|
-
/** X-coordinate of the point */
|
|
2143
|
+
/** X-coordinate of the point. */
|
|
1854
2144
|
x: number;
|
|
1855
|
-
/** Y-coordinate of the point */
|
|
2145
|
+
/** Y-coordinate of the point. */
|
|
1856
2146
|
y: number;
|
|
1857
2147
|
};
|
|
1858
2148
|
|
|
@@ -1929,21 +2219,27 @@ export declare type ProcessingStatus =
|
|
|
1929
2219
|
*/
|
|
1930
2220
|
| "barcode-detection-failed";
|
|
1931
2221
|
|
|
2222
|
+
/**
|
|
2223
|
+
* The process result with buffer.
|
|
2224
|
+
*/
|
|
1932
2225
|
export declare type ProcessResultWithBuffer = BlinkIdProcessResult & {
|
|
1933
2226
|
arrayBuffer: ArrayBuffer;
|
|
1934
2227
|
};
|
|
1935
2228
|
|
|
2229
|
+
/**
|
|
2230
|
+
* The progress status callback.
|
|
2231
|
+
*/
|
|
1936
2232
|
export declare type ProgressStatusCallback = (progress: DownloadProgress) => void;
|
|
1937
2233
|
|
|
1938
|
-
/** Represents a quadrilateral shape with signed integer coordinates */
|
|
2234
|
+
/** Represents a quadrilateral shape with signed integer coordinates. */
|
|
1939
2235
|
export declare type Quadrilateral = {
|
|
1940
|
-
/** Upper left point of the quadrilateral */
|
|
2236
|
+
/** Upper left point of the quadrilateral. */
|
|
1941
2237
|
upperLeft: Point;
|
|
1942
|
-
/** Upper right point of the quadrilateral */
|
|
2238
|
+
/** Upper right point of the quadrilateral. */
|
|
1943
2239
|
upperRight: Point;
|
|
1944
|
-
/** Lower right point of the quadrilateral */
|
|
2240
|
+
/** Lower right point of the quadrilateral. */
|
|
1945
2241
|
lowerRight: Point;
|
|
1946
|
-
/** Lower left point of the quadrilateral */
|
|
2242
|
+
/** Lower left point of the quadrilateral. */
|
|
1947
2243
|
lowerLeft: Point;
|
|
1948
2244
|
};
|
|
1949
2245
|
|
|
@@ -1989,9 +2285,7 @@ export declare type RecognitionModeFilter = {
|
|
|
1989
2285
|
enableFullDocumentRecognition: boolean;
|
|
1990
2286
|
};
|
|
1991
2287
|
|
|
1992
|
-
/**
|
|
1993
|
-
* Represents a rectangle.
|
|
1994
|
-
*/
|
|
2288
|
+
/** Represents a rectangle. */
|
|
1995
2289
|
export declare type Rectangle = {
|
|
1996
2290
|
/** X coordinate of the top-left corner of the rectangle. */
|
|
1997
2291
|
x: number;
|
|
@@ -2009,10 +2303,25 @@ export declare type Rectangle = {
|
|
|
2009
2303
|
/** Represents regions */
|
|
2010
2304
|
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";
|
|
2011
2305
|
|
|
2306
|
+
/** Represents a remote scanning session. */
|
|
2012
2307
|
export declare type RemoteScanningSession = Remote<WorkerScanningSession>;
|
|
2013
2308
|
|
|
2309
|
+
/**
|
|
2310
|
+
* Represents a remote worker instance.
|
|
2311
|
+
*
|
|
2312
|
+
* This type is the return type of the createProxyWorker function, which creates a Comlink-proxied Web Worker.
|
|
2313
|
+
* It simplifies the type to remove unnecessary complexity.
|
|
2314
|
+
*/
|
|
2014
2315
|
export declare type RemoteWorker = ReturnType<typeof createProxyWorker>;
|
|
2015
2316
|
|
|
2317
|
+
/**
|
|
2318
|
+
* Removes the internals of an Embind object.
|
|
2319
|
+
*
|
|
2320
|
+
* @param T - The type of the object to remove the internals from.
|
|
2321
|
+
* @returns The object with the internals removed.
|
|
2322
|
+
*
|
|
2323
|
+
* @ignore
|
|
2324
|
+
*/
|
|
2016
2325
|
export declare type RemoveEmbindInternals<T> = Omit<T, "delete" | "isDeleted" | "deleteLater" | "isAliasOf">;
|
|
2017
2326
|
|
|
2018
2327
|
/**
|
|
@@ -2045,9 +2354,9 @@ export declare type ResultCompleteness = {
|
|
|
2045
2354
|
/**
|
|
2046
2355
|
* Represents the mode of document scanning.
|
|
2047
2356
|
*
|
|
2048
|
-
* ScanningMode defines whether the scanning process is limited to a single
|
|
2049
|
-
*
|
|
2050
|
-
*
|
|
2357
|
+
* ScanningMode defines whether the scanning process is limited to a single side
|
|
2358
|
+
* of the document or includes multiple sides, automatically identifying how
|
|
2359
|
+
* many sides need to be scanned.
|
|
2051
2360
|
*/
|
|
2052
2361
|
export declare type ScanningMode = "single" | "automatic";
|
|
2053
2362
|
|
|
@@ -2063,7 +2372,7 @@ export declare type ScanningSettings = {
|
|
|
2063
2372
|
* The level of blur detection in the document image.
|
|
2064
2373
|
*
|
|
2065
2374
|
* Defines the severity of blur detected in the document image, as defined in
|
|
2066
|
-
*
|
|
2375
|
+
* `DetectionLevel`. Values range from `off` (detection NotAvailable) to
|
|
2067
2376
|
* higher levels of blur detection.
|
|
2068
2377
|
*
|
|
2069
2378
|
* `low` – less sensitive to blur; if something is detected as blur, it is
|
|
@@ -2080,24 +2389,24 @@ export declare type ScanningSettings = {
|
|
|
2080
2389
|
* A value of `true` means images with detected blur will be excluded from
|
|
2081
2390
|
* further processing to prevent blurred images from being used
|
|
2082
2391
|
*
|
|
2083
|
-
* - If
|
|
2084
|
-
* - If blur is detected
|
|
2085
|
-
*
|
|
2086
|
-
*
|
|
2392
|
+
* - If `blurDetectionLevel` is `off` - blurred images will be processed
|
|
2393
|
+
* - If blur is detected `InputImageAnalysisResult#processingStatus` will be
|
|
2394
|
+
* `image-preprocessing-failed` and blur will be reported in the
|
|
2395
|
+
* `BlinkIdProcessResult`
|
|
2087
2396
|
*
|
|
2088
2397
|
* A value of `false` means images with detected blur will not be excluded
|
|
2089
2398
|
* from further processing
|
|
2090
2399
|
*
|
|
2091
|
-
* - If
|
|
2092
|
-
*
|
|
2093
|
-
*
|
|
2400
|
+
* - If `blurDetectionLevel` is not `off` - even if blur is detected, the image
|
|
2401
|
+
* will be processed and blur will be reported in the
|
|
2402
|
+
* `BlinkIdProcessResult`.
|
|
2094
2403
|
*/
|
|
2095
2404
|
skipImagesWithBlur: boolean;
|
|
2096
2405
|
/**
|
|
2097
2406
|
* The level of glare detection in the document image.
|
|
2098
2407
|
*
|
|
2099
2408
|
* Defines the severity of glare detected in the document image, as defined in
|
|
2100
|
-
*
|
|
2409
|
+
* `DetectionLevel`. Values range from `off` (detection NotAvailable) to
|
|
2101
2410
|
* higher levels of glare detection.
|
|
2102
2411
|
*
|
|
2103
2412
|
* `low` – less sensitive to glare; if something is detected as glare, it is
|
|
@@ -2115,24 +2424,24 @@ export declare type ScanningSettings = {
|
|
|
2115
2424
|
* A value of `true` means images with detected glare will be excluded from
|
|
2116
2425
|
* further processing to prevent glared images from being used
|
|
2117
2426
|
*
|
|
2118
|
-
* - If
|
|
2119
|
-
* - If glare is detected
|
|
2120
|
-
*
|
|
2121
|
-
*
|
|
2427
|
+
* - If `glareDetectionLevel` is `off` - glared images will be processed
|
|
2428
|
+
* - If glare is detected `InputImageAnalysisResult#processingStatus` will be
|
|
2429
|
+
* `image-preprocessing-failed` and glare will be reported in the
|
|
2430
|
+
* `BlinkIdProcessResult`
|
|
2122
2431
|
*
|
|
2123
2432
|
* A value of `false` means images with detected glare will not be excluded
|
|
2124
2433
|
* from further processing
|
|
2125
2434
|
*
|
|
2126
|
-
* - If
|
|
2435
|
+
* - If `glareDetectionLevel` is not `off` - even if glare is detected, the
|
|
2127
2436
|
* image will be processed and glare will be reported in the
|
|
2128
|
-
*
|
|
2437
|
+
* `BlinkIdProcessResult`
|
|
2129
2438
|
*/
|
|
2130
2439
|
skipImagesWithGlare: boolean;
|
|
2131
2440
|
/**
|
|
2132
2441
|
* The level of allowed detected tilt of the document in the image.
|
|
2133
2442
|
*
|
|
2134
2443
|
* Defines the severity of allowed detected tilt of the document in the image,
|
|
2135
|
-
* as defined in
|
|
2444
|
+
* as defined in `DetectionLevel`. Values range from `off` (detection
|
|
2136
2445
|
* NotAvailable) to higher levels of allowed tilt.
|
|
2137
2446
|
*
|
|
2138
2447
|
* `low` – less sensitive to tilt.
|
|
@@ -2151,9 +2460,9 @@ export declare type ScanningSettings = {
|
|
|
2151
2460
|
* lighting from being used
|
|
2152
2461
|
*
|
|
2153
2462
|
* - If inadequate light conditions are detected
|
|
2154
|
-
*
|
|
2463
|
+
* `InputImageAnalysisResult#processingStatus` will be
|
|
2155
2464
|
* `image-preprocessing-failed` and lighting status will be reported in the
|
|
2156
|
-
*
|
|
2465
|
+
* `BlinkIdProcessResult`.
|
|
2157
2466
|
*/
|
|
2158
2467
|
skipImagesWithInadequateLightingConditions: boolean;
|
|
2159
2468
|
/**
|
|
@@ -2162,12 +2471,11 @@ export declare type ScanningSettings = {
|
|
|
2162
2471
|
* A value of `true` means images occluded by hand will be excluded from
|
|
2163
2472
|
* further processing to prevent occluded images from being used
|
|
2164
2473
|
*
|
|
2165
|
-
* - If hand occlusion is detected
|
|
2166
|
-
*
|
|
2167
|
-
*
|
|
2168
|
-
* in the {@link BlinkIdProcessResult}.
|
|
2474
|
+
* - If hand occlusion is detected `InputImageAnalysisResult#processingStatus`
|
|
2475
|
+
* will be `image-preprocessing-failed` and hand occlusion status will be
|
|
2476
|
+
* reported in the `BlinkIdProcessResult`.
|
|
2169
2477
|
*
|
|
2170
|
-
* This setting is applicable only if `scanCroppedDocumentImage`
|
|
2478
|
+
* This setting is applicable only if `scanCroppedDocumentImage` is false.
|
|
2171
2479
|
*/
|
|
2172
2480
|
skipImagesOccludedByHand: boolean;
|
|
2173
2481
|
/**
|
|
@@ -2181,8 +2489,8 @@ export declare type ScanningSettings = {
|
|
|
2181
2489
|
* extracted data will be aggregated from multiple images instead of being
|
|
2182
2490
|
* sourced from a single image.
|
|
2183
2491
|
*
|
|
2184
|
-
* This only applies when
|
|
2185
|
-
*
|
|
2492
|
+
* This only applies when `InputImageSource` is equal to `video` - for images
|
|
2493
|
+
* from `photo` source, setting will be ignored.
|
|
2186
2494
|
*/
|
|
2187
2495
|
combineResultsFromMultipleInputImages: boolean;
|
|
2188
2496
|
/**
|
|
@@ -2210,7 +2518,7 @@ export declare type ScanningSettings = {
|
|
|
2210
2518
|
* If a `fields` is set to a field with an incorrect alphabetType, all fields
|
|
2211
2519
|
* on the document become optional.
|
|
2212
2520
|
*
|
|
2213
|
-
* If a `fields` is set to a field that doesn
|
|
2521
|
+
* If a `fields` is set to a field that doesn't exist in the internal rules,
|
|
2214
2522
|
* that rule is ignored.
|
|
2215
2523
|
*
|
|
2216
2524
|
* When adding multiple `fields`, any field that does not match our rules is
|
|
@@ -2279,11 +2587,10 @@ export declare type ScanningSettings = {
|
|
|
2279
2587
|
* input image and the document.
|
|
2280
2588
|
*
|
|
2281
2589
|
* Default value is `0.02f` (also recommended value). The setting is
|
|
2282
|
-
* applicable only when using images from `video` source The setting is not
|
|
2283
|
-
* applicable if
|
|
2284
|
-
*
|
|
2285
|
-
*
|
|
2286
|
-
* image.
|
|
2590
|
+
* applicable only when using images from `video` source. The setting is not
|
|
2591
|
+
* applicable if `scanCroppedDocumentImage` is enabled (it will be ignored).
|
|
2592
|
+
* This setting is implemented to comply with regulations in certain countries
|
|
2593
|
+
* that mandate documents to be stored with adequate margins in the image.
|
|
2287
2594
|
*/
|
|
2288
2595
|
inputImageMargin: number;
|
|
2289
2596
|
/**
|
|
@@ -2354,11 +2661,16 @@ export declare type ScanningSide = "first" | "second";
|
|
|
2354
2661
|
*/
|
|
2355
2662
|
export declare type ScanningStatus = "scanning-side-in-progress" | "scanning-barcode-in-progress" | "side-scanned" | "document-scanned" | "cancelled";
|
|
2356
2663
|
|
|
2664
|
+
/** The server permission error. */
|
|
2357
2665
|
export declare type ServerPermissionError = "network-error" | "remote-lock" | "permission-expired" | "payload-corrupted" | "payload-signature-verification-failed" | "incorrect-token-state" | "detected-skewed-clock";
|
|
2358
2666
|
|
|
2667
|
+
/** The server permission submit result. */
|
|
2359
2668
|
export declare type ServerPermissionSubmitResult = Readonly<{
|
|
2669
|
+
/** The error. */
|
|
2360
2670
|
error: ServerPermissionError;
|
|
2671
|
+
/** The lease. */
|
|
2361
2672
|
lease: number;
|
|
2673
|
+
/** The network error description. */
|
|
2362
2674
|
networkErrorDescription?: string;
|
|
2363
2675
|
}>;
|
|
2364
2676
|
|
|
@@ -2392,15 +2704,19 @@ export declare type StringResult = {
|
|
|
2392
2704
|
*/
|
|
2393
2705
|
export declare function testLocalStorage(): boolean;
|
|
2394
2706
|
|
|
2395
|
-
/**
|
|
2707
|
+
/**
|
|
2708
|
+
* Represents the information about the vehicle class.
|
|
2709
|
+
*
|
|
2710
|
+
* @template S - The type of the string result.
|
|
2711
|
+
*/
|
|
2396
2712
|
export declare type VehicleClassInfo<S extends string | StringResult> = {
|
|
2397
|
-
/** The type of vehicle the driver license owner has privilege to drive */
|
|
2713
|
+
/** The type of vehicle the driver license owner has privilege to drive. */
|
|
2398
2714
|
vehicleClass?: S;
|
|
2399
|
-
/** The type of driver licence */
|
|
2715
|
+
/** The type of driver licence. */
|
|
2400
2716
|
licenceType?: S;
|
|
2401
|
-
/** The date since licence is effective */
|
|
2717
|
+
/** The date since licence is effective. */
|
|
2402
2718
|
effectiveDate?: DateResult<S>;
|
|
2403
|
-
/** The date of expiry of licence */
|
|
2719
|
+
/** The date of expiry of licence. */
|
|
2404
2720
|
expiryDate?: DateResult<S>;
|
|
2405
2721
|
};
|
|
2406
2722
|
|
|
@@ -2498,19 +2814,45 @@ export declare type VizResult = {
|
|
|
2498
2814
|
nationalInsuranceNumber?: StringResult;
|
|
2499
2815
|
};
|
|
2500
2816
|
|
|
2817
|
+
/**
|
|
2818
|
+
* The WASM variant.
|
|
2819
|
+
*/
|
|
2501
2820
|
declare type WasmVariant = "basic" | "advanced" | "advanced-threads";
|
|
2502
2821
|
|
|
2503
2822
|
/**
|
|
2504
2823
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
2505
2824
|
*/
|
|
2825
|
+
/**
|
|
2826
|
+
* The WebAssembly module, for compatibility.
|
|
2827
|
+
*
|
|
2828
|
+
* @ignore
|
|
2829
|
+
*/
|
|
2506
2830
|
export declare interface WebAssemblyModule {
|
|
2507
2831
|
}
|
|
2508
2832
|
|
|
2833
|
+
/**
|
|
2834
|
+
* The worker scanning session.
|
|
2835
|
+
*/
|
|
2509
2836
|
export declare type WorkerScanningSession = OverrideProperties<BlinkIdScanningSession, {
|
|
2510
2837
|
process: (image: ImageData) => ProcessResultWithBuffer;
|
|
2511
2838
|
}> & {
|
|
2839
|
+
/**
|
|
2840
|
+
* Gets the settings.
|
|
2841
|
+
*
|
|
2842
|
+
* @returns The settings.
|
|
2843
|
+
*/
|
|
2512
2844
|
getSettings: () => BlinkIdSessionSettings;
|
|
2845
|
+
/**
|
|
2846
|
+
* Shows the demo overlay.
|
|
2847
|
+
*
|
|
2848
|
+
* @returns Whether the demo overlay is shown.
|
|
2849
|
+
*/
|
|
2513
2850
|
showDemoOverlay: () => boolean;
|
|
2851
|
+
/**
|
|
2852
|
+
* Shows the production overlay.
|
|
2853
|
+
*
|
|
2854
|
+
* @returns Whether the production overlay is shown.
|
|
2855
|
+
*/
|
|
2514
2856
|
showProductionOverlay: () => boolean;
|
|
2515
2857
|
};
|
|
2516
2858
|
|