2023-01-25 11:27:47 +01:00
|
|
|
import { z } from 'zod'
|
2023-03-15 08:35:16 +01:00
|
|
|
import { Credentials as CredentialsFromPrisma } from '@typebot.io/prisma'
|
2023-01-25 11:27:47 +01:00
|
|
|
|
|
|
|
export const blockBaseSchema = z.object({
|
|
|
|
id: z.string(),
|
|
|
|
outgoingEdgeId: z.string().optional(),
|
|
|
|
})
|
|
|
|
|
|
|
|
export const optionBaseSchema = z.object({
|
|
|
|
variableId: z.string().optional(),
|
|
|
|
})
|
2023-03-09 08:46:36 +01:00
|
|
|
|
|
|
|
export const credentialsBaseSchema = z.object({
|
|
|
|
id: z.string(),
|
|
|
|
createdAt: z.date(),
|
|
|
|
workspaceId: z.string(),
|
|
|
|
name: z.string(),
|
|
|
|
iv: z.string(),
|
|
|
|
}) satisfies z.ZodType<Omit<CredentialsFromPrisma, 'data' | 'type'>>
|