sindri/source/types.ts

41 lines
702 B
TypeScript
Raw Normal View History

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