early-cartoon-84199
07/23/2025, 1:57 PM/**
* ProductsTable schema definition for Botpress Table.
* Exported both as a JSON schema constant that can be passed to
* bp.tables.createTable() and as a TypeScript type for row objects.
*/
export const productsTableSchema = {
type: "object",
required: [
"title",
"brand",
"description",
"product_id",
"image",
"url",
"price",
"availability",
"stock_status",
"quantity",
"epifania",
"iliko",
"color",
"varos",
"important",
"apoxrosi",
"specs"
],
properties: {
title: { type: "string", "x-zui": { index: 0, searchable: true } },
brand: { type: "string", "x-zui": { index: 1, searchable: true } },
description: { type: "string", "x-zui": { index: 2, searchable: true } },
product_id: { type: "string", "x-zui": { index: 3 } },
image: { type: "string", "x-zui": { index: 4 } },
url: { type: "string", "x-zui": { index: 5 } },
price: { type: "number", "x-zui": { index: 6 } },
availability: { type: "string", "x-zui": { index: 7 } },
stock_status: { type: "string", "x-zui": { index: 9 } },
quantity: { type: "number", "x-zui": { index: 10 } },
epifania: { type: "string", "x-zui": { index: 11 } },
iliko: { type: "string", "x-zui": { index: 12 } },
color: { type: "string", "x-zui": { index: 13 } },
varos: { type: "string", "x-zui": { index: 14 } },
important: { type: "string", "x-zui": { index: 15 } },
apoxrosi: { type: "string", "x-zui": { index: 16 } },
specs: {
type: "array",
items: { type: "string" },
"x-zui": { index: 17, searchable: true }
}
},
additionalProperties: true
} as const;early-cartoon-84199
07/23/2025, 1:57 PM// Derived TypeScript row type
export type ProductsTableRow = {
title: string;
brand: string;
description: string;
product_id: string;
image: string;
url: string;
price: number;
availability: string;
custom_stock_status: string;
stock_status: string;
quantity: number;
epifania: string;
iliko: string;
color: string;
varos: string;
important: string;
apoxrosi: string;
specs: string[];
};
// Example: registering the table inside a Botpress module/action
/*
import { bp } from '@botpress/sdk';
await bp.tables.createTable('ProductsTable', productsTableSchema);
*/prehistoric-airplane-85682
07/23/2025, 2:13 PMearly-cartoon-84199
07/23/2025, 3:46 PM