UNPKG

mindee

Version:

Mindee Client Library for Node.js

36 lines (35 loc) 1.38 kB
import { StringDict } from "../common"; import { BaseFieldConstructor } from "../standard"; /** A JSON-like object, with miscellaneous values. */ export declare class GeneratedObjectField { /** The document page on which the information was found. */ pageId?: number; /** Confidence with which the value was assessed. */ confidence?: number; /** Raw unprocessed value, as it was sent by the server. */ rawValue?: string; /** List of all printable field names. */ private printableValues; /** All potentially present fields. */ [key: string]: string | number | boolean | object | undefined; constructor({ prediction, pageId, }: BaseFieldConstructor); /** * ReSTructured-compliant string representation. Takes into account level of indentation & displays elements as list elements. * @param level Level of indentation. 0 by default. */ toStringLevel(level?: number): string; /** * Formats a float number to have at least one decimal place. * @param n Input number. * @returns */ private toNumberString; toString(): string; get(fieldName: string): string | number | boolean | object | undefined; } /** * Checks whether a field is a custom object or not. * @param strDict input dictionary to check. */ export declare function isGeneratedObject(strDict: StringDict): boolean;