2
0
Files
bot/packages/schemas/features/blocks/logic/jump/schema.ts
Baptiste Arnaud 35300eaf34 ♻️ Introduce typebot v6 with events (#1013)
Closes #885
2023-11-08 15:34:16 +01:00

18 lines
449 B
TypeScript

import { z } from 'zod'
import { blockBaseSchema } from '../../shared'
import { LogicBlockType } from '../constants'
export const jumpOptionsSchema = z.object({
groupId: z.string().optional(),
blockId: z.string().optional(),
})
export const jumpBlockSchema = blockBaseSchema.merge(
z.object({
type: z.enum([LogicBlockType.JUMP]),
options: jumpOptionsSchema.optional(),
})
)
export type JumpBlock = z.infer<typeof jumpBlockSchema>