2
0

🐛 (credentials) Fix credentials not listing when workspace has legacy zemantic

This commit is contained in:
Baptiste Arnaud
2024-07-16 16:36:14 +02:00
parent 867041e7d8
commit bd6921b90c
6 changed files with 24 additions and 5 deletions

View File

@ -62,6 +62,8 @@ const CredentialsCreateModalContent = ({
onClose={onClose}
/>
)
case 'zemanticAi':
return null
default:
return (
<CreateForgedCredentialsModalContent

View File

@ -211,6 +211,8 @@ const CredentialsIcon = ({
return <StripeLogo rounded="sm" {...props} />
case 'whatsApp':
return <WhatsAppLogo {...props} />
case 'zemanticAi':
return null
default:
return <BlockIcon type={type} {...props} />
}
@ -245,6 +247,8 @@ const CredentialsLabel = ({
WhatsApp
</Text>
)
case 'zemanticAi':
return null
default:
return <BlockLabel type={type} {...props} />
}

View File

@ -57,6 +57,7 @@ const CredentialsUpdateModalContent = ({
onUpdate={onSubmit}
/>
)
case 'zemanticAi':
case 'whatsApp':
return null
default:

View File

@ -16,7 +16,7 @@ import {
import React, { useState } from 'react'
import { ZodObjectLayout } from '../zodLayouts/ZodObjectLayout'
import { ForgedBlockDefinition } from '@typebot.io/forge-repository/types'
import { Credentials } from '@typebot.io/schemas'
import { CredentialsWithoutLegacy } from '@typebot.io/schemas'
type Props = {
blockDef: ForgedBlockDefinition
@ -87,11 +87,11 @@ export const CreateForgedCredentialsModalContent = ({
if (!workspace || !blockDef.auth) return
mutate({
credentials: {
type: blockDef.id as Credentials['type'],
type: blockDef.id,
workspaceId: workspace.id,
name,
data,
} as Credentials,
} as CredentialsWithoutLegacy,
})
}

View File

@ -14,7 +14,7 @@ import {
import React, { useEffect, useState } from 'react'
import { ZodObjectLayout } from '../zodLayouts/ZodObjectLayout'
import { ForgedBlockDefinition } from '@typebot.io/forge-repository/types'
import { Credentials } from '@typebot.io/schemas'
import { CredentialsWithoutLegacy } from '@typebot.io/schemas'
type Props = {
credentialsId: string
@ -76,7 +76,7 @@ export const UpdateForgedCredentialsModalContent = ({
workspaceId: workspace.id,
name,
data,
} as Credentials,
} as CredentialsWithoutLegacy,
})
}