@microblink/blinkid-react-native 7.2.0 → 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/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/microblink/blinkid/reactnative/BlinkIdDeserializationUtilities.kt +2 -1
- package/android/src/main/java/com/microblink/blinkid/reactnative/BlinkIdSerializationUtilities.kt +20 -3
- package/ios/BlinkIdDeserializationUtilities.swift +3 -0
- package/ios/BlinkIdSerializationUtilities.swift +149 -52
- package/ios/Frameworks/BlinkID.xcframework/Info.plist +5 -5
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/BlinkID +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Headers/BlinkID-Swift.h +125 -11
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Info.plist +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios.abi.json +983 -117
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios.private.swiftinterface +15 -2
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios.swiftinterface +15 -2
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/_CodeSignature/CodeResources +15 -15
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64/BlinkID.framework/conan.xcconfig +3 -3
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/BlinkID +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Headers/BlinkID-Swift.h +250 -22
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Info.plist +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios-simulator.abi.json +983 -117
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +15 -2
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/arm64-apple-ios-simulator.swiftinterface +15 -2
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/x86_64-apple-ios-simulator.abi.json +983 -117
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +15 -2
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/Modules/BlinkID.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +15 -2
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/_CodeSignature/CodeResources +25 -25
- package/ios/Frameworks/BlinkID.xcframework/ios-arm64_x86_64-simulator/BlinkID.framework/conan.xcconfig +3 -3
- package/ios/Frameworks/BlinkIDUX.xcframework/Info.plist +5 -5
- package/ios/Frameworks/BlinkIDUX.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/_CodeSignature/CodeResources +72 -72
- package/ios/Frameworks/BlinkIDUX.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/Assets.car +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/hr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.abi.json +219 -22
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.package.swiftinterface +10 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.private.swiftinterface +10 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios.swiftinterface +10 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/Assets.car +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/_CodeSignature/CodeResources +6 -6
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/BlinkIDUX_BlinkIDUX.bundle/hr.lproj/Localizable.strings +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.abi.json +219 -22
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +10 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +10 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/arm64-apple-ios-simulator.swiftinterface +10 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.abi.json +219 -22
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +10 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +10 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BlinkIDUX.xcframework/ios-arm64_x86_64-simulator/BlinkIDUX.framework/Modules/BlinkIDUX.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +10 -0
- package/lib/module/NativeBlinkidReactNative.js +4 -4
- package/lib/module/NativeBlinkidReactNative.js.map +1 -1
- package/lib/module/blinkIdResult.js +34 -1
- package/lib/module/blinkIdResult.js.map +1 -1
- package/lib/module/blinkIdSettings.js +272 -259
- package/lib/module/blinkIdSettings.js.map +1 -1
- package/lib/module/blinkIdUtilities.js +2 -2
- package/lib/module/index.js +19 -19
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +25 -9
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/NativeBlinkidReactNative.d.ts +1 -1
- package/lib/typescript/src/NativeBlinkidReactNative.d.ts.map +1 -1
- package/lib/typescript/src/blinkIdResult.d.ts +16 -1
- package/lib/typescript/src/blinkIdResult.d.ts.map +1 -1
- package/lib/typescript/src/blinkIdSettings.d.ts +193 -181
- package/lib/typescript/src/blinkIdSettings.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +6 -6
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +16 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeBlinkidReactNative.ts +25 -15
- package/src/blinkIdResult.ts +74 -74
- package/src/blinkIdSettings.ts +264 -250
- package/src/blinkIdUtilities.ts +4 -4
- package/src/index.tsx +56 -34
- package/src/types.ts +641 -688
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
|
@@ -4,12 +4,12 @@ import { DetectionLevel, AnonymizationMode, ScanningMode, RecognitionModeFilter
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Settings for the initialization of the BlinkID SDK.
|
|
7
|
-
*
|
|
7
|
+
*
|
|
8
8
|
*/
|
|
9
9
|
export class BlinkIdSdkSettings {
|
|
10
10
|
/**
|
|
11
11
|
* License key for the native SDK.
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -19,40 +19,52 @@ export class BlinkIdSdkSettings {
|
|
|
19
19
|
/**
|
|
20
20
|
* Whether resources required for on-device image processing should be downloaded and cached
|
|
21
21
|
* on first initialization of the SDK.
|
|
22
|
-
*
|
|
22
|
+
*
|
|
23
23
|
* If set to false, you need to package all the required
|
|
24
24
|
* resources in your application's assets.
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* If resources are to be downloaded, the following is the URL where the resources are hosted.
|
|
30
|
-
*
|
|
30
|
+
*
|
|
31
31
|
* URL: `"https://models.cdn.microblink.com/resources"`
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Local folder name where resources will be downloaded and cached.
|
|
36
|
-
*
|
|
36
|
+
*
|
|
37
37
|
* If resources are being downloaded, this defines the name of the folder within your
|
|
38
38
|
* application's cache folder where resources will be cached.
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* If resources downloading is disabled, this defines the bundle of your app where the resources reside.
|
|
43
|
-
*
|
|
43
|
+
*
|
|
44
44
|
*/
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Timeout settings for resource downloads.
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
52
|
+
* Set a custom HTTPS URL to be used as a proxy for Ping and license checks.
|
|
53
|
+
* The proxy URL will be applied only if the license has the appropriate rights.
|
|
54
|
+
*
|
|
55
|
+
* The URL must use the HTTPS protocol. Example: https://your-proxy.com/
|
|
56
|
+
*
|
|
57
|
+
* If this value is defined, SDK initialization will not be successful in the following cases:
|
|
58
|
+
* - if the URL does not use HTTPS or if the URL is invalid
|
|
59
|
+
* - if the license does not allow proxy usage
|
|
60
|
+
*
|
|
54
61
|
*/
|
|
55
|
-
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* Settings for the initialization of the BlinkID SDK.
|
|
66
|
+
*/
|
|
67
|
+
constructor(licenseKey, licensee, downloadResources, resourceDownloadUrl, resourceLocalFolder, bundleURL, resourceRequestTimeout, microblinkProxyURL) {
|
|
56
68
|
this.licenseKey = licenseKey;
|
|
57
69
|
this.licensee = licensee;
|
|
58
70
|
this.downloadResources = downloadResources;
|
|
@@ -60,12 +72,13 @@ export class BlinkIdSdkSettings {
|
|
|
60
72
|
this.resourceLocalFolder = resourceLocalFolder;
|
|
61
73
|
this.bundleURL = bundleURL;
|
|
62
74
|
this.resourceRequestTimeout = resourceRequestTimeout;
|
|
75
|
+
this.microblinkProxyURL = microblinkProxyURL;
|
|
63
76
|
}
|
|
64
77
|
}
|
|
65
78
|
|
|
66
79
|
/**
|
|
67
80
|
* Represents the configuration settings for a scanning session.
|
|
68
|
-
*
|
|
81
|
+
*
|
|
69
82
|
* This class holds the settings related to the resources initialization,
|
|
70
83
|
* scanning mode, and specific scanning configurations that define how the scanning
|
|
71
84
|
* session should behave.
|
|
@@ -73,28 +86,28 @@ export class BlinkIdSdkSettings {
|
|
|
73
86
|
export class BlinkIdSessionSettings {
|
|
74
87
|
/**
|
|
75
88
|
* The scanning mode to be used during the scanning session.
|
|
76
|
-
*
|
|
89
|
+
*
|
|
77
90
|
* Specifies whether the scanning is for a single side of a document or multiple
|
|
78
91
|
* sides, as defined in {@link ScanningMode}. The default is set to `automatic`, which
|
|
79
92
|
* automatically determines the number of sides to scan.
|
|
80
|
-
*
|
|
93
|
+
*
|
|
81
94
|
*/
|
|
82
95
|
|
|
83
|
-
/**
|
|
96
|
+
/**
|
|
84
97
|
* The specific scanning settings for the scanning session.
|
|
85
98
|
*
|
|
86
99
|
* Defines various parameters that control the scanning process.
|
|
87
100
|
*/
|
|
88
101
|
|
|
89
|
-
/**
|
|
102
|
+
/**
|
|
90
103
|
* Duration in seconds before scanning step times out and is cancelled.
|
|
91
|
-
*
|
|
104
|
+
*
|
|
92
105
|
* If less than zero, scanning will not time out.
|
|
93
106
|
* Defaults to 15000 (miliseconds)
|
|
94
107
|
*/
|
|
95
108
|
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
98
111
|
* Represents the configuration settings for a scanning session.
|
|
99
112
|
*
|
|
100
113
|
* This class holds the settings related to the resources initialization,
|
|
@@ -110,25 +123,25 @@ export class BlinkIdSessionSettings {
|
|
|
110
123
|
|
|
111
124
|
/**
|
|
112
125
|
* Represents the configurable settings for scanning a document.
|
|
113
|
-
*
|
|
126
|
+
*
|
|
114
127
|
* This class defines various parameters and policies related to the scanning
|
|
115
128
|
* process, including image quality handling, data extraction and anonymization,
|
|
116
129
|
* along with options for frame processing and image extraction.
|
|
117
|
-
*
|
|
130
|
+
*
|
|
118
131
|
* */
|
|
119
132
|
export class BlinkIdScanningSettings {
|
|
120
133
|
/**
|
|
121
134
|
* The level of blur detection in the document image.
|
|
122
|
-
*
|
|
135
|
+
*
|
|
123
136
|
* Defines the severity of blur detected in the document image, as defined
|
|
124
137
|
* in [DetectionLevel]. Values range from `off` (detection NotAvailable) to higher
|
|
125
138
|
* levels of blur detection.
|
|
126
|
-
*
|
|
139
|
+
*
|
|
127
140
|
* `low` – less sensitive to blur; if something is detected as blur, it is almost certainly actual blur,
|
|
128
141
|
* but some amount of blur may not be detected at all.
|
|
129
142
|
* `high` – highly sensitive to blur; it may detect as blur even something that only resembles blur.
|
|
130
|
-
*
|
|
131
|
-
* Default: {@link DetectionLevel.Mid}
|
|
143
|
+
*
|
|
144
|
+
* Default: {@link DetectionLevel.Mid}
|
|
132
145
|
* */
|
|
133
146
|
|
|
134
147
|
/**
|
|
@@ -141,230 +154,230 @@ export class BlinkIdScanningSettings {
|
|
|
141
154
|
* - If blurDetectionLevel != `off` - even if blur is detected, the image will be processed and blur will be reported in the `ProcessResult`.
|
|
142
155
|
*
|
|
143
156
|
* Default: `true`
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
*/
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
*/
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
*/
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The level of glare detection in the document image.
|
|
161
|
+
*
|
|
162
|
+
* Defines the severity of glare detected in the document image, as defined in [DetectionLevel].
|
|
163
|
+
* Values range from `off` (detection NotAvailable) to higher levels of glare detection.
|
|
164
|
+
* `low` – less sensitive to glare; if something is detected as glare, it is almost certainly actual glare,
|
|
165
|
+
* but some amount of glare may not be detected at all.
|
|
166
|
+
* `high` – highly sensitive to glare; it may detect as glare even something that only resembles glare.
|
|
167
|
+
*
|
|
168
|
+
* Default: {@link DetectionLevel.Mid}
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Indicates whether images with glare in the document image should be skipped.
|
|
173
|
+
*
|
|
174
|
+
* A value of `true` means images with detected glare will be excluded from further processing to prevent glared images from being used
|
|
175
|
+
* - If glareDetectionLevel = `off` - glared images will be processed
|
|
176
|
+
* - If glare is detected `ProcessingStatus` will be `ImagePreprocessingFailed` and glare will be reported in the `ProcessResult`
|
|
177
|
+
* A value of `false` means images with detected glare will not be excluded from further processing
|
|
178
|
+
* - If glareDetectionLevel != `off` - even if glare is detected, the image will be processed and glare will be reported in the `ProcessResult`
|
|
179
|
+
*
|
|
180
|
+
* Default: `true`
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The level of allowed detected tilt of the document in the image.
|
|
185
|
+
*
|
|
186
|
+
* Defines the severity of allowed detected tilt of the document in the image, as defined in [DetectionLevel].
|
|
187
|
+
* Values range from `off` (detection NotAvailable) to higher levels of allowed tilt.
|
|
188
|
+
* `low` – less sensitive to tilt.
|
|
189
|
+
* `high` – highly sensitive to tilt.
|
|
190
|
+
*
|
|
191
|
+
* Default: {@link DetectionLevel.off}
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Indicates whether images with inadequate lighting conditions should be rejected.
|
|
196
|
+
*
|
|
197
|
+
* Inadequate lighting conditions are represented as either `TooBright` or `TooDark` document images,
|
|
198
|
+
* as defined in the `ImageAnalysisLightingStatus` enum.
|
|
199
|
+
* A value of `true` means images with inadequate lighting conditions will be excluded from further processing to prevent images with
|
|
200
|
+
* inadequate lighting from being used
|
|
201
|
+
* - If inadequate light conditions are detected `ProcessingStatus` will be `ImagePreprocessingFailed` and lighting status will be
|
|
202
|
+
* reported in the `ProcessResult`.
|
|
203
|
+
*
|
|
204
|
+
* Default: `true`
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Indicates whether images occluded by hand should be rejected.
|
|
209
|
+
*
|
|
210
|
+
* A value of `true` means images occluded by hand will be excluded from further processing to prevent occluded images from being used
|
|
211
|
+
* - If hand occlusion is detected `ProcessingStatus` will be `ImagePreprocessingFailed` and hand occlusion status will be reported
|
|
212
|
+
* in the `ProcessResult`
|
|
213
|
+
* This setting is applicable only if `scanCroppedDocumentImage` = false.
|
|
214
|
+
*
|
|
215
|
+
* Default: `true`
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Indicates whether the aggregation of data from multiple images is enabled.
|
|
220
|
+
*
|
|
221
|
+
* Disabling this setting will yield higher-quality captured images, but it may slow down the scanning process due to the additional
|
|
222
|
+
* effort required to find the optimal image.
|
|
223
|
+
* Enabling this setting will simplify the extraction process, but the extracted data will be aggregated from multiple images instead
|
|
224
|
+
* of being sourced from a single image.
|
|
225
|
+
* This only applies to images from Video input image source - for images from Photo source, setting will be ignored.
|
|
226
|
+
*
|
|
227
|
+
* Default: `true`
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Enables barcode recognition to proceed even if the initial VIZ extraction fails.
|
|
232
|
+
*
|
|
233
|
+
* If the barcode recognition is successful, recognition will still end in a valid state.
|
|
234
|
+
* This setting is applicable only to images from Photo source.
|
|
235
|
+
* For multi-side scanning, it is permitted only for the back side.
|
|
236
|
+
*
|
|
237
|
+
* Default: `false`
|
|
238
|
+
*/
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Defines custom rules for specific document class.
|
|
242
|
+
*
|
|
243
|
+
* When defining [DocumentRules], [DocumentFilter] is optionally set to specify the document to which the rule applies, and a `fields` with
|
|
244
|
+
* the appropriate `alphabetType` should be specified as mandatory for that document.
|
|
245
|
+
* If a `fields` is set to a field that is optional for that document or does not exist on it, all fields on the document become optional.
|
|
246
|
+
* If a `fields` is set to a field with an incorrect alphabetType, all fields on the document become optional.
|
|
247
|
+
* If a `fields` is set to a field that doesn’t exist in the internal rules, that rule is ignored.
|
|
248
|
+
* When adding multiple `fields`, any field that does not match our rules is ignored. Only fields that comply with our rules are set as mandatory.
|
|
249
|
+
* If the documentFilter fields `country`, `region`, or `type` are set to `null`, all supported values for those fields will be considered.
|
|
250
|
+
* For example, if `country = null`, the rule will apply to all supported countries in BlinkID.
|
|
251
|
+
*
|
|
252
|
+
* By default, document fields are validated using internal rules that define mandatory fields for the scanned document class. This setting allows
|
|
253
|
+
* users to narrow down our internal rules on mandatory fields. All undefined fields will become optional. It is not possible to mark fields as
|
|
254
|
+
* mandatory if they cannot theoretically appear on the document.
|
|
255
|
+
* The more detailed document filter will have priority over the other.
|
|
256
|
+
*
|
|
257
|
+
* See {@link DocumentRules} for more detailed information.
|
|
258
|
+
*/
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The mode of anonymization applied to the document.
|
|
262
|
+
*
|
|
263
|
+
* Redact specific fields based on requirements or laws regarding a specific document.
|
|
264
|
+
* Data can be redacted from the image, the result or both.
|
|
265
|
+
*
|
|
266
|
+
* Default: {@link AnonymizationMode.fullResult}
|
|
267
|
+
*/
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Redact fields for specific document class.
|
|
271
|
+
*
|
|
272
|
+
* Fields specified by requirements or laws for a specific document will be redacted regardless of this setting.
|
|
273
|
+
* Based on anonymizationMode setting, data will be redacted from the image, the result or both.
|
|
274
|
+
*
|
|
275
|
+
* See {@link DocumentAnonymizationSettings} for more information.
|
|
276
|
+
*/
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Indicates whether input images should be returned.
|
|
280
|
+
*
|
|
281
|
+
* Save the input images at the moment of the data extraction or timeout.
|
|
282
|
+
* This significantly increases memory consumption. The scanning performance is not affected.
|
|
283
|
+
*
|
|
284
|
+
* Default: `false`
|
|
285
|
+
*/
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Process only cropped document images.
|
|
289
|
+
* Requires the input image to consist solely of the cropped document image with perspective correction applied.
|
|
290
|
+
* This only applies to images from Photo input image source - for images from Video input image source, setting will be ignored.
|
|
291
|
+
*
|
|
292
|
+
* Default: `false`
|
|
293
|
+
*/
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The filter for recognition modes.
|
|
297
|
+
*
|
|
298
|
+
* Specifies which recognition modes are enabled during the scanning process, with a default value of true to enable all modes.
|
|
299
|
+
* [RecognitionModeFilter] is used to enable/disable recognition of specific document groups.
|
|
300
|
+
*
|
|
301
|
+
* This setting is experimental and it will be removed in upcoming releases.
|
|
302
|
+
*
|
|
303
|
+
* By default all modes are enabled (set to `true`).
|
|
304
|
+
*/
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Indicates whether character validation is enabled.
|
|
308
|
+
*
|
|
309
|
+
* Allow only results containing expected characters for a given field.
|
|
310
|
+
* Each field is validated against a set of rules.
|
|
311
|
+
* All fields have to be successfully validated in order to successfully scan a document.
|
|
312
|
+
* Setting is used to improve scanning accuracy.
|
|
313
|
+
* If set to `true`, when an invalid character is detected `ProcessingStatus.InvalidCharactersFound` is returned.
|
|
314
|
+
*
|
|
315
|
+
* Default: `true`
|
|
316
|
+
*/
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Defines the minimum required margin (in percentage) between the edge of the input image and the document.
|
|
320
|
+
*
|
|
321
|
+
* The setting is applicable only when using images from Video source.
|
|
322
|
+
* The setting is not applicable if `scanCroppedDocumentImage = true` (it will be ignored).
|
|
323
|
+
* This setting is implemented to comply with regulations in certain countries that mandate documents
|
|
324
|
+
* to be stored with adequate margins in the image.
|
|
325
|
+
*
|
|
326
|
+
* Default: `0.02` (also recommended value)
|
|
327
|
+
*/
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Indicates whether backside of unsupported document should be scanned also.
|
|
331
|
+
*
|
|
332
|
+
* By default, back side of the document will not be scanned if only the front side is supported for a specific
|
|
333
|
+
* document.
|
|
334
|
+
*
|
|
335
|
+
* Default: `false`
|
|
336
|
+
*/
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Indicates whether scanning can continue to the next side despite an uncertain front-side scan.
|
|
340
|
+
*
|
|
341
|
+
* This only applies to images from Photo input image source - for images from Video source, setting will be
|
|
342
|
+
* ignored.
|
|
343
|
+
*
|
|
344
|
+
* Default: `false`
|
|
345
|
+
*/
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* The maximum allowed mismatches per field during data matching.
|
|
349
|
+
*
|
|
350
|
+
* Configures the maximum number of characters per field that can be inconsistent during data matching.
|
|
351
|
+
* By defualt, no mismatches are allowed.
|
|
352
|
+
*
|
|
353
|
+
* Default: `0`
|
|
354
|
+
*/
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Indicates whether only the passport data page should be scanned.
|
|
358
|
+
*
|
|
359
|
+
* Scan only the data page ( page containing MRZ ) of the passport.
|
|
360
|
+
* If set to `false`, it will be required to scan the second page of certain passports.
|
|
361
|
+
*
|
|
362
|
+
* Default: `true`
|
|
363
|
+
*/
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Configures the image processing settings during the scanning process.
|
|
367
|
+
*
|
|
368
|
+
* Allows customization of cropped image handling, such as dotsPerInch, extensions, and
|
|
369
|
+
* whether images should be returned for the document, face or signature regions.
|
|
370
|
+
*
|
|
371
|
+
* See {@link CroppedImageSettings} for more information.
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Represents the configurable settings for scanning a document.
|
|
376
|
+
*
|
|
377
|
+
* This class defines various parameters and policies related to the scanning
|
|
378
|
+
* process, including image quality handling, data extraction and anonymization,
|
|
379
|
+
* along with options for frame processing and image extraction.
|
|
380
|
+
*/
|
|
368
381
|
constructor() {
|
|
369
382
|
this.blurDetectionLevel = DetectionLevel.Mid;
|
|
370
383
|
this.skipImagesWithBlur = true;
|
|
@@ -392,20 +405,20 @@ export class BlinkIdScanningSettings {
|
|
|
392
405
|
/**
|
|
393
406
|
* Allows customization of various aspects of the UI
|
|
394
407
|
* used during the scanning process.
|
|
395
|
-
*
|
|
408
|
+
*
|
|
396
409
|
*/
|
|
397
410
|
export class BlinkIdUiSettings {
|
|
398
411
|
/**
|
|
399
412
|
* A boolean indicating whether to show a help button
|
|
400
413
|
* and enable help screens during the scanning session.
|
|
401
|
-
*
|
|
414
|
+
*
|
|
402
415
|
* Default: `true`
|
|
403
416
|
*/
|
|
404
417
|
|
|
405
418
|
/**
|
|
406
419
|
* A boolean indicating whether to show an onboarding dialog
|
|
407
420
|
* at the beginning of the scanning session.
|
|
408
|
-
*
|
|
421
|
+
*
|
|
409
422
|
* Default: `true`
|
|
410
423
|
*/
|
|
411
424
|
|
|
@@ -417,42 +430,42 @@ export class BlinkIdUiSettings {
|
|
|
417
430
|
|
|
418
431
|
/**
|
|
419
432
|
* Represents the image cropping settings.
|
|
420
|
-
*
|
|
433
|
+
*
|
|
421
434
|
*/
|
|
422
435
|
export class CroppedImageSettings {
|
|
423
436
|
/**
|
|
424
437
|
* The DPI value for the cropped image.
|
|
425
|
-
*
|
|
438
|
+
*
|
|
426
439
|
* Default: `250`
|
|
427
440
|
*/
|
|
428
441
|
|
|
429
442
|
/**
|
|
430
443
|
* The extension factor for the cropped image.
|
|
431
|
-
*
|
|
444
|
+
*
|
|
432
445
|
* Default: `0`
|
|
433
446
|
*/
|
|
434
447
|
|
|
435
448
|
/**
|
|
436
449
|
* Indicates whether the document image should be returned.
|
|
437
|
-
*
|
|
450
|
+
*
|
|
438
451
|
* Default: `false`
|
|
439
452
|
*/
|
|
440
453
|
|
|
441
454
|
/**
|
|
442
455
|
* Indicates whether the face image should be returned.
|
|
443
|
-
*
|
|
456
|
+
*
|
|
444
457
|
* Default: `false`
|
|
445
458
|
*/
|
|
446
459
|
|
|
447
460
|
/**
|
|
448
461
|
* Indicates whether the signature image should be returned.
|
|
449
|
-
*
|
|
462
|
+
*
|
|
450
463
|
* Default: `false`
|
|
451
464
|
*/
|
|
452
465
|
|
|
453
466
|
/**
|
|
454
467
|
* Represents the image cropping settings.
|
|
455
|
-
*
|
|
468
|
+
*
|
|
456
469
|
*/
|
|
457
470
|
constructor() {
|
|
458
471
|
this.dotsPerInch = 250;
|