2022-02-19 07:06:58 +13:00
|
|
|
const { FieldTypes } = require("../src/constants")
|
|
|
|
|
2022-02-19 06:44:08 +13:00
|
|
|
exports.row = {
|
|
|
|
description: "The row to be created/updated, based on the table schema.",
|
|
|
|
type: "object",
|
|
|
|
additionalProperties: {
|
|
|
|
oneOf: [
|
|
|
|
{ type: "string" },
|
|
|
|
{ type: "object" },
|
|
|
|
{ type: "integer" },
|
|
|
|
{ type: "array" },
|
|
|
|
{ type: "boolean" },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}
|
2022-02-19 07:06:58 +13:00
|
|
|
|
|
|
|
exports.table = {
|
|
|
|
description: "The table to be created/updated.",
|
|
|
|
type: "object",
|
|
|
|
properties: {
|
|
|
|
name: {
|
|
|
|
description: "The name of the table",
|
|
|
|
type: "string",
|
|
|
|
},
|
|
|
|
schema: {
|
|
|
|
type: "object",
|
|
|
|
additionalProperties: {
|
|
|
|
type: "object",
|
|
|
|
properties: {
|
|
|
|
type: {
|
|
|
|
type: "string",
|
|
|
|
enum: Object.values(FieldTypes),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|