2
0
Files
bot/packages/schemas/features/credentials.ts
Ed Zynda 75e4b16af0 Add Zemantic AI Integration block (#752)
Co-authored-by: Baptiste Arnaud <contact@baptiste-arnaud.fr>
2023-09-08 16:21:50 +02:00

19 lines
743 B
TypeScript

import { z } from 'zod'
import { stripeCredentialsSchema } from './blocks/inputs/payment/schemas'
import { googleSheetsCredentialsSchema } from './blocks/integrations/googleSheets/schemas'
import { openAICredentialsSchema } from './blocks/integrations/openai'
import { smtpCredentialsSchema } from './blocks/integrations/sendEmail'
import { whatsAppCredentialsSchema } from './whatsapp'
import { zemanticAiCredentialsSchema } from './blocks'
export const credentialsSchema = z.discriminatedUnion('type', [
smtpCredentialsSchema,
googleSheetsCredentialsSchema,
stripeCredentialsSchema,
openAICredentialsSchema,
whatsAppCredentialsSchema,
zemanticAiCredentialsSchema,
])
export type Credentials = z.infer<typeof credentialsSchema>