@@ -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),
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typebot.io/tsconfig": "workspace:*",
|
||||
"@types/react": "18.2.15",
|
||||
"@typebot.io/forge-repository": "workspace:*"
|
||||
"@types/react": "18.2.15"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user