UNPKG

@convo-lang/convo-lang

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