@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/js",
|
||||
"version": "0.2.81",
|
||||
"version": "0.2.82",
|
||||
"description": "Javascript library to display typebots on your website",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
||||
@@ -39,13 +39,14 @@ export type BotProps = {
|
||||
apiHost?: string
|
||||
font?: Font
|
||||
progressBarRef?: HTMLDivElement
|
||||
startFrom?: StartFrom
|
||||
sessionId?: string
|
||||
onNewInputBlock?: (inputBlock: InputBlock) => void
|
||||
onAnswer?: (answer: { message: string; blockId: string }) => void
|
||||
onInit?: () => void
|
||||
onEnd?: () => void
|
||||
onNewLogs?: (logs: OutgoingLog[]) => void
|
||||
onChatStatePersisted?: (isEnabled: boolean) => void
|
||||
startFrom?: StartFrom
|
||||
}
|
||||
|
||||
export const Bot = (props: BotProps & { class?: string }) => {
|
||||
@@ -81,6 +82,7 @@ export const Bot = (props: BotProps & { class?: string }) => {
|
||||
...props.prefilledVariables,
|
||||
},
|
||||
startFrom: props.startFrom,
|
||||
sessionId: props.sessionId,
|
||||
})
|
||||
if (error instanceof HTTPError) {
|
||||
if (isPreview) {
|
||||
|
||||
@@ -14,6 +14,7 @@ export const defaultBotProps: BotProps = {
|
||||
prefilledVariables: undefined,
|
||||
apiHost: undefined,
|
||||
resultId: undefined,
|
||||
sessionId: undefined,
|
||||
}
|
||||
|
||||
export const defaultPopupProps: PopupProps = {
|
||||
|
||||
@@ -21,6 +21,7 @@ type Props = {
|
||||
isPreview: boolean
|
||||
prefilledVariables?: Record<string, unknown>
|
||||
resultId?: string
|
||||
sessionId?: string
|
||||
}
|
||||
|
||||
export async function startChatQuery({
|
||||
@@ -31,6 +32,7 @@ export async function startChatQuery({
|
||||
resultId,
|
||||
stripeRedirectStatus,
|
||||
startFrom,
|
||||
sessionId,
|
||||
}: Props) {
|
||||
if (isNotDefined(typebot))
|
||||
throw new Error('Typebot ID is required to get initial messages')
|
||||
@@ -83,6 +85,7 @@ export async function startChatQuery({
|
||||
startFrom,
|
||||
typebot,
|
||||
prefilledVariables,
|
||||
sessionId,
|
||||
} satisfies Omit<
|
||||
StartPreviewChatInput,
|
||||
'typebotId' | 'isOnlyRegistering'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/nextjs",
|
||||
"version": "0.2.81",
|
||||
"version": "0.2.82",
|
||||
"description": "Convenient library to display typebots on your Next.js website",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/react",
|
||||
"version": "0.2.81",
|
||||
"version": "0.2.82",
|
||||
"description": "Convenient library to display typebots on your React app",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user