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

@ -1,5 +1,6 @@
// Do not edit this file manually
export const enabledBlocks = [
import { ForgedBlock } from './types'
export const forgedBlockIds = [
'openai',
'zemantic-ai',
'cal-com',
@ -11,4 +12,4 @@ export const enabledBlocks = [
'anthropic',
'together-ai',
'open-router',
] as const
] as const satisfies ForgedBlock['type'][]

View File

@ -0,0 +1,36 @@
import { anthropicBlock } from '@typebot.io/anthropic-block'
import { anthropicCredentialsSchema } from '@typebot.io/anthropic-block/schemas'
import { calComBlock } from '@typebot.io/cal-com-block'
import { calComCredentialsSchema } from '@typebot.io/cal-com-block/schemas'
import { chatNodeBlock } from '@typebot.io/chat-node-block'
import { chatNodeCredentialsSchema } from '@typebot.io/chat-node-block/schemas'
import { difyAiBlock } from '@typebot.io/dify-ai-block'
import { difyAiCredentialsSchema } from '@typebot.io/dify-ai-block/schemas'
import { elevenlabsBlock } from '@typebot.io/elevenlabs-block'
import { elevenlabsCredentialsSchema } from '@typebot.io/elevenlabs-block/schemas'
import { mistralBlock } from '@typebot.io/mistral-block'
import { mistralCredentialsSchema } from '@typebot.io/mistral-block/schemas'
import { openRouterBlock } from '@typebot.io/open-router-block'
import { openRouterCredentialsSchema } from '@typebot.io/open-router-block/schemas'
import { openAIBlock } from '@typebot.io/openai-block'
import { openAICredentialsSchema } from '@typebot.io/openai-block/schemas'
import { qrCodeBlock } from '@typebot.io/qrcode-block'
import { qrCodeCredentialsSchema } from '@typebot.io/qrcode-block/schemas'
import { togetherAiBlock } from '@typebot.io/together-ai-block'
import { togetherAiCredentialsSchema } from '@typebot.io/together-ai-block/schemas'
import { zemanticAiBlock } from '@typebot.io/zemantic-ai-block'
import { zemanticAiCredentialsSchema } from '@typebot.io/zemantic-ai-block/schemas'
export const forgedCredentialsSchemas = {
[openAIBlock.id]: openAICredentialsSchema,
[zemanticAiBlock.id]: zemanticAiCredentialsSchema,
[calComBlock.id]: calComCredentialsSchema,
[chatNodeBlock.id]: chatNodeCredentialsSchema,
[qrCodeBlock.id]: qrCodeCredentialsSchema,
[difyAiBlock.id]: difyAiCredentialsSchema,
[mistralBlock.id]: mistralCredentialsSchema,
[elevenlabsBlock.id]: elevenlabsCredentialsSchema,
[anthropicBlock.id]: anthropicCredentialsSchema,
[togetherAiBlock.id]: togetherAiCredentialsSchema,
[openRouterBlock.id]: openRouterCredentialsSchema,
}

View File

@ -0,0 +1,26 @@
// Do not edit this file manually
import { anthropicBlock } from '@typebot.io/anthropic-block'
import { openRouterBlock } from '@typebot.io/open-router-block'
import { togetherAiBlock } from '@typebot.io/together-ai-block'
import { elevenlabsBlock } from '@typebot.io/elevenlabs-block'
import { difyAiBlock } from '@typebot.io/dify-ai-block'
import { mistralBlock } from '@typebot.io/mistral-block'
import { qrCodeBlock } from '@typebot.io/qrcode-block'
import { chatNodeBlock } from '@typebot.io/chat-node-block'
import { calComBlock } from '@typebot.io/cal-com-block'
import { zemanticAiBlock } from '@typebot.io/zemantic-ai-block'
import { openAIBlock } from '@typebot.io/openai-block'
export const forgedBlocks = {
[openAIBlock.id]: openAIBlock,
[zemanticAiBlock.id]: zemanticAiBlock,
[calComBlock.id]: calComBlock,
[chatNodeBlock.id]: chatNodeBlock,
[qrCodeBlock.id]: qrCodeBlock,
[difyAiBlock.id]: difyAiBlock,
[mistralBlock.id]: mistralBlock,
[elevenlabsBlock.id]: elevenlabsBlock,
[anthropicBlock.id]: anthropicBlock,
[togetherAiBlock.id]: togetherAiBlock,
[openRouterBlock.id]: openRouterBlock,
} as const

View File

@ -2,8 +2,21 @@
"name": "@typebot.io/forge-repository",
"version": "1.0.0",
"description": "",
"main": "index.ts",
"keywords": [],
"author": "Baptiste Arnaud",
"license": "ISC"
"license": "ISC",
"devDependencies": {
"@typebot.io/forge": "workspace:*",
"@typebot.io/openai-block": "workspace:*",
"@typebot.io/zemantic-ai-block": "workspace:*",
"@typebot.io/cal-com-block": "workspace:*",
"@typebot.io/chat-node-block": "workspace:*",
"@typebot.io/qrcode-block": "workspace:*",
"@typebot.io/dify-ai-block": "workspace:*",
"@typebot.io/mistral-block": "workspace:*",
"@typebot.io/elevenlabs-block": "workspace:*",
"@typebot.io/anthropic-block": "workspace:*",
"@typebot.io/together-ai-block": "workspace:*",
"@typebot.io/open-router-block": "workspace:*"
}
}

View File

@ -0,0 +1,36 @@
import { anthropicBlock } from '@typebot.io/anthropic-block'
import { anthropicBlockSchema } from '@typebot.io/anthropic-block/schemas'
import { calComBlock } from '@typebot.io/cal-com-block'
import { calComBlockSchema } from '@typebot.io/cal-com-block/schemas'
import { chatNodeBlock } from '@typebot.io/chat-node-block'
import { chatNodeBlockSchema } from '@typebot.io/chat-node-block/schemas'
import { difyAiBlock } from '@typebot.io/dify-ai-block'
import { difyAiBlockSchema } from '@typebot.io/dify-ai-block/schemas'
import { elevenlabsBlock } from '@typebot.io/elevenlabs-block'
import { elevenlabsBlockSchema } from '@typebot.io/elevenlabs-block/schemas'
import { mistralBlock } from '@typebot.io/mistral-block'
import { mistralBlockSchema } from '@typebot.io/mistral-block/schemas'
import { openRouterBlock } from '@typebot.io/open-router-block'
import { openRouterBlockSchema } from '@typebot.io/open-router-block/schemas'
import { openAIBlock } from '@typebot.io/openai-block'
import { openAIBlockSchema } from '@typebot.io/openai-block/schemas'
import { qrCodeBlock } from '@typebot.io/qrcode-block'
import { qrCodeBlockSchema } from '@typebot.io/qrcode-block/schemas'
import { togetherAiBlock } from '@typebot.io/together-ai-block'
import { togetherAiBlockSchema } from '@typebot.io/together-ai-block/schemas'
import { zemanticAiBlock } from '@typebot.io/zemantic-ai-block'
import { zemanticAiBlockSchema } from '@typebot.io/zemantic-ai-block/schemas'
export const forgedBlockSchemas = {
[openAIBlock.id]: openAIBlockSchema,
[zemanticAiBlock.id]: zemanticAiBlockSchema,
[calComBlock.id]: calComBlockSchema,
[chatNodeBlock.id]: chatNodeBlockSchema,
[qrCodeBlock.id]: qrCodeBlockSchema,
[difyAiBlock.id]: difyAiBlockSchema,
[mistralBlock.id]: mistralBlockSchema,
[elevenlabsBlock.id]: elevenlabsBlockSchema,
[anthropicBlock.id]: anthropicBlockSchema,
[togetherAiBlock.id]: togetherAiBlockSchema,
[openRouterBlock.id]: openRouterBlockSchema,
}

View File

@ -0,0 +1,10 @@
import { z } from '@typebot.io/forge/zod'
import { forgedBlocks } from './definitions'
import { forgedBlockSchemas } from './schemas'
export type ForgedBlock = z.infer<
(typeof forgedBlockSchemas)[keyof typeof forgedBlockSchemas]
>
export type ForgedBlockDefinition =
(typeof forgedBlocks)[keyof typeof forgedBlocks]