2
0

📝 Migrate from Docusaurus to Mintlify (#1115)

Closes #868
This commit is contained in:
Baptiste Arnaud
2023-12-22 09:13:53 +01:00
committed by GitHub
parent 512bb09282
commit 1e5fa5a575
450 changed files with 49522 additions and 104787 deletions

View File

@@ -92,6 +92,7 @@ export const executeChatwootBlock = (
outgoingEdgeId: block.outgoingEdgeId,
clientSideActions: [
{
type: 'chatwoot',
chatwoot: {
scriptToExecute: {
content: parseVariables(typebot.variables, { fieldToParse: 'id' })(

View File

@@ -17,6 +17,7 @@ export const executeGoogleAnalyticsBlock = (
outgoingEdgeId: block.outgoingEdgeId,
clientSideActions: [
{
type: 'googleAnalytics',
googleAnalytics,
},
],

View File

@@ -96,6 +96,7 @@ export const createChatCompletionOpenAI = async (
return {
clientSideActions: [
{
type: 'streamOpenAiChatCompletion',
streamOpenAiChatCompletion: {
messages: messages as {
content?: string

View File

@@ -22,6 +22,7 @@ export const executePixelBlock = (
outgoingEdgeId: block.outgoingEdgeId,
clientSideActions: [
{
type: 'pixel',
pixel: {
...pixel,
pixelId: block.options.pixelId,

View File

@@ -70,6 +70,7 @@ export const executeWebhookBlock = async (
outgoingEdgeId: block.outgoingEdgeId,
clientSideActions: [
{
type: 'webhookToExecute',
webhookToExecute: parsedWebhook,
expectsDedicatedReply: true,
},

View File

@@ -13,6 +13,7 @@ export const executeRedirect = (
return {
clientSideActions: [
{
type: 'redirect',
redirect: { url: formattedUrl, isNewTab: block.options.isNewTab },
},
],

View File

@@ -21,6 +21,7 @@ export const executeScript = (
outgoingEdgeId: block.outgoingEdgeId,
clientSideActions: [
{
type: 'scriptToExecute',
scriptToExecute: scriptToExecute,
},
],

View File

@@ -32,6 +32,7 @@ export const executeSetVariable = (
outgoingEdgeId: block.outgoingEdgeId,
clientSideActions: [
{
type: 'setVariable',
setVariable: {
scriptToExecute,
},

View File

@@ -24,6 +24,7 @@ export const executeWait = (
parsedSecondsToWaitFor || block.options?.shouldPause
? [
{
type: 'wait',
wait: { secondsToWaitFor: parsedSecondsToWaitFor ?? 0 },
expectsDedicatedReply: block.options.shouldPause,
},

View File

@@ -70,6 +70,7 @@ export const executeForgedBlock = async (
outgoingEdgeId: block.outgoingEdgeId,
clientSideActions: [
{
type: 'stream',
expectsDedicatedReply: true,
stream: true,
},
@@ -135,6 +136,7 @@ export const executeForgedBlock = async (
(state.typebotsQueue[0].resultId || !blockDef.isDisabledInPreview)
) {
clientSideActions.push({
type: 'codeToExecute',
codeToExecute: action?.run?.web?.parseFunction({
options: parsedOptions,
}),

View File

@@ -36,8 +36,6 @@ import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integr
import { defaultTheme } from '@typebot.io/schemas/features/typebot/theme/constants'
import { VisitedEdge } from '@typebot.io/prisma'
import { env } from '@typebot.io/env'
import { forgedBlocks } from '@typebot.io/forge-schemas'
import { FunctionToExecute } from '@typebot.io/forge'
type StartParams =
| ({
@@ -61,7 +59,7 @@ export const startSession = async ({
startParams,
initialSessionState,
}: Props): Promise<
Omit<StartChatResponse, 'resultId'> & {
Omit<StartChatResponse, 'resultId' | 'isStreamEnabled' | 'sessionId'> & {
newSessionState: SessionState
visitedEdges: VisitedEdge[]
resultId?: string
@@ -427,7 +425,7 @@ const parseStartClientSideAction = (
)
return
return { startPropsToInject }
return { type: 'startPropsToInject', startPropsToInject }
}
const sanitizeAndParseTheme = (

View File

@@ -92,6 +92,7 @@ export const startWhatsAppSession = async ({
type: 'live',
publicId: publicTypebot.typebot.publicId as string,
isOnlyRegistering: false,
isStreamEnabled: false,
},
initialSessionState: {
whatsApp: {