"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldsValidationSchema = exports.fields = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const zod_1 = __importDefault(require("zod"));
exports.fields = {
    messageDataPoint: {
        id: 'messageDataPoint',
        label: 'Message Data Point',
        description: 'The message to be categorized. Use this if you want to use a data point for the message.',
        type: extensions_core_1.FieldType.STRING, // Should be string, to allow selecting a data point
        required: false,
    },
    message: {
        id: 'message',
        label: 'Message',
        description: 'The message to be categorized. Use this if you want to use a text for the message.',
        type: extensions_core_1.FieldType.TEXT, // TEXT if data point is not in use
        required: false,
    },
    categories: {
        id: 'categories',
        label: 'Categories',
        description: 'List of categories (comma-separated, no spaces)',
        type: extensions_core_1.FieldType.STRING,
        required: true,
    },
    instructions: {
        id: 'instructions',
        label: 'Instructions',
        description: 'Add additional instructions prompt for the LLM',
        type: extensions_core_1.FieldType.TEXT,
        required: false,
    },
};
exports.FieldsValidationSchema = zod_1.default.object({
    message: zod_1.default.string().optional(),
    messageDataPoint: zod_1.default.string().optional(),
    categories: zod_1.default
        .string()
        .trim()
        .min(1, 'At least one category is required')
        .transform((s) => s.split(',').map((item) => item.trim()))
        .refine((arr) => arr.length > 0, {
        message: 'At least one category is required',
    }),
    instructions: zod_1.default.string().optional(),
});
//# sourceMappingURL=fields.js.map