scandoc-ai-components 0.0.93 → 0.0.95
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/index.js +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11262,6 +11262,9 @@ class ExtractorVideo {
|
|
|
11262
11262
|
const imageSide = response["Side"];
|
|
11263
11263
|
const message = response["Info"];
|
|
11264
11264
|
const isNewSide = this.extractionImages[imageSide] === undefined;
|
|
11265
|
+
console.log("Received side from validation:", imageSide);
|
|
11266
|
+
console.log("Image index:", imageId);
|
|
11267
|
+
console.log("Available sides in extractionImages:", Object.keys(this.extractionImages));
|
|
11265
11268
|
if (!this.waitingForSecondSide || isNewSide) {
|
|
11266
11269
|
this.showMessage(message);
|
|
11267
11270
|
}
|
|
@@ -11293,6 +11296,7 @@ class ExtractorVideo {
|
|
|
11293
11296
|
this.waitingForSecondSide = false;
|
|
11294
11297
|
this.hasShownTurnMessage = false;
|
|
11295
11298
|
this.showMessage("Validation successful", true);
|
|
11299
|
+
console.log(this.extractionImages);
|
|
11296
11300
|
const [isExtractionOk, extractionData] = await (0,_requests_extraction__WEBPACK_IMPORTED_MODULE_2__["default"])(this.extractionImages["FRONT"], this.extractionImages["BACK"], {
|
|
11297
11301
|
IgnoreBackImage: false
|
|
11298
11302
|
});
|
|
@@ -11961,6 +11965,11 @@ async function callDocumentExtraction(frontImage, backImage, ignoreBackImage) {
|
|
|
11961
11965
|
FaceImageResize: cfgValues.FACE_IMAGE_RESIZE
|
|
11962
11966
|
};
|
|
11963
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);
|
|
11964
11973
|
const response = await fetch(`${cfgValues.SCAN_APP_URL}extraction/`, {
|
|
11965
11974
|
method: "POST",
|
|
11966
11975
|
headers: {
|
|
@@ -11987,6 +11996,7 @@ async function callDocumentExtraction(frontImage, backImage, ignoreBackImage) {
|
|
|
11987
11996
|
//
|
|
11988
11997
|
if (response.status === 200) {
|
|
11989
11998
|
const data = await response.json();
|
|
11999
|
+
console.log(data);
|
|
11990
12000
|
return [true, data];
|
|
11991
12001
|
}
|
|
11992
12002
|
//
|