1
packages/schemas/features/blocks/logic/jump/index.ts
Normal file
1
packages/schemas/features/blocks/logic/jump/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './schema'
|
17
packages/schemas/features/blocks/logic/jump/schema.ts
Normal file
17
packages/schemas/features/blocks/logic/jump/schema.ts
Normal file
@ -0,0 +1,17 @@
|
||||
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>
|
Reference in New Issue
Block a user