UNPKG

@convo-lang/convo-lang

Version:
26 lines 1.45 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConvoFormSubmissionResponseScheme = exports.ConvoFormItemResponseScheme = exports.ConvoFormScheme = exports.ConvoFormItemScheme = exports.ConvoFormItemTypeScheme = void 0; const zod_1 = require("zod"); exports.ConvoFormItemTypeScheme = zod_1.z.enum(['question', 'multi-choice-question']); exports.ConvoFormItemScheme = zod_1.z.object({ id: zod_1.z.string().describe('Unique id of the item'), type: exports.ConvoFormItemTypeScheme, question: zod_1.z.string().optional().describe('The question to ask the user if the item is a question'), }); exports.ConvoFormScheme = zod_1.z.object({ id: zod_1.z.string().describe('Unique id of the forms'), name: zod_1.z.string().describe('Name of the form'), disabled: zod_1.z.boolean().optional(), description: zod_1.z.string(), items: exports.ConvoFormItemScheme.array().describe('The items in the form such as inputs and content') }); exports.ConvoFormItemResponseScheme = zod_1.z.object({ itemId: zod_1.z.string().describe('Id of the item the response is responding to'), textResponse: zod_1.z.string().optional().describe('Text response'), }); exports.ConvoFormSubmissionResponseScheme = zod_1.z.object({ formId: zod_1.z.string().describe('Id of the form being submitted'), responses: exports.ConvoFormItemResponseScheme.array(), }); //# sourceMappingURL=convo-forms-types.js.map