diff --git a/apps/builder/src/features/preview/components/ApiPreviewInstructions.tsx b/apps/builder/src/features/preview/components/ApiPreviewInstructions.tsx
index 206c7a545..10cbc5e8c 100644
--- a/apps/builder/src/features/preview/components/ApiPreviewInstructions.tsx
+++ b/apps/builder/src/features/preview/components/ApiPreviewInstructions.tsx
@@ -2,6 +2,7 @@ import { CodeEditor } from '@/components/inputs/CodeEditor'
import { TextLink } from '@/components/TextLink'
import { useEditor } from '@/features/editor/providers/EditorProvider'
import { useTypebot } from '@/features/editor/providers/TypebotProvider'
+import { parseApiHost } from '@/features/publish/components/embeds/snippetParsers'
import {
Code,
ListItem,
@@ -10,7 +11,6 @@ import {
StackProps,
Text,
} from '@chakra-ui/react'
-import { env, getViewerUrl } from '@typebot.io/lib'
export const ApiPreviewInstructions = (props: StackProps) => {
const { typebot } = useTypebot()
@@ -60,9 +60,9 @@ export const ApiPreviewInstructions = (props: StackProps) => {
with the following JSON body:
@@ -80,9 +80,9 @@ export const ApiPreviewInstructions = (props: StackProps) => {
With the following JSON body:
diff --git a/apps/builder/src/features/publish/components/embeds/modals/ApiModal.tsx b/apps/builder/src/features/publish/components/embeds/modals/ApiModal.tsx
index ac33f0b41..05ca232d2 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/ApiModal.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/ApiModal.tsx
@@ -16,8 +16,9 @@ import {
Text,
Stack,
} from '@chakra-ui/react'
-import { env, getViewerUrl } from '@typebot.io/lib'
import { ModalProps } from '../EmbedButton'
+import { parseApiHost } from '../snippetParsers/shared'
+import { useTypebot } from '@/features/editor/providers/TypebotProvider'
export const ApiModal = ({
isPublished,
@@ -25,6 +26,7 @@ export const ApiModal = ({
isOpen,
onClose,
}: ModalProps): JSX.Element => {
+ const { typebot } = useTypebot()
const startParamsBody = `{
"startParams": {
"typebot": "${publicId}",
@@ -57,9 +59,9 @@ export const ApiModal = ({
with the following JSON body:
@@ -77,9 +79,9 @@ export const ApiModal = ({
With the following JSON body:
diff --git a/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptBubbleSnippet.tsx b/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptBubbleSnippet.tsx
index 48e2a7613..9dff1d7ad 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptBubbleSnippet.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptBubbleSnippet.tsx
@@ -1,11 +1,13 @@
import prettier from 'prettier/standalone'
import parserHtml from 'prettier/parser-html'
-import { parseInitBubbleCode, typebotImportCode } from '../../snippetParsers'
+import {
+ parseApiHost,
+ parseInitBubbleCode,
+ typebotImportCode,
+} from '../../snippetParsers'
import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import { CodeEditor } from '@/components/inputs/CodeEditor'
import { BubbleProps } from '@typebot.io/js'
-import { env, getViewerUrl } from '@typebot.io/lib'
-import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
type Props = Pick
@@ -17,9 +19,7 @@ export const JavascriptBubbleSnippet = ({ theme, previewMessage }: Props) => {
${parseInitBubbleCode({
typebot: typebot?.publicId ?? '',
- apiHost: isCloudProdInstance
- ? undefined
- : env('VIEWER_INTERNAL_URL') ?? getViewerUrl(),
+ apiHost: parseApiHost(typebot?.customDomain),
theme: {
...theme,
chatWindow: {
diff --git a/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptPopupSnippet.tsx b/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptPopupSnippet.tsx
index 6831bb8bc..26a7bf4dc 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptPopupSnippet.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptPopupSnippet.tsx
@@ -1,11 +1,13 @@
import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import parserHtml from 'prettier/parser-html'
import prettier from 'prettier/standalone'
-import { parseInitPopupCode, typebotImportCode } from '../../snippetParsers'
+import {
+ parseApiHost,
+ parseInitPopupCode,
+ typebotImportCode,
+} from '../../snippetParsers'
import { CodeEditor } from '@/components/inputs/CodeEditor'
import { PopupProps } from '@typebot.io/js'
-import { env, getViewerUrl } from '@typebot.io/lib'
-import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
type Props = Pick
@@ -14,9 +16,7 @@ export const JavascriptPopupSnippet = ({ autoShowDelay }: Props) => {
const snippet = prettier.format(
createSnippet({
typebot: typebot?.publicId ?? '',
- apiHost: isCloudProdInstance
- ? undefined
- : env('VIEWER_INTERNAL_URL') ?? getViewerUrl(),
+ apiHost: parseApiHost(typebot?.customDomain),
autoShowDelay,
}),
{
diff --git a/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptStandardSnippet.tsx b/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptStandardSnippet.tsx
index b13ebfdce..4837a74de 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptStandardSnippet.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/Javascript/JavascriptStandardSnippet.tsx
@@ -1,10 +1,12 @@
import parserHtml from 'prettier/parser-html'
import prettier from 'prettier/standalone'
-import { parseInitStandardCode, typebotImportCode } from '../../snippetParsers'
+import {
+ parseApiHost,
+ parseInitStandardCode,
+ typebotImportCode,
+} from '../../snippetParsers'
import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import { CodeEditor } from '@/components/inputs/CodeEditor'
-import { env, getViewerUrl } from '@typebot.io/lib'
-import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
type Props = {
widthLabel?: string
@@ -18,7 +20,7 @@ export const JavascriptStandardSnippet = ({
const { typebot } = useTypebot()
const snippet = prettier.format(
- `${parseStandardHeadCode(typebot?.publicId)}
+ `${parseStandardHeadCode(typebot?.publicId, typebot?.customDomain)}
${parseStandardElementCode(widthLabel, heightLabel)}`,
{
parser: 'html',
@@ -29,15 +31,16 @@ export const JavascriptStandardSnippet = ({
return
}
-export const parseStandardHeadCode = (publicId?: string | null) =>
+export const parseStandardHeadCode = (
+ publicId?: string | null,
+ customDomain?: string | null
+) =>
prettier.format(
``,
{ parser: 'html', plugins: [parserHtml] }
)
diff --git a/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptBubbleInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptBubbleInstructions.tsx
index 18d108176..f6c7eeae6 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptBubbleInstructions.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptBubbleInstructions.tsx
@@ -4,14 +4,13 @@ import { Stack, Text } from '@chakra-ui/react'
import { BubbleProps } from '@typebot.io/js'
import { Typebot } from '@typebot.io/schemas'
import { useState } from 'react'
-import { env, getViewerUrl } from '@typebot.io/lib'
import { BubbleSettings } from '../../../settings/BubbleSettings/BubbleSettings'
import {
parseInlineScript,
parseInitBubbleCode,
typebotImportCode,
+ parseApiHost,
} from '../../../snippetParsers'
-import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
export const parseDefaultBubbleTheme = (typebot?: Typebot) => ({
button: {
@@ -37,9 +36,7 @@ export const ScriptBubbleInstructions = () => {
${parseInitBubbleCode({
typebot: typebot?.publicId ?? '',
- apiHost: isCloudProdInstance
- ? undefined
- : env('VIEWER_INTERNAL_URL') ?? getViewerUrl(),
+ apiHost: parseApiHost(typebot?.customDomain),
theme,
previewMessage,
})}`
diff --git a/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptPopupInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptPopupInstructions.tsx
index 769b6fc67..e300467f4 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptPopupInstructions.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptPopupInstructions.tsx
@@ -1,12 +1,11 @@
import { CodeEditor } from '@/components/inputs/CodeEditor'
import { useTypebot } from '@/features/editor/providers/TypebotProvider'
-import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
import { Stack, Text } from '@chakra-ui/react'
import { useState } from 'react'
-import { env, getViewerUrl } from '@typebot.io/lib'
import { PopupSettings } from '../../../settings/PopupSettings'
import { parseInitPopupCode } from '../../../snippetParsers'
import {
+ parseApiHost,
parseInlineScript,
typebotImportCode,
} from '../../../snippetParsers/shared'
@@ -20,9 +19,7 @@ export const ScriptPopupInstructions = () => {
${parseInitPopupCode({
typebot: typebot?.publicId ?? '',
- apiHost: isCloudProdInstance
- ? undefined
- : env('VIEWER_INTERNAL_URL') ?? getViewerUrl(),
+ apiHost: parseApiHost(typebot?.customDomain),
autoShowDelay: inputValue,
})}`
)
diff --git a/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptStandardInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptStandardInstructions.tsx
index 156430ea2..ed656b283 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptStandardInstructions.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptStandardInstructions.tsx
@@ -1,13 +1,12 @@
import { CodeEditor } from '@/components/inputs/CodeEditor'
import { useTypebot } from '@/features/editor/providers/TypebotProvider'
-import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
import { Stack, Code, Text } from '@chakra-ui/react'
import { useState } from 'react'
-import { env, getViewerUrl } from '@typebot.io/lib'
import { StandardSettings } from '../../../settings/StandardSettings'
import { parseInitStandardCode } from '../../../snippetParsers/standard'
import { parseStandardElementCode } from '../../Javascript/JavascriptStandardSnippet'
import {
+ parseApiHost,
parseInlineScript,
typebotImportCode,
} from '../../../snippetParsers/shared'
@@ -31,9 +30,7 @@ export const ScriptStandardInstructions = () => {
${parseInitStandardCode({
typebot: typebot?.publicId ?? '',
- apiHost: isCloudProdInstance
- ? undefined
- : env('VIEWER_INTERNAL_URL') ?? getViewerUrl(),
+ apiHost: parseApiHost(typebot?.customDomain),
})}`)
return (
diff --git a/apps/builder/src/features/publish/components/embeds/modals/WordpressModal/instructions/WordpressBubbleInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/WordpressModal/instructions/WordpressBubbleInstructions.tsx
index 76a2f3404..70b45d643 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/WordpressModal/instructions/WordpressBubbleInstructions.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/WordpressModal/instructions/WordpressBubbleInstructions.tsx
@@ -12,10 +12,8 @@ import {
import { BubbleProps } from '@typebot.io/js'
import { useState } from 'react'
import { BubbleSettings } from '../../../settings/BubbleSettings/BubbleSettings'
-import { parseInitBubbleCode } from '../../../snippetParsers'
+import { parseApiHost, parseInitBubbleCode } from '../../../snippetParsers'
import { parseDefaultBubbleTheme } from '../../Javascript/instructions/JavascriptBubbleInstructions'
-import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
-import { env, getViewerUrl } from '@typebot.io/lib'
type Props = {
publicId: string
@@ -31,9 +29,7 @@ export const WordpressBubbleInstructions = ({ publicId }: Props) => {
const initCode = parseInitBubbleCode({
typebot: publicId,
- apiHost: isCloudProdInstance
- ? undefined
- : env('VIEWER_INTERNAL_URL') ?? getViewerUrl(),
+ apiHost: parseApiHost(typebot?.customDomain),
theme: {
...theme,
chatWindow: {
diff --git a/apps/builder/src/features/publish/components/embeds/modals/WordpressModal/instructions/WordpressPopupInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/WordpressModal/instructions/WordpressPopupInstructions.tsx
index 53bfac867..e4ded25eb 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/WordpressModal/instructions/WordpressPopupInstructions.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/WordpressModal/instructions/WordpressPopupInstructions.tsx
@@ -11,20 +11,21 @@ import {
import { useState } from 'react'
import { PopupSettings } from '../../../settings/PopupSettings'
import { parseInitPopupCode } from '../../../snippetParsers/popup'
-import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
-import { env, getViewerUrl } from '@typebot.io/lib'
+import { parseApiHost } from '../../../snippetParsers'
type Props = {
publicId: string
+ customDomain?: string
}
-export const WordpressPopupInstructions = ({ publicId }: Props) => {
+export const WordpressPopupInstructions = ({
+ publicId,
+ customDomain,
+}: Props) => {
const [autoShowDelay, setAutoShowDelay] = useState()
const initCode = parseInitPopupCode({
typebot: publicId,
- apiHost: isCloudProdInstance
- ? undefined
- : env('VIEWER_INTERNAL_URL') ?? getViewerUrl(),
+ apiHost: parseApiHost(customDomain),
autoShowDelay,
})
diff --git a/apps/builder/src/features/publish/components/embeds/snippetParsers/shared.ts b/apps/builder/src/features/publish/components/embeds/snippetParsers/shared.ts
index 487d68be5..6a3f7c4a9 100644
--- a/apps/builder/src/features/publish/components/embeds/snippetParsers/shared.ts
+++ b/apps/builder/src/features/publish/components/embeds/snippetParsers/shared.ts
@@ -1,7 +1,10 @@
import { BotProps } from '@typebot.io/js'
import parserBabel from 'prettier/parser-babel'
import prettier from 'prettier/standalone'
-import { isDefined } from '@typebot.io/lib'
+import { env, getViewerUrl, isDefined } from '@typebot.io/lib'
+import { Typebot } from '@typebot.io/schemas'
+import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
+import packageJson from '../../../../../../../../packages/embeds/js/package.json'
export const parseStringParam = (fieldName: string, fieldValue?: string) =>
fieldValue ? `${fieldName}: "${fieldValue}",` : ``
@@ -31,7 +34,9 @@ export const parseReactBotProps = ({ typebot, apiHost }: BotProps) => {
return `${typebotLine} ${apiHostLine}`
}
-export const typebotImportCode = `import Typebot from 'https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0/dist/web.js'`
+export const typebotImportCode = isCloudProdInstance
+ ? `import Typebot from 'https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0/dist/web.js'`
+ : `import Typebot from 'https://cdn.jsdelivr.net/npm/@typebot.io/js@${packageJson.version}/dist/web.js'`
export const parseInlineScript = (script: string) =>
prettier.format(
@@ -41,3 +46,12 @@ export const parseInlineScript = (script: string) =>
document.body.append(typebotInitScript);`,
{ parser: 'babel', plugins: [parserBabel] }
)
+
+export const parseApiHost = (
+ customDomain: Typebot['customDomain'] | undefined
+) => {
+ if (customDomain) return new URL(`https://${customDomain}`).origin
+ return isCloudProdInstance
+ ? undefined
+ : env('VIEWER_INTERNAL_URL') ?? getViewerUrl()
+}
diff --git a/apps/docs/openapi/builder/_spec_.json b/apps/docs/openapi/builder/_spec_.json
index 30dedd91e..bf90b8ba2 100644
--- a/apps/docs/openapi/builder/_spec_.json
+++ b/apps/docs/openapi/builder/_spec_.json
@@ -1614,6 +1614,9 @@
},
"isCode": {
"type": "boolean"
+ },
+ "isExecutedOnClient": {
+ "type": "boolean"
}
},
"additionalProperties": false
diff --git a/apps/docs/openapi/chat/_spec_.json b/apps/docs/openapi/chat/_spec_.json
index 304ec44c4..da0aa9f52 100644
--- a/apps/docs/openapi/chat/_spec_.json
+++ b/apps/docs/openapi/chat/_spec_.json
@@ -1275,6 +1275,9 @@
},
"isCode": {
"type": "boolean"
+ },
+ "isExecutedOnClient": {
+ "type": "boolean"
}
},
"additionalProperties": false
@@ -3820,92 +3823,171 @@
{
"anyOf": [
{
- "type": "object",
- "properties": {
- "scriptToExecute": {
+ "anyOf": [
+ {
"type": "object",
"properties": {
- "content": {
- "type": "string"
- },
- "args": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "value": {
- "anyOf": [
- {
+ "scriptToExecute": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "string"
+ },
+ "args": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "value": {
"anyOf": [
{
"anyOf": [
{
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ]
},
{
- "type": "number"
+ "type": "boolean"
}
]
},
{
- "type": "boolean"
+ "type": "array",
+ "items": {
+ "type": "string",
+ "nullable": true
+ }
}
- ]
- },
- {
- "type": "array",
- "items": {
- "type": "string",
- "nullable": true
- }
+ ],
+ "nullable": true
}
+ },
+ "required": [
+ "id"
],
- "nullable": true
+ "additionalProperties": false
}
- },
- "required": [
- "id"
- ],
- "additionalProperties": false
- }
+ }
+ },
+ "required": [
+ "content",
+ "args"
+ ],
+ "additionalProperties": false
}
},
"required": [
- "content",
- "args"
+ "scriptToExecute"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "redirect": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "isNewTab": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "isNewTab"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "redirect"
],
"additionalProperties": false
}
- },
- "required": [
- "scriptToExecute"
- ],
- "additionalProperties": false
+ ]
},
{
"type": "object",
"properties": {
- "redirect": {
+ "chatwoot": {
"type": "object",
"properties": {
- "url": {
- "type": "string"
- },
- "isNewTab": {
- "type": "boolean"
+ "scriptToExecute": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "string"
+ },
+ "args": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "nullable": true
+ }
+ }
+ ],
+ "nullable": true
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": [
+ "content",
+ "args"
+ ],
+ "additionalProperties": false
}
},
"required": [
- "isNewTab"
+ "scriptToExecute"
],
"additionalProperties": false
}
},
"required": [
- "redirect"
+ "chatwoot"
],
"additionalProperties": false
}
@@ -3914,75 +3996,30 @@
{
"type": "object",
"properties": {
- "chatwoot": {
+ "googleAnalytics": {
"type": "object",
"properties": {
- "scriptToExecute": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string"
- },
- "args": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "value": {
- "anyOf": [
- {
- "anyOf": [
- {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- }
- ]
- },
- {
- "type": "boolean"
- }
- ]
- },
- {
- "type": "array",
- "items": {
- "type": "string",
- "nullable": true
- }
- }
- ],
- "nullable": true
- }
- },
- "required": [
- "id"
- ],
- "additionalProperties": false
- }
- }
- },
- "required": [
- "content",
- "args"
- ],
- "additionalProperties": false
+ "trackingId": {
+ "type": "string"
+ },
+ "category": {
+ "type": "string"
+ },
+ "action": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ },
+ "value": {
+ "type": "number"
}
},
- "required": [
- "scriptToExecute"
- ],
"additionalProperties": false
}
},
"required": [
- "chatwoot"
+ "googleAnalytics"
],
"additionalProperties": false
}
@@ -3991,30 +4028,21 @@
{
"type": "object",
"properties": {
- "googleAnalytics": {
+ "wait": {
"type": "object",
"properties": {
- "trackingId": {
- "type": "string"
- },
- "category": {
- "type": "string"
- },
- "action": {
- "type": "string"
- },
- "label": {
- "type": "string"
- },
- "value": {
+ "secondsToWaitFor": {
"type": "number"
}
},
+ "required": [
+ "secondsToWaitFor"
+ ],
"additionalProperties": false
}
},
"required": [
- "googleAnalytics"
+ "wait"
],
"additionalProperties": false
}
@@ -4023,21 +4051,75 @@
{
"type": "object",
"properties": {
- "wait": {
+ "setVariable": {
"type": "object",
"properties": {
- "secondsToWaitFor": {
- "type": "number"
+ "scriptToExecute": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "string"
+ },
+ "args": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "nullable": true
+ }
+ }
+ ],
+ "nullable": true
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": [
+ "content",
+ "args"
+ ],
+ "additionalProperties": false
}
},
"required": [
- "secondsToWaitFor"
+ "scriptToExecute"
],
"additionalProperties": false
}
},
"required": [
- "wait"
+ "setVariable"
],
"additionalProperties": false
}
diff --git a/packages/embeds/js/package.json b/packages/embeds/js/package.json
index bf1be1bc8..c31aea29e 100644
--- a/packages/embeds/js/package.json
+++ b/packages/embeds/js/package.json
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
- "version": "0.0.36",
+ "version": "0.0.37",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",
diff --git a/packages/embeds/react/package.json b/packages/embeds/react/package.json
index 6cc1fa06d..0f075b6f5 100644
--- a/packages/embeds/react/package.json
+++ b/packages/embeds/react/package.json
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
- "version": "0.0.36",
+ "version": "0.0.37",
"description": "React library to display typebots on your website",
"main": "dist/index.js",
"types": "dist/index.d.ts",