Fix OpenAPI definitions and tests for tables

This commit is contained in:
Andrew Kingston 2025-03-11 11:58:44 +00:00
parent 398a5e675e
commit 728ed53bc0
No known key found for this signature in database
4 changed files with 486 additions and 205 deletions

View File

@ -842,17 +842,29 @@
"description": "A constraint can be applied to the column which will be validated against when a row is saved.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"object",
"boolean"
]
"type": "string"
},
"presence": {
"type": "boolean",
"description": "Defines whether the column is required or not."
"oneOf": [
{
"type": "boolean",
"description": "Defines whether the column is required or not."
},
{
"type": "object",
"description": "Defines whether the column is required or not.",
"properties": {
"allowEmpty": {
"type": "boolean",
"description": "Defines whether the value is allowed to be empty or not."
}
}
}
]
},
"inclusion": {
"type": "array",
"description": "Defines the valid values for this column."
}
}
},
@ -864,6 +876,10 @@
"type": "boolean",
"description": "Defines whether the column is automatically generated."
},
"width": {
"type": "number",
"description": "Defines the width of the column in the data UI."
},
"fieldName": {
"type": "string",
"description": "The name of the column which a relationship column is related to in another table."
@ -914,17 +930,29 @@
"description": "A constraint can be applied to the column which will be validated against when a row is saved.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"object",
"boolean"
]
"type": "string"
},
"presence": {
"type": "boolean",
"description": "Defines whether the column is required or not."
"oneOf": [
{
"type": "boolean",
"description": "Defines whether the column is required or not."
},
{
"type": "object",
"description": "Defines whether the column is required or not.",
"properties": {
"allowEmpty": {
"type": "boolean",
"description": "Defines whether the value is allowed to be empty or not."
}
}
}
]
},
"inclusion": {
"type": "array",
"description": "Defines the valid values for this column."
}
}
},
@ -936,6 +964,10 @@
"type": "boolean",
"description": "Defines whether the column is automatically generated."
},
"width": {
"type": "number",
"description": "Defines the width of the column in the data UI."
},
"formula": {
"type": "string",
"description": "Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format."
@ -965,8 +997,6 @@
"datetime",
"attachment",
"attachment_single",
"link",
"formula",
"auto",
"ai",
"json",
@ -984,17 +1014,29 @@
"description": "A constraint can be applied to the column which will be validated against when a row is saved.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"object",
"boolean"
]
"type": "string"
},
"presence": {
"type": "boolean",
"description": "Defines whether the column is required or not."
"oneOf": [
{
"type": "boolean",
"description": "Defines whether the column is required or not."
},
{
"type": "object",
"description": "Defines whether the column is required or not.",
"properties": {
"allowEmpty": {
"type": "boolean",
"description": "Defines whether the value is allowed to be empty or not."
}
}
}
]
},
"inclusion": {
"type": "array",
"description": "Defines the valid values for this column."
}
}
},
@ -1005,6 +1047,10 @@
"autocolumn": {
"type": "boolean",
"description": "Defines whether the column is automatically generated."
},
"width": {
"type": "number",
"description": "Defines the width of the column in the data UI."
}
}
}
@ -1052,17 +1098,29 @@
"description": "A constraint can be applied to the column which will be validated against when a row is saved.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"object",
"boolean"
]
"type": "string"
},
"presence": {
"type": "boolean",
"description": "Defines whether the column is required or not."
"oneOf": [
{
"type": "boolean",
"description": "Defines whether the column is required or not."
},
{
"type": "object",
"description": "Defines whether the column is required or not.",
"properties": {
"allowEmpty": {
"type": "boolean",
"description": "Defines whether the value is allowed to be empty or not."
}
}
}
]
},
"inclusion": {
"type": "array",
"description": "Defines the valid values for this column."
}
}
},
@ -1074,6 +1132,10 @@
"type": "boolean",
"description": "Defines whether the column is automatically generated."
},
"width": {
"type": "number",
"description": "Defines the width of the column in the data UI."
},
"fieldName": {
"type": "string",
"description": "The name of the column which a relationship column is related to in another table."
@ -1124,17 +1186,29 @@
"description": "A constraint can be applied to the column which will be validated against when a row is saved.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"object",
"boolean"
]
"type": "string"
},
"presence": {
"type": "boolean",
"description": "Defines whether the column is required or not."
"oneOf": [
{
"type": "boolean",
"description": "Defines whether the column is required or not."
},
{
"type": "object",
"description": "Defines whether the column is required or not.",
"properties": {
"allowEmpty": {
"type": "boolean",
"description": "Defines whether the value is allowed to be empty or not."
}
}
}
]
},
"inclusion": {
"type": "array",
"description": "Defines the valid values for this column."
}
}
},
@ -1146,6 +1220,10 @@
"type": "boolean",
"description": "Defines whether the column is automatically generated."
},
"width": {
"type": "number",
"description": "Defines the width of the column in the data UI."
},
"formula": {
"type": "string",
"description": "Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format."
@ -1175,8 +1253,6 @@
"datetime",
"attachment",
"attachment_single",
"link",
"formula",
"auto",
"ai",
"json",
@ -1194,17 +1270,29 @@
"description": "A constraint can be applied to the column which will be validated against when a row is saved.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"object",
"boolean"
]
"type": "string"
},
"presence": {
"type": "boolean",
"description": "Defines whether the column is required or not."
"oneOf": [
{
"type": "boolean",
"description": "Defines whether the column is required or not."
},
{
"type": "object",
"description": "Defines whether the column is required or not.",
"properties": {
"allowEmpty": {
"type": "boolean",
"description": "Defines whether the value is allowed to be empty or not."
}
}
}
]
},
"inclusion": {
"type": "array",
"description": "Defines the valid values for this column."
}
}
},
@ -1215,6 +1303,10 @@
"autocolumn": {
"type": "boolean",
"description": "Defines whether the column is automatically generated."
},
"width": {
"type": "number",
"description": "Defines the width of the column in the data UI."
}
}
}
@ -1273,17 +1365,29 @@
"description": "A constraint can be applied to the column which will be validated against when a row is saved.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"object",
"boolean"
]
"type": "string"
},
"presence": {
"type": "boolean",
"description": "Defines whether the column is required or not."
"oneOf": [
{
"type": "boolean",
"description": "Defines whether the column is required or not."
},
{
"type": "object",
"description": "Defines whether the column is required or not.",
"properties": {
"allowEmpty": {
"type": "boolean",
"description": "Defines whether the value is allowed to be empty or not."
}
}
}
]
},
"inclusion": {
"type": "array",
"description": "Defines the valid values for this column."
}
}
},
@ -1295,6 +1399,10 @@
"type": "boolean",
"description": "Defines whether the column is automatically generated."
},
"width": {
"type": "number",
"description": "Defines the width of the column in the data UI."
},
"fieldName": {
"type": "string",
"description": "The name of the column which a relationship column is related to in another table."
@ -1345,17 +1453,29 @@
"description": "A constraint can be applied to the column which will be validated against when a row is saved.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"object",
"boolean"
]
"type": "string"
},
"presence": {
"type": "boolean",
"description": "Defines whether the column is required or not."
"oneOf": [
{
"type": "boolean",
"description": "Defines whether the column is required or not."
},
{
"type": "object",
"description": "Defines whether the column is required or not.",
"properties": {
"allowEmpty": {
"type": "boolean",
"description": "Defines whether the value is allowed to be empty or not."
}
}
}
]
},
"inclusion": {
"type": "array",
"description": "Defines the valid values for this column."
}
}
},
@ -1367,6 +1487,10 @@
"type": "boolean",
"description": "Defines whether the column is automatically generated."
},
"width": {
"type": "number",
"description": "Defines the width of the column in the data UI."
},
"formula": {
"type": "string",
"description": "Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format."
@ -1396,8 +1520,6 @@
"datetime",
"attachment",
"attachment_single",
"link",
"formula",
"auto",
"ai",
"json",
@ -1415,17 +1537,29 @@
"description": "A constraint can be applied to the column which will be validated against when a row is saved.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"object",
"boolean"
]
"type": "string"
},
"presence": {
"type": "boolean",
"description": "Defines whether the column is required or not."
"oneOf": [
{
"type": "boolean",
"description": "Defines whether the column is required or not."
},
{
"type": "object",
"description": "Defines whether the column is required or not.",
"properties": {
"allowEmpty": {
"type": "boolean",
"description": "Defines whether the value is allowed to be empty or not."
}
}
}
]
},
"inclusion": {
"type": "array",
"description": "Defines the valid values for this column."
}
}
},
@ -1436,6 +1570,10 @@
"autocolumn": {
"type": "boolean",
"description": "Defines whether the column is automatically generated."
},
"width": {
"type": "number",
"description": "Defines the width of the column in the data UI."
}
}
}

View File

@ -752,20 +752,28 @@ components:
properties:
type:
type: string
enum:
- string
- number
- object
- boolean
presence:
type: boolean
description: Defines whether the column is required or not.
oneOf:
- type: boolean
description: Defines whether the column is required or not.
- type: object
description: Defines whether the column is required or not.
properties:
allowEmpty:
type: boolean
description: Defines whether the value is allowed to be empty or not.
inclusion:
type: array
description: Defines the valid values for this column.
name:
type: string
description: The name of the column.
autocolumn:
type: boolean
description: Defines whether the column is automatically generated.
width:
type: number
description: Defines the width of the column in the data UI.
fieldName:
type: string
description: The name of the column which a relationship column is related to in
@ -812,20 +820,28 @@ components:
properties:
type:
type: string
enum:
- string
- number
- object
- boolean
presence:
type: boolean
description: Defines whether the column is required or not.
oneOf:
- type: boolean
description: Defines whether the column is required or not.
- type: object
description: Defines whether the column is required or not.
properties:
allowEmpty:
type: boolean
description: Defines whether the value is allowed to be empty or not.
inclusion:
type: array
description: Defines the valid values for this column.
name:
type: string
description: The name of the column.
autocolumn:
type: boolean
description: Defines whether the column is automatically generated.
width:
type: number
description: Defines the width of the column in the data UI.
formula:
type: string
description: Defines a Handlebars or JavaScript formula to use, note that
@ -851,8 +867,6 @@ components:
- datetime
- attachment
- attachment_single
- link
- formula
- auto
- ai
- json
@ -871,20 +885,28 @@ components:
properties:
type:
type: string
enum:
- string
- number
- object
- boolean
presence:
type: boolean
description: Defines whether the column is required or not.
oneOf:
- type: boolean
description: Defines whether the column is required or not.
- type: object
description: Defines whether the column is required or not.
properties:
allowEmpty:
type: boolean
description: Defines whether the value is allowed to be empty or not.
inclusion:
type: array
description: Defines the valid values for this column.
name:
type: string
description: The name of the column.
autocolumn:
type: boolean
description: Defines whether the column is automatically generated.
width:
type: number
description: Defines the width of the column in the data UI.
tableOutput:
type: object
properties:
@ -921,20 +943,28 @@ components:
properties:
type:
type: string
enum:
- string
- number
- object
- boolean
presence:
type: boolean
description: Defines whether the column is required or not.
oneOf:
- type: boolean
description: Defines whether the column is required or not.
- type: object
description: Defines whether the column is required or not.
properties:
allowEmpty:
type: boolean
description: Defines whether the value is allowed to be empty or not.
inclusion:
type: array
description: Defines the valid values for this column.
name:
type: string
description: The name of the column.
autocolumn:
type: boolean
description: Defines whether the column is automatically generated.
width:
type: number
description: Defines the width of the column in the data UI.
fieldName:
type: string
description: The name of the column which a relationship column is related to in
@ -981,20 +1011,28 @@ components:
properties:
type:
type: string
enum:
- string
- number
- object
- boolean
presence:
type: boolean
description: Defines whether the column is required or not.
oneOf:
- type: boolean
description: Defines whether the column is required or not.
- type: object
description: Defines whether the column is required or not.
properties:
allowEmpty:
type: boolean
description: Defines whether the value is allowed to be empty or not.
inclusion:
type: array
description: Defines the valid values for this column.
name:
type: string
description: The name of the column.
autocolumn:
type: boolean
description: Defines whether the column is automatically generated.
width:
type: number
description: Defines the width of the column in the data UI.
formula:
type: string
description: Defines a Handlebars or JavaScript formula to use, note that
@ -1020,8 +1058,6 @@ components:
- datetime
- attachment
- attachment_single
- link
- formula
- auto
- ai
- json
@ -1040,20 +1076,28 @@ components:
properties:
type:
type: string
enum:
- string
- number
- object
- boolean
presence:
type: boolean
description: Defines whether the column is required or not.
oneOf:
- type: boolean
description: Defines whether the column is required or not.
- type: object
description: Defines whether the column is required or not.
properties:
allowEmpty:
type: boolean
description: Defines whether the value is allowed to be empty or not.
inclusion:
type: array
description: Defines the valid values for this column.
name:
type: string
description: The name of the column.
autocolumn:
type: boolean
description: Defines whether the column is automatically generated.
width:
type: number
description: Defines the width of the column in the data UI.
_id:
description: The ID of the table.
type: string
@ -1097,20 +1141,28 @@ components:
properties:
type:
type: string
enum:
- string
- number
- object
- boolean
presence:
type: boolean
description: Defines whether the column is required or not.
oneOf:
- type: boolean
description: Defines whether the column is required or not.
- type: object
description: Defines whether the column is required or not.
properties:
allowEmpty:
type: boolean
description: Defines whether the value is allowed to be empty or not.
inclusion:
type: array
description: Defines the valid values for this column.
name:
type: string
description: The name of the column.
autocolumn:
type: boolean
description: Defines whether the column is automatically generated.
width:
type: number
description: Defines the width of the column in the data UI.
fieldName:
type: string
description: The name of the column which a relationship column is related to in
@ -1157,20 +1209,28 @@ components:
properties:
type:
type: string
enum:
- string
- number
- object
- boolean
presence:
type: boolean
description: Defines whether the column is required or not.
oneOf:
- type: boolean
description: Defines whether the column is required or not.
- type: object
description: Defines whether the column is required or not.
properties:
allowEmpty:
type: boolean
description: Defines whether the value is allowed to be empty or not.
inclusion:
type: array
description: Defines the valid values for this column.
name:
type: string
description: The name of the column.
autocolumn:
type: boolean
description: Defines whether the column is automatically generated.
width:
type: number
description: Defines the width of the column in the data UI.
formula:
type: string
description: Defines a Handlebars or JavaScript formula to use, note that
@ -1196,8 +1256,6 @@ components:
- datetime
- attachment
- attachment_single
- link
- formula
- auto
- ai
- json
@ -1216,20 +1274,28 @@ components:
properties:
type:
type: string
enum:
- string
- number
- object
- boolean
presence:
type: boolean
description: Defines whether the column is required or not.
oneOf:
- type: boolean
description: Defines whether the column is required or not.
- type: object
description: Defines whether the column is required or not.
properties:
allowEmpty:
type: boolean
description: Defines whether the value is allowed to be empty or not.
inclusion:
type: array
description: Defines the valid values for this column.
name:
type: string
description: The name of the column.
autocolumn:
type: boolean
description: Defines whether the column is automatically generated.
width:
type: number
description: Defines the width of the column in the data UI.
_id:
description: The ID of the table.
type: string

View File

@ -27,7 +27,9 @@ const table = {
const baseColumnDef = {
type: {
type: "string",
enum: Object.values(FieldType),
enum: Object.values(FieldType).filter(
type => ![FieldType.LINK, FieldType.FORMULA].includes(type)
),
description:
"Defines the type of the column, most explain themselves, a link column is a relationship.",
},
@ -38,11 +40,29 @@ const baseColumnDef = {
properties: {
type: {
type: "string",
enum: ["string", "number", "object", "boolean"],
},
presence: {
type: "boolean",
description: "Defines whether the column is required or not.",
oneOf: [
{
type: "boolean",
description: "Defines whether the column is required or not.",
},
{
type: "object",
description: "Defines whether the column is required or not.",
properties: {
allowEmpty: {
type: "boolean",
description:
"Defines whether the value is allowed to be empty or not.",
},
},
},
],
},
inclusion: {
type: "array",
description: "Defines the valid values for this column.",
},
},
},

View File

@ -226,15 +226,22 @@ export interface components {
type?: "link";
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints?: {
/** @enum {string} */
type?: "string" | "number" | "object" | "boolean";
/** @description Defines whether the column is required or not. */
presence?: boolean;
type?: string;
presence?:
| boolean
| {
/** @description Defines whether the value is allowed to be empty or not. */
allowEmpty?: boolean;
};
/** @description Defines the valid values for this column. */
inclusion?: unknown[];
};
/** @description The name of the column. */
name?: string;
/** @description Defines whether the column is automatically generated. */
autocolumn?: boolean;
/** @description Defines the width of the column in the data UI. */
width?: number;
/** @description The name of the column which a relationship column is related to in another table. */
fieldName?: string;
/** @description The ID of the table which a relationship column is related to. */
@ -261,15 +268,22 @@ export interface components {
type?: "formula";
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints?: {
/** @enum {string} */
type?: "string" | "number" | "object" | "boolean";
/** @description Defines whether the column is required or not. */
presence?: boolean;
type?: string;
presence?:
| boolean
| {
/** @description Defines whether the value is allowed to be empty or not. */
allowEmpty?: boolean;
};
/** @description Defines the valid values for this column. */
inclusion?: unknown[];
};
/** @description The name of the column. */
name?: string;
/** @description Defines whether the column is automatically generated. */
autocolumn?: boolean;
/** @description Defines the width of the column in the data UI. */
width?: number;
/** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
formula?: string;
/**
@ -280,7 +294,7 @@ export interface components {
}
| {
/**
* @description Defines the type of the column, most explain themselves, a link column is a relationship.
* @description Defines the type of the column
* @enum {string}
*/
type?:
@ -293,8 +307,6 @@ export interface components {
| "datetime"
| "attachment"
| "attachment_single"
| "link"
| "formula"
| "auto"
| "ai"
| "json"
@ -306,15 +318,22 @@ export interface components {
| "bb_reference_single";
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints?: {
/** @enum {string} */
type?: "string" | "number" | "object" | "boolean";
/** @description Defines whether the column is required or not. */
presence?: boolean;
type?: string;
presence?:
| boolean
| {
/** @description Defines whether the value is allowed to be empty or not. */
allowEmpty?: boolean;
};
/** @description Defines the valid values for this column. */
inclusion?: unknown[];
};
/** @description The name of the column. */
name?: string;
/** @description Defines whether the column is automatically generated. */
autocolumn?: boolean;
/** @description Defines the width of the column in the data UI. */
width?: number;
};
};
};
@ -335,15 +354,22 @@ export interface components {
type?: "link";
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints?: {
/** @enum {string} */
type?: "string" | "number" | "object" | "boolean";
/** @description Defines whether the column is required or not. */
presence?: boolean;
type?: string;
presence?:
| boolean
| {
/** @description Defines whether the value is allowed to be empty or not. */
allowEmpty?: boolean;
};
/** @description Defines the valid values for this column. */
inclusion?: unknown[];
};
/** @description The name of the column. */
name?: string;
/** @description Defines whether the column is automatically generated. */
autocolumn?: boolean;
/** @description Defines the width of the column in the data UI. */
width?: number;
/** @description The name of the column which a relationship column is related to in another table. */
fieldName?: string;
/** @description The ID of the table which a relationship column is related to. */
@ -373,15 +399,22 @@ export interface components {
type?: "formula";
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints?: {
/** @enum {string} */
type?: "string" | "number" | "object" | "boolean";
/** @description Defines whether the column is required or not. */
presence?: boolean;
type?: string;
presence?:
| boolean
| {
/** @description Defines whether the value is allowed to be empty or not. */
allowEmpty?: boolean;
};
/** @description Defines the valid values for this column. */
inclusion?: unknown[];
};
/** @description The name of the column. */
name?: string;
/** @description Defines whether the column is automatically generated. */
autocolumn?: boolean;
/** @description Defines the width of the column in the data UI. */
width?: number;
/** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
formula?: string;
/**
@ -392,7 +425,7 @@ export interface components {
}
| {
/**
* @description Defines the type of the column, most explain themselves, a link column is a relationship.
* @description Defines the type of the column
* @enum {string}
*/
type?:
@ -405,8 +438,6 @@ export interface components {
| "datetime"
| "attachment"
| "attachment_single"
| "link"
| "formula"
| "auto"
| "ai"
| "json"
@ -418,15 +449,22 @@ export interface components {
| "bb_reference_single";
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints?: {
/** @enum {string} */
type?: "string" | "number" | "object" | "boolean";
/** @description Defines whether the column is required or not. */
presence?: boolean;
type?: string;
presence?:
| boolean
| {
/** @description Defines whether the value is allowed to be empty or not. */
allowEmpty?: boolean;
};
/** @description Defines the valid values for this column. */
inclusion?: unknown[];
};
/** @description The name of the column. */
name?: string;
/** @description Defines whether the column is automatically generated. */
autocolumn?: boolean;
/** @description Defines the width of the column in the data UI. */
width?: number;
};
};
/** @description The ID of the table. */
@ -449,15 +487,22 @@ export interface components {
type?: "link";
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints?: {
/** @enum {string} */
type?: "string" | "number" | "object" | "boolean";
/** @description Defines whether the column is required or not. */
presence?: boolean;
type?: string;
presence?:
| boolean
| {
/** @description Defines whether the value is allowed to be empty or not. */
allowEmpty?: boolean;
};
/** @description Defines the valid values for this column. */
inclusion?: unknown[];
};
/** @description The name of the column. */
name?: string;
/** @description Defines whether the column is automatically generated. */
autocolumn?: boolean;
/** @description Defines the width of the column in the data UI. */
width?: number;
/** @description The name of the column which a relationship column is related to in another table. */
fieldName?: string;
/** @description The ID of the table which a relationship column is related to. */
@ -487,15 +532,22 @@ export interface components {
type?: "formula";
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints?: {
/** @enum {string} */
type?: "string" | "number" | "object" | "boolean";
/** @description Defines whether the column is required or not. */
presence?: boolean;
type?: string;
presence?:
| boolean
| {
/** @description Defines whether the value is allowed to be empty or not. */
allowEmpty?: boolean;
};
/** @description Defines the valid values for this column. */
inclusion?: unknown[];
};
/** @description The name of the column. */
name?: string;
/** @description Defines whether the column is automatically generated. */
autocolumn?: boolean;
/** @description Defines the width of the column in the data UI. */
width?: number;
/** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
formula?: string;
/**
@ -506,7 +558,7 @@ export interface components {
}
| {
/**
* @description Defines the type of the column, most explain themselves, a link column is a relationship.
* @description Defines the type of the column
* @enum {string}
*/
type?:
@ -519,8 +571,6 @@ export interface components {
| "datetime"
| "attachment"
| "attachment_single"
| "link"
| "formula"
| "auto"
| "ai"
| "json"
@ -532,15 +582,22 @@ export interface components {
| "bb_reference_single";
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints?: {
/** @enum {string} */
type?: "string" | "number" | "object" | "boolean";
/** @description Defines whether the column is required or not. */
presence?: boolean;
type?: string;
presence?:
| boolean
| {
/** @description Defines whether the value is allowed to be empty or not. */
allowEmpty?: boolean;
};
/** @description Defines the valid values for this column. */
inclusion?: unknown[];
};
/** @description The name of the column. */
name?: string;
/** @description Defines whether the column is automatically generated. */
autocolumn?: boolean;
/** @description Defines the width of the column in the data UI. */
width?: number;
};
};
/** @description The ID of the table. */