import {DataType} from "../../../src/core/parser/simple/DataType";

interface Type<T> extends Function {
    new(...args: any[]): T;
}

interface PropertiesSchema {
    [key: string]: FieldSchema<any>;
}

export interface TypeSchema {
    additionalProperties?: boolean
    properties: PropertiesSchema
}

interface TypeEditor {

}

export interface FieldSchema<T> {
    type: Type<T>
    type_parameters?: any[]
    transient?: boolean
    description?: string,
    editor?: TypeEditor
    deprecated?: boolean,
    enum?: T[],
    numeric_type: DataType,
    /**
     * Small image to be displayed next to field name
     */
    thumbnail: string,
    /**
     * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#section-6.2.2
     */
    maximum?: number,
    minimum?: number
}
