2
0

♻️ Include forged blocks schema in typebot schema

Closes #1364
This commit is contained in:
Baptiste Arnaud
2024-03-18 16:09:19 +01:00
parent 26a9282c20
commit ed5096e2b6
93 changed files with 8599 additions and 4965 deletions

View File

@@ -89,7 +89,7 @@ export const parseBlockCredentials = <
>(
blockDefinition: BlockDefinition<I, A, O>
) => {
if (!blockDefinition.auth) throw new Error('Block has no auth definition')
if (!blockDefinition.auth) return null
return z.object({
id: z.string(),
type: z.literal(blockDefinition.id),

View File

@@ -11,7 +11,6 @@
},
"devDependencies": {
"@typebot.io/tsconfig": "workspace:*",
"@types/react": "18.2.15",
"@typebot.io/forge-repository": "workspace:*"
"@types/react": "18.2.15"
}
}

View File

@@ -1,7 +1,6 @@
import { SVGProps } from 'react'
import { z } from './zod'
import { ZodRawShape } from 'zod'
import { enabledBlocks } from '@typebot.io/forge-repository'
export type VariableStore = {
get: (variableId: string) => string | (string | null)[] | null | undefined
@@ -34,7 +33,7 @@ export type FunctionToExecute = {
export type ReadOnlyVariableStore = Omit<VariableStore, 'set'>
export type TurnableIntoParam<T = {}> = {
blockType: (typeof enabledBlocks)[number]
blockId: string
/**
* If defined will be used to convert the existing block options into the new block options.
*/