✨ (credentials) Add credentials management menu in workspace settings
Closes #1567
This commit is contained in:
@@ -3,16 +3,26 @@ import { stripeCredentialsSchema } from './blocks/inputs/payment/schema'
|
||||
import { googleSheetsCredentialsSchema } from './blocks/integrations/googleSheets/schema'
|
||||
import { smtpCredentialsSchema } from './blocks/integrations/sendEmail'
|
||||
import { whatsAppCredentialsSchema } from './whatsapp'
|
||||
import { zemanticAiCredentialsSchema } from './blocks'
|
||||
import { openAICredentialsSchema } from './blocks/integrations/openai'
|
||||
import { forgedCredentialsSchemas } from '@typebot.io/forge-repository/credentials'
|
||||
|
||||
export const credentialsSchema = z.discriminatedUnion('type', [
|
||||
const credentialsSchema = z.discriminatedUnion('type', [
|
||||
smtpCredentialsSchema,
|
||||
googleSheetsCredentialsSchema,
|
||||
stripeCredentialsSchema,
|
||||
openAICredentialsSchema,
|
||||
whatsAppCredentialsSchema,
|
||||
zemanticAiCredentialsSchema,
|
||||
...Object.values(forgedCredentialsSchemas),
|
||||
])
|
||||
|
||||
export type Credentials = z.infer<typeof credentialsSchema>
|
||||
|
||||
export const credentialsTypes = [
|
||||
'smtp',
|
||||
'google sheets',
|
||||
'stripe',
|
||||
'whatsApp',
|
||||
...(Object.keys(forgedCredentialsSchemas) as Array<
|
||||
keyof typeof forgedCredentialsSchemas
|
||||
>),
|
||||
] as const
|
||||
|
||||
export const credentialsTypeSchema = z.enum(credentialsTypes)
|
||||
|
||||
Reference in New Issue
Block a user