2
0

♻️ Introduce typebot v6 with events (#1013)

Closes #885
This commit is contained in:
Baptiste Arnaud
2023-11-08 15:34:16 +01:00
committed by GitHub
parent 68e4fc71fb
commit 35300eaf34
634 changed files with 58971 additions and 31449 deletions

View File

@ -1,8 +1,12 @@
import { z } from 'zod'
import { answerInputSchema, answerSchema } from './answer'
import { InputBlockType } from './blocks'
import { variableWithValueSchema } from './typebot/variable'
import { Result as ResultPrisma, Log as LogPrisma } from '@typebot.io/prisma'
import {
Result as ResultPrisma,
Log as LogPrisma,
VisitedEdge,
} from '@typebot.io/prisma'
import { InputBlockType } from './blocks/inputs/constants'
export const resultSchema = z.object({
id: z.string(),
@ -20,6 +24,12 @@ export const resultWithAnswersSchema = resultSchema.merge(
})
)
export const visitedEdgeSchema = z.object({
edgeId: z.string(),
resultId: z.string(),
index: z.number(),
}) satisfies z.ZodType<VisitedEdge>
export const resultWithAnswersInputSchema = resultSchema.merge(
z.object({
answers: z.array(answerInputSchema),