scandoc-ai-components 0.0.95 → 0.0.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +17 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11965,11 +11965,6 @@ async function callDocumentExtraction(frontImage, backImage, ignoreBackImage) {
11965
11965
  FaceImageResize: cfgValues.FACE_IMAGE_RESIZE
11966
11966
  };
11967
11967
  const currentSettings = (0,_utility_utils__WEBPACK_IMPORTED_MODULE_1__.removeNullFields)(settings);
11968
- console.log("Starting document extraction...");
11969
- console.log("Ignore back image:", ignoreBackImage);
11970
- console.log("Front image (first 100 chars):", frontImage?.substring(0, 100));
11971
- console.log("Back image (first 100 chars):", backImage?.substring(0, 100));
11972
- console.log("Sending settings:", currentSettings);
11973
11968
  const response = await fetch(`${cfgValues.SCAN_APP_URL}extraction/`, {
11974
11969
  method: "POST",
11975
11970
  headers: {
@@ -11993,10 +11988,26 @@ async function callDocumentExtraction(frontImage, backImage, ignoreBackImage) {
11993
11988
  Browser: browser
11994
11989
  })
11995
11990
  });
11991
+ const requestBody = {
11992
+ AcceptTermsAndConditions: true,
11993
+ DataFields: {
11994
+ BackImage: ignoreBackImage ? "" : backImage,
11995
+ BackImageCropped: false,
11996
+ BackImageType: "base64",
11997
+ FrontImage: frontImage,
11998
+ FrontImageCropped: false,
11999
+ FrontImageType: "base64"
12000
+ },
12001
+ Settings: currentSettings,
12002
+ OS: os,
12003
+ Device: device,
12004
+ Browser: browser
12005
+ };
12006
+ console.log("Extraction request body:", requestBody);
12007
+
11996
12008
  //
11997
12009
  if (response.status === 200) {
11998
12010
  const data = await response.json();
11999
- console.log(data);
12000
12011
  return [true, data];
12001
12012
  }
12002
12013
  //
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "scandoc-ai-components",
3
3
  "author": "ScanDoc-AI",
4
- "version": "0.0.95",
4
+ "version": "0.0.97",
5
5
  "private": false,
6
6
  "description": "Pure JavaScript package for integrating ScanDoc-AI services.",
7
7
  "keywords": [