"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fieldsValidationSchema = exports.fields = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const zod_1 = require("zod");
exports.fields = {
    questionnaireId: {
        id: 'questionnaireId',
        label: 'QuestionnaireId',
        description: 'Reference to the Canvas Questionnaire using the questionnaire id',
        type: extensions_core_1.FieldType.STRING,
        required: true,
    },
    subjectId: {
        id: 'subjectId',
        label: 'SubjectId',
        description: 'Reference to the Canvas Patient using the patient id',
        type: extensions_core_1.FieldType.STRING,
        required: true,
    },
    authored: {
        id: 'authored',
        label: 'Authored',
        description: 'Timestamp the Questionnaire response was filled out (If omitted the current timestamp at data ingestion will be used)',
        type: extensions_core_1.FieldType.STRING,
        required: false,
    },
    authorId: {
        id: 'authorId',
        label: 'AuthorId',
        description: 'Reference to the patient or practitioner filling out the questionnaire. If omitted it will default to Canvas Bot',
        type: extensions_core_1.FieldType.STRING,
        required: false,
    },
    item: {
        id: 'item',
        label: 'Item',
        description: 'List of answers to questions in the questionnaire',
        type: extensions_core_1.FieldType.JSON,
        required: true,
    },
};
exports.fieldsValidationSchema = zod_1.z.object({
    questionnaireId: zod_1.z.string().nonempty({
        message: 'Missing "Questionnaire ID"',
    }),
    subjectId: zod_1.z.string().nonempty({
        message: 'Missing "Subject ID"',
    }),
    authored: zod_1.z.string().nonempty({
        message: 'Missing "authored"',
    }),
    authorId: zod_1.z.string().nonempty({
        message: 'Missing "Author ID"',
    }),
    item: zod_1.z.string().nonempty({
        message: 'Missing "Item"',
    }),
});
//# sourceMappingURL=fields.js.map