UNPKG

mindee

Version:

Mindee Client Library for Node.js

28 lines (27 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IdCardV2Page = void 0; const common_1 = require("../../../parsing/common"); const standard_1 = require("../../../parsing/standard"); const idCardV2Document_1 = require("./idCardV2Document"); /** * Carte Nationale d'Identité API version 2.0 page data. */ class IdCardV2Page extends idCardV2Document_1.IdCardV2Document { constructor(rawPrediction, pageId) { super(rawPrediction, pageId); this.documentSide = new standard_1.ClassificationField({ prediction: rawPrediction["document_side"], }); this.documentType = new standard_1.ClassificationField({ prediction: rawPrediction["document_type"], }); } toString() { let outStr = `:Document Type: ${this.documentType} :Document Sides: ${this.documentSide}`.trimEnd(); outStr += "\n" + super.toString(); return (0, common_1.cleanOutString)(outStr); } } exports.IdCardV2Page = IdCardV2Page;