mindee
Version:
Mindee Client Library for Node.js
29 lines (28 loc) • 1.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BankCheckV1 = void 0;
const common_1 = require("../../../parsing/common");
const bankCheckV1Document_1 = require("./bankCheckV1Document");
const bankCheckV1Page_1 = require("./bankCheckV1Page");
/**
* Bank Check API version 1 inference prediction.
*/
class BankCheckV1 extends common_1.Inference {
constructor(rawPrediction) {
super(rawPrediction);
/** The endpoint's name. */
this.endpointName = "bank_check";
/** The endpoint's version. */
this.endpointVersion = "1";
/** The document's pages. */
this.pages = [];
this.prediction = new bankCheckV1Document_1.BankCheckV1Document(rawPrediction["prediction"]);
rawPrediction["pages"].forEach((page) => {
if (page.prediction !== undefined && page.prediction !== null &&
Object.keys(page.prediction).length > 0) {
this.pages.push(new common_1.Page(bankCheckV1Page_1.BankCheckV1Page, page, page["id"], page["orientation"]));
}
});
}
}
exports.BankCheckV1 = BankCheckV1;