sindri/source/types.ts
2023-05-11 12:59:02 +02:00

41 lines
702 B
TypeScript

/**
*/
type type_input = {
domains : Array<
{
name : string;
description : (null | string);
key_field : (
null
|
{
name : string;
description ?: (null | string);
}
);
data_fields : Array<
{
name : string;
description : (null | string);
type : ("boolean" | "integer" | "float" | "string_short" | "string_medium" | "string_long");
nullable : boolean;
default : (null | boolean | int | float | string);
}
>;
constraints ?: Array<
{
kind : ("unique" | "foreign_key");
parameters : Record<string, any>;
}
>;
}
>;
};
/**
*/
type type_output = {
render : ((input_data : type_input) => string);
};