UNPKG

mindee

Version:

Mindee Client Library for Node.js

28 lines (27 loc) 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HealthCardV1 = void 0; const common_1 = require("../../../parsing/common"); const healthCardV1Document_1 = require("./healthCardV1Document"); /** * Health Card API version 1 inference prediction. */ class HealthCardV1 extends common_1.Inference { constructor(rawPrediction) { super(rawPrediction); /** The endpoint's name. */ this.endpointName = "french_healthcard"; /** The endpoint's version. */ this.endpointVersion = "1"; /** The document's pages. */ this.pages = []; this.prediction = new healthCardV1Document_1.HealthCardV1Document(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(healthCardV1Document_1.HealthCardV1Document, page, page["id"], page["orientation"])); } }); } } exports.HealthCardV1 = HealthCardV1;