2023-02-20 14:46:28 +01:00
|
|
|
/**
|
|
|
|
|
*/
|
2023-05-11 12:59:02 +02:00
|
|
|
type type_input = {
|
2023-02-20 14:46:28 +01:00
|
|
|
domains : Array<
|
|
|
|
|
{
|
|
|
|
|
name : string;
|
2023-05-11 12:59:02 +02:00
|
|
|
description : (null | string);
|
|
|
|
|
key_field : (
|
2023-02-20 14:46:28 +01:00
|
|
|
null
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
name : string;
|
2023-05-11 12:59:02 +02:00
|
|
|
description ?: (null | string);
|
2023-02-20 14:46:28 +01:00
|
|
|
}
|
|
|
|
|
);
|
2023-05-11 12:59:02 +02:00
|
|
|
data_fields : Array<
|
2023-02-20 14:46:28 +01:00
|
|
|
{
|
|
|
|
|
name : string;
|
2023-05-11 12:59:02 +02:00
|
|
|
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<
|
|
|
|
|
{
|
2023-05-11 12:59:02 +02:00
|
|
|
kind : ("unique" | "foreign_key");
|
|
|
|
|
parameters : Record<string, any>;
|
2023-02-20 14:46:28 +01:00
|
|
|
}
|
|
|
|
|
>;
|
|
|
|
|
}
|
|
|
|
|
>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
|
|
|
|
type type_output = {
|
2023-05-11 12:59:02 +02:00
|
|
|
render : ((input_data : type_input) => string);
|
2023-02-20 14:46:28 +01:00
|
|
|
};
|