2
0

Remove ZemanticAI block

Closes #1656, closes #1652
This commit is contained in:
Baptiste Arnaud
2024-07-22 17:24:02 +02:00
parent 71d09cdf7c
commit ec2a53fac1
50 changed files with 5 additions and 1821 deletions

View File

@@ -1,5 +1,4 @@
import { z } from '../zod'
import { zemanticAiCredentialsSchema } from './blocks'
import { stripeCredentialsSchema } from './blocks/inputs/payment/schema'
import { googleSheetsCredentialsSchema } from './blocks/integrations/googleSheets/schema'
import { smtpCredentialsSchema } from './blocks/integrations/sendEmail'
@@ -11,30 +10,19 @@ const credentialsSchema = z.discriminatedUnion('type', [
googleSheetsCredentialsSchema,
stripeCredentialsSchema,
whatsAppCredentialsSchema,
zemanticAiCredentialsSchema,
...Object.values(forgedCredentialsSchemas),
])
export type Credentials = z.infer<typeof credentialsSchema>
export type CredentialsWithoutLegacy = Exclude<
Credentials,
{
type: 'zemanticAi'
}
>
export const credentialsTypes = [
'smtp',
'google sheets',
'stripe',
'whatsApp',
'zemanticAi',
...(Object.keys(forgedCredentialsSchemas) as Array<
keyof typeof forgedCredentialsSchemas
>),
] as const
export const credentialsTypeSchema = z.enum(credentialsTypes)
export const legacyCredentialsTypes = ['zemanticAi']