mindee
Version:
Mindee Client Library for Node.js
74 lines (73 loc) • 1.84 kB
TypeScript
import { StringDict } from "../parsing/common";
export declare class DataSchemaField {
/**
* Display name for the field, also impacts inference results.
*/
title: string;
/**
* Name of the field in the data schema.
*/
name: string;
/**
* Whether this field can contain multiple values.
*/
isArray: boolean;
/**
* Data type of the field.
*/
type: string;
/**
* Allowed values when type is `classification`. Leave empty for other types.
*/
classificationValues?: Array<string>;
/**
* Whether to remove duplicate values in the array.
* Only applicable if `is_array` is True.
*/
uniqueValues?: boolean;
/**
* Detailed description of what this field represents.
*/
description?: string;
/**
* Optional extraction guidelines.
*/
guidelines?: string;
/**
* Subfields when type is `nested_object`. Leave empty for other types.
*/
nestedFields?: StringDict;
constructor(fields: StringDict);
toJSON(): Record<string, unknown>;
toString(): string;
}
/**
* The structure to completely replace the data schema of the model.
*/
export declare class DataSchemaReplace {
/**
* List of fields in the Data Schema.
*/
fields: Array<DataSchemaField>;
constructor(dataSchemaReplace: StringDict);
toJSON(): {
fields: Record<string, unknown>[];
};
toString(): string;
}
/**
* Modify the Data Schema.
*/
export declare class DataSchema {
/**
* If set, completely replaces the data schema of the model.
*/
replace?: DataSchemaReplace;
constructor(dataSchema: StringDict | string);
toJSON(): {
replace: {
fields: Record<string, unknown>[];
} | undefined;
};
toString(): string;
}