2023-12-22 09:13:53 +01:00
|
|
|
import { z } from '../zod'
|
2023-11-08 15:34:16 +01:00
|
|
|
import { stripeCredentialsSchema } from './blocks/inputs/payment/schema'
|
|
|
|
import { googleSheetsCredentialsSchema } from './blocks/integrations/googleSheets/schema'
|
2023-03-09 08:46:36 +01:00
|
|
|
import { smtpCredentialsSchema } from './blocks/integrations/sendEmail'
|
2023-08-29 10:01:28 +02:00
|
|
|
import { whatsAppCredentialsSchema } from './whatsapp'
|
2023-09-08 17:21:50 +03:00
|
|
|
import { zemanticAiCredentialsSchema } from './blocks'
|
2023-12-13 10:22:02 +01:00
|
|
|
import { openAICredentialsSchema } from './blocks/integrations/openai'
|
2023-03-09 08:46:36 +01:00
|
|
|
|
|
|
|
export const credentialsSchema = z.discriminatedUnion('type', [
|
|
|
|
smtpCredentialsSchema,
|
|
|
|
googleSheetsCredentialsSchema,
|
|
|
|
stripeCredentialsSchema,
|
|
|
|
openAICredentialsSchema,
|
2023-08-29 10:01:28 +02:00
|
|
|
whatsAppCredentialsSchema,
|
2023-09-08 17:21:50 +03:00
|
|
|
zemanticAiCredentialsSchema,
|
2023-03-09 08:46:36 +01:00
|
|
|
])
|
|
|
|
|
|
|
|
export type Credentials = z.infer<typeof credentialsSchema>
|