✨ Introducing The Forge (#1072)
The Forge allows anyone to easily create their own Typebot Block. Closes #380
This commit is contained in:
@ -13,12 +13,13 @@
|
||||
"@typebot.io/schemas": "workspace:*",
|
||||
"@typebot.io/tsconfig": "workspace:*",
|
||||
"@types/nodemailer": "6.4.8",
|
||||
"next": "13.5.4",
|
||||
"next": "14.0.3",
|
||||
"nodemailer": "6.9.3",
|
||||
"typescript": "5.3.2"
|
||||
"typescript": "5.3.2",
|
||||
"@typebot.io/forge-repository": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"next": "13.0.0",
|
||||
"next": "14.0.0",
|
||||
"nodemailer": "6.7.8"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -28,6 +29,7 @@
|
||||
"got": "12.6.0",
|
||||
"minio": "7.1.3",
|
||||
"remark-slate": "1.8.6",
|
||||
"stripe": "12.13.0"
|
||||
"stripe": "12.13.0",
|
||||
"zod": "3.22.4"
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import { PictureChoiceBlock } from '@typebot.io/schemas/features/blocks/inputs/p
|
||||
import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants'
|
||||
import { LogicBlockType } from '@typebot.io/schemas/features/blocks/logic/constants'
|
||||
import { defaultChoiceInputOptions } from '@typebot.io/schemas/features/blocks/inputs/choice/constants'
|
||||
import { enabledBlocks } from '@typebot.io/forge-repository'
|
||||
|
||||
export const sendRequest = async <ResponseData>(
|
||||
params:
|
||||
@ -110,7 +111,11 @@ export const isConditionBlock = (block: Block): block is ConditionBlock =>
|
||||
block.type === LogicBlockType.CONDITION
|
||||
|
||||
export const isIntegrationBlock = (block: Block): block is IntegrationBlock =>
|
||||
(Object.values(IntegrationBlockType) as string[]).includes(block.type)
|
||||
(
|
||||
Object.values(IntegrationBlockType).concat(
|
||||
enabledBlocks as readonly any[]
|
||||
) as any[]
|
||||
).includes(block.type)
|
||||
|
||||
export const isWebhookBlock = (block: Block): block is WebhookBlock =>
|
||||
[
|
||||
@ -252,3 +257,5 @@ export const getAtPath = <T>(obj: T, path: string): unknown => {
|
||||
|
||||
export const isSvgSrc = (src: string | undefined) =>
|
||||
src?.startsWith('data:image/svg') || src?.endsWith('.svg')
|
||||
|
||||
export { createId } from '@paralleldrive/cuid2'
|
||||
|
Reference in New Issue
Block a user