idmission-web-sdk 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -54,8 +54,8 @@ Render a fullscreen ID capture component that instructs the user to photograph b
54
54
  <tr><td><code>captureSignatureVideo</code> (optional)</td><td>boolean indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to false.</td></tr>
55
55
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
56
56
  <tr><td><code>idAutoCaptureEnabled</code> (optional)</td><td>boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`.</td></tr>
57
- <tr><td><code>idCardAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards.</td></tr>
58
- <tr><td><code>passportAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for passports.</td></tr>
57
+ <tr><td><code>idCardAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8.</td></tr>
58
+ <tr><td><code>passportAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75.</td></tr>
59
59
  <tr><td><code>idCardFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards.</td></tr>
60
60
  <tr><td><code>passportFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for passports.</td></tr>
61
61
  <tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to false.</td></tr>
@@ -294,8 +294,8 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
294
294
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
295
295
  <tr><td><code>lang</code> (optional)</td><td>language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto.</td></tr>
296
296
  <tr><td><code>idAutoCaptureEnabled</code> (optional)</td><td>boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`.</td></tr>
297
- <tr><td><code>idCardAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards.</td></tr>
298
- <tr><td><code>passportAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for passports.</td></tr>
297
+ <tr><td><code>idCardAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8.</td></tr>
298
+ <tr><td><code>passportAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75.</td></tr>
299
299
  <tr><td><code>idCardFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards.</td></tr>
300
300
  <tr><td><code>passportFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for passports.</td></tr>
301
301
  <tr><td><code>faceLivenessTimeoutDurationMs</code> (optional)</td><td>the duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds).</td></tr>
@@ -355,8 +355,8 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
355
355
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
356
356
  <tr><td><code>lang</code> (optional)</td><td>language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto.</td></tr>
357
357
  <tr><td><code>idAutoCaptureEnabled</code> (optional)</td><td>boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`.</td></tr>
358
- <tr><td><code>idCardAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards.</td></tr>
359
- <tr><td><code>passportAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for passports.</td></tr>
358
+ <tr><td><code>idCardAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8.</td></tr>
359
+ <tr><td><code>passportAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75.</td></tr>
360
360
  <tr><td><code>idCardFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards.</td></tr>
361
361
  <tr><td><code>passportFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for passports.</td></tr>
362
362
  <tr><td><code>faceLivenessTimeoutDurationMs</code> (optional)</td><td>the duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds).</td></tr>
@@ -50,7 +50,7 @@ var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObs
50
50
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
51
51
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
52
52
 
53
- var webSdkVersion = '1.0.0';
53
+ var webSdkVersion = '1.0.2';
54
54
 
55
55
  function getPlatform() {
56
56
  return window.platform;
@@ -8356,9 +8356,9 @@ var ModelLoadingErrorOverlay = function ModelLoadingErrorOverlay(_a) {
8356
8356
  };
8357
8357
 
8358
8358
  var PREDICTION_POSITIONS = {
8359
- boxes: 0,
8360
- scores: 7,
8361
- labels: 4
8359
+ boxes: 1,
8360
+ scores: 4,
8361
+ labels: 2
8362
8362
  };
8363
8363
  var IdCaptureModelsContext = /*#__PURE__*/React.createContext({
8364
8364
  ready: false,
@@ -8384,7 +8384,7 @@ var IdCaptureModelsContext = /*#__PURE__*/React.createContext({
8384
8384
  return null;
8385
8385
  }
8386
8386
  });
8387
- var defaultDocumentDetectionModelUrl = "".concat(DEFAULT_CDN_URL, "/models/documentdetection448/model.json");
8387
+ var defaultDocumentDetectionModelUrl = "".concat(DEFAULT_CDN_URL, "/models/docdetectuint8/model.json");
8388
8388
  var defaultFocusModelUrl = "".concat(DEFAULT_CDN_URL, "/models/focus/model.json");
8389
8389
  var IdCaptureModelsProvider = function IdCaptureModelsProvider(_a) {
8390
8390
  var children = _a.children,
@@ -8699,7 +8699,7 @@ function makeDocumentDetectionPredictions(image, logPredictions) {
8699
8699
  _e.trys.push([1, 7,, 8]);
8700
8700
  tfImg = tf__namespace.browser.fromPixels(image);
8701
8701
  if (logPredictions) console.time('resize');
8702
- tfResize = tf__namespace.image.resizeBilinear(tfImg, [448, 448]);
8702
+ tfResize = tf__namespace.image.resizeBilinear(tfImg, [320, 320]);
8703
8703
  if (logPredictions) console.timeEnd('resize');
8704
8704
  tfImg.dispose();
8705
8705
  if (logPredictions) console.time('convert to int32');
@@ -8709,7 +8709,7 @@ function makeDocumentDetectionPredictions(image, logPredictions) {
8709
8709
  _d = (_c = Array).from;
8710
8710
  return [4, tfInt32.data()];
8711
8711
  case 2:
8712
- tf4d_ = _b.apply(_a, [_d.apply(_c, [_e.sent()]), [1, 448, 448, 3]]);
8712
+ tf4d_ = _b.apply(_a, [_d.apply(_c, [_e.sent()]), [1, 320, 320, 3]]);
8713
8713
  tfInt32.dispose();
8714
8714
  tf4d = tf__namespace.cast(tf4d_, 'int32');
8715
8715
  if (logPredictions) console.timeEnd('convert to int32');
@@ -10182,9 +10182,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
10182
10182
  _q = _a.barcodeScanningEnabled,
10183
10183
  barcodeScanningEnabled = _q === void 0 ? false : _q,
10184
10184
  _r = _a.idCardAutoCaptureScoreThreshold,
10185
- idCardAutoCaptureScoreThreshold = _r === void 0 ? 0.9 : _r,
10185
+ idCardAutoCaptureScoreThreshold = _r === void 0 ? 0.8 : _r,
10186
10186
  _s = _a.passportAutoCaptureScoreThreshold,
10187
- passportAutoCaptureScoreThreshold = _s === void 0 ? 0.85 : _s,
10187
+ passportAutoCaptureScoreThreshold = _s === void 0 ? 0.75 : _s,
10188
10188
  _t = _a.mrzDetectionScoreThreshold,
10189
10189
  mrzDetectionScoreThreshold = _t === void 0 ? 0.25 : _t,
10190
10190
  _u = _a.idCardFocusScoreThreshold,
@@ -12412,7 +12412,7 @@ var IdValidation = function IdValidation(_a) {
12412
12412
  _e = _a.idCardAutoCaptureScoreThreshold,
12413
12413
  idCardAutoCaptureScoreThreshold = _e === void 0 ? 0.8 : _e,
12414
12414
  _f = _a.passportAutoCaptureScoreThreshold,
12415
- passportAutoCaptureScoreThreshold = _f === void 0 ? 0.8 : _f,
12415
+ passportAutoCaptureScoreThreshold = _f === void 0 ? 0.75 : _f,
12416
12416
  _g = _a.idCardFocusScoreThreshold,
12417
12417
  idCardFocusScoreThreshold = _g === void 0 ? 0.3 : _g,
12418
12418
  _h = _a.passportFocusScoreThreshold,
@@ -12603,7 +12603,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
12603
12603
  _f = _a.mrzDetectionScoreThreshold,
12604
12604
  mrzDetectionScoreThreshold = _f === void 0 ? 0.5 : _f,
12605
12605
  _g = _a.passportAutoCaptureScoreThreshold,
12606
- passportAutoCaptureScoreThreshold = _g === void 0 ? 0.8 : _g,
12606
+ passportAutoCaptureScoreThreshold = _g === void 0 ? 0.75 : _g,
12607
12607
  _h = _a.idCardFocusScoreThreshold,
12608
12608
  idCardFocusScoreThreshold = _h === void 0 ? 0.3 : _h,
12609
12609
  _j = _a.passportFocusScoreThreshold,
@@ -12747,7 +12747,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
12747
12747
  _f = _a.mrzDetectionScoreThreshold,
12748
12748
  mrzDetectionScoreThreshold = _f === void 0 ? 0.5 : _f,
12749
12749
  _g = _a.passportAutoCaptureScoreThreshold,
12750
- passportAutoCaptureScoreThreshold = _g === void 0 ? 0.8 : _g,
12750
+ passportAutoCaptureScoreThreshold = _g === void 0 ? 0.75 : _g,
12751
12751
  _h = _a.idCardFocusScoreThreshold,
12752
12752
  idCardFocusScoreThreshold = _h === void 0 ? 0.3 : _h,
12753
12753
  _j = _a.passportFocusScoreThreshold,